>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA1 = C_algo.SHA1;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA1\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA1,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t var block;\n\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./evpkdf\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./evpkdf\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t var block;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t var modeCreator;\n\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t modeCreator = mode.createDecryptor;\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\n\t if (this._mode && this._mode.__creator == modeCreator) {\n\t this._mode.init(this, iv && iv.words);\n\t } else {\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t this._mode.__creator = modeCreator;\n\t }\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t var finalProcessedBlocks;\n\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t var wordArray;\n\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t var salt;\n\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t var keystream;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t for (var i = data.sigBytes - 1; i >= 0; i--) {\n\t if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t data.sigBytes = i + 1;\n\t break;\n\t }\n\t }\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t var t;\n\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t // Make sure the key length is valid (64, 128 or >= 192 bit)\n\t if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {\n\t throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');\n\t }\n\n\t // Extend the key according to the keying options defined in 3DES standard\n\t var key1 = keyWords.slice(0, 2);\n\t var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);\n\t var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(key1));\n\t this._des2 = DES.createEncryptor(WordArray.create(key2));\n\t this._des3 = DES.createEncryptor(WordArray.create(key3));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));"]}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/LICENSE b/wechat/miniprogram/node_modules/@vant/weapp/LICENSE
new file mode 100644
index 00000000..8777860c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2016-present Youzan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/README.md b/wechat/miniprogram/node_modules/@vant/weapp/README.md
new file mode 100644
index 00000000..a7ba1eae
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/README.md
@@ -0,0 +1,116 @@
+
+
+
+轻量、可靠的小程序 UI 组件库
+
+
+
+
+
+
+
+
+
+ 🔥 文档网站(国内)
+
+ 🌈 文档网站(GitHub)
+
+ 🚀 Vue 版
+
+
+---
+
+### 介绍
+
+Vant 是**有赞前端团队**开源的移动端组件库,于 2017 年开源,已持续维护 4 年时间。Vant 对内承载了有赞所有核心业务,对外服务十多万开发者,是业界主流的移动端组件库之一。
+
+目前 Vant 官方提供了 [Vue 2 版本](https://vant-contrib.gitee.io/vant)、[Vue 3 版本](https://vant-contrib.gitee.io/vant/v3)和[微信小程序版本](http://vant-contrib.gitee.io/vant-weapp),并由社区团队维护 [React 版本](https://github.com/mxdi9i7/vant-react)和[支付宝小程序版本](https://github.com/ant-move/Vant-Aliapp)。
+
+## 预览
+
+扫描下方小程序二维码,体验组件库示例:
+
+
+
+## 使用之前
+
+使用 Vant Weapp 前,请确保你已经学习过微信官方的 [小程序简易教程](https://developers.weixin.qq.com/miniprogram/dev/framework/) 和 [自定义组件介绍](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)。
+
+## 安装
+
+### 方式一. 通过 npm 安装 (推荐)
+
+小程序已经支持使用 npm 安装第三方包,详见 [npm 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm)
+
+```bash
+# 通过 npm 安装
+npm i @vant/weapp -S --production
+
+# 通过 yarn 安装
+yarn add @vant/weapp --production
+
+# 安装 0.x 版本
+npm i vant-weapp -S --production
+```
+
+### 方式二. 下载代码
+
+直接通过 git 下载 Vant Weapp 源代码,并将`dist`目录拷贝到自己的项目中
+```bash
+git clone https://github.com/youzan/vant-weapp.git
+```
+
+## 使用组件
+
+以按钮组件为例,只需要在 json 文件中引入按钮对应的自定义组件即可
+
+```json
+{
+ "usingComponents": {
+ "van-button": "/path/to/vant-weapp/dist/button/index"
+ }
+}
+```
+
+接着就可以在 wxml 中直接使用组件
+
+```html
+按钮
+```
+
+## 在开发者工具中预览
+
+```bash
+# 安装项目依赖
+npm install
+
+# 执行组件编译
+npm run dev
+```
+
+打开[微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html),把`vant-weapp/example`目录添加进去就可以预览示例了。
+
+PS:关于 `van-area` Area 省市区选择组件,地区数据初始化可以直接在云开发环境中导入`vant-weapp/example/database_area.JSON`文件使用
+
+## 基础库版本
+
+Vant Weapp 最低支持到小程序基础库 2.2.3 版本
+
+## 链接
+
+* [更新日志](https://github.com/youzan/vant-weapp/blob/dev/docs/markdown/changelog.md)
+* [意见反馈](https://github.com/youzan/vant-weapp/issues)
+* [加入我们](https://job.youzan.com)
+* [Vant Vue 版](https://github.com/youzan/vant)
+
+## 开源协议
+
+本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)协议,请自由地享受和参与开源。
+
+[vant-weapp]: https://github.com/youzan/vant-weapp
+[issue]: https://github.com/youzan/vant-weapp/issues/new
+[PR]: https://github.com/youzan/vant-weapp/compare
+[MIT]: http://opensource.org/licenses/MIT
+[小程序简易教程]: https://developers.weixin.qq.com/miniprogram/dev/framework/
+[小程序框架介绍]: https://developers.weixin.qq.com/miniprogram/dev/framework/MINA.html
+[微信开发者工具]: https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.js
new file mode 100644
index 00000000..042a9061
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.js
@@ -0,0 +1,70 @@
+import { VantComponent } from '../common/component';
+import { button } from '../mixins/button';
+VantComponent({
+ mixins: [button],
+ props: {
+ show: Boolean,
+ title: String,
+ cancelText: String,
+ description: String,
+ round: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ actions: {
+ type: Array,
+ value: [],
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickAction: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onSelect(event) {
+ const { index } = event.currentTarget.dataset;
+ const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;
+ const item = actions[index];
+ if (item) {
+ this.$emit('select', item);
+ if (closeOnClickAction) {
+ this.onClose();
+ }
+ if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
+ wx.getUserProfile({
+ desc: item.getUserProfileDesc || ' ',
+ complete: (userProfile) => {
+ this.$emit('getuserinfo', userProfile);
+ },
+ });
+ }
+ }
+ },
+ onCancel() {
+ this.$emit('cancel');
+ },
+ onClose() {
+ this.$emit('close');
+ },
+ onClickOverlay() {
+ this.$emit('click-overlay');
+ this.onClose();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.json
new file mode 100644
index 00000000..19bf9891
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-popup": "../popup/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.wxml
new file mode 100644
index 00000000..b04cc3a3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.wxml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
+
+
+
+ {{ cancelText }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.wxss
new file mode 100644
index 00000000..9b247d5d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{padding:14px 16px;text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:22px;line-height:var(--action-sheet-item-line-height,22px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:#646566;color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{display:block;height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-top:8px;margin-top:var(--padding-xs,8px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#969799;color:var(--action-sheet-subname-color,#969799);line-height:20px;line-height:var(--action-sheet-subname-line-height,20px)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:48px;line-height:var(--action-sheet-header-height,48px)}.van-action-sheet__description{text-align:center;padding:20px 16px;padding:20px var(--padding-md,16px);color:#969799;color:var(--action-sheet-description-color,#969799);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 16px;padding:var(--action-sheet-close-icon-padding,0 16px);font-size:22px!important;font-size:var(--action-sheet-close-icon-size,22px)!important;color:#c8c9cc;color:var(--action-sheet-close-icon-color,#c8c9cc)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.js
new file mode 100644
index 00000000..e21e67e2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.js
@@ -0,0 +1,235 @@
+import { VantComponent } from '../common/component';
+import { pickerProps } from '../picker/shared';
+import { requestAnimationFrame } from '../common/utils';
+const EMPTY_CODE = '000000';
+VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: Object.assign(Object.assign({}, pickerProps), {
+ value: {
+ type: String,
+ observer(value) {
+ this.code = value;
+ this.setValues();
+ },
+ },
+ areaList: {
+ type: Object,
+ value: {},
+ observer: 'setValues',
+ },
+ columnsNum: {
+ type: null,
+ value: 3,
+ },
+ columnsPlaceholder: {
+ type: Array,
+ observer(val) {
+ this.setData({
+ typeToColumnsPlaceholder: {
+ province: val[0] || '',
+ city: val[1] || '',
+ county: val[2] || '',
+ },
+ });
+ },
+ },
+ }),
+ data: {
+ columns: [{ values: [] }, { values: [] }, { values: [] }],
+ typeToColumnsPlaceholder: {},
+ },
+ mounted() {
+ requestAnimationFrame(() => {
+ this.setValues();
+ });
+ },
+ methods: {
+ getPicker() {
+ if (this.picker == null) {
+ this.picker = this.selectComponent('.van-area__picker');
+ }
+ return this.picker;
+ },
+ onCancel(event) {
+ this.emit('cancel', event.detail);
+ },
+ onConfirm(event) {
+ const { index } = event.detail;
+ let { value } = event.detail;
+ value = this.parseValues(value);
+ this.emit('confirm', { value, index });
+ },
+ emit(type, detail) {
+ detail.values = detail.value;
+ delete detail.value;
+ this.$emit(type, detail);
+ },
+ parseValues(values) {
+ const { columnsPlaceholder } = this.data;
+ return values.map((value, index) => {
+ if (
+ value &&
+ (!value.code || value.name === columnsPlaceholder[index])
+ ) {
+ return Object.assign(Object.assign({}, value), {
+ code: '',
+ name: '',
+ });
+ }
+ return value;
+ });
+ },
+ onChange(event) {
+ var _a;
+ const { index, picker, value } = event.detail;
+ this.code = value[index].code;
+ (_a = this.setValues()) === null || _a === void 0
+ ? void 0
+ : _a.then(() => {
+ this.$emit('change', {
+ picker,
+ values: this.parseValues(picker.getValues()),
+ index,
+ });
+ });
+ },
+ getConfig(type) {
+ const { areaList } = this.data;
+ return (areaList && areaList[`${type}_list`]) || {};
+ },
+ getList(type, code) {
+ if (type !== 'province' && !code) {
+ return [];
+ }
+ const { typeToColumnsPlaceholder } = this.data;
+ const list = this.getConfig(type);
+ let result = Object.keys(list).map((code) => ({
+ code,
+ name: list[code],
+ }));
+ if (code != null) {
+ // oversea code
+ if (code[0] === '9' && type === 'city') {
+ code = '9';
+ }
+ result = result.filter((item) => item.code.indexOf(code) === 0);
+ }
+ if (typeToColumnsPlaceholder[type] && result.length) {
+ // set columns placeholder
+ const codeFill =
+ type === 'province'
+ ? ''
+ : type === 'city'
+ ? EMPTY_CODE.slice(2, 4)
+ : EMPTY_CODE.slice(4, 6);
+ result.unshift({
+ code: `${code}${codeFill}`,
+ name: typeToColumnsPlaceholder[type],
+ });
+ }
+ return result;
+ },
+ getIndex(type, code) {
+ let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
+ const list = this.getList(type, code.slice(0, compareNum - 2));
+ // oversea code
+ if (code[0] === '9' && type === 'province') {
+ compareNum = 1;
+ }
+ code = code.slice(0, compareNum);
+ for (let i = 0; i < list.length; i++) {
+ if (list[i].code.slice(0, compareNum) === code) {
+ return i;
+ }
+ }
+ return 0;
+ },
+ setValues() {
+ const picker = this.getPicker();
+ if (!picker) {
+ return;
+ }
+ let code = this.code || this.getDefaultCode();
+ const provinceList = this.getList('province');
+ const cityList = this.getList('city', code.slice(0, 2));
+ const stack = [];
+ const indexes = [];
+ const { columnsNum } = this.data;
+ if (columnsNum >= 1) {
+ stack.push(picker.setColumnValues(0, provinceList, false));
+ indexes.push(this.getIndex('province', code));
+ }
+ if (columnsNum >= 2) {
+ stack.push(picker.setColumnValues(1, cityList, false));
+ indexes.push(this.getIndex('city', code));
+ if (cityList.length && code.slice(2, 4) === '00') {
+ [{ code }] = cityList;
+ }
+ }
+ if (columnsNum === 3) {
+ stack.push(
+ picker.setColumnValues(
+ 2,
+ this.getList('county', code.slice(0, 4)),
+ false
+ )
+ );
+ indexes.push(this.getIndex('county', code));
+ }
+ return Promise.all(stack)
+ .catch(() => {})
+ .then(() => picker.setIndexes(indexes))
+ .catch(() => {});
+ },
+ getDefaultCode() {
+ const { columnsPlaceholder } = this.data;
+ if (columnsPlaceholder.length) {
+ return EMPTY_CODE;
+ }
+ const countyCodes = Object.keys(this.getConfig('county'));
+ if (countyCodes[0]) {
+ return countyCodes[0];
+ }
+ const cityCodes = Object.keys(this.getConfig('city'));
+ if (cityCodes[0]) {
+ return cityCodes[0];
+ }
+ return '';
+ },
+ getValues() {
+ const picker = this.getPicker();
+ if (!picker) {
+ return [];
+ }
+ return this.parseValues(picker.getValues().filter((value) => !!value));
+ },
+ getDetail() {
+ const values = this.getValues();
+ const area = {
+ code: '',
+ country: '',
+ province: '',
+ city: '',
+ county: '',
+ };
+ if (!values.length) {
+ return area;
+ }
+ const names = values.map((item) => item.name);
+ area.code = values[values.length - 1].code;
+ if (area.code[0] === '9') {
+ area.country = names[1] || '';
+ area.province = names[2] || '';
+ } else {
+ area.province = names[0] || '';
+ area.city = names[1] || '';
+ area.county = names[2] || '';
+ }
+ return area;
+ },
+ reset(code) {
+ this.code = code || '';
+ return this.setValues();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.json
new file mode 100644
index 00000000..a778e91c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-picker": "../picker/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxml
new file mode 100644
index 00000000..f7dc51f5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxml
@@ -0,0 +1,20 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxs
new file mode 100644
index 00000000..07723c11
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxs
@@ -0,0 +1,8 @@
+/* eslint-disable */
+function displayColumns(columns, columnsNum) {
+ return columns.slice(0, +columnsNum);
+}
+
+module.exports = {
+ displayColumns: displayColumns,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/area/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.js
new file mode 100644
index 00000000..283c4a09
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.js
@@ -0,0 +1,63 @@
+import { VantComponent } from '../common/component';
+import { button } from '../mixins/button';
+import { canIUseFormFieldButton } from '../common/version';
+const mixins = [button];
+if (canIUseFormFieldButton()) {
+ mixins.push('wx://form-field-button');
+}
+VantComponent({
+ mixins,
+ classes: ['hover-class', 'loading-class'],
+ data: {
+ baseStyle: '',
+ },
+ props: {
+ formType: String,
+ icon: String,
+ classPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ plain: Boolean,
+ block: Boolean,
+ round: Boolean,
+ square: Boolean,
+ loading: Boolean,
+ hairline: Boolean,
+ disabled: Boolean,
+ loadingText: String,
+ customStyle: String,
+ loadingType: {
+ type: String,
+ value: 'circular',
+ },
+ type: {
+ type: String,
+ value: 'default',
+ },
+ dataset: null,
+ size: {
+ type: String,
+ value: 'normal',
+ },
+ loadingSize: {
+ type: String,
+ value: '20px',
+ },
+ color: String,
+ },
+ methods: {
+ onClick(event) {
+ this.$emit('click', event);
+ const { canIUseGetUserProfile, openType, getUserProfileDesc } = this.data;
+ if (openType === 'getUserInfo' && canIUseGetUserProfile) {
+ wx.getUserProfile({
+ desc: getUserProfileDesc || ' ',
+ complete: (userProfile) => {
+ this.$emit('getuserinfo', userProfile);
+ },
+ });
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxml
new file mode 100644
index 00000000..80348459
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxml
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxs
new file mode 100644
index 00000000..8b649fe1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxs
@@ -0,0 +1,39 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+ if (!data.color) {
+ return data.customStyle;
+ }
+
+ var properties = {
+ color: data.plain ? data.color : '#fff',
+ background: data.plain ? null : data.color,
+ };
+
+ // hide border when color is linear-gradient
+ if (data.color.indexOf('gradient') !== -1) {
+ properties.border = 0;
+ } else {
+ properties['border-color'] = data.color;
+ }
+
+ return style([properties, data.customStyle]);
+}
+
+function loadingColor(data) {
+ if (data.plain) {
+ return data.color ? data.color : '#c9c9c9';
+ }
+
+ if (data.type === 'default') {
+ return '#c9c9c9';
+ }
+
+ return '#fff';
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ loadingColor: loadingColor,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxss
new file mode 100644
index 00000000..5a591fbd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/button/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);line-height:20px;line-height:var(--button-line-height,20px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background:#fff;background:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background:#07c160;background:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background:#1989fa;background:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background:#ee0a24;background:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background:#ff976a;background:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background:#fff;background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/calendar.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/calendar.wxml
new file mode 100644
index 00000000..4872e191
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/calendar.wxml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.js
new file mode 100644
index 00000000..6d20df0f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.js
@@ -0,0 +1,34 @@
+import { VantComponent } from '../../../common/component';
+VantComponent({
+ props: {
+ title: {
+ type: String,
+ value: '日期选择',
+ },
+ subtitle: String,
+ showTitle: Boolean,
+ showSubtitle: Boolean,
+ firstDayOfWeek: {
+ type: Number,
+ observer: 'initWeekDay',
+ },
+ },
+ data: {
+ weekdays: [],
+ },
+ created() {
+ this.initWeekDay();
+ },
+ methods: {
+ initWeekDay() {
+ const defaultWeeks = ['日', '一', '二', '三', '四', '五', '六'];
+ const firstDayOfWeek = this.data.firstDayOfWeek || 0;
+ this.setData({
+ weekdays: [
+ ...defaultWeeks.slice(firstDayOfWeek, 7),
+ ...defaultWeeks.slice(0, firstDayOfWeek),
+ ],
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.wxml
new file mode 100644
index 00000000..eb8e4b47
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.wxml
@@ -0,0 +1,16 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.wxss
new file mode 100644
index 00000000..4075e48f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/header/index.wxss
@@ -0,0 +1 @@
+@import '../../../common/index.wxss';.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16);box-shadow:var(--calendar-header-box-shadow,0 2px 10px rgba(125,126,128,.16))}.van-calendar__header-subtitle,.van-calendar__header-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-flex:1;flex:1;text-align:center;font-size:12px;font-size:var(--calendar-weekdays-font-size,12px);line-height:30px;line-height:var(--calendar-weekdays-height,30px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.js
new file mode 100644
index 00000000..d0026cf0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.js
@@ -0,0 +1,163 @@
+import { VantComponent } from '../../../common/component';
+import {
+ getMonthEndDay,
+ compareDay,
+ getPrevDay,
+ getNextDay,
+} from '../../utils';
+VantComponent({
+ props: {
+ date: {
+ type: null,
+ observer: 'setDays',
+ },
+ type: {
+ type: String,
+ observer: 'setDays',
+ },
+ color: String,
+ minDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ maxDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ showMark: Boolean,
+ rowHeight: null,
+ formatter: {
+ type: null,
+ observer: 'setDays',
+ },
+ currentDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ firstDayOfWeek: {
+ type: Number,
+ observer: 'setDays',
+ },
+ allowSameDay: Boolean,
+ showSubtitle: Boolean,
+ showMonthTitle: Boolean,
+ },
+ data: {
+ visible: true,
+ days: [],
+ },
+ methods: {
+ onClick(event) {
+ const { index } = event.currentTarget.dataset;
+ const item = this.data.days[index];
+ if (item.type !== 'disabled') {
+ this.$emit('click', item);
+ }
+ },
+ setDays() {
+ const days = [];
+ const startDate = new Date(this.data.date);
+ const year = startDate.getFullYear();
+ const month = startDate.getMonth();
+ const totalDay = getMonthEndDay(
+ startDate.getFullYear(),
+ startDate.getMonth() + 1
+ );
+ for (let day = 1; day <= totalDay; day++) {
+ const date = new Date(year, month, day);
+ const type = this.getDayType(date);
+ let config = {
+ date,
+ type,
+ text: day,
+ bottomInfo: this.getBottomInfo(type),
+ };
+ if (this.data.formatter) {
+ config = this.data.formatter(config);
+ }
+ days.push(config);
+ }
+ this.setData({ days });
+ },
+ getMultipleDayType(day) {
+ const { currentDate } = this.data;
+ if (!Array.isArray(currentDate)) {
+ return '';
+ }
+ const isSelected = (date) =>
+ currentDate.some((item) => compareDay(item, date) === 0);
+ if (isSelected(day)) {
+ const prevDay = getPrevDay(day);
+ const nextDay = getNextDay(day);
+ const prevSelected = isSelected(prevDay);
+ const nextSelected = isSelected(nextDay);
+ if (prevSelected && nextSelected) {
+ return 'multiple-middle';
+ }
+ if (prevSelected) {
+ return 'end';
+ }
+ return nextSelected ? 'start' : 'multiple-selected';
+ }
+ return '';
+ },
+ getRangeDayType(day) {
+ const { currentDate, allowSameDay } = this.data;
+ if (!Array.isArray(currentDate)) {
+ return '';
+ }
+ const [startDay, endDay] = currentDate;
+ if (!startDay) {
+ return '';
+ }
+ const compareToStart = compareDay(day, startDay);
+ if (!endDay) {
+ return compareToStart === 0 ? 'start' : '';
+ }
+ const compareToEnd = compareDay(day, endDay);
+ if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {
+ return 'start-end';
+ }
+ if (compareToStart === 0) {
+ return 'start';
+ }
+ if (compareToEnd === 0) {
+ return 'end';
+ }
+ if (compareToStart > 0 && compareToEnd < 0) {
+ return 'middle';
+ }
+ return '';
+ },
+ getDayType(day) {
+ const { type, minDate, maxDate, currentDate } = this.data;
+ if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {
+ return 'disabled';
+ }
+ if (type === 'single') {
+ return compareDay(day, currentDate) === 0 ? 'selected' : '';
+ }
+ if (type === 'multiple') {
+ return this.getMultipleDayType(day);
+ }
+ /* istanbul ignore else */
+ if (type === 'range') {
+ return this.getRangeDayType(day);
+ }
+ return '';
+ },
+ getBottomInfo(type) {
+ if (this.data.type === 'range') {
+ if (type === 'start') {
+ return '开始';
+ }
+ if (type === 'end') {
+ return '结束';
+ }
+ if (type === 'start-end') {
+ return '开始/结束';
+ }
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxml
new file mode 100644
index 00000000..4a2c47c9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ {{ computed.formatMonthTitle(date) }}
+
+
+
+
+ {{ computed.getMark(date) }}
+
+
+
+
+ {{ item.topInfo }}
+ {{ item.text }}
+
+ {{ item.bottomInfo }}
+
+
+
+
+ {{ item.topInfo }}
+ {{ item.text }}
+
+ {{ item.bottomInfo }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxs
new file mode 100644
index 00000000..55e45a57
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxs
@@ -0,0 +1,71 @@
+/* eslint-disable */
+var utils = require('../../utils.wxs');
+
+function getMark(date) {
+ return getDate(date).getMonth() + 1;
+}
+
+var ROW_HEIGHT = 64;
+
+function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
+ var style = [];
+ var current = getDate(date).getDay() || 7;
+ var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :
+ current === 7 && firstDayOfWeek === 0 ? 0 :
+ (current - firstDayOfWeek);
+
+ if (index === 0) {
+ style.push(['margin-left', (100 * offset) / 7 + '%']);
+ }
+
+ if (rowHeight !== ROW_HEIGHT) {
+ style.push(['height', rowHeight + 'px']);
+ }
+
+ if (color) {
+ if (
+ type === 'start' ||
+ type === 'end' ||
+ type === 'start-end' ||
+ type === 'multiple-selected' ||
+ type === 'multiple-middle'
+ ) {
+ style.push(['background', color]);
+ } else if (type === 'middle') {
+ style.push(['color', color]);
+ }
+ }
+
+ return style
+ .map(function(item) {
+ return item.join(':');
+ })
+ .join(';');
+}
+
+function formatMonthTitle(date) {
+ date = getDate(date);
+ return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';
+}
+
+function getMonthStyle(visible, date, rowHeight) {
+ if (!visible) {
+ date = getDate(date);
+
+ var totalDay = utils.getMonthEndDay(
+ date.getFullYear(),
+ date.getMonth() + 1
+ );
+ var offset = getDate(date).getDay();
+ var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;
+
+ return 'padding-bottom:' + padding + 'px';
+ }
+}
+
+module.exports = {
+ getMark: getMark,
+ getDayStyle: getDayStyle,
+ formatMonthTitle: formatMonthTitle,
+ getMonthStyle: getMonthStyle
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxss
new file mode 100644
index 00000000..17c12f4e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/components/month/index.wxss
@@ -0,0 +1 @@
+@import '../../../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__month-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:14px;font-size:var(--calendar-month-title-font-size,14px);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__days{position:relative;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;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none;color:rgba(242,243,245,.8);color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:160px;font-size:var(--calendar-month-mark-font-size,160px)}.van-calendar__day,.van-calendar__selected-day{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:64px;height:var(--calendar-day-height,64px);font-size:16px;font-size:var(--calendar-day-font-size,16px)}.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;color:var(--calendar-range-edge-color,#fff);background-color:#ee0a24;background-color:var(--calendar-range-edge-background-color,#ee0a24)}.van-calendar__day--start{border-radius:4px 0 0 4px;border-radius:var(--border-radius-md,4px) 0 0 var(--border-radius-md,4px)}.van-calendar__day--end{border-radius:0 4px 4px 0;border-radius:0 var(--border-radius-md,4px) var(--border-radius-md,4px) 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px;border-radius:var(--border-radius-md,4px)}.van-calendar__day--middle{color:#ee0a24;color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;content:"";opacity:.1;opacity:var(--calendar-range-middle-background-opacity,.1)}.van-calendar__day--disabled{cursor:default;color:#c8c9cc;color:var(--calendar-day-disabled-color,#c8c9cc)}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;font-size:var(--calendar-info-font-size,10px);line-height:14px;line-height:var(--calendar-info-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;width:var(--calendar-selected-day-size,54px);height:54px;height:var(--calendar-selected-day-size,54px);color:#fff;color:var(--calendar-selected-day-color,#fff);background-color:#ee0a24;background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;border-radius:var(--border-radius-md,4px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.js
new file mode 100644
index 00000000..08dad0be
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.js
@@ -0,0 +1,309 @@
+import { VantComponent } from '../common/component';
+import {
+ ROW_HEIGHT,
+ getNextDay,
+ compareDay,
+ copyDates,
+ calcDateNum,
+ formatMonthTitle,
+ compareMonth,
+ getMonths,
+ getDayByOffset,
+} from './utils';
+import Toast from '../toast/toast';
+import { requestAnimationFrame } from '../common/utils';
+VantComponent({
+ props: {
+ title: {
+ type: String,
+ value: '日期选择',
+ },
+ color: String,
+ show: {
+ type: Boolean,
+ observer(val) {
+ if (val) {
+ this.initRect();
+ this.scrollIntoView();
+ }
+ },
+ },
+ formatter: null,
+ confirmText: {
+ type: String,
+ value: '确定',
+ },
+ rangePrompt: String,
+ showRangePrompt: {
+ type: Boolean,
+ value: true,
+ },
+ defaultDate: {
+ type: null,
+ observer(val) {
+ this.setData({ currentDate: val });
+ this.scrollIntoView();
+ },
+ },
+ allowSameDay: Boolean,
+ confirmDisabledText: String,
+ type: {
+ type: String,
+ value: 'single',
+ observer: 'reset',
+ },
+ minDate: {
+ type: null,
+ value: Date.now(),
+ },
+ maxDate: {
+ type: null,
+ value: new Date(
+ new Date().getFullYear(),
+ new Date().getMonth() + 6,
+ new Date().getDate()
+ ).getTime(),
+ },
+ position: {
+ type: String,
+ value: 'bottom',
+ },
+ rowHeight: {
+ type: null,
+ value: ROW_HEIGHT,
+ },
+ round: {
+ type: Boolean,
+ value: true,
+ },
+ poppable: {
+ type: Boolean,
+ value: true,
+ },
+ showMark: {
+ type: Boolean,
+ value: true,
+ },
+ showTitle: {
+ type: Boolean,
+ value: true,
+ },
+ showConfirm: {
+ type: Boolean,
+ value: true,
+ },
+ showSubtitle: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ maxRange: {
+ type: null,
+ value: null,
+ },
+ firstDayOfWeek: {
+ type: Number,
+ value: 0,
+ },
+ },
+ data: {
+ subtitle: '',
+ currentDate: null,
+ scrollIntoView: '',
+ },
+ created() {
+ this.setData({
+ currentDate: this.getInitialDate(),
+ });
+ },
+ mounted() {
+ if (this.data.show || !this.data.poppable) {
+ this.initRect();
+ this.scrollIntoView();
+ }
+ },
+ methods: {
+ reset() {
+ this.setData({ currentDate: this.getInitialDate() });
+ this.scrollIntoView();
+ },
+ initRect() {
+ if (this.contentObserver != null) {
+ this.contentObserver.disconnect();
+ }
+ const contentObserver = this.createIntersectionObserver({
+ thresholds: [0, 0.1, 0.9, 1],
+ observeAll: true,
+ });
+ this.contentObserver = contentObserver;
+ contentObserver.relativeTo('.van-calendar__body');
+ contentObserver.observe('.month', (res) => {
+ if (res.boundingClientRect.top <= res.relativeRect.top) {
+ // @ts-ignore
+ this.setData({ subtitle: formatMonthTitle(res.dataset.date) });
+ }
+ });
+ },
+ getInitialDate() {
+ const { type, defaultDate, minDate } = this.data;
+ if (type === 'range') {
+ const [startDay, endDay] = defaultDate || [];
+ return [
+ startDay || minDate,
+ endDay || getNextDay(new Date(minDate)).getTime(),
+ ];
+ }
+ if (type === 'multiple') {
+ return defaultDate || [minDate];
+ }
+ return defaultDate || minDate;
+ },
+ scrollIntoView() {
+ requestAnimationFrame(() => {
+ const {
+ currentDate,
+ type,
+ show,
+ poppable,
+ minDate,
+ maxDate,
+ } = this.data;
+ // @ts-ignore
+ const targetDate = type === 'single' ? currentDate : currentDate[0];
+ const displayed = show || !poppable;
+ if (!targetDate || !displayed) {
+ return;
+ }
+ const months = getMonths(minDate, maxDate);
+ months.some((month, index) => {
+ if (compareMonth(month, targetDate) === 0) {
+ this.setData({ scrollIntoView: `month${index}` });
+ return true;
+ }
+ return false;
+ });
+ });
+ },
+ onOpen() {
+ this.$emit('open');
+ },
+ onOpened() {
+ this.$emit('opened');
+ },
+ onClose() {
+ this.$emit('close');
+ },
+ onClosed() {
+ this.$emit('closed');
+ },
+ onClickDay(event) {
+ const { date } = event.detail;
+ const { type, currentDate, allowSameDay } = this.data;
+ if (type === 'range') {
+ // @ts-ignore
+ const [startDay, endDay] = currentDate;
+ if (startDay && !endDay) {
+ const compareToStart = compareDay(date, startDay);
+ if (compareToStart === 1) {
+ this.select([startDay, date], true);
+ } else if (compareToStart === -1) {
+ this.select([date, null]);
+ } else if (allowSameDay) {
+ this.select([date, date]);
+ }
+ } else {
+ this.select([date, null]);
+ }
+ } else if (type === 'multiple') {
+ let selectedIndex;
+ // @ts-ignore
+ const selected = currentDate.some((dateItem, index) => {
+ const equal = compareDay(dateItem, date) === 0;
+ if (equal) {
+ selectedIndex = index;
+ }
+ return equal;
+ });
+ if (selected) {
+ // @ts-ignore
+ const cancelDate = currentDate.splice(selectedIndex, 1);
+ this.setData({ currentDate });
+ this.unselect(cancelDate);
+ } else {
+ // @ts-ignore
+ this.select([...currentDate, date]);
+ }
+ } else {
+ this.select(date, true);
+ }
+ },
+ unselect(dateArray) {
+ const date = dateArray[0];
+ if (date) {
+ this.$emit('unselect', copyDates(date));
+ }
+ },
+ select(date, complete) {
+ if (complete && this.data.type === 'range') {
+ const valid = this.checkRange(date);
+ if (!valid) {
+ // auto selected to max range if showConfirm
+ if (this.data.showConfirm) {
+ this.emit([
+ date[0],
+ getDayByOffset(date[0], this.data.maxRange - 1),
+ ]);
+ } else {
+ this.emit(date);
+ }
+ return;
+ }
+ }
+ this.emit(date);
+ if (complete && !this.data.showConfirm) {
+ this.onConfirm();
+ }
+ },
+ emit(date) {
+ const getTime = (date) => (date instanceof Date ? date.getTime() : date);
+ this.setData({
+ currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),
+ });
+ this.$emit('select', copyDates(date));
+ },
+ checkRange(date) {
+ const { maxRange, rangePrompt, showRangePrompt } = this.data;
+ if (maxRange && calcDateNum(date) > maxRange) {
+ if (showRangePrompt) {
+ Toast({
+ duration: 0,
+ context: this,
+ message: rangePrompt || `选择天数不能超过 ${maxRange} 天`,
+ });
+ }
+ this.$emit('over-range');
+ return false;
+ }
+ return true;
+ },
+ onConfirm() {
+ if (
+ this.data.type === 'range' &&
+ !this.checkRange(this.data.currentDate)
+ ) {
+ return;
+ }
+ wx.nextTick(() => {
+ // @ts-ignore
+ this.$emit('confirm', copyDates(this.data.currentDate));
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.json
new file mode 100644
index 00000000..397d5aea
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.json
@@ -0,0 +1,10 @@
+{
+ "component": true,
+ "usingComponents": {
+ "header": "./components/header/index",
+ "month": "./components/month/index",
+ "van-button": "../button/index",
+ "van-popup": "../popup/index",
+ "van-toast": "../toast/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxml
new file mode 100644
index 00000000..7df0b980
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxs
new file mode 100644
index 00000000..2c04be10
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxs
@@ -0,0 +1,37 @@
+/* eslint-disable */
+var utils = require('./utils.wxs');
+
+function getMonths(minDate, maxDate) {
+ var months = [];
+ var cursor = getDate(minDate);
+
+ cursor.setDate(1);
+
+ do {
+ months.push(cursor.getTime());
+ cursor.setMonth(cursor.getMonth() + 1);
+ } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);
+
+ return months;
+}
+
+function getButtonDisabled(type, currentDate) {
+ if (currentDate == null) {
+ return true;
+ }
+
+ if (type === 'range') {
+ return !currentDate[0] || !currentDate[1];
+ }
+
+ if (type === 'multiple') {
+ return !currentDate.length;
+ }
+
+ return !currentDate;
+}
+
+module.exports = {
+ getMonths: getMonths,
+ getButtonDisabled: getButtonDisabled
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxss
new file mode 100644
index 00000000..9d78e0f4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;height:var(--calendar-height,100%);background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:80%;height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:36px!important;height:var(--calendar-confirm-button-height,36px)!important;margin:7px 0!important;margin:var(--calendar-confirm-button-margin,7px 0)!important;line-height:34px!important;line-height:var(--calendar-confirm-button-line-height,34px)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.d.ts
new file mode 100644
index 00000000..17fc0779
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.d.ts
@@ -0,0 +1,17 @@
+export declare const ROW_HEIGHT = 64;
+export declare function formatMonthTitle(date: Date): string;
+export declare function compareMonth(
+ date1: Date | number,
+ date2: Date | number
+): 1 | -1 | 0;
+export declare function compareDay(
+ day1: Date | number,
+ day2: Date | number
+): 1 | -1 | 0;
+export declare function getDayByOffset(date: Date, offset: number): Date;
+export declare function getPrevDay(date: Date): Date;
+export declare function getNextDay(date: Date): Date;
+export declare function calcDateNum(date: [Date, Date]): number;
+export declare function copyDates(dates: Date | Date[]): Date | Date[];
+export declare function getMonthEndDay(year: number, month: number): number;
+export declare function getMonths(minDate: number, maxDate: number): number[];
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.js
new file mode 100644
index 00000000..281a35c9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.js
@@ -0,0 +1,78 @@
+export const ROW_HEIGHT = 64;
+export function formatMonthTitle(date) {
+ if (!(date instanceof Date)) {
+ date = new Date(date);
+ }
+ return `${date.getFullYear()}年${date.getMonth() + 1}月`;
+}
+export function compareMonth(date1, date2) {
+ if (!(date1 instanceof Date)) {
+ date1 = new Date(date1);
+ }
+ if (!(date2 instanceof Date)) {
+ date2 = new Date(date2);
+ }
+ const year1 = date1.getFullYear();
+ const year2 = date2.getFullYear();
+ const month1 = date1.getMonth();
+ const month2 = date2.getMonth();
+ if (year1 === year2) {
+ return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
+ }
+ return year1 > year2 ? 1 : -1;
+}
+export function compareDay(day1, day2) {
+ if (!(day1 instanceof Date)) {
+ day1 = new Date(day1);
+ }
+ if (!(day2 instanceof Date)) {
+ day2 = new Date(day2);
+ }
+ const compareMonthResult = compareMonth(day1, day2);
+ if (compareMonthResult === 0) {
+ const date1 = day1.getDate();
+ const date2 = day2.getDate();
+ return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
+ }
+ return compareMonthResult;
+}
+export function getDayByOffset(date, offset) {
+ date = new Date(date);
+ date.setDate(date.getDate() + offset);
+ return date;
+}
+export function getPrevDay(date) {
+ return getDayByOffset(date, -1);
+}
+export function getNextDay(date) {
+ return getDayByOffset(date, 1);
+}
+export function calcDateNum(date) {
+ const day1 = new Date(date[0]).getTime();
+ const day2 = new Date(date[1]).getTime();
+ return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
+}
+export function copyDates(dates) {
+ if (Array.isArray(dates)) {
+ return dates.map((date) => {
+ if (date === null) {
+ return date;
+ }
+ return new Date(date);
+ });
+ }
+ return new Date(dates);
+}
+export function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+}
+export function getMonths(minDate, maxDate) {
+ const months = [];
+ const cursor = new Date(minDate);
+ cursor.setDate(1);
+ do {
+ months.push(cursor.getTime());
+ cursor.setMonth(cursor.getMonth() + 1);
+ } while (compareMonth(cursor, maxDate) !== 1);
+ return months;
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.wxs
new file mode 100644
index 00000000..e57f6b32
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/calendar/utils.wxs
@@ -0,0 +1,25 @@
+/* eslint-disable */
+function getMonthEndDay(year, month) {
+ return 32 - getDate(year, month - 1, 32).getDate();
+}
+
+function compareMonth(date1, date2) {
+ date1 = getDate(date1);
+ date2 = getDate(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;
+}
+
+module.exports = {
+ getMonthEndDay: getMonthEndDay,
+ compareMonth: compareMonth
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.js
new file mode 100644
index 00000000..6aaf99f2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.js
@@ -0,0 +1,49 @@
+import { link } from '../mixins/link';
+import { VantComponent } from '../common/component';
+VantComponent({
+ classes: [
+ 'num-class',
+ 'desc-class',
+ 'thumb-class',
+ 'title-class',
+ 'price-class',
+ 'origin-price-class',
+ ],
+ mixins: [link],
+ props: {
+ tag: String,
+ num: String,
+ desc: String,
+ thumb: String,
+ title: String,
+ price: {
+ type: String,
+ observer: 'updatePrice',
+ },
+ centered: Boolean,
+ lazyLoad: Boolean,
+ thumbLink: String,
+ originPrice: String,
+ thumbMode: {
+ type: String,
+ value: 'aspectFit',
+ },
+ currency: {
+ type: String,
+ value: '¥',
+ },
+ },
+ methods: {
+ updatePrice() {
+ const { price } = this.data;
+ const priceArr = price.toString().split('.');
+ this.setData({
+ integerStr: priceArr[0],
+ decimalStr: priceArr[1] ? `.${priceArr[1]}` : '',
+ });
+ },
+ onClickThumb() {
+ this.jumpLink('thumbLink');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.json
new file mode 100644
index 00000000..e9174076
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-tag": "../tag/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.wxml
new file mode 100644
index 00000000..62173e4a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.wxss
new file mode 100644
index 00000000..a21a5995
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/card/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-card{position:relative;box-sizing:border-box;padding:8px 16px;padding:var(--card-padding,8px 16px);font-size:12px;font-size:var(--card-font-size,12px);color:#323233;color:var(--card-text-color,#323233);background-color:#fafafa;background-color:var(--card-background-color,#fafafa)}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;-webkit-flex:none;flex:none;width:88px;width:var(--card-thumb-size,88px);height:88px;height:var(--card-thumb-size,88px);margin-right:8px;margin-right:var(--padding-xs,8px)}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%;border-radius:8px;border-radius:var(--border-radius-lg,8px)}.van-card__content{position:relative;display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;justify-content:space-between;min-width:0;min-height:88px;min-height:var(--card-thumb-size,88px)}.van-card__content--center{-webkit-justify-content:center;justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:16px;line-height:var(--card-title-line-height,16px)}.van-card__desc{line-height:20px;line-height:var(--card-desc-line-height,20px);color:#646566;color:var(--card-desc-color,#646566)}.van-card__bottom{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#ee0a24;color:var(--card-price-color,#ee0a24);font-size:12px;font-size:var(--card-price-font-size,12px)}.van-card__price-integer{font-size:16px;font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{display:inline-block;margin-left:5px;text-decoration:line-through;font-size:10px;font-size:var(--card-origin-price-font-size,10px);color:#646566;color:var(--card-origin-price-color,#646566)}.van-card__num{float:right}.van-card__tag{position:absolute!important;top:2px;left:0}.van-card__footer{-webkit-flex:none;flex:none;width:100%;text-align:right}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.js
new file mode 100644
index 00000000..99bcdb9e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.js
@@ -0,0 +1,10 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ title: String,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.wxml
new file mode 100644
index 00000000..6e0b471d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.wxml
@@ -0,0 +1,9 @@
+
+ {{ title }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.wxss
new file mode 100644
index 00000000..edbccd59
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.js
new file mode 100644
index 00000000..a0123d1d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.js
@@ -0,0 +1,38 @@
+import { link } from '../mixins/link';
+import { VantComponent } from '../common/component';
+VantComponent({
+ classes: [
+ 'title-class',
+ 'label-class',
+ 'value-class',
+ 'right-icon-class',
+ 'hover-class',
+ ],
+ mixins: [link],
+ props: {
+ title: null,
+ value: null,
+ icon: String,
+ size: String,
+ label: String,
+ center: Boolean,
+ isLink: Boolean,
+ required: Boolean,
+ clickable: Boolean,
+ titleWidth: String,
+ customStyle: String,
+ arrowDirection: String,
+ useLabelSlot: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ titleStyle: String,
+ },
+ methods: {
+ onClick(event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxml
new file mode 100644
index 00000000..8387c3c8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+ {{ label }}
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxs
new file mode 100644
index 00000000..e3500c43
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxs
@@ -0,0 +1,17 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function titleStyle(data) {
+ return style([
+ {
+ 'max-width': addUnit(data.titleWidth),
+ 'min-width': addUnit(data.titleWidth),
+ },
+ data.titleStyle,
+ ]);
+}
+
+module.exports = {
+ titleStyle: titleStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxss
new file mode 100644
index 00000000..605570db
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:4px;margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{margin-left:4px;margin-left:var(--padding-base,4px);color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.js
new file mode 100644
index 00000000..1c871558
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.js
@@ -0,0 +1,31 @@
+import { useChildren } from '../common/relation';
+import { VantComponent } from '../common/component';
+VantComponent({
+ field: true,
+ relation: useChildren('checkbox', function (target) {
+ this.updateChild(target);
+ }),
+ props: {
+ max: Number,
+ value: {
+ type: Array,
+ observer: 'updateChildren',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren() {
+ this.children.forEach((child) => this.updateChild(child));
+ },
+ updateChild(child) {
+ const { value, disabled } = this.data;
+ child.setData({
+ value: value.indexOf(child.data.name) !== -1,
+ parentDisabled: disabled,
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.wxml
new file mode 100644
index 00000000..4fa864ce
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.wxml
@@ -0,0 +1 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.js
new file mode 100644
index 00000000..281f69ad
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.js
@@ -0,0 +1,74 @@
+import { useParent } from '../common/relation';
+import { VantComponent } from '../common/component';
+function emit(target, value) {
+ target.$emit('input', value);
+ target.$emit('change', value);
+}
+VantComponent({
+ field: true,
+ relation: useParent('checkbox-group'),
+ classes: ['icon-class', 'label-class'],
+ props: {
+ value: Boolean,
+ disabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
+ labelPosition: {
+ type: String,
+ value: 'right',
+ },
+ labelDisabled: Boolean,
+ shape: {
+ type: String,
+ value: 'round',
+ },
+ iconSize: {
+ type: null,
+ value: 20,
+ },
+ },
+ data: {
+ parentDisabled: false,
+ },
+ methods: {
+ emitChange(value) {
+ if (this.parent) {
+ this.setParentValue(this.parent, value);
+ } else {
+ emit(this, value);
+ }
+ },
+ toggle() {
+ const { parentDisabled, disabled, value } = this.data;
+ if (!disabled && !parentDisabled) {
+ this.emitChange(!value);
+ }
+ },
+ onClickLabel() {
+ const { labelDisabled, parentDisabled, disabled, value } = this.data;
+ if (!disabled && !labelDisabled && !parentDisabled) {
+ this.emitChange(!value);
+ }
+ },
+ setParentValue(parent, value) {
+ const parentValue = parent.data.value.slice();
+ const { name } = this.data;
+ const { max } = parent.data;
+ if (value) {
+ if (max && parentValue.length >= max) {
+ return;
+ }
+ if (parentValue.indexOf(name) === -1) {
+ parentValue.push(name);
+ emit(parent, parentValue);
+ }
+ } else {
+ const index = parentValue.indexOf(name);
+ if (index !== -1) {
+ parentValue.splice(index, 1);
+ emit(parent, parentValue);
+ }
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxml
new file mode 100644
index 00000000..0c008d81
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxs
new file mode 100644
index 00000000..eb9c7726
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxs
@@ -0,0 +1,20 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
+ var styles = {
+ 'font-size': addUnit(iconSize),
+ };
+
+ if (checkedColor && value && !disabled && !parentDisabled) {
+ styles['border-color'] = checkedColor;
+ styles['background-color'] = checkedColor;
+ }
+
+ return style(styles);
+}
+
+module.exports = {
+ iconStyle: iconStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxss
new file mode 100644
index 00000000..afaf37be
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/checkbox/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/canvas.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/canvas.d.ts
new file mode 100644
index 00000000..6aa52dea
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/canvas.d.ts
@@ -0,0 +1,6 @@
+///
+declare type CanvasContext = WechatMiniprogram.CanvasContext;
+export declare function adaptor(
+ ctx: CanvasContext & Record
+): CanvasContext;
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/canvas.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/canvas.js
new file mode 100644
index 00000000..c311335e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/canvas.js
@@ -0,0 +1,43 @@
+export function adaptor(ctx) {
+ // @ts-ignore
+ return Object.assign(ctx, {
+ setStrokeStyle(val) {
+ ctx.strokeStyle = val;
+ },
+ setLineWidth(val) {
+ ctx.lineWidth = val;
+ },
+ setLineCap(val) {
+ ctx.lineCap = val;
+ },
+ setFillStyle(val) {
+ ctx.fillStyle = val;
+ },
+ setFontSize(val) {
+ ctx.font = String(val);
+ },
+ setGlobalAlpha(val) {
+ ctx.globalAlpha = val;
+ },
+ setLineJoin(val) {
+ ctx.lineJoin = val;
+ },
+ setTextAlign(val) {
+ ctx.textAlign = val;
+ },
+ setMiterLimit(val) {
+ ctx.miterLimit = val;
+ },
+ setShadow(offsetX, offsetY, blur, color) {
+ ctx.shadowOffsetX = offsetX;
+ ctx.shadowOffsetY = offsetY;
+ ctx.shadowBlur = blur;
+ ctx.shadowColor = color;
+ },
+ setTextBaseline(val) {
+ ctx.textBaseline = val;
+ },
+ createCircularGradient() {},
+ draw() {},
+ });
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.js
new file mode 100644
index 00000000..706d5caf
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.js
@@ -0,0 +1,190 @@
+import { BLUE, WHITE } from '../common/color';
+import { VantComponent } from '../common/component';
+import { getSystemInfoSync } from '../common/utils';
+import { isObj } from '../common/validator';
+import { canIUseCanvas2d } from '../common/version';
+import { adaptor } from './canvas';
+function format(rate) {
+ return Math.min(Math.max(rate, 0), 100);
+}
+const PERIMETER = 2 * Math.PI;
+const BEGIN_ANGLE = -Math.PI / 2;
+const STEP = 1;
+VantComponent({
+ props: {
+ text: String,
+ lineCap: {
+ type: String,
+ value: 'round',
+ },
+ value: {
+ type: Number,
+ value: 0,
+ observer: 'reRender',
+ },
+ speed: {
+ type: Number,
+ value: 50,
+ },
+ size: {
+ type: Number,
+ value: 100,
+ observer() {
+ this.drawCircle(this.currentValue);
+ },
+ },
+ fill: String,
+ layerColor: {
+ type: String,
+ value: WHITE,
+ },
+ color: {
+ type: null,
+ value: BLUE,
+ observer() {
+ this.setHoverColor().then(() => {
+ this.drawCircle(this.currentValue);
+ });
+ },
+ },
+ type: {
+ type: String,
+ value: '',
+ },
+ strokeWidth: {
+ type: Number,
+ value: 4,
+ },
+ clockwise: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ hoverColor: BLUE,
+ },
+ methods: {
+ getContext() {
+ const { type, size } = this.data;
+ if (type === '' || !canIUseCanvas2d()) {
+ const ctx = wx.createCanvasContext('van-circle', this);
+ return Promise.resolve(ctx);
+ }
+ const dpr = getSystemInfoSync().pixelRatio;
+ return new Promise((resolve) => {
+ wx.createSelectorQuery()
+ .in(this)
+ .select('#van-circle')
+ .node()
+ .exec((res) => {
+ const canvas = res[0].node;
+ const ctx = canvas.getContext(type);
+ if (!this.inited) {
+ this.inited = true;
+ canvas.width = size * dpr;
+ canvas.height = size * dpr;
+ ctx.scale(dpr, dpr);
+ }
+ resolve(adaptor(ctx));
+ });
+ });
+ },
+ setHoverColor() {
+ const { color, size } = this.data;
+ if (isObj(color)) {
+ return this.getContext().then((context) => {
+ const LinearColor = context.createLinearGradient(size, 0, 0, 0);
+ Object.keys(color)
+ .sort((a, b) => parseFloat(a) - parseFloat(b))
+ .map((key) =>
+ LinearColor.addColorStop(parseFloat(key) / 100, color[key])
+ );
+ this.hoverColor = LinearColor;
+ });
+ }
+ this.hoverColor = color;
+ return Promise.resolve();
+ },
+ presetCanvas(context, strokeStyle, beginAngle, endAngle, fill) {
+ const { strokeWidth, lineCap, clockwise, size } = this.data;
+ const position = size / 2;
+ const radius = position - strokeWidth / 2;
+ context.setStrokeStyle(strokeStyle);
+ context.setLineWidth(strokeWidth);
+ context.setLineCap(lineCap);
+ context.beginPath();
+ context.arc(position, position, radius, beginAngle, endAngle, !clockwise);
+ context.stroke();
+ if (fill) {
+ context.setFillStyle(fill);
+ context.fill();
+ }
+ },
+ renderLayerCircle(context) {
+ const { layerColor, fill } = this.data;
+ this.presetCanvas(context, layerColor, 0, PERIMETER, fill);
+ },
+ renderHoverCircle(context, formatValue) {
+ const { clockwise } = this.data;
+ // 结束角度
+ const progress = PERIMETER * (formatValue / 100);
+ const endAngle = clockwise
+ ? BEGIN_ANGLE + progress
+ : 3 * Math.PI - (BEGIN_ANGLE + progress);
+ this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);
+ },
+ drawCircle(currentValue) {
+ const { size } = this.data;
+ this.getContext().then((context) => {
+ context.clearRect(0, 0, size, size);
+ this.renderLayerCircle(context);
+ const formatValue = format(currentValue);
+ if (formatValue !== 0) {
+ this.renderHoverCircle(context, formatValue);
+ }
+ context.draw();
+ });
+ },
+ reRender() {
+ // tofector 动画暂时没有想到好的解决方案
+ const { value, speed } = this.data;
+ if (speed <= 0 || speed > 1000) {
+ this.drawCircle(value);
+ return;
+ }
+ this.clearInterval();
+ this.currentValue = this.currentValue || 0;
+ this.interval = setInterval(() => {
+ if (this.currentValue !== value) {
+ if (Math.abs(this.currentValue - value) < STEP) {
+ this.currentValue = value;
+ } else {
+ if (this.currentValue < value) {
+ this.currentValue += STEP;
+ } else {
+ this.currentValue -= STEP;
+ }
+ }
+ this.drawCircle(this.currentValue);
+ } else {
+ this.clearInterval();
+ }
+ }, 1000 / speed);
+ },
+ clearInterval() {
+ if (this.interval) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ },
+ mounted() {
+ this.currentValue = this.data.value;
+ this.setHoverColor().then(() => {
+ this.drawCircle(this.currentValue);
+ });
+ },
+ destroyed() {
+ this.clearInterval();
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.wxml
new file mode 100644
index 00000000..52bc59fc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+ {{ text }}
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.wxss
new file mode 100644
index 00000000..3ab63dfd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/circle/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-circle{position:relative;display:inline-block;text-align:center}.van-circle__text{position:absolute;top:50%;left:0;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#323233;color:var(--circle-text-color,#323233)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.js
new file mode 100644
index 00000000..20f326fb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.js
@@ -0,0 +1,9 @@
+import { useParent } from '../common/relation';
+import { VantComponent } from '../common/component';
+VantComponent({
+ relation: useParent('row'),
+ props: {
+ span: Number,
+ offset: Number,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxml
new file mode 100644
index 00000000..975348b6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxs
new file mode 100644
index 00000000..507c1cb9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ if (!data.gutter) {
+ return '';
+ }
+
+ return style({
+ 'padding-right': addUnit(data.gutter / 2),
+ 'padding-left': addUnit(data.gutter / 2),
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxss
new file mode 100644
index 00000000..44c896a3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/col/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/animate.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/animate.d.ts
new file mode 100644
index 00000000..0c33c005
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/animate.d.ts
@@ -0,0 +1,6 @@
+///
+export declare function setContentAnimate(
+ context: WechatMiniprogram.Component.TrivialInstance,
+ expanded: boolean,
+ mounted: boolean
+): void;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/animate.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/animate.js
new file mode 100644
index 00000000..7ce1dae0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/animate.js
@@ -0,0 +1,70 @@
+import { canIUseAnimate } from '../common/version';
+import { getRect } from '../common/utils';
+function useAnimate(context, expanded, mounted, height) {
+ const selector = '.van-collapse-item__wrapper';
+ if (expanded) {
+ context.animate(
+ selector,
+ [
+ { height: 0, ease: 'ease-in-out', offset: 0 },
+ { height: `${height}px`, ease: 'ease-in-out', offset: 1 },
+ { height: `auto`, ease: 'ease-in-out', offset: 1 },
+ ],
+ mounted ? 300 : 0,
+ () => {
+ context.clearAnimation(selector);
+ }
+ );
+ return;
+ }
+ context.animate(
+ selector,
+ [
+ { height: `${height}px`, ease: 'ease-in-out', offset: 0 },
+ { height: 0, ease: 'ease-in-out', offset: 1 },
+ ],
+ 300,
+ () => {
+ context.clearAnimation(selector);
+ }
+ );
+}
+function useAnimation(context, expanded, mounted, height) {
+ const animation = wx.createAnimation({
+ duration: 0,
+ timingFunction: 'ease-in-out',
+ });
+ if (expanded) {
+ if (height === 0) {
+ animation.height('auto').top(1).step();
+ } else {
+ animation
+ .height(height)
+ .top(1)
+ .step({
+ duration: mounted ? 300 : 1,
+ })
+ .height('auto')
+ .step();
+ }
+ context.setData({
+ animation: animation.export(),
+ });
+ return;
+ }
+ animation.height(height).top(0).step({ duration: 1 }).height(0).step({
+ duration: 300,
+ });
+ context.setData({
+ animation: animation.export(),
+ });
+}
+export function setContentAnimate(context, expanded, mounted) {
+ getRect(context, '.van-collapse-item__content')
+ .then((rect) => rect.height)
+ .then((height) => {
+ canIUseAnimate()
+ ? useAnimate(context, expanded, mounted, height)
+ : useAnimation(context, expanded, mounted, height);
+ });
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.js
new file mode 100644
index 00000000..c44c27e1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.js
@@ -0,0 +1,59 @@
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+import { setContentAnimate } from './animate';
+VantComponent({
+ classes: ['title-class', 'content-class'],
+ relation: useParent('collapse'),
+ props: {
+ name: null,
+ title: null,
+ value: null,
+ icon: String,
+ label: String,
+ disabled: Boolean,
+ clickable: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ isLink: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ expanded: false,
+ },
+ mounted() {
+ this.updateExpanded();
+ this.mounted = true;
+ },
+ methods: {
+ updateExpanded() {
+ if (!this.parent) {
+ return;
+ }
+ const { value, accordion } = this.parent.data;
+ const { children = [] } = this.parent;
+ const { name } = this.data;
+ const index = children.indexOf(this);
+ const currentName = name == null ? index : name;
+ const expanded = accordion
+ ? value === currentName
+ : (value || []).some((name) => name === currentName);
+ if (expanded !== this.data.expanded) {
+ setContentAnimate(this, expanded, this.mounted);
+ }
+ this.setData({ index, expanded });
+ },
+ onClick() {
+ if (this.data.disabled) {
+ return;
+ }
+ const { name, expanded } = this.data;
+ const index = this.parent.children.indexOf(this);
+ const currentName = name == null ? index : name;
+ this.parent.switch(currentName, !expanded);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.json
new file mode 100644
index 00000000..0e5425cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.wxml
new file mode 100644
index 00000000..ae4cc831
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.wxss
new file mode 100644
index 00000000..0bb936c0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.js
new file mode 100644
index 00000000..60e4611a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.js
@@ -0,0 +1,44 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+VantComponent({
+ relation: useChildren('collapse-item'),
+ props: {
+ value: {
+ type: null,
+ observer: 'updateExpanded',
+ },
+ accordion: {
+ type: Boolean,
+ observer: 'updateExpanded',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updateExpanded() {
+ this.children.forEach((child) => {
+ child.updateExpanded();
+ });
+ },
+ switch(name, expanded) {
+ const { accordion, value } = this.data;
+ const changeItem = name;
+ if (!accordion) {
+ name = expanded
+ ? (value || []).concat(name)
+ : (value || []).filter((activeName) => activeName !== name);
+ } else {
+ name = expanded ? name : '';
+ }
+ if (expanded) {
+ this.$emit('open', changeItem);
+ } else {
+ this.$emit('close', changeItem);
+ }
+ this.$emit('change', name);
+ this.$emit('input', name);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.wxml
new file mode 100644
index 00000000..fd4e1719
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/collapse/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/color.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/color.d.ts
new file mode 100644
index 00000000..386f3077
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/color.d.ts
@@ -0,0 +1,7 @@
+export declare const RED = "#ee0a24";
+export declare const BLUE = "#1989fa";
+export declare const WHITE = "#fff";
+export declare const GREEN = "#07c160";
+export declare const ORANGE = "#ff976a";
+export declare const GRAY = "#323233";
+export declare const GRAY_DARK = "#969799";
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/color.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/color.js
new file mode 100644
index 00000000..6b285bd6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/color.js
@@ -0,0 +1,7 @@
+export const RED = '#ee0a24';
+export const BLUE = '#1989fa';
+export const WHITE = '#fff';
+export const GREEN = '#07c160';
+export const ORANGE = '#ff976a';
+export const GRAY = '#323233';
+export const GRAY_DARK = '#969799';
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/component.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/component.d.ts
new file mode 100644
index 00000000..6b0a9582
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/component.d.ts
@@ -0,0 +1,8 @@
+///
+import { VantComponentOptions } from '../definitions/index';
+declare function VantComponent<
+ Data extends WechatMiniprogram.Component.DataOption,
+ Props extends WechatMiniprogram.Component.PropertyOption,
+ Methods extends WechatMiniprogram.Component.MethodOption
+>(vantOptions: VantComponentOptions): void;
+export { VantComponent };
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/component.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/component.js
new file mode 100644
index 00000000..5530c6f0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/component.js
@@ -0,0 +1,45 @@
+import { basic } from '../mixins/basic';
+function mapKeys(source, target, map) {
+ Object.keys(map).forEach((key) => {
+ if (source[key]) {
+ target[map[key]] = source[key];
+ }
+ });
+}
+function VantComponent(vantOptions) {
+ const options = {};
+ mapKeys(vantOptions, options, {
+ data: 'data',
+ props: 'properties',
+ mixins: 'behaviors',
+ methods: 'methods',
+ beforeCreate: 'created',
+ created: 'attached',
+ mounted: 'ready',
+ destroyed: 'detached',
+ classes: 'externalClasses',
+ });
+ // add default externalClasses
+ options.externalClasses = options.externalClasses || [];
+ options.externalClasses.push('custom-class');
+ // add default behaviors
+ options.behaviors = options.behaviors || [];
+ options.behaviors.push(basic);
+ // add relations
+ const { relation } = vantOptions;
+ if (relation) {
+ options.relations = relation.relations;
+ options.behaviors.push(relation.mixin);
+ }
+ // map field to form-field behavior
+ if (vantOptions.field) {
+ options.behaviors.push('wx://form-field');
+ }
+ // add default options
+ options.options = {
+ multipleSlots: true,
+ addGlobalClass: true,
+ };
+ Component(options);
+}
+export { VantComponent };
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/index.wxss
new file mode 100644
index 00000000..976825d7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/index.wxss
@@ -0,0 +1 @@
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.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--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;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--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{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/relation.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/relation.d.ts
new file mode 100644
index 00000000..be5f2eea
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/relation.d.ts
@@ -0,0 +1,21 @@
+///
+declare type TrivialInstance = WechatMiniprogram.Component.TrivialInstance;
+export declare function useParent(
+ name: string,
+ onEffect?: (this: TrivialInstance) => void
+): {
+ relations: {
+ [x: string]: WechatMiniprogram.Component.RelationOption;
+ };
+ mixin: string;
+};
+export declare function useChildren(
+ name: string,
+ onEffect?: (this: TrivialInstance, target: TrivialInstance) => void
+): {
+ relations: {
+ [x: string]: WechatMiniprogram.Component.RelationOption;
+ };
+ mixin: string;
+};
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/relation.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/relation.js
new file mode 100644
index 00000000..99c1a493
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/relation.js
@@ -0,0 +1,64 @@
+export function useParent(name, onEffect) {
+ const path = `../${name}/index`;
+ return {
+ relations: {
+ [path]: {
+ type: 'ancestor',
+ linked() {
+ onEffect && onEffect.call(this);
+ },
+ linkChanged() {
+ onEffect && onEffect.call(this);
+ },
+ unlinked() {
+ onEffect && onEffect.call(this);
+ },
+ },
+ },
+ mixin: Behavior({
+ created() {
+ Object.defineProperty(this, 'parent', {
+ get: () => this.getRelationNodes(path)[0],
+ });
+ Object.defineProperty(this, 'index', {
+ // @ts-ignore
+ get: () => {
+ var _a, _b;
+ return (_b =
+ (_a = this.parent) === null || _a === void 0
+ ? void 0
+ : _a.children) === null || _b === void 0
+ ? void 0
+ : _b.indexOf(this);
+ },
+ });
+ },
+ }),
+ };
+}
+export function useChildren(name, onEffect) {
+ const path = `../${name}/index`;
+ return {
+ relations: {
+ [path]: {
+ type: 'descendant',
+ linked(target) {
+ onEffect && onEffect.call(this, target);
+ },
+ linkChanged(target) {
+ onEffect && onEffect.call(this, target);
+ },
+ unlinked(target) {
+ onEffect && onEffect.call(this, target);
+ },
+ },
+ },
+ mixin: Behavior({
+ created() {
+ Object.defineProperty(this, 'children', {
+ get: () => this.getRelationNodes(path) || [],
+ });
+ },
+ }),
+ };
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/clearfix.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/clearfix.wxss
new file mode 100644
index 00000000..a0ca8384
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/clearfix.wxss
@@ -0,0 +1 @@
+.van-clearfix:after{display:table;clear:both;content:""}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/ellipsis.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/ellipsis.wxss
new file mode 100644
index 00000000..1e9dbc9e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/ellipsis.wxss
@@ -0,0 +1 @@
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/hairline.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/hairline.wxss
new file mode 100644
index 00000000..49b9e656
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/hairline.wxss
@@ -0,0 +1 @@
+.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--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;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--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{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/mixins/clearfix.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/mixins/clearfix.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/mixins/ellipsis.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/mixins/ellipsis.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/mixins/hairline.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/mixins/hairline.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/theme.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/theme.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/var.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/style/var.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/utils.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/utils.d.ts
new file mode 100644
index 00000000..bdfa8cb8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/utils.d.ts
@@ -0,0 +1,30 @@
+///
+export declare function range(num: number, min: number, max: number): number;
+export declare function nextTick(cb: (...args: any[]) => void): void;
+export declare function getSystemInfoSync(): WechatMiniprogram.SystemInfo;
+export declare function addUnit(value?: string | number): string | undefined;
+export declare function requestAnimationFrame(
+ cb: () => void
+): number | WechatMiniprogram.NodesRef;
+export declare function pickExclude(obj: unknown, keys: string[]): {};
+export declare function getRect(
+ context: WechatMiniprogram.Component.TrivialInstance,
+ selector: string
+): Promise;
+export declare function getAllRect(
+ context: WechatMiniprogram.Component.TrivialInstance,
+ selector: string
+): Promise;
+export declare function groupSetData(
+ context: WechatMiniprogram.Component.TrivialInstance,
+ cb: () => void
+): void;
+export declare function toPromise(
+ promiseLike: Promise | unknown
+): Promise;
+export declare function getCurrentPage(): T &
+ WechatMiniprogram.OptionalInterface &
+ WechatMiniprogram.Page.InstanceProperties &
+ WechatMiniprogram.Page.InstanceMethods &
+ WechatMiniprogram.Page.Data &
+ WechatMiniprogram.IAnyObject;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/utils.js
new file mode 100644
index 00000000..81351715
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/utils.js
@@ -0,0 +1,89 @@
+import { isDef, isNumber, isPlainObject, isPromise } from './validator';
+import { canIUseGroupSetData, canIUseNextTick } from './version';
+export function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+export function nextTick(cb) {
+ if (canIUseNextTick()) {
+ wx.nextTick(cb);
+ } else {
+ setTimeout(() => {
+ cb();
+ }, 1000 / 30);
+ }
+}
+let systemInfo;
+export function getSystemInfoSync() {
+ if (systemInfo == null) {
+ systemInfo = wx.getSystemInfoSync();
+ }
+ return systemInfo;
+}
+export function addUnit(value) {
+ if (!isDef(value)) {
+ return undefined;
+ }
+ value = String(value);
+ return isNumber(value) ? `${value}px` : value;
+}
+export function requestAnimationFrame(cb) {
+ const systemInfo = getSystemInfoSync();
+ if (systemInfo.platform === 'devtools') {
+ return setTimeout(() => {
+ cb();
+ }, 1000 / 30);
+ }
+ return wx
+ .createSelectorQuery()
+ .selectViewport()
+ .boundingClientRect()
+ .exec(() => {
+ cb();
+ });
+}
+export function pickExclude(obj, keys) {
+ if (!isPlainObject(obj)) {
+ return {};
+ }
+ return Object.keys(obj).reduce((prev, key) => {
+ if (!keys.includes(key)) {
+ prev[key] = obj[key];
+ }
+ return prev;
+ }, {});
+}
+export function getRect(context, selector) {
+ return new Promise((resolve) => {
+ wx.createSelectorQuery()
+ .in(context)
+ .select(selector)
+ .boundingClientRect()
+ .exec((rect = []) => resolve(rect[0]));
+ });
+}
+export function getAllRect(context, selector) {
+ return new Promise((resolve) => {
+ wx.createSelectorQuery()
+ .in(context)
+ .selectAll(selector)
+ .boundingClientRect()
+ .exec((rect = []) => resolve(rect[0]));
+ });
+}
+export function groupSetData(context, cb) {
+ if (canIUseGroupSetData()) {
+ context.groupSetData(cb);
+ } else {
+ cb();
+ }
+}
+export function toPromise(promiseLike) {
+ if (isPromise(promiseLike)) {
+ return promiseLike;
+ }
+ return Promise.resolve(promiseLike);
+}
+export function getCurrentPage() {
+ const pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/validator.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/validator.d.ts
new file mode 100644
index 00000000..ae7c48f1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/validator.d.ts
@@ -0,0 +1,11 @@
+export declare function isFunction(val: unknown): val is Function;
+export declare function isPlainObject(
+ val: unknown
+): val is Record;
+export declare function isPromise(val: unknown): val is Promise;
+export declare function isDef(value: unknown): boolean;
+export declare function isObj(x: unknown): x is Record;
+export declare function isNumber(value: string): boolean;
+export declare function isBoolean(value: unknown): value is boolean;
+export declare function isImageUrl(url: string): boolean;
+export declare function isVideoUrl(url: string): boolean;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/validator.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/validator.js
new file mode 100644
index 00000000..a6d416cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/validator.js
@@ -0,0 +1,31 @@
+// eslint-disable-next-line @typescript-eslint/ban-types
+export function isFunction(val) {
+ return typeof val === 'function';
+}
+export function isPlainObject(val) {
+ return val !== null && typeof val === 'object' && !Array.isArray(val);
+}
+export function isPromise(val) {
+ return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);
+}
+export function isDef(value) {
+ return value !== undefined && value !== null;
+}
+export function isObj(x) {
+ const type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+export function isNumber(value) {
+ return /^\d+(\.\d+)?$/.test(value);
+}
+export function isBoolean(value) {
+ return typeof value === 'boolean';
+}
+const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
+const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;
+export function isImageUrl(url) {
+ return IMAGE_REGEXP.test(url);
+}
+export function isVideoUrl(url) {
+ return VIDEO_REGEXP.test(url);
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/version.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/version.d.ts
new file mode 100644
index 00000000..988b2264
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/version.d.ts
@@ -0,0 +1,7 @@
+export declare function canIUseModel(): boolean;
+export declare function canIUseFormFieldButton(): boolean;
+export declare function canIUseAnimate(): boolean;
+export declare function canIUseGroupSetData(): boolean;
+export declare function canIUseNextTick(): boolean;
+export declare function canIUseCanvas2d(): boolean;
+export declare function canIUseGetUserProfile(): boolean;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/common/version.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/version.js
new file mode 100644
index 00000000..6444d7bf
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/common/version.js
@@ -0,0 +1,48 @@
+import { getSystemInfoSync } from './utils';
+function compareVersion(v1, v2) {
+ v1 = v1.split('.');
+ v2 = v2.split('.');
+ const len = Math.max(v1.length, v2.length);
+ while (v1.length < len) {
+ v1.push('0');
+ }
+ while (v2.length < len) {
+ v2.push('0');
+ }
+ for (let i = 0; i < len; i++) {
+ const num1 = parseInt(v1[i], 10);
+ const num2 = parseInt(v2[i], 10);
+ if (num1 > num2) {
+ return 1;
+ }
+ if (num1 < num2) {
+ return -1;
+ }
+ }
+ return 0;
+}
+function gte(version) {
+ const system = getSystemInfoSync();
+ return compareVersion(system.SDKVersion, version) >= 0;
+}
+export function canIUseModel() {
+ return gte('2.9.3');
+}
+export function canIUseFormFieldButton() {
+ return gte('2.10.3');
+}
+export function canIUseAnimate() {
+ return gte('2.9.0');
+}
+export function canIUseGroupSetData() {
+ return gte('2.4.0');
+}
+export function canIUseNextTick() {
+ return wx.canIUse('nextTick');
+}
+export function canIUseCanvas2d() {
+ return gte('2.9.0');
+}
+export function canIUseGetUserProfile() {
+ return !!wx.getUserProfile;
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.js
new file mode 100644
index 00000000..78dbb885
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.js
@@ -0,0 +1,99 @@
+import { VantComponent } from '../common/component';
+import { isSameSecond, parseFormat, parseTimeData } from './utils';
+function simpleTick(fn) {
+ return setTimeout(fn, 30);
+}
+VantComponent({
+ props: {
+ useSlot: Boolean,
+ millisecond: Boolean,
+ time: {
+ type: Number,
+ observer: 'reset',
+ },
+ format: {
+ type: String,
+ value: 'HH:mm:ss',
+ },
+ autoStart: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ timeData: parseTimeData(0),
+ formattedTime: '0',
+ },
+ destroyed() {
+ clearTimeout(this.tid);
+ this.tid = null;
+ },
+ methods: {
+ // 开始
+ start() {
+ if (this.counting) {
+ return;
+ }
+ this.counting = true;
+ this.endTime = Date.now() + this.remain;
+ this.tick();
+ },
+ // 暂停
+ pause() {
+ this.counting = false;
+ clearTimeout(this.tid);
+ },
+ // 重置
+ reset() {
+ this.pause();
+ this.remain = this.data.time;
+ this.setRemain(this.remain);
+ if (this.data.autoStart) {
+ this.start();
+ }
+ },
+ tick() {
+ if (this.data.millisecond) {
+ this.microTick();
+ } else {
+ this.macroTick();
+ }
+ },
+ microTick() {
+ this.tid = simpleTick(() => {
+ this.setRemain(this.getRemain());
+ if (this.remain !== 0) {
+ this.microTick();
+ }
+ });
+ },
+ macroTick() {
+ this.tid = simpleTick(() => {
+ const remain = this.getRemain();
+ if (!isSameSecond(remain, this.remain) || remain === 0) {
+ this.setRemain(remain);
+ }
+ if (this.remain !== 0) {
+ this.macroTick();
+ }
+ });
+ },
+ getRemain() {
+ return Math.max(this.endTime - Date.now(), 0);
+ },
+ setRemain(remain) {
+ this.remain = remain;
+ const timeData = parseTimeData(remain);
+ if (this.data.useSlot) {
+ this.$emit('change', timeData);
+ }
+ this.setData({
+ formattedTime: parseFormat(this.data.format, timeData),
+ });
+ if (remain === 0) {
+ this.pause();
+ this.$emit('finish');
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.wxml
new file mode 100644
index 00000000..e206e167
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.wxml
@@ -0,0 +1,4 @@
+
+
+ {{ formattedTime }}
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.wxss
new file mode 100644
index 00000000..bc33f5dc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-count-down{color:#323233;color:var(--count-down-text-color,#323233);font-size:14px;font-size:var(--count-down-font-size,14px);line-height:20px;line-height:var(--count-down-line-height,20px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/utils.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/utils.d.ts
new file mode 100644
index 00000000..e4a58ddf
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/utils.d.ts
@@ -0,0 +1,10 @@
+export declare type TimeData = {
+ days: number;
+ hours: number;
+ minutes: number;
+ seconds: number;
+ milliseconds: number;
+};
+export declare function parseTimeData(time: number): TimeData;
+export declare function parseFormat(format: string, timeData: TimeData): string;
+export declare function isSameSecond(time1: number, time2: number): boolean;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/utils.js
new file mode 100644
index 00000000..a9f05b8e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/count-down/utils.js
@@ -0,0 +1,53 @@
+function padZero(num, targetLength = 2) {
+ let str = num + '';
+ while (str.length < targetLength) {
+ str = '0' + str;
+ }
+ return str;
+}
+const SECOND = 1000;
+const MINUTE = 60 * SECOND;
+const HOUR = 60 * MINUTE;
+const DAY = 24 * HOUR;
+export function parseTimeData(time) {
+ const days = Math.floor(time / DAY);
+ const hours = Math.floor((time % DAY) / HOUR);
+ const minutes = Math.floor((time % HOUR) / MINUTE);
+ const seconds = Math.floor((time % MINUTE) / SECOND);
+ const milliseconds = Math.floor(time % SECOND);
+ return {
+ days,
+ hours,
+ minutes,
+ seconds,
+ milliseconds,
+ };
+}
+export function parseFormat(format, timeData) {
+ const { days } = timeData;
+ let { hours, minutes, seconds, milliseconds } = timeData;
+ if (format.indexOf('DD') === -1) {
+ hours += days * 24;
+ } else {
+ format = format.replace('DD', padZero(days));
+ }
+ if (format.indexOf('HH') === -1) {
+ minutes += hours * 60;
+ } else {
+ format = format.replace('HH', padZero(hours));
+ }
+ if (format.indexOf('mm') === -1) {
+ seconds += minutes * 60;
+ } else {
+ format = format.replace('mm', padZero(minutes));
+ }
+ if (format.indexOf('ss') === -1) {
+ milliseconds += seconds * 1000;
+ } else {
+ format = format.replace('ss', padZero(seconds));
+ }
+ return format.replace('SSS', padZero(milliseconds, 3));
+}
+export function isSameSecond(time1, time2) {
+ return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.js
new file mode 100644
index 00000000..8f77bf64
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.js
@@ -0,0 +1,321 @@
+import { VantComponent } from '../common/component';
+import { isDef } from '../common/validator';
+import { pickerProps } from '../picker/shared';
+const currentYear = new Date().getFullYear();
+function isValidDate(date) {
+ return isDef(date) && !isNaN(new Date(date).getTime());
+}
+function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+function padZero(val) {
+ return `00${val}`.slice(-2);
+}
+function times(n, iteratee) {
+ let index = -1;
+ const result = Array(n < 0 ? 0 : n);
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+function getTrueValue(formattedValue) {
+ if (formattedValue === undefined) {
+ formattedValue = '1';
+ }
+ while (isNaN(parseInt(formattedValue, 10))) {
+ formattedValue = formattedValue.slice(1);
+ }
+ return parseInt(formattedValue, 10);
+}
+function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+}
+const defaultFormatter = (type, value) => value;
+VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: Object.assign(Object.assign({}, pickerProps), {
+ value: {
+ type: null,
+ observer: 'updateValue',
+ },
+ filter: null,
+ type: {
+ type: String,
+ value: 'datetime',
+ observer: 'updateValue',
+ },
+ showToolbar: {
+ type: Boolean,
+ value: true,
+ },
+ formatter: {
+ type: null,
+ value: defaultFormatter,
+ },
+ minDate: {
+ type: Number,
+ value: new Date(currentYear - 10, 0, 1).getTime(),
+ observer: 'updateValue',
+ },
+ maxDate: {
+ type: Number,
+ value: new Date(currentYear + 10, 11, 31).getTime(),
+ observer: 'updateValue',
+ },
+ minHour: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ maxHour: {
+ type: Number,
+ value: 23,
+ observer: 'updateValue',
+ },
+ minMinute: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ maxMinute: {
+ type: Number,
+ value: 59,
+ observer: 'updateValue',
+ },
+ }),
+ data: {
+ innerValue: Date.now(),
+ columns: [],
+ },
+ methods: {
+ updateValue() {
+ const { data } = this;
+ const val = this.correctValue(data.value);
+ const isEqual = val === data.innerValue;
+ this.updateColumnValue(val).then(() => {
+ if (!isEqual) {
+ this.$emit('input', val);
+ }
+ });
+ },
+ getPicker() {
+ if (this.picker == null) {
+ this.picker = this.selectComponent('.van-datetime-picker');
+ const { picker } = this;
+ const { setColumnValues } = picker;
+ picker.setColumnValues = (...args) =>
+ setColumnValues.apply(picker, [...args, false]);
+ }
+ return this.picker;
+ },
+ updateColumns() {
+ const { formatter = defaultFormatter } = this.data;
+ const results = this.getOriginColumns().map((column) => ({
+ values: column.values.map((value) => formatter(column.type, value)),
+ }));
+ return this.set({ columns: results });
+ },
+ getOriginColumns() {
+ const { filter } = this.data;
+ const results = this.getRanges().map(({ type, range }) => {
+ let values = times(range[1] - range[0] + 1, (index) => {
+ const value = range[0] + index;
+ return type === 'year' ? `${value}` : padZero(value);
+ });
+ if (filter) {
+ values = filter(type, values);
+ }
+ return { type, values };
+ });
+ return results;
+ },
+ getRanges() {
+ const { data } = this;
+ if (data.type === 'time') {
+ return [
+ {
+ type: 'hour',
+ range: [data.minHour, data.maxHour],
+ },
+ {
+ type: 'minute',
+ range: [data.minMinute, data.maxMinute],
+ },
+ ];
+ }
+ const {
+ maxYear,
+ maxDate,
+ maxMonth,
+ maxHour,
+ maxMinute,
+ } = this.getBoundary('max', data.innerValue);
+ const {
+ minYear,
+ minDate,
+ minMonth,
+ minHour,
+ minMinute,
+ } = this.getBoundary('min', data.innerValue);
+ const result = [
+ {
+ type: 'year',
+ range: [minYear, maxYear],
+ },
+ {
+ type: 'month',
+ range: [minMonth, maxMonth],
+ },
+ {
+ type: 'day',
+ range: [minDate, maxDate],
+ },
+ {
+ type: 'hour',
+ range: [minHour, maxHour],
+ },
+ {
+ type: 'minute',
+ range: [minMinute, maxMinute],
+ },
+ ];
+ if (data.type === 'date') result.splice(3, 2);
+ if (data.type === 'year-month') result.splice(2, 3);
+ return result;
+ },
+ correctValue(value) {
+ const { data } = this;
+ // validate value
+ const isDateType = data.type !== 'time';
+ if (isDateType && !isValidDate(value)) {
+ value = data.minDate;
+ } else if (!isDateType && !value) {
+ const { minHour } = data;
+ value = `${padZero(minHour)}:00`;
+ }
+ // time type
+ if (!isDateType) {
+ let [hour, minute] = value.split(':');
+ hour = padZero(range(hour, data.minHour, data.maxHour));
+ minute = padZero(range(minute, data.minMinute, data.maxMinute));
+ return `${hour}:${minute}`;
+ }
+ // date type
+ value = Math.max(value, data.minDate);
+ value = Math.min(value, data.maxDate);
+ return value;
+ },
+ getBoundary(type, innerValue) {
+ const value = new Date(innerValue);
+ const boundary = new Date(this.data[`${type}Date`]);
+ const year = boundary.getFullYear();
+ let month = 1;
+ let date = 1;
+ let hour = 0;
+ let minute = 0;
+ if (type === 'max') {
+ month = 12;
+ date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
+ hour = 23;
+ minute = 59;
+ }
+ if (value.getFullYear() === year) {
+ month = boundary.getMonth() + 1;
+ if (value.getMonth() + 1 === month) {
+ date = boundary.getDate();
+ if (value.getDate() === date) {
+ hour = boundary.getHours();
+ if (value.getHours() === hour) {
+ minute = boundary.getMinutes();
+ }
+ }
+ }
+ }
+ return {
+ [`${type}Year`]: year,
+ [`${type}Month`]: month,
+ [`${type}Date`]: date,
+ [`${type}Hour`]: hour,
+ [`${type}Minute`]: minute,
+ };
+ },
+ onCancel() {
+ this.$emit('cancel');
+ },
+ onConfirm() {
+ this.$emit('confirm', this.data.innerValue);
+ },
+ onChange() {
+ const { data } = this;
+ let value;
+ const picker = this.getPicker();
+ const originColumns = this.getOriginColumns();
+ if (data.type === 'time') {
+ const indexes = picker.getIndexes();
+ value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1]
+ .values[indexes[1]]}`;
+ } else {
+ const indexes = picker.getIndexes();
+ const values = indexes.map(
+ (value, index) => originColumns[index].values[value]
+ );
+ const year = getTrueValue(values[0]);
+ const month = getTrueValue(values[1]);
+ const maxDate = getMonthEndDay(year, month);
+ let date = getTrueValue(values[2]);
+ if (data.type === 'year-month') {
+ date = 1;
+ }
+ date = date > maxDate ? maxDate : date;
+ let hour = 0;
+ let minute = 0;
+ if (data.type === 'datetime') {
+ hour = getTrueValue(values[3]);
+ minute = getTrueValue(values[4]);
+ }
+ value = new Date(year, month - 1, date, hour, minute);
+ }
+ value = this.correctValue(value);
+ this.updateColumnValue(value).then(() => {
+ this.$emit('input', value);
+ this.$emit('change', picker);
+ });
+ },
+ updateColumnValue(value) {
+ let values = [];
+ const { type } = this.data;
+ const formatter = this.data.formatter || defaultFormatter;
+ const picker = this.getPicker();
+ if (type === 'time') {
+ const pair = value.split(':');
+ values = [formatter('hour', pair[0]), formatter('minute', pair[1])];
+ } else {
+ const date = new Date(value);
+ values = [
+ formatter('year', `${date.getFullYear()}`),
+ formatter('month', padZero(date.getMonth() + 1)),
+ ];
+ if (type === 'date') {
+ values.push(formatter('day', padZero(date.getDate())));
+ }
+ if (type === 'datetime') {
+ values.push(
+ formatter('day', padZero(date.getDate())),
+ formatter('hour', padZero(date.getHours())),
+ formatter('minute', padZero(date.getMinutes()))
+ );
+ }
+ }
+ return this.set({ innerValue: value })
+ .then(() => this.updateColumns())
+ .then(() => picker.setValues(values));
+ },
+ },
+ created() {
+ const innerValue = this.correctValue(this.data.value);
+ this.updateColumnValue(innerValue).then(() => {
+ this.$emit('input', innerValue);
+ });
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.json
new file mode 100644
index 00000000..a778e91c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-picker": "../picker/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.wxml
new file mode 100644
index 00000000..ade22024
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.wxml
@@ -0,0 +1,16 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/datetime-picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/definitions/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/definitions/index.d.ts
new file mode 100644
index 00000000..ed01b4dd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/definitions/index.d.ts
@@ -0,0 +1,43 @@
+///
+interface VantComponentInstance {
+ parent: WechatMiniprogram.Component.TrivialInstance;
+ children: WechatMiniprogram.Component.TrivialInstance[];
+ index: number;
+ $emit: (
+ name: string,
+ detail?: unknown,
+ options?: WechatMiniprogram.Component.TriggerEventOption
+ ) => void;
+}
+export declare type VantComponentOptions<
+ Data extends WechatMiniprogram.Component.DataOption,
+ Props extends WechatMiniprogram.Component.PropertyOption,
+ Methods extends WechatMiniprogram.Component.MethodOption
+> = {
+ data?: Data;
+ field?: boolean;
+ classes?: string[];
+ mixins?: string[];
+ props?: Props;
+ relation?: {
+ relations: Record;
+ mixin: string;
+ };
+ methods?: Methods;
+ beforeCreate?: () => void;
+ created?: () => void;
+ mounted?: () => void;
+ destroyed?: () => void;
+} & ThisType<
+ VantComponentInstance &
+ WechatMiniprogram.Component.Instance<
+ Data & {
+ name: string;
+ value: any;
+ } & Record,
+ Props,
+ Methods
+ > &
+ Record
+>;
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/definitions/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/definitions/index.js
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/definitions/index.js
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/dialog.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/dialog.d.ts
new file mode 100644
index 00000000..95117338
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/dialog.d.ts
@@ -0,0 +1,58 @@
+///
+export declare type Action = 'confirm' | 'cancel' | 'overlay';
+interface DialogOptions {
+ lang?: string;
+ show?: boolean;
+ title?: string;
+ width?: string | number | null;
+ zIndex?: number;
+ theme?: string;
+ context?:
+ | WechatMiniprogram.Page.TrivialInstance
+ | WechatMiniprogram.Component.TrivialInstance;
+ message?: string;
+ overlay?: boolean;
+ selector?: string;
+ ariaLabel?: string;
+ className?: string;
+ customStyle?: string;
+ transition?: string;
+ /**
+ * @deprecated use beforeClose instead
+ */
+ asyncClose?: boolean;
+ beforeClose?: null | ((action: Action) => Promise | void);
+ businessId?: number;
+ sessionFrom?: string;
+ overlayStyle?: string;
+ appParameter?: string;
+ messageAlign?: string;
+ sendMessageImg?: string;
+ showMessageCard?: boolean;
+ sendMessagePath?: string;
+ sendMessageTitle?: string;
+ confirmButtonText?: string;
+ cancelButtonText?: string;
+ showConfirmButton?: boolean;
+ showCancelButton?: boolean;
+ closeOnClickOverlay?: boolean;
+ confirmButtonOpenType?: string;
+}
+declare const Dialog: {
+ (options: DialogOptions): Promise<
+ WechatMiniprogram.Component.TrivialInstance
+ >;
+ alert(
+ options: DialogOptions
+ ): Promise;
+ confirm(
+ options: DialogOptions
+ ): Promise;
+ close(): void;
+ stopLoading(): void;
+ currentOptions: DialogOptions;
+ defaultOptions: DialogOptions;
+ setDefaultOptions(options: DialogOptions): void;
+ resetDefaultOptions(): void;
+};
+export default Dialog;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/dialog.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/dialog.js
new file mode 100644
index 00000000..542c07b0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/dialog.js
@@ -0,0 +1,84 @@
+let queue = [];
+const defaultOptions = {
+ show: false,
+ title: '',
+ width: null,
+ theme: 'default',
+ message: '',
+ zIndex: 100,
+ overlay: true,
+ selector: '#van-dialog',
+ className: '',
+ asyncClose: false,
+ beforeClose: null,
+ transition: 'scale',
+ customStyle: '',
+ messageAlign: '',
+ overlayStyle: '',
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ showConfirmButton: true,
+ showCancelButton: false,
+ closeOnClickOverlay: false,
+ confirmButtonOpenType: '',
+};
+let currentOptions = Object.assign({}, defaultOptions);
+function getContext() {
+ const pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+const Dialog = (options) => {
+ options = Object.assign(Object.assign({}, currentOptions), options);
+ return new Promise((resolve, reject) => {
+ const context = options.context || getContext();
+ const dialog = context.selectComponent(options.selector);
+ delete options.context;
+ delete options.selector;
+ if (dialog) {
+ dialog.setData(
+ Object.assign(
+ {
+ callback: (action, instance) => {
+ action === 'confirm' ? resolve(instance) : reject(instance);
+ },
+ },
+ options
+ )
+ );
+ wx.nextTick(() => {
+ dialog.setData({ show: true });
+ });
+ queue.push(dialog);
+ } else {
+ console.warn(
+ '未找到 van-dialog 节点,请确认 selector 及 context 是否正确'
+ );
+ }
+ });
+};
+Dialog.alert = (options) => Dialog(options);
+Dialog.confirm = (options) =>
+ Dialog(Object.assign({ showCancelButton: true }, options));
+Dialog.close = () => {
+ queue.forEach((dialog) => {
+ dialog.close();
+ });
+ queue = [];
+};
+Dialog.stopLoading = () => {
+ queue.forEach((dialog) => {
+ dialog.stopLoading();
+ });
+};
+Dialog.currentOptions = currentOptions;
+Dialog.defaultOptions = defaultOptions;
+Dialog.setDefaultOptions = (options) => {
+ currentOptions = Object.assign(Object.assign({}, currentOptions), options);
+ Dialog.currentOptions = currentOptions;
+};
+Dialog.resetDefaultOptions = () => {
+ currentOptions = Object.assign({}, defaultOptions);
+ Dialog.currentOptions = currentOptions;
+};
+Dialog.resetDefaultOptions();
+export default Dialog;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.js
new file mode 100644
index 00000000..10267b43
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.js
@@ -0,0 +1,121 @@
+import { VantComponent } from '../common/component';
+import { button } from '../mixins/button';
+import { GRAY, RED } from '../common/color';
+import { toPromise } from '../common/utils';
+VantComponent({
+ mixins: [button],
+ props: {
+ show: {
+ type: Boolean,
+ observer(show) {
+ !show && this.stopLoading();
+ },
+ },
+ title: String,
+ message: String,
+ theme: {
+ type: String,
+ value: 'default',
+ },
+ useSlot: Boolean,
+ className: String,
+ customStyle: String,
+ asyncClose: Boolean,
+ messageAlign: String,
+ beforeClose: null,
+ overlayStyle: String,
+ useTitleSlot: Boolean,
+ showCancelButton: Boolean,
+ closeOnClickOverlay: Boolean,
+ confirmButtonOpenType: String,
+ width: null,
+ zIndex: {
+ type: Number,
+ value: 2000,
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认',
+ },
+ cancelButtonText: {
+ type: String,
+ value: '取消',
+ },
+ confirmButtonColor: {
+ type: String,
+ value: RED,
+ },
+ cancelButtonColor: {
+ type: String,
+ value: GRAY,
+ },
+ showConfirmButton: {
+ type: Boolean,
+ value: true,
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ transition: {
+ type: String,
+ value: 'scale',
+ },
+ },
+ data: {
+ loading: {
+ confirm: false,
+ cancel: false,
+ },
+ callback: () => {},
+ },
+ methods: {
+ onConfirm() {
+ this.handleAction('confirm');
+ },
+ onCancel() {
+ this.handleAction('cancel');
+ },
+ onClickOverlay() {
+ this.close('overlay');
+ },
+ close(action) {
+ this.setData({ show: false });
+ wx.nextTick(() => {
+ this.$emit('close', action);
+ const { callback } = this.data;
+ if (callback) {
+ callback(action, this);
+ }
+ });
+ },
+ stopLoading() {
+ this.setData({
+ loading: {
+ confirm: false,
+ cancel: false,
+ },
+ });
+ },
+ handleAction(action) {
+ this.$emit(action, { dialog: this });
+ const { asyncClose, beforeClose } = this.data;
+ if (!asyncClose && !beforeClose) {
+ this.close(action);
+ return;
+ }
+ this.setData({
+ [`loading.${action}`]: true,
+ });
+ if (beforeClose) {
+ toPromise(beforeClose(action)).then((value) => {
+ if (value) {
+ this.close(action);
+ } else {
+ this.stopLoading();
+ }
+ });
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.json
new file mode 100644
index 00000000..43417fc8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.json
@@ -0,0 +1,9 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "van-button": "../button/index",
+ "van-goods-action": "../goods-action/index",
+ "van-goods-action-button": "../goods-action-button/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.wxml
new file mode 100644
index 00000000..f49dee40
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.wxml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+ {{ message }}
+
+
+
+
+ {{ cancelButtonText }}
+
+
+ {{ confirmButtonText }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.wxss
new file mode 100644
index 00000000..c6bac957
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dialog/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{padding-top:8px;padding-top:var(--dialog-has-title-message-padding-top,8px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--round-button{padding-bottom:16px;color:#323233}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__footer--round-button{position:relative!important;padding:8px 24px 16px!important}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.js
new file mode 100644
index 00000000..e7257408
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.js
@@ -0,0 +1,12 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ dashed: Boolean,
+ hairline: Boolean,
+ contentPosition: String,
+ fontSize: String,
+ borderColor: String,
+ textColor: String,
+ customStyle: String,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.json
new file mode 100644
index 00000000..a89ef4db
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxml
new file mode 100644
index 00000000..f6a5a457
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxs
new file mode 100644
index 00000000..215b14f4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style([
+ {
+ 'border-color': data.borderColor,
+ color: data.textColor,
+ 'font-size': addUnit(data.fontSize),
+ },
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxss
new file mode 100644
index 00000000..c055e3af
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/divider/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-divider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin:16px 0;margin:var(--divider-margin,16px 0);color:#969799;color:var(--divider-text-color,#969799);font-size:14px;font-size:var(--divider-font-size,14px);line-height:24px;line-height:var(--divider-line-height,24px);border:0 solid #ebedf0;border-color:var(--divider-border-color,#ebedf0)}.van-divider:after,.van-divider:before{display:block;-webkit-flex:1;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:1px 0 0}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:16px;margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:16px;margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:10%;max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:10%;max-width:var(--divider-content-right-width,10%)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.js
new file mode 100644
index 00000000..95da1eef
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.js
@@ -0,0 +1,111 @@
+import { useParent } from '../common/relation';
+import { VantComponent } from '../common/component';
+VantComponent({
+ field: true,
+ relation: useParent('dropdown-menu', function () {
+ this.updateDataFromParent();
+ }),
+ props: {
+ value: {
+ type: null,
+ observer: 'rerender',
+ },
+ title: {
+ type: String,
+ observer: 'rerender',
+ },
+ disabled: Boolean,
+ titleClass: {
+ type: String,
+ observer: 'rerender',
+ },
+ options: {
+ type: Array,
+ value: [],
+ observer: 'rerender',
+ },
+ popupStyle: String,
+ },
+ data: {
+ transition: true,
+ showPopup: false,
+ showWrapper: false,
+ displayTitle: '',
+ },
+ methods: {
+ rerender() {
+ wx.nextTick(() => {
+ var _a;
+ (_a = this.parent) === null || _a === void 0
+ ? void 0
+ : _a.updateItemListData();
+ });
+ },
+ updateDataFromParent() {
+ if (this.parent) {
+ const {
+ overlay,
+ duration,
+ activeColor,
+ closeOnClickOverlay,
+ direction,
+ } = this.parent.data;
+ this.setData({
+ overlay,
+ duration,
+ activeColor,
+ closeOnClickOverlay,
+ direction,
+ });
+ }
+ },
+ onOpen() {
+ this.$emit('open');
+ },
+ onOpened() {
+ this.$emit('opened');
+ },
+ onClose() {
+ this.$emit('close');
+ },
+ onClosed() {
+ this.$emit('closed');
+ this.setData({ showWrapper: false });
+ },
+ onOptionTap(event) {
+ const { option } = event.currentTarget.dataset;
+ const { value } = option;
+ const shouldEmitChange = this.data.value !== value;
+ this.setData({ showPopup: false, value });
+ this.$emit('close');
+ this.rerender();
+ if (shouldEmitChange) {
+ this.$emit('change', value);
+ }
+ },
+ toggle(show, options = {}) {
+ var _a;
+ const { showPopup } = this.data;
+ if (typeof show !== 'boolean') {
+ show = !showPopup;
+ }
+ if (show === showPopup) {
+ return;
+ }
+ this.setData({
+ transition: !options.immediate,
+ showPopup: show,
+ });
+ if (show) {
+ (_a = this.parent) === null || _a === void 0
+ ? void 0
+ : _a.getChildWrapperStyle().then((wrapperStyle) => {
+ this.setData({ wrapperStyle, showWrapper: true });
+ this.rerender();
+ });
+ } else {
+ this.rerender();
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.json
new file mode 100644
index 00000000..88d54099
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "van-cell": "../cell/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.wxml
new file mode 100644
index 00000000..dd75292f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.wxml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.wxss
new file mode 100644
index 00000000..7cab3f28
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#ee0a24;color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/shared.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/shared.d.ts
new file mode 100644
index 00000000..c90bd9e1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/shared.d.ts
@@ -0,0 +1,5 @@
+export interface Option {
+ text: string;
+ value: string | number;
+ icon: string;
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/shared.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/shared.js
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-item/shared.js
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.js
new file mode 100644
index 00000000..aba11b98
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.js
@@ -0,0 +1,112 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+import { addUnit, getRect, getSystemInfoSync } from '../common/utils';
+let ARRAY = [];
+VantComponent({
+ field: true,
+ relation: useChildren('dropdown-item', function () {
+ this.updateItemListData();
+ }),
+ props: {
+ activeColor: {
+ type: String,
+ observer: 'updateChildrenData',
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildrenData',
+ },
+ zIndex: {
+ type: Number,
+ value: 10,
+ },
+ duration: {
+ type: Number,
+ value: 200,
+ observer: 'updateChildrenData',
+ },
+ direction: {
+ type: String,
+ value: 'down',
+ observer: 'updateChildrenData',
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildrenData',
+ },
+ closeOnClickOutside: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ itemListData: [],
+ },
+ beforeCreate() {
+ const { windowHeight } = getSystemInfoSync();
+ this.windowHeight = windowHeight;
+ ARRAY.push(this);
+ },
+ destroyed() {
+ ARRAY = ARRAY.filter((item) => item !== this);
+ },
+ methods: {
+ updateItemListData() {
+ this.setData({
+ itemListData: this.children.map((child) => child.data),
+ });
+ },
+ updateChildrenData() {
+ this.children.forEach((child) => {
+ child.updateDataFromParent();
+ });
+ },
+ toggleItem(active) {
+ this.children.forEach((item, index) => {
+ const { showPopup } = item.data;
+ if (index === active) {
+ item.toggle();
+ } else if (showPopup) {
+ item.toggle(false, { immediate: true });
+ }
+ });
+ },
+ close() {
+ this.children.forEach((child) => {
+ child.toggle(false, { immediate: true });
+ });
+ },
+ getChildWrapperStyle() {
+ const { zIndex, direction } = this.data;
+ return getRect(this, '.van-dropdown-menu').then((rect) => {
+ const { top = 0, bottom = 0 } = rect;
+ const offset = direction === 'down' ? bottom : this.windowHeight - top;
+ let wrapperStyle = `z-index: ${zIndex};`;
+ if (direction === 'down') {
+ wrapperStyle += `top: ${addUnit(offset)};`;
+ } else {
+ wrapperStyle += `bottom: ${addUnit(offset)};`;
+ }
+ return wrapperStyle;
+ });
+ },
+ onTitleTap(event) {
+ const { index } = event.currentTarget.dataset;
+ const child = this.children[index];
+ if (!child.data.disabled) {
+ ARRAY.forEach((menuItem) => {
+ if (
+ menuItem &&
+ menuItem.data.closeOnClickOutside &&
+ menuItem !== this
+ ) {
+ menuItem.close();
+ }
+ });
+ this.toggleItem(index);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxml
new file mode 100644
index 00000000..037ac3b6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxs
new file mode 100644
index 00000000..65388549
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxs
@@ -0,0 +1,16 @@
+/* eslint-disable */
+function displayTitle(item) {
+ if (item.title) {
+ return item.title;
+ }
+
+ var match = item.options.filter(function(option) {
+ return option.value === item.value;
+ });
+ var displayTitle = match.length ? match[0].text : '';
+ return displayTitle;
+}
+
+module.exports = {
+ displayTitle: displayTitle
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxss
new file mode 100644
index 00000000..ec6caff6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/dropdown-menu/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;box-shadow:0 2px 12px rgba(100,101,102,.12);-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#ee0a24;color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.js
new file mode 100644
index 00000000..32ec1163
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.js
@@ -0,0 +1,10 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ description: String,
+ image: {
+ type: String,
+ value: 'default',
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxml
new file mode 100644
index 00000000..9c7b719a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxs
new file mode 100644
index 00000000..9696dd47
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var PRESETS = ['error', 'search', 'default', 'network'];
+
+function imageUrl(image) {
+ if (PRESETS.indexOf(image) !== -1) {
+ return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png';
+ }
+
+ return image;
+}
+
+module.exports = {
+ imageUrl: imageUrl,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxss
new file mode 100644
index 00000000..aeb9d4b1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/empty/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-empty{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:32px 0}.van-empty__image{width:160px;height:160px}.van-empty__image:empty{display:none}.van-empty__image__img{width:100%;height:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{margin-top:16px;padding:0 60px;color:#969799;font-size:14px;line-height:20px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.js
new file mode 100644
index 00000000..fd3472dc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.js
@@ -0,0 +1,126 @@
+import { nextTick } from '../common/utils';
+import { VantComponent } from '../common/component';
+import { commonProps, inputProps, textareaProps } from './props';
+VantComponent({
+ field: true,
+ classes: ['input-class', 'right-icon-class', 'label-class'],
+ props: Object.assign(
+ Object.assign(
+ Object.assign(Object.assign({}, commonProps), inputProps),
+ textareaProps
+ ),
+ {
+ size: String,
+ icon: String,
+ label: String,
+ error: Boolean,
+ center: Boolean,
+ isLink: Boolean,
+ leftIcon: String,
+ rightIcon: String,
+ autosize: null,
+ required: Boolean,
+ iconClass: String,
+ clickable: Boolean,
+ inputAlign: String,
+ customStyle: String,
+ errorMessage: String,
+ arrowDirection: String,
+ showWordLimit: Boolean,
+ errorMessageAlign: String,
+ readonly: {
+ type: Boolean,
+ observer: 'setShowClear',
+ },
+ clearable: {
+ type: Boolean,
+ observer: 'setShowClear',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ titleWidth: {
+ type: String,
+ value: '6.2em',
+ },
+ }
+ ),
+ data: {
+ focused: false,
+ innerValue: '',
+ showClear: false,
+ },
+ created() {
+ this.value = this.data.value;
+ this.setData({ innerValue: this.value });
+ },
+ methods: {
+ onInput(event) {
+ const { value = '' } = event.detail || {};
+ this.value = value;
+ this.setShowClear();
+ this.emitChange();
+ },
+ onFocus(event) {
+ this.focused = true;
+ this.setShowClear();
+ this.$emit('focus', event.detail);
+ },
+ onBlur(event) {
+ this.focused = false;
+ this.setShowClear();
+ this.$emit('blur', event.detail);
+ },
+ onClickIcon() {
+ this.$emit('click-icon');
+ },
+ onClickInput(event) {
+ this.$emit('click-input', event.detail);
+ },
+ onClear() {
+ this.setData({ innerValue: '' });
+ this.value = '';
+ this.setShowClear();
+ nextTick(() => {
+ this.emitChange();
+ this.$emit('clear', '');
+ });
+ },
+ onConfirm(event) {
+ const { value = '' } = event.detail || {};
+ this.value = value;
+ this.setShowClear();
+ this.$emit('confirm', value);
+ },
+ setValue(value) {
+ this.value = value;
+ this.setShowClear();
+ if (value === '') {
+ this.setData({ innerValue: '' });
+ }
+ this.emitChange();
+ },
+ onLineChange(event) {
+ this.$emit('linechange', event.detail);
+ },
+ onKeyboardHeightChange(event) {
+ this.$emit('keyboardheightchange', event.detail);
+ },
+ emitChange() {
+ this.setData({ value: this.value });
+ nextTick(() => {
+ this.$emit('input', this.value);
+ this.$emit('change', this.value);
+ });
+ },
+ setShowClear() {
+ const { clearable, readonly } = this.data;
+ const { focused, value } = this;
+ this.setData({
+ showClear: !!clearable && !!focused && !!value && !readonly,
+ });
+ },
+ noop() {},
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.json
new file mode 100644
index 00000000..5906c504
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxml
new file mode 100644
index 00000000..9dc8b666
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ value.length >= maxlength ? maxlength : value.length }}/{{ maxlength }}
+
+
+ {{ errorMessage }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxs
new file mode 100644
index 00000000..78575b9a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function inputStyle(autosize) {
+ if (autosize && autosize.constructor === 'Object') {
+ return style({
+ 'min-height': addUnit(autosize.minHeight),
+ 'max-height': addUnit(autosize.maxHeight),
+ });
+ }
+
+ return '';
+}
+
+module.exports = {
+ inputStyle: inputStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxss
new file mode 100644
index 00000000..171f6133
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:#646566;color:var(--field-label-color,#646566)}.van-field__label--disabled{color:#c8c9cc;color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{box-sizing:border-box;padding:3.6px 0;line-height:1.2em;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__control:empty+.van-field__control{display:block}.van-field__control{position:relative;display:none;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px);min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__control:empty{display:none}.van-field__control--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;opacity:1;color:#c8c9cc;color:var(--field-input-disabled-text-color,#c8c9cc)}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#c8c9cc;color:var(--field-placeholder-text-color,#c8c9cc)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/input.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/input.wxml
new file mode 100644
index 00000000..3ecab243
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/input.wxml
@@ -0,0 +1,27 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/props.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/props.d.ts
new file mode 100644
index 00000000..5cd130a1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/props.d.ts
@@ -0,0 +1,4 @@
+///
+export declare const commonProps: WechatMiniprogram.Component.PropertyOption;
+export declare const inputProps: WechatMiniprogram.Component.PropertyOption;
+export declare const textareaProps: WechatMiniprogram.Component.PropertyOption;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/props.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/props.js
new file mode 100644
index 00000000..218749f8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/props.js
@@ -0,0 +1,63 @@
+export const commonProps = {
+ value: {
+ type: String,
+ observer(value) {
+ if (value !== this.value) {
+ this.setData({ innerValue: value });
+ this.value = value;
+ }
+ },
+ },
+ placeholder: String,
+ placeholderStyle: String,
+ placeholderClass: String,
+ disabled: Boolean,
+ maxlength: {
+ type: Number,
+ value: -1,
+ },
+ cursorSpacing: {
+ type: Number,
+ value: 50,
+ },
+ autoFocus: Boolean,
+ focus: Boolean,
+ cursor: {
+ type: Number,
+ value: -1,
+ },
+ selectionStart: {
+ type: Number,
+ value: -1,
+ },
+ selectionEnd: {
+ type: Number,
+ value: -1,
+ },
+ adjustPosition: {
+ type: Boolean,
+ value: true,
+ },
+ holdKeyboard: Boolean,
+};
+export const inputProps = {
+ type: {
+ type: String,
+ value: 'text',
+ },
+ password: Boolean,
+ confirmType: String,
+ confirmHold: Boolean,
+};
+export const textareaProps = {
+ autoHeight: Boolean,
+ fixed: Boolean,
+ showConfirmBar: {
+ type: Boolean,
+ value: true,
+ },
+ disableDefaultPadding: {
+ type: Boolean,
+ value: true,
+ },
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/field/textarea.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/textarea.wxml
new file mode 100644
index 00000000..5015a51d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/field/textarea.wxml
@@ -0,0 +1,29 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.js
new file mode 100644
index 00000000..5f6dfe20
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.js
@@ -0,0 +1,36 @@
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+import { button } from '../mixins/button';
+import { link } from '../mixins/link';
+VantComponent({
+ mixins: [link, button],
+ relation: useParent('goods-action'),
+ props: {
+ text: String,
+ color: String,
+ loading: Boolean,
+ disabled: Boolean,
+ plain: Boolean,
+ type: {
+ type: String,
+ value: 'danger',
+ },
+ },
+ methods: {
+ onClick(event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ updateStyle() {
+ if (this.parent == null) {
+ return;
+ }
+ const { index } = this;
+ const { children = [] } = this.parent;
+ this.setData({
+ isFirst: index === 0,
+ isLast: index === children.length - 1,
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.json
new file mode 100644
index 00000000..b5676868
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-button": "../button/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.wxml
new file mode 100644
index 00000000..4505f212
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.wxml
@@ -0,0 +1,30 @@
+
+
+ {{ text }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.wxss
new file mode 100644
index 00000000..77d16c67
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-button/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-goods-action-button{--button-warning-background-color:linear-gradient(90deg,#ffd01e,#ff8917);--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(90deg,#ffd01e,#ff8917));--button-danger-background-color:linear-gradient(90deg,#ff6034,#ee0a24);--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(90deg,#ff6034,#ee0a24));--button-default-height:40px;--button-default-height:var(--goods-action-button-height,40px);--button-line-height:20px;--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:#fff;--button-plain-background-color:var(--goods-action-button-plain-color,#fff);display:block;--button-border-width:0}.van-goods-action-button--first{margin-left:5px;--button-border-radius:20px 0 0 20px;--button-border-radius:var(--goods-action-button-border-radius,20px) 0 0 var(--goods-action-button-border-radius,20px)}.van-goods-action-button--last{margin-right:5px;--button-border-radius:0 20px 20px 0;--button-border-radius:0 var(--goods-action-button-border-radius,20px) var(--goods-action-button-border-radius,20px) 0}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:20px;--button-border-radius:var(--goods-action-button-border-radius,20px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{width:100%;font-weight:500!important;font-weight:var(--font-weight-bold,500)!important}@media (max-width:321px){.van-goods-action-button{font-size:13px}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.js
new file mode 100644
index 00000000..3ebbec1c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.js
@@ -0,0 +1,21 @@
+import { VantComponent } from '../common/component';
+import { button } from '../mixins/button';
+import { link } from '../mixins/link';
+VantComponent({
+ classes: ['icon-class', 'text-class'],
+ mixins: [link, button],
+ props: {
+ text: String,
+ dot: Boolean,
+ info: String,
+ icon: String,
+ disabled: Boolean,
+ loading: Boolean,
+ },
+ methods: {
+ onClick(event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.json
new file mode 100644
index 00000000..93bfe8ab
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-button": "../button/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.wxml
new file mode 100644
index 00000000..65b7ced3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.wxml
@@ -0,0 +1,35 @@
+
+
+
+ {{ text }}
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.wxss
new file mode 100644
index 00000000..eeef1911
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action-icon/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-goods-action-icon{display:-webkit-flex!important;display:flex!important;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center!important;justify-content:center!important;line-height:1!important;border:none!important;font-size:10px!important;font-size:var(--goods-action-icon-font-size,10px)!important;color:#646566!important;color:var(--goods-action-icon-text-color,#646566)!important;min-width:48px;min-width:var(--goods-action-icon-width,48px);height:50px!important;height:var(--goods-action-icon-height,50px)!important}.van-goods-action-icon__icon{display:-webkit-flex;display:flex;margin:0 auto 5px;color:#323233;color:var(--goods-action-icon-color,#323233);font-size:18px;font-size:var(--goods-action-icon-size,18px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.js
new file mode 100644
index 00000000..c58c38df
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.js
@@ -0,0 +1,15 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+VantComponent({
+ relation: useChildren('goods-action-button', function () {
+ this.children.forEach((item) => {
+ item.updateStyle();
+ });
+ }),
+ props: {
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.wxml
new file mode 100644
index 00000000..569450c7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.wxss
new file mode 100644
index 00000000..d0def95e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/goods-action/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;box-sizing:initial;height:50px;height:var(--goods-action-height,50px);background-color:#fff;background-color:var(--goods-action-background-color,#fff)}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.js
new file mode 100644
index 00000000..e0083097
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.js
@@ -0,0 +1,56 @@
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+import { link } from '../mixins/link';
+VantComponent({
+ relation: useParent('grid'),
+ classes: ['content-class', 'icon-class', 'text-class'],
+ mixins: [link],
+ props: {
+ icon: String,
+ iconColor: String,
+ dot: Boolean,
+ info: null,
+ badge: null,
+ text: String,
+ useSlot: Boolean,
+ },
+ data: {
+ viewStyle: '',
+ },
+ mounted() {
+ this.updateStyle();
+ },
+ methods: {
+ updateStyle() {
+ if (!this.parent) {
+ return;
+ }
+ const { data, children } = this.parent;
+ const {
+ columnNum,
+ border,
+ square,
+ gutter,
+ clickable,
+ center,
+ direction,
+ iconSize,
+ } = data;
+ this.setData({
+ center,
+ border,
+ square,
+ gutter,
+ clickable,
+ direction,
+ iconSize,
+ index: children.indexOf(this),
+ columnNum,
+ });
+ },
+ onClick() {
+ this.$emit('click');
+ this.jumpLink();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxml
new file mode 100644
index 00000000..0070a2bb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxs
new file mode 100644
index 00000000..2cfe37d0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxs
@@ -0,0 +1,32 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function wrapperStyle(data) {
+ var width = 100 / data.columnNum + '%';
+
+ return style({
+ width: width,
+ 'padding-top': data.square ? width : null,
+ 'padding-right': addUnit(data.gutter),
+ 'margin-top':
+ data.index >= data.columnNum && !data.square
+ ? addUnit(data.gutter)
+ : null,
+ });
+}
+
+function contentStyle(data) {
+ return data.square
+ ? style({
+ right: addUnit(data.gutter),
+ bottom: addUnit(data.gutter),
+ height: 'auto',
+ })
+ : '';
+}
+
+module.exports = {
+ wrapperStyle: wrapperStyle,
+ contentStyle: contentStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxss
new file mode 100644
index 00000000..ed7facb8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-grid-item{position:relative;float:left;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__content{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;box-sizing:border-box;height:100%;padding:16px 8px;padding:var(--grid-item-content-padding,16px 8px);background-color:#fff;background-color:var(--grid-item-content-background-color,#fff)}.van-grid-item__content:after{z-index:1;border-width:0 1px 1px 0;border-bottom-width:var(--border-width-base,1px);border-right-width:var(--border-width-base,1px);border-top-width:0}.van-grid-item__content--surround:after{border-width:1px;border-width:var(--border-width-base,1px)}.van-grid-item__content--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--horizontal{-webkit-flex-direction:row;flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__icon+.van-grid-item__text{margin-top:0;margin-left:8px}.van-grid-item__content--clickable:active{background-color:#f2f3f5;background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:26px;font-size:var(--grid-item-icon-size,26px);height:26px;height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:#646566;color:var(--grid-item-text-color,#646566);font-size:12px;font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.js
new file mode 100644
index 00000000..73e41ceb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.js
@@ -0,0 +1,50 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+VantComponent({
+ relation: useChildren('grid-item'),
+ props: {
+ square: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ gutter: {
+ type: null,
+ value: 0,
+ observer: 'updateChildren',
+ },
+ clickable: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ columnNum: {
+ type: Number,
+ value: 4,
+ observer: 'updateChildren',
+ },
+ center: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildren',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildren',
+ },
+ direction: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ iconSize: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren() {
+ this.children.forEach((child) => {
+ child.updateStyle();
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxml
new file mode 100644
index 00000000..2e4118f3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxs
new file mode 100644
index 00000000..cd3b1bd5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style({
+ 'padding-left': addUnit(data.gutter),
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxss
new file mode 100644
index 00000000..327fc5ef
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/grid/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-grid{position:relative;box-sizing:border-box;overflow:hidden}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.js
new file mode 100644
index 00000000..75f2c946
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.js
@@ -0,0 +1,20 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ dot: Boolean,
+ info: null,
+ size: null,
+ color: String,
+ customStyle: String,
+ classPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ name: String,
+ },
+ methods: {
+ onClick() {
+ this.$emit('click');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.json
new file mode 100644
index 00000000..bf0ebe00
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxml
new file mode 100644
index 00000000..3c701745
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxs
new file mode 100644
index 00000000..45e3aa0a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxs
@@ -0,0 +1,39 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function isImage(name) {
+ return name.indexOf('/') !== -1;
+}
+
+function rootClass(data) {
+ var classes = ['custom-class'];
+
+ if (data.classPrefix != null) {
+ classes.push(data.classPrefix);
+ }
+
+ if (isImage(data.name)) {
+ classes.push('van-icon--image');
+ } else if (data.classPrefix != null) {
+ classes.push(data.classPrefix + '-' + data.name);
+ }
+
+ return classes.join(' ');
+}
+
+function rootStyle(data) {
+ return style([
+ {
+ color: data.color,
+ 'font-size': addUnit(data.size),
+ },
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ isImage: isImage,
+ rootClass: rootClass,
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxss
new file mode 100644
index 00000000..a9085c83
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/icon/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-icon{position:relative;font:normal normal normal 14px/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon,.van-icon:before{display:inline-block}.van-icon-exchange:before{content:"\e6af"}.van-icon-eye:before{content:"\e6b0"}.van-icon-enlarge:before{content:"\e6b1"}.van-icon-expand-o:before{content:"\e6b2"}.van-icon-eye-o:before{content:"\e6b3"}.van-icon-expand:before{content:"\e6b4"}.van-icon-filter-o:before{content:"\e6b5"}.van-icon-fire:before{content:"\e6b6"}.van-icon-fail:before{content:"\e6b7"}.van-icon-failure:before{content:"\e6b8"}.van-icon-fire-o:before{content:"\e6b9"}.van-icon-flag-o:before{content:"\e6ba"}.van-icon-font:before{content:"\e6bb"}.van-icon-font-o:before{content:"\e6bc"}.van-icon-gem-o:before{content:"\e6bd"}.van-icon-flower-o:before{content:"\e6be"}.van-icon-gem:before{content:"\e6bf"}.van-icon-gift-card:before{content:"\e6c0"}.van-icon-friends:before{content:"\e6c1"}.van-icon-friends-o:before{content:"\e6c2"}.van-icon-gold-coin:before{content:"\e6c3"}.van-icon-gold-coin-o:before{content:"\e6c4"}.van-icon-good-job-o:before{content:"\e6c5"}.van-icon-gift:before{content:"\e6c6"}.van-icon-gift-o:before{content:"\e6c7"}.van-icon-gift-card-o:before{content:"\e6c8"}.van-icon-good-job:before{content:"\e6c9"}.van-icon-home-o:before{content:"\e6ca"}.van-icon-goods-collect:before{content:"\e6cb"}.van-icon-graphic:before{content:"\e6cc"}.van-icon-goods-collect-o:before{content:"\e6cd"}.van-icon-hot-o:before{content:"\e6ce"}.van-icon-info:before{content:"\e6cf"}.van-icon-hotel-o:before{content:"\e6d0"}.van-icon-info-o:before{content:"\e6d1"}.van-icon-hot-sale-o:before{content:"\e6d2"}.van-icon-hot:before{content:"\e6d3"}.van-icon-like:before{content:"\e6d4"}.van-icon-idcard:before{content:"\e6d5"}.van-icon-invition:before{content:"\e6d6"}.van-icon-like-o:before{content:"\e6d7"}.van-icon-hot-sale:before{content:"\e6d8"}.van-icon-location-o:before{content:"\e6d9"}.van-icon-location:before{content:"\e6da"}.van-icon-label:before{content:"\e6db"}.van-icon-lock:before{content:"\e6dc"}.van-icon-label-o:before{content:"\e6dd"}.van-icon-map-marked:before{content:"\e6de"}.van-icon-logistics:before{content:"\e6df"}.van-icon-manager:before{content:"\e6e0"}.van-icon-more:before{content:"\e6e1"}.van-icon-live:before{content:"\e6e2"}.van-icon-manager-o:before{content:"\e6e3"}.van-icon-medal:before{content:"\e6e4"}.van-icon-more-o:before{content:"\e6e5"}.van-icon-music-o:before{content:"\e6e6"}.van-icon-music:before{content:"\e6e7"}.van-icon-new-arrival-o:before{content:"\e6e8"}.van-icon-medal-o:before{content:"\e6e9"}.van-icon-new-o:before{content:"\e6ea"}.van-icon-free-postage:before{content:"\e6eb"}.van-icon-newspaper-o:before{content:"\e6ec"}.van-icon-new-arrival:before{content:"\e6ed"}.van-icon-minus:before{content:"\e6ee"}.van-icon-orders-o:before{content:"\e6ef"}.van-icon-new:before{content:"\e6f0"}.van-icon-paid:before{content:"\e6f1"}.van-icon-notes-o:before{content:"\e6f2"}.van-icon-other-pay:before{content:"\e6f3"}.van-icon-pause-circle:before{content:"\e6f4"}.van-icon-pause:before{content:"\e6f5"}.van-icon-pause-circle-o:before{content:"\e6f6"}.van-icon-peer-pay:before{content:"\e6f7"}.van-icon-pending-payment:before{content:"\e6f8"}.van-icon-passed:before{content:"\e6f9"}.van-icon-plus:before{content:"\e6fa"}.van-icon-phone-circle-o:before{content:"\e6fb"}.van-icon-phone-o:before{content:"\e6fc"}.van-icon-printer:before{content:"\e6fd"}.van-icon-photo-fail:before{content:"\e6fe"}.van-icon-phone:before{content:"\e6ff"}.van-icon-photo-o:before{content:"\e700"}.van-icon-play-circle:before{content:"\e701"}.van-icon-play:before{content:"\e702"}.van-icon-phone-circle:before{content:"\e703"}.van-icon-point-gift-o:before{content:"\e704"}.van-icon-point-gift:before{content:"\e705"}.van-icon-play-circle-o:before{content:"\e706"}.van-icon-shrink:before{content:"\e707"}.van-icon-photo:before{content:"\e708"}.van-icon-qr:before{content:"\e709"}.van-icon-qr-invalid:before{content:"\e70a"}.van-icon-question-o:before{content:"\e70b"}.van-icon-revoke:before{content:"\e70c"}.van-icon-replay:before{content:"\e70d"}.van-icon-service:before{content:"\e70e"}.van-icon-question:before{content:"\e70f"}.van-icon-search:before{content:"\e710"}.van-icon-refund-o:before{content:"\e711"}.van-icon-service-o:before{content:"\e712"}.van-icon-scan:before{content:"\e713"}.van-icon-share:before{content:"\e714"}.van-icon-send-gift-o:before{content:"\e715"}.van-icon-share-o:before{content:"\e716"}.van-icon-setting:before{content:"\e717"}.van-icon-points:before{content:"\e718"}.van-icon-photograph:before{content:"\e719"}.van-icon-shop:before{content:"\e71a"}.van-icon-shop-o:before{content:"\e71b"}.van-icon-shop-collect-o:before{content:"\e71c"}.van-icon-shop-collect:before{content:"\e71d"}.van-icon-smile:before{content:"\e71e"}.van-icon-shopping-cart-o:before{content:"\e71f"}.van-icon-sign:before{content:"\e720"}.van-icon-sort:before{content:"\e721"}.van-icon-star-o:before{content:"\e722"}.van-icon-smile-comment-o:before{content:"\e723"}.van-icon-stop:before{content:"\e724"}.van-icon-stop-circle-o:before{content:"\e725"}.van-icon-smile-o:before{content:"\e726"}.van-icon-star:before{content:"\e727"}.van-icon-success:before{content:"\e728"}.van-icon-stop-circle:before{content:"\e729"}.van-icon-records:before{content:"\e72a"}.van-icon-shopping-cart:before{content:"\e72b"}.van-icon-tosend:before{content:"\e72c"}.van-icon-todo-list:before{content:"\e72d"}.van-icon-thumb-circle-o:before{content:"\e72e"}.van-icon-thumb-circle:before{content:"\e72f"}.van-icon-umbrella-circle:before{content:"\e730"}.van-icon-underway:before{content:"\e731"}.van-icon-upgrade:before{content:"\e732"}.van-icon-todo-list-o:before{content:"\e733"}.van-icon-tv-o:before{content:"\e734"}.van-icon-underway-o:before{content:"\e735"}.van-icon-user-o:before{content:"\e736"}.van-icon-vip-card-o:before{content:"\e737"}.van-icon-vip-card:before{content:"\e738"}.van-icon-send-gift:before{content:"\e739"}.van-icon-wap-home:before{content:"\e73a"}.van-icon-wap-nav:before{content:"\e73b"}.van-icon-volume-o:before{content:"\e73c"}.van-icon-video:before{content:"\e73d"}.van-icon-wap-home-o:before{content:"\e73e"}.van-icon-volume:before{content:"\e73f"}.van-icon-warning:before{content:"\e740"}.van-icon-weapp-nav:before{content:"\e741"}.van-icon-wechat-pay:before{content:"\e742"}.van-icon-warning-o:before{content:"\e743"}.van-icon-wechat:before{content:"\e744"}.van-icon-setting-o:before{content:"\e745"}.van-icon-youzan-shield:before{content:"\e746"}.van-icon-warn-o:before{content:"\e747"}.van-icon-smile-comment:before{content:"\e748"}.van-icon-user-circle-o:before{content:"\e749"}.van-icon-video-o:before{content:"\e74a"}.van-icon-add-square:before{content:"\e65c"}.van-icon-add:before{content:"\e65d"}.van-icon-arrow-down:before{content:"\e65e"}.van-icon-arrow-up:before{content:"\e65f"}.van-icon-arrow:before{content:"\e660"}.van-icon-after-sale:before{content:"\e661"}.van-icon-add-o:before{content:"\e662"}.van-icon-alipay:before{content:"\e663"}.van-icon-ascending:before{content:"\e664"}.van-icon-apps-o:before{content:"\e665"}.van-icon-aim:before{content:"\e666"}.van-icon-award:before{content:"\e667"}.van-icon-arrow-left:before{content:"\e668"}.van-icon-award-o:before{content:"\e669"}.van-icon-audio:before{content:"\e66a"}.van-icon-bag-o:before{content:"\e66b"}.van-icon-balance-list:before{content:"\e66c"}.van-icon-back-top:before{content:"\e66d"}.van-icon-bag:before{content:"\e66e"}.van-icon-balance-pay:before{content:"\e66f"}.van-icon-balance-o:before{content:"\e670"}.van-icon-bar-chart-o:before{content:"\e671"}.van-icon-bars:before{content:"\e672"}.van-icon-balance-list-o:before{content:"\e673"}.van-icon-birthday-cake-o:before{content:"\e674"}.van-icon-bookmark:before{content:"\e675"}.van-icon-bill:before{content:"\e676"}.van-icon-bell:before{content:"\e677"}.van-icon-browsing-history-o:before{content:"\e678"}.van-icon-browsing-history:before{content:"\e679"}.van-icon-bookmark-o:before{content:"\e67a"}.van-icon-bulb-o:before{content:"\e67b"}.van-icon-bullhorn-o:before{content:"\e67c"}.van-icon-bill-o:before{content:"\e67d"}.van-icon-calendar-o:before{content:"\e67e"}.van-icon-brush-o:before{content:"\e67f"}.van-icon-card:before{content:"\e680"}.van-icon-cart-o:before{content:"\e681"}.van-icon-cart-circle:before{content:"\e682"}.van-icon-cart-circle-o:before{content:"\e683"}.van-icon-cart:before{content:"\e684"}.van-icon-cash-on-deliver:before{content:"\e685"}.van-icon-cash-back-record:before{content:"\e686"}.van-icon-cashier-o:before{content:"\e687"}.van-icon-chart-trending-o:before{content:"\e688"}.van-icon-certificate:before{content:"\e689"}.van-icon-chat:before{content:"\e68a"}.van-icon-clear:before{content:"\e68b"}.van-icon-chat-o:before{content:"\e68c"}.van-icon-checked:before{content:"\e68d"}.van-icon-clock:before{content:"\e68e"}.van-icon-clock-o:before{content:"\e68f"}.van-icon-close:before{content:"\e690"}.van-icon-closed-eye:before{content:"\e691"}.van-icon-circle:before{content:"\e692"}.van-icon-cluster-o:before{content:"\e693"}.van-icon-column:before{content:"\e694"}.van-icon-comment-circle-o:before{content:"\e695"}.van-icon-cluster:before{content:"\e696"}.van-icon-comment:before{content:"\e697"}.van-icon-comment-o:before{content:"\e698"}.van-icon-comment-circle:before{content:"\e699"}.van-icon-completed:before{content:"\e69a"}.van-icon-credit-pay:before{content:"\e69b"}.van-icon-coupon:before{content:"\e69c"}.van-icon-debit-pay:before{content:"\e69d"}.van-icon-coupon-o:before{content:"\e69e"}.van-icon-contact:before{content:"\e69f"}.van-icon-descending:before{content:"\e6a0"}.van-icon-desktop-o:before{content:"\e6a1"}.van-icon-diamond-o:before{content:"\e6a2"}.van-icon-description:before{content:"\e6a3"}.van-icon-delete:before{content:"\e6a4"}.van-icon-diamond:before{content:"\e6a5"}.van-icon-delete-o:before{content:"\e6a6"}.van-icon-cross:before{content:"\e6a7"}.van-icon-edit:before{content:"\e6a8"}.van-icon-ellipsis:before{content:"\e6a9"}.van-icon-down:before{content:"\e6aa"}.van-icon-discount:before{content:"\e6ab"}.van-icon-ecard-pay:before{content:"\e6ac"}.van-icon-envelop-o:before{content:"\e6ae"}@font-face{font-weight:400;font-style:normal;font-display:auto;font-family:vant-icon;src:url(https://at.alicdn.com/t/font_2553510_7cds497uxwn.woff2?t=1621320123079) format("woff2"),url(https://at.alicdn.com/t/font_2553510_7cds497uxwn.woff?t=1621320123079) format("woff"),url(https://at.alicdn.com/t/font_2553510_7cds497uxwn.ttf?t=1621320123079) format("truetype")}:host{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-icon--image{width:1em;height:1em}.van-icon__image{width:100%;height:100%}.van-icon__info{z-index:1}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.js
new file mode 100644
index 00000000..74054267
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.js
@@ -0,0 +1,60 @@
+import { VantComponent } from '../common/component';
+import { button } from '../mixins/button';
+VantComponent({
+ mixins: [button],
+ classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],
+ props: {
+ src: {
+ type: String,
+ observer() {
+ this.setData({
+ error: false,
+ loading: true,
+ });
+ },
+ },
+ round: Boolean,
+ width: null,
+ height: null,
+ radius: null,
+ lazyLoad: Boolean,
+ useErrorSlot: Boolean,
+ useLoadingSlot: Boolean,
+ showMenuByLongpress: Boolean,
+ fit: {
+ type: String,
+ value: 'fill',
+ },
+ showError: {
+ type: Boolean,
+ value: true,
+ },
+ showLoading: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ error: false,
+ loading: true,
+ viewStyle: '',
+ },
+ methods: {
+ onLoad(event) {
+ this.setData({
+ loading: false,
+ });
+ this.$emit('load', event.detail);
+ },
+ onError(event) {
+ this.setData({
+ loading: false,
+ error: true,
+ });
+ this.$emit('error', event.detail);
+ },
+ onClick(event) {
+ this.$emit('click', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxml
new file mode 100644
index 00000000..d3092bd9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxs
new file mode 100644
index 00000000..cec14b8b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxs
@@ -0,0 +1,32 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style([
+ {
+ width: addUnit(data.width),
+ height: addUnit(data.height),
+ 'border-radius': addUnit(data.radius),
+ },
+ data.radius ? 'overflow: hidden' : null,
+ ]);
+}
+
+var FIT_MODE_MAP = {
+ none: 'center',
+ fill: 'scaleToFill',
+ cover: 'aspectFill',
+ contain: 'aspectFit',
+ widthFix: 'widthFix',
+ heightFix: 'heightFix',
+};
+
+function mode(fit) {
+ return FIT_MODE_MAP[fit];
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ mode: mode,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxss
new file mode 100644
index 00000000..47589109
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/image/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}.van-image__loading-icon{color:#dcdee0;color:var(--image-loading-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:#dcdee0;color:var(--image-error-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-error-icon-size,32px)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.js
new file mode 100644
index 00000000..7d81508f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.js
@@ -0,0 +1,25 @@
+import { getRect } from '../common/utils';
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+VantComponent({
+ relation: useParent('index-bar'),
+ props: {
+ useSlot: Boolean,
+ index: null,
+ },
+ data: {
+ active: false,
+ wrapperStyle: '',
+ anchorStyle: '',
+ },
+ methods: {
+ scrollIntoView(scrollTop) {
+ getRect(this, '.van-index-anchor-wrapper').then((rect) => {
+ wx.pageScrollTo({
+ duration: 0,
+ scrollTop: scrollTop + rect.top - this.parent.data.stickyOffsetTop,
+ });
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.wxml
new file mode 100644
index 00000000..49affa7c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+ {{ index }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.wxss
new file mode 100644
index 00000000..b8c3c0a4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-anchor/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-index-anchor{padding:0 16px;padding:var(--index-anchor-padding,0 16px);color:#323233;color:var(--index-anchor-text-color,#323233);font-weight:500;font-weight:var(--index-anchor-font-weight,500);font-size:14px;font-size:var(--index-anchor-font-size,14px);line-height:32px;line-height:var(--index-anchor-line-height,32px);background-color:initial;background-color:var(--index-anchor-background-color,transparent)}.van-index-anchor--active{right:0;left:0;color:#07c160;color:var(--index-anchor-active-text-color,#07c160);background-color:#fff;background-color:var(--index-anchor-active-background-color,#fff)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.js
new file mode 100644
index 00000000..c092f121
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.js
@@ -0,0 +1,245 @@
+import { GREEN } from '../common/color';
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+import { getRect } from '../common/utils';
+import { pageScrollMixin } from '../mixins/page-scroll';
+const indexList = () => {
+ const indexList = [];
+ const charCodeOfA = 'A'.charCodeAt(0);
+ for (let i = 0; i < 26; i++) {
+ indexList.push(String.fromCharCode(charCodeOfA + i));
+ }
+ return indexList;
+};
+VantComponent({
+ relation: useChildren('index-anchor', function () {
+ this.updateData();
+ }),
+ props: {
+ sticky: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ highlightColor: {
+ type: String,
+ value: GREEN,
+ },
+ stickyOffsetTop: {
+ type: Number,
+ value: 0,
+ },
+ indexList: {
+ type: Array,
+ value: indexList(),
+ },
+ },
+ mixins: [
+ pageScrollMixin(function (event) {
+ this.scrollTop =
+ (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;
+ this.onScroll();
+ }),
+ ],
+ data: {
+ activeAnchorIndex: null,
+ showSidebar: false,
+ },
+ created() {
+ this.scrollTop = 0;
+ },
+ methods: {
+ updateData() {
+ wx.nextTick(() => {
+ if (this.timer != null) {
+ clearTimeout(this.timer);
+ }
+ this.timer = setTimeout(() => {
+ this.setData({
+ showSidebar: !!this.children.length,
+ });
+ this.setRect().then(() => {
+ this.onScroll();
+ });
+ }, 0);
+ });
+ },
+ setRect() {
+ return Promise.all([
+ this.setAnchorsRect(),
+ this.setListRect(),
+ this.setSiderbarRect(),
+ ]);
+ },
+ setAnchorsRect() {
+ return Promise.all(
+ this.children.map((anchor) =>
+ getRect(anchor, '.van-index-anchor-wrapper').then((rect) => {
+ Object.assign(anchor, {
+ height: rect.height,
+ top: rect.top + this.scrollTop,
+ });
+ })
+ )
+ );
+ },
+ setListRect() {
+ return getRect(this, '.van-index-bar').then((rect) => {
+ Object.assign(this, {
+ height: rect.height,
+ top: rect.top + this.scrollTop,
+ });
+ });
+ },
+ setSiderbarRect() {
+ return getRect(this, '.van-index-bar__sidebar').then((res) => {
+ this.sidebar = {
+ height: res.height,
+ top: res.top,
+ };
+ });
+ },
+ setDiffData({ target, data }) {
+ const diffData = {};
+ Object.keys(data).forEach((key) => {
+ if (target.data[key] !== data[key]) {
+ diffData[key] = data[key];
+ }
+ });
+ if (Object.keys(diffData).length) {
+ target.setData(diffData);
+ }
+ },
+ getAnchorRect(anchor) {
+ return getRect(anchor, '.van-index-anchor-wrapper').then((rect) => ({
+ height: rect.height,
+ top: rect.top,
+ }));
+ },
+ getActiveAnchorIndex() {
+ const { children, scrollTop } = this;
+ const { sticky, stickyOffsetTop } = this.data;
+ for (let i = this.children.length - 1; i >= 0; i--) {
+ const preAnchorHeight = i > 0 ? children[i - 1].height : 0;
+ const reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;
+ if (reachTop + scrollTop >= children[i].top) {
+ return i;
+ }
+ }
+ return -1;
+ },
+ onScroll() {
+ const { children = [], scrollTop } = this;
+ if (!children.length) {
+ return;
+ }
+ const { sticky, stickyOffsetTop, zIndex, highlightColor } = this.data;
+ const active = this.getActiveAnchorIndex();
+ this.setDiffData({
+ target: this,
+ data: {
+ activeAnchorIndex: active,
+ },
+ });
+ if (sticky) {
+ let isActiveAnchorSticky = false;
+ if (active !== -1) {
+ isActiveAnchorSticky =
+ children[active].top <= stickyOffsetTop + scrollTop;
+ }
+ children.forEach((item, index) => {
+ if (index === active) {
+ let wrapperStyle = '';
+ let anchorStyle = `
+ color: ${highlightColor};
+ `;
+ if (isActiveAnchorSticky) {
+ wrapperStyle = `
+ height: ${children[index].height}px;
+ `;
+ anchorStyle = `
+ position: fixed;
+ top: ${stickyOffsetTop}px;
+ z-index: ${zIndex};
+ color: ${highlightColor};
+ `;
+ }
+ this.setDiffData({
+ target: item,
+ data: {
+ active: true,
+ anchorStyle,
+ wrapperStyle,
+ },
+ });
+ } else if (index === active - 1) {
+ const currentAnchor = children[index];
+ const currentOffsetTop = currentAnchor.top;
+ const targetOffsetTop =
+ index === children.length - 1
+ ? this.top
+ : children[index + 1].top;
+ const parentOffsetHeight = targetOffsetTop - currentOffsetTop;
+ const translateY = parentOffsetHeight - currentAnchor.height;
+ const anchorStyle = `
+ position: relative;
+ transform: translate3d(0, ${translateY}px, 0);
+ z-index: ${zIndex};
+ color: ${highlightColor};
+ `;
+ this.setDiffData({
+ target: item,
+ data: {
+ active: true,
+ anchorStyle,
+ },
+ });
+ } else {
+ this.setDiffData({
+ target: item,
+ data: {
+ active: false,
+ anchorStyle: '',
+ wrapperStyle: '',
+ },
+ });
+ }
+ });
+ }
+ },
+ onClick(event) {
+ this.scrollToAnchor(event.target.dataset.index);
+ },
+ onTouchMove(event) {
+ const sidebarLength = this.children.length;
+ const touch = event.touches[0];
+ const itemHeight = this.sidebar.height / sidebarLength;
+ let index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);
+ if (index < 0) {
+ index = 0;
+ } else if (index > sidebarLength - 1) {
+ index = sidebarLength - 1;
+ }
+ this.scrollToAnchor(index);
+ },
+ onTouchStop() {
+ this.scrollToAnchorIndex = null;
+ },
+ scrollToAnchor(index) {
+ if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {
+ return;
+ }
+ this.scrollToAnchorIndex = index;
+ const anchor = this.children.find(
+ (item) => item.data.index === this.data.indexList[index]
+ );
+ if (anchor) {
+ anchor.scrollIntoView(this.scrollTop);
+ this.$emit('select', anchor.data.index);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.wxml
new file mode 100644
index 00000000..19a59cf9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.wxss
new file mode 100644
index 00000000..dba5dc07
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/index-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{position:fixed;top:50%;right:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-weight:500;padding:0 4px 0 16px;padding:0 var(--padding-base,4px) 0 var(--padding-md,16px);font-size:10px;font-size:var(--index-bar-index-font-size,10px);line-height:14px;line-height:var(--index-bar-index-line-height,14px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.js
new file mode 100644
index 00000000..489f39cb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.js
@@ -0,0 +1,8 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ dot: Boolean,
+ info: null,
+ customStyle: String,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.wxml
new file mode 100644
index 00000000..b39b5245
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.wxml
@@ -0,0 +1,7 @@
+
+
+{{ dot ? '' : info }}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.wxss
new file mode 100644
index 00000000..953136a5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/info/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;white-space:nowrap;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;height:16px;height:var(--info-size,16px);min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:-apple-system-font,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,-apple-system-font,Helvetica Neue,Arial,sans-serif);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.js
new file mode 100644
index 00000000..2049447c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.js
@@ -0,0 +1,16 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ color: String,
+ vertical: Boolean,
+ type: {
+ type: String,
+ value: 'circular',
+ },
+ size: String,
+ textSize: String,
+ },
+ data: {
+ array12: Array.from({ length: 12 }),
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxml
new file mode 100644
index 00000000..7d4a5397
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxs
new file mode 100644
index 00000000..02a0b800
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxs
@@ -0,0 +1,22 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function spinnerStyle(data) {
+ return style({
+ color: data.color,
+ width: addUnit(data.size),
+ height: addUnit(data.size),
+ });
+}
+
+function textStyle(data) {
+ return style({
+ 'font-size': addUnit(data.textSize),
+ });
+}
+
+module.exports = {
+ spinnerStyle: spinnerStyle,
+ textStyle: textStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxss
new file mode 100644
index 00000000..f28a6b46
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/loading/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/basic.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/basic.d.ts
new file mode 100644
index 00000000..b2733690
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/basic.d.ts
@@ -0,0 +1 @@
+export declare const basic: string;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/basic.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/basic.js
new file mode 100644
index 00000000..9c59dc30
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/basic.js
@@ -0,0 +1,11 @@
+export const basic = Behavior({
+ methods: {
+ $emit(name, detail, options) {
+ this.triggerEvent(name, detail, options);
+ },
+ set(data) {
+ this.setData(data);
+ return new Promise((resolve) => wx.nextTick(resolve));
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/button.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/button.d.ts
new file mode 100644
index 00000000..b51db875
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/button.d.ts
@@ -0,0 +1 @@
+export declare const button: string;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/button.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/button.js
new file mode 100644
index 00000000..320b561e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/button.js
@@ -0,0 +1,41 @@
+import { canIUseGetUserProfile } from '../common/version';
+export const button = Behavior({
+ externalClasses: ['hover-class'],
+ properties: {
+ id: String,
+ lang: String,
+ businessId: Number,
+ sessionFrom: String,
+ sendMessageTitle: String,
+ sendMessagePath: String,
+ sendMessageImg: String,
+ showMessageCard: Boolean,
+ appParameter: String,
+ ariaLabel: String,
+ openType: String,
+ getUserProfileDesc: String,
+ },
+ data: {
+ canIUseGetUserProfile: canIUseGetUserProfile(),
+ },
+ methods: {
+ onGetUserInfo(event) {
+ this.triggerEvent('getuserinfo', event.detail);
+ },
+ onContact(event) {
+ this.triggerEvent('contact', event.detail);
+ },
+ onGetPhoneNumber(event) {
+ this.triggerEvent('getphonenumber', event.detail);
+ },
+ onError(event) {
+ this.triggerEvent('error', event.detail);
+ },
+ onLaunchApp(event) {
+ this.triggerEvent('launchapp', event.detail);
+ },
+ onOpenSetting(event) {
+ this.triggerEvent('opensetting', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/link.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/link.d.ts
new file mode 100644
index 00000000..d58043bc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/link.d.ts
@@ -0,0 +1 @@
+export declare const link: string;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/link.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/link.js
new file mode 100644
index 00000000..4612e340
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/link.js
@@ -0,0 +1,24 @@
+export const link = Behavior({
+ properties: {
+ url: String,
+ linkType: {
+ type: String,
+ value: 'navigateTo',
+ },
+ },
+ methods: {
+ jumpLink(urlKey = 'url') {
+ const url = this.data[urlKey];
+ if (url) {
+ if (
+ this.data.linkType === 'navigateTo' &&
+ getCurrentPages().length > 9
+ ) {
+ wx.redirectTo({ url });
+ } else {
+ wx[this.data.linkType]({ url });
+ }
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/page-scroll.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/page-scroll.d.ts
new file mode 100644
index 00000000..a76f542c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/page-scroll.d.ts
@@ -0,0 +1,8 @@
+///
+declare type IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;
+declare type Scroller = (
+ this: WechatMiniprogram.Component.TrivialInstance,
+ event?: IPageScrollOption
+) => void;
+export declare const pageScrollMixin: (scroller: Scroller) => string;
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/page-scroll.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/page-scroll.js
new file mode 100644
index 00000000..9e4a5f36
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/page-scroll.js
@@ -0,0 +1,33 @@
+import { getCurrentPage } from '../common/utils';
+function onPageScroll(event) {
+ const { vanPageScroller = [] } = getCurrentPage();
+ vanPageScroller.forEach((scroller) => {
+ if (typeof scroller === 'function') {
+ // @ts-ignore
+ scroller(event);
+ }
+ });
+}
+export const pageScrollMixin = (scroller) =>
+ Behavior({
+ attached() {
+ const page = getCurrentPage();
+ if (Array.isArray(page.vanPageScroller)) {
+ page.vanPageScroller.push(scroller.bind(this));
+ } else {
+ page.vanPageScroller =
+ typeof page.onPageScroll === 'function'
+ ? [page.onPageScroll.bind(page), scroller.bind(this)]
+ : [scroller.bind(this)];
+ }
+ page.onPageScroll = onPageScroll;
+ },
+ detached() {
+ var _a;
+ const page = getCurrentPage();
+ page.vanPageScroller =
+ ((_a = page.vanPageScroller) === null || _a === void 0
+ ? void 0
+ : _a.filter((item) => item !== scroller)) || [];
+ },
+ });
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/touch.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/touch.d.ts
new file mode 100644
index 00000000..35ee831d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/touch.d.ts
@@ -0,0 +1 @@
+export declare const touch: string;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/touch.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/touch.js
new file mode 100644
index 00000000..c6e94c31
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/touch.js
@@ -0,0 +1,37 @@
+// @ts-nocheck
+const MIN_DISTANCE = 10;
+function getDirection(x, y) {
+ if (x > y && x > MIN_DISTANCE) {
+ return 'horizontal';
+ }
+ if (y > x && y > MIN_DISTANCE) {
+ return 'vertical';
+ }
+ return '';
+}
+export const touch = Behavior({
+ methods: {
+ resetTouchStatus() {
+ this.direction = '';
+ this.deltaX = 0;
+ this.deltaY = 0;
+ this.offsetX = 0;
+ this.offsetY = 0;
+ },
+ touchStart(event) {
+ this.resetTouchStatus();
+ const touch = event.touches[0];
+ this.startX = touch.clientX;
+ this.startY = touch.clientY;
+ },
+ touchMove(event) {
+ const 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);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/transition.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/transition.d.ts
new file mode 100644
index 00000000..dd829e5c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/transition.d.ts
@@ -0,0 +1 @@
+export declare function transition(showDefaultValue: boolean): string;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/transition.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/transition.js
new file mode 100644
index 00000000..3b3ec774
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/mixins/transition.js
@@ -0,0 +1,115 @@
+// @ts-nocheck
+import { requestAnimationFrame } from '../common/utils';
+import { isObj } from '../common/validator';
+const getClassNames = (name) => ({
+ enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`,
+ 'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`,
+ leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`,
+ 'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class`,
+});
+export function transition(showDefaultValue) {
+ return Behavior({
+ properties: {
+ customStyle: String,
+ // @ts-ignore
+ show: {
+ type: Boolean,
+ value: showDefaultValue,
+ observer: 'observeShow',
+ },
+ // @ts-ignore
+ duration: {
+ type: null,
+ value: 300,
+ observer: 'observeDuration',
+ },
+ name: {
+ type: String,
+ value: 'fade',
+ },
+ },
+ data: {
+ type: '',
+ inited: false,
+ display: false,
+ },
+ ready() {
+ if (this.data.show === true) {
+ this.observeShow(true, false);
+ }
+ },
+ methods: {
+ observeShow(value, old) {
+ if (value === old) {
+ return;
+ }
+ value ? this.enter() : this.leave();
+ },
+ enter() {
+ const { duration, name } = this.data;
+ const classNames = getClassNames(name);
+ const currentDuration = isObj(duration) ? duration.enter : duration;
+ this.status = 'enter';
+ this.$emit('before-enter');
+ requestAnimationFrame(() => {
+ if (this.status !== 'enter') {
+ return;
+ }
+ this.$emit('enter');
+ this.setData({
+ inited: true,
+ display: true,
+ classes: classNames.enter,
+ currentDuration,
+ });
+ requestAnimationFrame(() => {
+ if (this.status !== 'enter') {
+ return;
+ }
+ this.transitionEnded = false;
+ this.setData({ classes: classNames['enter-to'] });
+ });
+ });
+ },
+ leave() {
+ if (!this.data.display) {
+ return;
+ }
+ const { duration, name } = this.data;
+ const classNames = getClassNames(name);
+ const currentDuration = isObj(duration) ? duration.leave : duration;
+ this.status = 'leave';
+ this.$emit('before-leave');
+ requestAnimationFrame(() => {
+ if (this.status !== 'leave') {
+ return;
+ }
+ this.$emit('leave');
+ this.setData({
+ classes: classNames.leave,
+ currentDuration,
+ });
+ requestAnimationFrame(() => {
+ if (this.status !== 'leave') {
+ return;
+ }
+ this.transitionEnded = false;
+ setTimeout(() => this.onTransitionEnd(), currentDuration);
+ this.setData({ classes: classNames['leave-to'] });
+ });
+ });
+ },
+ onTransitionEnd() {
+ if (this.transitionEnded) {
+ return;
+ }
+ this.transitionEnded = true;
+ this.$emit(`after-${this.status}`);
+ const { show, display } = this.data;
+ if (!show && display) {
+ this.setData({ display: false });
+ }
+ },
+ },
+ });
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.js
new file mode 100644
index 00000000..b620a5dd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.js
@@ -0,0 +1,65 @@
+import { VantComponent } from '../common/component';
+import { getRect, getSystemInfoSync } from '../common/utils';
+VantComponent({
+ classes: ['title-class'],
+ props: {
+ title: String,
+ fixed: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ placeholder: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ leftText: String,
+ rightText: String,
+ customStyle: String,
+ leftArrow: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ height: 46,
+ },
+ created() {
+ const { statusBarHeight } = getSystemInfoSync();
+ this.setData({
+ statusBarHeight,
+ height: 46 + statusBarHeight,
+ });
+ },
+ mounted() {
+ this.setHeight();
+ },
+ methods: {
+ onClickLeft() {
+ this.$emit('click-left');
+ },
+ onClickRight() {
+ this.$emit('click-right');
+ },
+ setHeight() {
+ if (!this.data.fixed || !this.data.placeholder) {
+ return;
+ }
+ wx.nextTick(() => {
+ getRect(this, '.van-nav-bar').then((res) => {
+ if (res && 'height' in res) {
+ this.setData({ height: res.height });
+ }
+ });
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxml
new file mode 100644
index 00000000..b6405fd5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+ {{ leftText }}
+
+
+
+
+ {{ title }}
+
+
+
+ {{ rightText }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxs
new file mode 100644
index 00000000..55b4158d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function barStyle(data) {
+ return style({
+ 'z-index': data.zIndex,
+ 'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,
+ });
+}
+
+module.exports = {
+ barStyle: barStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxss
new file mode 100644
index 00000000..48e9e3f5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/nav-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-nav-bar{position:relative;text-align:center;-webkit-user-select:none;user-select:none;height:46px;height:var(--nav-bar-height,46px);line-height:46px;line-height:var(--nav-bar-height,46px);background-color:#fff;background-color:var(--nav-bar-background-color,#fff)}.van-nav-bar__content{position:relative;height:100%}.van-nav-bar__text{display:inline-block;vertical-align:middle;margin:0 -16px;margin:0 -var(--padding-md,16px);padding:0 16px;padding:0 var(--padding-md,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__text--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-nav-bar__arrow{vertical-align:middle;font-size:16px!important;font-size:var(--nav-bar-arrow-size,16px)!important;color:#1989fa!important;color:var(--nav-bar-icon-color,#1989fa)!important}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;color:#323233;color:var(--nav-bar-title-text-color,#323233);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--nav-bar-title-font-size,16px)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:14px;font-size:var(--font-size-md,14px)}.van-nav-bar__left{left:16px;left:var(--padding-md,16px)}.van-nav-bar__right{right:16px;right:var(--padding-md,16px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.js
new file mode 100644
index 00000000..5e11c20d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.js
@@ -0,0 +1,123 @@
+import { VantComponent } from '../common/component';
+import { getRect, requestAnimationFrame } from '../common/utils';
+VantComponent({
+ props: {
+ text: {
+ type: String,
+ value: '',
+ observer: 'init',
+ },
+ mode: {
+ type: String,
+ value: '',
+ },
+ url: {
+ type: String,
+ value: '',
+ },
+ openType: {
+ type: String,
+ value: 'navigate',
+ },
+ delay: {
+ type: Number,
+ value: 1,
+ },
+ speed: {
+ type: Number,
+ value: 60,
+ observer: 'init',
+ },
+ scrollable: null,
+ leftIcon: {
+ type: String,
+ value: '',
+ },
+ color: String,
+ backgroundColor: String,
+ background: String,
+ wrapable: Boolean,
+ },
+ data: {
+ show: true,
+ },
+ created() {
+ this.resetAnimation = wx.createAnimation({
+ duration: 0,
+ timingFunction: 'linear',
+ });
+ },
+ destroyed() {
+ this.timer && clearTimeout(this.timer);
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ requestAnimationFrame(() => {
+ Promise.all([
+ getRect(this, '.van-notice-bar__content'),
+ getRect(this, '.van-notice-bar__wrap'),
+ ]).then((rects) => {
+ const [contentRect, wrapRect] = rects;
+ const { speed, scrollable, delay } = this.data;
+ if (
+ contentRect == null ||
+ wrapRect == null ||
+ !contentRect.width ||
+ !wrapRect.width ||
+ scrollable === false
+ ) {
+ return;
+ }
+ if (scrollable || wrapRect.width < contentRect.width) {
+ const duration =
+ ((wrapRect.width + contentRect.width) / speed) * 1000;
+ this.wrapWidth = wrapRect.width;
+ this.contentWidth = contentRect.width;
+ this.duration = duration;
+ this.animation = wx.createAnimation({
+ duration,
+ timingFunction: 'linear',
+ delay,
+ });
+ this.scroll();
+ }
+ });
+ });
+ },
+ scroll() {
+ this.timer && clearTimeout(this.timer);
+ this.timer = null;
+ this.setData({
+ animationData: this.resetAnimation
+ .translateX(this.wrapWidth)
+ .step()
+ .export(),
+ });
+ requestAnimationFrame(() => {
+ this.setData({
+ animationData: this.animation
+ .translateX(-this.contentWidth)
+ .step()
+ .export(),
+ });
+ });
+ this.timer = setTimeout(() => {
+ this.scroll();
+ }, this.duration);
+ },
+ onClickIcon(event) {
+ if (this.data.mode === 'closeable') {
+ this.timer && clearTimeout(this.timer);
+ this.timer = null;
+ this.setData({ show: false });
+ this.$emit('close', event.detail);
+ }
+ },
+ onClick(event) {
+ this.$emit('click', event);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxml
new file mode 100644
index 00000000..9f6ee24f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxs
new file mode 100644
index 00000000..11e6456f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxs
@@ -0,0 +1,15 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style({
+ color: data.color,
+ 'background-color': data.backgroundColor,
+ background: data.background,
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxss
new file mode 100644
index 00000000..6a498587
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notice-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:40px;height:var(--notice-bar-height,40px);padding:0 16px;padding:var(--notice-bar-padding,0 16px);font-size:14px;font-size:var(--notice-bar-font-size,14px);color:#ed6a0c;color:var(--notice-bar-text-color,#ed6a0c);line-height:24px;line-height:var(--notice-bar-line-height,24px);background-color:#fffbe8;background-color:var(--notice-bar-background-color,#fffbe8)}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 16px;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:16px;font-size:var(--notice-bar-icon-size,16px);min-width:22px;min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px}.van-notice-bar__wrap{position:relative;-webkit-flex:1;flex:1;overflow:hidden;height:24px;height:var(--notice-bar-line-height,24px)}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.js
new file mode 100644
index 00000000..fda6a2f6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.js
@@ -0,0 +1,65 @@
+import { VantComponent } from '../common/component';
+import { WHITE } from '../common/color';
+import { getSystemInfoSync } from '../common/utils';
+VantComponent({
+ props: {
+ message: String,
+ background: String,
+ type: {
+ type: String,
+ value: 'danger',
+ },
+ color: {
+ type: String,
+ value: WHITE,
+ },
+ duration: {
+ type: Number,
+ value: 3000,
+ },
+ zIndex: {
+ type: Number,
+ value: 110,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: false,
+ },
+ top: null,
+ },
+ data: {
+ show: false,
+ onOpened: null,
+ onClose: null,
+ onClick: null,
+ },
+ created() {
+ const { statusBarHeight } = getSystemInfoSync();
+ this.setData({ statusBarHeight });
+ },
+ methods: {
+ show() {
+ const { duration, onOpened } = this.data;
+ clearTimeout(this.timer);
+ this.setData({ show: true });
+ wx.nextTick(onOpened);
+ if (duration > 0 && duration !== Infinity) {
+ this.timer = setTimeout(() => {
+ this.hide();
+ }, duration);
+ }
+ },
+ hide() {
+ const { onClose } = this.data;
+ clearTimeout(this.timer);
+ this.setData({ show: false });
+ wx.nextTick(onClose);
+ },
+ onTap(event) {
+ const { onClick } = this.data;
+ if (onClick) {
+ onClick(event.detail);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.json
new file mode 100644
index 00000000..c14a65f6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxml
new file mode 100644
index 00000000..42d913eb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ {{ message }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxs
new file mode 100644
index 00000000..bbb94c28
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxs
@@ -0,0 +1,22 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style({
+ 'z-index': data.zIndex,
+ top: addUnit(data.top),
+ });
+}
+
+function notifyStyle(data) {
+ return style({
+ background: data.background,
+ color: data.color,
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ notifyStyle: notifyStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxss
new file mode 100644
index 00000000..8a7688b3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-notify{text-align:center;word-wrap:break-word;padding:6px 15px;padding:var(--notify-padding,6px 15px);font-size:14px;font-size:var(--notify-font-size,14px);line-height:20px;line-height:var(--notify-line-height,20px)}.van-notify__container{position:fixed;top:0;left:0;box-sizing:border-box;width:100%}.van-notify--primary{background-color:#1989fa;background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:#07c160;background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:#ee0a24;background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:#ff976a;background-color:var(--notify-warning-background-color,#ff976a)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/notify.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/notify.d.ts
new file mode 100644
index 00000000..32f77ad0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/notify.d.ts
@@ -0,0 +1,20 @@
+interface NotifyOptions {
+ type?: 'primary' | 'success' | 'danger' | 'warning';
+ color?: string;
+ zIndex?: number;
+ top?: number;
+ message: string;
+ context?: any;
+ duration?: number;
+ selector?: string;
+ background?: string;
+ safeAreaInsetTop?: boolean;
+ onClick?: () => void;
+ onOpened?: () => void;
+ onClose?: () => void;
+}
+declare function Notify(options: NotifyOptions | string): any;
+declare namespace Notify {
+ var clear: (options?: NotifyOptions | undefined) => void;
+}
+export default Notify;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/notify.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/notify.js
new file mode 100644
index 00000000..ee3c966d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/notify/notify.js
@@ -0,0 +1,52 @@
+import { WHITE } from '../common/color';
+const defaultOptions = {
+ selector: '#van-notify',
+ type: 'danger',
+ message: '',
+ background: '',
+ duration: 3000,
+ zIndex: 110,
+ top: 0,
+ color: WHITE,
+ safeAreaInsetTop: false,
+ onClick: () => {},
+ onOpened: () => {},
+ onClose: () => {},
+};
+function parseOptions(message) {
+ if (message == null) {
+ return {};
+ }
+ return typeof message === 'string' ? { message } : message;
+}
+function getContext() {
+ const pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+export default function Notify(options) {
+ options = Object.assign(
+ Object.assign({}, defaultOptions),
+ parseOptions(options)
+ );
+ const context = options.context || getContext();
+ const notify = context.selectComponent(options.selector);
+ delete options.context;
+ delete options.selector;
+ if (notify) {
+ notify.setData(options);
+ notify.show();
+ return notify;
+ }
+ console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确');
+}
+Notify.clear = function (options) {
+ options = Object.assign(
+ Object.assign({}, defaultOptions),
+ parseOptions(options)
+ );
+ const context = options.context || getContext();
+ const notify = context.selectComponent(options.selector);
+ if (notify) {
+ notify.hide();
+ }
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.js
new file mode 100644
index 00000000..b7094319
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.js
@@ -0,0 +1,22 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ show: Boolean,
+ customStyle: String,
+ duration: {
+ type: null,
+ value: 300,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ },
+ methods: {
+ onClick() {
+ this.$emit('click');
+ },
+ // for prevent touchmove
+ noop() {},
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.json
new file mode 100644
index 00000000..c14a65f6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.wxml
new file mode 100644
index 00000000..9212348b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.wxml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.wxss
new file mode 100644
index 00000000..0f9df0e8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/overlay/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);background-color:var(--overlay-background-color,rgba(0,0,0,.7))}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.js
new file mode 100644
index 00000000..c3e7749f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.js
@@ -0,0 +1,9 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ classes: ['header-class', 'footer-class'],
+ props: {
+ desc: String,
+ title: String,
+ status: String,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.json
new file mode 100644
index 00000000..0e5425cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.wxml
new file mode 100644
index 00000000..1843703b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.wxss
new file mode 100644
index 00000000..3d0a9555
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/panel/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-panel{background:#fff;background:var(--panel-background-color,#fff)}.van-panel__header-value{color:#ee0a24;color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:8px 16px;padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.js
new file mode 100644
index 00000000..d55d2744
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.js
@@ -0,0 +1,124 @@
+import { VantComponent } from '../common/component';
+import { range } from '../common/utils';
+import { isObj } from '../common/validator';
+const DEFAULT_DURATION = 200;
+VantComponent({
+ classes: ['active-class'],
+ props: {
+ valueKey: String,
+ className: String,
+ itemHeight: Number,
+ visibleItemCount: Number,
+ initialOptions: {
+ type: Array,
+ value: [],
+ },
+ defaultIndex: {
+ type: Number,
+ value: 0,
+ observer(value) {
+ this.setIndex(value);
+ },
+ },
+ },
+ data: {
+ startY: 0,
+ offset: 0,
+ duration: 0,
+ startOffset: 0,
+ options: [],
+ currentIndex: 0,
+ },
+ created() {
+ const { defaultIndex, initialOptions } = this.data;
+ this.set({
+ currentIndex: defaultIndex,
+ options: initialOptions,
+ }).then(() => {
+ this.setIndex(defaultIndex);
+ });
+ },
+ methods: {
+ getCount() {
+ return this.data.options.length;
+ },
+ onTouchStart(event) {
+ this.setData({
+ startY: event.touches[0].clientY,
+ startOffset: this.data.offset,
+ duration: 0,
+ });
+ },
+ onTouchMove(event) {
+ const { data } = this;
+ const deltaY = event.touches[0].clientY - data.startY;
+ this.setData({
+ offset: range(
+ data.startOffset + deltaY,
+ -(this.getCount() * data.itemHeight),
+ data.itemHeight
+ ),
+ });
+ },
+ onTouchEnd() {
+ const { data } = this;
+ if (data.offset !== data.startOffset) {
+ this.setData({ duration: DEFAULT_DURATION });
+ const index = range(
+ Math.round(-data.offset / data.itemHeight),
+ 0,
+ this.getCount() - 1
+ );
+ this.setIndex(index, true);
+ }
+ },
+ onClickItem(event) {
+ const { index } = event.currentTarget.dataset;
+ this.setIndex(index, true);
+ },
+ adjustIndex(index) {
+ const { data } = this;
+ const count = this.getCount();
+ index = range(index, 0, count);
+ for (let i = index; i < count; i++) {
+ if (!this.isDisabled(data.options[i])) return i;
+ }
+ for (let i = index - 1; i >= 0; i--) {
+ if (!this.isDisabled(data.options[i])) return i;
+ }
+ },
+ isDisabled(option) {
+ return isObj(option) && option.disabled;
+ },
+ getOptionText(option) {
+ const { data } = this;
+ return isObj(option) && data.valueKey in option
+ ? option[data.valueKey]
+ : option;
+ },
+ setIndex(index, userAction) {
+ const { data } = this;
+ index = this.adjustIndex(index) || 0;
+ const offset = -index * data.itemHeight;
+ if (index !== data.currentIndex) {
+ return this.set({ offset, currentIndex: index }).then(() => {
+ userAction && this.$emit('change', index);
+ });
+ }
+ return this.set({ offset });
+ },
+ setValue(value) {
+ const { options } = this.data;
+ for (let i = 0; i < options.length; i++) {
+ if (this.getOptionText(options[i]) === value) {
+ return this.setIndex(i);
+ }
+ }
+ return Promise.resolve();
+ },
+ getValue() {
+ const { data } = this;
+ return data.options[data.currentIndex];
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxml
new file mode 100644
index 00000000..f2c8da2b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ {{ computed.optionText(option, valueKey) }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxs
new file mode 100644
index 00000000..2d5a6117
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxs
@@ -0,0 +1,36 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function isObj(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function optionText(option, valueKey) {
+ return isObj(option) && option[valueKey] != null ? option[valueKey] : option;
+}
+
+function rootStyle(data) {
+ return style({
+ height: addUnit(data.itemHeight * data.visibleItemCount),
+ });
+}
+
+function wrapperStyle(data) {
+ var offset = addUnit(
+ data.offset + (data.itemHeight * (data.visibleItemCount - 1)) / 2
+ );
+
+ return style({
+ transition: 'transform ' + data.duration + 'ms',
+ 'line-height': addUnit(data.itemHeight),
+ transform: 'translate3d(0, ' + offset + ', 0)',
+ });
+}
+
+module.exports = {
+ optionText: optionText,
+ rootStyle: rootStyle,
+ wrapperStyle: wrapperStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxss
new file mode 100644
index 00000000..c5c69100
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker-column/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker-column{overflow:hidden;text-align:center;color:#000;color:var(--picker-option-text-color,#000);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--picker-option-selected-text-color,#323233)}.van-picker-column__item--disabled{opacity:.3;opacity:var(--picker-option-disabled-opacity,.3)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.js
new file mode 100644
index 00000000..d0ca3025
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.js
@@ -0,0 +1,146 @@
+import { VantComponent } from '../common/component';
+import { pickerProps } from './shared';
+VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: Object.assign(Object.assign({}, pickerProps), {
+ valueKey: {
+ type: String,
+ value: 'text',
+ },
+ toolbarPosition: {
+ type: String,
+ value: 'top',
+ },
+ defaultIndex: {
+ type: Number,
+ value: 0,
+ },
+ columns: {
+ type: Array,
+ value: [],
+ observer(columns = []) {
+ this.simple = columns.length && !columns[0].values;
+ if (Array.isArray(this.children) && this.children.length) {
+ this.setColumns().catch(() => {});
+ }
+ },
+ },
+ }),
+ beforeCreate() {
+ Object.defineProperty(this, 'children', {
+ get: () => this.selectAllComponents('.van-picker__column') || [],
+ });
+ },
+ methods: {
+ noop() {},
+ setColumns() {
+ const { data } = this;
+ const columns = this.simple ? [{ values: data.columns }] : data.columns;
+ const stack = columns.map((column, index) =>
+ this.setColumnValues(index, column.values)
+ );
+ return Promise.all(stack);
+ },
+ emit(event) {
+ const { type } = event.currentTarget.dataset;
+ if (this.simple) {
+ this.$emit(type, {
+ value: this.getColumnValue(0),
+ index: this.getColumnIndex(0),
+ });
+ } else {
+ this.$emit(type, {
+ value: this.getValues(),
+ index: this.getIndexes(),
+ });
+ }
+ },
+ onChange(event) {
+ if (this.simple) {
+ this.$emit('change', {
+ picker: this,
+ value: this.getColumnValue(0),
+ index: this.getColumnIndex(0),
+ });
+ } else {
+ this.$emit('change', {
+ picker: this,
+ value: this.getValues(),
+ index: event.currentTarget.dataset.index,
+ });
+ }
+ },
+ // get column instance by index
+ getColumn(index) {
+ return this.children[index];
+ },
+ // get column value by index
+ getColumnValue(index) {
+ const column = this.getColumn(index);
+ return column && column.getValue();
+ },
+ // set column value by index
+ setColumnValue(index, value) {
+ const column = this.getColumn(index);
+ if (column == null) {
+ return Promise.reject(new Error('setColumnValue: 对应列不存在'));
+ }
+ return column.setValue(value);
+ },
+ // get column option index by column index
+ getColumnIndex(columnIndex) {
+ return (this.getColumn(columnIndex) || {}).data.currentIndex;
+ },
+ // set column option index by column index
+ setColumnIndex(columnIndex, optionIndex) {
+ const column = this.getColumn(columnIndex);
+ if (column == null) {
+ return Promise.reject(new Error('setColumnIndex: 对应列不存在'));
+ }
+ return column.setIndex(optionIndex);
+ },
+ // get options of column by index
+ getColumnValues(index) {
+ return (this.children[index] || {}).data.options;
+ },
+ // set options of column by index
+ setColumnValues(index, options, needReset = true) {
+ const column = this.children[index];
+ if (column == null) {
+ return Promise.reject(new Error('setColumnValues: 对应列不存在'));
+ }
+ const isSame =
+ JSON.stringify(column.data.options) === JSON.stringify(options);
+ if (isSame) {
+ return Promise.resolve();
+ }
+ return column.set({ options }).then(() => {
+ if (needReset) {
+ column.setIndex(0);
+ }
+ });
+ },
+ // get values of all columns
+ getValues() {
+ return this.children.map((child) => child.getValue());
+ },
+ // set values of all columns
+ setValues(values) {
+ const stack = values.map((value, index) =>
+ this.setColumnValue(index, value)
+ );
+ return Promise.all(stack);
+ },
+ // get indexes of all columns
+ getIndexes() {
+ return this.children.map((child) => child.data.currentIndex);
+ },
+ // set indexes of all columns
+ setIndexes(indexes) {
+ const stack = indexes.map((optionIndex, columnIndex) =>
+ this.setColumnIndex(columnIndex, optionIndex)
+ );
+ return Promise.all(stack);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.json
new file mode 100644
index 00000000..2fcec899
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "picker-column": "../picker-column/index",
+ "loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxml
new file mode 100644
index 00000000..dbf12492
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxs
new file mode 100644
index 00000000..0abbd10e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxs
@@ -0,0 +1,42 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+var array = require('../wxs/array.wxs');
+
+function columnsStyle(data) {
+ return style({
+ height: addUnit(data.itemHeight * data.visibleItemCount),
+ });
+}
+
+function maskStyle(data) {
+ return style({
+ 'background-size':
+ '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),
+ });
+}
+
+function frameStyle(data) {
+ return style({
+ height: addUnit(data.itemHeight),
+ });
+}
+
+function columns(columns) {
+ if (!array.isArray(columns)) {
+ return [];
+ }
+
+ if (columns.length && !columns[0].values) {
+ return [{ values: columns }];
+ }
+
+ return columns;
+}
+
+module.exports = {
+ columnsStyle: columnsStyle,
+ frameStyle: frameStyle,
+ maskStyle: maskStyle,
+ columns: columns,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxss
new file mode 100644
index 00000000..f74b164b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;-webkit-user-select:none;user-select:none;background-color:#fff;background-color:var(--picker-background-color,#fff)}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;height:var(--picker-toolbar-height,44px);line-height:44px;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{padding:0 16px;padding:var(--picker-action-padding,0 16px);font-size:14px;font-size:var(--picker-action-font-size,14px)}.van-picker__cancel--hover,.van-picker__confirm--hover{opacity:.7}.van-picker__confirm{color:#576b95;color:var(--picker-confirm-action-color,#576b95)}.van-picker__cancel{color:#969799;color:var(--picker-cancel-action-color,#969799)}.van-picker__title{max-width:50%;text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:hsla(0,0%,100%,.9);background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9))}.van-picker__mask{top:0;left:0;z-index:2;width:100%;height:100%;background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-repeat:no-repeat;background-position:top,bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden}.van-picker__frame,.van-picker__mask{position:absolute;pointer-events:none}.van-picker__frame{top:50%;right:16px;left:16px;z-index:1;-webkit-transform:translateY(-50%);transform:translateY(-50%)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/shared.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/shared.d.ts
new file mode 100644
index 00000000..c5480459
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/shared.d.ts
@@ -0,0 +1,21 @@
+export declare const pickerProps: {
+ title: StringConstructor;
+ loading: BooleanConstructor;
+ showToolbar: BooleanConstructor;
+ cancelButtonText: {
+ type: StringConstructor;
+ value: string;
+ };
+ confirmButtonText: {
+ type: StringConstructor;
+ value: string;
+ };
+ visibleItemCount: {
+ type: NumberConstructor;
+ value: number;
+ };
+ itemHeight: {
+ type: NumberConstructor;
+ value: number;
+ };
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/shared.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/shared.js
new file mode 100644
index 00000000..8531290b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/shared.js
@@ -0,0 +1,21 @@
+export const pickerProps = {
+ title: String,
+ loading: Boolean,
+ showToolbar: Boolean,
+ cancelButtonText: {
+ type: String,
+ value: '取消',
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认',
+ },
+ visibleItemCount: {
+ type: Number,
+ value: 6,
+ },
+ itemHeight: {
+ type: Number,
+ value: 44,
+ },
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/toolbar.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/toolbar.wxml
new file mode 100644
index 00000000..414f6120
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/picker/toolbar.wxml
@@ -0,0 +1,23 @@
+
+
+ {{ cancelButtonText }}
+
+ {{
+ title
+ }}
+
+ {{ confirmButtonText }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.js
new file mode 100644
index 00000000..eb2d43e0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.js
@@ -0,0 +1,84 @@
+import { VantComponent } from '../common/component';
+import { transition } from '../mixins/transition';
+VantComponent({
+ classes: [
+ 'enter-class',
+ 'enter-active-class',
+ 'enter-to-class',
+ 'leave-class',
+ 'leave-active-class',
+ 'leave-to-class',
+ 'close-icon-class',
+ ],
+ mixins: [transition(false)],
+ props: {
+ round: Boolean,
+ closeable: Boolean,
+ customStyle: String,
+ overlayStyle: String,
+ transition: {
+ type: String,
+ observer: 'observeClass',
+ },
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeIcon: {
+ type: String,
+ value: 'cross',
+ },
+ closeIconPosition: {
+ type: String,
+ value: 'top-right',
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ position: {
+ type: String,
+ value: 'center',
+ observer: 'observeClass',
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: false,
+ },
+ },
+ created() {
+ this.observeClass();
+ },
+ methods: {
+ onClickCloseIcon() {
+ this.$emit('close');
+ },
+ onClickOverlay() {
+ this.$emit('click-overlay');
+ if (this.data.closeOnClickOverlay) {
+ this.$emit('close');
+ }
+ },
+ observeClass() {
+ const { transition, position, duration } = this.data;
+ const updateData = {
+ name: transition || position,
+ };
+ if (transition === 'none') {
+ updateData.duration = 0;
+ this.originDuration = duration;
+ } else if (this.originDuration != null) {
+ updateData.duration = this.originDuration;
+ }
+ this.setData(updateData);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.json
new file mode 100644
index 00000000..88a6eab2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-overlay": "../overlay/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxml
new file mode 100644
index 00000000..0be99d46
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxs
new file mode 100644
index 00000000..8d59f245
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function popupStyle(data) {
+ return style([
+ {
+ 'z-index': data.zIndex,
+ '-webkit-transition-duration': data.currentDuration + 'ms',
+ 'transition-duration': data.currentDuration + 'ms',
+ },
+ data.display ? null : 'display: none',
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ popupStyle: popupStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxss
new file mode 100644
index 00000000..a3d6e6fd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/popup/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.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;border-radius:var(--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;border-radius:0 0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:var(--popup-round-border-radius,16px) 0 0 var(--popup-round-border-radius,16px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0;border-radius:var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,16px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.js
new file mode 100644
index 00000000..ee6a0c15
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.js
@@ -0,0 +1,51 @@
+import { VantComponent } from '../common/component';
+import { BLUE } from '../common/color';
+import { getRect } from '../common/utils';
+VantComponent({
+ props: {
+ inactive: Boolean,
+ percentage: {
+ type: Number,
+ observer: 'setLeft',
+ },
+ pivotText: String,
+ pivotColor: String,
+ trackColor: String,
+ showPivot: {
+ type: Boolean,
+ value: true,
+ },
+ color: {
+ type: String,
+ value: BLUE,
+ },
+ textColor: {
+ type: String,
+ value: '#fff',
+ },
+ strokeWidth: {
+ type: null,
+ value: 4,
+ },
+ },
+ data: {
+ right: 0,
+ },
+ mounted() {
+ this.setLeft();
+ },
+ methods: {
+ setLeft() {
+ Promise.all([
+ getRect(this, '.van-progress'),
+ getRect(this, '.van-progress__pivot'),
+ ]).then(([portion, pivot]) => {
+ if (portion && pivot) {
+ this.setData({
+ right: (pivot.width * (this.data.percentage - 100)) / 100,
+ });
+ }
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxml
new file mode 100644
index 00000000..e81514d0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{ computed.pivotText(pivotText, percentage) }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxs
new file mode 100644
index 00000000..5b1e8e6b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxs
@@ -0,0 +1,36 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+var style = require('../wxs/style.wxs');
+
+function pivotText(pivotText, percentage) {
+ return pivotText || percentage + '%';
+}
+
+function rootStyle(data) {
+ return style({
+ 'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',
+ 'background': data.trackColor,
+ });
+}
+
+function portionStyle(data) {
+ return style({
+ background: data.inactive ? '#cacaca' : data.color,
+ width: data.percentage ? data.percentage + '%' : '',
+ });
+}
+
+function pivotStyle(data) {
+ return style({
+ color: data.textColor,
+ right: data.right + 'px',
+ background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,
+ });
+}
+
+module.exports = {
+ pivotText: pivotText,
+ rootStyle: rootStyle,
+ portionStyle: portionStyle,
+ pivotStyle: pivotStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxss
new file mode 100644
index 00000000..3844a59e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/progress/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-progress{position:relative;height:4px;height:var(--progress-height,4px);border-radius:4px;border-radius:var(--progress-height,4px);background:#ebedf0;background:var(--progress-background-color,#ebedf0)}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit;background:#1989fa;background:var(--progress-color,#1989fa)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;text-align:center;word-break:keep-all;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#fff;color:var(--progress-pivot-text-color,#fff);padding:0 5px;padding:var(--progress-pivot-padding,0 5px);font-size:10px;font-size:var(--progress-pivot-font-size,10px);line-height:1.6;line-height:var(--progress-pivot-line-height,1.6);background-color:#1989fa;background-color:var(--progress-pivot-background-color,#1989fa)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.js
new file mode 100644
index 00000000..06db0866
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.js
@@ -0,0 +1,22 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+VantComponent({
+ field: true,
+ relation: useChildren('radio'),
+ props: {
+ value: {
+ type: null,
+ observer: 'updateChildren',
+ },
+ direction: String,
+ disabled: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren() {
+ this.children.forEach((child) => child.updateFromParent());
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.wxml
new file mode 100644
index 00000000..0ab17afc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.wxss
new file mode 100644
index 00000000..df45fd68
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-radio-group--horizontal{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.js
new file mode 100644
index 00000000..8e749996
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.js
@@ -0,0 +1,66 @@
+import { canIUseModel } from '../common/version';
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+VantComponent({
+ field: true,
+ relation: useParent('radio-group', function () {
+ this.updateFromParent();
+ }),
+ classes: ['icon-class', 'label-class'],
+ props: {
+ name: null,
+ value: null,
+ disabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
+ labelPosition: {
+ type: String,
+ value: 'right',
+ },
+ labelDisabled: Boolean,
+ shape: {
+ type: String,
+ value: 'round',
+ },
+ iconSize: {
+ type: null,
+ value: 20,
+ },
+ },
+ data: {
+ direction: '',
+ parentDisabled: false,
+ },
+ methods: {
+ updateFromParent() {
+ if (!this.parent) {
+ return;
+ }
+ const { value, disabled: parentDisabled, direction } = this.parent.data;
+ this.setData({
+ value,
+ direction,
+ parentDisabled,
+ });
+ },
+ emitChange(value) {
+ const instance = this.parent || this;
+ instance.$emit('input', value);
+ instance.$emit('change', value);
+ if (canIUseModel()) {
+ instance.setData({ value });
+ }
+ },
+ onChange() {
+ if (!this.data.disabled && !this.data.parentDisabled) {
+ this.emitChange(this.data.name);
+ }
+ },
+ onClickLabel() {
+ const { disabled, parentDisabled, labelDisabled, name } = this.data;
+ if (!(disabled || parentDisabled) && !labelDisabled) {
+ this.emitChange(name);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxml
new file mode 100644
index 00000000..5f898c0b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxs
new file mode 100644
index 00000000..a428aad9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxs
@@ -0,0 +1,33 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function iconStyle(data) {
+ var styles = {
+ 'font-size': addUnit(data.iconSize),
+ };
+
+ if (
+ data.checkedColor &&
+ !(data.disabled || data.parentDisabled) &&
+ data.value === data.name
+ ) {
+ styles['border-color'] = data.checkedColor;
+ styles['background-color'] = data.checkedColor;
+ }
+
+ return style(styles);
+}
+
+function iconCustomStyle(data) {
+ return style({
+ 'line-height': addUnit(data.iconSize),
+ 'font-size': '.8em',
+ display: 'block',
+ });
+}
+
+module.exports = {
+ iconStyle: iconStyle,
+ iconCustomStyle: iconCustomStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxss
new file mode 100644
index 00000000..602a69e3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/radio/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio--horizontal{margin-right:12px;margin-right:var(--padding-sm,12px)}.van-radio__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.js
new file mode 100644
index 00000000..90d2378c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.js
@@ -0,0 +1,88 @@
+import { getAllRect } from '../common/utils';
+import { VantComponent } from '../common/component';
+import { canIUseModel } from '../common/version';
+VantComponent({
+ field: true,
+ classes: ['icon-class'],
+ props: {
+ value: {
+ type: Number,
+ observer(value) {
+ if (value !== this.data.innerValue) {
+ this.setData({ innerValue: value });
+ }
+ },
+ },
+ readonly: Boolean,
+ disabled: Boolean,
+ allowHalf: Boolean,
+ size: null,
+ icon: {
+ type: String,
+ value: 'star',
+ },
+ voidIcon: {
+ type: String,
+ value: 'star-o',
+ },
+ color: {
+ type: String,
+ value: '#ffd21e',
+ },
+ voidColor: {
+ type: String,
+ value: '#c7c7c7',
+ },
+ disabledColor: {
+ type: String,
+ value: '#bdbdbd',
+ },
+ count: {
+ type: Number,
+ value: 5,
+ observer(value) {
+ this.setData({ innerCountArray: Array.from({ length: value }) });
+ },
+ },
+ gutter: null,
+ touchable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ innerValue: 0,
+ innerCountArray: Array.from({ length: 5 }),
+ },
+ methods: {
+ onSelect(event) {
+ const { data } = this;
+ const { score } = event.currentTarget.dataset;
+ if (!data.disabled && !data.readonly) {
+ this.setData({ innerValue: score + 1 });
+ if (canIUseModel()) {
+ this.setData({ value: score + 1 });
+ }
+ wx.nextTick(() => {
+ this.$emit('input', score + 1);
+ this.$emit('change', score + 1);
+ });
+ }
+ },
+ onTouchMove(event) {
+ const { touchable } = this.data;
+ if (!touchable) return;
+ const { clientX } = event.touches[0];
+ getAllRect(this, '.van-rate__icon').then((list) => {
+ const target = list
+ .sort((cur, next) => cur.dataset.score - next.dataset.score)
+ .find((item) => clientX >= item.left && clientX <= item.right);
+ if (target != null) {
+ this.onSelect(
+ Object.assign(Object.assign({}, event), { currentTarget: target })
+ );
+ }
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.wxml
new file mode 100644
index 00000000..58eee5cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.wxss
new file mode 100644
index 00000000..6fd34354
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/rate/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-rate{display:-webkit-inline-flex;display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;padding:0 2px;padding:0 var(--rate-horizontal-padding,2px)}.van-rate__icon{display:block;height:1em;font-size:20px;font-size:var(--rate-icon-size,20px)}.van-rate__icon--half{position:absolute;top:0;width:.5em;overflow:hidden;left:2px;left:var(--rate-horizontal-padding,2px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.js
new file mode 100644
index 00000000..f2b691bf
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.js
@@ -0,0 +1,23 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+VantComponent({
+ relation: useChildren('col', function (target) {
+ const { gutter } = this.data;
+ if (gutter) {
+ target.setData({ gutter });
+ }
+ }),
+ props: {
+ gutter: {
+ type: Number,
+ observer: 'setGutter',
+ },
+ },
+ methods: {
+ setGutter() {
+ this.children.forEach((col) => {
+ col.setData(this.data);
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxml
new file mode 100644
index 00000000..69a4359b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxs
new file mode 100644
index 00000000..f5c59587
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ if (!data.gutter) {
+ return '';
+ }
+
+ return style({
+ 'margin-right': addUnit(-data.gutter / 2),
+ 'margin-left': addUnit(-data.gutter / 2),
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxss
new file mode 100644
index 00000000..32a098b0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/row/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-row:after{display:table;clear:both;content:""}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.js
new file mode 100644
index 00000000..778d0056
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.js
@@ -0,0 +1,78 @@
+import { VantComponent } from '../common/component';
+import { canIUseModel } from '../common/version';
+VantComponent({
+ field: true,
+ classes: ['field-class', 'input-class', 'cancel-class'],
+ props: {
+ label: String,
+ focus: Boolean,
+ error: Boolean,
+ disabled: Boolean,
+ readonly: Boolean,
+ inputAlign: String,
+ showAction: Boolean,
+ useActionSlot: Boolean,
+ useLeftIconSlot: Boolean,
+ useRightIconSlot: Boolean,
+ leftIcon: {
+ type: String,
+ value: 'search',
+ },
+ rightIcon: String,
+ placeholder: String,
+ placeholderStyle: String,
+ actionText: {
+ type: String,
+ value: '取消',
+ },
+ background: {
+ type: String,
+ value: '#ffffff',
+ },
+ maxlength: {
+ type: Number,
+ value: -1,
+ },
+ shape: {
+ type: String,
+ value: 'square',
+ },
+ clearable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onChange(event) {
+ if (canIUseModel()) {
+ this.setData({ value: event.detail });
+ }
+ this.$emit('change', event.detail);
+ },
+ onCancel() {
+ /**
+ * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
+ * https://github.com/youzan/@vant/weapp/issues/1768
+ */
+ setTimeout(() => {
+ if (canIUseModel()) {
+ this.setData({ value: '' });
+ }
+ this.$emit('cancel');
+ this.$emit('change', '');
+ }, 200);
+ },
+ onSearch(event) {
+ this.$emit('search', event.detail);
+ },
+ onFocus(event) {
+ this.$emit('focus', event.detail);
+ },
+ onBlur(event) {
+ this.$emit('blur', event.detail);
+ },
+ onClear(event) {
+ this.$emit('clear', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.json
new file mode 100644
index 00000000..b4cfe918
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-field": "../field/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.wxml
new file mode 100644
index 00000000..1d0e6f1f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+ {{ actionText }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.wxss
new file mode 100644
index 00000000..c918deb8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/search/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:12px;padding-left:var(--padding-sm,12px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.js
new file mode 100644
index 00000000..27d0c7be
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.js
@@ -0,0 +1,55 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ // whether to show popup
+ show: Boolean,
+ // overlay custom style
+ overlayStyle: Object,
+ // z-index
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ title: String,
+ cancelText: {
+ type: String,
+ value: '取消',
+ },
+ description: String,
+ options: {
+ type: Array,
+ value: [],
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ duration: {
+ type: null,
+ value: 300,
+ },
+ },
+ methods: {
+ onClickOverlay() {
+ this.$emit('click-overlay');
+ },
+ onCancel() {
+ this.onClose();
+ this.$emit('cancel');
+ },
+ onSelect(event) {
+ this.$emit('select', event.detail);
+ },
+ onClose() {
+ this.$emit('close');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.json
new file mode 100644
index 00000000..15a7c224
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "options": "./options"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxml
new file mode 100644
index 00000000..cefc3af4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxs
new file mode 100644
index 00000000..2149ee9e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+function isMulti(options) {
+ if (options == null || options[0] == null) {
+ return false;
+ }
+
+ return "Array" === options.constructor && "Array" === options[0].constructor;
+}
+
+module.exports = {
+ isMulti: isMulti
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxss
new file mode 100644
index 00000000..8d42eb27
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-share-sheet__header{padding:12px 16px 4px;text-align:center}.van-share-sheet__title{margin-top:8px;color:#323233;font-weight:400;font-size:14px;line-height:20px}.van-share-sheet__title:empty,.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{display:block;margin-top:8px;color:#969799;font-size:12px;line-height:16px}.van-share-sheet__description:empty,.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{display:block;box-sizing:initial;width:100%;height:auto;padding:0;font-size:16px;line-height:48px;text-align:center;background:#fff;border:none}.van-share-sheet__cancel:before{display:block;height:8px;background-color:#f7f8fa;content:" "}.van-share-sheet__cancel:after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.js
new file mode 100644
index 00000000..c1bd03b2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.js
@@ -0,0 +1,14 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ options: Array,
+ showBorder: Boolean,
+ },
+ methods: {
+ onSelect(event) {
+ const { index } = event.currentTarget.dataset;
+ const option = this.data.options[index];
+ this.$emit('select', Object.assign(Object.assign({}, option), { index }));
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxml
new file mode 100644
index 00000000..cad68377
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{ item.name }}
+
+ {{ item.description }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxs
new file mode 100644
index 00000000..ab6033b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var PRESET_ICONS = ['qq', 'weibo', 'wechat', 'link', 'qrcode', 'poster'];
+
+function getIconURL(icon) {
+ if (PRESET_ICONS.indexOf(icon) !== -1) {
+ return 'https://img.yzcdn.cn/vant/share-icon-' + icon + '.png';
+ }
+
+ return icon;
+}
+
+module.exports = {
+ getIconURL: getIconURL,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxss
new file mode 100644
index 00000000..ca7b02f2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/share-sheet/options.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-share-sheet__options{position:relative;display:-webkit-flex;display:flex;padding:16px 0 16px 8px;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border:before{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:0;right:0;left:16px;border-top:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{height:auto;padding:0;line-height:inherit;background-color:initial;border:0}.van-share-sheet__button:after{border:0}.van-share-sheet__icon{width:48px;height:48px;margin:0 16px}.van-share-sheet__name{margin-top:8px;padding:0 4px;color:#646566;font-size:12px}.van-share-sheet__option-description{padding:0 4px;color:#c8c9cc;font-size:12px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.js
new file mode 100644
index 00000000..042db596
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.js
@@ -0,0 +1,29 @@
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+VantComponent({
+ classes: ['active-class', 'disabled-class'],
+ relation: useParent('sidebar'),
+ props: {
+ dot: Boolean,
+ badge: null,
+ info: null,
+ title: String,
+ disabled: Boolean,
+ },
+ methods: {
+ onClick() {
+ const { parent } = this;
+ if (!parent || this.data.disabled) {
+ return;
+ }
+ const index = parent.children.indexOf(this);
+ parent.setActive(index).then(() => {
+ this.$emit('click', index);
+ parent.$emit('change', index);
+ });
+ },
+ setActive(selected) {
+ return this.setData({ selected });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.json
new file mode 100644
index 00000000..bf0ebe00
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.wxml
new file mode 100644
index 00000000..c5c08a62
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.wxml
@@ -0,0 +1,18 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.wxss
new file mode 100644
index 00000000..f134528f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.js
new file mode 100644
index 00000000..e4445330
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.js
@@ -0,0 +1,34 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+VantComponent({
+ relation: useChildren('sidebar-item', function () {
+ this.setActive(this.data.activeKey);
+ }),
+ props: {
+ activeKey: {
+ type: Number,
+ value: 0,
+ observer: 'setActive',
+ },
+ },
+ beforeCreate() {
+ this.currentActive = -1;
+ },
+ methods: {
+ setActive(activeKey) {
+ const { children, currentActive } = this;
+ if (!children.length) {
+ return Promise.resolve();
+ }
+ this.currentActive = activeKey;
+ const stack = [];
+ if (currentActive !== activeKey && children[currentActive]) {
+ stack.push(children[currentActive].setActive(false));
+ }
+ if (children[activeKey]) {
+ stack.push(children[activeKey].setActive(true));
+ }
+ return Promise.all(stack);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.wxml
new file mode 100644
index 00000000..96b11c71
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.wxml
@@ -0,0 +1,3 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.wxss
new file mode 100644
index 00000000..8ad18841
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sidebar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sidebar{width:80px;width:var(--sidebar-width,80px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.js
new file mode 100644
index 00000000..aab922d0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.js
@@ -0,0 +1,46 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ classes: ['avatar-class', 'title-class', 'row-class'],
+ props: {
+ row: {
+ type: Number,
+ value: 0,
+ observer(value) {
+ this.setData({ rowArray: Array.from({ length: value }) });
+ },
+ },
+ title: Boolean,
+ avatar: Boolean,
+ loading: {
+ type: Boolean,
+ value: true,
+ },
+ animate: {
+ type: Boolean,
+ value: true,
+ },
+ avatarSize: {
+ type: String,
+ value: '32px',
+ },
+ avatarShape: {
+ type: String,
+ value: 'round',
+ },
+ titleWidth: {
+ type: String,
+ value: '40%',
+ },
+ rowWidth: {
+ type: null,
+ value: '100%',
+ observer(val) {
+ this.setData({ isArray: val instanceof Array });
+ },
+ },
+ },
+ data: {
+ isArray: false,
+ rowArray: [],
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.json
new file mode 100644
index 00000000..a89ef4db
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.wxml
new file mode 100644
index 00000000..058e2efd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.wxml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.wxss
new file mode 100644
index 00000000..565b26e4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/skeleton/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-skeleton{display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:0 16px;padding:var(--skeleton-padding,0 16px)}.van-skeleton__avatar{-webkit-flex-shrink:0;flex-shrink:0;margin-right:16px;margin-right:var(--padding-md,16px);background-color:#f2f3f5;background-color:var(--skeleton-avatar-background-color,#f2f3f5)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{-webkit-flex:1;flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:8px;padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{height:16px;height:var(--skeleton-row-height,16px);background-color:#f2f3f5;background-color:var(--skeleton-row-background-color,#f2f3f5)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:12px;margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{-webkit-animation:van-skeleton-blink 1.2s ease-in-out infinite;animation:van-skeleton-blink 1.2s ease-in-out infinite}@-webkit-keyframes van-skeleton-blink{50%{opacity:.6}}@keyframes van-skeleton-blink{50%{opacity:.6}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.js
new file mode 100644
index 00000000..36291e71
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.js
@@ -0,0 +1,107 @@
+import { VantComponent } from '../common/component';
+import { touch } from '../mixins/touch';
+import { canIUseModel } from '../common/version';
+import { getRect } from '../common/utils';
+VantComponent({
+ mixins: [touch],
+ props: {
+ disabled: Boolean,
+ useButtonSlot: Boolean,
+ activeColor: String,
+ inactiveColor: String,
+ max: {
+ type: Number,
+ value: 100,
+ },
+ min: {
+ type: Number,
+ value: 0,
+ },
+ step: {
+ type: Number,
+ value: 1,
+ },
+ value: {
+ type: Number,
+ value: 0,
+ observer(val) {
+ if (val !== this.value) {
+ this.updateValue(val);
+ }
+ },
+ },
+ barHeight: {
+ type: null,
+ value: 2,
+ },
+ },
+ created() {
+ this.updateValue(this.data.value);
+ },
+ methods: {
+ onTouchStart(event) {
+ if (this.data.disabled) return;
+ this.touchStart(event);
+ this.startValue = this.format(this.value);
+ this.dragStatus = 'start';
+ },
+ onTouchMove(event) {
+ if (this.data.disabled) return;
+ if (this.dragStatus === 'start') {
+ this.$emit('drag-start');
+ }
+ this.touchMove(event);
+ this.dragStatus = 'draging';
+ getRect(this, '.van-slider').then((rect) => {
+ const diff = (this.deltaX / rect.width) * this.getRange();
+ this.newValue = this.startValue + diff;
+ this.updateValue(this.newValue, false, true);
+ });
+ },
+ onTouchEnd() {
+ if (this.data.disabled) return;
+ if (this.dragStatus === 'draging') {
+ this.updateValue(this.newValue, true);
+ this.$emit('drag-end');
+ }
+ },
+ onClick(event) {
+ if (this.data.disabled) return;
+ const { min } = this.data;
+ getRect(this, '.van-slider').then((rect) => {
+ const value =
+ ((event.detail.x - rect.left) / rect.width) * this.getRange() + min;
+ this.updateValue(value, true);
+ });
+ },
+ updateValue(value, end, drag) {
+ value = this.format(value);
+ const { min } = this.data;
+ const width = `${((value - min) * 100) / this.getRange()}%`;
+ this.value = value;
+ this.setData({
+ barStyle: `
+ width: ${width};
+ ${drag ? 'transition: none;' : ''}
+ `,
+ });
+ if (drag) {
+ this.$emit('drag', { value });
+ }
+ if (end) {
+ this.$emit('change', value);
+ }
+ if ((drag || end) && canIUseModel()) {
+ this.setData({ value });
+ }
+ },
+ getRange() {
+ const { max, min } = this.data;
+ return max - min;
+ },
+ format(value) {
+ const { max, min, step } = this.data;
+ return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxml
new file mode 100644
index 00000000..6a430f38
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxs
new file mode 100644
index 00000000..7c43e6e5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function barStyle(barHeight, activeColor) {
+ return style({
+ height: addUnit(barHeight),
+ background: activeColor,
+ });
+}
+
+module.exports = {
+ barStyle: barStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxss
new file mode 100644
index 00000000..7886b606
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/slider/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;border-radius:var(--border-radius-max,999px);background-color:#ebedf0;background-color:var(--slider-inactive-background-color,#ebedf0)}.van-slider:before{position:absolute;right:0;left:0;content:"";top:-8px;top:-var(--padding-xs,8px);bottom:-8px;bottom:-var(--padding-xs,8px)}.van-slider__bar{position:relative;border-radius:inherit;transition:width .2s;transition:width var(--animation-duration-fast,.2s);background-color:#1989fa;background-color:var(--slider-active-background-color,#1989fa)}.van-slider__button{width:24px;height:24px;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.5);background-color:#fff;background-color:var(--slider-button-background-color,#fff)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider--disabled{opacity:.5}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.js
new file mode 100644
index 00000000..6ea0da54
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.js
@@ -0,0 +1,194 @@
+import { VantComponent } from '../common/component';
+import { isDef } from '../common/validator';
+const LONG_PRESS_START_TIME = 600;
+const LONG_PRESS_INTERVAL = 200;
+// add num and avoid float number
+function add(num1, num2) {
+ const cardinal = Math.pow(10, 10);
+ return Math.round((num1 + num2) * cardinal) / cardinal;
+}
+function equal(value1, value2) {
+ return String(value1) === String(value2);
+}
+VantComponent({
+ field: true,
+ classes: ['input-class', 'plus-class', 'minus-class'],
+ props: {
+ value: {
+ type: null,
+ observer: 'observeValue',
+ },
+ integer: {
+ type: Boolean,
+ observer: 'check',
+ },
+ disabled: Boolean,
+ inputWidth: String,
+ buttonSize: String,
+ asyncChange: Boolean,
+ disableInput: Boolean,
+ decimalLength: {
+ type: Number,
+ value: null,
+ observer: 'check',
+ },
+ min: {
+ type: null,
+ value: 1,
+ observer: 'check',
+ },
+ max: {
+ type: null,
+ value: Number.MAX_SAFE_INTEGER,
+ observer: 'check',
+ },
+ step: {
+ type: null,
+ value: 1,
+ },
+ showPlus: {
+ type: Boolean,
+ value: true,
+ },
+ showMinus: {
+ type: Boolean,
+ value: true,
+ },
+ disablePlus: Boolean,
+ disableMinus: Boolean,
+ longPress: {
+ type: Boolean,
+ value: true,
+ },
+ theme: String,
+ },
+ data: {
+ currentValue: '',
+ },
+ created() {
+ this.setData({
+ currentValue: this.format(this.data.value),
+ });
+ },
+ methods: {
+ observeValue() {
+ const { value, currentValue } = this.data;
+ if (!equal(value, currentValue)) {
+ this.setData({ currentValue: this.format(value) });
+ }
+ },
+ check() {
+ const val = this.format(this.data.currentValue);
+ if (!equal(val, this.data.currentValue)) {
+ this.setData({ currentValue: val });
+ }
+ },
+ isDisabled(type) {
+ const {
+ disabled,
+ disablePlus,
+ disableMinus,
+ currentValue,
+ max,
+ min,
+ } = this.data;
+ if (type === 'plus') {
+ return disabled || disablePlus || currentValue >= max;
+ }
+ return disabled || disableMinus || currentValue <= min;
+ },
+ onFocus(event) {
+ this.$emit('focus', event.detail);
+ },
+ onBlur(event) {
+ const value = this.format(event.detail.value);
+ this.emitChange(value);
+ this.$emit(
+ 'blur',
+ Object.assign(Object.assign({}, event.detail), { value })
+ );
+ },
+ // filter illegal characters
+ filter(value) {
+ value = String(value).replace(/[^0-9.-]/g, '');
+ if (this.data.integer && value.indexOf('.') !== -1) {
+ value = value.split('.')[0];
+ }
+ return value;
+ },
+ // limit value range
+ format(value) {
+ value = this.filter(value);
+ // format range
+ value = value === '' ? 0 : +value;
+ value = Math.max(Math.min(this.data.max, value), this.data.min);
+ // format decimal
+ if (isDef(this.data.decimalLength)) {
+ value = value.toFixed(this.data.decimalLength);
+ }
+ return value;
+ },
+ onInput(event) {
+ const { value = '' } = event.detail || {};
+ // allow input to be empty
+ if (value === '') {
+ return;
+ }
+ let formatted = this.filter(value);
+ // limit max decimal length
+ if (isDef(this.data.decimalLength) && formatted.indexOf('.') !== -1) {
+ const pair = formatted.split('.');
+ formatted = `${pair[0]}.${pair[1].slice(0, this.data.decimalLength)}`;
+ }
+ this.emitChange(formatted);
+ },
+ emitChange(value) {
+ if (!this.data.asyncChange) {
+ this.setData({ currentValue: value });
+ }
+ this.$emit('change', value);
+ },
+ onChange() {
+ const { type } = this;
+ if (this.isDisabled(type)) {
+ this.$emit('overlimit', type);
+ return;
+ }
+ const diff = type === 'minus' ? -this.data.step : +this.data.step;
+ const value = this.format(add(+this.data.currentValue, diff));
+ this.emitChange(value);
+ this.$emit(type);
+ },
+ longPressStep() {
+ this.longPressTimer = setTimeout(() => {
+ this.onChange();
+ this.longPressStep();
+ }, LONG_PRESS_INTERVAL);
+ },
+ onTap(event) {
+ const { type } = event.currentTarget.dataset;
+ this.type = type;
+ this.onChange();
+ },
+ onTouchStart(event) {
+ if (!this.data.longPress) {
+ return;
+ }
+ clearTimeout(this.longPressTimer);
+ const { type } = event.currentTarget.dataset;
+ this.type = type;
+ this.isLongPress = false;
+ this.longPressTimer = setTimeout(() => {
+ this.isLongPress = true;
+ this.onChange();
+ this.longPressStep();
+ }, LONG_PRESS_START_TIME);
+ },
+ onTouchEnd() {
+ if (!this.data.longPress) {
+ return;
+ }
+ clearTimeout(this.longPressTimer);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxml
new file mode 100644
index 00000000..b49140e5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxs
new file mode 100644
index 00000000..a13e818b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxs
@@ -0,0 +1,22 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function buttonStyle(data) {
+ return style({
+ width: addUnit(data.buttonSize),
+ height: addUnit(data.buttonSize),
+ });
+}
+
+function inputStyle(data) {
+ return style({
+ width: addUnit(data.inputWidth),
+ height: addUnit(data.buttonSize),
+ });
+}
+
+module.exports = {
+ buttonStyle: buttonStyle,
+ inputStyle: inputStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxss
new file mode 100644
index 00000000..e924a2b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/stepper/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;box-sizing:border-box;margin:1px;vertical-align:middle;border:0;background-color:#f2f3f5;background-color:var(--stepper-background-color,#f2f3f5);color:#323233;color:var(--stepper-button-icon-color,#323233);width:28px;width:var(--stepper-input-height,28px);height:28px;height:var(--stepper-input-height,28px);padding:4px;padding:var(--padding-base,4px)}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:empty.van-stepper__minus:after,.van-stepper__minus:empty.van-stepper__minus:before,.van-stepper__minus:empty.van-stepper__plus:after,.van-stepper__minus:empty.van-stepper__plus:before,.van-stepper__plus:empty.van-stepper__minus:after,.van-stepper__plus:empty.van-stepper__minus:before,.van-stepper__plus:empty.van-stepper__plus:after,.van-stepper__plus:empty.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:currentColor;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8;background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:#c8c9cc;color:var(--stepper-button-disabled-icon-color,#c8c9cc)}.van-stepper__minus--disabled,.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa;background-color:var(--stepper-button-disabled-color,#f7f8fa)}.van-stepper__minus{border-radius:4px 0 0 4px;border-radius:var(--stepper-border-radius,4px) 0 0 var(--stepper-border-radius,4px)}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0;border-radius:0 var(--stepper-border-radius,4px) var(--stepper-border-radius,4px) 0}.van-stepper--round .van-stepper__input{background-color:initial!important}.van-stepper--round .van-stepper__minus,.van-stepper--round .van-stepper__plus{border-radius:100%}.van-stepper--round .van-stepper__minus:active,.van-stepper--round .van-stepper__plus:active{opacity:.7}.van-stepper--round .van-stepper__minus--disabled,.van-stepper--round .van-stepper__minus--disabled:active,.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__plus--disabled:active{opacity:.3}.van-stepper--round .van-stepper__plus{color:#fff;background-color:#ee0a24}.van-stepper--round .van-stepper__minus{color:#ee0a24;background-color:#fff;border:1px solid #ee0a24}.van-stepper__input{display:inline-block;box-sizing:border-box;min-height:0;margin:1px;padding:1px;text-align:center;vertical-align:middle;border:0;border-width:1px 0;border-radius:0;-webkit-appearance:none;font-size:14px;font-size:var(--stepper-input-font-size,14px);color:#323233;color:var(--stepper-input-text-color,#323233);background-color:#f2f3f5;background-color:var(--stepper-background-color,#f2f3f5);width:32px;width:var(--stepper-input-width,32px);height:28px;height:var(--stepper-input-height,28px)}.van-stepper__input--disabled{color:#c8c9cc;color:var(--stepper-input-disabled-text-color,#c8c9cc);background-color:#f2f3f5;background-color:var(--stepper-input-disabled-background-color,#f2f3f5)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.js
new file mode 100644
index 00000000..a89ed4a8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.js
@@ -0,0 +1,33 @@
+import { VantComponent } from '../common/component';
+import { GREEN, GRAY_DARK } from '../common/color';
+VantComponent({
+ classes: ['desc-class'],
+ props: {
+ icon: String,
+ steps: Array,
+ active: Number,
+ direction: {
+ type: String,
+ value: 'horizontal',
+ },
+ activeColor: {
+ type: String,
+ value: GREEN,
+ },
+ inactiveColor: {
+ type: String,
+ value: GRAY_DARK,
+ },
+ activeIcon: {
+ type: String,
+ value: 'checked',
+ },
+ inactiveIcon: String,
+ },
+ methods: {
+ onClick(event) {
+ const { index } = event.currentTarget.dataset;
+ this.$emit('click-step', index);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.wxml
new file mode 100644
index 00000000..6180b417
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.wxml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ {{ item.text }}
+ {{ item.desc }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+function get(index, active) {
+ if (index < active) {
+ return 'finish';
+ } else if (index === active) {
+ return 'process';
+ }
+
+ return 'inactive';
+}
+
+module.exports = get;
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.wxss
new file mode 100644
index 00000000..2c50b1ab
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/steps/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.js
new file mode 100644
index 00000000..23aa7eaa
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.js
@@ -0,0 +1,113 @@
+import { getRect } from '../common/utils';
+import { VantComponent } from '../common/component';
+import { pageScrollMixin } from '../mixins/page-scroll';
+const ROOT_ELEMENT = '.van-sticky';
+VantComponent({
+ props: {
+ zIndex: {
+ type: Number,
+ value: 99,
+ },
+ offsetTop: {
+ type: Number,
+ value: 0,
+ observer: 'onScroll',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'onScroll',
+ },
+ container: {
+ type: null,
+ observer: 'onScroll',
+ },
+ scrollTop: {
+ type: null,
+ observer(val) {
+ this.onScroll({ scrollTop: val });
+ },
+ },
+ },
+ mixins: [
+ pageScrollMixin(function (event) {
+ if (this.data.scrollTop != null) {
+ return;
+ }
+ this.onScroll(event);
+ }),
+ ],
+ data: {
+ height: 0,
+ fixed: false,
+ transform: 0,
+ },
+ mounted() {
+ this.onScroll();
+ },
+ methods: {
+ onScroll({ scrollTop } = {}) {
+ const { container, offsetTop, disabled } = this.data;
+ if (disabled) {
+ this.setDataAfterDiff({
+ fixed: false,
+ transform: 0,
+ });
+ return;
+ }
+ this.scrollTop = scrollTop || this.scrollTop;
+ if (typeof container === 'function') {
+ Promise.all([
+ getRect(this, ROOT_ELEMENT),
+ this.getContainerRect(),
+ ]).then(([root, container]) => {
+ if (offsetTop + root.height > container.height + container.top) {
+ this.setDataAfterDiff({
+ fixed: false,
+ transform: container.height - root.height,
+ });
+ } else if (offsetTop >= root.top) {
+ this.setDataAfterDiff({
+ fixed: true,
+ height: root.height,
+ transform: 0,
+ });
+ } else {
+ this.setDataAfterDiff({ fixed: false, transform: 0 });
+ }
+ });
+ return;
+ }
+ getRect(this, ROOT_ELEMENT).then((root) => {
+ if (offsetTop >= root.top) {
+ this.setDataAfterDiff({ fixed: true, height: root.height });
+ this.transform = 0;
+ } else {
+ this.setDataAfterDiff({ fixed: false });
+ }
+ });
+ },
+ setDataAfterDiff(data) {
+ wx.nextTick(() => {
+ const diff = Object.keys(data).reduce((prev, key) => {
+ if (data[key] !== this.data[key]) {
+ prev[key] = data[key];
+ }
+ return prev;
+ }, {});
+ if (Object.keys(diff).length > 0) {
+ this.setData(diff);
+ }
+ this.$emit('scroll', {
+ scrollTop: this.scrollTop,
+ isFixed: data.fixed || this.data.fixed,
+ });
+ });
+ },
+ getContainerRect() {
+ const nodesRef = this.data.container();
+ return new Promise((resolve) =>
+ nodesRef.boundingClientRect(resolve).exec()
+ );
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxml
new file mode 100644
index 00000000..15e9f4a8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxs
new file mode 100644
index 00000000..be99d893
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxs
@@ -0,0 +1,25 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function wrapStyle(data) {
+ return style({
+ transform: data.transform
+ ? 'translate3d(0, ' + data.transform + 'px, 0)'
+ : '',
+ top: data.fixed ? addUnit(data.offsetTop) : '',
+ 'z-index': data.zIndex,
+ });
+}
+
+function containerStyle(data) {
+ return style({
+ height: data.fixed ? addUnit(data.height) : '',
+ 'z-index': data.zIndex,
+ });
+}
+
+module.exports = {
+ wrapStyle: wrapStyle,
+ containerStyle: containerStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxss
new file mode 100644
index 00000000..52693875
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/sticky/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{position:fixed;right:0;left:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.js
new file mode 100644
index 00000000..4a888fff
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.js
@@ -0,0 +1,57 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ classes: ['bar-class', 'price-class', 'button-class'],
+ props: {
+ tip: {
+ type: null,
+ observer: 'updateTip',
+ },
+ tipIcon: String,
+ type: Number,
+ price: {
+ type: null,
+ observer: 'updatePrice',
+ },
+ label: String,
+ loading: Boolean,
+ disabled: Boolean,
+ buttonText: String,
+ currency: {
+ type: String,
+ value: '¥',
+ },
+ buttonType: {
+ type: String,
+ value: 'danger',
+ },
+ decimalLength: {
+ type: Number,
+ value: 2,
+ observer: 'updatePrice',
+ },
+ suffixLabel: String,
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updatePrice() {
+ const { price, decimalLength } = this.data;
+ const priceStrArr =
+ typeof price === 'number' &&
+ (price / 100).toFixed(decimalLength).split('.');
+ this.setData({
+ hasPrice: typeof price === 'number',
+ integerStr: priceStrArr && priceStrArr[0],
+ decimalStr: decimalLength && priceStrArr ? `.${priceStrArr[1]}` : '',
+ });
+ },
+ updateTip() {
+ this.setData({ hasTip: typeof this.data.tip === 'string' });
+ },
+ onSubmit(event) {
+ this.$emit('submit', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.json
new file mode 100644
index 00000000..bda9b8d3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-button": "../button/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.wxml
new file mode 100644
index 00000000..a56dd46c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+ {{ tip }}
+
+
+
+
+
+
+
+ {{ label || '合计:' }}
+
+ {{ currency }}
+ {{ integerStr }}{{decimalStr}}
+
+ {{ suffixLabel }}
+
+
+ {{ loading ? '' : buttonText }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.wxss
new file mode 100644
index 00000000..3126e91b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/submit-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none;z-index:100;z-index:var(--submit-bar-z-index,100);background-color:#fff;background-color:var(--submit-bar-background-color,#fff)}.van-submit-bar__tip{padding:10px;padding:var(--submit-bar-tip-padding,10px);color:#f56723;color:var(--submit-bar-tip-color,#f56723);font-size:12px;font-size:var(--submit-bar-tip-font-size,12px);line-height:1.5;line-height:var(--submit-bar-tip-line-height,1.5);background-color:#fff7cc;background-color:var(--submit-bar-tip-background-color,#fff7cc)}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle;font-size:12px;font-size:var(--submit-bar-tip-icon-size,12px);min-width:18px;min-width:calc(var(--submit-bar-tip-icon-size, 12px)*1.5)}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;padding:0 16px;padding:var(--submit-bar-padding,0 16px);height:50px;height:var(--submit-bar-height,50px);font-size:14px;font-size:var(--submit-bar-text-font-size,14px);background-color:#fff;background-color:var(--submit-bar-background-color,#fff)}.van-submit-bar__safe{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom)}.van-submit-bar__text{-webkit-flex:1;flex:1;text-align:right;color:#323233;color:var(--submit-bar-text-color,#323233);padding-right:12px;padding-right:var(--padding-sm,12px)}.van-submit-bar__price,.van-submit-bar__text{font-weight:500;font-weight:var(--font-weight-bold,500)}.van-submit-bar__price{color:#ee0a24;color:var(--submit-bar-price-color,#ee0a24);font-size:12px;font-size:var(--submit-bar-price-font-size,12px)}.van-submit-bar__price-integer{font-size:20px;font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif}.van-submit-bar__currency{font-size:12px;font-size:var(--submit-bar-currency-font-size,12px)}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px;width:var(--submit-bar-button-width,110px);font-weight:500;font-weight:var(--font-weight-bold,500);--button-default-height:40px!important;--button-default-height:var(--submit-bar-button-height,40px)!important;--button-line-height:40px!important;--button-line-height:var(--submit-bar-button-height,40px)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.js
new file mode 100644
index 00000000..216ffb0e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.js
@@ -0,0 +1,132 @@
+import { VantComponent } from '../common/component';
+import { touch } from '../mixins/touch';
+import { range } from '../common/utils';
+const THRESHOLD = 0.3;
+let ARRAY = [];
+VantComponent({
+ props: {
+ disabled: Boolean,
+ leftWidth: {
+ type: Number,
+ value: 0,
+ observer(leftWidth = 0) {
+ if (this.offset > 0) {
+ this.swipeMove(leftWidth);
+ }
+ },
+ },
+ rightWidth: {
+ type: Number,
+ value: 0,
+ observer(rightWidth = 0) {
+ if (this.offset < 0) {
+ this.swipeMove(-rightWidth);
+ }
+ },
+ },
+ asyncClose: Boolean,
+ name: {
+ type: null,
+ value: '',
+ },
+ },
+ mixins: [touch],
+ data: {
+ catchMove: false,
+ wrapperStyle: '',
+ },
+ created() {
+ this.offset = 0;
+ ARRAY.push(this);
+ },
+ destroyed() {
+ ARRAY = ARRAY.filter((item) => item !== this);
+ },
+ methods: {
+ open(position) {
+ const { leftWidth, rightWidth } = this.data;
+ const offset = position === 'left' ? leftWidth : -rightWidth;
+ this.swipeMove(offset);
+ this.$emit('open', {
+ position,
+ name: this.data.name,
+ });
+ },
+ close() {
+ this.swipeMove(0);
+ },
+ swipeMove(offset = 0) {
+ this.offset = range(offset, -this.data.rightWidth, this.data.leftWidth);
+ const transform = `translate3d(${this.offset}px, 0, 0)`;
+ const transition = this.dragging
+ ? 'none'
+ : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
+ this.setData({
+ wrapperStyle: `
+ -webkit-transform: ${transform};
+ -webkit-transition: ${transition};
+ transform: ${transform};
+ transition: ${transition};
+ `,
+ });
+ },
+ swipeLeaveTransition() {
+ const { leftWidth, rightWidth } = this.data;
+ const { offset } = this;
+ if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {
+ this.open('right');
+ } else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {
+ this.open('left');
+ } else {
+ this.swipeMove(0);
+ }
+ this.setData({ catchMove: false });
+ },
+ startDrag(event) {
+ if (this.data.disabled) {
+ return;
+ }
+ this.startOffset = this.offset;
+ this.touchStart(event);
+ },
+ noop() {},
+ onDrag(event) {
+ if (this.data.disabled) {
+ return;
+ }
+ this.touchMove(event);
+ if (this.direction !== 'horizontal') {
+ return;
+ }
+ this.dragging = true;
+ ARRAY.filter(
+ (item) => item !== this && item.offset !== 0
+ ).forEach((item) => item.close());
+ this.setData({ catchMove: true });
+ this.swipeMove(this.startOffset + this.deltaX);
+ },
+ endDrag() {
+ if (this.data.disabled) {
+ return;
+ }
+ this.dragging = false;
+ this.swipeLeaveTransition();
+ },
+ onClick(event) {
+ const { key: position = 'outside' } = event.currentTarget.dataset;
+ this.$emit('click', position);
+ if (!this.offset) {
+ return;
+ }
+ if (this.data.asyncClose) {
+ this.$emit('close', {
+ position,
+ instance: this,
+ name: this.data.name,
+ });
+ } else {
+ this.swipeMove(0);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.wxml
new file mode 100644
index 00000000..3f7f7260
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.wxss
new file mode 100644
index 00000000..d6152709
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/swipe-cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.js
new file mode 100644
index 00000000..d25fd27e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.js
@@ -0,0 +1,36 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ field: true,
+ classes: ['node-class'],
+ props: {
+ checked: null,
+ loading: Boolean,
+ disabled: Boolean,
+ activeColor: String,
+ inactiveColor: String,
+ size: {
+ type: String,
+ value: '30',
+ },
+ activeValue: {
+ type: null,
+ value: true,
+ },
+ inactiveValue: {
+ type: null,
+ value: false,
+ },
+ },
+ methods: {
+ onClick() {
+ const { activeValue, inactiveValue, disabled, loading } = this.data;
+ if (disabled || loading) {
+ return;
+ }
+ const checked = this.data.checked === activeValue;
+ const value = checked ? inactiveValue : activeValue;
+ this.$emit('input', value);
+ this.$emit('change', value);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.json
new file mode 100644
index 00000000..01077f5d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxml
new file mode 100644
index 00000000..d45829bd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxs
new file mode 100644
index 00000000..1fb6530c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxs
@@ -0,0 +1,26 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ var currentColor = data.checked ? data.activeColor : data.inactiveColor;
+
+ return style({
+ 'font-size': addUnit(data.size),
+ 'background-color': currentColor,
+ });
+}
+
+var BLUE = '#1989fa';
+var GRAY_DARK = '#969799';
+
+function loadingColor(data) {
+ return data.checked
+ ? data.activeColor || BLUE
+ : data.inactiveColor || GRAY_DARK;
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ loadingColor: loadingColor,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxss
new file mode 100644
index 00000000..e32a72ad
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/switch/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-switch{position:relative;display:inline-block;box-sizing:initial;width:2em;width:var(--switch-width,2em);height:1em;height:var(--switch-height,1em);background-color:#fff;background-color:var(--switch-background-color,#fff);border:1px solid rgba(0,0,0,.1);border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:1em;border-radius:var(--switch-node-size,1em);transition:background-color .3s;transition:background-color var(--switch-transition-duration,.3s)}.van-switch__node{position:absolute;top:0;left:0;border-radius:100%;z-index:1;z-index:var(--switch-node-z-index,1);width:1em;width:var(--switch-node-size,1em);height:1em;height:var(--switch-node-size,1em);background-color:#fff;background-color:var(--switch-node-background-color,#fff);box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05),-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:-webkit-transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);transition:transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);transition:transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05),-webkit-transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{position:absolute!important;top:25%;left:25%;width:50%;height:50%}.van-switch--on{background-color:#1989fa;background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em);-webkit-transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)));transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:.4;opacity:var(--switch-disabled-opacity,.4)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.js
new file mode 100644
index 00000000..287825e6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.js
@@ -0,0 +1,56 @@
+import { useParent } from '../common/relation';
+import { VantComponent } from '../common/component';
+VantComponent({
+ relation: useParent('tabs'),
+ props: {
+ dot: {
+ type: Boolean,
+ observer: 'update',
+ },
+ info: {
+ type: null,
+ observer: 'update',
+ },
+ title: {
+ type: String,
+ observer: 'update',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'update',
+ },
+ titleStyle: {
+ type: String,
+ observer: 'update',
+ },
+ name: {
+ type: null,
+ value: '',
+ },
+ },
+ data: {
+ active: false,
+ },
+ methods: {
+ getComputedName() {
+ if (this.data.name !== '') {
+ return this.data.name;
+ }
+ return this.index;
+ },
+ updateRender(active, parent) {
+ const { data: parentData } = parent;
+ this.inited = this.inited || active;
+ this.setData({
+ active,
+ shouldRender: this.inited || !parentData.lazyRender,
+ shouldShow: active || parentData.animated,
+ });
+ },
+ update() {
+ if (this.parent) {
+ this.parent.updateTabs();
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.wxml
new file mode 100644
index 00000000..f5e99f21
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.wxss
new file mode 100644
index 00000000..76ddf068
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tab/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex-shrink:0;flex-shrink:0;width:100%}.van-tab__pane,:host{box-sizing:border-box}.van-tab__pane{overflow-y:auto;-webkit-overflow-scrolling:touch}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.js
new file mode 100644
index 00000000..d323703f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.js
@@ -0,0 +1,56 @@
+import { VantComponent } from '../common/component';
+import { useParent } from '../common/relation';
+VantComponent({
+ props: {
+ info: null,
+ name: null,
+ icon: String,
+ dot: Boolean,
+ iconPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ },
+ relation: useParent('tabbar'),
+ data: {
+ active: false,
+ activeColor: '',
+ inactiveColor: '',
+ },
+ methods: {
+ onClick() {
+ const { parent } = this;
+ if (parent) {
+ const index = parent.children.indexOf(this);
+ const active = this.data.name || index;
+ if (active !== this.data.active) {
+ parent.$emit('change', active);
+ }
+ }
+ this.$emit('click');
+ },
+ updateFromParent() {
+ const { parent } = this;
+ if (!parent) {
+ return;
+ }
+ const index = parent.children.indexOf(this);
+ const parentData = parent.data;
+ const { data } = this;
+ const active = (data.name || index) === parentData.active;
+ const patch = {};
+ if (active !== data.active) {
+ patch.active = active;
+ }
+ if (parentData.activeColor !== data.activeColor) {
+ patch.activeColor = parentData.activeColor;
+ }
+ if (parentData.inactiveColor !== data.inactiveColor) {
+ patch.inactiveColor = parentData.inactiveColor;
+ }
+ if (Object.keys(patch).length > 0) {
+ this.setData(patch);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.json
new file mode 100644
index 00000000..16f174c5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-info": "../info/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.wxml
new file mode 100644
index 00000000..524728f3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.wxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.wxss
new file mode 100644
index 00000000..ff33bd21
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:4px;margin-bottom:var(--tabbar-item-margin-bottom,4px);font-size:22px;font-size:var(--tabbar-item-icon-size,22px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.js
new file mode 100644
index 00000000..33bef092
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.js
@@ -0,0 +1,65 @@
+import { VantComponent } from '../common/component';
+import { useChildren } from '../common/relation';
+import { getRect } from '../common/utils';
+VantComponent({
+ relation: useChildren('tabbar-item', function () {
+ this.updateChildren();
+ }),
+ props: {
+ active: {
+ type: null,
+ observer: 'updateChildren',
+ },
+ activeColor: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ inactiveColor: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ fixed: {
+ type: Boolean,
+ value: true,
+ observer: 'setHeight',
+ },
+ placeholder: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ height: 50,
+ },
+ methods: {
+ updateChildren() {
+ const { children } = this;
+ if (!Array.isArray(children) || !children.length) {
+ return;
+ }
+ children.forEach((child) => child.updateFromParent());
+ },
+ setHeight() {
+ if (!this.data.fixed || !this.data.placeholder) {
+ return;
+ }
+ wx.nextTick(() => {
+ getRect(this, '.van-tabbar').then((res) => {
+ this.setData({ height: res.height });
+ });
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.wxml
new file mode 100644
index 00000000..43bb1111
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.wxml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.wxss
new file mode 100644
index 00000000..68195697
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabbar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;box-sizing:initial;width:100%;height:50px;height:var(--tabbar-height,50px);background-color:#fff;background-color:var(--tabbar-background-color,#fff)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.js
new file mode 100644
index 00000000..dee2aef6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.js
@@ -0,0 +1,286 @@
+import { VantComponent } from '../common/component';
+import { touch } from '../mixins/touch';
+import {
+ getAllRect,
+ getRect,
+ groupSetData,
+ nextTick,
+ requestAnimationFrame,
+} from '../common/utils';
+import { isDef } from '../common/validator';
+import { useChildren } from '../common/relation';
+VantComponent({
+ mixins: [touch],
+ classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'],
+ relation: useChildren('tab', function () {
+ this.updateTabs();
+ }),
+ props: {
+ sticky: Boolean,
+ border: Boolean,
+ swipeable: Boolean,
+ titleActiveColor: String,
+ titleInactiveColor: String,
+ color: String,
+ animated: {
+ type: Boolean,
+ observer() {
+ this.children.forEach((child, index) =>
+ child.updateRender(index === this.data.currentIndex, this)
+ );
+ },
+ },
+ lineWidth: {
+ type: null,
+ value: 40,
+ observer: 'resize',
+ },
+ lineHeight: {
+ type: null,
+ value: -1,
+ },
+ active: {
+ type: null,
+ value: 0,
+ observer(name) {
+ if (!this.skipInit) {
+ this.skipInit = true;
+ }
+ if (name !== this.getCurrentName()) {
+ this.setCurrentIndexByName(name);
+ }
+ },
+ },
+ type: {
+ type: String,
+ value: 'line',
+ },
+ ellipsis: {
+ type: Boolean,
+ value: true,
+ },
+ duration: {
+ type: Number,
+ value: 0.3,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ swipeThreshold: {
+ type: Number,
+ value: 5,
+ observer(value) {
+ this.setData({
+ scrollable: this.children.length > value || !this.data.ellipsis,
+ });
+ },
+ },
+ offsetTop: {
+ type: Number,
+ value: 0,
+ },
+ lazyRender: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ tabs: [],
+ scrollLeft: 0,
+ scrollable: false,
+ currentIndex: 0,
+ container: null,
+ skipTransition: true,
+ scrollWithAnimation: false,
+ lineOffsetLeft: 0,
+ },
+ mounted() {
+ requestAnimationFrame(() => {
+ this.setData({
+ container: () => this.createSelectorQuery().select('.van-tabs'),
+ });
+ if (!this.skipInit) {
+ this.resize();
+ this.scrollIntoView();
+ }
+ });
+ },
+ methods: {
+ updateTabs() {
+ const { children = [], data } = this;
+ this.setData({
+ tabs: children.map((child) => child.data),
+ scrollable:
+ this.children.length > data.swipeThreshold || !data.ellipsis,
+ });
+ this.setCurrentIndexByName(data.active || this.getCurrentName());
+ },
+ trigger(eventName, child) {
+ const { currentIndex } = this.data;
+ const currentChild = child || this.children[currentIndex];
+ if (!isDef(currentChild)) {
+ return;
+ }
+ this.$emit(eventName, {
+ index: currentChild.index,
+ name: currentChild.getComputedName(),
+ title: currentChild.data.title,
+ });
+ },
+ onTap(event) {
+ const { index } = event.currentTarget.dataset;
+ const child = this.children[index];
+ if (child.data.disabled) {
+ this.trigger('disabled', child);
+ } else {
+ this.setCurrentIndex(index);
+ nextTick(() => {
+ this.trigger('click');
+ });
+ }
+ },
+ // correct the index of active tab
+ setCurrentIndexByName(name) {
+ const { children = [] } = this;
+ const matched = children.filter(
+ (child) => child.getComputedName() === name
+ );
+ if (matched.length) {
+ this.setCurrentIndex(matched[0].index);
+ }
+ },
+ setCurrentIndex(currentIndex) {
+ const { data, children = [] } = this;
+ if (
+ !isDef(currentIndex) ||
+ currentIndex >= children.length ||
+ currentIndex < 0
+ ) {
+ return;
+ }
+ groupSetData(this, () => {
+ children.forEach((item, index) => {
+ const active = index === currentIndex;
+ if (active !== item.data.active || !item.inited) {
+ item.updateRender(active, this);
+ }
+ });
+ });
+ if (currentIndex === data.currentIndex) {
+ return;
+ }
+ const shouldEmitChange = data.currentIndex !== null;
+ this.setData({ currentIndex });
+ requestAnimationFrame(() => {
+ this.resize();
+ this.scrollIntoView();
+ });
+ nextTick(() => {
+ this.trigger('input');
+ if (shouldEmitChange) {
+ this.trigger('change');
+ }
+ });
+ },
+ getCurrentName() {
+ const activeTab = this.children[this.data.currentIndex];
+ if (activeTab) {
+ return activeTab.getComputedName();
+ }
+ },
+ resize() {
+ if (this.data.type !== 'line') {
+ return;
+ }
+ const { currentIndex, ellipsis, skipTransition } = this.data;
+ Promise.all([
+ getAllRect(this, '.van-tab'),
+ getRect(this, '.van-tabs__line'),
+ ]).then(([rects = [], lineRect]) => {
+ const rect = rects[currentIndex];
+ if (rect == null) {
+ return;
+ }
+ let lineOffsetLeft = rects
+ .slice(0, currentIndex)
+ .reduce((prev, curr) => prev + curr.width, 0);
+ lineOffsetLeft +=
+ (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
+ this.setData({ lineOffsetLeft });
+ if (skipTransition) {
+ nextTick(() => {
+ this.setData({ skipTransition: false });
+ });
+ }
+ });
+ },
+ // scroll active tab into view
+ scrollIntoView() {
+ const { currentIndex, scrollable, scrollWithAnimation } = this.data;
+ if (!scrollable) {
+ return;
+ }
+ Promise.all([
+ getAllRect(this, '.van-tab'),
+ getRect(this, '.van-tabs__nav'),
+ ]).then(([tabRects, navRect]) => {
+ const tabRect = tabRects[currentIndex];
+ const offsetLeft = tabRects
+ .slice(0, currentIndex)
+ .reduce((prev, curr) => prev + curr.width, 0);
+ this.setData({
+ scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,
+ });
+ if (!scrollWithAnimation) {
+ nextTick(() => {
+ this.setData({ scrollWithAnimation: true });
+ });
+ }
+ });
+ },
+ onTouchScroll(event) {
+ this.$emit('scroll', event.detail);
+ },
+ onTouchStart(event) {
+ if (!this.data.swipeable) return;
+ this.touchStart(event);
+ },
+ onTouchMove(event) {
+ if (!this.data.swipeable) return;
+ this.touchMove(event);
+ },
+ // watch swipe touch end
+ onTouchEnd() {
+ if (!this.data.swipeable) return;
+ const { direction, deltaX, offsetX } = this;
+ const minSwipeDistance = 50;
+ if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
+ const index = this.getAvaiableTab(deltaX);
+ if (index !== -1) {
+ this.setCurrentIndex(index);
+ }
+ }
+ },
+ getAvaiableTab(direction) {
+ const { tabs, currentIndex } = this.data;
+ const step = direction > 0 ? -1 : 1;
+ for (
+ let i = step;
+ currentIndex + i < tabs.length && currentIndex + i >= 0;
+ i += step
+ ) {
+ const index = currentIndex + i;
+ if (
+ index >= 0 &&
+ index < tabs.length &&
+ tabs[index] &&
+ !tabs[index].disabled
+ ) {
+ return index;
+ }
+ }
+ return -1;
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.json
new file mode 100644
index 00000000..19c0bc3a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index",
+ "van-sticky": "../sticky/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxml
new file mode 100644
index 00000000..f76dd63f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxs
new file mode 100644
index 00000000..a027c7b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxs
@@ -0,0 +1,82 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+var style = require('../wxs/style.wxs');
+
+function tabClass(active, ellipsis) {
+ var classes = ['tab-class'];
+
+ if (active) {
+ classes.push('tab-active-class');
+ }
+
+ if (ellipsis) {
+ classes.push('van-ellipsis');
+ }
+
+ return classes.join(' ');
+}
+
+function tabStyle(data) {
+ var titleColor = data.active
+ ? data.titleActiveColor
+ : data.titleInactiveColor;
+
+ var ellipsis = data.scrollable && data.ellipsis;
+
+ // card theme color
+ if (data.type === 'card') {
+ return style({
+ 'border-color': data.color,
+ 'background-color': !data.disabled && data.active ? data.color : null,
+ color: titleColor || (!data.disabled && !data.active ? data.color : null),
+ 'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
+ });
+ }
+
+ return style({
+ color: titleColor,
+ 'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
+ });
+}
+
+function navStyle(color, type) {
+ return style({
+ 'border-color': type === 'card' && color ? color : null,
+ });
+}
+
+function trackStyle(data) {
+ if (!data.animated) {
+ return '';
+ }
+
+ return style({
+ left: -100 * data.currentIndex + '%',
+ 'transition-duration': data.duration + 's',
+ '-webkit-transition-duration': data.duration + 's',
+ });
+}
+
+function lineStyle(data) {
+ return style({
+ width: utils.addUnit(data.lineWidth),
+ transform: 'translateX(' + data.lineOffsetLeft + 'px)',
+ '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
+ 'background-color': data.color,
+ height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
+ 'border-radius':
+ data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
+ 'transition-duration': !data.skipTransition ? data.duration + 's' : null,
+ '-webkit-transition-duration': !data.skipTransition
+ ? data.duration + 's'
+ : null,
+ });
+}
+
+module.exports = {
+ tabClass: tabClass,
+ tabStyle: tabStyle,
+ trackStyle: trackStyle,
+ lineStyle: lineStyle,
+ navStyle: navStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxss
new file mode 100644
index 00000000..d0449e6a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tabs/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{display:-webkit-flex;display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{-webkit-flex:1 0 auto!important;flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-right:8px;padding-left:8px}.van-tabs__scroll{background-color:#fff;background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 16px;margin:0 var(--padding-md,16px)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:30px;height:var(--tabs-card-height,30px);border:1px solid #ee0a24;border:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24);border-radius:2px;border-radius:var(--border-radius-sm,2px)}.van-tabs__nav--card .van-tab{color:#ee0a24;color:var(--tabs-default-color,#ee0a24);line-height:28px;line-height:calc(var(--tabs-card-height, 30px) - var(--border-width-base, 1px)*2);border-right:1px solid #ee0a24;border-right:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;color:var(--white,#fff);background-color:#ee0a24;background-color:var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;height:var(--tabs-bottom-bar-height,3px);border-radius:3px;border-radius:var(--tabs-bottom-bar-height,3px);background-color:#ee0a24;background-color:var(--tabs-bottom-bar-color,#ee0a24)}.van-tabs__track{position:relative;width:100%;height:100%}.van-tabs__track--animated{display:-webkit-flex;display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:44px;height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:30px;height:var(--tabs-card-height,30px)}.van-tab{position:relative;-webkit-flex:1;flex:1;box-sizing:border-box;min-width:0;padding:0 5px;text-align:center;cursor:pointer;color:#646566;color:var(--tab-text-color,#646566);font-size:14px;font-size:var(--tab-font-size,14px);line-height:44px;line-height:var(--tabs-line-height,44px)}.van-tab--active{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--tab-active-text-color,#323233)}.van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.js
new file mode 100644
index 00000000..49627a39
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.js
@@ -0,0 +1,21 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ size: String,
+ mark: Boolean,
+ color: String,
+ plain: Boolean,
+ round: Boolean,
+ textColor: String,
+ type: {
+ type: String,
+ value: 'default',
+ },
+ closeable: Boolean,
+ },
+ methods: {
+ onClose() {
+ this.$emit('close');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxml
new file mode 100644
index 00000000..59352ddd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxs
new file mode 100644
index 00000000..12d1668e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+ return style({
+ 'background-color': data.plain ? '' : data.color,
+ color: data.textColor || data.plain ? data.textColor || data.color : '',
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxss
new file mode 100644
index 00000000..46df0da0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tag/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tag{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;padding:0 4px;padding:var(--tag-padding,0 4px);color:#fff;color:var(--tag-text-color,#fff);font-size:12px;font-size:var(--tag-font-size,12px);line-height:16px;line-height:var(--tag-line-height,16px);border-radius:2px;border-radius:var(--tag-border-radius,2px)}.van-tag--default{background-color:#969799;background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:#969799;color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:#ee0a24;background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:#ee0a24;color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:#1989fa;background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:#1989fa;color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:#07c160;background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:#07c160;color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:#ff976a;background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:#ff976a;color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:#fff;background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-radius:inherit;content:"";pointer-events:none}.van-tag--medium{padding:2px 6px;padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{padding:4px 8px;padding:var(--tag-large-padding,4px 8px);font-size:14px;font-size:var(--tag-large-font-size,14px);border-radius:4px;border-radius:var(--tag-large-border-radius,4px)}.van-tag--mark{border-radius:0 999px 999px 0;border-radius:0 var(--tag-round-border-radius,999px) var(--tag-round-border-radius,999px) 0}.van-tag--mark:after{display:block;width:2px;content:""}.van-tag--round{border-radius:999px;border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{min-width:1em;margin-left:2px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.js
new file mode 100644
index 00000000..c4c2ed94
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.js
@@ -0,0 +1,29 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ props: {
+ show: Boolean,
+ mask: Boolean,
+ message: String,
+ forbidClick: Boolean,
+ zIndex: {
+ type: Number,
+ value: 1000,
+ },
+ type: {
+ type: String,
+ value: 'text',
+ },
+ loadingType: {
+ type: String,
+ value: 'circular',
+ },
+ position: {
+ type: String,
+ value: 'middle',
+ },
+ },
+ methods: {
+ // for prevent touchmove
+ noop() {},
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.json
new file mode 100644
index 00000000..9b1b78c4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.json
@@ -0,0 +1,9 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index",
+ "van-overlay": "../overlay/index",
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.wxml
new file mode 100644
index 00000000..635e7d61
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+ {{ message }}
+
+
+
+
+
+ {{ message }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.wxss
new file mode 100644
index 00000000..85dc7a8f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(0,0,0,.7);background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:8px;border-radius:var(--toast-border-radius,8px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:88px;width:var(--toast-default-width,88px);min-height:88px;min-height:var(--toast-default-min-height,88px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:36px;font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/toast.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/toast.d.ts
new file mode 100644
index 00000000..aaa3aa1d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/toast.d.ts
@@ -0,0 +1,36 @@
+///
+declare type ToastMessage = string | number;
+interface ToastOptions {
+ show?: boolean;
+ type?: string;
+ mask?: boolean;
+ zIndex?: number;
+ context?:
+ | WechatMiniprogram.Component.TrivialInstance
+ | WechatMiniprogram.Page.TrivialInstance;
+ position?: string;
+ duration?: number;
+ selector?: string;
+ forbidClick?: boolean;
+ loadingType?: string;
+ message?: ToastMessage;
+ onClose?: () => void;
+}
+declare function Toast(
+ toastOptions: ToastOptions | ToastMessage
+): WechatMiniprogram.Component.TrivialInstance | undefined;
+declare namespace Toast {
+ var loading: (
+ options: ToastMessage | ToastOptions
+ ) => WechatMiniprogram.Component.TrivialInstance | undefined;
+ var success: (
+ options: ToastMessage | ToastOptions
+ ) => WechatMiniprogram.Component.TrivialInstance | undefined;
+ var fail: (
+ options: ToastMessage | ToastOptions
+ ) => WechatMiniprogram.Component.TrivialInstance | undefined;
+ var clear: () => void;
+ var setDefaultOptions: (options: ToastOptions) => void;
+ var resetDefaultOptions: () => void;
+}
+export default Toast;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/toast.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/toast.js
new file mode 100644
index 00000000..4a1b63aa
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/toast/toast.js
@@ -0,0 +1,70 @@
+import { isObj } from '../common/validator';
+const defaultOptions = {
+ type: 'text',
+ mask: false,
+ message: '',
+ show: true,
+ zIndex: 1000,
+ duration: 2000,
+ position: 'middle',
+ forbidClick: false,
+ loadingType: 'circular',
+ selector: '#van-toast',
+};
+let queue = [];
+let currentOptions = Object.assign({}, defaultOptions);
+function parseOptions(message) {
+ return isObj(message) ? message : { message };
+}
+function getContext() {
+ const pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+function Toast(toastOptions) {
+ const options = Object.assign(
+ Object.assign({}, currentOptions),
+ parseOptions(toastOptions)
+ );
+ const context = options.context || getContext();
+ const toast = context.selectComponent(options.selector);
+ if (!toast) {
+ console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确');
+ return;
+ }
+ delete options.context;
+ delete options.selector;
+ toast.clear = () => {
+ toast.setData({ show: false });
+ if (options.onClose) {
+ options.onClose();
+ }
+ };
+ queue.push(toast);
+ toast.setData(options);
+ clearTimeout(toast.timer);
+ if (options.duration != null && options.duration > 0) {
+ toast.timer = setTimeout(() => {
+ toast.clear();
+ queue = queue.filter((item) => item !== toast);
+ }, options.duration);
+ }
+ return toast;
+}
+const createMethod = (type) => (options) =>
+ Toast(Object.assign({ type }, parseOptions(options)));
+Toast.loading = createMethod('loading');
+Toast.success = createMethod('success');
+Toast.fail = createMethod('fail');
+Toast.clear = () => {
+ queue.forEach((toast) => {
+ toast.clear();
+ });
+ queue = [];
+};
+Toast.setDefaultOptions = (options) => {
+ Object.assign(currentOptions, options);
+};
+Toast.resetDefaultOptions = () => {
+ currentOptions = Object.assign({}, defaultOptions);
+};
+export default Toast;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.js
new file mode 100644
index 00000000..0ebdef0d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.js
@@ -0,0 +1,13 @@
+import { VantComponent } from '../common/component';
+import { transition } from '../mixins/transition';
+VantComponent({
+ classes: [
+ 'enter-class',
+ 'enter-active-class',
+ 'enter-to-class',
+ 'leave-class',
+ 'leave-active-class',
+ 'leave-to-class',
+ ],
+ mixins: [transition(true)],
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxml
new file mode 100644
index 00000000..27437852
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxs
new file mode 100644
index 00000000..e0babf62
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxs
@@ -0,0 +1,17 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+ return style([
+ {
+ '-webkit-transition-duration': data.currentDuration + 'ms',
+ 'transition-duration': data.currentDuration + 'ms',
+ },
+ data.display ? null : 'display: none',
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxss
new file mode 100644
index 00000000..d459f5c1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/transition/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}.van-fade-down-enter,.van-fade-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);opacity:0}.van-fade-left-enter,.van-fade-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);opacity:0}.van-fade-right-enter,.van-fade-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);opacity:0}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.js
new file mode 100644
index 00000000..8dc4ed86
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.js
@@ -0,0 +1,68 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+ classes: [
+ 'main-item-class',
+ 'content-item-class',
+ 'main-active-class',
+ 'content-active-class',
+ 'main-disabled-class',
+ 'content-disabled-class',
+ ],
+ props: {
+ items: {
+ type: Array,
+ observer: 'updateSubItems',
+ },
+ activeId: null,
+ mainActiveIndex: {
+ type: Number,
+ value: 0,
+ observer: 'updateSubItems',
+ },
+ height: {
+ type: null,
+ value: 300,
+ },
+ max: {
+ type: Number,
+ value: Infinity,
+ },
+ selectedIcon: {
+ type: String,
+ value: 'success',
+ },
+ },
+ data: {
+ subItems: [],
+ },
+ methods: {
+ // 当一个子项被选择时
+ onSelectItem(event) {
+ const { item } = event.currentTarget.dataset;
+ const isArray = Array.isArray(this.data.activeId);
+ // 判断有没有超出右侧选择的最大数
+ const isOverMax = isArray && this.data.activeId.length >= this.data.max;
+ // 判断该项有没有被选中, 如果有被选中,则忽视是否超出的条件
+ const isSelected = isArray
+ ? this.data.activeId.indexOf(item.id) > -1
+ : this.data.activeId === item.id;
+ if (!item.disabled && (!isOverMax || isSelected)) {
+ this.$emit('click-item', item);
+ }
+ },
+ // 当一个导航被点击时
+ onClickNav(event) {
+ const index = event.detail;
+ const item = this.data.items[index];
+ if (!item.disabled) {
+ this.$emit('click-nav', { index });
+ }
+ },
+ // 更新子项列表
+ updateSubItems() {
+ const { items, mainActiveIndex } = this.data;
+ const { children = [] } = items[mainActiveIndex] || {};
+ this.setData({ subItems: children });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.json
new file mode 100644
index 00000000..42991a2a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-sidebar": "../sidebar/index",
+ "van-sidebar-item": "../sidebar-item/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxml
new file mode 100644
index 00000000..2663e528
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxs
new file mode 100644
index 00000000..b1cbb39b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+var array = require('../wxs/array.wxs');
+
+function isActive (activeList, itemId) {
+ if (array.isArray(activeList)) {
+ return activeList.indexOf(itemId) > -1;
+ }
+
+ return activeList === itemId;
+}
+
+module.exports.isActive = isActive;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxss
new file mode 100644
index 00000000..3f7cca67
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/tree-select/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1;flex:1;background-color:#f7f8fa;background-color:var(--tree-select-nav-background-color,#f7f8fa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#ee0a24;color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.js
new file mode 100644
index 00000000..263c50e3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.js
@@ -0,0 +1,201 @@
+import { VantComponent } from '../common/component';
+import { isImageFile, chooseFile, isVideoFile } from './utils';
+import { chooseImageProps, chooseVideoProps } from './shared';
+import { isBoolean, isPromise } from '../common/validator';
+VantComponent({
+ props: Object.assign(
+ Object.assign(
+ {
+ disabled: Boolean,
+ multiple: Boolean,
+ uploadText: String,
+ useBeforeRead: Boolean,
+ afterRead: null,
+ beforeRead: null,
+ previewSize: {
+ type: null,
+ value: 80,
+ },
+ name: {
+ type: null,
+ value: '',
+ },
+ accept: {
+ type: String,
+ value: 'image',
+ },
+ fileList: {
+ type: Array,
+ value: [],
+ observer: 'formatFileList',
+ },
+ maxSize: {
+ type: Number,
+ value: Number.MAX_VALUE,
+ },
+ maxCount: {
+ type: Number,
+ value: 100,
+ },
+ deletable: {
+ type: Boolean,
+ value: true,
+ },
+ showUpload: {
+ type: Boolean,
+ value: true,
+ },
+ previewImage: {
+ type: Boolean,
+ value: true,
+ },
+ previewFullImage: {
+ type: Boolean,
+ value: true,
+ },
+ imageFit: {
+ type: String,
+ value: 'scaleToFill',
+ },
+ uploadIcon: {
+ type: String,
+ value: 'photograph',
+ },
+ },
+ chooseImageProps
+ ),
+ chooseVideoProps
+ ),
+ data: {
+ lists: [],
+ isInCount: true,
+ },
+ methods: {
+ formatFileList() {
+ const { fileList = [], maxCount } = this.data;
+ const lists = fileList.map((item) =>
+ Object.assign(Object.assign({}, item), {
+ isImage: isImageFile(item),
+ isVideo: isVideoFile(item),
+ deletable: isBoolean(item.deletable) ? item.deletable : true,
+ })
+ );
+ this.setData({ lists, isInCount: lists.length < maxCount });
+ },
+ getDetail(index) {
+ return {
+ name: this.data.name,
+ index: index == null ? this.data.fileList.length : index,
+ };
+ },
+ startUpload() {
+ const { maxCount, multiple, lists, disabled } = this.data;
+ if (disabled) return;
+ chooseFile(
+ Object.assign(Object.assign({}, this.data), {
+ maxCount: maxCount - lists.length,
+ })
+ )
+ .then((res) => {
+ this.onBeforeRead(multiple ? res : res[0]);
+ })
+ .catch((error) => {
+ this.$emit('error', error);
+ });
+ },
+ onBeforeRead(file) {
+ const { beforeRead, useBeforeRead } = this.data;
+ let res = true;
+ if (typeof beforeRead === 'function') {
+ res = beforeRead(file, this.getDetail());
+ }
+ if (useBeforeRead) {
+ res = new Promise((resolve, reject) => {
+ this.$emit(
+ 'before-read',
+ Object.assign(Object.assign({ file }, this.getDetail()), {
+ callback: (ok) => {
+ ok ? resolve() : reject();
+ },
+ })
+ );
+ });
+ }
+ if (!res) {
+ return;
+ }
+ if (isPromise(res)) {
+ res.then((data) => this.onAfterRead(data || file));
+ } else {
+ this.onAfterRead(file);
+ }
+ },
+ onAfterRead(file) {
+ const { maxSize, afterRead } = this.data;
+ const oversize = Array.isArray(file)
+ ? file.some((item) => item.size > maxSize)
+ : file.size > maxSize;
+ if (oversize) {
+ this.$emit('oversize', Object.assign({ file }, this.getDetail()));
+ return;
+ }
+ if (typeof afterRead === 'function') {
+ afterRead(file, this.getDetail());
+ }
+ this.$emit('after-read', Object.assign({ file }, this.getDetail()));
+ },
+ deleteItem(event) {
+ const { index } = event.currentTarget.dataset;
+ this.$emit(
+ 'delete',
+ Object.assign(Object.assign({}, this.getDetail(index)), {
+ file: this.data.fileList[index],
+ })
+ );
+ },
+ onPreviewImage(event) {
+ if (!this.data.previewFullImage) return;
+ const { index } = event.currentTarget.dataset;
+ const { lists } = this.data;
+ const item = lists[index];
+ wx.previewImage({
+ urls: lists.filter((item) => isImageFile(item)).map((item) => item.url),
+ current: item.url,
+ fail() {
+ wx.showToast({ title: '预览图片失败', icon: 'none' });
+ },
+ });
+ },
+ onPreviewVideo(event) {
+ if (!this.data.previewFullImage) return;
+ const { index } = event.currentTarget.dataset;
+ const { lists } = this.data;
+ wx.previewMedia({
+ sources: lists
+ .filter((item) => isVideoFile(item))
+ .map((item) =>
+ Object.assign(Object.assign({}, item), { type: 'video' })
+ ),
+ current: index,
+ fail() {
+ wx.showToast({ title: '预览视频失败', icon: 'none' });
+ },
+ });
+ },
+ onPreviewFile(event) {
+ const { index } = event.currentTarget.dataset;
+ wx.openDocument({
+ filePath: this.data.lists[index].url,
+ showMenu: true,
+ });
+ },
+ onClickPreview(event) {
+ const { index } = event.currentTarget.dataset;
+ const item = this.data.lists[index];
+ this.$emit(
+ 'click-preview',
+ Object.assign(Object.assign({}, item), this.getDetail(index))
+ );
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.json b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxml
new file mode 100644
index 00000000..50fb0c89
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name || item.url }}
+
+
+
+
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ uploadText }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxs
new file mode 100644
index 00000000..257c7804
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function sizeStyle(data) {
+ return style({
+ width: addUnit(data.previewSize),
+ height: addUnit(data.previewSize),
+ });
+}
+
+module.exports = {
+ sizeStyle: sizeStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxss
new file mode 100644
index 00000000..5023d716
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{position:relative;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:80px;width:var(--uploader-size,80px);height:80px;height:var(--uploader-size,80px);margin:0 8px 8px 0;margin:0 var(--padding-xs,8px) var(--padding-xs,8px) 0;background-color:#f7f8fa;background-color:var(--uploader-upload-background-color,#f7f8fa)}.van-uploader__upload:active{background-color:#f2f3f5;background-color:var(--uploader-upload-active-color,#f2f3f5)}.van-uploader__upload-icon{color:#dcdee0;color:var(--uploader-icon-color,#dcdee0);font-size:24px;font-size:var(--uploader-icon-size,24px)}.van-uploader__upload-text{margin-top:8px;margin-top:var(--padding-xs,8px);color:#969799;color:var(--uploader-text-color,#969799);font-size:12px;font-size:var(--uploader-text-font-size,12px)}.van-uploader__upload--disabled{opacity:.5;opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{position:relative;cursor:pointer;margin:0 8px 8px 0;margin:0 var(--padding-xs,8px) var(--padding-xs,8px) 0}.van-uploader__preview-image{display:block;overflow:hidden;width:80px;width:var(--uploader-size,80px);height:80px;height:var(--uploader-size,80px)}.van-uploader__preview-delete{padding:0 0 8px 8px;padding:0 0 var(--padding-xs,8px) var(--padding-xs,8px)}.van-uploader__preview-delete,.van-uploader__preview-delete:after{position:absolute;top:0;right:0;width:14px;width:var(--uploader-delete-icon-size,14px);height:14px;height:var(--uploader-delete-icon-size,14px)}.van-uploader__preview-delete:after{content:"";background-color:rgba(0,0,0,.7);background-color:var(--uploader-delete-background-color,rgba(0,0,0,.7));border-radius:0 0 0 12px;border-radius:0 0 0 calc(var(--uploader-delete-icon-size, 14px) - 2px)}.van-uploader__preview-delete-icon{position:absolute;top:-2px;right:-2px;z-index:1;-webkit-transform:scale(.5);transform:scale(.5);font-size:16px;font-size:calc(var(--uploader-delete-icon-size, 14px) + 2px);color:#fff;color:var(--uploader-delete-color,#fff)}.van-uploader__file{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;width:80px;width:var(--uploader-size,80px);height:80px;height:var(--uploader-size,80px);background-color:#f7f8fa;background-color:var(--uploader-file-background-color,#f7f8fa)}.van-uploader__file-icon{color:#646566;color:var(--uploader-file-icon-color,#646566);font-size:20px;font-size:var(--uploader-file-icon-size,20px)}.van-uploader__file-name{box-sizing:border-box;width:100%;text-align:center;margin-top:8px;margin-top:var(--uploader-file-name-margin-top,8px);padding:0 4px;padding:var(--uploader-file-name-padding,0 4px);color:#646566;color:var(--uploader-file-name-text-color,#646566);font-size:12px;font-size:var(--uploader-file-name-font-size,12px)}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#fff;color:var(--white,#fff);background-color:rgba(50,50,51,.88);background-color:var(--uploader-mask-background-color,rgba(50,50,51,.88))}.van-uploader__mask-icon{font-size:22px;font-size:var(--uploader-mask-icon-size,22px)}.van-uploader__mask-message{margin-top:6px;padding:0 4px;padding:0 var(--padding-base,4px);font-size:12px;font-size:var(--uploader-mask-message-font-size,12px);line-height:14px;line-height:var(--uploader-mask-message-line-height,14px)}.van-uploader__loading{width:22px;width:var(--uploader-loading-icon-size,22px);height:22px;height:var(--uploader-loading-icon-size,22px);color:#fff!important;color:var(--uploader-loading-icon-color,#fff)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/shared.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/shared.d.ts
new file mode 100644
index 00000000..85d50348
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/shared.d.ts
@@ -0,0 +1,28 @@
+export declare const chooseImageProps: {
+ sizeType: {
+ type: ArrayConstructor;
+ value: string[];
+ };
+ capture: {
+ type: ArrayConstructor;
+ value: string[];
+ };
+};
+export declare const chooseVideoProps: {
+ capture: {
+ type: ArrayConstructor;
+ value: string[];
+ };
+ compressed: {
+ type: BooleanConstructor;
+ value: boolean;
+ };
+ maxDuration: {
+ type: NumberConstructor;
+ value: number;
+ };
+ camera: {
+ type: StringConstructor;
+ value: string;
+ };
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/shared.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/shared.js
new file mode 100644
index 00000000..e097d74e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/shared.js
@@ -0,0 +1,30 @@
+// props for choose image
+export const chooseImageProps = {
+ sizeType: {
+ type: Array,
+ value: ['original', 'compressed'],
+ },
+ capture: {
+ type: Array,
+ value: ['album', 'camera'],
+ },
+};
+// props for choose video
+export const chooseVideoProps = {
+ capture: {
+ type: Array,
+ value: ['album', 'camera'],
+ },
+ compressed: {
+ type: Boolean,
+ value: true,
+ },
+ maxDuration: {
+ type: Number,
+ value: 60,
+ },
+ camera: {
+ type: String,
+ value: 'back',
+ },
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/utils.d.ts b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/utils.d.ts
new file mode 100644
index 00000000..07b32d08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/utils.d.ts
@@ -0,0 +1,31 @@
+export interface File {
+ url: string;
+ size?: number;
+ name?: string;
+ type: string;
+ duration?: number;
+ time?: number;
+ isImage?: boolean;
+ isVideo?: boolean;
+}
+export declare function isImageFile(item: File): boolean;
+export declare function isVideoFile(item: File): boolean;
+export declare function chooseFile({
+ accept,
+ multiple,
+ capture,
+ compressed,
+ maxDuration,
+ sizeType,
+ camera,
+ maxCount,
+}: {
+ accept: any;
+ multiple: any;
+ capture: any;
+ compressed: any;
+ maxDuration: any;
+ sizeType: any;
+ camera: any;
+ maxCount: any;
+}): Promise;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/utils.js
new file mode 100644
index 00000000..bdd40791
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/uploader/utils.js
@@ -0,0 +1,122 @@
+import { pickExclude } from '../common/utils';
+import { isImageUrl, isVideoUrl } from '../common/validator';
+export function isImageFile(item) {
+ if (item.isImage != null) {
+ return item.isImage;
+ }
+ if (item.type) {
+ return item.type === 'image';
+ }
+ if (item.url) {
+ return isImageUrl(item.url);
+ }
+ return false;
+}
+export function isVideoFile(item) {
+ if (item.isVideo != null) {
+ return item.isVideo;
+ }
+ if (item.type) {
+ return item.type === 'video';
+ }
+ if (item.url) {
+ return isVideoUrl(item.url);
+ }
+ return false;
+}
+function formatImage(res) {
+ return res.tempFiles.map((item) =>
+ Object.assign(Object.assign({}, pickExclude(item, ['path'])), {
+ type: 'image',
+ url: item.path,
+ thumb: item.path,
+ })
+ );
+}
+function formatVideo(res) {
+ return [
+ Object.assign(
+ Object.assign(
+ {},
+ pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg'])
+ ),
+ { type: 'video', url: res.tempFilePath, thumb: res.thumbTempFilePath }
+ ),
+ ];
+}
+function formatMedia(res) {
+ return res.tempFiles.map((item) =>
+ Object.assign(
+ Object.assign(
+ {},
+ pickExclude(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])
+ ),
+ {
+ type: res.type,
+ url: item.tempFilePath,
+ thumb:
+ res.type === 'video' ? item.thumbTempFilePath : item.tempFilePath,
+ }
+ )
+ );
+}
+function formatFile(res) {
+ return res.tempFiles.map((item) =>
+ Object.assign(Object.assign({}, pickExclude(item, ['path'])), {
+ url: item.path,
+ })
+ );
+}
+export function chooseFile({
+ accept,
+ multiple,
+ capture,
+ compressed,
+ maxDuration,
+ sizeType,
+ camera,
+ maxCount,
+}) {
+ return new Promise((resolve, reject) => {
+ switch (accept) {
+ case 'image':
+ wx.chooseImage({
+ count: multiple ? Math.min(maxCount, 9) : 1,
+ sourceType: capture,
+ sizeType,
+ success: (res) => resolve(formatImage(res)),
+ fail: reject,
+ });
+ break;
+ case 'media':
+ wx.chooseMedia({
+ count: multiple ? Math.min(maxCount, 9) : 1,
+ sourceType: capture,
+ maxDuration,
+ sizeType,
+ camera,
+ success: (res) => resolve(formatMedia(res)),
+ fail: reject,
+ });
+ break;
+ case 'video':
+ wx.chooseVideo({
+ sourceType: capture,
+ compressed,
+ maxDuration,
+ camera,
+ success: (res) => resolve(formatVideo(res)),
+ fail: reject,
+ });
+ break;
+ default:
+ wx.chooseMessageFile({
+ count: multiple ? maxCount : 1,
+ type: accept,
+ success: (res) => resolve(formatFile(res)),
+ fail: reject,
+ });
+ break;
+ }
+ });
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/add-unit.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/add-unit.wxs
new file mode 100644
index 00000000..4f33462f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/add-unit.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+var REGEXP = getRegExp('^-?\d+(\.\d+)?$');
+
+function addUnit(value) {
+ if (value == null) {
+ return undefined;
+ }
+
+ return REGEXP.test('' + value) ? value + 'px' : value;
+}
+
+module.exports = addUnit;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/array.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/array.wxs
new file mode 100644
index 00000000..610089cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/array.wxs
@@ -0,0 +1,5 @@
+function isArray(array) {
+ return array && array.constructor === 'Array';
+}
+
+module.exports.isArray = isArray;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/bem.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/bem.wxs
new file mode 100644
index 00000000..1efa129e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/bem.wxs
@@ -0,0 +1,39 @@
+/* eslint-disable */
+var array = require('./array.wxs');
+var object = require('./object.wxs');
+var PREFIX = 'van-';
+
+function join(name, mods) {
+ name = PREFIX + name;
+ mods = mods.map(function(mod) {
+ return name + '--' + mod;
+ });
+ mods.unshift(name);
+ return mods.join(' ');
+}
+
+function traversing(mods, conf) {
+ if (!conf) {
+ return;
+ }
+
+ if (typeof conf === 'string' || typeof conf === 'number') {
+ mods.push(conf);
+ } else if (array.isArray(conf)) {
+ conf.forEach(function(item) {
+ traversing(mods, item);
+ });
+ } else if (typeof conf === 'object') {
+ object.keys(conf).forEach(function(key) {
+ conf[key] && mods.push(key);
+ });
+ }
+}
+
+function bem(name, conf) {
+ var mods = [];
+ traversing(mods, conf);
+ return join(name, mods);
+}
+
+module.exports = bem;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/memoize.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/memoize.wxs
new file mode 100644
index 00000000..8f7f46dd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/memoize.wxs
@@ -0,0 +1,55 @@
+/**
+ * Simple memoize
+ * wxs doesn't support fn.apply, so this memoize only support up to 2 args
+ */
+/* eslint-disable */
+
+function isPrimitive(value) {
+ var type = typeof value;
+ return (
+ type === 'boolean' ||
+ type === 'number' ||
+ type === 'string' ||
+ type === 'undefined' ||
+ value === null
+ );
+}
+
+// mock simple fn.call in wxs
+function call(fn, args) {
+ if (args.length === 2) {
+ return fn(args[0], args[1]);
+ }
+
+ if (args.length === 1) {
+ return fn(args[0]);
+ }
+
+ return fn();
+}
+
+function serializer(args) {
+ if (args.length === 1 && isPrimitive(args[0])) {
+ return args[0];
+ }
+ var obj = {};
+ for (var i = 0; i < args.length; i++) {
+ obj['key' + i] = args[i];
+ }
+ return JSON.stringify(obj);
+}
+
+function memoize(fn) {
+ var cache = {};
+
+ return function() {
+ var key = serializer(arguments);
+ if (cache[key] === undefined) {
+ cache[key] = call(fn, arguments);
+ }
+
+ return cache[key];
+ };
+}
+
+module.exports = memoize;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/object.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/object.wxs
new file mode 100644
index 00000000..e0771077
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/object.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var REGEXP = getRegExp('{|}|"', 'g');
+
+function keys(obj) {
+ return JSON.stringify(obj)
+ .replace(REGEXP, '')
+ .split(',')
+ .map(function(item) {
+ return item.split(':')[0];
+ });
+}
+
+module.exports.keys = keys;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/style.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/style.wxs
new file mode 100644
index 00000000..c39c810f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/style.wxs
@@ -0,0 +1,32 @@
+/* eslint-disable */
+var object = require('./object.wxs');
+var array = require('./array.wxs');
+
+function style(styles) {
+ if (array.isArray(styles)) {
+ return styles
+ .filter(function (item) {
+ return item != null && item !== '';
+ })
+ .map(function (item) {
+ return style(item);
+ })
+ .join(';');
+ }
+
+ if ('Object' === styles.constructor) {
+ return object
+ .keys(styles)
+ .filter(function (key) {
+ return styles[key] != null && styles[key] !== '';
+ })
+ .map(function (key) {
+ return [key, [styles[key]]].join(':');
+ })
+ .join(';');
+ }
+
+ return styles;
+}
+
+module.exports = style;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/utils.wxs b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/utils.wxs
new file mode 100644
index 00000000..f66d33a4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/dist/wxs/utils.wxs
@@ -0,0 +1,10 @@
+/* eslint-disable */
+var bem = require('./bem.wxs');
+var memoize = require('./memoize.wxs');
+var addUnit = require('./add-unit.wxs');
+
+module.exports = {
+ bem: memoize(bem),
+ memoize: memoize,
+ addUnit: addUnit
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.js
new file mode 100644
index 00000000..48e5a81c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.js
@@ -0,0 +1,76 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+component_1.VantComponent({
+ mixins: [button_1.button],
+ props: {
+ show: Boolean,
+ title: String,
+ cancelText: String,
+ description: String,
+ round: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ actions: {
+ type: Array,
+ value: [],
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickAction: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onSelect: function (event) {
+ var _this = this;
+ var index = event.currentTarget.dataset.index;
+ var _a = this.data,
+ actions = _a.actions,
+ closeOnClickAction = _a.closeOnClickAction,
+ canIUseGetUserProfile = _a.canIUseGetUserProfile;
+ var item = actions[index];
+ if (item) {
+ this.$emit('select', item);
+ if (closeOnClickAction) {
+ this.onClose();
+ }
+ if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
+ wx.getUserProfile({
+ desc: item.getUserProfileDesc || ' ',
+ complete: function (userProfile) {
+ _this.$emit('getuserinfo', userProfile);
+ },
+ });
+ }
+ }
+ },
+ onCancel: function () {
+ this.$emit('cancel');
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ onClickOverlay: function () {
+ this.$emit('click-overlay');
+ this.onClose();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.json
new file mode 100644
index 00000000..19bf9891
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-popup": "../popup/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.wxml
new file mode 100644
index 00000000..b04cc3a3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.wxml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
+
+
+
+ {{ cancelText }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.wxss
new file mode 100644
index 00000000..9b247d5d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/action-sheet/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{padding:14px 16px;text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:22px;line-height:var(--action-sheet-item-line-height,22px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:#646566;color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{display:block;height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-top:8px;margin-top:var(--padding-xs,8px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#969799;color:var(--action-sheet-subname-color,#969799);line-height:20px;line-height:var(--action-sheet-subname-line-height,20px)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:48px;line-height:var(--action-sheet-header-height,48px)}.van-action-sheet__description{text-align:center;padding:20px 16px;padding:20px var(--padding-md,16px);color:#969799;color:var(--action-sheet-description-color,#969799);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 16px;padding:var(--action-sheet-close-icon-padding,0 16px);font-size:22px!important;font-size:var(--action-sheet-close-icon-size,22px)!important;color:#c8c9cc;color:var(--action-sheet-close-icon-color,#c8c9cc)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.js
new file mode 100644
index 00000000..6b17a07c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.js
@@ -0,0 +1,266 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var shared_1 = require('../picker/shared');
+var utils_1 = require('../common/utils');
+var EMPTY_CODE = '000000';
+component_1.VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: __assign(__assign({}, shared_1.pickerProps), {
+ value: {
+ type: String,
+ observer: function (value) {
+ this.code = value;
+ this.setValues();
+ },
+ },
+ areaList: {
+ type: Object,
+ value: {},
+ observer: 'setValues',
+ },
+ columnsNum: {
+ type: null,
+ value: 3,
+ },
+ columnsPlaceholder: {
+ type: Array,
+ observer: function (val) {
+ this.setData({
+ typeToColumnsPlaceholder: {
+ province: val[0] || '',
+ city: val[1] || '',
+ county: val[2] || '',
+ },
+ });
+ },
+ },
+ }),
+ data: {
+ columns: [{ values: [] }, { values: [] }, { values: [] }],
+ typeToColumnsPlaceholder: {},
+ },
+ mounted: function () {
+ var _this = this;
+ utils_1.requestAnimationFrame(function () {
+ _this.setValues();
+ });
+ },
+ methods: {
+ getPicker: function () {
+ if (this.picker == null) {
+ this.picker = this.selectComponent('.van-area__picker');
+ }
+ return this.picker;
+ },
+ onCancel: function (event) {
+ this.emit('cancel', event.detail);
+ },
+ onConfirm: function (event) {
+ var index = event.detail.index;
+ var value = event.detail.value;
+ value = this.parseValues(value);
+ this.emit('confirm', { value: value, index: index });
+ },
+ emit: function (type, detail) {
+ detail.values = detail.value;
+ delete detail.value;
+ this.$emit(type, detail);
+ },
+ parseValues: function (values) {
+ var columnsPlaceholder = this.data.columnsPlaceholder;
+ return values.map(function (value, index) {
+ if (
+ value &&
+ (!value.code || value.name === columnsPlaceholder[index])
+ ) {
+ return __assign(__assign({}, value), { code: '', name: '' });
+ }
+ return value;
+ });
+ },
+ onChange: function (event) {
+ var _this = this;
+ var _a;
+ var _b = event.detail,
+ index = _b.index,
+ picker = _b.picker,
+ value = _b.value;
+ this.code = value[index].code;
+ (_a = this.setValues()) === null || _a === void 0
+ ? void 0
+ : _a.then(function () {
+ _this.$emit('change', {
+ picker: picker,
+ values: _this.parseValues(picker.getValues()),
+ index: index,
+ });
+ });
+ },
+ getConfig: function (type) {
+ var areaList = this.data.areaList;
+ return (areaList && areaList[type + '_list']) || {};
+ },
+ getList: function (type, code) {
+ if (type !== 'province' && !code) {
+ return [];
+ }
+ var typeToColumnsPlaceholder = this.data.typeToColumnsPlaceholder;
+ var list = this.getConfig(type);
+ var result = Object.keys(list).map(function (code) {
+ return {
+ code: code,
+ name: list[code],
+ };
+ });
+ if (code != null) {
+ // oversea code
+ if (code[0] === '9' && type === 'city') {
+ code = '9';
+ }
+ result = result.filter(function (item) {
+ return item.code.indexOf(code) === 0;
+ });
+ }
+ if (typeToColumnsPlaceholder[type] && result.length) {
+ // set columns placeholder
+ var codeFill =
+ type === 'province'
+ ? ''
+ : type === 'city'
+ ? EMPTY_CODE.slice(2, 4)
+ : EMPTY_CODE.slice(4, 6);
+ result.unshift({
+ code: '' + code + codeFill,
+ name: typeToColumnsPlaceholder[type],
+ });
+ }
+ return result;
+ },
+ getIndex: function (type, code) {
+ var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
+ var list = this.getList(type, code.slice(0, compareNum - 2));
+ // oversea code
+ if (code[0] === '9' && type === 'province') {
+ compareNum = 1;
+ }
+ code = code.slice(0, compareNum);
+ for (var i = 0; i < list.length; i++) {
+ if (list[i].code.slice(0, compareNum) === code) {
+ return i;
+ }
+ }
+ return 0;
+ },
+ setValues: function () {
+ var picker = this.getPicker();
+ if (!picker) {
+ return;
+ }
+ var code = this.code || this.getDefaultCode();
+ var provinceList = this.getList('province');
+ var cityList = this.getList('city', code.slice(0, 2));
+ var stack = [];
+ var indexes = [];
+ var columnsNum = this.data.columnsNum;
+ if (columnsNum >= 1) {
+ stack.push(picker.setColumnValues(0, provinceList, false));
+ indexes.push(this.getIndex('province', code));
+ }
+ if (columnsNum >= 2) {
+ stack.push(picker.setColumnValues(1, cityList, false));
+ indexes.push(this.getIndex('city', code));
+ if (cityList.length && code.slice(2, 4) === '00') {
+ code = cityList[0].code;
+ }
+ }
+ if (columnsNum === 3) {
+ stack.push(
+ picker.setColumnValues(
+ 2,
+ this.getList('county', code.slice(0, 4)),
+ false
+ )
+ );
+ indexes.push(this.getIndex('county', code));
+ }
+ return Promise.all(stack)
+ .catch(function () {})
+ .then(function () {
+ return picker.setIndexes(indexes);
+ })
+ .catch(function () {});
+ },
+ getDefaultCode: function () {
+ var columnsPlaceholder = this.data.columnsPlaceholder;
+ if (columnsPlaceholder.length) {
+ return EMPTY_CODE;
+ }
+ var countyCodes = Object.keys(this.getConfig('county'));
+ if (countyCodes[0]) {
+ return countyCodes[0];
+ }
+ var cityCodes = Object.keys(this.getConfig('city'));
+ if (cityCodes[0]) {
+ return cityCodes[0];
+ }
+ return '';
+ },
+ getValues: function () {
+ var picker = this.getPicker();
+ if (!picker) {
+ return [];
+ }
+ return this.parseValues(
+ picker.getValues().filter(function (value) {
+ return !!value;
+ })
+ );
+ },
+ getDetail: function () {
+ var values = this.getValues();
+ var area = {
+ code: '',
+ country: '',
+ province: '',
+ city: '',
+ county: '',
+ };
+ if (!values.length) {
+ return area;
+ }
+ var names = values.map(function (item) {
+ return item.name;
+ });
+ area.code = values[values.length - 1].code;
+ if (area.code[0] === '9') {
+ area.country = names[1] || '';
+ area.province = names[2] || '';
+ } else {
+ area.province = names[0] || '';
+ area.city = names[1] || '';
+ area.county = names[2] || '';
+ }
+ return area;
+ },
+ reset: function (code) {
+ this.code = code || '';
+ return this.setValues();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.json
new file mode 100644
index 00000000..a778e91c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-picker": "../picker/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxml
new file mode 100644
index 00000000..f7dc51f5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxml
@@ -0,0 +1,20 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxs
new file mode 100644
index 00000000..07723c11
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxs
@@ -0,0 +1,8 @@
+/* eslint-disable */
+function displayColumns(columns, columnsNum) {
+ return columns.slice(0, +columnsNum);
+}
+
+module.exports = {
+ displayColumns: displayColumns,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/area/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.js
new file mode 100644
index 00000000..ca757d74
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.js
@@ -0,0 +1,69 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var version_1 = require('../common/version');
+var mixins = [button_1.button];
+if (version_1.canIUseFormFieldButton()) {
+ mixins.push('wx://form-field-button');
+}
+component_1.VantComponent({
+ mixins: mixins,
+ classes: ['hover-class', 'loading-class'],
+ data: {
+ baseStyle: '',
+ },
+ props: {
+ formType: String,
+ icon: String,
+ classPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ plain: Boolean,
+ block: Boolean,
+ round: Boolean,
+ square: Boolean,
+ loading: Boolean,
+ hairline: Boolean,
+ disabled: Boolean,
+ loadingText: String,
+ customStyle: String,
+ loadingType: {
+ type: String,
+ value: 'circular',
+ },
+ type: {
+ type: String,
+ value: 'default',
+ },
+ dataset: null,
+ size: {
+ type: String,
+ value: 'normal',
+ },
+ loadingSize: {
+ type: String,
+ value: '20px',
+ },
+ color: String,
+ },
+ methods: {
+ onClick: function (event) {
+ var _this = this;
+ this.$emit('click', event);
+ var _a = this.data,
+ canIUseGetUserProfile = _a.canIUseGetUserProfile,
+ openType = _a.openType,
+ getUserProfileDesc = _a.getUserProfileDesc;
+ if (openType === 'getUserInfo' && canIUseGetUserProfile) {
+ wx.getUserProfile({
+ desc: getUserProfileDesc || ' ',
+ complete: function (userProfile) {
+ _this.$emit('getuserinfo', userProfile);
+ },
+ });
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxml
new file mode 100644
index 00000000..80348459
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxml
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxs
new file mode 100644
index 00000000..8b649fe1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxs
@@ -0,0 +1,39 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+ if (!data.color) {
+ return data.customStyle;
+ }
+
+ var properties = {
+ color: data.plain ? data.color : '#fff',
+ background: data.plain ? null : data.color,
+ };
+
+ // hide border when color is linear-gradient
+ if (data.color.indexOf('gradient') !== -1) {
+ properties.border = 0;
+ } else {
+ properties['border-color'] = data.color;
+ }
+
+ return style([properties, data.customStyle]);
+}
+
+function loadingColor(data) {
+ if (data.plain) {
+ return data.color ? data.color : '#c9c9c9';
+ }
+
+ if (data.type === 'default') {
+ return '#c9c9c9';
+ }
+
+ return '#fff';
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ loadingColor: loadingColor,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxss
new file mode 100644
index 00000000..5a591fbd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/button/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);line-height:20px;line-height:var(--button-line-height,20px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background:#fff;background:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background:#07c160;background:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background:#1989fa;background:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background:#ee0a24;background:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background:#ff976a;background:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background:#fff;background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/calendar.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/calendar.wxml
new file mode 100644
index 00000000..4872e191
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/calendar.wxml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.js
new file mode 100644
index 00000000..314ca9ad
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.js
@@ -0,0 +1,43 @@
+'use strict';
+var __spreadArray =
+ (this && this.__spreadArray) ||
+ function (to, from) {
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
+ to[j] = from[i];
+ return to;
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../../../common/component');
+component_1.VantComponent({
+ props: {
+ title: {
+ type: String,
+ value: '日期选择',
+ },
+ subtitle: String,
+ showTitle: Boolean,
+ showSubtitle: Boolean,
+ firstDayOfWeek: {
+ type: Number,
+ observer: 'initWeekDay',
+ },
+ },
+ data: {
+ weekdays: [],
+ },
+ created: function () {
+ this.initWeekDay();
+ },
+ methods: {
+ initWeekDay: function () {
+ var defaultWeeks = ['日', '一', '二', '三', '四', '五', '六'];
+ var firstDayOfWeek = this.data.firstDayOfWeek || 0;
+ this.setData({
+ weekdays: __spreadArray(
+ __spreadArray([], defaultWeeks.slice(firstDayOfWeek, 7)),
+ defaultWeeks.slice(0, firstDayOfWeek)
+ ),
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.wxml
new file mode 100644
index 00000000..eb8e4b47
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.wxml
@@ -0,0 +1,16 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.wxss
new file mode 100644
index 00000000..4075e48f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/header/index.wxss
@@ -0,0 +1 @@
+@import '../../../common/index.wxss';.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16);box-shadow:var(--calendar-header-box-shadow,0 2px 10px rgba(125,126,128,.16))}.van-calendar__header-subtitle,.van-calendar__header-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-flex:1;flex:1;text-align:center;font-size:12px;font-size:var(--calendar-weekdays-font-size,12px);line-height:30px;line-height:var(--calendar-weekdays-height,30px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.js
new file mode 100644
index 00000000..1dcb49aa
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.js
@@ -0,0 +1,173 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../../../common/component');
+var utils_1 = require('../../utils');
+component_1.VantComponent({
+ props: {
+ date: {
+ type: null,
+ observer: 'setDays',
+ },
+ type: {
+ type: String,
+ observer: 'setDays',
+ },
+ color: String,
+ minDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ maxDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ showMark: Boolean,
+ rowHeight: null,
+ formatter: {
+ type: null,
+ observer: 'setDays',
+ },
+ currentDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ firstDayOfWeek: {
+ type: Number,
+ observer: 'setDays',
+ },
+ allowSameDay: Boolean,
+ showSubtitle: Boolean,
+ showMonthTitle: Boolean,
+ },
+ data: {
+ visible: true,
+ days: [],
+ },
+ methods: {
+ onClick: function (event) {
+ var index = event.currentTarget.dataset.index;
+ var item = this.data.days[index];
+ if (item.type !== 'disabled') {
+ this.$emit('click', item);
+ }
+ },
+ setDays: function () {
+ var days = [];
+ var startDate = new Date(this.data.date);
+ var year = startDate.getFullYear();
+ var month = startDate.getMonth();
+ var totalDay = utils_1.getMonthEndDay(
+ startDate.getFullYear(),
+ startDate.getMonth() + 1
+ );
+ for (var day = 1; day <= 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.data.formatter) {
+ config = this.data.formatter(config);
+ }
+ days.push(config);
+ }
+ this.setData({ days: days });
+ },
+ getMultipleDayType: function (day) {
+ var currentDate = this.data.currentDate;
+ if (!Array.isArray(currentDate)) {
+ return '';
+ }
+ var isSelected = function (date) {
+ return currentDate.some(function (item) {
+ return utils_1.compareDay(item, date) === 0;
+ });
+ };
+ if (isSelected(day)) {
+ var prevDay = utils_1.getPrevDay(day);
+ var nextDay = utils_1.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 (day) {
+ var _a = this.data,
+ currentDate = _a.currentDate,
+ allowSameDay = _a.allowSameDay;
+ if (!Array.isArray(currentDate)) {
+ return '';
+ }
+ var startDay = currentDate[0],
+ endDay = currentDate[1];
+ if (!startDay) {
+ return '';
+ }
+ var compareToStart = utils_1.compareDay(day, startDay);
+ if (!endDay) {
+ return compareToStart === 0 ? 'start' : '';
+ }
+ var compareToEnd = utils_1.compareDay(day, endDay);
+ if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {
+ return 'start-end';
+ }
+ if (compareToStart === 0) {
+ return 'start';
+ }
+ if (compareToEnd === 0) {
+ return 'end';
+ }
+ if (compareToStart > 0 && compareToEnd < 0) {
+ return 'middle';
+ }
+ return '';
+ },
+ getDayType: function (day) {
+ var _a = this.data,
+ type = _a.type,
+ minDate = _a.minDate,
+ maxDate = _a.maxDate,
+ currentDate = _a.currentDate;
+ if (
+ utils_1.compareDay(day, minDate) < 0 ||
+ utils_1.compareDay(day, maxDate) > 0
+ ) {
+ return 'disabled';
+ }
+ if (type === 'single') {
+ return utils_1.compareDay(day, currentDate) === 0 ? 'selected' : '';
+ }
+ if (type === 'multiple') {
+ return this.getMultipleDayType(day);
+ }
+ /* istanbul ignore else */
+ if (type === 'range') {
+ return this.getRangeDayType(day);
+ }
+ return '';
+ },
+ getBottomInfo: function (type) {
+ if (this.data.type === 'range') {
+ if (type === 'start') {
+ return '开始';
+ }
+ if (type === 'end') {
+ return '结束';
+ }
+ if (type === 'start-end') {
+ return '开始/结束';
+ }
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxml
new file mode 100644
index 00000000..4a2c47c9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ {{ computed.formatMonthTitle(date) }}
+
+
+
+
+ {{ computed.getMark(date) }}
+
+
+
+
+ {{ item.topInfo }}
+ {{ item.text }}
+
+ {{ item.bottomInfo }}
+
+
+
+
+ {{ item.topInfo }}
+ {{ item.text }}
+
+ {{ item.bottomInfo }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxs
new file mode 100644
index 00000000..55e45a57
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxs
@@ -0,0 +1,71 @@
+/* eslint-disable */
+var utils = require('../../utils.wxs');
+
+function getMark(date) {
+ return getDate(date).getMonth() + 1;
+}
+
+var ROW_HEIGHT = 64;
+
+function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
+ var style = [];
+ var current = getDate(date).getDay() || 7;
+ var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :
+ current === 7 && firstDayOfWeek === 0 ? 0 :
+ (current - firstDayOfWeek);
+
+ if (index === 0) {
+ style.push(['margin-left', (100 * offset) / 7 + '%']);
+ }
+
+ if (rowHeight !== ROW_HEIGHT) {
+ style.push(['height', rowHeight + 'px']);
+ }
+
+ if (color) {
+ if (
+ type === 'start' ||
+ type === 'end' ||
+ type === 'start-end' ||
+ type === 'multiple-selected' ||
+ type === 'multiple-middle'
+ ) {
+ style.push(['background', color]);
+ } else if (type === 'middle') {
+ style.push(['color', color]);
+ }
+ }
+
+ return style
+ .map(function(item) {
+ return item.join(':');
+ })
+ .join(';');
+}
+
+function formatMonthTitle(date) {
+ date = getDate(date);
+ return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';
+}
+
+function getMonthStyle(visible, date, rowHeight) {
+ if (!visible) {
+ date = getDate(date);
+
+ var totalDay = utils.getMonthEndDay(
+ date.getFullYear(),
+ date.getMonth() + 1
+ );
+ var offset = getDate(date).getDay();
+ var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;
+
+ return 'padding-bottom:' + padding + 'px';
+ }
+}
+
+module.exports = {
+ getMark: getMark,
+ getDayStyle: getDayStyle,
+ formatMonthTitle: formatMonthTitle,
+ getMonthStyle: getMonthStyle
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxss
new file mode 100644
index 00000000..17c12f4e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/components/month/index.wxss
@@ -0,0 +1 @@
+@import '../../../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__month-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:14px;font-size:var(--calendar-month-title-font-size,14px);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__days{position:relative;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;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none;color:rgba(242,243,245,.8);color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:160px;font-size:var(--calendar-month-mark-font-size,160px)}.van-calendar__day,.van-calendar__selected-day{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:64px;height:var(--calendar-day-height,64px);font-size:16px;font-size:var(--calendar-day-font-size,16px)}.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;color:var(--calendar-range-edge-color,#fff);background-color:#ee0a24;background-color:var(--calendar-range-edge-background-color,#ee0a24)}.van-calendar__day--start{border-radius:4px 0 0 4px;border-radius:var(--border-radius-md,4px) 0 0 var(--border-radius-md,4px)}.van-calendar__day--end{border-radius:0 4px 4px 0;border-radius:0 var(--border-radius-md,4px) var(--border-radius-md,4px) 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px;border-radius:var(--border-radius-md,4px)}.van-calendar__day--middle{color:#ee0a24;color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;content:"";opacity:.1;opacity:var(--calendar-range-middle-background-opacity,.1)}.van-calendar__day--disabled{cursor:default;color:#c8c9cc;color:var(--calendar-day-disabled-color,#c8c9cc)}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;font-size:var(--calendar-info-font-size,10px);line-height:14px;line-height:var(--calendar-info-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;width:var(--calendar-selected-day-size,54px);height:54px;height:var(--calendar-selected-day-size,54px);color:#fff;color:var(--calendar-selected-day-color,#fff);background-color:#ee0a24;background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;border-radius:var(--border-radius-md,4px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.js
new file mode 100644
index 00000000..1db8d75e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.js
@@ -0,0 +1,335 @@
+'use strict';
+var __spreadArray =
+ (this && this.__spreadArray) ||
+ function (to, from) {
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
+ to[j] = from[i];
+ return to;
+ };
+var __importDefault =
+ (this && this.__importDefault) ||
+ function (mod) {
+ return mod && mod.__esModule ? mod : { default: mod };
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('./utils');
+var toast_1 = __importDefault(require('../toast/toast'));
+var utils_2 = require('../common/utils');
+component_1.VantComponent({
+ props: {
+ title: {
+ type: String,
+ value: '日期选择',
+ },
+ color: String,
+ show: {
+ type: Boolean,
+ observer: function (val) {
+ if (val) {
+ this.initRect();
+ this.scrollIntoView();
+ }
+ },
+ },
+ formatter: null,
+ confirmText: {
+ type: String,
+ value: '确定',
+ },
+ rangePrompt: String,
+ showRangePrompt: {
+ type: Boolean,
+ value: true,
+ },
+ defaultDate: {
+ type: null,
+ observer: function (val) {
+ this.setData({ currentDate: val });
+ this.scrollIntoView();
+ },
+ },
+ allowSameDay: Boolean,
+ confirmDisabledText: String,
+ type: {
+ type: String,
+ value: 'single',
+ observer: 'reset',
+ },
+ minDate: {
+ type: null,
+ value: Date.now(),
+ },
+ maxDate: {
+ type: null,
+ value: new Date(
+ new Date().getFullYear(),
+ new Date().getMonth() + 6,
+ new Date().getDate()
+ ).getTime(),
+ },
+ position: {
+ type: String,
+ value: 'bottom',
+ },
+ rowHeight: {
+ type: null,
+ value: utils_1.ROW_HEIGHT,
+ },
+ round: {
+ type: Boolean,
+ value: true,
+ },
+ poppable: {
+ type: Boolean,
+ value: true,
+ },
+ showMark: {
+ type: Boolean,
+ value: true,
+ },
+ showTitle: {
+ type: Boolean,
+ value: true,
+ },
+ showConfirm: {
+ type: Boolean,
+ value: true,
+ },
+ showSubtitle: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ maxRange: {
+ type: null,
+ value: null,
+ },
+ firstDayOfWeek: {
+ type: Number,
+ value: 0,
+ },
+ },
+ data: {
+ subtitle: '',
+ currentDate: null,
+ scrollIntoView: '',
+ },
+ created: function () {
+ this.setData({
+ currentDate: this.getInitialDate(),
+ });
+ },
+ mounted: function () {
+ if (this.data.show || !this.data.poppable) {
+ this.initRect();
+ this.scrollIntoView();
+ }
+ },
+ methods: {
+ reset: function () {
+ this.setData({ currentDate: this.getInitialDate() });
+ this.scrollIntoView();
+ },
+ initRect: function () {
+ var _this = this;
+ if (this.contentObserver != null) {
+ this.contentObserver.disconnect();
+ }
+ var contentObserver = this.createIntersectionObserver({
+ thresholds: [0, 0.1, 0.9, 1],
+ observeAll: true,
+ });
+ this.contentObserver = contentObserver;
+ contentObserver.relativeTo('.van-calendar__body');
+ contentObserver.observe('.month', function (res) {
+ if (res.boundingClientRect.top <= res.relativeRect.top) {
+ // @ts-ignore
+ _this.setData({
+ subtitle: utils_1.formatMonthTitle(res.dataset.date),
+ });
+ }
+ });
+ },
+ getInitialDate: function () {
+ var _a = this.data,
+ type = _a.type,
+ defaultDate = _a.defaultDate,
+ minDate = _a.minDate;
+ if (type === 'range') {
+ var _b = defaultDate || [],
+ startDay = _b[0],
+ endDay = _b[1];
+ return [
+ startDay || minDate,
+ endDay || utils_1.getNextDay(new Date(minDate)).getTime(),
+ ];
+ }
+ if (type === 'multiple') {
+ return defaultDate || [minDate];
+ }
+ return defaultDate || minDate;
+ },
+ scrollIntoView: function () {
+ var _this = this;
+ utils_2.requestAnimationFrame(function () {
+ var _a = _this.data,
+ currentDate = _a.currentDate,
+ type = _a.type,
+ show = _a.show,
+ poppable = _a.poppable,
+ minDate = _a.minDate,
+ maxDate = _a.maxDate;
+ // @ts-ignore
+ var targetDate = type === 'single' ? currentDate : currentDate[0];
+ var displayed = show || !poppable;
+ if (!targetDate || !displayed) {
+ return;
+ }
+ var months = utils_1.getMonths(minDate, maxDate);
+ months.some(function (month, index) {
+ if (utils_1.compareMonth(month, targetDate) === 0) {
+ _this.setData({ scrollIntoView: 'month' + index });
+ return true;
+ }
+ return false;
+ });
+ });
+ },
+ onOpen: function () {
+ this.$emit('open');
+ },
+ onOpened: function () {
+ this.$emit('opened');
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ onClosed: function () {
+ this.$emit('closed');
+ },
+ onClickDay: function (event) {
+ var date = event.detail.date;
+ var _a = this.data,
+ type = _a.type,
+ currentDate = _a.currentDate,
+ allowSameDay = _a.allowSameDay;
+ if (type === 'range') {
+ // @ts-ignore
+ var startDay = currentDate[0],
+ endDay = currentDate[1];
+ if (startDay && !endDay) {
+ var compareToStart = utils_1.compareDay(date, startDay);
+ if (compareToStart === 1) {
+ this.select([startDay, date], true);
+ } else if (compareToStart === -1) {
+ this.select([date, null]);
+ } else if (allowSameDay) {
+ this.select([date, date]);
+ }
+ } else {
+ this.select([date, null]);
+ }
+ } else if (type === 'multiple') {
+ var selectedIndex_1;
+ // @ts-ignore
+ var selected = currentDate.some(function (dateItem, index) {
+ var equal = utils_1.compareDay(dateItem, date) === 0;
+ if (equal) {
+ selectedIndex_1 = index;
+ }
+ return equal;
+ });
+ if (selected) {
+ // @ts-ignore
+ var cancelDate = currentDate.splice(selectedIndex_1, 1);
+ this.setData({ currentDate: currentDate });
+ this.unselect(cancelDate);
+ } else {
+ // @ts-ignore
+ this.select(__spreadArray(__spreadArray([], currentDate), [date]));
+ }
+ } else {
+ this.select(date, true);
+ }
+ },
+ unselect: function (dateArray) {
+ var date = dateArray[0];
+ if (date) {
+ this.$emit('unselect', utils_1.copyDates(date));
+ }
+ },
+ select: function (date, complete) {
+ if (complete && this.data.type === 'range') {
+ var valid = this.checkRange(date);
+ if (!valid) {
+ // auto selected to max range if showConfirm
+ if (this.data.showConfirm) {
+ this.emit([
+ date[0],
+ utils_1.getDayByOffset(date[0], this.data.maxRange - 1),
+ ]);
+ } else {
+ this.emit(date);
+ }
+ return;
+ }
+ }
+ this.emit(date);
+ if (complete && !this.data.showConfirm) {
+ this.onConfirm();
+ }
+ },
+ emit: function (date) {
+ var getTime = function (date) {
+ return date instanceof Date ? date.getTime() : date;
+ };
+ this.setData({
+ currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),
+ });
+ this.$emit('select', utils_1.copyDates(date));
+ },
+ checkRange: function (date) {
+ var _a = this.data,
+ maxRange = _a.maxRange,
+ rangePrompt = _a.rangePrompt,
+ showRangePrompt = _a.showRangePrompt;
+ if (maxRange && utils_1.calcDateNum(date) > maxRange) {
+ if (showRangePrompt) {
+ toast_1.default({
+ duration: 0,
+ context: this,
+ message:
+ rangePrompt ||
+ '\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 ' +
+ maxRange +
+ ' \u5929',
+ });
+ }
+ this.$emit('over-range');
+ return false;
+ }
+ return true;
+ },
+ onConfirm: function () {
+ var _this = this;
+ if (
+ this.data.type === 'range' &&
+ !this.checkRange(this.data.currentDate)
+ ) {
+ return;
+ }
+ wx.nextTick(function () {
+ // @ts-ignore
+ _this.$emit('confirm', utils_1.copyDates(_this.data.currentDate));
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.json
new file mode 100644
index 00000000..397d5aea
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.json
@@ -0,0 +1,10 @@
+{
+ "component": true,
+ "usingComponents": {
+ "header": "./components/header/index",
+ "month": "./components/month/index",
+ "van-button": "../button/index",
+ "van-popup": "../popup/index",
+ "van-toast": "../toast/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxml
new file mode 100644
index 00000000..7df0b980
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxs
new file mode 100644
index 00000000..2c04be10
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxs
@@ -0,0 +1,37 @@
+/* eslint-disable */
+var utils = require('./utils.wxs');
+
+function getMonths(minDate, maxDate) {
+ var months = [];
+ var cursor = getDate(minDate);
+
+ cursor.setDate(1);
+
+ do {
+ months.push(cursor.getTime());
+ cursor.setMonth(cursor.getMonth() + 1);
+ } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);
+
+ return months;
+}
+
+function getButtonDisabled(type, currentDate) {
+ if (currentDate == null) {
+ return true;
+ }
+
+ if (type === 'range') {
+ return !currentDate[0] || !currentDate[1];
+ }
+
+ if (type === 'multiple') {
+ return !currentDate.length;
+ }
+
+ return !currentDate;
+}
+
+module.exports = {
+ getMonths: getMonths,
+ getButtonDisabled: getButtonDisabled
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxss
new file mode 100644
index 00000000..9d78e0f4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;height:var(--calendar-height,100%);background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:80%;height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:36px!important;height:var(--calendar-confirm-button-height,36px)!important;margin:7px 0!important;margin:var(--calendar-confirm-button-margin,7px 0)!important;line-height:34px!important;line-height:var(--calendar-confirm-button-line-height,34px)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/utils.js
new file mode 100644
index 00000000..cdd1a0cb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/utils.js
@@ -0,0 +1,91 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.getMonths = exports.getMonthEndDay = exports.copyDates = exports.calcDateNum = exports.getNextDay = exports.getPrevDay = exports.getDayByOffset = exports.compareDay = exports.compareMonth = exports.formatMonthTitle = exports.ROW_HEIGHT = void 0;
+exports.ROW_HEIGHT = 64;
+function formatMonthTitle(date) {
+ if (!(date instanceof Date)) {
+ date = new Date(date);
+ }
+ return date.getFullYear() + '\u5E74' + (date.getMonth() + 1) + '\u6708';
+}
+exports.formatMonthTitle = formatMonthTitle;
+function compareMonth(date1, date2) {
+ if (!(date1 instanceof Date)) {
+ date1 = new Date(date1);
+ }
+ if (!(date2 instanceof Date)) {
+ date2 = new Date(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;
+}
+exports.compareMonth = compareMonth;
+function compareDay(day1, day2) {
+ if (!(day1 instanceof Date)) {
+ day1 = new Date(day1);
+ }
+ if (!(day2 instanceof Date)) {
+ day2 = new Date(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;
+}
+exports.compareDay = compareDay;
+function getDayByOffset(date, offset) {
+ date = new Date(date);
+ date.setDate(date.getDate() + offset);
+ return date;
+}
+exports.getDayByOffset = getDayByOffset;
+function getPrevDay(date) {
+ return getDayByOffset(date, -1);
+}
+exports.getPrevDay = getPrevDay;
+function getNextDay(date) {
+ return getDayByOffset(date, 1);
+}
+exports.getNextDay = getNextDay;
+function calcDateNum(date) {
+ var day1 = new Date(date[0]).getTime();
+ var day2 = new Date(date[1]).getTime();
+ return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
+}
+exports.calcDateNum = calcDateNum;
+function copyDates(dates) {
+ if (Array.isArray(dates)) {
+ return dates.map(function (date) {
+ if (date === null) {
+ return date;
+ }
+ return new Date(date);
+ });
+ }
+ return new Date(dates);
+}
+exports.copyDates = copyDates;
+function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+}
+exports.getMonthEndDay = getMonthEndDay;
+function getMonths(minDate, maxDate) {
+ var months = [];
+ var cursor = new Date(minDate);
+ cursor.setDate(1);
+ do {
+ months.push(cursor.getTime());
+ cursor.setMonth(cursor.getMonth() + 1);
+ } while (compareMonth(cursor, maxDate) !== 1);
+ return months;
+}
+exports.getMonths = getMonths;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/utils.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/utils.wxs
new file mode 100644
index 00000000..e57f6b32
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/calendar/utils.wxs
@@ -0,0 +1,25 @@
+/* eslint-disable */
+function getMonthEndDay(year, month) {
+ return 32 - getDate(year, month - 1, 32).getDate();
+}
+
+function compareMonth(date1, date2) {
+ date1 = getDate(date1);
+ date2 = getDate(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;
+}
+
+module.exports = {
+ getMonthEndDay: getMonthEndDay,
+ compareMonth: compareMonth
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.js
new file mode 100644
index 00000000..cb0f9827
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.js
@@ -0,0 +1,51 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var link_1 = require('../mixins/link');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: [
+ 'num-class',
+ 'desc-class',
+ 'thumb-class',
+ 'title-class',
+ 'price-class',
+ 'origin-price-class',
+ ],
+ mixins: [link_1.link],
+ props: {
+ tag: String,
+ num: String,
+ desc: String,
+ thumb: String,
+ title: String,
+ price: {
+ type: String,
+ observer: 'updatePrice',
+ },
+ centered: Boolean,
+ lazyLoad: Boolean,
+ thumbLink: String,
+ originPrice: String,
+ thumbMode: {
+ type: String,
+ value: 'aspectFit',
+ },
+ currency: {
+ type: String,
+ value: '¥',
+ },
+ },
+ methods: {
+ updatePrice: function () {
+ var price = this.data.price;
+ var priceArr = price.toString().split('.');
+ this.setData({
+ integerStr: priceArr[0],
+ decimalStr: priceArr[1] ? '.' + priceArr[1] : '',
+ });
+ },
+ onClickThumb: function () {
+ this.jumpLink('thumbLink');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.json
new file mode 100644
index 00000000..e9174076
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-tag": "../tag/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.wxml
new file mode 100644
index 00000000..62173e4a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.wxss
new file mode 100644
index 00000000..a21a5995
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/card/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-card{position:relative;box-sizing:border-box;padding:8px 16px;padding:var(--card-padding,8px 16px);font-size:12px;font-size:var(--card-font-size,12px);color:#323233;color:var(--card-text-color,#323233);background-color:#fafafa;background-color:var(--card-background-color,#fafafa)}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;-webkit-flex:none;flex:none;width:88px;width:var(--card-thumb-size,88px);height:88px;height:var(--card-thumb-size,88px);margin-right:8px;margin-right:var(--padding-xs,8px)}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%;border-radius:8px;border-radius:var(--border-radius-lg,8px)}.van-card__content{position:relative;display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;justify-content:space-between;min-width:0;min-height:88px;min-height:var(--card-thumb-size,88px)}.van-card__content--center{-webkit-justify-content:center;justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:16px;line-height:var(--card-title-line-height,16px)}.van-card__desc{line-height:20px;line-height:var(--card-desc-line-height,20px);color:#646566;color:var(--card-desc-color,#646566)}.van-card__bottom{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#ee0a24;color:var(--card-price-color,#ee0a24);font-size:12px;font-size:var(--card-price-font-size,12px)}.van-card__price-integer{font-size:16px;font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{display:inline-block;margin-left:5px;text-decoration:line-through;font-size:10px;font-size:var(--card-origin-price-font-size,10px);color:#646566;color:var(--card-origin-price-color,#646566)}.van-card__num{float:right}.van-card__tag{position:absolute!important;top:2px;left:0}.van-card__footer{-webkit-flex:none;flex:none;width:100%;text-align:right}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.js
new file mode 100644
index 00000000..7d934870
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.js
@@ -0,0 +1,12 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ title: String,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.wxml
new file mode 100644
index 00000000..6e0b471d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.wxml
@@ -0,0 +1,9 @@
+
+ {{ title }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.wxss
new file mode 100644
index 00000000..edbccd59
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.js
new file mode 100644
index 00000000..7a18c9f2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.js
@@ -0,0 +1,40 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var link_1 = require('../mixins/link');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: [
+ 'title-class',
+ 'label-class',
+ 'value-class',
+ 'right-icon-class',
+ 'hover-class',
+ ],
+ mixins: [link_1.link],
+ props: {
+ title: null,
+ value: null,
+ icon: String,
+ size: String,
+ label: String,
+ center: Boolean,
+ isLink: Boolean,
+ required: Boolean,
+ clickable: Boolean,
+ titleWidth: String,
+ customStyle: String,
+ arrowDirection: String,
+ useLabelSlot: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ titleStyle: String,
+ },
+ methods: {
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxml
new file mode 100644
index 00000000..8387c3c8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+ {{ label }}
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxs
new file mode 100644
index 00000000..e3500c43
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxs
@@ -0,0 +1,17 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function titleStyle(data) {
+ return style([
+ {
+ 'max-width': addUnit(data.titleWidth),
+ 'min-width': addUnit(data.titleWidth),
+ },
+ data.titleStyle,
+ ]);
+}
+
+module.exports = {
+ titleStyle: titleStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxss
new file mode 100644
index 00000000..605570db
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:4px;margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{margin-left:4px;margin-left:var(--padding-base,4px);color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.js
new file mode 100644
index 00000000..1c8016a6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.js
@@ -0,0 +1,38 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var relation_1 = require('../common/relation');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ relation: relation_1.useChildren('checkbox', function (target) {
+ this.updateChild(target);
+ }),
+ props: {
+ max: Number,
+ value: {
+ type: Array,
+ observer: 'updateChildren',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren: function () {
+ var _this = this;
+ this.children.forEach(function (child) {
+ return _this.updateChild(child);
+ });
+ },
+ updateChild: function (child) {
+ var _a = this.data,
+ value = _a.value,
+ disabled = _a.disabled;
+ child.setData({
+ value: value.indexOf(child.data.name) !== -1,
+ parentDisabled: disabled,
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.wxml
new file mode 100644
index 00000000..4fa864ce
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.wxml
@@ -0,0 +1 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.js
new file mode 100644
index 00000000..7b9598bb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.js
@@ -0,0 +1,83 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var relation_1 = require('../common/relation');
+var component_1 = require('../common/component');
+function emit(target, value) {
+ target.$emit('input', value);
+ target.$emit('change', value);
+}
+component_1.VantComponent({
+ field: true,
+ relation: relation_1.useParent('checkbox-group'),
+ classes: ['icon-class', 'label-class'],
+ props: {
+ value: Boolean,
+ disabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
+ labelPosition: {
+ type: String,
+ value: 'right',
+ },
+ labelDisabled: Boolean,
+ shape: {
+ type: String,
+ value: 'round',
+ },
+ iconSize: {
+ type: null,
+ value: 20,
+ },
+ },
+ data: {
+ parentDisabled: false,
+ },
+ methods: {
+ emitChange: function (value) {
+ if (this.parent) {
+ this.setParentValue(this.parent, value);
+ } else {
+ emit(this, value);
+ }
+ },
+ toggle: function () {
+ var _a = this.data,
+ parentDisabled = _a.parentDisabled,
+ disabled = _a.disabled,
+ value = _a.value;
+ if (!disabled && !parentDisabled) {
+ this.emitChange(!value);
+ }
+ },
+ onClickLabel: function () {
+ var _a = this.data,
+ labelDisabled = _a.labelDisabled,
+ parentDisabled = _a.parentDisabled,
+ disabled = _a.disabled,
+ value = _a.value;
+ if (!disabled && !labelDisabled && !parentDisabled) {
+ this.emitChange(!value);
+ }
+ },
+ setParentValue: function (parent, value) {
+ var parentValue = parent.data.value.slice();
+ var name = this.data.name;
+ var max = parent.data.max;
+ if (value) {
+ if (max && parentValue.length >= max) {
+ return;
+ }
+ if (parentValue.indexOf(name) === -1) {
+ parentValue.push(name);
+ emit(parent, parentValue);
+ }
+ } else {
+ var index = parentValue.indexOf(name);
+ if (index !== -1) {
+ parentValue.splice(index, 1);
+ emit(parent, parentValue);
+ }
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxml
new file mode 100644
index 00000000..0c008d81
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxs
new file mode 100644
index 00000000..eb9c7726
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxs
@@ -0,0 +1,20 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
+ var styles = {
+ 'font-size': addUnit(iconSize),
+ };
+
+ if (checkedColor && value && !disabled && !parentDisabled) {
+ styles['border-color'] = checkedColor;
+ styles['background-color'] = checkedColor;
+ }
+
+ return style(styles);
+}
+
+module.exports = {
+ iconStyle: iconStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxss
new file mode 100644
index 00000000..afaf37be
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/checkbox/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/canvas.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/canvas.js
new file mode 100644
index 00000000..dbee1d73
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/canvas.js
@@ -0,0 +1,47 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.adaptor = void 0;
+function adaptor(ctx) {
+ // @ts-ignore
+ return Object.assign(ctx, {
+ setStrokeStyle: function (val) {
+ ctx.strokeStyle = val;
+ },
+ setLineWidth: function (val) {
+ ctx.lineWidth = val;
+ },
+ setLineCap: function (val) {
+ ctx.lineCap = val;
+ },
+ setFillStyle: function (val) {
+ ctx.fillStyle = val;
+ },
+ setFontSize: function (val) {
+ ctx.font = String(val);
+ },
+ setGlobalAlpha: function (val) {
+ ctx.globalAlpha = val;
+ },
+ setLineJoin: function (val) {
+ ctx.lineJoin = val;
+ },
+ setTextAlign: function (val) {
+ ctx.textAlign = val;
+ },
+ setMiterLimit: function (val) {
+ ctx.miterLimit = val;
+ },
+ setShadow: function (offsetX, offsetY, blur, color) {
+ ctx.shadowOffsetX = offsetX;
+ ctx.shadowOffsetY = offsetY;
+ ctx.shadowBlur = blur;
+ ctx.shadowColor = color;
+ },
+ setTextBaseline: function (val) {
+ ctx.textBaseline = val;
+ },
+ createCircularGradient: function () {},
+ draw: function () {},
+ });
+}
+exports.adaptor = adaptor;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.js
new file mode 100644
index 00000000..e4f02479
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.js
@@ -0,0 +1,215 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var color_1 = require('../common/color');
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var validator_1 = require('../common/validator');
+var version_1 = require('../common/version');
+var canvas_1 = require('./canvas');
+function format(rate) {
+ return Math.min(Math.max(rate, 0), 100);
+}
+var PERIMETER = 2 * Math.PI;
+var BEGIN_ANGLE = -Math.PI / 2;
+var STEP = 1;
+component_1.VantComponent({
+ props: {
+ text: String,
+ lineCap: {
+ type: String,
+ value: 'round',
+ },
+ value: {
+ type: Number,
+ value: 0,
+ observer: 'reRender',
+ },
+ speed: {
+ type: Number,
+ value: 50,
+ },
+ size: {
+ type: Number,
+ value: 100,
+ observer: function () {
+ this.drawCircle(this.currentValue);
+ },
+ },
+ fill: String,
+ layerColor: {
+ type: String,
+ value: color_1.WHITE,
+ },
+ color: {
+ type: null,
+ value: color_1.BLUE,
+ observer: function () {
+ var _this = this;
+ this.setHoverColor().then(function () {
+ _this.drawCircle(_this.currentValue);
+ });
+ },
+ },
+ type: {
+ type: String,
+ value: '',
+ },
+ strokeWidth: {
+ type: Number,
+ value: 4,
+ },
+ clockwise: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ hoverColor: color_1.BLUE,
+ },
+ methods: {
+ getContext: function () {
+ var _this = this;
+ var _a = this.data,
+ type = _a.type,
+ size = _a.size;
+ if (type === '' || !version_1.canIUseCanvas2d()) {
+ var ctx = wx.createCanvasContext('van-circle', this);
+ return Promise.resolve(ctx);
+ }
+ var dpr = utils_1.getSystemInfoSync().pixelRatio;
+ return new Promise(function (resolve) {
+ wx.createSelectorQuery()
+ .in(_this)
+ .select('#van-circle')
+ .node()
+ .exec(function (res) {
+ var canvas = res[0].node;
+ var ctx = canvas.getContext(type);
+ if (!_this.inited) {
+ _this.inited = true;
+ canvas.width = size * dpr;
+ canvas.height = size * dpr;
+ ctx.scale(dpr, dpr);
+ }
+ resolve(canvas_1.adaptor(ctx));
+ });
+ });
+ },
+ setHoverColor: function () {
+ var _this = this;
+ var _a = this.data,
+ color = _a.color,
+ size = _a.size;
+ if (validator_1.isObj(color)) {
+ return this.getContext().then(function (context) {
+ var LinearColor = context.createLinearGradient(size, 0, 0, 0);
+ Object.keys(color)
+ .sort(function (a, b) {
+ return parseFloat(a) - parseFloat(b);
+ })
+ .map(function (key) {
+ return LinearColor.addColorStop(
+ parseFloat(key) / 100,
+ color[key]
+ );
+ });
+ _this.hoverColor = LinearColor;
+ });
+ }
+ this.hoverColor = color;
+ return Promise.resolve();
+ },
+ presetCanvas: function (context, strokeStyle, beginAngle, endAngle, fill) {
+ var _a = this.data,
+ strokeWidth = _a.strokeWidth,
+ lineCap = _a.lineCap,
+ clockwise = _a.clockwise,
+ size = _a.size;
+ var position = size / 2;
+ var radius = position - strokeWidth / 2;
+ context.setStrokeStyle(strokeStyle);
+ context.setLineWidth(strokeWidth);
+ context.setLineCap(lineCap);
+ context.beginPath();
+ context.arc(position, position, radius, beginAngle, endAngle, !clockwise);
+ context.stroke();
+ if (fill) {
+ context.setFillStyle(fill);
+ context.fill();
+ }
+ },
+ renderLayerCircle: function (context) {
+ var _a = this.data,
+ layerColor = _a.layerColor,
+ fill = _a.fill;
+ this.presetCanvas(context, layerColor, 0, PERIMETER, fill);
+ },
+ renderHoverCircle: function (context, formatValue) {
+ var clockwise = this.data.clockwise;
+ // 结束角度
+ var progress = PERIMETER * (formatValue / 100);
+ var endAngle = clockwise
+ ? BEGIN_ANGLE + progress
+ : 3 * Math.PI - (BEGIN_ANGLE + progress);
+ this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);
+ },
+ drawCircle: function (currentValue) {
+ var _this = this;
+ var size = this.data.size;
+ this.getContext().then(function (context) {
+ context.clearRect(0, 0, size, size);
+ _this.renderLayerCircle(context);
+ var formatValue = format(currentValue);
+ if (formatValue !== 0) {
+ _this.renderHoverCircle(context, formatValue);
+ }
+ context.draw();
+ });
+ },
+ reRender: function () {
+ var _this = this;
+ // tofector 动画暂时没有想到好的解决方案
+ var _a = this.data,
+ value = _a.value,
+ speed = _a.speed;
+ if (speed <= 0 || speed > 1000) {
+ this.drawCircle(value);
+ return;
+ }
+ this.clearInterval();
+ this.currentValue = this.currentValue || 0;
+ this.interval = setInterval(function () {
+ if (_this.currentValue !== value) {
+ if (Math.abs(_this.currentValue - value) < STEP) {
+ _this.currentValue = value;
+ } else {
+ if (_this.currentValue < value) {
+ _this.currentValue += STEP;
+ } else {
+ _this.currentValue -= STEP;
+ }
+ }
+ _this.drawCircle(_this.currentValue);
+ } else {
+ _this.clearInterval();
+ }
+ }, 1000 / speed);
+ },
+ clearInterval: function () {
+ if (this.interval) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ },
+ mounted: function () {
+ var _this = this;
+ this.currentValue = this.data.value;
+ this.setHoverColor().then(function () {
+ _this.drawCircle(_this.currentValue);
+ });
+ },
+ destroyed: function () {
+ this.clearInterval();
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.wxml
new file mode 100644
index 00000000..52bc59fc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+ {{ text }}
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.wxss
new file mode 100644
index 00000000..3ab63dfd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/circle/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-circle{position:relative;display:inline-block;text-align:center}.van-circle__text{position:absolute;top:50%;left:0;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#323233;color:var(--circle-text-color,#323233)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.js
new file mode 100644
index 00000000..a33c44b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.js
@@ -0,0 +1,11 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var relation_1 = require('../common/relation');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: relation_1.useParent('row'),
+ props: {
+ span: Number,
+ offset: Number,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxml
new file mode 100644
index 00000000..975348b6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxs
new file mode 100644
index 00000000..507c1cb9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ if (!data.gutter) {
+ return '';
+ }
+
+ return style({
+ 'padding-right': addUnit(data.gutter / 2),
+ 'padding-left': addUnit(data.gutter / 2),
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxss
new file mode 100644
index 00000000..44c896a3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/col/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/animate.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/animate.js
new file mode 100644
index 00000000..43173837
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/animate.js
@@ -0,0 +1,77 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.setContentAnimate = void 0;
+var version_1 = require('../common/version');
+var utils_1 = require('../common/utils');
+function useAnimate(context, expanded, mounted, height) {
+ var selector = '.van-collapse-item__wrapper';
+ if (expanded) {
+ context.animate(
+ selector,
+ [
+ { height: 0, ease: 'ease-in-out', offset: 0 },
+ { height: height + 'px', ease: 'ease-in-out', offset: 1 },
+ { height: 'auto', ease: 'ease-in-out', offset: 1 },
+ ],
+ mounted ? 300 : 0,
+ function () {
+ context.clearAnimation(selector);
+ }
+ );
+ return;
+ }
+ context.animate(
+ selector,
+ [
+ { height: height + 'px', ease: 'ease-in-out', offset: 0 },
+ { height: 0, ease: 'ease-in-out', offset: 1 },
+ ],
+ 300,
+ function () {
+ context.clearAnimation(selector);
+ }
+ );
+}
+function useAnimation(context, expanded, mounted, height) {
+ var animation = wx.createAnimation({
+ duration: 0,
+ timingFunction: 'ease-in-out',
+ });
+ if (expanded) {
+ if (height === 0) {
+ animation.height('auto').top(1).step();
+ } else {
+ animation
+ .height(height)
+ .top(1)
+ .step({
+ duration: mounted ? 300 : 1,
+ })
+ .height('auto')
+ .step();
+ }
+ context.setData({
+ animation: animation.export(),
+ });
+ return;
+ }
+ animation.height(height).top(0).step({ duration: 1 }).height(0).step({
+ duration: 300,
+ });
+ context.setData({
+ animation: animation.export(),
+ });
+}
+function setContentAnimate(context, expanded, mounted) {
+ utils_1
+ .getRect(context, '.van-collapse-item__content')
+ .then(function (rect) {
+ return rect.height;
+ })
+ .then(function (height) {
+ version_1.canIUseAnimate()
+ ? useAnimate(context, expanded, mounted, height)
+ : useAnimation(context, expanded, mounted, height);
+ });
+}
+exports.setContentAnimate = setContentAnimate;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.js
new file mode 100644
index 00000000..b30315cf
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.js
@@ -0,0 +1,68 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+var animate_1 = require('./animate');
+component_1.VantComponent({
+ classes: ['title-class', 'content-class'],
+ relation: relation_1.useParent('collapse'),
+ props: {
+ name: null,
+ title: null,
+ value: null,
+ icon: String,
+ label: String,
+ disabled: Boolean,
+ clickable: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ isLink: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ expanded: false,
+ },
+ mounted: function () {
+ this.updateExpanded();
+ this.mounted = true;
+ },
+ methods: {
+ updateExpanded: function () {
+ if (!this.parent) {
+ return;
+ }
+ var _a = this.parent.data,
+ value = _a.value,
+ accordion = _a.accordion;
+ var _b = this.parent.children,
+ children = _b === void 0 ? [] : _b;
+ var name = this.data.name;
+ var index = children.indexOf(this);
+ var currentName = name == null ? index : name;
+ var expanded = accordion
+ ? value === currentName
+ : (value || []).some(function (name) {
+ return name === currentName;
+ });
+ if (expanded !== this.data.expanded) {
+ animate_1.setContentAnimate(this, expanded, this.mounted);
+ }
+ this.setData({ index: index, expanded: expanded });
+ },
+ onClick: function () {
+ if (this.data.disabled) {
+ return;
+ }
+ var _a = this.data,
+ name = _a.name,
+ expanded = _a.expanded;
+ var index = this.parent.children.indexOf(this);
+ var currentName = name == null ? index : name;
+ this.parent.switch(currentName, !expanded);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.json
new file mode 100644
index 00000000..0e5425cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.wxml
new file mode 100644
index 00000000..ae4cc831
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.wxss
new file mode 100644
index 00000000..0bb936c0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.js
new file mode 100644
index 00000000..4e2c0973
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.js
@@ -0,0 +1,50 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ relation: relation_1.useChildren('collapse-item'),
+ props: {
+ value: {
+ type: null,
+ observer: 'updateExpanded',
+ },
+ accordion: {
+ type: Boolean,
+ observer: 'updateExpanded',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updateExpanded: function () {
+ this.children.forEach(function (child) {
+ child.updateExpanded();
+ });
+ },
+ switch: function (name, expanded) {
+ var _a = this.data,
+ accordion = _a.accordion,
+ value = _a.value;
+ var changeItem = name;
+ if (!accordion) {
+ name = expanded
+ ? (value || []).concat(name)
+ : (value || []).filter(function (activeName) {
+ return activeName !== name;
+ });
+ } else {
+ name = expanded ? name : '';
+ }
+ if (expanded) {
+ this.$emit('open', changeItem);
+ } else {
+ this.$emit('close', changeItem);
+ }
+ this.$emit('change', name);
+ this.$emit('input', name);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.wxml
new file mode 100644
index 00000000..fd4e1719
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/collapse/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/color.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/color.js
new file mode 100644
index 00000000..885acaa7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/color.js
@@ -0,0 +1,10 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.GRAY_DARK = exports.GRAY = exports.ORANGE = exports.GREEN = exports.WHITE = exports.BLUE = exports.RED = void 0;
+exports.RED = '#ee0a24';
+exports.BLUE = '#1989fa';
+exports.WHITE = '#fff';
+exports.GREEN = '#07c160';
+exports.ORANGE = '#ff976a';
+exports.GRAY = '#323233';
+exports.GRAY_DARK = '#969799';
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/component.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/component.js
new file mode 100644
index 00000000..2274506e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/component.js
@@ -0,0 +1,48 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.VantComponent = void 0;
+var basic_1 = require('../mixins/basic');
+function mapKeys(source, target, map) {
+ Object.keys(map).forEach(function (key) {
+ if (source[key]) {
+ target[map[key]] = source[key];
+ }
+ });
+}
+function VantComponent(vantOptions) {
+ var options = {};
+ mapKeys(vantOptions, options, {
+ data: 'data',
+ props: 'properties',
+ mixins: 'behaviors',
+ methods: 'methods',
+ beforeCreate: 'created',
+ created: 'attached',
+ mounted: 'ready',
+ destroyed: 'detached',
+ classes: 'externalClasses',
+ });
+ // add default externalClasses
+ options.externalClasses = options.externalClasses || [];
+ options.externalClasses.push('custom-class');
+ // add default behaviors
+ options.behaviors = options.behaviors || [];
+ options.behaviors.push(basic_1.basic);
+ // add relations
+ var relation = vantOptions.relation;
+ if (relation) {
+ options.relations = relation.relations;
+ options.behaviors.push(relation.mixin);
+ }
+ // map field to form-field behavior
+ if (vantOptions.field) {
+ options.behaviors.push('wx://form-field');
+ }
+ // add default options
+ options.options = {
+ multipleSlots: true,
+ addGlobalClass: true,
+ };
+ Component(options);
+}
+exports.VantComponent = VantComponent;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/index.wxss
new file mode 100644
index 00000000..976825d7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/index.wxss
@@ -0,0 +1 @@
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.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--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;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--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{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/relation.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/relation.js
new file mode 100644
index 00000000..fcf9824c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/relation.js
@@ -0,0 +1,79 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.useChildren = exports.useParent = void 0;
+function useParent(name, onEffect) {
+ var _a;
+ var path = '../' + name + '/index';
+ return {
+ relations:
+ ((_a = {}),
+ (_a[path] = {
+ type: 'ancestor',
+ linked: function () {
+ onEffect && onEffect.call(this);
+ },
+ linkChanged: function () {
+ onEffect && onEffect.call(this);
+ },
+ unlinked: function () {
+ onEffect && onEffect.call(this);
+ },
+ }),
+ _a),
+ mixin: Behavior({
+ created: function () {
+ var _this = this;
+ Object.defineProperty(this, 'parent', {
+ get: function () {
+ return _this.getRelationNodes(path)[0];
+ },
+ });
+ Object.defineProperty(this, 'index', {
+ // @ts-ignore
+ get: function () {
+ var _a, _b;
+ return (_b =
+ (_a = _this.parent) === null || _a === void 0
+ ? void 0
+ : _a.children) === null || _b === void 0
+ ? void 0
+ : _b.indexOf(_this);
+ },
+ });
+ },
+ }),
+ };
+}
+exports.useParent = useParent;
+function useChildren(name, onEffect) {
+ var _a;
+ var path = '../' + name + '/index';
+ return {
+ relations:
+ ((_a = {}),
+ (_a[path] = {
+ type: 'descendant',
+ linked: function (target) {
+ onEffect && onEffect.call(this, target);
+ },
+ linkChanged: function (target) {
+ onEffect && onEffect.call(this, target);
+ },
+ unlinked: function (target) {
+ onEffect && onEffect.call(this, target);
+ },
+ }),
+ _a),
+ mixin: Behavior({
+ created: function () {
+ var _this = this;
+ Object.defineProperty(this, 'children', {
+ get: function () {
+ return _this.getRelationNodes(path) || [];
+ },
+ });
+ },
+ }),
+ };
+}
+exports.useChildren = useChildren;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/clearfix.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/clearfix.wxss
new file mode 100644
index 00000000..a0ca8384
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/clearfix.wxss
@@ -0,0 +1 @@
+.van-clearfix:after{display:table;clear:both;content:""}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/ellipsis.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/ellipsis.wxss
new file mode 100644
index 00000000..1e9dbc9e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/ellipsis.wxss
@@ -0,0 +1 @@
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/hairline.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/hairline.wxss
new file mode 100644
index 00000000..49b9e656
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/hairline.wxss
@@ -0,0 +1 @@
+.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--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;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--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{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/clearfix.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/clearfix.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/ellipsis.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/ellipsis.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/hairline.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/hairline.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/theme.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/theme.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/var.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/var.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/utils.js
new file mode 100644
index 00000000..c2cac34c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/utils.js
@@ -0,0 +1,113 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.getCurrentPage = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.getSystemInfoSync = exports.nextTick = exports.range = void 0;
+var validator_1 = require('./validator');
+var version_1 = require('./version');
+function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+exports.range = range;
+function nextTick(cb) {
+ if (version_1.canIUseNextTick()) {
+ wx.nextTick(cb);
+ } else {
+ setTimeout(function () {
+ cb();
+ }, 1000 / 30);
+ }
+}
+exports.nextTick = nextTick;
+var systemInfo;
+function getSystemInfoSync() {
+ if (systemInfo == null) {
+ systemInfo = wx.getSystemInfoSync();
+ }
+ return systemInfo;
+}
+exports.getSystemInfoSync = getSystemInfoSync;
+function addUnit(value) {
+ if (!validator_1.isDef(value)) {
+ return undefined;
+ }
+ value = String(value);
+ return validator_1.isNumber(value) ? value + 'px' : value;
+}
+exports.addUnit = addUnit;
+function requestAnimationFrame(cb) {
+ var systemInfo = getSystemInfoSync();
+ if (systemInfo.platform === 'devtools') {
+ return setTimeout(function () {
+ cb();
+ }, 1000 / 30);
+ }
+ return wx
+ .createSelectorQuery()
+ .selectViewport()
+ .boundingClientRect()
+ .exec(function () {
+ cb();
+ });
+}
+exports.requestAnimationFrame = requestAnimationFrame;
+function pickExclude(obj, keys) {
+ if (!validator_1.isPlainObject(obj)) {
+ return {};
+ }
+ return Object.keys(obj).reduce(function (prev, key) {
+ if (!keys.includes(key)) {
+ prev[key] = obj[key];
+ }
+ return prev;
+ }, {});
+}
+exports.pickExclude = pickExclude;
+function getRect(context, selector) {
+ return new Promise(function (resolve) {
+ wx.createSelectorQuery()
+ .in(context)
+ .select(selector)
+ .boundingClientRect()
+ .exec(function (rect) {
+ if (rect === void 0) {
+ rect = [];
+ }
+ return resolve(rect[0]);
+ });
+ });
+}
+exports.getRect = getRect;
+function getAllRect(context, selector) {
+ return new Promise(function (resolve) {
+ wx.createSelectorQuery()
+ .in(context)
+ .selectAll(selector)
+ .boundingClientRect()
+ .exec(function (rect) {
+ if (rect === void 0) {
+ rect = [];
+ }
+ return resolve(rect[0]);
+ });
+ });
+}
+exports.getAllRect = getAllRect;
+function groupSetData(context, cb) {
+ if (version_1.canIUseGroupSetData()) {
+ context.groupSetData(cb);
+ } else {
+ cb();
+ }
+}
+exports.groupSetData = groupSetData;
+function toPromise(promiseLike) {
+ if (validator_1.isPromise(promiseLike)) {
+ return promiseLike;
+ }
+ return Promise.resolve(promiseLike);
+}
+exports.toPromise = toPromise;
+function getCurrentPage() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+exports.getCurrentPage = getCurrentPage;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/validator.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/validator.js
new file mode 100644
index 00000000..798f0548
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/validator.js
@@ -0,0 +1,43 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.isVideoUrl = exports.isImageUrl = exports.isBoolean = exports.isNumber = exports.isObj = exports.isDef = exports.isPromise = exports.isPlainObject = exports.isFunction = void 0;
+// eslint-disable-next-line @typescript-eslint/ban-types
+function isFunction(val) {
+ return typeof val === 'function';
+}
+exports.isFunction = isFunction;
+function isPlainObject(val) {
+ return val !== null && typeof val === 'object' && !Array.isArray(val);
+}
+exports.isPlainObject = isPlainObject;
+function isPromise(val) {
+ return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);
+}
+exports.isPromise = isPromise;
+function isDef(value) {
+ return value !== undefined && value !== null;
+}
+exports.isDef = isDef;
+function isObj(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+exports.isObj = isObj;
+function isNumber(value) {
+ return /^\d+(\.\d+)?$/.test(value);
+}
+exports.isNumber = isNumber;
+function isBoolean(value) {
+ return typeof value === 'boolean';
+}
+exports.isBoolean = isBoolean;
+var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
+var VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;
+function isImageUrl(url) {
+ return IMAGE_REGEXP.test(url);
+}
+exports.isImageUrl = isImageUrl;
+function isVideoUrl(url) {
+ return VIDEO_REGEXP.test(url);
+}
+exports.isVideoUrl = isVideoUrl;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/common/version.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/version.js
new file mode 100644
index 00000000..c7dc5dbf
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/common/version.js
@@ -0,0 +1,58 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.canIUseGetUserProfile = exports.canIUseCanvas2d = exports.canIUseNextTick = exports.canIUseGroupSetData = exports.canIUseAnimate = exports.canIUseFormFieldButton = exports.canIUseModel = void 0;
+var utils_1 = require('./utils');
+function compareVersion(v1, v2) {
+ v1 = v1.split('.');
+ v2 = v2.split('.');
+ var len = Math.max(v1.length, v2.length);
+ while (v1.length < len) {
+ v1.push('0');
+ }
+ while (v2.length < len) {
+ v2.push('0');
+ }
+ for (var i = 0; i < len; i++) {
+ var num1 = parseInt(v1[i], 10);
+ var num2 = parseInt(v2[i], 10);
+ if (num1 > num2) {
+ return 1;
+ }
+ if (num1 < num2) {
+ return -1;
+ }
+ }
+ return 0;
+}
+function gte(version) {
+ var system = utils_1.getSystemInfoSync();
+ return compareVersion(system.SDKVersion, version) >= 0;
+}
+function canIUseModel() {
+ return gte('2.9.3');
+}
+exports.canIUseModel = canIUseModel;
+function canIUseFormFieldButton() {
+ return gte('2.10.3');
+}
+exports.canIUseFormFieldButton = canIUseFormFieldButton;
+function canIUseAnimate() {
+ return gte('2.9.0');
+}
+exports.canIUseAnimate = canIUseAnimate;
+function canIUseGroupSetData() {
+ return gte('2.4.0');
+}
+exports.canIUseGroupSetData = canIUseGroupSetData;
+function canIUseNextTick() {
+ return wx.canIUse('nextTick');
+}
+exports.canIUseNextTick = canIUseNextTick;
+function canIUseCanvas2d() {
+ return gte('2.9.0');
+}
+exports.canIUseCanvas2d = canIUseCanvas2d;
+function canIUseGetUserProfile() {
+ return !!wx.getUserProfile;
+}
+exports.canIUseGetUserProfile = canIUseGetUserProfile;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.js
new file mode 100644
index 00000000..348d4898
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.js
@@ -0,0 +1,103 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('./utils');
+function simpleTick(fn) {
+ return setTimeout(fn, 30);
+}
+component_1.VantComponent({
+ props: {
+ useSlot: Boolean,
+ millisecond: Boolean,
+ time: {
+ type: Number,
+ observer: 'reset',
+ },
+ format: {
+ type: String,
+ value: 'HH:mm:ss',
+ },
+ autoStart: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ timeData: utils_1.parseTimeData(0),
+ formattedTime: '0',
+ },
+ destroyed: function () {
+ clearTimeout(this.tid);
+ this.tid = null;
+ },
+ methods: {
+ // 开始
+ start: function () {
+ if (this.counting) {
+ return;
+ }
+ this.counting = true;
+ this.endTime = Date.now() + this.remain;
+ this.tick();
+ },
+ // 暂停
+ pause: function () {
+ this.counting = false;
+ clearTimeout(this.tid);
+ },
+ // 重置
+ reset: function () {
+ this.pause();
+ this.remain = this.data.time;
+ this.setRemain(this.remain);
+ if (this.data.autoStart) {
+ this.start();
+ }
+ },
+ tick: function () {
+ if (this.data.millisecond) {
+ this.microTick();
+ } else {
+ this.macroTick();
+ }
+ },
+ microTick: function () {
+ var _this = this;
+ this.tid = simpleTick(function () {
+ _this.setRemain(_this.getRemain());
+ if (_this.remain !== 0) {
+ _this.microTick();
+ }
+ });
+ },
+ macroTick: function () {
+ var _this = this;
+ this.tid = simpleTick(function () {
+ var remain = _this.getRemain();
+ if (!utils_1.isSameSecond(remain, _this.remain) || remain === 0) {
+ _this.setRemain(remain);
+ }
+ if (_this.remain !== 0) {
+ _this.macroTick();
+ }
+ });
+ },
+ getRemain: function () {
+ return Math.max(this.endTime - Date.now(), 0);
+ },
+ setRemain: function (remain) {
+ this.remain = remain;
+ var timeData = utils_1.parseTimeData(remain);
+ if (this.data.useSlot) {
+ this.$emit('change', timeData);
+ }
+ this.setData({
+ formattedTime: utils_1.parseFormat(this.data.format, timeData),
+ });
+ if (remain === 0) {
+ this.pause();
+ this.$emit('finish');
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.wxml
new file mode 100644
index 00000000..e206e167
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.wxml
@@ -0,0 +1,4 @@
+
+
+ {{ formattedTime }}
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.wxss
new file mode 100644
index 00000000..bc33f5dc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-count-down{color:#323233;color:var(--count-down-text-color,#323233);font-size:14px;font-size:var(--count-down-font-size,14px);line-height:20px;line-height:var(--count-down-line-height,20px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/utils.js
new file mode 100644
index 00000000..10864a21
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/count-down/utils.js
@@ -0,0 +1,65 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.isSameSecond = exports.parseFormat = exports.parseTimeData = void 0;
+function padZero(num, targetLength) {
+ if (targetLength === void 0) {
+ targetLength = 2;
+ }
+ var str = num + '';
+ while (str.length < targetLength) {
+ str = '0' + str;
+ }
+ return str;
+}
+var SECOND = 1000;
+var MINUTE = 60 * SECOND;
+var HOUR = 60 * MINUTE;
+var DAY = 24 * HOUR;
+function parseTimeData(time) {
+ var days = Math.floor(time / DAY);
+ var hours = Math.floor((time % DAY) / HOUR);
+ var minutes = Math.floor((time % HOUR) / MINUTE);
+ var seconds = Math.floor((time % MINUTE) / SECOND);
+ var milliseconds = Math.floor(time % SECOND);
+ return {
+ days: days,
+ hours: hours,
+ minutes: minutes,
+ seconds: seconds,
+ milliseconds: milliseconds,
+ };
+}
+exports.parseTimeData = parseTimeData;
+function parseFormat(format, timeData) {
+ var days = timeData.days;
+ var hours = timeData.hours,
+ minutes = timeData.minutes,
+ seconds = timeData.seconds,
+ milliseconds = timeData.milliseconds;
+ if (format.indexOf('DD') === -1) {
+ hours += days * 24;
+ } else {
+ format = format.replace('DD', padZero(days));
+ }
+ if (format.indexOf('HH') === -1) {
+ minutes += hours * 60;
+ } else {
+ format = format.replace('HH', padZero(hours));
+ }
+ if (format.indexOf('mm') === -1) {
+ seconds += minutes * 60;
+ } else {
+ format = format.replace('mm', padZero(minutes));
+ }
+ if (format.indexOf('ss') === -1) {
+ milliseconds += seconds * 1000;
+ } else {
+ format = format.replace('ss', padZero(seconds));
+ }
+ return format.replace('SSS', padZero(milliseconds, 3));
+}
+exports.parseFormat = parseFormat;
+function isSameSecond(time1, time2) {
+ return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);
+}
+exports.isSameSecond = isSameSecond;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.js
new file mode 100644
index 00000000..6444056a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.js
@@ -0,0 +1,375 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+var __spreadArray =
+ (this && this.__spreadArray) ||
+ function (to, from) {
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
+ to[j] = from[i];
+ return to;
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var validator_1 = require('../common/validator');
+var shared_1 = require('../picker/shared');
+var currentYear = new Date().getFullYear();
+function isValidDate(date) {
+ return validator_1.isDef(date) && !isNaN(new Date(date).getTime());
+}
+function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+function padZero(val) {
+ return ('00' + val).slice(-2);
+}
+function times(n, iteratee) {
+ var index = -1;
+ var result = Array(n < 0 ? 0 : n);
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+function getTrueValue(formattedValue) {
+ if (formattedValue === undefined) {
+ formattedValue = '1';
+ }
+ while (isNaN(parseInt(formattedValue, 10))) {
+ formattedValue = formattedValue.slice(1);
+ }
+ return parseInt(formattedValue, 10);
+}
+function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+}
+var defaultFormatter = function (type, value) {
+ return value;
+};
+component_1.VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: __assign(__assign({}, shared_1.pickerProps), {
+ value: {
+ type: null,
+ observer: 'updateValue',
+ },
+ filter: null,
+ type: {
+ type: String,
+ value: 'datetime',
+ observer: 'updateValue',
+ },
+ showToolbar: {
+ type: Boolean,
+ value: true,
+ },
+ formatter: {
+ type: null,
+ value: defaultFormatter,
+ },
+ minDate: {
+ type: Number,
+ value: new Date(currentYear - 10, 0, 1).getTime(),
+ observer: 'updateValue',
+ },
+ maxDate: {
+ type: Number,
+ value: new Date(currentYear + 10, 11, 31).getTime(),
+ observer: 'updateValue',
+ },
+ minHour: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ maxHour: {
+ type: Number,
+ value: 23,
+ observer: 'updateValue',
+ },
+ minMinute: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ maxMinute: {
+ type: Number,
+ value: 59,
+ observer: 'updateValue',
+ },
+ }),
+ data: {
+ innerValue: Date.now(),
+ columns: [],
+ },
+ methods: {
+ updateValue: function () {
+ var _this = this;
+ var data = this.data;
+ var val = this.correctValue(data.value);
+ var isEqual = val === data.innerValue;
+ this.updateColumnValue(val).then(function () {
+ if (!isEqual) {
+ _this.$emit('input', val);
+ }
+ });
+ },
+ getPicker: function () {
+ if (this.picker == null) {
+ this.picker = this.selectComponent('.van-datetime-picker');
+ var picker_1 = this.picker;
+ var setColumnValues_1 = picker_1.setColumnValues;
+ picker_1.setColumnValues = function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return setColumnValues_1.apply(
+ picker_1,
+ __spreadArray(__spreadArray([], args), [false])
+ );
+ };
+ }
+ return this.picker;
+ },
+ updateColumns: function () {
+ var _a = this.data.formatter,
+ formatter = _a === void 0 ? defaultFormatter : _a;
+ var results = this.getOriginColumns().map(function (column) {
+ return {
+ values: column.values.map(function (value) {
+ return formatter(column.type, value);
+ }),
+ };
+ });
+ return this.set({ columns: results });
+ },
+ getOriginColumns: function () {
+ var filter = this.data.filter;
+ var results = this.getRanges().map(function (_a) {
+ var type = _a.type,
+ range = _a.range;
+ var values = times(range[1] - range[0] + 1, function (index) {
+ var value = range[0] + index;
+ return type === 'year' ? '' + value : padZero(value);
+ });
+ if (filter) {
+ values = filter(type, values);
+ }
+ return { type: type, values: values };
+ });
+ return results;
+ },
+ getRanges: function () {
+ var data = this.data;
+ if (data.type === 'time') {
+ return [
+ {
+ type: 'hour',
+ range: [data.minHour, data.maxHour],
+ },
+ {
+ type: 'minute',
+ range: [data.minMinute, data.maxMinute],
+ },
+ ];
+ }
+ var _a = this.getBoundary('max', data.innerValue),
+ maxYear = _a.maxYear,
+ maxDate = _a.maxDate,
+ maxMonth = _a.maxMonth,
+ maxHour = _a.maxHour,
+ maxMinute = _a.maxMinute;
+ var _b = this.getBoundary('min', data.innerValue),
+ minYear = _b.minYear,
+ minDate = _b.minDate,
+ minMonth = _b.minMonth,
+ minHour = _b.minHour,
+ minMinute = _b.minMinute;
+ var result = [
+ {
+ type: 'year',
+ range: [minYear, maxYear],
+ },
+ {
+ type: 'month',
+ range: [minMonth, maxMonth],
+ },
+ {
+ type: 'day',
+ range: [minDate, maxDate],
+ },
+ {
+ type: 'hour',
+ range: [minHour, maxHour],
+ },
+ {
+ type: 'minute',
+ range: [minMinute, maxMinute],
+ },
+ ];
+ if (data.type === 'date') result.splice(3, 2);
+ if (data.type === 'year-month') result.splice(2, 3);
+ return result;
+ },
+ correctValue: function (value) {
+ var data = this.data;
+ // validate value
+ var isDateType = data.type !== 'time';
+ if (isDateType && !isValidDate(value)) {
+ value = data.minDate;
+ } else if (!isDateType && !value) {
+ var minHour = data.minHour;
+ value = padZero(minHour) + ':00';
+ }
+ // time type
+ if (!isDateType) {
+ var _a = value.split(':'),
+ hour = _a[0],
+ minute = _a[1];
+ hour = padZero(range(hour, data.minHour, data.maxHour));
+ minute = padZero(range(minute, data.minMinute, data.maxMinute));
+ return hour + ':' + minute;
+ }
+ // date type
+ value = Math.max(value, data.minDate);
+ value = Math.min(value, data.maxDate);
+ return value;
+ },
+ getBoundary: function (type, innerValue) {
+ var _a;
+ var value = new Date(innerValue);
+ var boundary = new Date(this.data[type + 'Date']);
+ var year = boundary.getFullYear();
+ var month = 1;
+ var date = 1;
+ var hour = 0;
+ var minute = 0;
+ if (type === 'max') {
+ month = 12;
+ date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
+ hour = 23;
+ minute = 59;
+ }
+ if (value.getFullYear() === year) {
+ month = boundary.getMonth() + 1;
+ if (value.getMonth() + 1 === month) {
+ date = boundary.getDate();
+ if (value.getDate() === date) {
+ hour = boundary.getHours();
+ if (value.getHours() === hour) {
+ minute = boundary.getMinutes();
+ }
+ }
+ }
+ }
+ return (
+ (_a = {}),
+ (_a[type + 'Year'] = year),
+ (_a[type + 'Month'] = month),
+ (_a[type + 'Date'] = date),
+ (_a[type + 'Hour'] = hour),
+ (_a[type + 'Minute'] = minute),
+ _a
+ );
+ },
+ onCancel: function () {
+ this.$emit('cancel');
+ },
+ onConfirm: function () {
+ this.$emit('confirm', this.data.innerValue);
+ },
+ onChange: function () {
+ var _this = this;
+ var data = this.data;
+ var value;
+ var picker = this.getPicker();
+ var originColumns = this.getOriginColumns();
+ if (data.type === 'time') {
+ var indexes = picker.getIndexes();
+ value =
+ +originColumns[0].values[indexes[0]] +
+ ':' +
+ +originColumns[1].values[indexes[1]];
+ } else {
+ var indexes = picker.getIndexes();
+ var values = indexes.map(function (value, index) {
+ return originColumns[index].values[value];
+ });
+ var year = getTrueValue(values[0]);
+ var month = getTrueValue(values[1]);
+ var maxDate = getMonthEndDay(year, month);
+ var date = getTrueValue(values[2]);
+ if (data.type === 'year-month') {
+ date = 1;
+ }
+ date = date > maxDate ? maxDate : date;
+ var hour = 0;
+ var minute = 0;
+ if (data.type === 'datetime') {
+ hour = getTrueValue(values[3]);
+ minute = getTrueValue(values[4]);
+ }
+ value = new Date(year, month - 1, date, hour, minute);
+ }
+ value = this.correctValue(value);
+ this.updateColumnValue(value).then(function () {
+ _this.$emit('input', value);
+ _this.$emit('change', picker);
+ });
+ },
+ updateColumnValue: function (value) {
+ var _this = this;
+ var values = [];
+ var type = this.data.type;
+ var formatter = this.data.formatter || defaultFormatter;
+ var picker = this.getPicker();
+ if (type === 'time') {
+ var pair = value.split(':');
+ values = [formatter('hour', pair[0]), formatter('minute', pair[1])];
+ } else {
+ var date = new Date(value);
+ values = [
+ formatter('year', '' + date.getFullYear()),
+ formatter('month', padZero(date.getMonth() + 1)),
+ ];
+ if (type === 'date') {
+ values.push(formatter('day', padZero(date.getDate())));
+ }
+ if (type === 'datetime') {
+ values.push(
+ formatter('day', padZero(date.getDate())),
+ formatter('hour', padZero(date.getHours())),
+ formatter('minute', padZero(date.getMinutes()))
+ );
+ }
+ }
+ return this.set({ innerValue: value })
+ .then(function () {
+ return _this.updateColumns();
+ })
+ .then(function () {
+ return picker.setValues(values);
+ });
+ },
+ },
+ created: function () {
+ var _this = this;
+ var innerValue = this.correctValue(this.data.value);
+ this.updateColumnValue(innerValue).then(function () {
+ _this.$emit('input', innerValue);
+ });
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.json
new file mode 100644
index 00000000..a778e91c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-picker": "../picker/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.wxml
new file mode 100644
index 00000000..ade22024
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.wxml
@@ -0,0 +1,16 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/datetime-picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/definitions/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/definitions/index.js
new file mode 100644
index 00000000..c8ad2e54
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/definitions/index.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/dialog.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/dialog.js
new file mode 100644
index 00000000..d90d8ea4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/dialog.js
@@ -0,0 +1,104 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var queue = [];
+var defaultOptions = {
+ show: false,
+ title: '',
+ width: null,
+ theme: 'default',
+ message: '',
+ zIndex: 100,
+ overlay: true,
+ selector: '#van-dialog',
+ className: '',
+ asyncClose: false,
+ beforeClose: null,
+ transition: 'scale',
+ customStyle: '',
+ messageAlign: '',
+ overlayStyle: '',
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ showConfirmButton: true,
+ showCancelButton: false,
+ closeOnClickOverlay: false,
+ confirmButtonOpenType: '',
+};
+var currentOptions = __assign({}, defaultOptions);
+function getContext() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+var Dialog = function (options) {
+ options = __assign(__assign({}, currentOptions), options);
+ return new Promise(function (resolve, reject) {
+ var context = options.context || getContext();
+ var dialog = context.selectComponent(options.selector);
+ delete options.context;
+ delete options.selector;
+ if (dialog) {
+ dialog.setData(
+ __assign(
+ {
+ callback: function (action, instance) {
+ action === 'confirm' ? resolve(instance) : reject(instance);
+ },
+ },
+ options
+ )
+ );
+ wx.nextTick(function () {
+ dialog.setData({ show: true });
+ });
+ queue.push(dialog);
+ } else {
+ console.warn(
+ '未找到 van-dialog 节点,请确认 selector 及 context 是否正确'
+ );
+ }
+ });
+};
+Dialog.alert = function (options) {
+ return Dialog(options);
+};
+Dialog.confirm = function (options) {
+ return Dialog(__assign({ showCancelButton: true }, options));
+};
+Dialog.close = function () {
+ queue.forEach(function (dialog) {
+ dialog.close();
+ });
+ queue = [];
+};
+Dialog.stopLoading = function () {
+ queue.forEach(function (dialog) {
+ dialog.stopLoading();
+ });
+};
+Dialog.currentOptions = currentOptions;
+Dialog.defaultOptions = defaultOptions;
+Dialog.setDefaultOptions = function (options) {
+ currentOptions = __assign(__assign({}, currentOptions), options);
+ Dialog.currentOptions = currentOptions;
+};
+Dialog.resetDefaultOptions = function () {
+ currentOptions = __assign({}, defaultOptions);
+ Dialog.currentOptions = currentOptions;
+};
+Dialog.resetDefaultOptions();
+exports.default = Dialog;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.js
new file mode 100644
index 00000000..135ce71f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.js
@@ -0,0 +1,126 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var color_1 = require('../common/color');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ mixins: [button_1.button],
+ props: {
+ show: {
+ type: Boolean,
+ observer: function (show) {
+ !show && this.stopLoading();
+ },
+ },
+ title: String,
+ message: String,
+ theme: {
+ type: String,
+ value: 'default',
+ },
+ useSlot: Boolean,
+ className: String,
+ customStyle: String,
+ asyncClose: Boolean,
+ messageAlign: String,
+ beforeClose: null,
+ overlayStyle: String,
+ useTitleSlot: Boolean,
+ showCancelButton: Boolean,
+ closeOnClickOverlay: Boolean,
+ confirmButtonOpenType: String,
+ width: null,
+ zIndex: {
+ type: Number,
+ value: 2000,
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认',
+ },
+ cancelButtonText: {
+ type: String,
+ value: '取消',
+ },
+ confirmButtonColor: {
+ type: String,
+ value: color_1.RED,
+ },
+ cancelButtonColor: {
+ type: String,
+ value: color_1.GRAY,
+ },
+ showConfirmButton: {
+ type: Boolean,
+ value: true,
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ transition: {
+ type: String,
+ value: 'scale',
+ },
+ },
+ data: {
+ loading: {
+ confirm: false,
+ cancel: false,
+ },
+ callback: function () {},
+ },
+ methods: {
+ onConfirm: function () {
+ this.handleAction('confirm');
+ },
+ onCancel: function () {
+ this.handleAction('cancel');
+ },
+ onClickOverlay: function () {
+ this.close('overlay');
+ },
+ close: function (action) {
+ var _this = this;
+ this.setData({ show: false });
+ wx.nextTick(function () {
+ _this.$emit('close', action);
+ var callback = _this.data.callback;
+ if (callback) {
+ callback(action, _this);
+ }
+ });
+ },
+ stopLoading: function () {
+ this.setData({
+ loading: {
+ confirm: false,
+ cancel: false,
+ },
+ });
+ },
+ handleAction: function (action) {
+ var _a;
+ var _this = this;
+ this.$emit(action, { dialog: this });
+ var _b = this.data,
+ asyncClose = _b.asyncClose,
+ beforeClose = _b.beforeClose;
+ if (!asyncClose && !beforeClose) {
+ this.close(action);
+ return;
+ }
+ this.setData(((_a = {}), (_a['loading.' + action] = true), _a));
+ if (beforeClose) {
+ utils_1.toPromise(beforeClose(action)).then(function (value) {
+ if (value) {
+ _this.close(action);
+ } else {
+ _this.stopLoading();
+ }
+ });
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.json
new file mode 100644
index 00000000..43417fc8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.json
@@ -0,0 +1,9 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "van-button": "../button/index",
+ "van-goods-action": "../goods-action/index",
+ "van-goods-action-button": "../goods-action-button/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.wxml
new file mode 100644
index 00000000..f49dee40
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.wxml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+ {{ message }}
+
+
+
+
+ {{ cancelButtonText }}
+
+
+ {{ confirmButtonText }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.wxss
new file mode 100644
index 00000000..c6bac957
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dialog/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{padding-top:8px;padding-top:var(--dialog-has-title-message-padding-top,8px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--round-button{padding-bottom:16px;color:#323233}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__footer--round-button{position:relative!important;padding:8px 24px 16px!important}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.js
new file mode 100644
index 00000000..b643841f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.js
@@ -0,0 +1,14 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ dashed: Boolean,
+ hairline: Boolean,
+ contentPosition: String,
+ fontSize: String,
+ borderColor: String,
+ textColor: String,
+ customStyle: String,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.json
new file mode 100644
index 00000000..a89ef4db
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxml
new file mode 100644
index 00000000..f6a5a457
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxs
new file mode 100644
index 00000000..215b14f4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style([
+ {
+ 'border-color': data.borderColor,
+ color: data.textColor,
+ 'font-size': addUnit(data.fontSize),
+ },
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxss
new file mode 100644
index 00000000..c055e3af
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/divider/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-divider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin:16px 0;margin:var(--divider-margin,16px 0);color:#969799;color:var(--divider-text-color,#969799);font-size:14px;font-size:var(--divider-font-size,14px);line-height:24px;line-height:var(--divider-line-height,24px);border:0 solid #ebedf0;border-color:var(--divider-border-color,#ebedf0)}.van-divider:after,.van-divider:before{display:block;-webkit-flex:1;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:1px 0 0}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:16px;margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:16px;margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:10%;max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:10%;max-width:var(--divider-content-right-width,10%)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.js
new file mode 100644
index 00000000..aac47c99
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.js
@@ -0,0 +1,117 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var relation_1 = require('../common/relation');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ relation: relation_1.useParent('dropdown-menu', function () {
+ this.updateDataFromParent();
+ }),
+ props: {
+ value: {
+ type: null,
+ observer: 'rerender',
+ },
+ title: {
+ type: String,
+ observer: 'rerender',
+ },
+ disabled: Boolean,
+ titleClass: {
+ type: String,
+ observer: 'rerender',
+ },
+ options: {
+ type: Array,
+ value: [],
+ observer: 'rerender',
+ },
+ popupStyle: String,
+ },
+ data: {
+ transition: true,
+ showPopup: false,
+ showWrapper: false,
+ displayTitle: '',
+ },
+ methods: {
+ rerender: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ var _a;
+ (_a = _this.parent) === null || _a === void 0
+ ? void 0
+ : _a.updateItemListData();
+ });
+ },
+ updateDataFromParent: function () {
+ if (this.parent) {
+ var _a = this.parent.data,
+ overlay = _a.overlay,
+ duration = _a.duration,
+ activeColor = _a.activeColor,
+ closeOnClickOverlay = _a.closeOnClickOverlay,
+ direction = _a.direction;
+ this.setData({
+ overlay: overlay,
+ duration: duration,
+ activeColor: activeColor,
+ closeOnClickOverlay: closeOnClickOverlay,
+ direction: direction,
+ });
+ }
+ },
+ onOpen: function () {
+ this.$emit('open');
+ },
+ onOpened: function () {
+ this.$emit('opened');
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ onClosed: function () {
+ this.$emit('closed');
+ this.setData({ showWrapper: false });
+ },
+ onOptionTap: function (event) {
+ var option = event.currentTarget.dataset.option;
+ var value = option.value;
+ var shouldEmitChange = this.data.value !== value;
+ this.setData({ showPopup: false, value: value });
+ this.$emit('close');
+ this.rerender();
+ if (shouldEmitChange) {
+ this.$emit('change', value);
+ }
+ },
+ toggle: function (show, options) {
+ var _this = this;
+ var _a;
+ if (options === void 0) {
+ options = {};
+ }
+ var showPopup = this.data.showPopup;
+ if (typeof show !== 'boolean') {
+ show = !showPopup;
+ }
+ if (show === showPopup) {
+ return;
+ }
+ this.setData({
+ transition: !options.immediate,
+ showPopup: show,
+ });
+ if (show) {
+ (_a = this.parent) === null || _a === void 0
+ ? void 0
+ : _a.getChildWrapperStyle().then(function (wrapperStyle) {
+ _this.setData({ wrapperStyle: wrapperStyle, showWrapper: true });
+ _this.rerender();
+ });
+ } else {
+ this.rerender();
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.json
new file mode 100644
index 00000000..88d54099
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "van-cell": "../cell/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.wxml
new file mode 100644
index 00000000..dd75292f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.wxml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.wxss
new file mode 100644
index 00000000..7cab3f28
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#ee0a24;color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/shared.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/shared.js
new file mode 100644
index 00000000..db8b17d5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-item/shared.js
@@ -0,0 +1,2 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.js
new file mode 100644
index 00000000..9c27c647
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.js
@@ -0,0 +1,126 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+var utils_1 = require('../common/utils');
+var ARRAY = [];
+component_1.VantComponent({
+ field: true,
+ relation: relation_1.useChildren('dropdown-item', function () {
+ this.updateItemListData();
+ }),
+ props: {
+ activeColor: {
+ type: String,
+ observer: 'updateChildrenData',
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildrenData',
+ },
+ zIndex: {
+ type: Number,
+ value: 10,
+ },
+ duration: {
+ type: Number,
+ value: 200,
+ observer: 'updateChildrenData',
+ },
+ direction: {
+ type: String,
+ value: 'down',
+ observer: 'updateChildrenData',
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildrenData',
+ },
+ closeOnClickOutside: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ itemListData: [],
+ },
+ beforeCreate: function () {
+ var windowHeight = utils_1.getSystemInfoSync().windowHeight;
+ this.windowHeight = windowHeight;
+ ARRAY.push(this);
+ },
+ destroyed: function () {
+ var _this = this;
+ ARRAY = ARRAY.filter(function (item) {
+ return item !== _this;
+ });
+ },
+ methods: {
+ updateItemListData: function () {
+ this.setData({
+ itemListData: this.children.map(function (child) {
+ return child.data;
+ }),
+ });
+ },
+ updateChildrenData: function () {
+ this.children.forEach(function (child) {
+ child.updateDataFromParent();
+ });
+ },
+ toggleItem: function (active) {
+ this.children.forEach(function (item, index) {
+ var showPopup = item.data.showPopup;
+ if (index === active) {
+ item.toggle();
+ } else if (showPopup) {
+ item.toggle(false, { immediate: true });
+ }
+ });
+ },
+ close: function () {
+ this.children.forEach(function (child) {
+ child.toggle(false, { immediate: true });
+ });
+ },
+ getChildWrapperStyle: function () {
+ var _this = this;
+ var _a = this.data,
+ zIndex = _a.zIndex,
+ direction = _a.direction;
+ return utils_1.getRect(this, '.van-dropdown-menu').then(function (rect) {
+ var _a = rect.top,
+ top = _a === void 0 ? 0 : _a,
+ _b = rect.bottom,
+ bottom = _b === void 0 ? 0 : _b;
+ var offset = direction === 'down' ? bottom : _this.windowHeight - top;
+ var wrapperStyle = 'z-index: ' + zIndex + ';';
+ if (direction === 'down') {
+ wrapperStyle += 'top: ' + utils_1.addUnit(offset) + ';';
+ } else {
+ wrapperStyle += 'bottom: ' + utils_1.addUnit(offset) + ';';
+ }
+ return wrapperStyle;
+ });
+ },
+ onTitleTap: function (event) {
+ var _this = this;
+ var index = event.currentTarget.dataset.index;
+ var child = this.children[index];
+ if (!child.data.disabled) {
+ ARRAY.forEach(function (menuItem) {
+ if (
+ menuItem &&
+ menuItem.data.closeOnClickOutside &&
+ menuItem !== _this
+ ) {
+ menuItem.close();
+ }
+ });
+ this.toggleItem(index);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxml
new file mode 100644
index 00000000..037ac3b6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxs
new file mode 100644
index 00000000..65388549
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxs
@@ -0,0 +1,16 @@
+/* eslint-disable */
+function displayTitle(item) {
+ if (item.title) {
+ return item.title;
+ }
+
+ var match = item.options.filter(function(option) {
+ return option.value === item.value;
+ });
+ var displayTitle = match.length ? match[0].text : '';
+ return displayTitle;
+}
+
+module.exports = {
+ displayTitle: displayTitle
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxss
new file mode 100644
index 00000000..ec6caff6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/dropdown-menu/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;box-shadow:0 2px 12px rgba(100,101,102,.12);-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#ee0a24;color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.js
new file mode 100644
index 00000000..d5b20259
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.js
@@ -0,0 +1,12 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ description: String,
+ image: {
+ type: String,
+ value: 'default',
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxml
new file mode 100644
index 00000000..9c7b719a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxs
new file mode 100644
index 00000000..9696dd47
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var PRESETS = ['error', 'search', 'default', 'network'];
+
+function imageUrl(image) {
+ if (PRESETS.indexOf(image) !== -1) {
+ return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png';
+ }
+
+ return image;
+}
+
+module.exports = {
+ imageUrl: imageUrl,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxss
new file mode 100644
index 00000000..aeb9d4b1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/empty/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-empty{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:32px 0}.van-empty__image{width:160px;height:160px}.van-empty__image:empty{display:none}.van-empty__image__img{width:100%;height:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{margin-top:16px;padding:0 60px;color:#969799;font-size:14px;line-height:20px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.js
new file mode 100644
index 00000000..e017616a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.js
@@ -0,0 +1,151 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var utils_1 = require('../common/utils');
+var component_1 = require('../common/component');
+var props_1 = require('./props');
+component_1.VantComponent({
+ field: true,
+ classes: ['input-class', 'right-icon-class', 'label-class'],
+ props: __assign(
+ __assign(
+ __assign(__assign({}, props_1.commonProps), props_1.inputProps),
+ props_1.textareaProps
+ ),
+ {
+ size: String,
+ icon: String,
+ label: String,
+ error: Boolean,
+ center: Boolean,
+ isLink: Boolean,
+ leftIcon: String,
+ rightIcon: String,
+ autosize: null,
+ required: Boolean,
+ iconClass: String,
+ clickable: Boolean,
+ inputAlign: String,
+ customStyle: String,
+ errorMessage: String,
+ arrowDirection: String,
+ showWordLimit: Boolean,
+ errorMessageAlign: String,
+ readonly: {
+ type: Boolean,
+ observer: 'setShowClear',
+ },
+ clearable: {
+ type: Boolean,
+ observer: 'setShowClear',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ titleWidth: {
+ type: String,
+ value: '6.2em',
+ },
+ }
+ ),
+ data: {
+ focused: false,
+ innerValue: '',
+ showClear: false,
+ },
+ created: function () {
+ this.value = this.data.value;
+ this.setData({ innerValue: this.value });
+ },
+ methods: {
+ onInput: function (event) {
+ var _a = (event.detail || {}).value,
+ value = _a === void 0 ? '' : _a;
+ this.value = value;
+ this.setShowClear();
+ this.emitChange();
+ },
+ onFocus: function (event) {
+ this.focused = true;
+ this.setShowClear();
+ this.$emit('focus', event.detail);
+ },
+ onBlur: function (event) {
+ this.focused = false;
+ this.setShowClear();
+ this.$emit('blur', event.detail);
+ },
+ onClickIcon: function () {
+ this.$emit('click-icon');
+ },
+ onClickInput: function (event) {
+ this.$emit('click-input', event.detail);
+ },
+ onClear: function () {
+ var _this = this;
+ this.setData({ innerValue: '' });
+ this.value = '';
+ this.setShowClear();
+ utils_1.nextTick(function () {
+ _this.emitChange();
+ _this.$emit('clear', '');
+ });
+ },
+ onConfirm: function (event) {
+ var _a = (event.detail || {}).value,
+ value = _a === void 0 ? '' : _a;
+ this.value = value;
+ this.setShowClear();
+ this.$emit('confirm', value);
+ },
+ setValue: function (value) {
+ this.value = value;
+ this.setShowClear();
+ if (value === '') {
+ this.setData({ innerValue: '' });
+ }
+ this.emitChange();
+ },
+ onLineChange: function (event) {
+ this.$emit('linechange', event.detail);
+ },
+ onKeyboardHeightChange: function (event) {
+ this.$emit('keyboardheightchange', event.detail);
+ },
+ emitChange: function () {
+ var _this = this;
+ this.setData({ value: this.value });
+ utils_1.nextTick(function () {
+ _this.$emit('input', _this.value);
+ _this.$emit('change', _this.value);
+ });
+ },
+ setShowClear: function () {
+ var _a = this.data,
+ clearable = _a.clearable,
+ readonly = _a.readonly;
+ var _b = this,
+ focused = _b.focused,
+ value = _b.value;
+ this.setData({
+ showClear: !!clearable && !!focused && !!value && !readonly,
+ });
+ },
+ noop: function () {},
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.json
new file mode 100644
index 00000000..5906c504
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxml
new file mode 100644
index 00000000..9dc8b666
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ value.length >= maxlength ? maxlength : value.length }}/{{ maxlength }}
+
+
+ {{ errorMessage }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxs
new file mode 100644
index 00000000..78575b9a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function inputStyle(autosize) {
+ if (autosize && autosize.constructor === 'Object') {
+ return style({
+ 'min-height': addUnit(autosize.minHeight),
+ 'max-height': addUnit(autosize.maxHeight),
+ });
+ }
+
+ return '';
+}
+
+module.exports = {
+ inputStyle: inputStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxss
new file mode 100644
index 00000000..171f6133
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:#646566;color:var(--field-label-color,#646566)}.van-field__label--disabled{color:#c8c9cc;color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{box-sizing:border-box;padding:3.6px 0;line-height:1.2em;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__control:empty+.van-field__control{display:block}.van-field__control{position:relative;display:none;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px);min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__control:empty{display:none}.van-field__control--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;opacity:1;color:#c8c9cc;color:var(--field-input-disabled-text-color,#c8c9cc)}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#c8c9cc;color:var(--field-placeholder-text-color,#c8c9cc)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/input.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/input.wxml
new file mode 100644
index 00000000..3ecab243
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/input.wxml
@@ -0,0 +1,27 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/props.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/props.js
new file mode 100644
index 00000000..6ce703be
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/props.js
@@ -0,0 +1,66 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.textareaProps = exports.inputProps = exports.commonProps = void 0;
+exports.commonProps = {
+ value: {
+ type: String,
+ observer: function (value) {
+ if (value !== this.value) {
+ this.setData({ innerValue: value });
+ this.value = value;
+ }
+ },
+ },
+ placeholder: String,
+ placeholderStyle: String,
+ placeholderClass: String,
+ disabled: Boolean,
+ maxlength: {
+ type: Number,
+ value: -1,
+ },
+ cursorSpacing: {
+ type: Number,
+ value: 50,
+ },
+ autoFocus: Boolean,
+ focus: Boolean,
+ cursor: {
+ type: Number,
+ value: -1,
+ },
+ selectionStart: {
+ type: Number,
+ value: -1,
+ },
+ selectionEnd: {
+ type: Number,
+ value: -1,
+ },
+ adjustPosition: {
+ type: Boolean,
+ value: true,
+ },
+ holdKeyboard: Boolean,
+};
+exports.inputProps = {
+ type: {
+ type: String,
+ value: 'text',
+ },
+ password: Boolean,
+ confirmType: String,
+ confirmHold: Boolean,
+};
+exports.textareaProps = {
+ autoHeight: Boolean,
+ fixed: Boolean,
+ showConfirmBar: {
+ type: Boolean,
+ value: true,
+ },
+ disableDefaultPadding: {
+ type: Boolean,
+ value: true,
+ },
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/field/textarea.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/textarea.wxml
new file mode 100644
index 00000000..5015a51d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/field/textarea.wxml
@@ -0,0 +1,29 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.js
new file mode 100644
index 00000000..465a79f9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.js
@@ -0,0 +1,39 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+var button_1 = require('../mixins/button');
+var link_1 = require('../mixins/link');
+component_1.VantComponent({
+ mixins: [link_1.link, button_1.button],
+ relation: relation_1.useParent('goods-action'),
+ props: {
+ text: String,
+ color: String,
+ loading: Boolean,
+ disabled: Boolean,
+ plain: Boolean,
+ type: {
+ type: String,
+ value: 'danger',
+ },
+ },
+ methods: {
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ updateStyle: function () {
+ if (this.parent == null) {
+ return;
+ }
+ var index = this.index;
+ var _a = this.parent.children,
+ children = _a === void 0 ? [] : _a;
+ this.setData({
+ isFirst: index === 0,
+ isLast: index === children.length - 1,
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.json
new file mode 100644
index 00000000..b5676868
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-button": "../button/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.wxml
new file mode 100644
index 00000000..4505f212
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.wxml
@@ -0,0 +1,30 @@
+
+
+ {{ text }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.wxss
new file mode 100644
index 00000000..77d16c67
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-button/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-goods-action-button{--button-warning-background-color:linear-gradient(90deg,#ffd01e,#ff8917);--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(90deg,#ffd01e,#ff8917));--button-danger-background-color:linear-gradient(90deg,#ff6034,#ee0a24);--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(90deg,#ff6034,#ee0a24));--button-default-height:40px;--button-default-height:var(--goods-action-button-height,40px);--button-line-height:20px;--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:#fff;--button-plain-background-color:var(--goods-action-button-plain-color,#fff);display:block;--button-border-width:0}.van-goods-action-button--first{margin-left:5px;--button-border-radius:20px 0 0 20px;--button-border-radius:var(--goods-action-button-border-radius,20px) 0 0 var(--goods-action-button-border-radius,20px)}.van-goods-action-button--last{margin-right:5px;--button-border-radius:0 20px 20px 0;--button-border-radius:0 var(--goods-action-button-border-radius,20px) var(--goods-action-button-border-radius,20px) 0}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:20px;--button-border-radius:var(--goods-action-button-border-radius,20px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{width:100%;font-weight:500!important;font-weight:var(--font-weight-bold,500)!important}@media (max-width:321px){.van-goods-action-button{font-size:13px}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.js
new file mode 100644
index 00000000..252ccbe6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.js
@@ -0,0 +1,23 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var link_1 = require('../mixins/link');
+component_1.VantComponent({
+ classes: ['icon-class', 'text-class'],
+ mixins: [link_1.link, button_1.button],
+ props: {
+ text: String,
+ dot: Boolean,
+ info: String,
+ icon: String,
+ disabled: Boolean,
+ loading: Boolean,
+ },
+ methods: {
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.json
new file mode 100644
index 00000000..93bfe8ab
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-button": "../button/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.wxml
new file mode 100644
index 00000000..65b7ced3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.wxml
@@ -0,0 +1,35 @@
+
+
+
+ {{ text }}
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.wxss
new file mode 100644
index 00000000..eeef1911
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action-icon/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-goods-action-icon{display:-webkit-flex!important;display:flex!important;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center!important;justify-content:center!important;line-height:1!important;border:none!important;font-size:10px!important;font-size:var(--goods-action-icon-font-size,10px)!important;color:#646566!important;color:var(--goods-action-icon-text-color,#646566)!important;min-width:48px;min-width:var(--goods-action-icon-width,48px);height:50px!important;height:var(--goods-action-icon-height,50px)!important}.van-goods-action-icon__icon{display:-webkit-flex;display:flex;margin:0 auto 5px;color:#323233;color:var(--goods-action-icon-color,#323233);font-size:18px;font-size:var(--goods-action-icon-size,18px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.js
new file mode 100644
index 00000000..b58ba946
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.js
@@ -0,0 +1,17 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ relation: relation_1.useChildren('goods-action-button', function () {
+ this.children.forEach(function (item) {
+ item.updateStyle();
+ });
+ }),
+ props: {
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.wxml
new file mode 100644
index 00000000..569450c7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.wxss
new file mode 100644
index 00000000..d0def95e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/goods-action/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;box-sizing:initial;height:50px;height:var(--goods-action-height,50px);background-color:#fff;background-color:var(--goods-action-background-color,#fff)}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.js
new file mode 100644
index 00000000..d6644781
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.js
@@ -0,0 +1,58 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+var link_1 = require('../mixins/link');
+component_1.VantComponent({
+ relation: relation_1.useParent('grid'),
+ classes: ['content-class', 'icon-class', 'text-class'],
+ mixins: [link_1.link],
+ props: {
+ icon: String,
+ iconColor: String,
+ dot: Boolean,
+ info: null,
+ badge: null,
+ text: String,
+ useSlot: Boolean,
+ },
+ data: {
+ viewStyle: '',
+ },
+ mounted: function () {
+ this.updateStyle();
+ },
+ methods: {
+ updateStyle: function () {
+ if (!this.parent) {
+ return;
+ }
+ var _a = this.parent,
+ data = _a.data,
+ children = _a.children;
+ var columnNum = data.columnNum,
+ border = data.border,
+ square = data.square,
+ gutter = data.gutter,
+ clickable = data.clickable,
+ center = data.center,
+ direction = data.direction,
+ iconSize = data.iconSize;
+ this.setData({
+ center: center,
+ border: border,
+ square: square,
+ gutter: gutter,
+ clickable: clickable,
+ direction: direction,
+ iconSize: iconSize,
+ index: children.indexOf(this),
+ columnNum: columnNum,
+ });
+ },
+ onClick: function () {
+ this.$emit('click');
+ this.jumpLink();
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxml
new file mode 100644
index 00000000..0070a2bb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxs
new file mode 100644
index 00000000..2cfe37d0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxs
@@ -0,0 +1,32 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function wrapperStyle(data) {
+ var width = 100 / data.columnNum + '%';
+
+ return style({
+ width: width,
+ 'padding-top': data.square ? width : null,
+ 'padding-right': addUnit(data.gutter),
+ 'margin-top':
+ data.index >= data.columnNum && !data.square
+ ? addUnit(data.gutter)
+ : null,
+ });
+}
+
+function contentStyle(data) {
+ return data.square
+ ? style({
+ right: addUnit(data.gutter),
+ bottom: addUnit(data.gutter),
+ height: 'auto',
+ })
+ : '';
+}
+
+module.exports = {
+ wrapperStyle: wrapperStyle,
+ contentStyle: contentStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxss
new file mode 100644
index 00000000..ed7facb8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-grid-item{position:relative;float:left;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__content{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;box-sizing:border-box;height:100%;padding:16px 8px;padding:var(--grid-item-content-padding,16px 8px);background-color:#fff;background-color:var(--grid-item-content-background-color,#fff)}.van-grid-item__content:after{z-index:1;border-width:0 1px 1px 0;border-bottom-width:var(--border-width-base,1px);border-right-width:var(--border-width-base,1px);border-top-width:0}.van-grid-item__content--surround:after{border-width:1px;border-width:var(--border-width-base,1px)}.van-grid-item__content--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--horizontal{-webkit-flex-direction:row;flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__icon+.van-grid-item__text{margin-top:0;margin-left:8px}.van-grid-item__content--clickable:active{background-color:#f2f3f5;background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:26px;font-size:var(--grid-item-icon-size,26px);height:26px;height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:#646566;color:var(--grid-item-text-color,#646566);font-size:12px;font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.js
new file mode 100644
index 00000000..e138f2e7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.js
@@ -0,0 +1,52 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ relation: relation_1.useChildren('grid-item'),
+ props: {
+ square: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ gutter: {
+ type: null,
+ value: 0,
+ observer: 'updateChildren',
+ },
+ clickable: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ columnNum: {
+ type: Number,
+ value: 4,
+ observer: 'updateChildren',
+ },
+ center: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildren',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildren',
+ },
+ direction: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ iconSize: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren: function () {
+ this.children.forEach(function (child) {
+ child.updateStyle();
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxml
new file mode 100644
index 00000000..2e4118f3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxs
new file mode 100644
index 00000000..cd3b1bd5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style({
+ 'padding-left': addUnit(data.gutter),
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxss
new file mode 100644
index 00000000..327fc5ef
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/grid/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-grid{position:relative;box-sizing:border-box;overflow:hidden}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.js
new file mode 100644
index 00000000..28839c38
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.js
@@ -0,0 +1,22 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ dot: Boolean,
+ info: null,
+ size: null,
+ color: String,
+ customStyle: String,
+ classPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ name: String,
+ },
+ methods: {
+ onClick: function () {
+ this.$emit('click');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.json
new file mode 100644
index 00000000..bf0ebe00
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxml
new file mode 100644
index 00000000..3c701745
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxs
new file mode 100644
index 00000000..45e3aa0a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxs
@@ -0,0 +1,39 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function isImage(name) {
+ return name.indexOf('/') !== -1;
+}
+
+function rootClass(data) {
+ var classes = ['custom-class'];
+
+ if (data.classPrefix != null) {
+ classes.push(data.classPrefix);
+ }
+
+ if (isImage(data.name)) {
+ classes.push('van-icon--image');
+ } else if (data.classPrefix != null) {
+ classes.push(data.classPrefix + '-' + data.name);
+ }
+
+ return classes.join(' ');
+}
+
+function rootStyle(data) {
+ return style([
+ {
+ color: data.color,
+ 'font-size': addUnit(data.size),
+ },
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ isImage: isImage,
+ rootClass: rootClass,
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxss
new file mode 100644
index 00000000..a9085c83
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/icon/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-icon{position:relative;font:normal normal normal 14px/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon,.van-icon:before{display:inline-block}.van-icon-exchange:before{content:"\e6af"}.van-icon-eye:before{content:"\e6b0"}.van-icon-enlarge:before{content:"\e6b1"}.van-icon-expand-o:before{content:"\e6b2"}.van-icon-eye-o:before{content:"\e6b3"}.van-icon-expand:before{content:"\e6b4"}.van-icon-filter-o:before{content:"\e6b5"}.van-icon-fire:before{content:"\e6b6"}.van-icon-fail:before{content:"\e6b7"}.van-icon-failure:before{content:"\e6b8"}.van-icon-fire-o:before{content:"\e6b9"}.van-icon-flag-o:before{content:"\e6ba"}.van-icon-font:before{content:"\e6bb"}.van-icon-font-o:before{content:"\e6bc"}.van-icon-gem-o:before{content:"\e6bd"}.van-icon-flower-o:before{content:"\e6be"}.van-icon-gem:before{content:"\e6bf"}.van-icon-gift-card:before{content:"\e6c0"}.van-icon-friends:before{content:"\e6c1"}.van-icon-friends-o:before{content:"\e6c2"}.van-icon-gold-coin:before{content:"\e6c3"}.van-icon-gold-coin-o:before{content:"\e6c4"}.van-icon-good-job-o:before{content:"\e6c5"}.van-icon-gift:before{content:"\e6c6"}.van-icon-gift-o:before{content:"\e6c7"}.van-icon-gift-card-o:before{content:"\e6c8"}.van-icon-good-job:before{content:"\e6c9"}.van-icon-home-o:before{content:"\e6ca"}.van-icon-goods-collect:before{content:"\e6cb"}.van-icon-graphic:before{content:"\e6cc"}.van-icon-goods-collect-o:before{content:"\e6cd"}.van-icon-hot-o:before{content:"\e6ce"}.van-icon-info:before{content:"\e6cf"}.van-icon-hotel-o:before{content:"\e6d0"}.van-icon-info-o:before{content:"\e6d1"}.van-icon-hot-sale-o:before{content:"\e6d2"}.van-icon-hot:before{content:"\e6d3"}.van-icon-like:before{content:"\e6d4"}.van-icon-idcard:before{content:"\e6d5"}.van-icon-invition:before{content:"\e6d6"}.van-icon-like-o:before{content:"\e6d7"}.van-icon-hot-sale:before{content:"\e6d8"}.van-icon-location-o:before{content:"\e6d9"}.van-icon-location:before{content:"\e6da"}.van-icon-label:before{content:"\e6db"}.van-icon-lock:before{content:"\e6dc"}.van-icon-label-o:before{content:"\e6dd"}.van-icon-map-marked:before{content:"\e6de"}.van-icon-logistics:before{content:"\e6df"}.van-icon-manager:before{content:"\e6e0"}.van-icon-more:before{content:"\e6e1"}.van-icon-live:before{content:"\e6e2"}.van-icon-manager-o:before{content:"\e6e3"}.van-icon-medal:before{content:"\e6e4"}.van-icon-more-o:before{content:"\e6e5"}.van-icon-music-o:before{content:"\e6e6"}.van-icon-music:before{content:"\e6e7"}.van-icon-new-arrival-o:before{content:"\e6e8"}.van-icon-medal-o:before{content:"\e6e9"}.van-icon-new-o:before{content:"\e6ea"}.van-icon-free-postage:before{content:"\e6eb"}.van-icon-newspaper-o:before{content:"\e6ec"}.van-icon-new-arrival:before{content:"\e6ed"}.van-icon-minus:before{content:"\e6ee"}.van-icon-orders-o:before{content:"\e6ef"}.van-icon-new:before{content:"\e6f0"}.van-icon-paid:before{content:"\e6f1"}.van-icon-notes-o:before{content:"\e6f2"}.van-icon-other-pay:before{content:"\e6f3"}.van-icon-pause-circle:before{content:"\e6f4"}.van-icon-pause:before{content:"\e6f5"}.van-icon-pause-circle-o:before{content:"\e6f6"}.van-icon-peer-pay:before{content:"\e6f7"}.van-icon-pending-payment:before{content:"\e6f8"}.van-icon-passed:before{content:"\e6f9"}.van-icon-plus:before{content:"\e6fa"}.van-icon-phone-circle-o:before{content:"\e6fb"}.van-icon-phone-o:before{content:"\e6fc"}.van-icon-printer:before{content:"\e6fd"}.van-icon-photo-fail:before{content:"\e6fe"}.van-icon-phone:before{content:"\e6ff"}.van-icon-photo-o:before{content:"\e700"}.van-icon-play-circle:before{content:"\e701"}.van-icon-play:before{content:"\e702"}.van-icon-phone-circle:before{content:"\e703"}.van-icon-point-gift-o:before{content:"\e704"}.van-icon-point-gift:before{content:"\e705"}.van-icon-play-circle-o:before{content:"\e706"}.van-icon-shrink:before{content:"\e707"}.van-icon-photo:before{content:"\e708"}.van-icon-qr:before{content:"\e709"}.van-icon-qr-invalid:before{content:"\e70a"}.van-icon-question-o:before{content:"\e70b"}.van-icon-revoke:before{content:"\e70c"}.van-icon-replay:before{content:"\e70d"}.van-icon-service:before{content:"\e70e"}.van-icon-question:before{content:"\e70f"}.van-icon-search:before{content:"\e710"}.van-icon-refund-o:before{content:"\e711"}.van-icon-service-o:before{content:"\e712"}.van-icon-scan:before{content:"\e713"}.van-icon-share:before{content:"\e714"}.van-icon-send-gift-o:before{content:"\e715"}.van-icon-share-o:before{content:"\e716"}.van-icon-setting:before{content:"\e717"}.van-icon-points:before{content:"\e718"}.van-icon-photograph:before{content:"\e719"}.van-icon-shop:before{content:"\e71a"}.van-icon-shop-o:before{content:"\e71b"}.van-icon-shop-collect-o:before{content:"\e71c"}.van-icon-shop-collect:before{content:"\e71d"}.van-icon-smile:before{content:"\e71e"}.van-icon-shopping-cart-o:before{content:"\e71f"}.van-icon-sign:before{content:"\e720"}.van-icon-sort:before{content:"\e721"}.van-icon-star-o:before{content:"\e722"}.van-icon-smile-comment-o:before{content:"\e723"}.van-icon-stop:before{content:"\e724"}.van-icon-stop-circle-o:before{content:"\e725"}.van-icon-smile-o:before{content:"\e726"}.van-icon-star:before{content:"\e727"}.van-icon-success:before{content:"\e728"}.van-icon-stop-circle:before{content:"\e729"}.van-icon-records:before{content:"\e72a"}.van-icon-shopping-cart:before{content:"\e72b"}.van-icon-tosend:before{content:"\e72c"}.van-icon-todo-list:before{content:"\e72d"}.van-icon-thumb-circle-o:before{content:"\e72e"}.van-icon-thumb-circle:before{content:"\e72f"}.van-icon-umbrella-circle:before{content:"\e730"}.van-icon-underway:before{content:"\e731"}.van-icon-upgrade:before{content:"\e732"}.van-icon-todo-list-o:before{content:"\e733"}.van-icon-tv-o:before{content:"\e734"}.van-icon-underway-o:before{content:"\e735"}.van-icon-user-o:before{content:"\e736"}.van-icon-vip-card-o:before{content:"\e737"}.van-icon-vip-card:before{content:"\e738"}.van-icon-send-gift:before{content:"\e739"}.van-icon-wap-home:before{content:"\e73a"}.van-icon-wap-nav:before{content:"\e73b"}.van-icon-volume-o:before{content:"\e73c"}.van-icon-video:before{content:"\e73d"}.van-icon-wap-home-o:before{content:"\e73e"}.van-icon-volume:before{content:"\e73f"}.van-icon-warning:before{content:"\e740"}.van-icon-weapp-nav:before{content:"\e741"}.van-icon-wechat-pay:before{content:"\e742"}.van-icon-warning-o:before{content:"\e743"}.van-icon-wechat:before{content:"\e744"}.van-icon-setting-o:before{content:"\e745"}.van-icon-youzan-shield:before{content:"\e746"}.van-icon-warn-o:before{content:"\e747"}.van-icon-smile-comment:before{content:"\e748"}.van-icon-user-circle-o:before{content:"\e749"}.van-icon-video-o:before{content:"\e74a"}.van-icon-add-square:before{content:"\e65c"}.van-icon-add:before{content:"\e65d"}.van-icon-arrow-down:before{content:"\e65e"}.van-icon-arrow-up:before{content:"\e65f"}.van-icon-arrow:before{content:"\e660"}.van-icon-after-sale:before{content:"\e661"}.van-icon-add-o:before{content:"\e662"}.van-icon-alipay:before{content:"\e663"}.van-icon-ascending:before{content:"\e664"}.van-icon-apps-o:before{content:"\e665"}.van-icon-aim:before{content:"\e666"}.van-icon-award:before{content:"\e667"}.van-icon-arrow-left:before{content:"\e668"}.van-icon-award-o:before{content:"\e669"}.van-icon-audio:before{content:"\e66a"}.van-icon-bag-o:before{content:"\e66b"}.van-icon-balance-list:before{content:"\e66c"}.van-icon-back-top:before{content:"\e66d"}.van-icon-bag:before{content:"\e66e"}.van-icon-balance-pay:before{content:"\e66f"}.van-icon-balance-o:before{content:"\e670"}.van-icon-bar-chart-o:before{content:"\e671"}.van-icon-bars:before{content:"\e672"}.van-icon-balance-list-o:before{content:"\e673"}.van-icon-birthday-cake-o:before{content:"\e674"}.van-icon-bookmark:before{content:"\e675"}.van-icon-bill:before{content:"\e676"}.van-icon-bell:before{content:"\e677"}.van-icon-browsing-history-o:before{content:"\e678"}.van-icon-browsing-history:before{content:"\e679"}.van-icon-bookmark-o:before{content:"\e67a"}.van-icon-bulb-o:before{content:"\e67b"}.van-icon-bullhorn-o:before{content:"\e67c"}.van-icon-bill-o:before{content:"\e67d"}.van-icon-calendar-o:before{content:"\e67e"}.van-icon-brush-o:before{content:"\e67f"}.van-icon-card:before{content:"\e680"}.van-icon-cart-o:before{content:"\e681"}.van-icon-cart-circle:before{content:"\e682"}.van-icon-cart-circle-o:before{content:"\e683"}.van-icon-cart:before{content:"\e684"}.van-icon-cash-on-deliver:before{content:"\e685"}.van-icon-cash-back-record:before{content:"\e686"}.van-icon-cashier-o:before{content:"\e687"}.van-icon-chart-trending-o:before{content:"\e688"}.van-icon-certificate:before{content:"\e689"}.van-icon-chat:before{content:"\e68a"}.van-icon-clear:before{content:"\e68b"}.van-icon-chat-o:before{content:"\e68c"}.van-icon-checked:before{content:"\e68d"}.van-icon-clock:before{content:"\e68e"}.van-icon-clock-o:before{content:"\e68f"}.van-icon-close:before{content:"\e690"}.van-icon-closed-eye:before{content:"\e691"}.van-icon-circle:before{content:"\e692"}.van-icon-cluster-o:before{content:"\e693"}.van-icon-column:before{content:"\e694"}.van-icon-comment-circle-o:before{content:"\e695"}.van-icon-cluster:before{content:"\e696"}.van-icon-comment:before{content:"\e697"}.van-icon-comment-o:before{content:"\e698"}.van-icon-comment-circle:before{content:"\e699"}.van-icon-completed:before{content:"\e69a"}.van-icon-credit-pay:before{content:"\e69b"}.van-icon-coupon:before{content:"\e69c"}.van-icon-debit-pay:before{content:"\e69d"}.van-icon-coupon-o:before{content:"\e69e"}.van-icon-contact:before{content:"\e69f"}.van-icon-descending:before{content:"\e6a0"}.van-icon-desktop-o:before{content:"\e6a1"}.van-icon-diamond-o:before{content:"\e6a2"}.van-icon-description:before{content:"\e6a3"}.van-icon-delete:before{content:"\e6a4"}.van-icon-diamond:before{content:"\e6a5"}.van-icon-delete-o:before{content:"\e6a6"}.van-icon-cross:before{content:"\e6a7"}.van-icon-edit:before{content:"\e6a8"}.van-icon-ellipsis:before{content:"\e6a9"}.van-icon-down:before{content:"\e6aa"}.van-icon-discount:before{content:"\e6ab"}.van-icon-ecard-pay:before{content:"\e6ac"}.van-icon-envelop-o:before{content:"\e6ae"}@font-face{font-weight:400;font-style:normal;font-display:auto;font-family:vant-icon;src:url(https://at.alicdn.com/t/font_2553510_7cds497uxwn.woff2?t=1621320123079) format("woff2"),url(https://at.alicdn.com/t/font_2553510_7cds497uxwn.woff?t=1621320123079) format("woff"),url(https://at.alicdn.com/t/font_2553510_7cds497uxwn.ttf?t=1621320123079) format("truetype")}:host{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-icon--image{width:1em;height:1em}.van-icon__image{width:100%;height:100%}.van-icon__info{z-index:1}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.js
new file mode 100644
index 00000000..f149bc93
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.js
@@ -0,0 +1,62 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+component_1.VantComponent({
+ mixins: [button_1.button],
+ classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],
+ props: {
+ src: {
+ type: String,
+ observer: function () {
+ this.setData({
+ error: false,
+ loading: true,
+ });
+ },
+ },
+ round: Boolean,
+ width: null,
+ height: null,
+ radius: null,
+ lazyLoad: Boolean,
+ useErrorSlot: Boolean,
+ useLoadingSlot: Boolean,
+ showMenuByLongpress: Boolean,
+ fit: {
+ type: String,
+ value: 'fill',
+ },
+ showError: {
+ type: Boolean,
+ value: true,
+ },
+ showLoading: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ error: false,
+ loading: true,
+ viewStyle: '',
+ },
+ methods: {
+ onLoad: function (event) {
+ this.setData({
+ loading: false,
+ });
+ this.$emit('load', event.detail);
+ },
+ onError: function (event) {
+ this.setData({
+ loading: false,
+ error: true,
+ });
+ this.$emit('error', event.detail);
+ },
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxml
new file mode 100644
index 00000000..d3092bd9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxs
new file mode 100644
index 00000000..cec14b8b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxs
@@ -0,0 +1,32 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style([
+ {
+ width: addUnit(data.width),
+ height: addUnit(data.height),
+ 'border-radius': addUnit(data.radius),
+ },
+ data.radius ? 'overflow: hidden' : null,
+ ]);
+}
+
+var FIT_MODE_MAP = {
+ none: 'center',
+ fill: 'scaleToFill',
+ cover: 'aspectFill',
+ contain: 'aspectFit',
+ widthFix: 'widthFix',
+ heightFix: 'heightFix',
+};
+
+function mode(fit) {
+ return FIT_MODE_MAP[fit];
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ mode: mode,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxss
new file mode 100644
index 00000000..47589109
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/image/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}.van-image__loading-icon{color:#dcdee0;color:var(--image-loading-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:#dcdee0;color:var(--image-error-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-error-icon-size,32px)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.js
new file mode 100644
index 00000000..2970257d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.js
@@ -0,0 +1,28 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var utils_1 = require('../common/utils');
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ relation: relation_1.useParent('index-bar'),
+ props: {
+ useSlot: Boolean,
+ index: null,
+ },
+ data: {
+ active: false,
+ wrapperStyle: '',
+ anchorStyle: '',
+ },
+ methods: {
+ scrollIntoView: function (scrollTop) {
+ var _this = this;
+ utils_1.getRect(this, '.van-index-anchor-wrapper').then(function (rect) {
+ wx.pageScrollTo({
+ duration: 0,
+ scrollTop: scrollTop + rect.top - _this.parent.data.stickyOffsetTop,
+ });
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.wxml
new file mode 100644
index 00000000..49affa7c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+ {{ index }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.wxss
new file mode 100644
index 00000000..b8c3c0a4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-anchor/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-index-anchor{padding:0 16px;padding:var(--index-anchor-padding,0 16px);color:#323233;color:var(--index-anchor-text-color,#323233);font-weight:500;font-weight:var(--index-anchor-font-weight,500);font-size:14px;font-size:var(--index-anchor-font-size,14px);line-height:32px;line-height:var(--index-anchor-line-height,32px);background-color:initial;background-color:var(--index-anchor-background-color,transparent)}.van-index-anchor--active{right:0;left:0;color:#07c160;color:var(--index-anchor-active-text-color,#07c160);background-color:#fff;background-color:var(--index-anchor-active-background-color,#fff)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.js
new file mode 100644
index 00000000..ebb30545
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.js
@@ -0,0 +1,278 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var color_1 = require('../common/color');
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+var utils_1 = require('../common/utils');
+var page_scroll_1 = require('../mixins/page-scroll');
+var indexList = function () {
+ var indexList = [];
+ var charCodeOfA = 'A'.charCodeAt(0);
+ for (var i = 0; i < 26; i++) {
+ indexList.push(String.fromCharCode(charCodeOfA + i));
+ }
+ return indexList;
+};
+component_1.VantComponent({
+ relation: relation_1.useChildren('index-anchor', function () {
+ this.updateData();
+ }),
+ props: {
+ sticky: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ highlightColor: {
+ type: String,
+ value: color_1.GREEN,
+ },
+ stickyOffsetTop: {
+ type: Number,
+ value: 0,
+ },
+ indexList: {
+ type: Array,
+ value: indexList(),
+ },
+ },
+ mixins: [
+ page_scroll_1.pageScrollMixin(function (event) {
+ this.scrollTop =
+ (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;
+ this.onScroll();
+ }),
+ ],
+ data: {
+ activeAnchorIndex: null,
+ showSidebar: false,
+ },
+ created: function () {
+ this.scrollTop = 0;
+ },
+ methods: {
+ updateData: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ if (_this.timer != null) {
+ clearTimeout(_this.timer);
+ }
+ _this.timer = setTimeout(function () {
+ _this.setData({
+ showSidebar: !!_this.children.length,
+ });
+ _this.setRect().then(function () {
+ _this.onScroll();
+ });
+ }, 0);
+ });
+ },
+ setRect: function () {
+ return Promise.all([
+ this.setAnchorsRect(),
+ this.setListRect(),
+ this.setSiderbarRect(),
+ ]);
+ },
+ setAnchorsRect: function () {
+ var _this = this;
+ return Promise.all(
+ this.children.map(function (anchor) {
+ return utils_1
+ .getRect(anchor, '.van-index-anchor-wrapper')
+ .then(function (rect) {
+ Object.assign(anchor, {
+ height: rect.height,
+ top: rect.top + _this.scrollTop,
+ });
+ });
+ })
+ );
+ },
+ setListRect: function () {
+ var _this = this;
+ return utils_1.getRect(this, '.van-index-bar').then(function (rect) {
+ Object.assign(_this, {
+ height: rect.height,
+ top: rect.top + _this.scrollTop,
+ });
+ });
+ },
+ setSiderbarRect: function () {
+ var _this = this;
+ return utils_1
+ .getRect(this, '.van-index-bar__sidebar')
+ .then(function (res) {
+ _this.sidebar = {
+ height: res.height,
+ top: res.top,
+ };
+ });
+ },
+ setDiffData: function (_a) {
+ var target = _a.target,
+ data = _a.data;
+ var diffData = {};
+ Object.keys(data).forEach(function (key) {
+ if (target.data[key] !== data[key]) {
+ diffData[key] = data[key];
+ }
+ });
+ if (Object.keys(diffData).length) {
+ target.setData(diffData);
+ }
+ },
+ getAnchorRect: function (anchor) {
+ return utils_1
+ .getRect(anchor, '.van-index-anchor-wrapper')
+ .then(function (rect) {
+ return {
+ height: rect.height,
+ top: rect.top,
+ };
+ });
+ },
+ getActiveAnchorIndex: function () {
+ var _a = this,
+ children = _a.children,
+ scrollTop = _a.scrollTop;
+ var _b = this.data,
+ sticky = _b.sticky,
+ stickyOffsetTop = _b.stickyOffsetTop;
+ for (var i = this.children.length - 1; i >= 0; i--) {
+ var preAnchorHeight = i > 0 ? children[i - 1].height : 0;
+ var reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;
+ if (reachTop + scrollTop >= children[i].top) {
+ return i;
+ }
+ }
+ return -1;
+ },
+ onScroll: function () {
+ var _this = this;
+ var _a = this,
+ _b = _a.children,
+ children = _b === void 0 ? [] : _b,
+ scrollTop = _a.scrollTop;
+ if (!children.length) {
+ return;
+ }
+ var _c = this.data,
+ sticky = _c.sticky,
+ stickyOffsetTop = _c.stickyOffsetTop,
+ zIndex = _c.zIndex,
+ highlightColor = _c.highlightColor;
+ var active = this.getActiveAnchorIndex();
+ this.setDiffData({
+ target: this,
+ data: {
+ activeAnchorIndex: active,
+ },
+ });
+ if (sticky) {
+ var isActiveAnchorSticky_1 = false;
+ if (active !== -1) {
+ isActiveAnchorSticky_1 =
+ children[active].top <= stickyOffsetTop + scrollTop;
+ }
+ children.forEach(function (item, index) {
+ if (index === active) {
+ var wrapperStyle = '';
+ var anchorStyle =
+ '\n color: ' + highlightColor + ';\n ';
+ if (isActiveAnchorSticky_1) {
+ wrapperStyle =
+ '\n height: ' +
+ children[index].height +
+ 'px;\n ';
+ anchorStyle =
+ '\n position: fixed;\n top: ' +
+ stickyOffsetTop +
+ 'px;\n z-index: ' +
+ zIndex +
+ ';\n color: ' +
+ highlightColor +
+ ';\n ';
+ }
+ _this.setDiffData({
+ target: item,
+ data: {
+ active: true,
+ anchorStyle: anchorStyle,
+ wrapperStyle: wrapperStyle,
+ },
+ });
+ } else if (index === active - 1) {
+ var currentAnchor = children[index];
+ var currentOffsetTop = currentAnchor.top;
+ var targetOffsetTop =
+ index === children.length - 1
+ ? _this.top
+ : children[index + 1].top;
+ var parentOffsetHeight = targetOffsetTop - currentOffsetTop;
+ var translateY = parentOffsetHeight - currentAnchor.height;
+ var anchorStyle =
+ '\n position: relative;\n transform: translate3d(0, ' +
+ translateY +
+ 'px, 0);\n z-index: ' +
+ zIndex +
+ ';\n color: ' +
+ highlightColor +
+ ';\n ';
+ _this.setDiffData({
+ target: item,
+ data: {
+ active: true,
+ anchorStyle: anchorStyle,
+ },
+ });
+ } else {
+ _this.setDiffData({
+ target: item,
+ data: {
+ active: false,
+ anchorStyle: '',
+ wrapperStyle: '',
+ },
+ });
+ }
+ });
+ }
+ },
+ onClick: function (event) {
+ this.scrollToAnchor(event.target.dataset.index);
+ },
+ onTouchMove: function (event) {
+ var sidebarLength = this.children.length;
+ var touch = event.touches[0];
+ var itemHeight = this.sidebar.height / sidebarLength;
+ var index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);
+ if (index < 0) {
+ index = 0;
+ } else if (index > sidebarLength - 1) {
+ index = sidebarLength - 1;
+ }
+ this.scrollToAnchor(index);
+ },
+ onTouchStop: function () {
+ this.scrollToAnchorIndex = null;
+ },
+ scrollToAnchor: function (index) {
+ var _this = this;
+ if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {
+ return;
+ }
+ this.scrollToAnchorIndex = index;
+ var anchor = this.children.find(function (item) {
+ return item.data.index === _this.data.indexList[index];
+ });
+ if (anchor) {
+ anchor.scrollIntoView(this.scrollTop);
+ this.$emit('select', anchor.data.index);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.wxml
new file mode 100644
index 00000000..19a59cf9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.wxss
new file mode 100644
index 00000000..dba5dc07
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/index-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{position:fixed;top:50%;right:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-weight:500;padding:0 4px 0 16px;padding:0 var(--padding-base,4px) 0 var(--padding-md,16px);font-size:10px;font-size:var(--index-bar-index-font-size,10px);line-height:14px;line-height:var(--index-bar-index-line-height,14px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.js
new file mode 100644
index 00000000..a08ad2ca
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.js
@@ -0,0 +1,10 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ dot: Boolean,
+ info: null,
+ customStyle: String,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.wxml
new file mode 100644
index 00000000..b39b5245
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.wxml
@@ -0,0 +1,7 @@
+
+
+{{ dot ? '' : info }}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.wxss
new file mode 100644
index 00000000..953136a5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/info/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;white-space:nowrap;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;height:16px;height:var(--info-size,16px);min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:-apple-system-font,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,-apple-system-font,Helvetica Neue,Arial,sans-serif);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.js
new file mode 100644
index 00000000..5aa2a817
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.js
@@ -0,0 +1,18 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ color: String,
+ vertical: Boolean,
+ type: {
+ type: String,
+ value: 'circular',
+ },
+ size: String,
+ textSize: String,
+ },
+ data: {
+ array12: Array.from({ length: 12 }),
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxml
new file mode 100644
index 00000000..7d4a5397
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxs
new file mode 100644
index 00000000..02a0b800
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxs
@@ -0,0 +1,22 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function spinnerStyle(data) {
+ return style({
+ color: data.color,
+ width: addUnit(data.size),
+ height: addUnit(data.size),
+ });
+}
+
+function textStyle(data) {
+ return style({
+ 'font-size': addUnit(data.textSize),
+ });
+}
+
+module.exports = {
+ spinnerStyle: spinnerStyle,
+ textStyle: textStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxss
new file mode 100644
index 00000000..f28a6b46
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/loading/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/basic.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/basic.js
new file mode 100644
index 00000000..4505ce50
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/basic.js
@@ -0,0 +1,16 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.basic = void 0;
+exports.basic = Behavior({
+ methods: {
+ $emit: function (name, detail, options) {
+ this.triggerEvent(name, detail, options);
+ },
+ set: function (data) {
+ this.setData(data);
+ return new Promise(function (resolve) {
+ return wx.nextTick(resolve);
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/button.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/button.js
new file mode 100644
index 00000000..a0a6e2a9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/button.js
@@ -0,0 +1,44 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.button = void 0;
+var version_1 = require('../common/version');
+exports.button = Behavior({
+ externalClasses: ['hover-class'],
+ properties: {
+ id: String,
+ lang: String,
+ businessId: Number,
+ sessionFrom: String,
+ sendMessageTitle: String,
+ sendMessagePath: String,
+ sendMessageImg: String,
+ showMessageCard: Boolean,
+ appParameter: String,
+ ariaLabel: String,
+ openType: String,
+ getUserProfileDesc: String,
+ },
+ data: {
+ canIUseGetUserProfile: version_1.canIUseGetUserProfile(),
+ },
+ methods: {
+ onGetUserInfo: function (event) {
+ this.triggerEvent('getuserinfo', event.detail);
+ },
+ onContact: function (event) {
+ this.triggerEvent('contact', event.detail);
+ },
+ onGetPhoneNumber: function (event) {
+ this.triggerEvent('getphonenumber', event.detail);
+ },
+ onError: function (event) {
+ this.triggerEvent('error', event.detail);
+ },
+ onLaunchApp: function (event) {
+ this.triggerEvent('launchapp', event.detail);
+ },
+ onOpenSetting: function (event) {
+ this.triggerEvent('opensetting', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/link.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/link.js
new file mode 100644
index 00000000..0c09dab0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/link.js
@@ -0,0 +1,30 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.link = void 0;
+exports.link = Behavior({
+ properties: {
+ url: String,
+ linkType: {
+ type: String,
+ value: 'navigateTo',
+ },
+ },
+ methods: {
+ jumpLink: function (urlKey) {
+ if (urlKey === void 0) {
+ urlKey = 'url';
+ }
+ var url = this.data[urlKey];
+ if (url) {
+ if (
+ this.data.linkType === 'navigateTo' &&
+ getCurrentPages().length > 9
+ ) {
+ wx.redirectTo({ url: url });
+ } else {
+ wx[this.data.linkType]({ url: url });
+ }
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/page-scroll.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/page-scroll.js
new file mode 100644
index 00000000..9a3c055f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/page-scroll.js
@@ -0,0 +1,41 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.pageScrollMixin = void 0;
+var utils_1 = require('../common/utils');
+function onPageScroll(event) {
+ var _a = utils_1.getCurrentPage().vanPageScroller,
+ vanPageScroller = _a === void 0 ? [] : _a;
+ vanPageScroller.forEach(function (scroller) {
+ if (typeof scroller === 'function') {
+ // @ts-ignore
+ scroller(event);
+ }
+ });
+}
+var pageScrollMixin = function (scroller) {
+ return Behavior({
+ attached: function () {
+ var page = utils_1.getCurrentPage();
+ if (Array.isArray(page.vanPageScroller)) {
+ page.vanPageScroller.push(scroller.bind(this));
+ } else {
+ page.vanPageScroller =
+ typeof page.onPageScroll === 'function'
+ ? [page.onPageScroll.bind(page), scroller.bind(this)]
+ : [scroller.bind(this)];
+ }
+ page.onPageScroll = onPageScroll;
+ },
+ detached: function () {
+ var _a;
+ var page = utils_1.getCurrentPage();
+ page.vanPageScroller =
+ ((_a = page.vanPageScroller) === null || _a === void 0
+ ? void 0
+ : _a.filter(function (item) {
+ return item !== scroller;
+ })) || [];
+ },
+ });
+};
+exports.pageScrollMixin = pageScrollMixin;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/touch.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/touch.js
new file mode 100644
index 00000000..9c6da11a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/touch.js
@@ -0,0 +1,40 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.touch = void 0;
+// @ts-nocheck
+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 '';
+}
+exports.touch = Behavior({
+ methods: {
+ resetTouchStatus: function () {
+ this.direction = '';
+ this.deltaX = 0;
+ this.deltaY = 0;
+ this.offsetX = 0;
+ this.offsetY = 0;
+ },
+ touchStart: function (event) {
+ this.resetTouchStatus();
+ var touch = event.touches[0];
+ this.startX = touch.clientX;
+ this.startY = touch.clientY;
+ },
+ touchMove: function (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);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/transition.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/transition.js
new file mode 100644
index 00000000..9165aefc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/mixins/transition.js
@@ -0,0 +1,155 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.transition = void 0;
+// @ts-nocheck
+var utils_1 = require('../common/utils');
+var validator_1 = require('../common/validator');
+var getClassNames = function (name) {
+ return {
+ enter:
+ 'van-' +
+ name +
+ '-enter van-' +
+ name +
+ '-enter-active enter-class enter-active-class',
+ 'enter-to':
+ 'van-' +
+ name +
+ '-enter-to van-' +
+ name +
+ '-enter-active enter-to-class enter-active-class',
+ leave:
+ 'van-' +
+ name +
+ '-leave van-' +
+ name +
+ '-leave-active leave-class leave-active-class',
+ 'leave-to':
+ 'van-' +
+ name +
+ '-leave-to van-' +
+ name +
+ '-leave-active leave-to-class leave-active-class',
+ };
+};
+function transition(showDefaultValue) {
+ return Behavior({
+ properties: {
+ customStyle: String,
+ // @ts-ignore
+ show: {
+ type: Boolean,
+ value: showDefaultValue,
+ observer: 'observeShow',
+ },
+ // @ts-ignore
+ duration: {
+ type: null,
+ value: 300,
+ observer: 'observeDuration',
+ },
+ name: {
+ type: String,
+ value: 'fade',
+ },
+ },
+ data: {
+ type: '',
+ inited: false,
+ display: false,
+ },
+ ready: function () {
+ if (this.data.show === true) {
+ this.observeShow(true, false);
+ }
+ },
+ methods: {
+ observeShow: function (value, old) {
+ if (value === old) {
+ return;
+ }
+ value ? this.enter() : this.leave();
+ },
+ enter: function () {
+ var _this = this;
+ var _a = this.data,
+ duration = _a.duration,
+ name = _a.name;
+ var classNames = getClassNames(name);
+ var currentDuration = validator_1.isObj(duration)
+ ? duration.enter
+ : duration;
+ this.status = 'enter';
+ this.$emit('before-enter');
+ utils_1.requestAnimationFrame(function () {
+ if (_this.status !== 'enter') {
+ return;
+ }
+ _this.$emit('enter');
+ _this.setData({
+ inited: true,
+ display: true,
+ classes: classNames.enter,
+ currentDuration: currentDuration,
+ });
+ utils_1.requestAnimationFrame(function () {
+ if (_this.status !== 'enter') {
+ return;
+ }
+ _this.transitionEnded = false;
+ _this.setData({ classes: classNames['enter-to'] });
+ });
+ });
+ },
+ leave: function () {
+ var _this = this;
+ if (!this.data.display) {
+ return;
+ }
+ var _a = this.data,
+ duration = _a.duration,
+ name = _a.name;
+ var classNames = getClassNames(name);
+ var currentDuration = validator_1.isObj(duration)
+ ? duration.leave
+ : duration;
+ this.status = 'leave';
+ this.$emit('before-leave');
+ utils_1.requestAnimationFrame(function () {
+ if (_this.status !== 'leave') {
+ return;
+ }
+ _this.$emit('leave');
+ _this.setData({
+ classes: classNames.leave,
+ currentDuration: currentDuration,
+ });
+ utils_1.requestAnimationFrame(function () {
+ if (_this.status !== 'leave') {
+ return;
+ }
+ _this.transitionEnded = false;
+ setTimeout(function () {
+ return _this.onTransitionEnd();
+ }, currentDuration);
+ _this.setData({ classes: classNames['leave-to'] });
+ });
+ });
+ },
+ onTransitionEnd: function () {
+ if (this.transitionEnded) {
+ return;
+ }
+ this.transitionEnded = true;
+ this.$emit('after-' + this.status);
+ var _a = this.data,
+ show = _a.show,
+ display = _a.display;
+ if (!show && display) {
+ this.setData({ display: false });
+ }
+ },
+ },
+ });
+}
+exports.transition = transition;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.js
new file mode 100644
index 00000000..d207bd03
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.js
@@ -0,0 +1,68 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ classes: ['title-class'],
+ props: {
+ title: String,
+ fixed: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ placeholder: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ leftText: String,
+ rightText: String,
+ customStyle: String,
+ leftArrow: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ height: 46,
+ },
+ created: function () {
+ var statusBarHeight = utils_1.getSystemInfoSync().statusBarHeight;
+ this.setData({
+ statusBarHeight: statusBarHeight,
+ height: 46 + statusBarHeight,
+ });
+ },
+ mounted: function () {
+ this.setHeight();
+ },
+ methods: {
+ onClickLeft: function () {
+ this.$emit('click-left');
+ },
+ onClickRight: function () {
+ this.$emit('click-right');
+ },
+ setHeight: function () {
+ var _this = this;
+ if (!this.data.fixed || !this.data.placeholder) {
+ return;
+ }
+ wx.nextTick(function () {
+ utils_1.getRect(_this, '.van-nav-bar').then(function (res) {
+ if (res && 'height' in res) {
+ _this.setData({ height: res.height });
+ }
+ });
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxml
new file mode 100644
index 00000000..b6405fd5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+ {{ leftText }}
+
+
+
+
+ {{ title }}
+
+
+
+ {{ rightText }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxs
new file mode 100644
index 00000000..55b4158d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function barStyle(data) {
+ return style({
+ 'z-index': data.zIndex,
+ 'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,
+ });
+}
+
+module.exports = {
+ barStyle: barStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxss
new file mode 100644
index 00000000..48e9e3f5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/nav-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-nav-bar{position:relative;text-align:center;-webkit-user-select:none;user-select:none;height:46px;height:var(--nav-bar-height,46px);line-height:46px;line-height:var(--nav-bar-height,46px);background-color:#fff;background-color:var(--nav-bar-background-color,#fff)}.van-nav-bar__content{position:relative;height:100%}.van-nav-bar__text{display:inline-block;vertical-align:middle;margin:0 -16px;margin:0 -var(--padding-md,16px);padding:0 16px;padding:0 var(--padding-md,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__text--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-nav-bar__arrow{vertical-align:middle;font-size:16px!important;font-size:var(--nav-bar-arrow-size,16px)!important;color:#1989fa!important;color:var(--nav-bar-icon-color,#1989fa)!important}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;color:#323233;color:var(--nav-bar-title-text-color,#323233);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--nav-bar-title-font-size,16px)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:14px;font-size:var(--font-size-md,14px)}.van-nav-bar__left{left:16px;left:var(--padding-md,16px)}.van-nav-bar__right{right:16px;right:var(--padding-md,16px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.js
new file mode 100644
index 00000000..ade8c15c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.js
@@ -0,0 +1,131 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ props: {
+ text: {
+ type: String,
+ value: '',
+ observer: 'init',
+ },
+ mode: {
+ type: String,
+ value: '',
+ },
+ url: {
+ type: String,
+ value: '',
+ },
+ openType: {
+ type: String,
+ value: 'navigate',
+ },
+ delay: {
+ type: Number,
+ value: 1,
+ },
+ speed: {
+ type: Number,
+ value: 60,
+ observer: 'init',
+ },
+ scrollable: null,
+ leftIcon: {
+ type: String,
+ value: '',
+ },
+ color: String,
+ backgroundColor: String,
+ background: String,
+ wrapable: Boolean,
+ },
+ data: {
+ show: true,
+ },
+ created: function () {
+ this.resetAnimation = wx.createAnimation({
+ duration: 0,
+ timingFunction: 'linear',
+ });
+ },
+ destroyed: function () {
+ this.timer && clearTimeout(this.timer);
+ },
+ mounted: function () {
+ this.init();
+ },
+ methods: {
+ init: function () {
+ var _this = this;
+ utils_1.requestAnimationFrame(function () {
+ Promise.all([
+ utils_1.getRect(_this, '.van-notice-bar__content'),
+ utils_1.getRect(_this, '.van-notice-bar__wrap'),
+ ]).then(function (rects) {
+ var contentRect = rects[0],
+ wrapRect = rects[1];
+ var _a = _this.data,
+ speed = _a.speed,
+ scrollable = _a.scrollable,
+ delay = _a.delay;
+ if (
+ contentRect == null ||
+ wrapRect == null ||
+ !contentRect.width ||
+ !wrapRect.width ||
+ scrollable === false
+ ) {
+ return;
+ }
+ if (scrollable || wrapRect.width < contentRect.width) {
+ var duration =
+ ((wrapRect.width + contentRect.width) / speed) * 1000;
+ _this.wrapWidth = wrapRect.width;
+ _this.contentWidth = contentRect.width;
+ _this.duration = duration;
+ _this.animation = wx.createAnimation({
+ duration: duration,
+ timingFunction: 'linear',
+ delay: delay,
+ });
+ _this.scroll();
+ }
+ });
+ });
+ },
+ scroll: function () {
+ var _this = this;
+ this.timer && clearTimeout(this.timer);
+ this.timer = null;
+ this.setData({
+ animationData: this.resetAnimation
+ .translateX(this.wrapWidth)
+ .step()
+ .export(),
+ });
+ utils_1.requestAnimationFrame(function () {
+ _this.setData({
+ animationData: _this.animation
+ .translateX(-_this.contentWidth)
+ .step()
+ .export(),
+ });
+ });
+ this.timer = setTimeout(function () {
+ _this.scroll();
+ }, this.duration);
+ },
+ onClickIcon: function (event) {
+ if (this.data.mode === 'closeable') {
+ this.timer && clearTimeout(this.timer);
+ this.timer = null;
+ this.setData({ show: false });
+ this.$emit('close', event.detail);
+ }
+ },
+ onClick: function (event) {
+ this.$emit('click', event);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxml
new file mode 100644
index 00000000..9f6ee24f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxs
new file mode 100644
index 00000000..11e6456f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxs
@@ -0,0 +1,15 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style({
+ color: data.color,
+ 'background-color': data.backgroundColor,
+ background: data.background,
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxss
new file mode 100644
index 00000000..6a498587
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notice-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:40px;height:var(--notice-bar-height,40px);padding:0 16px;padding:var(--notice-bar-padding,0 16px);font-size:14px;font-size:var(--notice-bar-font-size,14px);color:#ed6a0c;color:var(--notice-bar-text-color,#ed6a0c);line-height:24px;line-height:var(--notice-bar-line-height,24px);background-color:#fffbe8;background-color:var(--notice-bar-background-color,#fffbe8)}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 16px;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:16px;font-size:var(--notice-bar-icon-size,16px);min-width:22px;min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px}.van-notice-bar__wrap{position:relative;-webkit-flex:1;flex:1;overflow:hidden;height:24px;height:var(--notice-bar-line-height,24px)}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.js
new file mode 100644
index 00000000..f2a9678c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.js
@@ -0,0 +1,70 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ props: {
+ message: String,
+ background: String,
+ type: {
+ type: String,
+ value: 'danger',
+ },
+ color: {
+ type: String,
+ value: color_1.WHITE,
+ },
+ duration: {
+ type: Number,
+ value: 3000,
+ },
+ zIndex: {
+ type: Number,
+ value: 110,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: false,
+ },
+ top: null,
+ },
+ data: {
+ show: false,
+ onOpened: null,
+ onClose: null,
+ onClick: null,
+ },
+ created: function () {
+ var statusBarHeight = utils_1.getSystemInfoSync().statusBarHeight;
+ this.setData({ statusBarHeight: statusBarHeight });
+ },
+ methods: {
+ show: function () {
+ var _this = this;
+ var _a = this.data,
+ duration = _a.duration,
+ onOpened = _a.onOpened;
+ clearTimeout(this.timer);
+ this.setData({ show: true });
+ wx.nextTick(onOpened);
+ if (duration > 0 && duration !== Infinity) {
+ this.timer = setTimeout(function () {
+ _this.hide();
+ }, duration);
+ }
+ },
+ hide: function () {
+ var onClose = this.data.onClose;
+ clearTimeout(this.timer);
+ this.setData({ show: false });
+ wx.nextTick(onClose);
+ },
+ onTap: function (event) {
+ var onClick = this.data.onClick;
+ if (onClick) {
+ onClick(event.detail);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.json
new file mode 100644
index 00000000..c14a65f6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxml
new file mode 100644
index 00000000..42d913eb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ {{ message }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxs
new file mode 100644
index 00000000..bbb94c28
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxs
@@ -0,0 +1,22 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ return style({
+ 'z-index': data.zIndex,
+ top: addUnit(data.top),
+ });
+}
+
+function notifyStyle(data) {
+ return style({
+ background: data.background,
+ color: data.color,
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ notifyStyle: notifyStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxss
new file mode 100644
index 00000000..8a7688b3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-notify{text-align:center;word-wrap:break-word;padding:6px 15px;padding:var(--notify-padding,6px 15px);font-size:14px;font-size:var(--notify-font-size,14px);line-height:20px;line-height:var(--notify-line-height,20px)}.van-notify__container{position:fixed;top:0;left:0;box-sizing:border-box;width:100%}.van-notify--primary{background-color:#1989fa;background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:#07c160;background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:#ee0a24;background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:#ff976a;background-color:var(--notify-warning-background-color,#ff976a)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/notify.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/notify.js
new file mode 100644
index 00000000..a789af17
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/notify/notify.js
@@ -0,0 +1,64 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var color_1 = require('../common/color');
+var defaultOptions = {
+ selector: '#van-notify',
+ type: 'danger',
+ message: '',
+ background: '',
+ duration: 3000,
+ zIndex: 110,
+ top: 0,
+ color: color_1.WHITE,
+ safeAreaInsetTop: false,
+ onClick: function () {},
+ onOpened: function () {},
+ onClose: function () {},
+};
+function parseOptions(message) {
+ if (message == null) {
+ return {};
+ }
+ return typeof message === 'string' ? { message: message } : message;
+}
+function getContext() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+function Notify(options) {
+ options = __assign(__assign({}, defaultOptions), parseOptions(options));
+ var context = options.context || getContext();
+ var notify = context.selectComponent(options.selector);
+ delete options.context;
+ delete options.selector;
+ if (notify) {
+ notify.setData(options);
+ notify.show();
+ return notify;
+ }
+ console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确');
+}
+exports.default = Notify;
+Notify.clear = function (options) {
+ options = __assign(__assign({}, defaultOptions), parseOptions(options));
+ var context = options.context || getContext();
+ var notify = context.selectComponent(options.selector);
+ if (notify) {
+ notify.hide();
+ }
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.js
new file mode 100644
index 00000000..a0e55eb6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.js
@@ -0,0 +1,24 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ show: Boolean,
+ customStyle: String,
+ duration: {
+ type: null,
+ value: 300,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ },
+ methods: {
+ onClick: function () {
+ this.$emit('click');
+ },
+ // for prevent touchmove
+ noop: function () {},
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.json
new file mode 100644
index 00000000..c14a65f6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.wxml
new file mode 100644
index 00000000..9212348b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.wxml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.wxss
new file mode 100644
index 00000000..0f9df0e8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/overlay/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);background-color:var(--overlay-background-color,rgba(0,0,0,.7))}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.js
new file mode 100644
index 00000000..8f91b3cb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.js
@@ -0,0 +1,11 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['header-class', 'footer-class'],
+ props: {
+ desc: String,
+ title: String,
+ status: String,
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.json
new file mode 100644
index 00000000..0e5425cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.wxml
new file mode 100644
index 00000000..1843703b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.wxss
new file mode 100644
index 00000000..3d0a9555
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/panel/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-panel{background:#fff;background:var(--panel-background-color,#fff)}.van-panel__header-value{color:#ee0a24;color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:8px 16px;padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.js
new file mode 100644
index 00000000..b2f0632c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.js
@@ -0,0 +1,132 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var validator_1 = require('../common/validator');
+var DEFAULT_DURATION = 200;
+component_1.VantComponent({
+ classes: ['active-class'],
+ props: {
+ valueKey: String,
+ className: String,
+ itemHeight: Number,
+ visibleItemCount: Number,
+ initialOptions: {
+ type: Array,
+ value: [],
+ },
+ defaultIndex: {
+ type: Number,
+ value: 0,
+ observer: function (value) {
+ this.setIndex(value);
+ },
+ },
+ },
+ data: {
+ startY: 0,
+ offset: 0,
+ duration: 0,
+ startOffset: 0,
+ options: [],
+ currentIndex: 0,
+ },
+ created: function () {
+ var _this = this;
+ var _a = this.data,
+ defaultIndex = _a.defaultIndex,
+ initialOptions = _a.initialOptions;
+ this.set({
+ currentIndex: defaultIndex,
+ options: initialOptions,
+ }).then(function () {
+ _this.setIndex(defaultIndex);
+ });
+ },
+ methods: {
+ getCount: function () {
+ return this.data.options.length;
+ },
+ onTouchStart: function (event) {
+ this.setData({
+ startY: event.touches[0].clientY,
+ startOffset: this.data.offset,
+ duration: 0,
+ });
+ },
+ onTouchMove: function (event) {
+ var data = this.data;
+ var deltaY = event.touches[0].clientY - data.startY;
+ this.setData({
+ offset: utils_1.range(
+ data.startOffset + deltaY,
+ -(this.getCount() * data.itemHeight),
+ data.itemHeight
+ ),
+ });
+ },
+ onTouchEnd: function () {
+ var data = this.data;
+ if (data.offset !== data.startOffset) {
+ this.setData({ duration: DEFAULT_DURATION });
+ var index = utils_1.range(
+ Math.round(-data.offset / data.itemHeight),
+ 0,
+ this.getCount() - 1
+ );
+ this.setIndex(index, true);
+ }
+ },
+ onClickItem: function (event) {
+ var index = event.currentTarget.dataset.index;
+ this.setIndex(index, true);
+ },
+ adjustIndex: function (index) {
+ var data = this.data;
+ var count = this.getCount();
+ index = utils_1.range(index, 0, count);
+ for (var i = index; i < count; i++) {
+ if (!this.isDisabled(data.options[i])) return i;
+ }
+ for (var i = index - 1; i >= 0; i--) {
+ if (!this.isDisabled(data.options[i])) return i;
+ }
+ },
+ isDisabled: function (option) {
+ return validator_1.isObj(option) && option.disabled;
+ },
+ getOptionText: function (option) {
+ var data = this.data;
+ return validator_1.isObj(option) && data.valueKey in option
+ ? option[data.valueKey]
+ : option;
+ },
+ setIndex: function (index, userAction) {
+ var _this = this;
+ var data = this.data;
+ index = this.adjustIndex(index) || 0;
+ var offset = -index * data.itemHeight;
+ if (index !== data.currentIndex) {
+ return this.set({ offset: offset, currentIndex: index }).then(
+ function () {
+ userAction && _this.$emit('change', index);
+ }
+ );
+ }
+ return this.set({ offset: offset });
+ },
+ setValue: function (value) {
+ var options = this.data.options;
+ for (var i = 0; i < options.length; i++) {
+ if (this.getOptionText(options[i]) === value) {
+ return this.setIndex(i);
+ }
+ }
+ return Promise.resolve();
+ },
+ getValue: function () {
+ var data = this.data;
+ return data.options[data.currentIndex];
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxml
new file mode 100644
index 00000000..f2c8da2b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ {{ computed.optionText(option, valueKey) }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxs
new file mode 100644
index 00000000..2d5a6117
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxs
@@ -0,0 +1,36 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function isObj(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function optionText(option, valueKey) {
+ return isObj(option) && option[valueKey] != null ? option[valueKey] : option;
+}
+
+function rootStyle(data) {
+ return style({
+ height: addUnit(data.itemHeight * data.visibleItemCount),
+ });
+}
+
+function wrapperStyle(data) {
+ var offset = addUnit(
+ data.offset + (data.itemHeight * (data.visibleItemCount - 1)) / 2
+ );
+
+ return style({
+ transition: 'transform ' + data.duration + 'ms',
+ 'line-height': addUnit(data.itemHeight),
+ transform: 'translate3d(0, ' + offset + ', 0)',
+ });
+}
+
+module.exports = {
+ optionText: optionText,
+ rootStyle: rootStyle,
+ wrapperStyle: wrapperStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxss
new file mode 100644
index 00000000..c5c69100
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker-column/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker-column{overflow:hidden;text-align:center;color:#000;color:var(--picker-option-text-color,#000);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--picker-option-selected-text-color,#323233)}.van-picker-column__item--disabled{opacity:.3;opacity:var(--picker-option-disabled-opacity,.3)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.js
new file mode 100644
index 00000000..8e5d1174
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.js
@@ -0,0 +1,179 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var shared_1 = require('./shared');
+component_1.VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: __assign(__assign({}, shared_1.pickerProps), {
+ valueKey: {
+ type: String,
+ value: 'text',
+ },
+ toolbarPosition: {
+ type: String,
+ value: 'top',
+ },
+ defaultIndex: {
+ type: Number,
+ value: 0,
+ },
+ columns: {
+ type: Array,
+ value: [],
+ observer: function (columns) {
+ if (columns === void 0) {
+ columns = [];
+ }
+ this.simple = columns.length && !columns[0].values;
+ if (Array.isArray(this.children) && this.children.length) {
+ this.setColumns().catch(function () {});
+ }
+ },
+ },
+ }),
+ beforeCreate: function () {
+ var _this = this;
+ Object.defineProperty(this, 'children', {
+ get: function () {
+ return _this.selectAllComponents('.van-picker__column') || [];
+ },
+ });
+ },
+ methods: {
+ noop: function () {},
+ setColumns: function () {
+ var _this = this;
+ var data = this.data;
+ var columns = this.simple ? [{ values: data.columns }] : data.columns;
+ var stack = columns.map(function (column, index) {
+ return _this.setColumnValues(index, column.values);
+ });
+ return Promise.all(stack);
+ },
+ emit: function (event) {
+ var type = event.currentTarget.dataset.type;
+ if (this.simple) {
+ this.$emit(type, {
+ value: this.getColumnValue(0),
+ index: this.getColumnIndex(0),
+ });
+ } else {
+ this.$emit(type, {
+ value: this.getValues(),
+ index: this.getIndexes(),
+ });
+ }
+ },
+ onChange: function (event) {
+ if (this.simple) {
+ this.$emit('change', {
+ picker: this,
+ value: this.getColumnValue(0),
+ index: this.getColumnIndex(0),
+ });
+ } else {
+ this.$emit('change', {
+ picker: this,
+ value: this.getValues(),
+ index: event.currentTarget.dataset.index,
+ });
+ }
+ },
+ // get column instance by index
+ getColumn: function (index) {
+ return this.children[index];
+ },
+ // get column value by index
+ getColumnValue: function (index) {
+ var column = this.getColumn(index);
+ return column && column.getValue();
+ },
+ // set column value by index
+ setColumnValue: function (index, value) {
+ var column = this.getColumn(index);
+ if (column == null) {
+ return Promise.reject(new Error('setColumnValue: 对应列不存在'));
+ }
+ return column.setValue(value);
+ },
+ // get column option index by column index
+ getColumnIndex: function (columnIndex) {
+ return (this.getColumn(columnIndex) || {}).data.currentIndex;
+ },
+ // set column option index by column index
+ setColumnIndex: function (columnIndex, optionIndex) {
+ var column = this.getColumn(columnIndex);
+ if (column == null) {
+ return Promise.reject(new Error('setColumnIndex: 对应列不存在'));
+ }
+ return column.setIndex(optionIndex);
+ },
+ // get options of column by index
+ getColumnValues: function (index) {
+ return (this.children[index] || {}).data.options;
+ },
+ // set options of column by index
+ setColumnValues: function (index, options, needReset) {
+ if (needReset === void 0) {
+ needReset = true;
+ }
+ var column = this.children[index];
+ if (column == null) {
+ return Promise.reject(new Error('setColumnValues: 对应列不存在'));
+ }
+ var isSame =
+ JSON.stringify(column.data.options) === JSON.stringify(options);
+ if (isSame) {
+ return Promise.resolve();
+ }
+ return column.set({ options: options }).then(function () {
+ if (needReset) {
+ column.setIndex(0);
+ }
+ });
+ },
+ // get values of all columns
+ getValues: function () {
+ return this.children.map(function (child) {
+ return child.getValue();
+ });
+ },
+ // set values of all columns
+ setValues: function (values) {
+ var _this = this;
+ var stack = values.map(function (value, index) {
+ return _this.setColumnValue(index, value);
+ });
+ return Promise.all(stack);
+ },
+ // get indexes of all columns
+ getIndexes: function () {
+ return this.children.map(function (child) {
+ return child.data.currentIndex;
+ });
+ },
+ // set indexes of all columns
+ setIndexes: function (indexes) {
+ var _this = this;
+ var stack = indexes.map(function (optionIndex, columnIndex) {
+ return _this.setColumnIndex(columnIndex, optionIndex);
+ });
+ return Promise.all(stack);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.json
new file mode 100644
index 00000000..2fcec899
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "picker-column": "../picker-column/index",
+ "loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxml
new file mode 100644
index 00000000..dbf12492
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxs
new file mode 100644
index 00000000..0abbd10e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxs
@@ -0,0 +1,42 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+var array = require('../wxs/array.wxs');
+
+function columnsStyle(data) {
+ return style({
+ height: addUnit(data.itemHeight * data.visibleItemCount),
+ });
+}
+
+function maskStyle(data) {
+ return style({
+ 'background-size':
+ '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),
+ });
+}
+
+function frameStyle(data) {
+ return style({
+ height: addUnit(data.itemHeight),
+ });
+}
+
+function columns(columns) {
+ if (!array.isArray(columns)) {
+ return [];
+ }
+
+ if (columns.length && !columns[0].values) {
+ return [{ values: columns }];
+ }
+
+ return columns;
+}
+
+module.exports = {
+ columnsStyle: columnsStyle,
+ frameStyle: frameStyle,
+ maskStyle: maskStyle,
+ columns: columns,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxss
new file mode 100644
index 00000000..f74b164b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;-webkit-user-select:none;user-select:none;background-color:#fff;background-color:var(--picker-background-color,#fff)}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;height:var(--picker-toolbar-height,44px);line-height:44px;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{padding:0 16px;padding:var(--picker-action-padding,0 16px);font-size:14px;font-size:var(--picker-action-font-size,14px)}.van-picker__cancel--hover,.van-picker__confirm--hover{opacity:.7}.van-picker__confirm{color:#576b95;color:var(--picker-confirm-action-color,#576b95)}.van-picker__cancel{color:#969799;color:var(--picker-cancel-action-color,#969799)}.van-picker__title{max-width:50%;text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:hsla(0,0%,100%,.9);background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9))}.van-picker__mask{top:0;left:0;z-index:2;width:100%;height:100%;background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-repeat:no-repeat;background-position:top,bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden}.van-picker__frame,.van-picker__mask{position:absolute;pointer-events:none}.van-picker__frame{top:50%;right:16px;left:16px;z-index:1;-webkit-transform:translateY(-50%);transform:translateY(-50%)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/shared.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/shared.js
new file mode 100644
index 00000000..9b2ca48a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/shared.js
@@ -0,0 +1,24 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.pickerProps = void 0;
+exports.pickerProps = {
+ title: String,
+ loading: Boolean,
+ showToolbar: Boolean,
+ cancelButtonText: {
+ type: String,
+ value: '取消',
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认',
+ },
+ visibleItemCount: {
+ type: Number,
+ value: 6,
+ },
+ itemHeight: {
+ type: Number,
+ value: 44,
+ },
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/toolbar.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/toolbar.wxml
new file mode 100644
index 00000000..414f6120
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/picker/toolbar.wxml
@@ -0,0 +1,23 @@
+
+
+ {{ cancelButtonText }}
+
+ {{
+ title
+ }}
+
+ {{ confirmButtonText }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.js
new file mode 100644
index 00000000..fbe673cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.js
@@ -0,0 +1,89 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var transition_1 = require('../mixins/transition');
+component_1.VantComponent({
+ classes: [
+ 'enter-class',
+ 'enter-active-class',
+ 'enter-to-class',
+ 'leave-class',
+ 'leave-active-class',
+ 'leave-to-class',
+ 'close-icon-class',
+ ],
+ mixins: [transition_1.transition(false)],
+ props: {
+ round: Boolean,
+ closeable: Boolean,
+ customStyle: String,
+ overlayStyle: String,
+ transition: {
+ type: String,
+ observer: 'observeClass',
+ },
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeIcon: {
+ type: String,
+ value: 'cross',
+ },
+ closeIconPosition: {
+ type: String,
+ value: 'top-right',
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ position: {
+ type: String,
+ value: 'center',
+ observer: 'observeClass',
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: false,
+ },
+ },
+ created: function () {
+ this.observeClass();
+ },
+ methods: {
+ onClickCloseIcon: function () {
+ this.$emit('close');
+ },
+ onClickOverlay: function () {
+ this.$emit('click-overlay');
+ if (this.data.closeOnClickOverlay) {
+ this.$emit('close');
+ }
+ },
+ observeClass: function () {
+ var _a = this.data,
+ transition = _a.transition,
+ position = _a.position,
+ duration = _a.duration;
+ var updateData = {
+ name: transition || position,
+ };
+ if (transition === 'none') {
+ updateData.duration = 0;
+ this.originDuration = duration;
+ } else if (this.originDuration != null) {
+ updateData.duration = this.originDuration;
+ }
+ this.setData(updateData);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.json
new file mode 100644
index 00000000..88a6eab2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-overlay": "../overlay/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxml
new file mode 100644
index 00000000..0be99d46
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxs
new file mode 100644
index 00000000..8d59f245
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function popupStyle(data) {
+ return style([
+ {
+ 'z-index': data.zIndex,
+ '-webkit-transition-duration': data.currentDuration + 'ms',
+ 'transition-duration': data.currentDuration + 'ms',
+ },
+ data.display ? null : 'display: none',
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ popupStyle: popupStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxss
new file mode 100644
index 00000000..a3d6e6fd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/popup/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.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;border-radius:var(--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;border-radius:0 0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:var(--popup-round-border-radius,16px) 0 0 var(--popup-round-border-radius,16px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0;border-radius:var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,16px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.js
new file mode 100644
index 00000000..f41cf4ff
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.js
@@ -0,0 +1,56 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ props: {
+ inactive: Boolean,
+ percentage: {
+ type: Number,
+ observer: 'setLeft',
+ },
+ pivotText: String,
+ pivotColor: String,
+ trackColor: String,
+ showPivot: {
+ type: Boolean,
+ value: true,
+ },
+ color: {
+ type: String,
+ value: color_1.BLUE,
+ },
+ textColor: {
+ type: String,
+ value: '#fff',
+ },
+ strokeWidth: {
+ type: null,
+ value: 4,
+ },
+ },
+ data: {
+ right: 0,
+ },
+ mounted: function () {
+ this.setLeft();
+ },
+ methods: {
+ setLeft: function () {
+ var _this = this;
+ Promise.all([
+ utils_1.getRect(this, '.van-progress'),
+ utils_1.getRect(this, '.van-progress__pivot'),
+ ]).then(function (_a) {
+ var portion = _a[0],
+ pivot = _a[1];
+ if (portion && pivot) {
+ _this.setData({
+ right: (pivot.width * (_this.data.percentage - 100)) / 100,
+ });
+ }
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxml
new file mode 100644
index 00000000..e81514d0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{ computed.pivotText(pivotText, percentage) }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxs
new file mode 100644
index 00000000..5b1e8e6b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxs
@@ -0,0 +1,36 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+var style = require('../wxs/style.wxs');
+
+function pivotText(pivotText, percentage) {
+ return pivotText || percentage + '%';
+}
+
+function rootStyle(data) {
+ return style({
+ 'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',
+ 'background': data.trackColor,
+ });
+}
+
+function portionStyle(data) {
+ return style({
+ background: data.inactive ? '#cacaca' : data.color,
+ width: data.percentage ? data.percentage + '%' : '',
+ });
+}
+
+function pivotStyle(data) {
+ return style({
+ color: data.textColor,
+ right: data.right + 'px',
+ background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,
+ });
+}
+
+module.exports = {
+ pivotText: pivotText,
+ rootStyle: rootStyle,
+ portionStyle: portionStyle,
+ pivotStyle: pivotStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxss
new file mode 100644
index 00000000..3844a59e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/progress/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-progress{position:relative;height:4px;height:var(--progress-height,4px);border-radius:4px;border-radius:var(--progress-height,4px);background:#ebedf0;background:var(--progress-background-color,#ebedf0)}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit;background:#1989fa;background:var(--progress-color,#1989fa)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;text-align:center;word-break:keep-all;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#fff;color:var(--progress-pivot-text-color,#fff);padding:0 5px;padding:var(--progress-pivot-padding,0 5px);font-size:10px;font-size:var(--progress-pivot-font-size,10px);line-height:1.6;line-height:var(--progress-pivot-line-height,1.6);background-color:#1989fa;background-color:var(--progress-pivot-background-color,#1989fa)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.js
new file mode 100644
index 00000000..cd2e0528
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.js
@@ -0,0 +1,26 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ field: true,
+ relation: relation_1.useChildren('radio'),
+ props: {
+ value: {
+ type: null,
+ observer: 'updateChildren',
+ },
+ direction: String,
+ disabled: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren: function () {
+ this.children.forEach(function (child) {
+ return child.updateFromParent();
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.wxml
new file mode 100644
index 00000000..0ab17afc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.wxss
new file mode 100644
index 00000000..df45fd68
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-radio-group--horizontal{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.js
new file mode 100644
index 00000000..9d9fc0c8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.js
@@ -0,0 +1,75 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var version_1 = require('../common/version');
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ field: true,
+ relation: relation_1.useParent('radio-group', function () {
+ this.updateFromParent();
+ }),
+ classes: ['icon-class', 'label-class'],
+ props: {
+ name: null,
+ value: null,
+ disabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
+ labelPosition: {
+ type: String,
+ value: 'right',
+ },
+ labelDisabled: Boolean,
+ shape: {
+ type: String,
+ value: 'round',
+ },
+ iconSize: {
+ type: null,
+ value: 20,
+ },
+ },
+ data: {
+ direction: '',
+ parentDisabled: false,
+ },
+ methods: {
+ updateFromParent: function () {
+ if (!this.parent) {
+ return;
+ }
+ var _a = this.parent.data,
+ value = _a.value,
+ parentDisabled = _a.disabled,
+ direction = _a.direction;
+ this.setData({
+ value: value,
+ direction: direction,
+ parentDisabled: parentDisabled,
+ });
+ },
+ emitChange: function (value) {
+ var instance = this.parent || this;
+ instance.$emit('input', value);
+ instance.$emit('change', value);
+ if (version_1.canIUseModel()) {
+ instance.setData({ value: value });
+ }
+ },
+ onChange: function () {
+ if (!this.data.disabled && !this.data.parentDisabled) {
+ this.emitChange(this.data.name);
+ }
+ },
+ onClickLabel: function () {
+ var _a = this.data,
+ disabled = _a.disabled,
+ parentDisabled = _a.parentDisabled,
+ labelDisabled = _a.labelDisabled,
+ name = _a.name;
+ if (!(disabled || parentDisabled) && !labelDisabled) {
+ this.emitChange(name);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxml
new file mode 100644
index 00000000..5f898c0b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxs
new file mode 100644
index 00000000..a428aad9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxs
@@ -0,0 +1,33 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function iconStyle(data) {
+ var styles = {
+ 'font-size': addUnit(data.iconSize),
+ };
+
+ if (
+ data.checkedColor &&
+ !(data.disabled || data.parentDisabled) &&
+ data.value === data.name
+ ) {
+ styles['border-color'] = data.checkedColor;
+ styles['background-color'] = data.checkedColor;
+ }
+
+ return style(styles);
+}
+
+function iconCustomStyle(data) {
+ return style({
+ 'line-height': addUnit(data.iconSize),
+ 'font-size': '.8em',
+ display: 'block',
+ });
+}
+
+module.exports = {
+ iconStyle: iconStyle,
+ iconCustomStyle: iconCustomStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxss
new file mode 100644
index 00000000..602a69e3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/radio/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio--horizontal{margin-right:12px;margin-right:var(--padding-sm,12px)}.van-radio__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.js
new file mode 100644
index 00000000..6e61947c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.js
@@ -0,0 +1,111 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var utils_1 = require('../common/utils');
+var component_1 = require('../common/component');
+var version_1 = require('../common/version');
+component_1.VantComponent({
+ field: true,
+ classes: ['icon-class'],
+ props: {
+ value: {
+ type: Number,
+ observer: function (value) {
+ if (value !== this.data.innerValue) {
+ this.setData({ innerValue: value });
+ }
+ },
+ },
+ readonly: Boolean,
+ disabled: Boolean,
+ allowHalf: Boolean,
+ size: null,
+ icon: {
+ type: String,
+ value: 'star',
+ },
+ voidIcon: {
+ type: String,
+ value: 'star-o',
+ },
+ color: {
+ type: String,
+ value: '#ffd21e',
+ },
+ voidColor: {
+ type: String,
+ value: '#c7c7c7',
+ },
+ disabledColor: {
+ type: String,
+ value: '#bdbdbd',
+ },
+ count: {
+ type: Number,
+ value: 5,
+ observer: function (value) {
+ this.setData({ innerCountArray: Array.from({ length: value }) });
+ },
+ },
+ gutter: null,
+ touchable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ innerValue: 0,
+ innerCountArray: Array.from({ length: 5 }),
+ },
+ methods: {
+ onSelect: function (event) {
+ var _this = this;
+ var data = this.data;
+ var score = event.currentTarget.dataset.score;
+ if (!data.disabled && !data.readonly) {
+ this.setData({ innerValue: score + 1 });
+ if (version_1.canIUseModel()) {
+ this.setData({ value: score + 1 });
+ }
+ wx.nextTick(function () {
+ _this.$emit('input', score + 1);
+ _this.$emit('change', score + 1);
+ });
+ }
+ },
+ onTouchMove: function (event) {
+ var _this = this;
+ var touchable = this.data.touchable;
+ if (!touchable) return;
+ var clientX = event.touches[0].clientX;
+ utils_1.getAllRect(this, '.van-rate__icon').then(function (list) {
+ var target = list
+ .sort(function (cur, next) {
+ return cur.dataset.score - next.dataset.score;
+ })
+ .find(function (item) {
+ return clientX >= item.left && clientX <= item.right;
+ });
+ if (target != null) {
+ _this.onSelect(
+ __assign(__assign({}, event), { currentTarget: target })
+ );
+ }
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.wxml
new file mode 100644
index 00000000..58eee5cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.wxss
new file mode 100644
index 00000000..6fd34354
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/rate/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-rate{display:-webkit-inline-flex;display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;padding:0 2px;padding:0 var(--rate-horizontal-padding,2px)}.van-rate__icon{display:block;height:1em;font-size:20px;font-size:var(--rate-icon-size,20px)}.van-rate__icon--half{position:absolute;top:0;width:.5em;overflow:hidden;left:2px;left:var(--rate-horizontal-padding,2px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.js
new file mode 100644
index 00000000..a107b649
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.js
@@ -0,0 +1,26 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ relation: relation_1.useChildren('col', function (target) {
+ var gutter = this.data.gutter;
+ if (gutter) {
+ target.setData({ gutter: gutter });
+ }
+ }),
+ props: {
+ gutter: {
+ type: Number,
+ observer: 'setGutter',
+ },
+ },
+ methods: {
+ setGutter: function () {
+ var _this = this;
+ this.children.forEach(function (col) {
+ col.setData(_this.data);
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxml
new file mode 100644
index 00000000..69a4359b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxs
new file mode 100644
index 00000000..f5c59587
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxs
@@ -0,0 +1,18 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ if (!data.gutter) {
+ return '';
+ }
+
+ return style({
+ 'margin-right': addUnit(-data.gutter / 2),
+ 'margin-left': addUnit(-data.gutter / 2),
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxss
new file mode 100644
index 00000000..32a098b0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/row/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-row:after{display:table;clear:both;content:""}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.js
new file mode 100644
index 00000000..2e61ab9b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.js
@@ -0,0 +1,81 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var version_1 = require('../common/version');
+component_1.VantComponent({
+ field: true,
+ classes: ['field-class', 'input-class', 'cancel-class'],
+ props: {
+ label: String,
+ focus: Boolean,
+ error: Boolean,
+ disabled: Boolean,
+ readonly: Boolean,
+ inputAlign: String,
+ showAction: Boolean,
+ useActionSlot: Boolean,
+ useLeftIconSlot: Boolean,
+ useRightIconSlot: Boolean,
+ leftIcon: {
+ type: String,
+ value: 'search',
+ },
+ rightIcon: String,
+ placeholder: String,
+ placeholderStyle: String,
+ actionText: {
+ type: String,
+ value: '取消',
+ },
+ background: {
+ type: String,
+ value: '#ffffff',
+ },
+ maxlength: {
+ type: Number,
+ value: -1,
+ },
+ shape: {
+ type: String,
+ value: 'square',
+ },
+ clearable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onChange: function (event) {
+ if (version_1.canIUseModel()) {
+ this.setData({ value: event.detail });
+ }
+ this.$emit('change', event.detail);
+ },
+ onCancel: function () {
+ var _this = this;
+ /**
+ * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
+ * https://github.com/youzan/@vant/weapp/issues/1768
+ */
+ setTimeout(function () {
+ if (version_1.canIUseModel()) {
+ _this.setData({ value: '' });
+ }
+ _this.$emit('cancel');
+ _this.$emit('change', '');
+ }, 200);
+ },
+ onSearch: function (event) {
+ this.$emit('search', event.detail);
+ },
+ onFocus: function (event) {
+ this.$emit('focus', event.detail);
+ },
+ onBlur: function (event) {
+ this.$emit('blur', event.detail);
+ },
+ onClear: function (event) {
+ this.$emit('clear', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.json
new file mode 100644
index 00000000..b4cfe918
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-field": "../field/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.wxml
new file mode 100644
index 00000000..1d0e6f1f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+ {{ actionText }}
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.wxss
new file mode 100644
index 00000000..c918deb8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/search/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:12px;padding-left:var(--padding-sm,12px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.js
new file mode 100644
index 00000000..440caf84
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.js
@@ -0,0 +1,57 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ // whether to show popup
+ show: Boolean,
+ // overlay custom style
+ overlayStyle: Object,
+ // z-index
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ title: String,
+ cancelText: {
+ type: String,
+ value: '取消',
+ },
+ description: String,
+ options: {
+ type: Array,
+ value: [],
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ duration: {
+ type: null,
+ value: 300,
+ },
+ },
+ methods: {
+ onClickOverlay: function () {
+ this.$emit('click-overlay');
+ },
+ onCancel: function () {
+ this.onClose();
+ this.$emit('cancel');
+ },
+ onSelect: function (event) {
+ this.$emit('select', event.detail);
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.json
new file mode 100644
index 00000000..15a7c224
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "options": "./options"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxml
new file mode 100644
index 00000000..cefc3af4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxs
new file mode 100644
index 00000000..2149ee9e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+function isMulti(options) {
+ if (options == null || options[0] == null) {
+ return false;
+ }
+
+ return "Array" === options.constructor && "Array" === options[0].constructor;
+}
+
+module.exports = {
+ isMulti: isMulti
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxss
new file mode 100644
index 00000000..8d42eb27
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-share-sheet__header{padding:12px 16px 4px;text-align:center}.van-share-sheet__title{margin-top:8px;color:#323233;font-weight:400;font-size:14px;line-height:20px}.van-share-sheet__title:empty,.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{display:block;margin-top:8px;color:#969799;font-size:12px;line-height:16px}.van-share-sheet__description:empty,.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{display:block;box-sizing:initial;width:100%;height:auto;padding:0;font-size:16px;line-height:48px;text-align:center;background:#fff;border:none}.van-share-sheet__cancel:before{display:block;height:8px;background-color:#f7f8fa;content:" "}.van-share-sheet__cancel:after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.js
new file mode 100644
index 00000000..f503f4c6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.js
@@ -0,0 +1,31 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ options: Array,
+ showBorder: Boolean,
+ },
+ methods: {
+ onSelect: function (event) {
+ var index = event.currentTarget.dataset.index;
+ var option = this.data.options[index];
+ this.$emit('select', __assign(__assign({}, option), { index: index }));
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxml
new file mode 100644
index 00000000..cad68377
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{ item.name }}
+
+ {{ item.description }}
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxs
new file mode 100644
index 00000000..ab6033b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var PRESET_ICONS = ['qq', 'weibo', 'wechat', 'link', 'qrcode', 'poster'];
+
+function getIconURL(icon) {
+ if (PRESET_ICONS.indexOf(icon) !== -1) {
+ return 'https://img.yzcdn.cn/vant/share-icon-' + icon + '.png';
+ }
+
+ return icon;
+}
+
+module.exports = {
+ getIconURL: getIconURL,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxss
new file mode 100644
index 00000000..ca7b02f2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/share-sheet/options.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-share-sheet__options{position:relative;display:-webkit-flex;display:flex;padding:16px 0 16px 8px;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border:before{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:0;right:0;left:16px;border-top:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{height:auto;padding:0;line-height:inherit;background-color:initial;border:0}.van-share-sheet__button:after{border:0}.van-share-sheet__icon{width:48px;height:48px;margin:0 16px}.van-share-sheet__name{margin-top:8px;padding:0 4px;color:#646566;font-size:12px}.van-share-sheet__option-description{padding:0 4px;color:#c8c9cc;font-size:12px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.js
new file mode 100644
index 00000000..a5ed300b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.js
@@ -0,0 +1,32 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ classes: ['active-class', 'disabled-class'],
+ relation: relation_1.useParent('sidebar'),
+ props: {
+ dot: Boolean,
+ badge: null,
+ info: null,
+ title: String,
+ disabled: Boolean,
+ },
+ methods: {
+ onClick: function () {
+ var _this = this;
+ var parent = this.parent;
+ if (!parent || this.data.disabled) {
+ return;
+ }
+ var index = parent.children.indexOf(this);
+ parent.setActive(index).then(function () {
+ _this.$emit('click', index);
+ parent.$emit('change', index);
+ });
+ },
+ setActive: function (selected) {
+ return this.setData({ selected: selected });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.json
new file mode 100644
index 00000000..bf0ebe00
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.wxml
new file mode 100644
index 00000000..c5c08a62
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.wxml
@@ -0,0 +1,18 @@
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.wxss
new file mode 100644
index 00000000..f134528f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.js
new file mode 100644
index 00000000..5265361d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.js
@@ -0,0 +1,38 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ relation: relation_1.useChildren('sidebar-item', function () {
+ this.setActive(this.data.activeKey);
+ }),
+ props: {
+ activeKey: {
+ type: Number,
+ value: 0,
+ observer: 'setActive',
+ },
+ },
+ beforeCreate: function () {
+ this.currentActive = -1;
+ },
+ methods: {
+ setActive: function (activeKey) {
+ var _a = this,
+ children = _a.children,
+ currentActive = _a.currentActive;
+ if (!children.length) {
+ return Promise.resolve();
+ }
+ this.currentActive = activeKey;
+ var stack = [];
+ if (currentActive !== activeKey && children[currentActive]) {
+ stack.push(children[currentActive].setActive(false));
+ }
+ if (children[activeKey]) {
+ stack.push(children[activeKey].setActive(true));
+ }
+ return Promise.all(stack);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.wxml
new file mode 100644
index 00000000..96b11c71
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.wxml
@@ -0,0 +1,3 @@
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.wxss
new file mode 100644
index 00000000..8ad18841
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sidebar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sidebar{width:80px;width:var(--sidebar-width,80px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.js
new file mode 100644
index 00000000..52137fa8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.js
@@ -0,0 +1,48 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['avatar-class', 'title-class', 'row-class'],
+ props: {
+ row: {
+ type: Number,
+ value: 0,
+ observer: function (value) {
+ this.setData({ rowArray: Array.from({ length: value }) });
+ },
+ },
+ title: Boolean,
+ avatar: Boolean,
+ loading: {
+ type: Boolean,
+ value: true,
+ },
+ animate: {
+ type: Boolean,
+ value: true,
+ },
+ avatarSize: {
+ type: String,
+ value: '32px',
+ },
+ avatarShape: {
+ type: String,
+ value: 'round',
+ },
+ titleWidth: {
+ type: String,
+ value: '40%',
+ },
+ rowWidth: {
+ type: null,
+ value: '100%',
+ observer: function (val) {
+ this.setData({ isArray: val instanceof Array });
+ },
+ },
+ },
+ data: {
+ isArray: false,
+ rowArray: [],
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.json
new file mode 100644
index 00000000..a89ef4db
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.wxml
new file mode 100644
index 00000000..058e2efd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.wxml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.wxss
new file mode 100644
index 00000000..565b26e4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/skeleton/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-skeleton{display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:0 16px;padding:var(--skeleton-padding,0 16px)}.van-skeleton__avatar{-webkit-flex-shrink:0;flex-shrink:0;margin-right:16px;margin-right:var(--padding-md,16px);background-color:#f2f3f5;background-color:var(--skeleton-avatar-background-color,#f2f3f5)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{-webkit-flex:1;flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:8px;padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{height:16px;height:var(--skeleton-row-height,16px);background-color:#f2f3f5;background-color:var(--skeleton-row-background-color,#f2f3f5)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:12px;margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{-webkit-animation:van-skeleton-blink 1.2s ease-in-out infinite;animation:van-skeleton-blink 1.2s ease-in-out infinite}@-webkit-keyframes van-skeleton-blink{50%{opacity:.6}}@keyframes van-skeleton-blink{50%{opacity:.6}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.js
new file mode 100644
index 00000000..82fb5f4c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.js
@@ -0,0 +1,118 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var touch_1 = require('../mixins/touch');
+var version_1 = require('../common/version');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ mixins: [touch_1.touch],
+ props: {
+ disabled: Boolean,
+ useButtonSlot: Boolean,
+ activeColor: String,
+ inactiveColor: String,
+ max: {
+ type: Number,
+ value: 100,
+ },
+ min: {
+ type: Number,
+ value: 0,
+ },
+ step: {
+ type: Number,
+ value: 1,
+ },
+ value: {
+ type: Number,
+ value: 0,
+ observer: function (val) {
+ if (val !== this.value) {
+ this.updateValue(val);
+ }
+ },
+ },
+ barHeight: {
+ type: null,
+ value: 2,
+ },
+ },
+ created: function () {
+ this.updateValue(this.data.value);
+ },
+ methods: {
+ onTouchStart: function (event) {
+ if (this.data.disabled) return;
+ this.touchStart(event);
+ this.startValue = this.format(this.value);
+ this.dragStatus = 'start';
+ },
+ onTouchMove: function (event) {
+ var _this = this;
+ if (this.data.disabled) return;
+ if (this.dragStatus === 'start') {
+ this.$emit('drag-start');
+ }
+ this.touchMove(event);
+ this.dragStatus = 'draging';
+ utils_1.getRect(this, '.van-slider').then(function (rect) {
+ var diff = (_this.deltaX / rect.width) * _this.getRange();
+ _this.newValue = _this.startValue + diff;
+ _this.updateValue(_this.newValue, false, true);
+ });
+ },
+ onTouchEnd: function () {
+ if (this.data.disabled) return;
+ if (this.dragStatus === 'draging') {
+ this.updateValue(this.newValue, true);
+ this.$emit('drag-end');
+ }
+ },
+ onClick: function (event) {
+ var _this = this;
+ if (this.data.disabled) return;
+ var min = this.data.min;
+ utils_1.getRect(this, '.van-slider').then(function (rect) {
+ var value =
+ ((event.detail.x - rect.left) / rect.width) * _this.getRange() + min;
+ _this.updateValue(value, true);
+ });
+ },
+ updateValue: function (value, end, drag) {
+ value = this.format(value);
+ var min = this.data.min;
+ var width = ((value - min) * 100) / this.getRange() + '%';
+ this.value = value;
+ this.setData({
+ barStyle:
+ '\n width: ' +
+ width +
+ ';\n ' +
+ (drag ? 'transition: none;' : '') +
+ '\n ',
+ });
+ if (drag) {
+ this.$emit('drag', { value: value });
+ }
+ if (end) {
+ this.$emit('change', value);
+ }
+ if ((drag || end) && version_1.canIUseModel()) {
+ this.setData({ value: value });
+ }
+ },
+ getRange: function () {
+ var _a = this.data,
+ max = _a.max,
+ min = _a.min;
+ return max - min;
+ },
+ format: function (value) {
+ var _a = this.data,
+ max = _a.max,
+ min = _a.min,
+ step = _a.step;
+ return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxml
new file mode 100644
index 00000000..6a430f38
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxs
new file mode 100644
index 00000000..7c43e6e5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function barStyle(barHeight, activeColor) {
+ return style({
+ height: addUnit(barHeight),
+ background: activeColor,
+ });
+}
+
+module.exports = {
+ barStyle: barStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxss
new file mode 100644
index 00000000..7886b606
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/slider/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;border-radius:var(--border-radius-max,999px);background-color:#ebedf0;background-color:var(--slider-inactive-background-color,#ebedf0)}.van-slider:before{position:absolute;right:0;left:0;content:"";top:-8px;top:-var(--padding-xs,8px);bottom:-8px;bottom:-var(--padding-xs,8px)}.van-slider__bar{position:relative;border-radius:inherit;transition:width .2s;transition:width var(--animation-duration-fast,.2s);background-color:#1989fa;background-color:var(--slider-active-background-color,#1989fa)}.van-slider__button{width:24px;height:24px;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.5);background-color:#fff;background-color:var(--slider-button-background-color,#fff)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider--disabled{opacity:.5}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.js
new file mode 100644
index 00000000..b8b061d6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.js
@@ -0,0 +1,218 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var validator_1 = require('../common/validator');
+var LONG_PRESS_START_TIME = 600;
+var LONG_PRESS_INTERVAL = 200;
+// add num and avoid float number
+function add(num1, num2) {
+ var cardinal = Math.pow(10, 10);
+ return Math.round((num1 + num2) * cardinal) / cardinal;
+}
+function equal(value1, value2) {
+ return String(value1) === String(value2);
+}
+component_1.VantComponent({
+ field: true,
+ classes: ['input-class', 'plus-class', 'minus-class'],
+ props: {
+ value: {
+ type: null,
+ observer: 'observeValue',
+ },
+ integer: {
+ type: Boolean,
+ observer: 'check',
+ },
+ disabled: Boolean,
+ inputWidth: String,
+ buttonSize: String,
+ asyncChange: Boolean,
+ disableInput: Boolean,
+ decimalLength: {
+ type: Number,
+ value: null,
+ observer: 'check',
+ },
+ min: {
+ type: null,
+ value: 1,
+ observer: 'check',
+ },
+ max: {
+ type: null,
+ value: Number.MAX_SAFE_INTEGER,
+ observer: 'check',
+ },
+ step: {
+ type: null,
+ value: 1,
+ },
+ showPlus: {
+ type: Boolean,
+ value: true,
+ },
+ showMinus: {
+ type: Boolean,
+ value: true,
+ },
+ disablePlus: Boolean,
+ disableMinus: Boolean,
+ longPress: {
+ type: Boolean,
+ value: true,
+ },
+ theme: String,
+ },
+ data: {
+ currentValue: '',
+ },
+ created: function () {
+ this.setData({
+ currentValue: this.format(this.data.value),
+ });
+ },
+ methods: {
+ observeValue: function () {
+ var _a = this.data,
+ value = _a.value,
+ currentValue = _a.currentValue;
+ if (!equal(value, currentValue)) {
+ this.setData({ currentValue: this.format(value) });
+ }
+ },
+ check: function () {
+ var val = this.format(this.data.currentValue);
+ if (!equal(val, this.data.currentValue)) {
+ this.setData({ currentValue: val });
+ }
+ },
+ isDisabled: function (type) {
+ var _a = this.data,
+ disabled = _a.disabled,
+ disablePlus = _a.disablePlus,
+ disableMinus = _a.disableMinus,
+ currentValue = _a.currentValue,
+ max = _a.max,
+ min = _a.min;
+ if (type === 'plus') {
+ return disabled || disablePlus || currentValue >= max;
+ }
+ return disabled || disableMinus || currentValue <= min;
+ },
+ onFocus: function (event) {
+ this.$emit('focus', event.detail);
+ },
+ onBlur: function (event) {
+ var value = this.format(event.detail.value);
+ this.emitChange(value);
+ this.$emit(
+ 'blur',
+ __assign(__assign({}, event.detail), { value: value })
+ );
+ },
+ // filter illegal characters
+ filter: function (value) {
+ value = String(value).replace(/[^0-9.-]/g, '');
+ if (this.data.integer && value.indexOf('.') !== -1) {
+ value = value.split('.')[0];
+ }
+ return value;
+ },
+ // limit value range
+ format: function (value) {
+ value = this.filter(value);
+ // format range
+ value = value === '' ? 0 : +value;
+ value = Math.max(Math.min(this.data.max, value), this.data.min);
+ // format decimal
+ if (validator_1.isDef(this.data.decimalLength)) {
+ value = value.toFixed(this.data.decimalLength);
+ }
+ return value;
+ },
+ onInput: function (event) {
+ var _a = (event.detail || {}).value,
+ value = _a === void 0 ? '' : _a;
+ // allow input to be empty
+ if (value === '') {
+ return;
+ }
+ var formatted = this.filter(value);
+ // limit max decimal length
+ if (
+ validator_1.isDef(this.data.decimalLength) &&
+ formatted.indexOf('.') !== -1
+ ) {
+ var pair = formatted.split('.');
+ formatted = pair[0] + '.' + pair[1].slice(0, this.data.decimalLength);
+ }
+ this.emitChange(formatted);
+ },
+ emitChange: function (value) {
+ if (!this.data.asyncChange) {
+ this.setData({ currentValue: value });
+ }
+ this.$emit('change', value);
+ },
+ onChange: function () {
+ var type = this.type;
+ if (this.isDisabled(type)) {
+ this.$emit('overlimit', type);
+ return;
+ }
+ var diff = type === 'minus' ? -this.data.step : +this.data.step;
+ var value = this.format(add(+this.data.currentValue, diff));
+ this.emitChange(value);
+ this.$emit(type);
+ },
+ longPressStep: function () {
+ var _this = this;
+ this.longPressTimer = setTimeout(function () {
+ _this.onChange();
+ _this.longPressStep();
+ }, LONG_PRESS_INTERVAL);
+ },
+ onTap: function (event) {
+ var type = event.currentTarget.dataset.type;
+ this.type = type;
+ this.onChange();
+ },
+ onTouchStart: function (event) {
+ var _this = this;
+ if (!this.data.longPress) {
+ return;
+ }
+ clearTimeout(this.longPressTimer);
+ var type = event.currentTarget.dataset.type;
+ this.type = type;
+ this.isLongPress = false;
+ this.longPressTimer = setTimeout(function () {
+ _this.isLongPress = true;
+ _this.onChange();
+ _this.longPressStep();
+ }, LONG_PRESS_START_TIME);
+ },
+ onTouchEnd: function () {
+ if (!this.data.longPress) {
+ return;
+ }
+ clearTimeout(this.longPressTimer);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxml
new file mode 100644
index 00000000..b49140e5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxs
new file mode 100644
index 00000000..a13e818b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxs
@@ -0,0 +1,22 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function buttonStyle(data) {
+ return style({
+ width: addUnit(data.buttonSize),
+ height: addUnit(data.buttonSize),
+ });
+}
+
+function inputStyle(data) {
+ return style({
+ width: addUnit(data.inputWidth),
+ height: addUnit(data.buttonSize),
+ });
+}
+
+module.exports = {
+ buttonStyle: buttonStyle,
+ inputStyle: inputStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxss
new file mode 100644
index 00000000..e924a2b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/stepper/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;box-sizing:border-box;margin:1px;vertical-align:middle;border:0;background-color:#f2f3f5;background-color:var(--stepper-background-color,#f2f3f5);color:#323233;color:var(--stepper-button-icon-color,#323233);width:28px;width:var(--stepper-input-height,28px);height:28px;height:var(--stepper-input-height,28px);padding:4px;padding:var(--padding-base,4px)}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:empty.van-stepper__minus:after,.van-stepper__minus:empty.van-stepper__minus:before,.van-stepper__minus:empty.van-stepper__plus:after,.van-stepper__minus:empty.van-stepper__plus:before,.van-stepper__plus:empty.van-stepper__minus:after,.van-stepper__plus:empty.van-stepper__minus:before,.van-stepper__plus:empty.van-stepper__plus:after,.van-stepper__plus:empty.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:currentColor;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8;background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:#c8c9cc;color:var(--stepper-button-disabled-icon-color,#c8c9cc)}.van-stepper__minus--disabled,.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa;background-color:var(--stepper-button-disabled-color,#f7f8fa)}.van-stepper__minus{border-radius:4px 0 0 4px;border-radius:var(--stepper-border-radius,4px) 0 0 var(--stepper-border-radius,4px)}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0;border-radius:0 var(--stepper-border-radius,4px) var(--stepper-border-radius,4px) 0}.van-stepper--round .van-stepper__input{background-color:initial!important}.van-stepper--round .van-stepper__minus,.van-stepper--round .van-stepper__plus{border-radius:100%}.van-stepper--round .van-stepper__minus:active,.van-stepper--round .van-stepper__plus:active{opacity:.7}.van-stepper--round .van-stepper__minus--disabled,.van-stepper--round .van-stepper__minus--disabled:active,.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__plus--disabled:active{opacity:.3}.van-stepper--round .van-stepper__plus{color:#fff;background-color:#ee0a24}.van-stepper--round .van-stepper__minus{color:#ee0a24;background-color:#fff;border:1px solid #ee0a24}.van-stepper__input{display:inline-block;box-sizing:border-box;min-height:0;margin:1px;padding:1px;text-align:center;vertical-align:middle;border:0;border-width:1px 0;border-radius:0;-webkit-appearance:none;font-size:14px;font-size:var(--stepper-input-font-size,14px);color:#323233;color:var(--stepper-input-text-color,#323233);background-color:#f2f3f5;background-color:var(--stepper-background-color,#f2f3f5);width:32px;width:var(--stepper-input-width,32px);height:28px;height:var(--stepper-input-height,28px)}.van-stepper__input--disabled{color:#c8c9cc;color:var(--stepper-input-disabled-text-color,#c8c9cc);background-color:#f2f3f5;background-color:var(--stepper-input-disabled-background-color,#f2f3f5)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.js
new file mode 100644
index 00000000..c41e5ade
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.js
@@ -0,0 +1,35 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+component_1.VantComponent({
+ classes: ['desc-class'],
+ props: {
+ icon: String,
+ steps: Array,
+ active: Number,
+ direction: {
+ type: String,
+ value: 'horizontal',
+ },
+ activeColor: {
+ type: String,
+ value: color_1.GREEN,
+ },
+ inactiveColor: {
+ type: String,
+ value: color_1.GRAY_DARK,
+ },
+ activeIcon: {
+ type: String,
+ value: 'checked',
+ },
+ inactiveIcon: String,
+ },
+ methods: {
+ onClick: function (event) {
+ var index = event.currentTarget.dataset.index;
+ this.$emit('click-step', index);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.wxml
new file mode 100644
index 00000000..6180b417
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.wxml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ {{ item.text }}
+ {{ item.desc }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+function get(index, active) {
+ if (index < active) {
+ return 'finish';
+ } else if (index === active) {
+ return 'process';
+ }
+
+ return 'inactive';
+}
+
+module.exports = get;
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.wxss
new file mode 100644
index 00000000..2c50b1ab
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/steps/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.js
new file mode 100644
index 00000000..c2a1e0b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.js
@@ -0,0 +1,124 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var utils_1 = require('../common/utils');
+var component_1 = require('../common/component');
+var page_scroll_1 = require('../mixins/page-scroll');
+var ROOT_ELEMENT = '.van-sticky';
+component_1.VantComponent({
+ props: {
+ zIndex: {
+ type: Number,
+ value: 99,
+ },
+ offsetTop: {
+ type: Number,
+ value: 0,
+ observer: 'onScroll',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'onScroll',
+ },
+ container: {
+ type: null,
+ observer: 'onScroll',
+ },
+ scrollTop: {
+ type: null,
+ observer: function (val) {
+ this.onScroll({ scrollTop: val });
+ },
+ },
+ },
+ mixins: [
+ page_scroll_1.pageScrollMixin(function (event) {
+ if (this.data.scrollTop != null) {
+ return;
+ }
+ this.onScroll(event);
+ }),
+ ],
+ data: {
+ height: 0,
+ fixed: false,
+ transform: 0,
+ },
+ mounted: function () {
+ this.onScroll();
+ },
+ methods: {
+ onScroll: function (_a) {
+ var _this = this;
+ var _b = _a === void 0 ? {} : _a,
+ scrollTop = _b.scrollTop;
+ var _c = this.data,
+ container = _c.container,
+ offsetTop = _c.offsetTop,
+ disabled = _c.disabled;
+ if (disabled) {
+ this.setDataAfterDiff({
+ fixed: false,
+ transform: 0,
+ });
+ return;
+ }
+ this.scrollTop = scrollTop || this.scrollTop;
+ if (typeof container === 'function') {
+ Promise.all([
+ utils_1.getRect(this, ROOT_ELEMENT),
+ this.getContainerRect(),
+ ]).then(function (_a) {
+ var root = _a[0],
+ container = _a[1];
+ if (offsetTop + root.height > container.height + container.top) {
+ _this.setDataAfterDiff({
+ fixed: false,
+ transform: container.height - root.height,
+ });
+ } else if (offsetTop >= root.top) {
+ _this.setDataAfterDiff({
+ fixed: true,
+ height: root.height,
+ transform: 0,
+ });
+ } else {
+ _this.setDataAfterDiff({ fixed: false, transform: 0 });
+ }
+ });
+ return;
+ }
+ utils_1.getRect(this, ROOT_ELEMENT).then(function (root) {
+ if (offsetTop >= root.top) {
+ _this.setDataAfterDiff({ fixed: true, height: root.height });
+ _this.transform = 0;
+ } else {
+ _this.setDataAfterDiff({ fixed: false });
+ }
+ });
+ },
+ setDataAfterDiff: function (data) {
+ var _this = this;
+ wx.nextTick(function () {
+ var diff = Object.keys(data).reduce(function (prev, key) {
+ if (data[key] !== _this.data[key]) {
+ prev[key] = data[key];
+ }
+ return prev;
+ }, {});
+ if (Object.keys(diff).length > 0) {
+ _this.setData(diff);
+ }
+ _this.$emit('scroll', {
+ scrollTop: _this.scrollTop,
+ isFixed: data.fixed || _this.data.fixed,
+ });
+ });
+ },
+ getContainerRect: function () {
+ var nodesRef = this.data.container();
+ return new Promise(function (resolve) {
+ return nodesRef.boundingClientRect(resolve).exec();
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxml
new file mode 100644
index 00000000..15e9f4a8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxs
new file mode 100644
index 00000000..be99d893
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxs
@@ -0,0 +1,25 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function wrapStyle(data) {
+ return style({
+ transform: data.transform
+ ? 'translate3d(0, ' + data.transform + 'px, 0)'
+ : '',
+ top: data.fixed ? addUnit(data.offsetTop) : '',
+ 'z-index': data.zIndex,
+ });
+}
+
+function containerStyle(data) {
+ return style({
+ height: data.fixed ? addUnit(data.height) : '',
+ 'z-index': data.zIndex,
+ });
+}
+
+module.exports = {
+ wrapStyle: wrapStyle,
+ containerStyle: containerStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxss
new file mode 100644
index 00000000..52693875
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/sticky/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{position:fixed;right:0;left:0}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.js
new file mode 100644
index 00000000..2b06332b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.js
@@ -0,0 +1,61 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['bar-class', 'price-class', 'button-class'],
+ props: {
+ tip: {
+ type: null,
+ observer: 'updateTip',
+ },
+ tipIcon: String,
+ type: Number,
+ price: {
+ type: null,
+ observer: 'updatePrice',
+ },
+ label: String,
+ loading: Boolean,
+ disabled: Boolean,
+ buttonText: String,
+ currency: {
+ type: String,
+ value: '¥',
+ },
+ buttonType: {
+ type: String,
+ value: 'danger',
+ },
+ decimalLength: {
+ type: Number,
+ value: 2,
+ observer: 'updatePrice',
+ },
+ suffixLabel: String,
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updatePrice: function () {
+ var _a = this.data,
+ price = _a.price,
+ decimalLength = _a.decimalLength;
+ var priceStrArr =
+ typeof price === 'number' &&
+ (price / 100).toFixed(decimalLength).split('.');
+ this.setData({
+ hasPrice: typeof price === 'number',
+ integerStr: priceStrArr && priceStrArr[0],
+ decimalStr: decimalLength && priceStrArr ? '.' + priceStrArr[1] : '',
+ });
+ },
+ updateTip: function () {
+ this.setData({ hasTip: typeof this.data.tip === 'string' });
+ },
+ onSubmit: function (event) {
+ this.$emit('submit', event.detail);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.json
new file mode 100644
index 00000000..bda9b8d3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-button": "../button/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.wxml
new file mode 100644
index 00000000..a56dd46c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+ {{ tip }}
+
+
+
+
+
+
+
+ {{ label || '合计:' }}
+
+ {{ currency }}
+ {{ integerStr }}{{decimalStr}}
+
+ {{ suffixLabel }}
+
+
+ {{ loading ? '' : buttonText }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.wxss
new file mode 100644
index 00000000..3126e91b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/submit-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none;z-index:100;z-index:var(--submit-bar-z-index,100);background-color:#fff;background-color:var(--submit-bar-background-color,#fff)}.van-submit-bar__tip{padding:10px;padding:var(--submit-bar-tip-padding,10px);color:#f56723;color:var(--submit-bar-tip-color,#f56723);font-size:12px;font-size:var(--submit-bar-tip-font-size,12px);line-height:1.5;line-height:var(--submit-bar-tip-line-height,1.5);background-color:#fff7cc;background-color:var(--submit-bar-tip-background-color,#fff7cc)}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle;font-size:12px;font-size:var(--submit-bar-tip-icon-size,12px);min-width:18px;min-width:calc(var(--submit-bar-tip-icon-size, 12px)*1.5)}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;padding:0 16px;padding:var(--submit-bar-padding,0 16px);height:50px;height:var(--submit-bar-height,50px);font-size:14px;font-size:var(--submit-bar-text-font-size,14px);background-color:#fff;background-color:var(--submit-bar-background-color,#fff)}.van-submit-bar__safe{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom)}.van-submit-bar__text{-webkit-flex:1;flex:1;text-align:right;color:#323233;color:var(--submit-bar-text-color,#323233);padding-right:12px;padding-right:var(--padding-sm,12px)}.van-submit-bar__price,.van-submit-bar__text{font-weight:500;font-weight:var(--font-weight-bold,500)}.van-submit-bar__price{color:#ee0a24;color:var(--submit-bar-price-color,#ee0a24);font-size:12px;font-size:var(--submit-bar-price-font-size,12px)}.van-submit-bar__price-integer{font-size:20px;font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif}.van-submit-bar__currency{font-size:12px;font-size:var(--submit-bar-currency-font-size,12px)}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px;width:var(--submit-bar-button-width,110px);font-weight:500;font-weight:var(--font-weight-bold,500);--button-default-height:40px!important;--button-default-height:var(--submit-bar-button-height,40px)!important;--button-line-height:40px!important;--button-line-height:var(--submit-bar-button-height,40px)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.js
new file mode 100644
index 00000000..bf6648af
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.js
@@ -0,0 +1,162 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var touch_1 = require('../mixins/touch');
+var utils_1 = require('../common/utils');
+var THRESHOLD = 0.3;
+var ARRAY = [];
+component_1.VantComponent({
+ props: {
+ disabled: Boolean,
+ leftWidth: {
+ type: Number,
+ value: 0,
+ observer: function (leftWidth) {
+ if (leftWidth === void 0) {
+ leftWidth = 0;
+ }
+ if (this.offset > 0) {
+ this.swipeMove(leftWidth);
+ }
+ },
+ },
+ rightWidth: {
+ type: Number,
+ value: 0,
+ observer: function (rightWidth) {
+ if (rightWidth === void 0) {
+ rightWidth = 0;
+ }
+ if (this.offset < 0) {
+ this.swipeMove(-rightWidth);
+ }
+ },
+ },
+ asyncClose: Boolean,
+ name: {
+ type: null,
+ value: '',
+ },
+ },
+ mixins: [touch_1.touch],
+ data: {
+ catchMove: false,
+ wrapperStyle: '',
+ },
+ created: function () {
+ this.offset = 0;
+ ARRAY.push(this);
+ },
+ destroyed: function () {
+ var _this = this;
+ ARRAY = ARRAY.filter(function (item) {
+ return item !== _this;
+ });
+ },
+ methods: {
+ open: function (position) {
+ var _a = this.data,
+ leftWidth = _a.leftWidth,
+ rightWidth = _a.rightWidth;
+ var offset = position === 'left' ? leftWidth : -rightWidth;
+ this.swipeMove(offset);
+ this.$emit('open', {
+ position: position,
+ name: this.data.name,
+ });
+ },
+ close: function () {
+ this.swipeMove(0);
+ },
+ swipeMove: function (offset) {
+ if (offset === void 0) {
+ offset = 0;
+ }
+ this.offset = utils_1.range(
+ offset,
+ -this.data.rightWidth,
+ this.data.leftWidth
+ );
+ var transform = 'translate3d(' + this.offset + 'px, 0, 0)';
+ var transition = this.dragging
+ ? 'none'
+ : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
+ this.setData({
+ wrapperStyle:
+ '\n -webkit-transform: ' +
+ transform +
+ ';\n -webkit-transition: ' +
+ transition +
+ ';\n transform: ' +
+ transform +
+ ';\n transition: ' +
+ transition +
+ ';\n ',
+ });
+ },
+ swipeLeaveTransition: function () {
+ var _a = this.data,
+ leftWidth = _a.leftWidth,
+ rightWidth = _a.rightWidth;
+ var offset = this.offset;
+ if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {
+ this.open('right');
+ } else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {
+ this.open('left');
+ } else {
+ this.swipeMove(0);
+ }
+ this.setData({ catchMove: false });
+ },
+ startDrag: function (event) {
+ if (this.data.disabled) {
+ return;
+ }
+ this.startOffset = this.offset;
+ this.touchStart(event);
+ },
+ noop: function () {},
+ onDrag: function (event) {
+ var _this = this;
+ if (this.data.disabled) {
+ return;
+ }
+ this.touchMove(event);
+ if (this.direction !== 'horizontal') {
+ return;
+ }
+ this.dragging = true;
+ ARRAY.filter(function (item) {
+ return item !== _this && item.offset !== 0;
+ }).forEach(function (item) {
+ return item.close();
+ });
+ this.setData({ catchMove: true });
+ this.swipeMove(this.startOffset + this.deltaX);
+ },
+ endDrag: function () {
+ if (this.data.disabled) {
+ return;
+ }
+ this.dragging = false;
+ this.swipeLeaveTransition();
+ },
+ onClick: function (event) {
+ var _a = event.currentTarget.dataset.key,
+ position = _a === void 0 ? 'outside' : _a;
+ this.$emit('click', position);
+ if (!this.offset) {
+ return;
+ }
+ if (this.data.asyncClose) {
+ this.$emit('close', {
+ position: position,
+ instance: this,
+ name: this.data.name,
+ });
+ } else {
+ this.swipeMove(0);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.wxml
new file mode 100644
index 00000000..3f7f7260
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.wxss
new file mode 100644
index 00000000..d6152709
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/swipe-cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.js
new file mode 100644
index 00000000..8c98e99d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.js
@@ -0,0 +1,42 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ classes: ['node-class'],
+ props: {
+ checked: null,
+ loading: Boolean,
+ disabled: Boolean,
+ activeColor: String,
+ inactiveColor: String,
+ size: {
+ type: String,
+ value: '30',
+ },
+ activeValue: {
+ type: null,
+ value: true,
+ },
+ inactiveValue: {
+ type: null,
+ value: false,
+ },
+ },
+ methods: {
+ onClick: function () {
+ var _a = this.data,
+ activeValue = _a.activeValue,
+ inactiveValue = _a.inactiveValue,
+ disabled = _a.disabled,
+ loading = _a.loading;
+ if (disabled || loading) {
+ return;
+ }
+ var checked = this.data.checked === activeValue;
+ var value = checked ? inactiveValue : activeValue;
+ this.$emit('input', value);
+ this.$emit('change', value);
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.json
new file mode 100644
index 00000000..01077f5d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxml
new file mode 100644
index 00000000..d45829bd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxs
new file mode 100644
index 00000000..1fb6530c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxs
@@ -0,0 +1,26 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function rootStyle(data) {
+ var currentColor = data.checked ? data.activeColor : data.inactiveColor;
+
+ return style({
+ 'font-size': addUnit(data.size),
+ 'background-color': currentColor,
+ });
+}
+
+var BLUE = '#1989fa';
+var GRAY_DARK = '#969799';
+
+function loadingColor(data) {
+ return data.checked
+ ? data.activeColor || BLUE
+ : data.inactiveColor || GRAY_DARK;
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+ loadingColor: loadingColor,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxss
new file mode 100644
index 00000000..e32a72ad
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/switch/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-switch{position:relative;display:inline-block;box-sizing:initial;width:2em;width:var(--switch-width,2em);height:1em;height:var(--switch-height,1em);background-color:#fff;background-color:var(--switch-background-color,#fff);border:1px solid rgba(0,0,0,.1);border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:1em;border-radius:var(--switch-node-size,1em);transition:background-color .3s;transition:background-color var(--switch-transition-duration,.3s)}.van-switch__node{position:absolute;top:0;left:0;border-radius:100%;z-index:1;z-index:var(--switch-node-z-index,1);width:1em;width:var(--switch-node-size,1em);height:1em;height:var(--switch-node-size,1em);background-color:#fff;background-color:var(--switch-node-background-color,#fff);box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05),-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:-webkit-transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);transition:transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);transition:transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05),-webkit-transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{position:absolute!important;top:25%;left:25%;width:50%;height:50%}.van-switch--on{background-color:#1989fa;background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em);-webkit-transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)));transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:.4;opacity:var(--switch-disabled-opacity,.4)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.js
new file mode 100644
index 00000000..f8b22c34
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.js
@@ -0,0 +1,58 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var relation_1 = require('../common/relation');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: relation_1.useParent('tabs'),
+ props: {
+ dot: {
+ type: Boolean,
+ observer: 'update',
+ },
+ info: {
+ type: null,
+ observer: 'update',
+ },
+ title: {
+ type: String,
+ observer: 'update',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'update',
+ },
+ titleStyle: {
+ type: String,
+ observer: 'update',
+ },
+ name: {
+ type: null,
+ value: '',
+ },
+ },
+ data: {
+ active: false,
+ },
+ methods: {
+ getComputedName: function () {
+ if (this.data.name !== '') {
+ return this.data.name;
+ }
+ return this.index;
+ },
+ updateRender: function (active, parent) {
+ var parentData = parent.data;
+ this.inited = this.inited || active;
+ this.setData({
+ active: active,
+ shouldRender: this.inited || !parentData.lazyRender,
+ shouldShow: active || parentData.animated,
+ });
+ },
+ update: function () {
+ if (this.parent) {
+ this.parent.updateTabs();
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.wxml
new file mode 100644
index 00000000..f5e99f21
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.wxss
new file mode 100644
index 00000000..76ddf068
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tab/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex-shrink:0;flex-shrink:0;width:100%}.van-tab__pane,:host{box-sizing:border-box}.van-tab__pane{overflow-y:auto;-webkit-overflow-scrolling:touch}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.js
new file mode 100644
index 00000000..32dcfd6c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.js
@@ -0,0 +1,58 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ props: {
+ info: null,
+ name: null,
+ icon: String,
+ dot: Boolean,
+ iconPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ },
+ relation: relation_1.useParent('tabbar'),
+ data: {
+ active: false,
+ activeColor: '',
+ inactiveColor: '',
+ },
+ methods: {
+ onClick: function () {
+ var parent = this.parent;
+ if (parent) {
+ var index = parent.children.indexOf(this);
+ var active = this.data.name || index;
+ if (active !== this.data.active) {
+ parent.$emit('change', active);
+ }
+ }
+ this.$emit('click');
+ },
+ updateFromParent: function () {
+ var parent = this.parent;
+ if (!parent) {
+ return;
+ }
+ var index = parent.children.indexOf(this);
+ var parentData = parent.data;
+ var data = this.data;
+ var active = (data.name || index) === parentData.active;
+ var patch = {};
+ if (active !== data.active) {
+ patch.active = active;
+ }
+ if (parentData.activeColor !== data.activeColor) {
+ patch.activeColor = parentData.activeColor;
+ }
+ if (parentData.inactiveColor !== data.inactiveColor) {
+ patch.inactiveColor = parentData.inactiveColor;
+ }
+ if (Object.keys(patch).length > 0) {
+ this.setData(patch);
+ }
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.json
new file mode 100644
index 00000000..16f174c5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-info": "../info/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.wxml
new file mode 100644
index 00000000..524728f3
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.wxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.wxss
new file mode 100644
index 00000000..ff33bd21
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:4px;margin-bottom:var(--tabbar-item-margin-bottom,4px);font-size:22px;font-size:var(--tabbar-item-icon-size,22px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.js
new file mode 100644
index 00000000..0ed7cd88
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.js
@@ -0,0 +1,70 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var relation_1 = require('../common/relation');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ relation: relation_1.useChildren('tabbar-item', function () {
+ this.updateChildren();
+ }),
+ props: {
+ active: {
+ type: null,
+ observer: 'updateChildren',
+ },
+ activeColor: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ inactiveColor: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ fixed: {
+ type: Boolean,
+ value: true,
+ observer: 'setHeight',
+ },
+ placeholder: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ height: 50,
+ },
+ methods: {
+ updateChildren: function () {
+ var children = this.children;
+ if (!Array.isArray(children) || !children.length) {
+ return;
+ }
+ children.forEach(function (child) {
+ return child.updateFromParent();
+ });
+ },
+ setHeight: function () {
+ var _this = this;
+ if (!this.data.fixed || !this.data.placeholder) {
+ return;
+ }
+ wx.nextTick(function () {
+ utils_1.getRect(_this, '.van-tabbar').then(function (res) {
+ _this.setData({ height: res.height });
+ });
+ });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.wxml
new file mode 100644
index 00000000..43bb1111
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.wxml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.wxss
new file mode 100644
index 00000000..68195697
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabbar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;box-sizing:initial;width:100%;height:50px;height:var(--tabbar-height,50px);background-color:#fff;background-color:var(--tabbar-background-color,#fff)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.js
new file mode 100644
index 00000000..a33f4cfe
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.js
@@ -0,0 +1,319 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var touch_1 = require('../mixins/touch');
+var utils_1 = require('../common/utils');
+var validator_1 = require('../common/validator');
+var relation_1 = require('../common/relation');
+component_1.VantComponent({
+ mixins: [touch_1.touch],
+ classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'],
+ relation: relation_1.useChildren('tab', function () {
+ this.updateTabs();
+ }),
+ props: {
+ sticky: Boolean,
+ border: Boolean,
+ swipeable: Boolean,
+ titleActiveColor: String,
+ titleInactiveColor: String,
+ color: String,
+ animated: {
+ type: Boolean,
+ observer: function () {
+ var _this = this;
+ this.children.forEach(function (child, index) {
+ return child.updateRender(index === _this.data.currentIndex, _this);
+ });
+ },
+ },
+ lineWidth: {
+ type: null,
+ value: 40,
+ observer: 'resize',
+ },
+ lineHeight: {
+ type: null,
+ value: -1,
+ },
+ active: {
+ type: null,
+ value: 0,
+ observer: function (name) {
+ if (!this.skipInit) {
+ this.skipInit = true;
+ }
+ if (name !== this.getCurrentName()) {
+ this.setCurrentIndexByName(name);
+ }
+ },
+ },
+ type: {
+ type: String,
+ value: 'line',
+ },
+ ellipsis: {
+ type: Boolean,
+ value: true,
+ },
+ duration: {
+ type: Number,
+ value: 0.3,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ swipeThreshold: {
+ type: Number,
+ value: 5,
+ observer: function (value) {
+ this.setData({
+ scrollable: this.children.length > value || !this.data.ellipsis,
+ });
+ },
+ },
+ offsetTop: {
+ type: Number,
+ value: 0,
+ },
+ lazyRender: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ tabs: [],
+ scrollLeft: 0,
+ scrollable: false,
+ currentIndex: 0,
+ container: null,
+ skipTransition: true,
+ scrollWithAnimation: false,
+ lineOffsetLeft: 0,
+ },
+ mounted: function () {
+ var _this = this;
+ utils_1.requestAnimationFrame(function () {
+ _this.setData({
+ container: function () {
+ return _this.createSelectorQuery().select('.van-tabs');
+ },
+ });
+ if (!_this.skipInit) {
+ _this.resize();
+ _this.scrollIntoView();
+ }
+ });
+ },
+ methods: {
+ updateTabs: function () {
+ var _a = this,
+ _b = _a.children,
+ children = _b === void 0 ? [] : _b,
+ data = _a.data;
+ this.setData({
+ tabs: children.map(function (child) {
+ return child.data;
+ }),
+ scrollable:
+ this.children.length > data.swipeThreshold || !data.ellipsis,
+ });
+ this.setCurrentIndexByName(data.active || this.getCurrentName());
+ },
+ trigger: function (eventName, child) {
+ var currentIndex = this.data.currentIndex;
+ var currentChild = child || this.children[currentIndex];
+ if (!validator_1.isDef(currentChild)) {
+ return;
+ }
+ this.$emit(eventName, {
+ index: currentChild.index,
+ name: currentChild.getComputedName(),
+ title: currentChild.data.title,
+ });
+ },
+ onTap: function (event) {
+ var _this = this;
+ var index = event.currentTarget.dataset.index;
+ var child = this.children[index];
+ if (child.data.disabled) {
+ this.trigger('disabled', child);
+ } else {
+ this.setCurrentIndex(index);
+ utils_1.nextTick(function () {
+ _this.trigger('click');
+ });
+ }
+ },
+ // correct the index of active tab
+ setCurrentIndexByName: function (name) {
+ var _a = this.children,
+ children = _a === void 0 ? [] : _a;
+ var matched = children.filter(function (child) {
+ return child.getComputedName() === name;
+ });
+ if (matched.length) {
+ this.setCurrentIndex(matched[0].index);
+ }
+ },
+ setCurrentIndex: function (currentIndex) {
+ var _this = this;
+ var _a = this,
+ data = _a.data,
+ _b = _a.children,
+ children = _b === void 0 ? [] : _b;
+ if (
+ !validator_1.isDef(currentIndex) ||
+ currentIndex >= children.length ||
+ currentIndex < 0
+ ) {
+ return;
+ }
+ utils_1.groupSetData(this, function () {
+ children.forEach(function (item, index) {
+ var active = index === currentIndex;
+ if (active !== item.data.active || !item.inited) {
+ item.updateRender(active, _this);
+ }
+ });
+ });
+ if (currentIndex === data.currentIndex) {
+ return;
+ }
+ var shouldEmitChange = data.currentIndex !== null;
+ this.setData({ currentIndex: currentIndex });
+ utils_1.requestAnimationFrame(function () {
+ _this.resize();
+ _this.scrollIntoView();
+ });
+ utils_1.nextTick(function () {
+ _this.trigger('input');
+ if (shouldEmitChange) {
+ _this.trigger('change');
+ }
+ });
+ },
+ getCurrentName: function () {
+ var activeTab = this.children[this.data.currentIndex];
+ if (activeTab) {
+ return activeTab.getComputedName();
+ }
+ },
+ resize: function () {
+ var _this = this;
+ if (this.data.type !== 'line') {
+ return;
+ }
+ var _a = this.data,
+ currentIndex = _a.currentIndex,
+ ellipsis = _a.ellipsis,
+ skipTransition = _a.skipTransition;
+ Promise.all([
+ utils_1.getAllRect(this, '.van-tab'),
+ utils_1.getRect(this, '.van-tabs__line'),
+ ]).then(function (_a) {
+ var _b = _a[0],
+ rects = _b === void 0 ? [] : _b,
+ lineRect = _a[1];
+ var rect = rects[currentIndex];
+ if (rect == null) {
+ return;
+ }
+ var lineOffsetLeft = rects
+ .slice(0, currentIndex)
+ .reduce(function (prev, curr) {
+ return prev + curr.width;
+ }, 0);
+ lineOffsetLeft +=
+ (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
+ _this.setData({ lineOffsetLeft: lineOffsetLeft });
+ if (skipTransition) {
+ utils_1.nextTick(function () {
+ _this.setData({ skipTransition: false });
+ });
+ }
+ });
+ },
+ // scroll active tab into view
+ scrollIntoView: function () {
+ var _this = this;
+ var _a = this.data,
+ currentIndex = _a.currentIndex,
+ scrollable = _a.scrollable,
+ scrollWithAnimation = _a.scrollWithAnimation;
+ if (!scrollable) {
+ return;
+ }
+ Promise.all([
+ utils_1.getAllRect(this, '.van-tab'),
+ utils_1.getRect(this, '.van-tabs__nav'),
+ ]).then(function (_a) {
+ var tabRects = _a[0],
+ navRect = _a[1];
+ var tabRect = tabRects[currentIndex];
+ var offsetLeft = tabRects
+ .slice(0, currentIndex)
+ .reduce(function (prev, curr) {
+ return prev + curr.width;
+ }, 0);
+ _this.setData({
+ scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,
+ });
+ if (!scrollWithAnimation) {
+ utils_1.nextTick(function () {
+ _this.setData({ scrollWithAnimation: true });
+ });
+ }
+ });
+ },
+ onTouchScroll: function (event) {
+ this.$emit('scroll', event.detail);
+ },
+ onTouchStart: function (event) {
+ if (!this.data.swipeable) return;
+ this.touchStart(event);
+ },
+ onTouchMove: function (event) {
+ if (!this.data.swipeable) return;
+ this.touchMove(event);
+ },
+ // watch swipe touch end
+ onTouchEnd: function () {
+ if (!this.data.swipeable) return;
+ var _a = this,
+ direction = _a.direction,
+ deltaX = _a.deltaX,
+ offsetX = _a.offsetX;
+ var minSwipeDistance = 50;
+ if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
+ var index = this.getAvaiableTab(deltaX);
+ if (index !== -1) {
+ this.setCurrentIndex(index);
+ }
+ }
+ },
+ getAvaiableTab: function (direction) {
+ var _a = this.data,
+ tabs = _a.tabs,
+ currentIndex = _a.currentIndex;
+ var step = direction > 0 ? -1 : 1;
+ for (
+ var i = step;
+ currentIndex + i < tabs.length && currentIndex + i >= 0;
+ i += step
+ ) {
+ var index = currentIndex + i;
+ if (
+ index >= 0 &&
+ index < tabs.length &&
+ tabs[index] &&
+ !tabs[index].disabled
+ ) {
+ return index;
+ }
+ }
+ return -1;
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.json
new file mode 100644
index 00000000..19c0bc3a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index",
+ "van-sticky": "../sticky/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxml
new file mode 100644
index 00000000..f76dd63f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxs
new file mode 100644
index 00000000..a027c7b9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxs
@@ -0,0 +1,82 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+var style = require('../wxs/style.wxs');
+
+function tabClass(active, ellipsis) {
+ var classes = ['tab-class'];
+
+ if (active) {
+ classes.push('tab-active-class');
+ }
+
+ if (ellipsis) {
+ classes.push('van-ellipsis');
+ }
+
+ return classes.join(' ');
+}
+
+function tabStyle(data) {
+ var titleColor = data.active
+ ? data.titleActiveColor
+ : data.titleInactiveColor;
+
+ var ellipsis = data.scrollable && data.ellipsis;
+
+ // card theme color
+ if (data.type === 'card') {
+ return style({
+ 'border-color': data.color,
+ 'background-color': !data.disabled && data.active ? data.color : null,
+ color: titleColor || (!data.disabled && !data.active ? data.color : null),
+ 'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
+ });
+ }
+
+ return style({
+ color: titleColor,
+ 'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
+ });
+}
+
+function navStyle(color, type) {
+ return style({
+ 'border-color': type === 'card' && color ? color : null,
+ });
+}
+
+function trackStyle(data) {
+ if (!data.animated) {
+ return '';
+ }
+
+ return style({
+ left: -100 * data.currentIndex + '%',
+ 'transition-duration': data.duration + 's',
+ '-webkit-transition-duration': data.duration + 's',
+ });
+}
+
+function lineStyle(data) {
+ return style({
+ width: utils.addUnit(data.lineWidth),
+ transform: 'translateX(' + data.lineOffsetLeft + 'px)',
+ '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
+ 'background-color': data.color,
+ height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
+ 'border-radius':
+ data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
+ 'transition-duration': !data.skipTransition ? data.duration + 's' : null,
+ '-webkit-transition-duration': !data.skipTransition
+ ? data.duration + 's'
+ : null,
+ });
+}
+
+module.exports = {
+ tabClass: tabClass,
+ tabStyle: tabStyle,
+ trackStyle: trackStyle,
+ lineStyle: lineStyle,
+ navStyle: navStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxss
new file mode 100644
index 00000000..d0449e6a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tabs/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{display:-webkit-flex;display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{-webkit-flex:1 0 auto!important;flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-right:8px;padding-left:8px}.van-tabs__scroll{background-color:#fff;background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 16px;margin:0 var(--padding-md,16px)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:30px;height:var(--tabs-card-height,30px);border:1px solid #ee0a24;border:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24);border-radius:2px;border-radius:var(--border-radius-sm,2px)}.van-tabs__nav--card .van-tab{color:#ee0a24;color:var(--tabs-default-color,#ee0a24);line-height:28px;line-height:calc(var(--tabs-card-height, 30px) - var(--border-width-base, 1px)*2);border-right:1px solid #ee0a24;border-right:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;color:var(--white,#fff);background-color:#ee0a24;background-color:var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;height:var(--tabs-bottom-bar-height,3px);border-radius:3px;border-radius:var(--tabs-bottom-bar-height,3px);background-color:#ee0a24;background-color:var(--tabs-bottom-bar-color,#ee0a24)}.van-tabs__track{position:relative;width:100%;height:100%}.van-tabs__track--animated{display:-webkit-flex;display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:44px;height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:30px;height:var(--tabs-card-height,30px)}.van-tab{position:relative;-webkit-flex:1;flex:1;box-sizing:border-box;min-width:0;padding:0 5px;text-align:center;cursor:pointer;color:#646566;color:var(--tab-text-color,#646566);font-size:14px;font-size:var(--tab-font-size,14px);line-height:44px;line-height:var(--tabs-line-height,44px)}.van-tab--active{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--tab-active-text-color,#323233)}.van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.js
new file mode 100644
index 00000000..b51d3fbb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.js
@@ -0,0 +1,23 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ size: String,
+ mark: Boolean,
+ color: String,
+ plain: Boolean,
+ round: Boolean,
+ textColor: String,
+ type: {
+ type: String,
+ value: 'default',
+ },
+ closeable: Boolean,
+ },
+ methods: {
+ onClose: function () {
+ this.$emit('close');
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxml
new file mode 100644
index 00000000..59352ddd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxs
new file mode 100644
index 00000000..12d1668e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+ return style({
+ 'background-color': data.plain ? '' : data.color,
+ color: data.textColor || data.plain ? data.textColor || data.color : '',
+ });
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxss
new file mode 100644
index 00000000..46df0da0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tag/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tag{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;padding:0 4px;padding:var(--tag-padding,0 4px);color:#fff;color:var(--tag-text-color,#fff);font-size:12px;font-size:var(--tag-font-size,12px);line-height:16px;line-height:var(--tag-line-height,16px);border-radius:2px;border-radius:var(--tag-border-radius,2px)}.van-tag--default{background-color:#969799;background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:#969799;color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:#ee0a24;background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:#ee0a24;color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:#1989fa;background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:#1989fa;color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:#07c160;background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:#07c160;color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:#ff976a;background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:#ff976a;color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:#fff;background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-radius:inherit;content:"";pointer-events:none}.van-tag--medium{padding:2px 6px;padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{padding:4px 8px;padding:var(--tag-large-padding,4px 8px);font-size:14px;font-size:var(--tag-large-font-size,14px);border-radius:4px;border-radius:var(--tag-large-border-radius,4px)}.van-tag--mark{border-radius:0 999px 999px 0;border-radius:0 var(--tag-round-border-radius,999px) var(--tag-round-border-radius,999px) 0}.van-tag--mark:after{display:block;width:2px;content:""}.van-tag--round{border-radius:999px;border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{min-width:1em;margin-left:2px}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.js
new file mode 100644
index 00000000..da703bb5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.js
@@ -0,0 +1,31 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ show: Boolean,
+ mask: Boolean,
+ message: String,
+ forbidClick: Boolean,
+ zIndex: {
+ type: Number,
+ value: 1000,
+ },
+ type: {
+ type: String,
+ value: 'text',
+ },
+ loadingType: {
+ type: String,
+ value: 'circular',
+ },
+ position: {
+ type: String,
+ value: 'middle',
+ },
+ },
+ methods: {
+ // for prevent touchmove
+ noop: function () {},
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.json
new file mode 100644
index 00000000..9b1b78c4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.json
@@ -0,0 +1,9 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index",
+ "van-overlay": "../overlay/index",
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.wxml
new file mode 100644
index 00000000..635e7d61
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+ {{ message }}
+
+
+
+
+
+ {{ message }}
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.wxss
new file mode 100644
index 00000000..85dc7a8f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(0,0,0,.7);background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:8px;border-radius:var(--toast-border-radius,8px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:88px;width:var(--toast-default-width,88px);min-height:88px;min-height:var(--toast-default-min-height,88px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:36px;font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/toast.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/toast.js
new file mode 100644
index 00000000..20f00f7e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/toast/toast.js
@@ -0,0 +1,92 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var validator_1 = require('../common/validator');
+var defaultOptions = {
+ type: 'text',
+ mask: false,
+ message: '',
+ show: true,
+ zIndex: 1000,
+ duration: 2000,
+ position: 'middle',
+ forbidClick: false,
+ loadingType: 'circular',
+ selector: '#van-toast',
+};
+var queue = [];
+var currentOptions = __assign({}, defaultOptions);
+function parseOptions(message) {
+ return validator_1.isObj(message) ? message : { message: message };
+}
+function getContext() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+function Toast(toastOptions) {
+ var options = __assign(
+ __assign({}, currentOptions),
+ parseOptions(toastOptions)
+ );
+ var context = options.context || getContext();
+ var toast = context.selectComponent(options.selector);
+ if (!toast) {
+ console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确');
+ return;
+ }
+ delete options.context;
+ delete options.selector;
+ toast.clear = function () {
+ toast.setData({ show: false });
+ if (options.onClose) {
+ options.onClose();
+ }
+ };
+ queue.push(toast);
+ toast.setData(options);
+ clearTimeout(toast.timer);
+ if (options.duration != null && options.duration > 0) {
+ toast.timer = setTimeout(function () {
+ toast.clear();
+ queue = queue.filter(function (item) {
+ return item !== toast;
+ });
+ }, options.duration);
+ }
+ return toast;
+}
+var createMethod = function (type) {
+ return function (options) {
+ return Toast(__assign({ type: type }, parseOptions(options)));
+ };
+};
+Toast.loading = createMethod('loading');
+Toast.success = createMethod('success');
+Toast.fail = createMethod('fail');
+Toast.clear = function () {
+ queue.forEach(function (toast) {
+ toast.clear();
+ });
+ queue = [];
+};
+Toast.setDefaultOptions = function (options) {
+ Object.assign(currentOptions, options);
+};
+Toast.resetDefaultOptions = function () {
+ currentOptions = __assign({}, defaultOptions);
+};
+exports.default = Toast;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.js
new file mode 100644
index 00000000..f3c96e42
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.js
@@ -0,0 +1,15 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var transition_1 = require('../mixins/transition');
+component_1.VantComponent({
+ classes: [
+ 'enter-class',
+ 'enter-active-class',
+ 'enter-to-class',
+ 'leave-class',
+ 'leave-active-class',
+ 'leave-to-class',
+ ],
+ mixins: [transition_1.transition(true)],
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxml
new file mode 100644
index 00000000..27437852
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxs
new file mode 100644
index 00000000..e0babf62
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxs
@@ -0,0 +1,17 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+ return style([
+ {
+ '-webkit-transition-duration': data.currentDuration + 'ms',
+ 'transition-duration': data.currentDuration + 'ms',
+ },
+ data.display ? null : 'display: none',
+ data.customStyle,
+ ]);
+}
+
+module.exports = {
+ rootStyle: rootStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxss
new file mode 100644
index 00000000..d459f5c1
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/transition/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}.van-fade-down-enter,.van-fade-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);opacity:0}.van-fade-left-enter,.van-fade-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);opacity:0}.van-fade-right-enter,.van-fade-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);opacity:0}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.js
new file mode 100644
index 00000000..9796507e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.js
@@ -0,0 +1,73 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: [
+ 'main-item-class',
+ 'content-item-class',
+ 'main-active-class',
+ 'content-active-class',
+ 'main-disabled-class',
+ 'content-disabled-class',
+ ],
+ props: {
+ items: {
+ type: Array,
+ observer: 'updateSubItems',
+ },
+ activeId: null,
+ mainActiveIndex: {
+ type: Number,
+ value: 0,
+ observer: 'updateSubItems',
+ },
+ height: {
+ type: null,
+ value: 300,
+ },
+ max: {
+ type: Number,
+ value: Infinity,
+ },
+ selectedIcon: {
+ type: String,
+ value: 'success',
+ },
+ },
+ data: {
+ subItems: [],
+ },
+ methods: {
+ // 当一个子项被选择时
+ onSelectItem: function (event) {
+ var item = event.currentTarget.dataset.item;
+ var isArray = Array.isArray(this.data.activeId);
+ // 判断有没有超出右侧选择的最大数
+ var isOverMax = isArray && this.data.activeId.length >= this.data.max;
+ // 判断该项有没有被选中, 如果有被选中,则忽视是否超出的条件
+ var isSelected = isArray
+ ? this.data.activeId.indexOf(item.id) > -1
+ : this.data.activeId === item.id;
+ if (!item.disabled && (!isOverMax || isSelected)) {
+ this.$emit('click-item', item);
+ }
+ },
+ // 当一个导航被点击时
+ onClickNav: function (event) {
+ var index = event.detail;
+ var item = this.data.items[index];
+ if (!item.disabled) {
+ this.$emit('click-nav', { index: index });
+ }
+ },
+ // 更新子项列表
+ updateSubItems: function () {
+ var _a = this.data,
+ items = _a.items,
+ mainActiveIndex = _a.mainActiveIndex;
+ var _b = (items[mainActiveIndex] || {}).children,
+ children = _b === void 0 ? [] : _b;
+ this.setData({ subItems: children });
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.json
new file mode 100644
index 00000000..42991a2a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-sidebar": "../sidebar/index",
+ "van-sidebar-item": "../sidebar-item/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxml
new file mode 100644
index 00000000..2663e528
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxs
new file mode 100644
index 00000000..b1cbb39b
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+var array = require('../wxs/array.wxs');
+
+function isActive (activeList, itemId) {
+ if (array.isArray(activeList)) {
+ return activeList.indexOf(itemId) > -1;
+ }
+
+ return activeList === itemId;
+}
+
+module.exports.isActive = isActive;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxss
new file mode 100644
index 00000000..3f7cca67
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/tree-select/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1;flex:1;background-color:#f7f8fa;background-color:var(--tree-select-nav-background-color,#f7f8fa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#ee0a24;color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.js
new file mode 100644
index 00000000..ca3c43ad
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.js
@@ -0,0 +1,246 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('./utils');
+var shared_1 = require('./shared');
+var validator_1 = require('../common/validator');
+component_1.VantComponent({
+ props: __assign(
+ __assign(
+ {
+ disabled: Boolean,
+ multiple: Boolean,
+ uploadText: String,
+ useBeforeRead: Boolean,
+ afterRead: null,
+ beforeRead: null,
+ previewSize: {
+ type: null,
+ value: 80,
+ },
+ name: {
+ type: null,
+ value: '',
+ },
+ accept: {
+ type: String,
+ value: 'image',
+ },
+ fileList: {
+ type: Array,
+ value: [],
+ observer: 'formatFileList',
+ },
+ maxSize: {
+ type: Number,
+ value: Number.MAX_VALUE,
+ },
+ maxCount: {
+ type: Number,
+ value: 100,
+ },
+ deletable: {
+ type: Boolean,
+ value: true,
+ },
+ showUpload: {
+ type: Boolean,
+ value: true,
+ },
+ previewImage: {
+ type: Boolean,
+ value: true,
+ },
+ previewFullImage: {
+ type: Boolean,
+ value: true,
+ },
+ imageFit: {
+ type: String,
+ value: 'scaleToFill',
+ },
+ uploadIcon: {
+ type: String,
+ value: 'photograph',
+ },
+ },
+ shared_1.chooseImageProps
+ ),
+ shared_1.chooseVideoProps
+ ),
+ data: {
+ lists: [],
+ isInCount: true,
+ },
+ methods: {
+ formatFileList: function () {
+ var _a = this.data,
+ _b = _a.fileList,
+ fileList = _b === void 0 ? [] : _b,
+ maxCount = _a.maxCount;
+ var lists = fileList.map(function (item) {
+ return __assign(__assign({}, item), {
+ isImage: utils_1.isImageFile(item),
+ isVideo: utils_1.isVideoFile(item),
+ deletable: validator_1.isBoolean(item.deletable)
+ ? item.deletable
+ : true,
+ });
+ });
+ this.setData({ lists: lists, isInCount: lists.length < maxCount });
+ },
+ getDetail: function (index) {
+ return {
+ name: this.data.name,
+ index: index == null ? this.data.fileList.length : index,
+ };
+ },
+ startUpload: function () {
+ var _this = this;
+ var _a = this.data,
+ maxCount = _a.maxCount,
+ multiple = _a.multiple,
+ lists = _a.lists,
+ disabled = _a.disabled;
+ if (disabled) return;
+ utils_1
+ .chooseFile(
+ __assign(__assign({}, this.data), {
+ maxCount: maxCount - lists.length,
+ })
+ )
+ .then(function (res) {
+ _this.onBeforeRead(multiple ? res : res[0]);
+ })
+ .catch(function (error) {
+ _this.$emit('error', error);
+ });
+ },
+ onBeforeRead: function (file) {
+ var _this = this;
+ var _a = this.data,
+ beforeRead = _a.beforeRead,
+ useBeforeRead = _a.useBeforeRead;
+ var res = true;
+ if (typeof beforeRead === 'function') {
+ res = beforeRead(file, this.getDetail());
+ }
+ if (useBeforeRead) {
+ res = new Promise(function (resolve, reject) {
+ _this.$emit(
+ 'before-read',
+ __assign(__assign({ file: file }, _this.getDetail()), {
+ callback: function (ok) {
+ ok ? resolve() : reject();
+ },
+ })
+ );
+ });
+ }
+ if (!res) {
+ return;
+ }
+ if (validator_1.isPromise(res)) {
+ res.then(function (data) {
+ return _this.onAfterRead(data || file);
+ });
+ } else {
+ this.onAfterRead(file);
+ }
+ },
+ onAfterRead: function (file) {
+ var _a = this.data,
+ maxSize = _a.maxSize,
+ afterRead = _a.afterRead;
+ var oversize = Array.isArray(file)
+ ? file.some(function (item) {
+ return item.size > maxSize;
+ })
+ : file.size > maxSize;
+ if (oversize) {
+ this.$emit('oversize', __assign({ file: file }, this.getDetail()));
+ return;
+ }
+ if (typeof afterRead === 'function') {
+ afterRead(file, this.getDetail());
+ }
+ this.$emit('after-read', __assign({ file: file }, this.getDetail()));
+ },
+ deleteItem: function (event) {
+ var index = event.currentTarget.dataset.index;
+ this.$emit(
+ 'delete',
+ __assign(__assign({}, this.getDetail(index)), {
+ file: this.data.fileList[index],
+ })
+ );
+ },
+ onPreviewImage: function (event) {
+ if (!this.data.previewFullImage) return;
+ var index = event.currentTarget.dataset.index;
+ var lists = this.data.lists;
+ var item = lists[index];
+ wx.previewImage({
+ urls: lists
+ .filter(function (item) {
+ return utils_1.isImageFile(item);
+ })
+ .map(function (item) {
+ return item.url;
+ }),
+ current: item.url,
+ fail: function () {
+ wx.showToast({ title: '预览图片失败', icon: 'none' });
+ },
+ });
+ },
+ onPreviewVideo: function (event) {
+ if (!this.data.previewFullImage) return;
+ var index = event.currentTarget.dataset.index;
+ var lists = this.data.lists;
+ wx.previewMedia({
+ sources: lists
+ .filter(function (item) {
+ return utils_1.isVideoFile(item);
+ })
+ .map(function (item) {
+ return __assign(__assign({}, item), { type: 'video' });
+ }),
+ current: index,
+ fail: function () {
+ wx.showToast({ title: '预览视频失败', icon: 'none' });
+ },
+ });
+ },
+ onPreviewFile: function (event) {
+ var index = event.currentTarget.dataset.index;
+ wx.openDocument({
+ filePath: this.data.lists[index].url,
+ showMenu: true,
+ });
+ },
+ onClickPreview: function (event) {
+ var index = event.currentTarget.dataset.index;
+ var item = this.data.lists[index];
+ this.$emit(
+ 'click-preview',
+ __assign(__assign({}, item), this.getDetail(index))
+ );
+ },
+ },
+});
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.json b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxml b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxml
new file mode 100644
index 00000000..50fb0c89
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name || item.url }}
+
+
+
+
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ uploadText }}
+
+
+
+
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxs
new file mode 100644
index 00000000..257c7804
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+var addUnit = require('../wxs/add-unit.wxs');
+
+function sizeStyle(data) {
+ return style({
+ width: addUnit(data.previewSize),
+ height: addUnit(data.previewSize),
+ });
+}
+
+module.exports = {
+ sizeStyle: sizeStyle,
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxss b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxss
new file mode 100644
index 00000000..5023d716
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{position:relative;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:80px;width:var(--uploader-size,80px);height:80px;height:var(--uploader-size,80px);margin:0 8px 8px 0;margin:0 var(--padding-xs,8px) var(--padding-xs,8px) 0;background-color:#f7f8fa;background-color:var(--uploader-upload-background-color,#f7f8fa)}.van-uploader__upload:active{background-color:#f2f3f5;background-color:var(--uploader-upload-active-color,#f2f3f5)}.van-uploader__upload-icon{color:#dcdee0;color:var(--uploader-icon-color,#dcdee0);font-size:24px;font-size:var(--uploader-icon-size,24px)}.van-uploader__upload-text{margin-top:8px;margin-top:var(--padding-xs,8px);color:#969799;color:var(--uploader-text-color,#969799);font-size:12px;font-size:var(--uploader-text-font-size,12px)}.van-uploader__upload--disabled{opacity:.5;opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{position:relative;cursor:pointer;margin:0 8px 8px 0;margin:0 var(--padding-xs,8px) var(--padding-xs,8px) 0}.van-uploader__preview-image{display:block;overflow:hidden;width:80px;width:var(--uploader-size,80px);height:80px;height:var(--uploader-size,80px)}.van-uploader__preview-delete{padding:0 0 8px 8px;padding:0 0 var(--padding-xs,8px) var(--padding-xs,8px)}.van-uploader__preview-delete,.van-uploader__preview-delete:after{position:absolute;top:0;right:0;width:14px;width:var(--uploader-delete-icon-size,14px);height:14px;height:var(--uploader-delete-icon-size,14px)}.van-uploader__preview-delete:after{content:"";background-color:rgba(0,0,0,.7);background-color:var(--uploader-delete-background-color,rgba(0,0,0,.7));border-radius:0 0 0 12px;border-radius:0 0 0 calc(var(--uploader-delete-icon-size, 14px) - 2px)}.van-uploader__preview-delete-icon{position:absolute;top:-2px;right:-2px;z-index:1;-webkit-transform:scale(.5);transform:scale(.5);font-size:16px;font-size:calc(var(--uploader-delete-icon-size, 14px) + 2px);color:#fff;color:var(--uploader-delete-color,#fff)}.van-uploader__file{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;width:80px;width:var(--uploader-size,80px);height:80px;height:var(--uploader-size,80px);background-color:#f7f8fa;background-color:var(--uploader-file-background-color,#f7f8fa)}.van-uploader__file-icon{color:#646566;color:var(--uploader-file-icon-color,#646566);font-size:20px;font-size:var(--uploader-file-icon-size,20px)}.van-uploader__file-name{box-sizing:border-box;width:100%;text-align:center;margin-top:8px;margin-top:var(--uploader-file-name-margin-top,8px);padding:0 4px;padding:var(--uploader-file-name-padding,0 4px);color:#646566;color:var(--uploader-file-name-text-color,#646566);font-size:12px;font-size:var(--uploader-file-name-font-size,12px)}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#fff;color:var(--white,#fff);background-color:rgba(50,50,51,.88);background-color:var(--uploader-mask-background-color,rgba(50,50,51,.88))}.van-uploader__mask-icon{font-size:22px;font-size:var(--uploader-mask-icon-size,22px)}.van-uploader__mask-message{margin-top:6px;padding:0 4px;padding:0 var(--padding-base,4px);font-size:12px;font-size:var(--uploader-mask-message-font-size,12px);line-height:14px;line-height:var(--uploader-mask-message-line-height,14px)}.van-uploader__loading{width:22px;width:var(--uploader-loading-icon-size,22px);height:22px;height:var(--uploader-loading-icon-size,22px);color:#fff!important;color:var(--uploader-loading-icon-color,#fff)!important}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/shared.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/shared.js
new file mode 100644
index 00000000..94186186
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/shared.js
@@ -0,0 +1,33 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.chooseVideoProps = exports.chooseImageProps = void 0;
+// props for choose image
+exports.chooseImageProps = {
+ sizeType: {
+ type: Array,
+ value: ['original', 'compressed'],
+ },
+ capture: {
+ type: Array,
+ value: ['album', 'camera'],
+ },
+};
+// props for choose video
+exports.chooseVideoProps = {
+ capture: {
+ type: Array,
+ value: ['album', 'camera'],
+ },
+ compressed: {
+ type: Boolean,
+ value: true,
+ },
+ maxDuration: {
+ type: Number,
+ value: 60,
+ },
+ camera: {
+ type: String,
+ value: 'back',
+ },
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/utils.js b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/utils.js
new file mode 100644
index 00000000..d8eb8522
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/uploader/utils.js
@@ -0,0 +1,158 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.chooseFile = exports.isVideoFile = exports.isImageFile = void 0;
+var utils_1 = require('../common/utils');
+var validator_1 = require('../common/validator');
+function isImageFile(item) {
+ if (item.isImage != null) {
+ return item.isImage;
+ }
+ if (item.type) {
+ return item.type === 'image';
+ }
+ if (item.url) {
+ return validator_1.isImageUrl(item.url);
+ }
+ return false;
+}
+exports.isImageFile = isImageFile;
+function isVideoFile(item) {
+ if (item.isVideo != null) {
+ return item.isVideo;
+ }
+ if (item.type) {
+ return item.type === 'video';
+ }
+ if (item.url) {
+ return validator_1.isVideoUrl(item.url);
+ }
+ return false;
+}
+exports.isVideoFile = isVideoFile;
+function formatImage(res) {
+ return res.tempFiles.map(function (item) {
+ return __assign(__assign({}, utils_1.pickExclude(item, ['path'])), {
+ type: 'image',
+ url: item.path,
+ thumb: item.path,
+ });
+ });
+}
+function formatVideo(res) {
+ return [
+ __assign(
+ __assign(
+ {},
+ utils_1.pickExclude(res, [
+ 'tempFilePath',
+ 'thumbTempFilePath',
+ 'errMsg',
+ ])
+ ),
+ { type: 'video', url: res.tempFilePath, thumb: res.thumbTempFilePath }
+ ),
+ ];
+}
+function formatMedia(res) {
+ return res.tempFiles.map(function (item) {
+ return __assign(
+ __assign(
+ {},
+ utils_1.pickExclude(item, [
+ 'fileType',
+ 'thumbTempFilePath',
+ 'tempFilePath',
+ ])
+ ),
+ {
+ type: res.type,
+ url: item.tempFilePath,
+ thumb:
+ res.type === 'video' ? item.thumbTempFilePath : item.tempFilePath,
+ }
+ );
+ });
+}
+function formatFile(res) {
+ return res.tempFiles.map(function (item) {
+ return __assign(__assign({}, utils_1.pickExclude(item, ['path'])), {
+ url: item.path,
+ });
+ });
+}
+function chooseFile(_a) {
+ var accept = _a.accept,
+ multiple = _a.multiple,
+ capture = _a.capture,
+ compressed = _a.compressed,
+ maxDuration = _a.maxDuration,
+ sizeType = _a.sizeType,
+ camera = _a.camera,
+ maxCount = _a.maxCount;
+ return new Promise(function (resolve, reject) {
+ switch (accept) {
+ case 'image':
+ wx.chooseImage({
+ count: multiple ? Math.min(maxCount, 9) : 1,
+ sourceType: capture,
+ sizeType: sizeType,
+ success: function (res) {
+ return resolve(formatImage(res));
+ },
+ fail: reject,
+ });
+ break;
+ case 'media':
+ wx.chooseMedia({
+ count: multiple ? Math.min(maxCount, 9) : 1,
+ sourceType: capture,
+ maxDuration: maxDuration,
+ sizeType: sizeType,
+ camera: camera,
+ success: function (res) {
+ return resolve(formatMedia(res));
+ },
+ fail: reject,
+ });
+ break;
+ case 'video':
+ wx.chooseVideo({
+ sourceType: capture,
+ compressed: compressed,
+ maxDuration: maxDuration,
+ camera: camera,
+ success: function (res) {
+ return resolve(formatVideo(res));
+ },
+ fail: reject,
+ });
+ break;
+ default:
+ wx.chooseMessageFile({
+ count: multiple ? maxCount : 1,
+ type: accept,
+ success: function (res) {
+ return resolve(formatFile(res));
+ },
+ fail: reject,
+ });
+ break;
+ }
+ });
+}
+exports.chooseFile = chooseFile;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/add-unit.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/add-unit.wxs
new file mode 100644
index 00000000..4f33462f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/add-unit.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+var REGEXP = getRegExp('^-?\d+(\.\d+)?$');
+
+function addUnit(value) {
+ if (value == null) {
+ return undefined;
+ }
+
+ return REGEXP.test('' + value) ? value + 'px' : value;
+}
+
+module.exports = addUnit;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/array.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/array.wxs
new file mode 100644
index 00000000..610089cd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/array.wxs
@@ -0,0 +1,5 @@
+function isArray(array) {
+ return array && array.constructor === 'Array';
+}
+
+module.exports.isArray = isArray;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/bem.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/bem.wxs
new file mode 100644
index 00000000..1efa129e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/bem.wxs
@@ -0,0 +1,39 @@
+/* eslint-disable */
+var array = require('./array.wxs');
+var object = require('./object.wxs');
+var PREFIX = 'van-';
+
+function join(name, mods) {
+ name = PREFIX + name;
+ mods = mods.map(function(mod) {
+ return name + '--' + mod;
+ });
+ mods.unshift(name);
+ return mods.join(' ');
+}
+
+function traversing(mods, conf) {
+ if (!conf) {
+ return;
+ }
+
+ if (typeof conf === 'string' || typeof conf === 'number') {
+ mods.push(conf);
+ } else if (array.isArray(conf)) {
+ conf.forEach(function(item) {
+ traversing(mods, item);
+ });
+ } else if (typeof conf === 'object') {
+ object.keys(conf).forEach(function(key) {
+ conf[key] && mods.push(key);
+ });
+ }
+}
+
+function bem(name, conf) {
+ var mods = [];
+ traversing(mods, conf);
+ return join(name, mods);
+}
+
+module.exports = bem;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/memoize.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/memoize.wxs
new file mode 100644
index 00000000..8f7f46dd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/memoize.wxs
@@ -0,0 +1,55 @@
+/**
+ * Simple memoize
+ * wxs doesn't support fn.apply, so this memoize only support up to 2 args
+ */
+/* eslint-disable */
+
+function isPrimitive(value) {
+ var type = typeof value;
+ return (
+ type === 'boolean' ||
+ type === 'number' ||
+ type === 'string' ||
+ type === 'undefined' ||
+ value === null
+ );
+}
+
+// mock simple fn.call in wxs
+function call(fn, args) {
+ if (args.length === 2) {
+ return fn(args[0], args[1]);
+ }
+
+ if (args.length === 1) {
+ return fn(args[0]);
+ }
+
+ return fn();
+}
+
+function serializer(args) {
+ if (args.length === 1 && isPrimitive(args[0])) {
+ return args[0];
+ }
+ var obj = {};
+ for (var i = 0; i < args.length; i++) {
+ obj['key' + i] = args[i];
+ }
+ return JSON.stringify(obj);
+}
+
+function memoize(fn) {
+ var cache = {};
+
+ return function() {
+ var key = serializer(arguments);
+ if (cache[key] === undefined) {
+ cache[key] = call(fn, arguments);
+ }
+
+ return cache[key];
+ };
+}
+
+module.exports = memoize;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/object.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/object.wxs
new file mode 100644
index 00000000..e0771077
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/object.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var REGEXP = getRegExp('{|}|"', 'g');
+
+function keys(obj) {
+ return JSON.stringify(obj)
+ .replace(REGEXP, '')
+ .split(',')
+ .map(function(item) {
+ return item.split(':')[0];
+ });
+}
+
+module.exports.keys = keys;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/style.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/style.wxs
new file mode 100644
index 00000000..c39c810f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/style.wxs
@@ -0,0 +1,32 @@
+/* eslint-disable */
+var object = require('./object.wxs');
+var array = require('./array.wxs');
+
+function style(styles) {
+ if (array.isArray(styles)) {
+ return styles
+ .filter(function (item) {
+ return item != null && item !== '';
+ })
+ .map(function (item) {
+ return style(item);
+ })
+ .join(';');
+ }
+
+ if ('Object' === styles.constructor) {
+ return object
+ .keys(styles)
+ .filter(function (key) {
+ return styles[key] != null && styles[key] !== '';
+ })
+ .map(function (key) {
+ return [key, [styles[key]]].join(':');
+ })
+ .join(';');
+ }
+
+ return styles;
+}
+
+module.exports = style;
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/utils.wxs b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/utils.wxs
new file mode 100644
index 00000000..f66d33a4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/lib/wxs/utils.wxs
@@ -0,0 +1,10 @@
+/* eslint-disable */
+var bem = require('./bem.wxs');
+var memoize = require('./memoize.wxs');
+var addUnit = require('./add-unit.wxs');
+
+module.exports = {
+ bem: memoize(bem),
+ memoize: memoize,
+ addUnit: addUnit
+};
diff --git a/wechat/miniprogram/node_modules/@vant/weapp/package.json b/wechat/miniprogram/node_modules/@vant/weapp/package.json
new file mode 100644
index 00000000..0b74663e
--- /dev/null
+++ b/wechat/miniprogram/node_modules/@vant/weapp/package.json
@@ -0,0 +1,96 @@
+{
+ "_from": "@vant/weapp",
+ "_id": "@vant/weapp@1.6.9",
+ "_inBundle": false,
+ "_integrity": "sha512-d7hvWjs1cjlM4PjEAhBhbtdejqcltbIptw4/qfDC1RZUp+t7eYEDX/aRUZgtPAwTnipRXJPOyQIdf8K9jYUI/g==",
+ "_location": "/@vant/weapp",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "@vant/weapp",
+ "name": "@vant/weapp",
+ "escapedName": "@vant%2fweapp",
+ "scope": "@vant",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.6.9.tgz",
+ "_shasum": "f4840a6207dfc51cd4534db9626f6989c7c355f4",
+ "_spec": "@vant/weapp",
+ "_where": "D:\\xiaoyiWechatMiniprogram\\CTWing\\miniprogram",
+ "author": {
+ "name": "youzan"
+ },
+ "browserslist": [
+ "Chrome >= 53",
+ "ChromeAndroid >= 53",
+ "iOS >= 8"
+ ],
+ "bugs": {
+ "url": "https://github.com/youzan/vant-weapp/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "轻量、可靠的小程序 UI 组件库",
+ "devDependencies": {
+ "@vant/cli": "^3.10.3",
+ "@vant/icons": "^1.6.0",
+ "@vue/compiler-sfc": "^3.0.0",
+ "gulp": "^4.0.2",
+ "gulp-insert": "^0.5.0",
+ "gulp-less": "^4.0.1",
+ "gulp-postcss": "^9.0.0",
+ "gulp-rename": "^2.0.0",
+ "less": "^3.0.0",
+ "miniprogram-api-typings": "^3.1.6",
+ "miniprogram-ci": "^1.0.27",
+ "tscpaths": "^0.0.9",
+ "vue": "^3.0.0"
+ },
+ "files": [
+ "dist",
+ "lib"
+ ],
+ "homepage": "https://github.com/youzan/vant-weapp#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.{ts,js}": [
+ "eslint --fix",
+ "prettier --write"
+ ],
+ "*.{css,less}": [
+ "stylelint --fix",
+ "prettier --write"
+ ]
+ },
+ "miniprogram": "lib",
+ "name": "@vant/weapp",
+ "prettier": {
+ "singleQuote": true,
+ "proseWrap": "never"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/youzan/vant-weapp.git"
+ },
+ "scripts": {
+ "build:changelog": "vant-cli changelog",
+ "build:lib": "yarn && npx gulp -f build/compiler.js --series buildEs buildLib",
+ "dev": "node build/dev.js",
+ "lint": "eslint ./packages --ext .js,.ts --fix && stylelint \"packages/**/*.less\" --fix",
+ "prepare": "husky install",
+ "release": "sh build/release.sh",
+ "release:site": "vant-cli build-site && gh-pages -d site --add",
+ "upload:weapp": "node build/upload.js"
+ },
+ "version": "1.6.9"
+}
diff --git a/wechat/miniprogram/node_modules/crypto-js/CONTRIBUTING.md b/wechat/miniprogram/node_modules/crypto-js/CONTRIBUTING.md
new file mode 100644
index 00000000..09bf774a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/CONTRIBUTING.md
@@ -0,0 +1,28 @@
+# Contribution
+
+# Git Flow
+
+The crypto-js project uses [git flow](https://github.com/nvie/gitflow) to manage branches.
+Do your changes on the `develop` or even better on a `feature/*` branch. Don't do any changes on the `master` branch.
+
+# Pull request
+
+Target your pull request on `develop` branch. Other pull request won't be accepted.
+
+# How to build
+
+1. Clone
+
+2. Run
+
+ ```sh
+ npm install
+ ```
+
+3. Run
+
+ ```sh
+ npm run build
+ ```
+
+4. Check `build` folder
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/LICENSE b/wechat/miniprogram/node_modules/crypto-js/LICENSE
new file mode 100644
index 00000000..b0828e52
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/LICENSE
@@ -0,0 +1,24 @@
+# License
+
+[The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+Copyright (c) 2009-2013 Jeff Mott
+Copyright (c) 2013-2016 Evan Vosberg
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/wechat/miniprogram/node_modules/crypto-js/README.md b/wechat/miniprogram/node_modules/crypto-js/README.md
new file mode 100644
index 00000000..250c97ce
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/README.md
@@ -0,0 +1,249 @@
+# crypto-js [](https://travis-ci.org/brix/crypto-js)
+
+JavaScript library of crypto standards.
+
+## Node.js (Install)
+
+Requirements:
+
+- Node.js
+- npm (Node.js package manager)
+
+```bash
+npm install crypto-js
+```
+
+### Usage
+
+ES6 import for typical API call signing use case:
+
+```javascript
+import sha256 from 'crypto-js/sha256';
+import hmacSHA512 from 'crypto-js/hmac-sha512';
+import Base64 from 'crypto-js/enc-base64';
+
+const message, nonce, path, privateKey; // ...
+const hashDigest = sha256(nonce + message);
+const hmacDigest = Base64.stringify(hmacSHA512(path + hashDigest, privateKey));
+```
+
+Modular include:
+
+```javascript
+var AES = require("crypto-js/aes");
+var SHA256 = require("crypto-js/sha256");
+...
+console.log(SHA256("Message"));
+```
+
+Including all libraries, for access to extra methods:
+
+```javascript
+var CryptoJS = require("crypto-js");
+console.log(CryptoJS.HmacSHA1("Message", "Key"));
+```
+
+## Client (browser)
+
+Requirements:
+
+- Node.js
+- Bower (package manager for frontend)
+
+```bash
+bower install crypto-js
+```
+
+### Usage
+
+Modular include:
+
+```javascript
+require.config({
+ packages: [
+ {
+ name: 'crypto-js',
+ location: 'path-to/bower_components/crypto-js',
+ main: 'index'
+ }
+ ]
+});
+
+require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) {
+ console.log(SHA256("Message"));
+});
+```
+
+Including all libraries, for access to extra methods:
+
+```javascript
+// Above-mentioned will work or use this simple form
+require.config({
+ paths: {
+ 'crypto-js': 'path-to/bower_components/crypto-js/crypto-js'
+ }
+});
+
+require(["crypto-js"], function (CryptoJS) {
+ console.log(CryptoJS.HmacSHA1("Message", "Key"));
+});
+```
+
+### Usage without RequireJS
+
+```html
+
+
+```
+
+## API
+
+See: https://cryptojs.gitbook.io/docs/
+
+### AES Encryption
+
+#### Plain text encryption
+
+```javascript
+var CryptoJS = require("crypto-js");
+
+// Encrypt
+var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString();
+
+// Decrypt
+var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
+var originalText = bytes.toString(CryptoJS.enc.Utf8);
+
+console.log(originalText); // 'my message'
+```
+
+#### Object encryption
+
+```javascript
+var CryptoJS = require("crypto-js");
+
+var data = [{id: 1}, {id: 2}]
+
+// Encrypt
+var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString();
+
+// Decrypt
+var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
+var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
+
+console.log(decryptedData); // [{id: 1}, {id: 2}]
+```
+
+### List of modules
+
+
+- ```crypto-js/core```
+- ```crypto-js/x64-core```
+- ```crypto-js/lib-typedarrays```
+
+---
+
+- ```crypto-js/md5```
+- ```crypto-js/sha1```
+- ```crypto-js/sha256```
+- ```crypto-js/sha224```
+- ```crypto-js/sha512```
+- ```crypto-js/sha384```
+- ```crypto-js/sha3```
+- ```crypto-js/ripemd160```
+
+---
+
+- ```crypto-js/hmac-md5```
+- ```crypto-js/hmac-sha1```
+- ```crypto-js/hmac-sha256```
+- ```crypto-js/hmac-sha224```
+- ```crypto-js/hmac-sha512```
+- ```crypto-js/hmac-sha384```
+- ```crypto-js/hmac-sha3```
+- ```crypto-js/hmac-ripemd160```
+
+---
+
+- ```crypto-js/pbkdf2```
+
+---
+
+- ```crypto-js/aes```
+- ```crypto-js/tripledes```
+- ```crypto-js/rc4```
+- ```crypto-js/rabbit```
+- ```crypto-js/rabbit-legacy```
+- ```crypto-js/evpkdf```
+
+---
+
+- ```crypto-js/format-openssl```
+- ```crypto-js/format-hex```
+
+---
+
+- ```crypto-js/enc-latin1```
+- ```crypto-js/enc-utf8```
+- ```crypto-js/enc-hex```
+- ```crypto-js/enc-utf16```
+- ```crypto-js/enc-base64```
+
+---
+
+- ```crypto-js/mode-cfb```
+- ```crypto-js/mode-ctr```
+- ```crypto-js/mode-ctr-gladman```
+- ```crypto-js/mode-ofb```
+- ```crypto-js/mode-ecb```
+
+---
+
+- ```crypto-js/pad-pkcs7```
+- ```crypto-js/pad-ansix923```
+- ```crypto-js/pad-iso10126```
+- ```crypto-js/pad-iso97971```
+- ```crypto-js/pad-zeropadding```
+- ```crypto-js/pad-nopadding```
+
+
+## Release notes
+
+### 4.0.0
+
+This is an update including breaking changes for some environments.
+
+In this version `Math.random()` has been replaced by the random methods of the native crypto module.
+
+For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native.
+
+### 3.3.0
+
+Rollback, `3.3.0` is the same as `3.1.9-1`.
+
+The move of using native secure crypto module will be shifted to a new `4.x.x` version. As it is a breaking change the impact is too big for a minor release.
+
+### 3.2.1
+
+The usage of the native crypto module has been fixed. The import and access of the native crypto module has been improved.
+
+### 3.2.0
+
+In this version `Math.random()` has been replaced by the random methods of the native crypto module.
+
+For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before.
+
+If it's absolute required to run CryptoJS in such an environment, stay with `3.1.x` version. Encrypting and decrypting stays compatible. But keep in mind `3.1.x` versions still use `Math.random()` which is cryptographically not secure, as it's not random enough.
+
+This version came along with `CRITICAL` `BUG`.
+
+DO NOT USE THIS VERSION! Please, go for a newer version!
+
+### 3.1.x
+
+The `3.1.x` are based on the original CryptoJS, wrapped in CommonJS modules.
+
+
diff --git a/wechat/miniprogram/node_modules/crypto-js/aes.js b/wechat/miniprogram/node_modules/crypto-js/aes.js
new file mode 100644
index 00000000..166e3eac
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/aes.js
@@ -0,0 +1,234 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var BlockCipher = C_lib.BlockCipher;
+ var C_algo = C.algo;
+
+ // Lookup tables
+ var SBOX = [];
+ var INV_SBOX = [];
+ var SUB_MIX_0 = [];
+ var SUB_MIX_1 = [];
+ var SUB_MIX_2 = [];
+ var SUB_MIX_3 = [];
+ var INV_SUB_MIX_0 = [];
+ var INV_SUB_MIX_1 = [];
+ var INV_SUB_MIX_2 = [];
+ var INV_SUB_MIX_3 = [];
+
+ // Compute lookup tables
+ (function () {
+ // Compute double table
+ var d = [];
+ for (var i = 0; i < 256; i++) {
+ if (i < 128) {
+ d[i] = i << 1;
+ } else {
+ d[i] = (i << 1) ^ 0x11b;
+ }
+ }
+
+ // Walk GF(2^8)
+ var x = 0;
+ var xi = 0;
+ for (var i = 0; i < 256; i++) {
+ // Compute sbox
+ var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
+ sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
+ SBOX[x] = sx;
+ INV_SBOX[sx] = x;
+
+ // Compute multiplication
+ var x2 = d[x];
+ var x4 = d[x2];
+ var x8 = d[x4];
+
+ // Compute sub bytes, mix columns tables
+ var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
+ SUB_MIX_0[x] = (t << 24) | (t >>> 8);
+ SUB_MIX_1[x] = (t << 16) | (t >>> 16);
+ SUB_MIX_2[x] = (t << 8) | (t >>> 24);
+ SUB_MIX_3[x] = t;
+
+ // Compute inv sub bytes, inv mix columns tables
+ var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
+ INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
+ INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
+ INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);
+ INV_SUB_MIX_3[sx] = t;
+
+ // Compute next counter
+ if (!x) {
+ x = xi = 1;
+ } else {
+ x = x2 ^ d[d[d[x8 ^ x2]]];
+ xi ^= d[d[xi]];
+ }
+ }
+ }());
+
+ // Precomputed Rcon lookup
+ var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
+
+ /**
+ * AES block cipher algorithm.
+ */
+ var AES = C_algo.AES = BlockCipher.extend({
+ _doReset: function () {
+ var t;
+
+ // Skip reset of nRounds has been set before and key did not change
+ if (this._nRounds && this._keyPriorReset === this._key) {
+ return;
+ }
+
+ // Shortcuts
+ var key = this._keyPriorReset = this._key;
+ var keyWords = key.words;
+ var keySize = key.sigBytes / 4;
+
+ // Compute number of rounds
+ var nRounds = this._nRounds = keySize + 6;
+
+ // Compute number of key schedule rows
+ var ksRows = (nRounds + 1) * 4;
+
+ // Compute key schedule
+ var keySchedule = this._keySchedule = [];
+ for (var ksRow = 0; ksRow < ksRows; ksRow++) {
+ if (ksRow < keySize) {
+ keySchedule[ksRow] = keyWords[ksRow];
+ } else {
+ t = keySchedule[ksRow - 1];
+
+ if (!(ksRow % keySize)) {
+ // Rot word
+ t = (t << 8) | (t >>> 24);
+
+ // Sub word
+ t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
+
+ // Mix Rcon
+ t ^= RCON[(ksRow / keySize) | 0] << 24;
+ } else if (keySize > 6 && ksRow % keySize == 4) {
+ // Sub word
+ t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
+ }
+
+ keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
+ }
+ }
+
+ // Compute inv key schedule
+ var invKeySchedule = this._invKeySchedule = [];
+ for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
+ var ksRow = ksRows - invKsRow;
+
+ if (invKsRow % 4) {
+ var t = keySchedule[ksRow];
+ } else {
+ var t = keySchedule[ksRow - 4];
+ }
+
+ if (invKsRow < 4 || ksRow <= 4) {
+ invKeySchedule[invKsRow] = t;
+ } else {
+ invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
+ INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
+ }
+ }
+ },
+
+ encryptBlock: function (M, offset) {
+ this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
+ },
+
+ decryptBlock: function (M, offset) {
+ // Swap 2nd and 4th rows
+ var t = M[offset + 1];
+ M[offset + 1] = M[offset + 3];
+ M[offset + 3] = t;
+
+ this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
+
+ // Inv swap 2nd and 4th rows
+ var t = M[offset + 1];
+ M[offset + 1] = M[offset + 3];
+ M[offset + 3] = t;
+ },
+
+ _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
+ // Shortcut
+ var nRounds = this._nRounds;
+
+ // Get input, add round key
+ var s0 = M[offset] ^ keySchedule[0];
+ var s1 = M[offset + 1] ^ keySchedule[1];
+ var s2 = M[offset + 2] ^ keySchedule[2];
+ var s3 = M[offset + 3] ^ keySchedule[3];
+
+ // Key schedule row counter
+ var ksRow = 4;
+
+ // Rounds
+ for (var round = 1; round < nRounds; round++) {
+ // Shift rows, sub bytes, mix columns, add round key
+ var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
+ var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
+ var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
+ var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
+
+ // Update state
+ s0 = t0;
+ s1 = t1;
+ s2 = t2;
+ s3 = t3;
+ }
+
+ // Shift rows, sub bytes, add round key
+ var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
+ var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
+ var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
+ var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
+
+ // Set output
+ M[offset] = t0;
+ M[offset + 1] = t1;
+ M[offset + 2] = t2;
+ M[offset + 3] = t3;
+ },
+
+ keySize: 256/32
+ });
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
+ */
+ C.AES = BlockCipher._createHelper(AES);
+ }());
+
+
+ return CryptoJS.AES;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/bower.json b/wechat/miniprogram/node_modules/crypto-js/bower.json
new file mode 100644
index 00000000..6ccdd872
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/bower.json
@@ -0,0 +1,35 @@
+{
+ "name": "crypto-js",
+ "version": "4.0.0",
+ "description": "JavaScript library of crypto standards.",
+ "license": "MIT",
+ "homepage": "http://github.com/brix/crypto-js",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/brix/crypto-js.git"
+ },
+ "keywords": [
+ "security",
+ "crypto",
+ "Hash",
+ "MD5",
+ "SHA1",
+ "SHA-1",
+ "SHA256",
+ "SHA-256",
+ "RC4",
+ "Rabbit",
+ "AES",
+ "DES",
+ "PBKDF2",
+ "HMAC",
+ "OFB",
+ "CFB",
+ "CTR",
+ "CBC",
+ "Base64"
+ ],
+ "main": "index.js",
+ "dependencies": {},
+ "ignore": []
+}
diff --git a/wechat/miniprogram/node_modules/crypto-js/cipher-core.js b/wechat/miniprogram/node_modules/crypto-js/cipher-core.js
new file mode 100644
index 00000000..c560c9eb
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/cipher-core.js
@@ -0,0 +1,890 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./evpkdf"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./evpkdf"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * Cipher core components.
+ */
+ CryptoJS.lib.Cipher || (function (undefined) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var WordArray = C_lib.WordArray;
+ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
+ var C_enc = C.enc;
+ var Utf8 = C_enc.Utf8;
+ var Base64 = C_enc.Base64;
+ var C_algo = C.algo;
+ var EvpKDF = C_algo.EvpKDF;
+
+ /**
+ * Abstract base cipher template.
+ *
+ * @property {number} keySize This cipher's key size. Default: 4 (128 bits)
+ * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
+ * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
+ * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
+ */
+ var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {WordArray} iv The IV to use for this operation.
+ */
+ cfg: Base.extend(),
+
+ /**
+ * Creates this cipher in encryption mode.
+ *
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {Cipher} A cipher instance.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
+ */
+ createEncryptor: function (key, cfg) {
+ return this.create(this._ENC_XFORM_MODE, key, cfg);
+ },
+
+ /**
+ * Creates this cipher in decryption mode.
+ *
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {Cipher} A cipher instance.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
+ */
+ createDecryptor: function (key, cfg) {
+ return this.create(this._DEC_XFORM_MODE, key, cfg);
+ },
+
+ /**
+ * Initializes a newly created cipher.
+ *
+ * @param {number} xformMode Either the encryption or decryption transormation mode constant.
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @example
+ *
+ * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
+ */
+ init: function (xformMode, key, cfg) {
+ // Apply config defaults
+ this.cfg = this.cfg.extend(cfg);
+
+ // Store transform mode and key
+ this._xformMode = xformMode;
+ this._key = key;
+
+ // Set initial values
+ this.reset();
+ },
+
+ /**
+ * Resets this cipher to its initial state.
+ *
+ * @example
+ *
+ * cipher.reset();
+ */
+ reset: function () {
+ // Reset data buffer
+ BufferedBlockAlgorithm.reset.call(this);
+
+ // Perform concrete-cipher logic
+ this._doReset();
+ },
+
+ /**
+ * Adds data to be encrypted or decrypted.
+ *
+ * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
+ *
+ * @return {WordArray} The data after processing.
+ *
+ * @example
+ *
+ * var encrypted = cipher.process('data');
+ * var encrypted = cipher.process(wordArray);
+ */
+ process: function (dataUpdate) {
+ // Append
+ this._append(dataUpdate);
+
+ // Process available blocks
+ return this._process();
+ },
+
+ /**
+ * Finalizes the encryption or decryption process.
+ * Note that the finalize operation is effectively a destructive, read-once operation.
+ *
+ * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
+ *
+ * @return {WordArray} The data after final processing.
+ *
+ * @example
+ *
+ * var encrypted = cipher.finalize();
+ * var encrypted = cipher.finalize('data');
+ * var encrypted = cipher.finalize(wordArray);
+ */
+ finalize: function (dataUpdate) {
+ // Final data update
+ if (dataUpdate) {
+ this._append(dataUpdate);
+ }
+
+ // Perform concrete-cipher logic
+ var finalProcessedData = this._doFinalize();
+
+ return finalProcessedData;
+ },
+
+ keySize: 128/32,
+
+ ivSize: 128/32,
+
+ _ENC_XFORM_MODE: 1,
+
+ _DEC_XFORM_MODE: 2,
+
+ /**
+ * Creates shortcut functions to a cipher's object interface.
+ *
+ * @param {Cipher} cipher The cipher to create a helper for.
+ *
+ * @return {Object} An object with encrypt and decrypt shortcut functions.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
+ */
+ _createHelper: (function () {
+ function selectCipherStrategy(key) {
+ if (typeof key == 'string') {
+ return PasswordBasedCipher;
+ } else {
+ return SerializableCipher;
+ }
+ }
+
+ return function (cipher) {
+ return {
+ encrypt: function (message, key, cfg) {
+ return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
+ },
+
+ decrypt: function (ciphertext, key, cfg) {
+ return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
+ }
+ };
+ };
+ }())
+ });
+
+ /**
+ * Abstract base stream cipher template.
+ *
+ * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
+ */
+ var StreamCipher = C_lib.StreamCipher = Cipher.extend({
+ _doFinalize: function () {
+ // Process partial blocks
+ var finalProcessedBlocks = this._process(!!'flush');
+
+ return finalProcessedBlocks;
+ },
+
+ blockSize: 1
+ });
+
+ /**
+ * Mode namespace.
+ */
+ var C_mode = C.mode = {};
+
+ /**
+ * Abstract base block cipher mode template.
+ */
+ var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
+ /**
+ * Creates this mode for encryption.
+ *
+ * @param {Cipher} cipher A block cipher instance.
+ * @param {Array} iv The IV words.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
+ */
+ createEncryptor: function (cipher, iv) {
+ return this.Encryptor.create(cipher, iv);
+ },
+
+ /**
+ * Creates this mode for decryption.
+ *
+ * @param {Cipher} cipher A block cipher instance.
+ * @param {Array} iv The IV words.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
+ */
+ createDecryptor: function (cipher, iv) {
+ return this.Decryptor.create(cipher, iv);
+ },
+
+ /**
+ * Initializes a newly created mode.
+ *
+ * @param {Cipher} cipher A block cipher instance.
+ * @param {Array} iv The IV words.
+ *
+ * @example
+ *
+ * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
+ */
+ init: function (cipher, iv) {
+ this._cipher = cipher;
+ this._iv = iv;
+ }
+ });
+
+ /**
+ * Cipher Block Chaining mode.
+ */
+ var CBC = C_mode.CBC = (function () {
+ /**
+ * Abstract base CBC mode.
+ */
+ var CBC = BlockCipherMode.extend();
+
+ /**
+ * CBC encryptor.
+ */
+ CBC.Encryptor = CBC.extend({
+ /**
+ * Processes the data block at offset.
+ *
+ * @param {Array} words The data words to operate on.
+ * @param {number} offset The offset where the block starts.
+ *
+ * @example
+ *
+ * mode.processBlock(data.words, offset);
+ */
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ // XOR and encrypt
+ xorBlock.call(this, words, offset, blockSize);
+ cipher.encryptBlock(words, offset);
+
+ // Remember this block to use with next block
+ this._prevBlock = words.slice(offset, offset + blockSize);
+ }
+ });
+
+ /**
+ * CBC decryptor.
+ */
+ CBC.Decryptor = CBC.extend({
+ /**
+ * Processes the data block at offset.
+ *
+ * @param {Array} words The data words to operate on.
+ * @param {number} offset The offset where the block starts.
+ *
+ * @example
+ *
+ * mode.processBlock(data.words, offset);
+ */
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ // Remember this block to use with next block
+ var thisBlock = words.slice(offset, offset + blockSize);
+
+ // Decrypt and XOR
+ cipher.decryptBlock(words, offset);
+ xorBlock.call(this, words, offset, blockSize);
+
+ // This block becomes the previous block
+ this._prevBlock = thisBlock;
+ }
+ });
+
+ function xorBlock(words, offset, blockSize) {
+ var block;
+
+ // Shortcut
+ var iv = this._iv;
+
+ // Choose mixing block
+ if (iv) {
+ block = iv;
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ } else {
+ block = this._prevBlock;
+ }
+
+ // XOR blocks
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= block[i];
+ }
+ }
+
+ return CBC;
+ }());
+
+ /**
+ * Padding namespace.
+ */
+ var C_pad = C.pad = {};
+
+ /**
+ * PKCS #5/7 padding strategy.
+ */
+ var Pkcs7 = C_pad.Pkcs7 = {
+ /**
+ * Pads data using the algorithm defined in PKCS #5/7.
+ *
+ * @param {WordArray} data The data to pad.
+ * @param {number} blockSize The multiple that the data should be padded to.
+ *
+ * @static
+ *
+ * @example
+ *
+ * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
+ */
+ pad: function (data, blockSize) {
+ // Shortcut
+ var blockSizeBytes = blockSize * 4;
+
+ // Count padding bytes
+ var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
+
+ // Create padding word
+ var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;
+
+ // Create padding
+ var paddingWords = [];
+ for (var i = 0; i < nPaddingBytes; i += 4) {
+ paddingWords.push(paddingWord);
+ }
+ var padding = WordArray.create(paddingWords, nPaddingBytes);
+
+ // Add padding
+ data.concat(padding);
+ },
+
+ /**
+ * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
+ *
+ * @param {WordArray} data The data to unpad.
+ *
+ * @static
+ *
+ * @example
+ *
+ * CryptoJS.pad.Pkcs7.unpad(wordArray);
+ */
+ unpad: function (data) {
+ // Get number of padding bytes from last byte
+ var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
+
+ // Remove padding
+ data.sigBytes -= nPaddingBytes;
+ }
+ };
+
+ /**
+ * Abstract base block cipher template.
+ *
+ * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
+ */
+ var BlockCipher = C_lib.BlockCipher = Cipher.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {Mode} mode The block mode to use. Default: CBC
+ * @property {Padding} padding The padding strategy to use. Default: Pkcs7
+ */
+ cfg: Cipher.cfg.extend({
+ mode: CBC,
+ padding: Pkcs7
+ }),
+
+ reset: function () {
+ var modeCreator;
+
+ // Reset cipher
+ Cipher.reset.call(this);
+
+ // Shortcuts
+ var cfg = this.cfg;
+ var iv = cfg.iv;
+ var mode = cfg.mode;
+
+ // Reset block mode
+ if (this._xformMode == this._ENC_XFORM_MODE) {
+ modeCreator = mode.createEncryptor;
+ } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
+ modeCreator = mode.createDecryptor;
+ // Keep at least one block in the buffer for unpadding
+ this._minBufferSize = 1;
+ }
+
+ if (this._mode && this._mode.__creator == modeCreator) {
+ this._mode.init(this, iv && iv.words);
+ } else {
+ this._mode = modeCreator.call(mode, this, iv && iv.words);
+ this._mode.__creator = modeCreator;
+ }
+ },
+
+ _doProcessBlock: function (words, offset) {
+ this._mode.processBlock(words, offset);
+ },
+
+ _doFinalize: function () {
+ var finalProcessedBlocks;
+
+ // Shortcut
+ var padding = this.cfg.padding;
+
+ // Finalize
+ if (this._xformMode == this._ENC_XFORM_MODE) {
+ // Pad data
+ padding.pad(this._data, this.blockSize);
+
+ // Process final blocks
+ finalProcessedBlocks = this._process(!!'flush');
+ } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
+ // Process final blocks
+ finalProcessedBlocks = this._process(!!'flush');
+
+ // Unpad data
+ padding.unpad(finalProcessedBlocks);
+ }
+
+ return finalProcessedBlocks;
+ },
+
+ blockSize: 128/32
+ });
+
+ /**
+ * A collection of cipher parameters.
+ *
+ * @property {WordArray} ciphertext The raw ciphertext.
+ * @property {WordArray} key The key to this ciphertext.
+ * @property {WordArray} iv The IV used in the ciphering operation.
+ * @property {WordArray} salt The salt used with a key derivation function.
+ * @property {Cipher} algorithm The cipher algorithm.
+ * @property {Mode} mode The block mode used in the ciphering operation.
+ * @property {Padding} padding The padding scheme used in the ciphering operation.
+ * @property {number} blockSize The block size of the cipher.
+ * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
+ */
+ var CipherParams = C_lib.CipherParams = Base.extend({
+ /**
+ * Initializes a newly created cipher params object.
+ *
+ * @param {Object} cipherParams An object with any of the possible cipher parameters.
+ *
+ * @example
+ *
+ * var cipherParams = CryptoJS.lib.CipherParams.create({
+ * ciphertext: ciphertextWordArray,
+ * key: keyWordArray,
+ * iv: ivWordArray,
+ * salt: saltWordArray,
+ * algorithm: CryptoJS.algo.AES,
+ * mode: CryptoJS.mode.CBC,
+ * padding: CryptoJS.pad.PKCS7,
+ * blockSize: 4,
+ * formatter: CryptoJS.format.OpenSSL
+ * });
+ */
+ init: function (cipherParams) {
+ this.mixIn(cipherParams);
+ },
+
+ /**
+ * Converts this cipher params object to a string.
+ *
+ * @param {Format} formatter (Optional) The formatting strategy to use.
+ *
+ * @return {string} The stringified cipher params.
+ *
+ * @throws Error If neither the formatter nor the default formatter is set.
+ *
+ * @example
+ *
+ * var string = cipherParams + '';
+ * var string = cipherParams.toString();
+ * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
+ */
+ toString: function (formatter) {
+ return (formatter || this.formatter).stringify(this);
+ }
+ });
+
+ /**
+ * Format namespace.
+ */
+ var C_format = C.format = {};
+
+ /**
+ * OpenSSL formatting strategy.
+ */
+ var OpenSSLFormatter = C_format.OpenSSL = {
+ /**
+ * Converts a cipher params object to an OpenSSL-compatible string.
+ *
+ * @param {CipherParams} cipherParams The cipher params object.
+ *
+ * @return {string} The OpenSSL-compatible string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
+ */
+ stringify: function (cipherParams) {
+ var wordArray;
+
+ // Shortcuts
+ var ciphertext = cipherParams.ciphertext;
+ var salt = cipherParams.salt;
+
+ // Format
+ if (salt) {
+ wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
+ } else {
+ wordArray = ciphertext;
+ }
+
+ return wordArray.toString(Base64);
+ },
+
+ /**
+ * Converts an OpenSSL-compatible string to a cipher params object.
+ *
+ * @param {string} openSSLStr The OpenSSL-compatible string.
+ *
+ * @return {CipherParams} The cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
+ */
+ parse: function (openSSLStr) {
+ var salt;
+
+ // Parse base64
+ var ciphertext = Base64.parse(openSSLStr);
+
+ // Shortcut
+ var ciphertextWords = ciphertext.words;
+
+ // Test for salt
+ if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
+ // Extract salt
+ salt = WordArray.create(ciphertextWords.slice(2, 4));
+
+ // Remove salt from ciphertext
+ ciphertextWords.splice(0, 4);
+ ciphertext.sigBytes -= 16;
+ }
+
+ return CipherParams.create({ ciphertext: ciphertext, salt: salt });
+ }
+ };
+
+ /**
+ * A cipher wrapper that returns ciphertext as a serializable cipher params object.
+ */
+ var SerializableCipher = C_lib.SerializableCipher = Base.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
+ */
+ cfg: Base.extend({
+ format: OpenSSLFormatter
+ }),
+
+ /**
+ * Encrypts a message.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {WordArray|string} message The message to encrypt.
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {CipherParams} A cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
+ */
+ encrypt: function (cipher, message, key, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Encrypt
+ var encryptor = cipher.createEncryptor(key, cfg);
+ var ciphertext = encryptor.finalize(message);
+
+ // Shortcut
+ var cipherCfg = encryptor.cfg;
+
+ // Create and return serializable cipher params
+ return CipherParams.create({
+ ciphertext: ciphertext,
+ key: key,
+ iv: cipherCfg.iv,
+ algorithm: cipher,
+ mode: cipherCfg.mode,
+ padding: cipherCfg.padding,
+ blockSize: cipher.blockSize,
+ formatter: cfg.format
+ });
+ },
+
+ /**
+ * Decrypts serialized ciphertext.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {WordArray} The plaintext.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
+ * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
+ */
+ decrypt: function (cipher, ciphertext, key, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Convert string to CipherParams
+ ciphertext = this._parse(ciphertext, cfg.format);
+
+ // Decrypt
+ var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
+
+ return plaintext;
+ },
+
+ /**
+ * Converts serialized ciphertext to CipherParams,
+ * else assumed CipherParams already and returns ciphertext unchanged.
+ *
+ * @param {CipherParams|string} ciphertext The ciphertext.
+ * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
+ *
+ * @return {CipherParams} The unserialized ciphertext.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
+ */
+ _parse: function (ciphertext, format) {
+ if (typeof ciphertext == 'string') {
+ return format.parse(ciphertext, this);
+ } else {
+ return ciphertext;
+ }
+ }
+ });
+
+ /**
+ * Key derivation function namespace.
+ */
+ var C_kdf = C.kdf = {};
+
+ /**
+ * OpenSSL key derivation function.
+ */
+ var OpenSSLKdf = C_kdf.OpenSSL = {
+ /**
+ * Derives a key and IV from a password.
+ *
+ * @param {string} password The password to derive from.
+ * @param {number} keySize The size in words of the key to generate.
+ * @param {number} ivSize The size in words of the IV to generate.
+ * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
+ *
+ * @return {CipherParams} A cipher params object with the key, IV, and salt.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
+ * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
+ */
+ execute: function (password, keySize, ivSize, salt) {
+ // Generate random salt
+ if (!salt) {
+ salt = WordArray.random(64/8);
+ }
+
+ // Derive key and IV
+ var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
+
+ // Separate key and IV
+ var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
+ key.sigBytes = keySize * 4;
+
+ // Return params
+ return CipherParams.create({ key: key, iv: iv, salt: salt });
+ }
+ };
+
+ /**
+ * A serializable cipher wrapper that derives the key from a password,
+ * and returns ciphertext as a serializable cipher params object.
+ */
+ var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
+ */
+ cfg: SerializableCipher.cfg.extend({
+ kdf: OpenSSLKdf
+ }),
+
+ /**
+ * Encrypts a message using a password.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {WordArray|string} message The message to encrypt.
+ * @param {string} password The password.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {CipherParams} A cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
+ * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
+ */
+ encrypt: function (cipher, message, password, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Derive key and other params
+ var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
+
+ // Add IV to config
+ cfg.iv = derivedParams.iv;
+
+ // Encrypt
+ var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
+
+ // Mix in derived params
+ ciphertext.mixIn(derivedParams);
+
+ return ciphertext;
+ },
+
+ /**
+ * Decrypts serialized ciphertext using a password.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
+ * @param {string} password The password.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {WordArray} The plaintext.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
+ * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
+ */
+ decrypt: function (cipher, ciphertext, password, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Convert string to CipherParams
+ ciphertext = this._parse(ciphertext, cfg.format);
+
+ // Derive key and other params
+ var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
+
+ // Add IV to config
+ cfg.iv = derivedParams.iv;
+
+ // Decrypt
+ var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
+
+ return plaintext;
+ }
+ });
+ }());
+
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/core.js b/wechat/miniprogram/node_modules/crypto-js/core.js
new file mode 100644
index 00000000..0ef552ba
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/core.js
@@ -0,0 +1,797 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory();
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define([], factory);
+ }
+ else {
+ // Global (browser)
+ root.CryptoJS = factory();
+ }
+}(this, function () {
+
+ /*globals window, global, require*/
+
+ /**
+ * CryptoJS core components.
+ */
+ var CryptoJS = CryptoJS || (function (Math, undefined) {
+
+ var crypto;
+
+ // Native crypto from window (Browser)
+ if (typeof window !== 'undefined' && window.crypto) {
+ crypto = window.crypto;
+ }
+
+ // Native (experimental IE 11) crypto from window (Browser)
+ if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
+ crypto = window.msCrypto;
+ }
+
+ // Native crypto from global (NodeJS)
+ if (!crypto && typeof global !== 'undefined' && global.crypto) {
+ crypto = global.crypto;
+ }
+
+ // Native crypto import via require (NodeJS)
+ if (!crypto && typeof require === 'function') {
+ try {
+ crypto = require('crypto');
+ } catch (err) {}
+ }
+
+ /*
+ * Cryptographically secure pseudorandom number generator
+ *
+ * As Math.random() is cryptographically not safe to use
+ */
+ var cryptoSecureRandomInt = function () {
+ if (crypto) {
+ // Use getRandomValues method (Browser)
+ if (typeof crypto.getRandomValues === 'function') {
+ try {
+ return crypto.getRandomValues(new Uint32Array(1))[0];
+ } catch (err) {}
+ }
+
+ // Use randomBytes method (NodeJS)
+ if (typeof crypto.randomBytes === 'function') {
+ try {
+ return crypto.randomBytes(4).readInt32LE();
+ } catch (err) {}
+ }
+ }
+
+ throw new Error('Native crypto module could not be used to get secure random number.');
+ };
+
+ /*
+ * Local polyfill of Object.create
+
+ */
+ var create = Object.create || (function () {
+ function F() {}
+
+ return function (obj) {
+ var subtype;
+
+ F.prototype = obj;
+
+ subtype = new F();
+
+ F.prototype = null;
+
+ return subtype;
+ };
+ }())
+
+ /**
+ * CryptoJS namespace.
+ */
+ var C = {};
+
+ /**
+ * Library namespace.
+ */
+ var C_lib = C.lib = {};
+
+ /**
+ * Base object for prototypal inheritance.
+ */
+ var Base = C_lib.Base = (function () {
+
+
+ return {
+ /**
+ * Creates a new object that inherits from this object.
+ *
+ * @param {Object} overrides Properties to copy into the new object.
+ *
+ * @return {Object} The new object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var MyType = CryptoJS.lib.Base.extend({
+ * field: 'value',
+ *
+ * method: function () {
+ * }
+ * });
+ */
+ extend: function (overrides) {
+ // Spawn
+ var subtype = create(this);
+
+ // Augment
+ if (overrides) {
+ subtype.mixIn(overrides);
+ }
+
+ // Create default initializer
+ if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
+ subtype.init = function () {
+ subtype.$super.init.apply(this, arguments);
+ };
+ }
+
+ // Initializer's prototype is the subtype object
+ subtype.init.prototype = subtype;
+
+ // Reference supertype
+ subtype.$super = this;
+
+ return subtype;
+ },
+
+ /**
+ * Extends this object and runs the init method.
+ * Arguments to create() will be passed to init().
+ *
+ * @return {Object} The new object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var instance = MyType.create();
+ */
+ create: function () {
+ var instance = this.extend();
+ instance.init.apply(instance, arguments);
+
+ return instance;
+ },
+
+ /**
+ * Initializes a newly created object.
+ * Override this method to add some logic when your objects are created.
+ *
+ * @example
+ *
+ * var MyType = CryptoJS.lib.Base.extend({
+ * init: function () {
+ * // ...
+ * }
+ * });
+ */
+ init: function () {
+ },
+
+ /**
+ * Copies properties into this object.
+ *
+ * @param {Object} properties The properties to mix in.
+ *
+ * @example
+ *
+ * MyType.mixIn({
+ * field: 'value'
+ * });
+ */
+ mixIn: function (properties) {
+ for (var propertyName in properties) {
+ if (properties.hasOwnProperty(propertyName)) {
+ this[propertyName] = properties[propertyName];
+ }
+ }
+
+ // IE won't copy toString using the loop above
+ if (properties.hasOwnProperty('toString')) {
+ this.toString = properties.toString;
+ }
+ },
+
+ /**
+ * Creates a copy of this object.
+ *
+ * @return {Object} The clone.
+ *
+ * @example
+ *
+ * var clone = instance.clone();
+ */
+ clone: function () {
+ return this.init.prototype.extend(this);
+ }
+ };
+ }());
+
+ /**
+ * An array of 32-bit words.
+ *
+ * @property {Array} words The array of 32-bit words.
+ * @property {number} sigBytes The number of significant bytes in this word array.
+ */
+ var WordArray = C_lib.WordArray = Base.extend({
+ /**
+ * Initializes a newly created word array.
+ *
+ * @param {Array} words (Optional) An array of 32-bit words.
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.lib.WordArray.create();
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
+ */
+ init: function (words, sigBytes) {
+ words = this.words = words || [];
+
+ if (sigBytes != undefined) {
+ this.sigBytes = sigBytes;
+ } else {
+ this.sigBytes = words.length * 4;
+ }
+ },
+
+ /**
+ * Converts this word array to a string.
+ *
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
+ *
+ * @return {string} The stringified word array.
+ *
+ * @example
+ *
+ * var string = wordArray + '';
+ * var string = wordArray.toString();
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
+ */
+ toString: function (encoder) {
+ return (encoder || Hex).stringify(this);
+ },
+
+ /**
+ * Concatenates a word array to this word array.
+ *
+ * @param {WordArray} wordArray The word array to append.
+ *
+ * @return {WordArray} This word array.
+ *
+ * @example
+ *
+ * wordArray1.concat(wordArray2);
+ */
+ concat: function (wordArray) {
+ // Shortcuts
+ var thisWords = this.words;
+ var thatWords = wordArray.words;
+ var thisSigBytes = this.sigBytes;
+ var thatSigBytes = wordArray.sigBytes;
+
+ // Clamp excess bits
+ this.clamp();
+
+ // Concat
+ if (thisSigBytes % 4) {
+ // Copy one byte at a time
+ for (var i = 0; i < thatSigBytes; i++) {
+ var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
+ }
+ } else {
+ // Copy one word at a time
+ for (var i = 0; i < thatSigBytes; i += 4) {
+ thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
+ }
+ }
+ this.sigBytes += thatSigBytes;
+
+ // Chainable
+ return this;
+ },
+
+ /**
+ * Removes insignificant bits.
+ *
+ * @example
+ *
+ * wordArray.clamp();
+ */
+ clamp: function () {
+ // Shortcuts
+ var words = this.words;
+ var sigBytes = this.sigBytes;
+
+ // Clamp
+ words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
+ words.length = Math.ceil(sigBytes / 4);
+ },
+
+ /**
+ * Creates a copy of this word array.
+ *
+ * @return {WordArray} The clone.
+ *
+ * @example
+ *
+ * var clone = wordArray.clone();
+ */
+ clone: function () {
+ var clone = Base.clone.call(this);
+ clone.words = this.words.slice(0);
+
+ return clone;
+ },
+
+ /**
+ * Creates a word array filled with random bytes.
+ *
+ * @param {number} nBytes The number of random bytes to generate.
+ *
+ * @return {WordArray} The random word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
+ */
+ random: function (nBytes) {
+ var words = [];
+
+ for (var i = 0; i < nBytes; i += 4) {
+ words.push(cryptoSecureRandomInt());
+ }
+
+ return new WordArray.init(words, nBytes);
+ }
+ });
+
+ /**
+ * Encoder namespace.
+ */
+ var C_enc = C.enc = {};
+
+ /**
+ * Hex encoding strategy.
+ */
+ var Hex = C_enc.Hex = {
+ /**
+ * Converts a word array to a hex string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The hex string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var hexChars = [];
+ for (var i = 0; i < sigBytes; i++) {
+ var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ hexChars.push((bite >>> 4).toString(16));
+ hexChars.push((bite & 0x0f).toString(16));
+ }
+
+ return hexChars.join('');
+ },
+
+ /**
+ * Converts a hex string to a word array.
+ *
+ * @param {string} hexStr The hex string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
+ */
+ parse: function (hexStr) {
+ // Shortcut
+ var hexStrLength = hexStr.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < hexStrLength; i += 2) {
+ words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
+ }
+
+ return new WordArray.init(words, hexStrLength / 2);
+ }
+ };
+
+ /**
+ * Latin1 encoding strategy.
+ */
+ var Latin1 = C_enc.Latin1 = {
+ /**
+ * Converts a word array to a Latin1 string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The Latin1 string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var latin1Chars = [];
+ for (var i = 0; i < sigBytes; i++) {
+ var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ latin1Chars.push(String.fromCharCode(bite));
+ }
+
+ return latin1Chars.join('');
+ },
+
+ /**
+ * Converts a Latin1 string to a word array.
+ *
+ * @param {string} latin1Str The Latin1 string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
+ */
+ parse: function (latin1Str) {
+ // Shortcut
+ var latin1StrLength = latin1Str.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < latin1StrLength; i++) {
+ words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
+ }
+
+ return new WordArray.init(words, latin1StrLength);
+ }
+ };
+
+ /**
+ * UTF-8 encoding strategy.
+ */
+ var Utf8 = C_enc.Utf8 = {
+ /**
+ * Converts a word array to a UTF-8 string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The UTF-8 string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ try {
+ return decodeURIComponent(escape(Latin1.stringify(wordArray)));
+ } catch (e) {
+ throw new Error('Malformed UTF-8 data');
+ }
+ },
+
+ /**
+ * Converts a UTF-8 string to a word array.
+ *
+ * @param {string} utf8Str The UTF-8 string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
+ */
+ parse: function (utf8Str) {
+ return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
+ }
+ };
+
+ /**
+ * Abstract buffered block algorithm template.
+ *
+ * The property blockSize must be implemented in a concrete subtype.
+ *
+ * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
+ */
+ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
+ /**
+ * Resets this block algorithm's data buffer to its initial state.
+ *
+ * @example
+ *
+ * bufferedBlockAlgorithm.reset();
+ */
+ reset: function () {
+ // Initial values
+ this._data = new WordArray.init();
+ this._nDataBytes = 0;
+ },
+
+ /**
+ * Adds new data to this block algorithm's buffer.
+ *
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
+ *
+ * @example
+ *
+ * bufferedBlockAlgorithm._append('data');
+ * bufferedBlockAlgorithm._append(wordArray);
+ */
+ _append: function (data) {
+ // Convert string to WordArray, else assume WordArray already
+ if (typeof data == 'string') {
+ data = Utf8.parse(data);
+ }
+
+ // Append
+ this._data.concat(data);
+ this._nDataBytes += data.sigBytes;
+ },
+
+ /**
+ * Processes available data blocks.
+ *
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
+ *
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
+ *
+ * @return {WordArray} The processed data.
+ *
+ * @example
+ *
+ * var processedData = bufferedBlockAlgorithm._process();
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
+ */
+ _process: function (doFlush) {
+ var processedWords;
+
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+ var dataSigBytes = data.sigBytes;
+ var blockSize = this.blockSize;
+ var blockSizeBytes = blockSize * 4;
+
+ // Count blocks ready
+ var nBlocksReady = dataSigBytes / blockSizeBytes;
+ if (doFlush) {
+ // Round up to include partial blocks
+ nBlocksReady = Math.ceil(nBlocksReady);
+ } else {
+ // Round down to include only full blocks,
+ // less the number of blocks that must remain in the buffer
+ nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
+ }
+
+ // Count words ready
+ var nWordsReady = nBlocksReady * blockSize;
+
+ // Count bytes ready
+ var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
+
+ // Process blocks
+ if (nWordsReady) {
+ for (var offset = 0; offset < nWordsReady; offset += blockSize) {
+ // Perform concrete-algorithm logic
+ this._doProcessBlock(dataWords, offset);
+ }
+
+ // Remove processed words
+ processedWords = dataWords.splice(0, nWordsReady);
+ data.sigBytes -= nBytesReady;
+ }
+
+ // Return processed words
+ return new WordArray.init(processedWords, nBytesReady);
+ },
+
+ /**
+ * Creates a copy of this object.
+ *
+ * @return {Object} The clone.
+ *
+ * @example
+ *
+ * var clone = bufferedBlockAlgorithm.clone();
+ */
+ clone: function () {
+ var clone = Base.clone.call(this);
+ clone._data = this._data.clone();
+
+ return clone;
+ },
+
+ _minBufferSize: 0
+ });
+
+ /**
+ * Abstract hasher template.
+ *
+ * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
+ */
+ var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
+ /**
+ * Configuration options.
+ */
+ cfg: Base.extend(),
+
+ /**
+ * Initializes a newly created hasher.
+ *
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
+ *
+ * @example
+ *
+ * var hasher = CryptoJS.algo.SHA256.create();
+ */
+ init: function (cfg) {
+ // Apply config defaults
+ this.cfg = this.cfg.extend(cfg);
+
+ // Set initial values
+ this.reset();
+ },
+
+ /**
+ * Resets this hasher to its initial state.
+ *
+ * @example
+ *
+ * hasher.reset();
+ */
+ reset: function () {
+ // Reset data buffer
+ BufferedBlockAlgorithm.reset.call(this);
+
+ // Perform concrete-hasher logic
+ this._doReset();
+ },
+
+ /**
+ * Updates this hasher with a message.
+ *
+ * @param {WordArray|string} messageUpdate The message to append.
+ *
+ * @return {Hasher} This hasher.
+ *
+ * @example
+ *
+ * hasher.update('message');
+ * hasher.update(wordArray);
+ */
+ update: function (messageUpdate) {
+ // Append
+ this._append(messageUpdate);
+
+ // Update the hash
+ this._process();
+
+ // Chainable
+ return this;
+ },
+
+ /**
+ * Finalizes the hash computation.
+ * Note that the finalize operation is effectively a destructive, read-once operation.
+ *
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @example
+ *
+ * var hash = hasher.finalize();
+ * var hash = hasher.finalize('message');
+ * var hash = hasher.finalize(wordArray);
+ */
+ finalize: function (messageUpdate) {
+ // Final message update
+ if (messageUpdate) {
+ this._append(messageUpdate);
+ }
+
+ // Perform concrete-hasher logic
+ var hash = this._doFinalize();
+
+ return hash;
+ },
+
+ blockSize: 512/32,
+
+ /**
+ * Creates a shortcut function to a hasher's object interface.
+ *
+ * @param {Hasher} hasher The hasher to create a helper for.
+ *
+ * @return {Function} The shortcut function.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
+ */
+ _createHelper: function (hasher) {
+ return function (message, cfg) {
+ return new hasher.init(cfg).finalize(message);
+ };
+ },
+
+ /**
+ * Creates a shortcut function to the HMAC's object interface.
+ *
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
+ *
+ * @return {Function} The shortcut function.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
+ */
+ _createHmacHelper: function (hasher) {
+ return function (message, key) {
+ return new C_algo.HMAC.init(hasher, key).finalize(message);
+ };
+ }
+ });
+
+ /**
+ * Algorithm namespace.
+ */
+ var C_algo = C.algo = {};
+
+ return C;
+ }(Math));
+
+
+ return CryptoJS;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/crypto-js.js b/wechat/miniprogram/node_modules/crypto-js/crypto-js.js
new file mode 100644
index 00000000..be5c2ea0
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/crypto-js.js
@@ -0,0 +1,6059 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory();
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define([], factory);
+ }
+ else {
+ // Global (browser)
+ root.CryptoJS = factory();
+ }
+}(this, function () {
+
+ /*globals window, global, require*/
+
+ /**
+ * CryptoJS core components.
+ */
+ var CryptoJS = CryptoJS || (function (Math, undefined) {
+
+ var crypto;
+
+ // Native crypto from window (Browser)
+ if (typeof window !== 'undefined' && window.crypto) {
+ crypto = window.crypto;
+ }
+
+ // Native (experimental IE 11) crypto from window (Browser)
+ if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
+ crypto = window.msCrypto;
+ }
+
+ // Native crypto from global (NodeJS)
+ if (!crypto && typeof global !== 'undefined' && global.crypto) {
+ crypto = global.crypto;
+ }
+
+ // Native crypto import via require (NodeJS)
+ if (!crypto && typeof require === 'function') {
+ try {
+ crypto = require('crypto');
+ } catch (err) {}
+ }
+
+ /*
+ * Cryptographically secure pseudorandom number generator
+ *
+ * As Math.random() is cryptographically not safe to use
+ */
+ var cryptoSecureRandomInt = function () {
+ if (crypto) {
+ // Use getRandomValues method (Browser)
+ if (typeof crypto.getRandomValues === 'function') {
+ try {
+ return crypto.getRandomValues(new Uint32Array(1))[0];
+ } catch (err) {}
+ }
+
+ // Use randomBytes method (NodeJS)
+ if (typeof crypto.randomBytes === 'function') {
+ try {
+ return crypto.randomBytes(4).readInt32LE();
+ } catch (err) {}
+ }
+ }
+
+ throw new Error('Native crypto module could not be used to get secure random number.');
+ };
+
+ /*
+ * Local polyfill of Object.create
+
+ */
+ var create = Object.create || (function () {
+ function F() {}
+
+ return function (obj) {
+ var subtype;
+
+ F.prototype = obj;
+
+ subtype = new F();
+
+ F.prototype = null;
+
+ return subtype;
+ };
+ }())
+
+ /**
+ * CryptoJS namespace.
+ */
+ var C = {};
+
+ /**
+ * Library namespace.
+ */
+ var C_lib = C.lib = {};
+
+ /**
+ * Base object for prototypal inheritance.
+ */
+ var Base = C_lib.Base = (function () {
+
+
+ return {
+ /**
+ * Creates a new object that inherits from this object.
+ *
+ * @param {Object} overrides Properties to copy into the new object.
+ *
+ * @return {Object} The new object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var MyType = CryptoJS.lib.Base.extend({
+ * field: 'value',
+ *
+ * method: function () {
+ * }
+ * });
+ */
+ extend: function (overrides) {
+ // Spawn
+ var subtype = create(this);
+
+ // Augment
+ if (overrides) {
+ subtype.mixIn(overrides);
+ }
+
+ // Create default initializer
+ if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
+ subtype.init = function () {
+ subtype.$super.init.apply(this, arguments);
+ };
+ }
+
+ // Initializer's prototype is the subtype object
+ subtype.init.prototype = subtype;
+
+ // Reference supertype
+ subtype.$super = this;
+
+ return subtype;
+ },
+
+ /**
+ * Extends this object and runs the init method.
+ * Arguments to create() will be passed to init().
+ *
+ * @return {Object} The new object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var instance = MyType.create();
+ */
+ create: function () {
+ var instance = this.extend();
+ instance.init.apply(instance, arguments);
+
+ return instance;
+ },
+
+ /**
+ * Initializes a newly created object.
+ * Override this method to add some logic when your objects are created.
+ *
+ * @example
+ *
+ * var MyType = CryptoJS.lib.Base.extend({
+ * init: function () {
+ * // ...
+ * }
+ * });
+ */
+ init: function () {
+ },
+
+ /**
+ * Copies properties into this object.
+ *
+ * @param {Object} properties The properties to mix in.
+ *
+ * @example
+ *
+ * MyType.mixIn({
+ * field: 'value'
+ * });
+ */
+ mixIn: function (properties) {
+ for (var propertyName in properties) {
+ if (properties.hasOwnProperty(propertyName)) {
+ this[propertyName] = properties[propertyName];
+ }
+ }
+
+ // IE won't copy toString using the loop above
+ if (properties.hasOwnProperty('toString')) {
+ this.toString = properties.toString;
+ }
+ },
+
+ /**
+ * Creates a copy of this object.
+ *
+ * @return {Object} The clone.
+ *
+ * @example
+ *
+ * var clone = instance.clone();
+ */
+ clone: function () {
+ return this.init.prototype.extend(this);
+ }
+ };
+ }());
+
+ /**
+ * An array of 32-bit words.
+ *
+ * @property {Array} words The array of 32-bit words.
+ * @property {number} sigBytes The number of significant bytes in this word array.
+ */
+ var WordArray = C_lib.WordArray = Base.extend({
+ /**
+ * Initializes a newly created word array.
+ *
+ * @param {Array} words (Optional) An array of 32-bit words.
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.lib.WordArray.create();
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
+ */
+ init: function (words, sigBytes) {
+ words = this.words = words || [];
+
+ if (sigBytes != undefined) {
+ this.sigBytes = sigBytes;
+ } else {
+ this.sigBytes = words.length * 4;
+ }
+ },
+
+ /**
+ * Converts this word array to a string.
+ *
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
+ *
+ * @return {string} The stringified word array.
+ *
+ * @example
+ *
+ * var string = wordArray + '';
+ * var string = wordArray.toString();
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
+ */
+ toString: function (encoder) {
+ return (encoder || Hex).stringify(this);
+ },
+
+ /**
+ * Concatenates a word array to this word array.
+ *
+ * @param {WordArray} wordArray The word array to append.
+ *
+ * @return {WordArray} This word array.
+ *
+ * @example
+ *
+ * wordArray1.concat(wordArray2);
+ */
+ concat: function (wordArray) {
+ // Shortcuts
+ var thisWords = this.words;
+ var thatWords = wordArray.words;
+ var thisSigBytes = this.sigBytes;
+ var thatSigBytes = wordArray.sigBytes;
+
+ // Clamp excess bits
+ this.clamp();
+
+ // Concat
+ if (thisSigBytes % 4) {
+ // Copy one byte at a time
+ for (var i = 0; i < thatSigBytes; i++) {
+ var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
+ }
+ } else {
+ // Copy one word at a time
+ for (var i = 0; i < thatSigBytes; i += 4) {
+ thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
+ }
+ }
+ this.sigBytes += thatSigBytes;
+
+ // Chainable
+ return this;
+ },
+
+ /**
+ * Removes insignificant bits.
+ *
+ * @example
+ *
+ * wordArray.clamp();
+ */
+ clamp: function () {
+ // Shortcuts
+ var words = this.words;
+ var sigBytes = this.sigBytes;
+
+ // Clamp
+ words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
+ words.length = Math.ceil(sigBytes / 4);
+ },
+
+ /**
+ * Creates a copy of this word array.
+ *
+ * @return {WordArray} The clone.
+ *
+ * @example
+ *
+ * var clone = wordArray.clone();
+ */
+ clone: function () {
+ var clone = Base.clone.call(this);
+ clone.words = this.words.slice(0);
+
+ return clone;
+ },
+
+ /**
+ * Creates a word array filled with random bytes.
+ *
+ * @param {number} nBytes The number of random bytes to generate.
+ *
+ * @return {WordArray} The random word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
+ */
+ random: function (nBytes) {
+ var words = [];
+
+ for (var i = 0; i < nBytes; i += 4) {
+ words.push(cryptoSecureRandomInt());
+ }
+
+ return new WordArray.init(words, nBytes);
+ }
+ });
+
+ /**
+ * Encoder namespace.
+ */
+ var C_enc = C.enc = {};
+
+ /**
+ * Hex encoding strategy.
+ */
+ var Hex = C_enc.Hex = {
+ /**
+ * Converts a word array to a hex string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The hex string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var hexChars = [];
+ for (var i = 0; i < sigBytes; i++) {
+ var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ hexChars.push((bite >>> 4).toString(16));
+ hexChars.push((bite & 0x0f).toString(16));
+ }
+
+ return hexChars.join('');
+ },
+
+ /**
+ * Converts a hex string to a word array.
+ *
+ * @param {string} hexStr The hex string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
+ */
+ parse: function (hexStr) {
+ // Shortcut
+ var hexStrLength = hexStr.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < hexStrLength; i += 2) {
+ words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
+ }
+
+ return new WordArray.init(words, hexStrLength / 2);
+ }
+ };
+
+ /**
+ * Latin1 encoding strategy.
+ */
+ var Latin1 = C_enc.Latin1 = {
+ /**
+ * Converts a word array to a Latin1 string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The Latin1 string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var latin1Chars = [];
+ for (var i = 0; i < sigBytes; i++) {
+ var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ latin1Chars.push(String.fromCharCode(bite));
+ }
+
+ return latin1Chars.join('');
+ },
+
+ /**
+ * Converts a Latin1 string to a word array.
+ *
+ * @param {string} latin1Str The Latin1 string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
+ */
+ parse: function (latin1Str) {
+ // Shortcut
+ var latin1StrLength = latin1Str.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < latin1StrLength; i++) {
+ words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
+ }
+
+ return new WordArray.init(words, latin1StrLength);
+ }
+ };
+
+ /**
+ * UTF-8 encoding strategy.
+ */
+ var Utf8 = C_enc.Utf8 = {
+ /**
+ * Converts a word array to a UTF-8 string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The UTF-8 string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ try {
+ return decodeURIComponent(escape(Latin1.stringify(wordArray)));
+ } catch (e) {
+ throw new Error('Malformed UTF-8 data');
+ }
+ },
+
+ /**
+ * Converts a UTF-8 string to a word array.
+ *
+ * @param {string} utf8Str The UTF-8 string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
+ */
+ parse: function (utf8Str) {
+ return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
+ }
+ };
+
+ /**
+ * Abstract buffered block algorithm template.
+ *
+ * The property blockSize must be implemented in a concrete subtype.
+ *
+ * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
+ */
+ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
+ /**
+ * Resets this block algorithm's data buffer to its initial state.
+ *
+ * @example
+ *
+ * bufferedBlockAlgorithm.reset();
+ */
+ reset: function () {
+ // Initial values
+ this._data = new WordArray.init();
+ this._nDataBytes = 0;
+ },
+
+ /**
+ * Adds new data to this block algorithm's buffer.
+ *
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
+ *
+ * @example
+ *
+ * bufferedBlockAlgorithm._append('data');
+ * bufferedBlockAlgorithm._append(wordArray);
+ */
+ _append: function (data) {
+ // Convert string to WordArray, else assume WordArray already
+ if (typeof data == 'string') {
+ data = Utf8.parse(data);
+ }
+
+ // Append
+ this._data.concat(data);
+ this._nDataBytes += data.sigBytes;
+ },
+
+ /**
+ * Processes available data blocks.
+ *
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
+ *
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
+ *
+ * @return {WordArray} The processed data.
+ *
+ * @example
+ *
+ * var processedData = bufferedBlockAlgorithm._process();
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
+ */
+ _process: function (doFlush) {
+ var processedWords;
+
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+ var dataSigBytes = data.sigBytes;
+ var blockSize = this.blockSize;
+ var blockSizeBytes = blockSize * 4;
+
+ // Count blocks ready
+ var nBlocksReady = dataSigBytes / blockSizeBytes;
+ if (doFlush) {
+ // Round up to include partial blocks
+ nBlocksReady = Math.ceil(nBlocksReady);
+ } else {
+ // Round down to include only full blocks,
+ // less the number of blocks that must remain in the buffer
+ nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
+ }
+
+ // Count words ready
+ var nWordsReady = nBlocksReady * blockSize;
+
+ // Count bytes ready
+ var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
+
+ // Process blocks
+ if (nWordsReady) {
+ for (var offset = 0; offset < nWordsReady; offset += blockSize) {
+ // Perform concrete-algorithm logic
+ this._doProcessBlock(dataWords, offset);
+ }
+
+ // Remove processed words
+ processedWords = dataWords.splice(0, nWordsReady);
+ data.sigBytes -= nBytesReady;
+ }
+
+ // Return processed words
+ return new WordArray.init(processedWords, nBytesReady);
+ },
+
+ /**
+ * Creates a copy of this object.
+ *
+ * @return {Object} The clone.
+ *
+ * @example
+ *
+ * var clone = bufferedBlockAlgorithm.clone();
+ */
+ clone: function () {
+ var clone = Base.clone.call(this);
+ clone._data = this._data.clone();
+
+ return clone;
+ },
+
+ _minBufferSize: 0
+ });
+
+ /**
+ * Abstract hasher template.
+ *
+ * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
+ */
+ var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
+ /**
+ * Configuration options.
+ */
+ cfg: Base.extend(),
+
+ /**
+ * Initializes a newly created hasher.
+ *
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
+ *
+ * @example
+ *
+ * var hasher = CryptoJS.algo.SHA256.create();
+ */
+ init: function (cfg) {
+ // Apply config defaults
+ this.cfg = this.cfg.extend(cfg);
+
+ // Set initial values
+ this.reset();
+ },
+
+ /**
+ * Resets this hasher to its initial state.
+ *
+ * @example
+ *
+ * hasher.reset();
+ */
+ reset: function () {
+ // Reset data buffer
+ BufferedBlockAlgorithm.reset.call(this);
+
+ // Perform concrete-hasher logic
+ this._doReset();
+ },
+
+ /**
+ * Updates this hasher with a message.
+ *
+ * @param {WordArray|string} messageUpdate The message to append.
+ *
+ * @return {Hasher} This hasher.
+ *
+ * @example
+ *
+ * hasher.update('message');
+ * hasher.update(wordArray);
+ */
+ update: function (messageUpdate) {
+ // Append
+ this._append(messageUpdate);
+
+ // Update the hash
+ this._process();
+
+ // Chainable
+ return this;
+ },
+
+ /**
+ * Finalizes the hash computation.
+ * Note that the finalize operation is effectively a destructive, read-once operation.
+ *
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @example
+ *
+ * var hash = hasher.finalize();
+ * var hash = hasher.finalize('message');
+ * var hash = hasher.finalize(wordArray);
+ */
+ finalize: function (messageUpdate) {
+ // Final message update
+ if (messageUpdate) {
+ this._append(messageUpdate);
+ }
+
+ // Perform concrete-hasher logic
+ var hash = this._doFinalize();
+
+ return hash;
+ },
+
+ blockSize: 512/32,
+
+ /**
+ * Creates a shortcut function to a hasher's object interface.
+ *
+ * @param {Hasher} hasher The hasher to create a helper for.
+ *
+ * @return {Function} The shortcut function.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
+ */
+ _createHelper: function (hasher) {
+ return function (message, cfg) {
+ return new hasher.init(cfg).finalize(message);
+ };
+ },
+
+ /**
+ * Creates a shortcut function to the HMAC's object interface.
+ *
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
+ *
+ * @return {Function} The shortcut function.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
+ */
+ _createHmacHelper: function (hasher) {
+ return function (message, key) {
+ return new C_algo.HMAC.init(hasher, key).finalize(message);
+ };
+ }
+ });
+
+ /**
+ * Algorithm namespace.
+ */
+ var C_algo = C.algo = {};
+
+ return C;
+ }(Math));
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var C_enc = C.enc;
+
+ /**
+ * Base64 encoding strategy.
+ */
+ var Base64 = C_enc.Base64 = {
+ /**
+ * Converts a word array to a Base64 string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The Base64 string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+ var map = this._map;
+
+ // Clamp excess bits
+ wordArray.clamp();
+
+ // Convert
+ var base64Chars = [];
+ for (var i = 0; i < sigBytes; i += 3) {
+ var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
+ var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
+
+ var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
+
+ for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
+ base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
+ }
+ }
+
+ // Add padding
+ var paddingChar = map.charAt(64);
+ if (paddingChar) {
+ while (base64Chars.length % 4) {
+ base64Chars.push(paddingChar);
+ }
+ }
+
+ return base64Chars.join('');
+ },
+
+ /**
+ * Converts a Base64 string to a word array.
+ *
+ * @param {string} base64Str The Base64 string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Base64.parse(base64String);
+ */
+ parse: function (base64Str) {
+ // Shortcuts
+ var base64StrLength = base64Str.length;
+ var map = this._map;
+ var reverseMap = this._reverseMap;
+
+ if (!reverseMap) {
+ reverseMap = this._reverseMap = [];
+ for (var j = 0; j < map.length; j++) {
+ reverseMap[map.charCodeAt(j)] = j;
+ }
+ }
+
+ // Ignore padding
+ var paddingChar = map.charAt(64);
+ if (paddingChar) {
+ var paddingIndex = base64Str.indexOf(paddingChar);
+ if (paddingIndex !== -1) {
+ base64StrLength = paddingIndex;
+ }
+ }
+
+ // Convert
+ return parseLoop(base64Str, base64StrLength, reverseMap);
+
+ },
+
+ _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
+ };
+
+ function parseLoop(base64Str, base64StrLength, reverseMap) {
+ var words = [];
+ var nBytes = 0;
+ for (var i = 0; i < base64StrLength; i++) {
+ if (i % 4) {
+ var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
+ var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
+ var bitsCombined = bits1 | bits2;
+ words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
+ nBytes++;
+ }
+ }
+ return WordArray.create(words, nBytes);
+ }
+ }());
+
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Constants table
+ var T = [];
+
+ // Compute constants
+ (function () {
+ for (var i = 0; i < 64; i++) {
+ T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
+ }
+ }());
+
+ /**
+ * MD5 hash algorithm.
+ */
+ var MD5 = C_algo.MD5 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init([
+ 0x67452301, 0xefcdab89,
+ 0x98badcfe, 0x10325476
+ ]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Swap endian
+ for (var i = 0; i < 16; i++) {
+ // Shortcuts
+ var offset_i = offset + i;
+ var M_offset_i = M[offset_i];
+
+ M[offset_i] = (
+ (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
+ (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
+ );
+ }
+
+ // Shortcuts
+ var H = this._hash.words;
+
+ var M_offset_0 = M[offset + 0];
+ var M_offset_1 = M[offset + 1];
+ var M_offset_2 = M[offset + 2];
+ var M_offset_3 = M[offset + 3];
+ var M_offset_4 = M[offset + 4];
+ var M_offset_5 = M[offset + 5];
+ var M_offset_6 = M[offset + 6];
+ var M_offset_7 = M[offset + 7];
+ var M_offset_8 = M[offset + 8];
+ var M_offset_9 = M[offset + 9];
+ var M_offset_10 = M[offset + 10];
+ var M_offset_11 = M[offset + 11];
+ var M_offset_12 = M[offset + 12];
+ var M_offset_13 = M[offset + 13];
+ var M_offset_14 = M[offset + 14];
+ var M_offset_15 = M[offset + 15];
+
+ // Working varialbes
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+
+ // Computation
+ a = FF(a, b, c, d, M_offset_0, 7, T[0]);
+ d = FF(d, a, b, c, M_offset_1, 12, T[1]);
+ c = FF(c, d, a, b, M_offset_2, 17, T[2]);
+ b = FF(b, c, d, a, M_offset_3, 22, T[3]);
+ a = FF(a, b, c, d, M_offset_4, 7, T[4]);
+ d = FF(d, a, b, c, M_offset_5, 12, T[5]);
+ c = FF(c, d, a, b, M_offset_6, 17, T[6]);
+ b = FF(b, c, d, a, M_offset_7, 22, T[7]);
+ a = FF(a, b, c, d, M_offset_8, 7, T[8]);
+ d = FF(d, a, b, c, M_offset_9, 12, T[9]);
+ c = FF(c, d, a, b, M_offset_10, 17, T[10]);
+ b = FF(b, c, d, a, M_offset_11, 22, T[11]);
+ a = FF(a, b, c, d, M_offset_12, 7, T[12]);
+ d = FF(d, a, b, c, M_offset_13, 12, T[13]);
+ c = FF(c, d, a, b, M_offset_14, 17, T[14]);
+ b = FF(b, c, d, a, M_offset_15, 22, T[15]);
+
+ a = GG(a, b, c, d, M_offset_1, 5, T[16]);
+ d = GG(d, a, b, c, M_offset_6, 9, T[17]);
+ c = GG(c, d, a, b, M_offset_11, 14, T[18]);
+ b = GG(b, c, d, a, M_offset_0, 20, T[19]);
+ a = GG(a, b, c, d, M_offset_5, 5, T[20]);
+ d = GG(d, a, b, c, M_offset_10, 9, T[21]);
+ c = GG(c, d, a, b, M_offset_15, 14, T[22]);
+ b = GG(b, c, d, a, M_offset_4, 20, T[23]);
+ a = GG(a, b, c, d, M_offset_9, 5, T[24]);
+ d = GG(d, a, b, c, M_offset_14, 9, T[25]);
+ c = GG(c, d, a, b, M_offset_3, 14, T[26]);
+ b = GG(b, c, d, a, M_offset_8, 20, T[27]);
+ a = GG(a, b, c, d, M_offset_13, 5, T[28]);
+ d = GG(d, a, b, c, M_offset_2, 9, T[29]);
+ c = GG(c, d, a, b, M_offset_7, 14, T[30]);
+ b = GG(b, c, d, a, M_offset_12, 20, T[31]);
+
+ a = HH(a, b, c, d, M_offset_5, 4, T[32]);
+ d = HH(d, a, b, c, M_offset_8, 11, T[33]);
+ c = HH(c, d, a, b, M_offset_11, 16, T[34]);
+ b = HH(b, c, d, a, M_offset_14, 23, T[35]);
+ a = HH(a, b, c, d, M_offset_1, 4, T[36]);
+ d = HH(d, a, b, c, M_offset_4, 11, T[37]);
+ c = HH(c, d, a, b, M_offset_7, 16, T[38]);
+ b = HH(b, c, d, a, M_offset_10, 23, T[39]);
+ a = HH(a, b, c, d, M_offset_13, 4, T[40]);
+ d = HH(d, a, b, c, M_offset_0, 11, T[41]);
+ c = HH(c, d, a, b, M_offset_3, 16, T[42]);
+ b = HH(b, c, d, a, M_offset_6, 23, T[43]);
+ a = HH(a, b, c, d, M_offset_9, 4, T[44]);
+ d = HH(d, a, b, c, M_offset_12, 11, T[45]);
+ c = HH(c, d, a, b, M_offset_15, 16, T[46]);
+ b = HH(b, c, d, a, M_offset_2, 23, T[47]);
+
+ a = II(a, b, c, d, M_offset_0, 6, T[48]);
+ d = II(d, a, b, c, M_offset_7, 10, T[49]);
+ c = II(c, d, a, b, M_offset_14, 15, T[50]);
+ b = II(b, c, d, a, M_offset_5, 21, T[51]);
+ a = II(a, b, c, d, M_offset_12, 6, T[52]);
+ d = II(d, a, b, c, M_offset_3, 10, T[53]);
+ c = II(c, d, a, b, M_offset_10, 15, T[54]);
+ b = II(b, c, d, a, M_offset_1, 21, T[55]);
+ a = II(a, b, c, d, M_offset_8, 6, T[56]);
+ d = II(d, a, b, c, M_offset_15, 10, T[57]);
+ c = II(c, d, a, b, M_offset_6, 15, T[58]);
+ b = II(b, c, d, a, M_offset_13, 21, T[59]);
+ a = II(a, b, c, d, M_offset_4, 6, T[60]);
+ d = II(d, a, b, c, M_offset_11, 10, T[61]);
+ c = II(c, d, a, b, M_offset_2, 15, T[62]);
+ b = II(b, c, d, a, M_offset_9, 21, T[63]);
+
+ // Intermediate hash value
+ H[0] = (H[0] + a) | 0;
+ H[1] = (H[1] + b) | 0;
+ H[2] = (H[2] + c) | 0;
+ H[3] = (H[3] + d) | 0;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+
+ var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
+ var nBitsTotalL = nBitsTotal;
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
+ (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
+ );
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
+ (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
+ );
+
+ data.sigBytes = (dataWords.length + 1) * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Shortcuts
+ var hash = this._hash;
+ var H = hash.words;
+
+ // Swap endian
+ for (var i = 0; i < 4; i++) {
+ // Shortcut
+ var H_i = H[i];
+
+ H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
+ (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
+ }
+
+ // Return final computed hash
+ return hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+ function FF(a, b, c, d, x, s, t) {
+ var n = a + ((b & c) | (~b & d)) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ function GG(a, b, c, d, x, s, t) {
+ var n = a + ((b & d) | (c & ~d)) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ function HH(a, b, c, d, x, s, t) {
+ var n = a + (b ^ c ^ d) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ function II(a, b, c, d, x, s, t) {
+ var n = a + (c ^ (b | ~d)) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.MD5('message');
+ * var hash = CryptoJS.MD5(wordArray);
+ */
+ C.MD5 = Hasher._createHelper(MD5);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacMD5(message, key);
+ */
+ C.HmacMD5 = Hasher._createHmacHelper(MD5);
+ }(Math));
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Reusable object
+ var W = [];
+
+ /**
+ * SHA-1 hash algorithm.
+ */
+ var SHA1 = C_algo.SHA1 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init([
+ 0x67452301, 0xefcdab89,
+ 0x98badcfe, 0x10325476,
+ 0xc3d2e1f0
+ ]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var H = this._hash.words;
+
+ // Working variables
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+
+ // Computation
+ for (var i = 0; i < 80; i++) {
+ if (i < 16) {
+ W[i] = M[offset + i] | 0;
+ } else {
+ var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
+ W[i] = (n << 1) | (n >>> 31);
+ }
+
+ var t = ((a << 5) | (a >>> 27)) + e + W[i];
+ if (i < 20) {
+ t += ((b & c) | (~b & d)) + 0x5a827999;
+ } else if (i < 40) {
+ t += (b ^ c ^ d) + 0x6ed9eba1;
+ } else if (i < 60) {
+ t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;
+ } else /* if (i < 80) */ {
+ t += (b ^ c ^ d) - 0x359d3e2a;
+ }
+
+ e = d;
+ d = c;
+ c = (b << 30) | (b >>> 2);
+ b = a;
+ a = t;
+ }
+
+ // Intermediate hash value
+ H[0] = (H[0] + a) | 0;
+ H[1] = (H[1] + b) | 0;
+ H[2] = (H[2] + c) | 0;
+ H[3] = (H[3] + d) | 0;
+ H[4] = (H[4] + e) | 0;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Return final computed hash
+ return this._hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA1('message');
+ * var hash = CryptoJS.SHA1(wordArray);
+ */
+ C.SHA1 = Hasher._createHelper(SHA1);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA1(message, key);
+ */
+ C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
+ }());
+
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Initialization and round constants tables
+ var H = [];
+ var K = [];
+
+ // Compute constants
+ (function () {
+ function isPrime(n) {
+ var sqrtN = Math.sqrt(n);
+ for (var factor = 2; factor <= sqrtN; factor++) {
+ if (!(n % factor)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function getFractionalBits(n) {
+ return ((n - (n | 0)) * 0x100000000) | 0;
+ }
+
+ var n = 2;
+ var nPrime = 0;
+ while (nPrime < 64) {
+ if (isPrime(n)) {
+ if (nPrime < 8) {
+ H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
+ }
+ K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
+
+ nPrime++;
+ }
+
+ n++;
+ }
+ }());
+
+ // Reusable object
+ var W = [];
+
+ /**
+ * SHA-256 hash algorithm.
+ */
+ var SHA256 = C_algo.SHA256 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init(H.slice(0));
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var H = this._hash.words;
+
+ // Working variables
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+ var f = H[5];
+ var g = H[6];
+ var h = H[7];
+
+ // Computation
+ for (var i = 0; i < 64; i++) {
+ if (i < 16) {
+ W[i] = M[offset + i] | 0;
+ } else {
+ var gamma0x = W[i - 15];
+ var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
+ ((gamma0x << 14) | (gamma0x >>> 18)) ^
+ (gamma0x >>> 3);
+
+ var gamma1x = W[i - 2];
+ var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
+ ((gamma1x << 13) | (gamma1x >>> 19)) ^
+ (gamma1x >>> 10);
+
+ W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
+ }
+
+ var ch = (e & f) ^ (~e & g);
+ var maj = (a & b) ^ (a & c) ^ (b & c);
+
+ var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));
+ var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));
+
+ var t1 = h + sigma1 + ch + K[i] + W[i];
+ var t2 = sigma0 + maj;
+
+ h = g;
+ g = f;
+ f = e;
+ e = (d + t1) | 0;
+ d = c;
+ c = b;
+ b = a;
+ a = (t1 + t2) | 0;
+ }
+
+ // Intermediate hash value
+ H[0] = (H[0] + a) | 0;
+ H[1] = (H[1] + b) | 0;
+ H[2] = (H[2] + c) | 0;
+ H[3] = (H[3] + d) | 0;
+ H[4] = (H[4] + e) | 0;
+ H[5] = (H[5] + f) | 0;
+ H[6] = (H[6] + g) | 0;
+ H[7] = (H[7] + h) | 0;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Return final computed hash
+ return this._hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA256('message');
+ * var hash = CryptoJS.SHA256(wordArray);
+ */
+ C.SHA256 = Hasher._createHelper(SHA256);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA256(message, key);
+ */
+ C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
+ }(Math));
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var C_enc = C.enc;
+
+ /**
+ * UTF-16 BE encoding strategy.
+ */
+ var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
+ /**
+ * Converts a word array to a UTF-16 BE string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The UTF-16 BE string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var utf16Chars = [];
+ for (var i = 0; i < sigBytes; i += 2) {
+ var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;
+ utf16Chars.push(String.fromCharCode(codePoint));
+ }
+
+ return utf16Chars.join('');
+ },
+
+ /**
+ * Converts a UTF-16 BE string to a word array.
+ *
+ * @param {string} utf16Str The UTF-16 BE string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
+ */
+ parse: function (utf16Str) {
+ // Shortcut
+ var utf16StrLength = utf16Str.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < utf16StrLength; i++) {
+ words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
+ }
+
+ return WordArray.create(words, utf16StrLength * 2);
+ }
+ };
+
+ /**
+ * UTF-16 LE encoding strategy.
+ */
+ C_enc.Utf16LE = {
+ /**
+ * Converts a word array to a UTF-16 LE string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The UTF-16 LE string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var utf16Chars = [];
+ for (var i = 0; i < sigBytes; i += 2) {
+ var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);
+ utf16Chars.push(String.fromCharCode(codePoint));
+ }
+
+ return utf16Chars.join('');
+ },
+
+ /**
+ * Converts a UTF-16 LE string to a word array.
+ *
+ * @param {string} utf16Str The UTF-16 LE string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
+ */
+ parse: function (utf16Str) {
+ // Shortcut
+ var utf16StrLength = utf16Str.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < utf16StrLength; i++) {
+ words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));
+ }
+
+ return WordArray.create(words, utf16StrLength * 2);
+ }
+ };
+
+ function swapEndian(word) {
+ return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);
+ }
+ }());
+
+
+ (function () {
+ // Check if typed arrays are supported
+ if (typeof ArrayBuffer != 'function') {
+ return;
+ }
+
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+
+ // Reference original init
+ var superInit = WordArray.init;
+
+ // Augment WordArray.init to handle typed arrays
+ var subInit = WordArray.init = function (typedArray) {
+ // Convert buffers to uint8
+ if (typedArray instanceof ArrayBuffer) {
+ typedArray = new Uint8Array(typedArray);
+ }
+
+ // Convert other array views to uint8
+ if (
+ typedArray instanceof Int8Array ||
+ (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) ||
+ typedArray instanceof Int16Array ||
+ typedArray instanceof Uint16Array ||
+ typedArray instanceof Int32Array ||
+ typedArray instanceof Uint32Array ||
+ typedArray instanceof Float32Array ||
+ typedArray instanceof Float64Array
+ ) {
+ typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
+ }
+
+ // Handle Uint8Array
+ if (typedArray instanceof Uint8Array) {
+ // Shortcut
+ var typedArrayByteLength = typedArray.byteLength;
+
+ // Extract bytes
+ var words = [];
+ for (var i = 0; i < typedArrayByteLength; i++) {
+ words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);
+ }
+
+ // Initialize this word array
+ superInit.call(this, words, typedArrayByteLength);
+ } else {
+ // Else call normal init
+ superInit.apply(this, arguments);
+ }
+ };
+
+ subInit.prototype = WordArray;
+ }());
+
+
+ /** @preserve
+ (c) 2012 by Cédric Mesnil. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Constants table
+ var _zl = WordArray.create([
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
+ 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
+ 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
+ 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);
+ var _zr = WordArray.create([
+ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
+ 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
+ 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
+ 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
+ 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);
+ var _sl = WordArray.create([
+ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
+ 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
+ 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
+ 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
+ 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);
+ var _sr = WordArray.create([
+ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
+ 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
+ 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
+ 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
+ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);
+
+ var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
+ var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
+
+ /**
+ * RIPEMD160 hash algorithm.
+ */
+ var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
+ _doReset: function () {
+ this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+
+ // Swap endian
+ for (var i = 0; i < 16; i++) {
+ // Shortcuts
+ var offset_i = offset + i;
+ var M_offset_i = M[offset_i];
+
+ // Swap
+ M[offset_i] = (
+ (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
+ (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
+ );
+ }
+ // Shortcut
+ var H = this._hash.words;
+ var hl = _hl.words;
+ var hr = _hr.words;
+ var zl = _zl.words;
+ var zr = _zr.words;
+ var sl = _sl.words;
+ var sr = _sr.words;
+
+ // Working variables
+ var al, bl, cl, dl, el;
+ var ar, br, cr, dr, er;
+
+ ar = al = H[0];
+ br = bl = H[1];
+ cr = cl = H[2];
+ dr = dl = H[3];
+ er = el = H[4];
+ // Computation
+ var t;
+ for (var i = 0; i < 80; i += 1) {
+ t = (al + M[offset+zl[i]])|0;
+ if (i<16){
+ t += f1(bl,cl,dl) + hl[0];
+ } else if (i<32) {
+ t += f2(bl,cl,dl) + hl[1];
+ } else if (i<48) {
+ t += f3(bl,cl,dl) + hl[2];
+ } else if (i<64) {
+ t += f4(bl,cl,dl) + hl[3];
+ } else {// if (i<80) {
+ t += f5(bl,cl,dl) + hl[4];
+ }
+ t = t|0;
+ t = rotl(t,sl[i]);
+ t = (t+el)|0;
+ al = el;
+ el = dl;
+ dl = rotl(cl, 10);
+ cl = bl;
+ bl = t;
+
+ t = (ar + M[offset+zr[i]])|0;
+ if (i<16){
+ t += f5(br,cr,dr) + hr[0];
+ } else if (i<32) {
+ t += f4(br,cr,dr) + hr[1];
+ } else if (i<48) {
+ t += f3(br,cr,dr) + hr[2];
+ } else if (i<64) {
+ t += f2(br,cr,dr) + hr[3];
+ } else {// if (i<80) {
+ t += f1(br,cr,dr) + hr[4];
+ }
+ t = t|0;
+ t = rotl(t,sr[i]) ;
+ t = (t+er)|0;
+ ar = er;
+ er = dr;
+ dr = rotl(cr, 10);
+ cr = br;
+ br = t;
+ }
+ // Intermediate hash value
+ t = (H[1] + cl + dr)|0;
+ H[1] = (H[2] + dl + er)|0;
+ H[2] = (H[3] + el + ar)|0;
+ H[3] = (H[4] + al + br)|0;
+ H[4] = (H[0] + bl + cr)|0;
+ H[0] = t;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
+ (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
+ );
+ data.sigBytes = (dataWords.length + 1) * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Shortcuts
+ var hash = this._hash;
+ var H = hash.words;
+
+ // Swap endian
+ for (var i = 0; i < 5; i++) {
+ // Shortcut
+ var H_i = H[i];
+
+ // Swap
+ H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
+ (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
+ }
+
+ // Return final computed hash
+ return hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+
+ function f1(x, y, z) {
+ return ((x) ^ (y) ^ (z));
+
+ }
+
+ function f2(x, y, z) {
+ return (((x)&(y)) | ((~x)&(z)));
+ }
+
+ function f3(x, y, z) {
+ return (((x) | (~(y))) ^ (z));
+ }
+
+ function f4(x, y, z) {
+ return (((x) & (z)) | ((y)&(~(z))));
+ }
+
+ function f5(x, y, z) {
+ return ((x) ^ ((y) |(~(z))));
+
+ }
+
+ function rotl(x,n) {
+ return (x<>>(32-n));
+ }
+
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.RIPEMD160('message');
+ * var hash = CryptoJS.RIPEMD160(wordArray);
+ */
+ C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacRIPEMD160(message, key);
+ */
+ C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
+ }(Math));
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var C_enc = C.enc;
+ var Utf8 = C_enc.Utf8;
+ var C_algo = C.algo;
+
+ /**
+ * HMAC algorithm.
+ */
+ var HMAC = C_algo.HMAC = Base.extend({
+ /**
+ * Initializes a newly created HMAC.
+ *
+ * @param {Hasher} hasher The hash algorithm to use.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @example
+ *
+ * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
+ */
+ init: function (hasher, key) {
+ // Init hasher
+ hasher = this._hasher = new hasher.init();
+
+ // Convert string to WordArray, else assume WordArray already
+ if (typeof key == 'string') {
+ key = Utf8.parse(key);
+ }
+
+ // Shortcuts
+ var hasherBlockSize = hasher.blockSize;
+ var hasherBlockSizeBytes = hasherBlockSize * 4;
+
+ // Allow arbitrary length keys
+ if (key.sigBytes > hasherBlockSizeBytes) {
+ key = hasher.finalize(key);
+ }
+
+ // Clamp excess bits
+ key.clamp();
+
+ // Clone key for inner and outer pads
+ var oKey = this._oKey = key.clone();
+ var iKey = this._iKey = key.clone();
+
+ // Shortcuts
+ var oKeyWords = oKey.words;
+ var iKeyWords = iKey.words;
+
+ // XOR keys with pad constants
+ for (var i = 0; i < hasherBlockSize; i++) {
+ oKeyWords[i] ^= 0x5c5c5c5c;
+ iKeyWords[i] ^= 0x36363636;
+ }
+ oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
+
+ // Set initial values
+ this.reset();
+ },
+
+ /**
+ * Resets this HMAC to its initial state.
+ *
+ * @example
+ *
+ * hmacHasher.reset();
+ */
+ reset: function () {
+ // Shortcut
+ var hasher = this._hasher;
+
+ // Reset
+ hasher.reset();
+ hasher.update(this._iKey);
+ },
+
+ /**
+ * Updates this HMAC with a message.
+ *
+ * @param {WordArray|string} messageUpdate The message to append.
+ *
+ * @return {HMAC} This HMAC instance.
+ *
+ * @example
+ *
+ * hmacHasher.update('message');
+ * hmacHasher.update(wordArray);
+ */
+ update: function (messageUpdate) {
+ this._hasher.update(messageUpdate);
+
+ // Chainable
+ return this;
+ },
+
+ /**
+ * Finalizes the HMAC computation.
+ * Note that the finalize operation is effectively a destructive, read-once operation.
+ *
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @example
+ *
+ * var hmac = hmacHasher.finalize();
+ * var hmac = hmacHasher.finalize('message');
+ * var hmac = hmacHasher.finalize(wordArray);
+ */
+ finalize: function (messageUpdate) {
+ // Shortcut
+ var hasher = this._hasher;
+
+ // Compute HMAC
+ var innerHash = hasher.finalize(messageUpdate);
+ hasher.reset();
+ var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
+
+ return hmac;
+ }
+ });
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var WordArray = C_lib.WordArray;
+ var C_algo = C.algo;
+ var SHA1 = C_algo.SHA1;
+ var HMAC = C_algo.HMAC;
+
+ /**
+ * Password-Based Key Derivation Function 2 algorithm.
+ */
+ var PBKDF2 = C_algo.PBKDF2 = Base.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
+ * @property {Hasher} hasher The hasher to use. Default: SHA1
+ * @property {number} iterations The number of iterations to perform. Default: 1
+ */
+ cfg: Base.extend({
+ keySize: 128/32,
+ hasher: SHA1,
+ iterations: 1
+ }),
+
+ /**
+ * Initializes a newly created key derivation function.
+ *
+ * @param {Object} cfg (Optional) The configuration options to use for the derivation.
+ *
+ * @example
+ *
+ * var kdf = CryptoJS.algo.PBKDF2.create();
+ * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
+ * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
+ */
+ init: function (cfg) {
+ this.cfg = this.cfg.extend(cfg);
+ },
+
+ /**
+ * Computes the Password-Based Key Derivation Function 2.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @example
+ *
+ * var key = kdf.compute(password, salt);
+ */
+ compute: function (password, salt) {
+ // Shortcut
+ var cfg = this.cfg;
+
+ // Init HMAC
+ var hmac = HMAC.create(cfg.hasher, password);
+
+ // Initial values
+ var derivedKey = WordArray.create();
+ var blockIndex = WordArray.create([0x00000001]);
+
+ // Shortcuts
+ var derivedKeyWords = derivedKey.words;
+ var blockIndexWords = blockIndex.words;
+ var keySize = cfg.keySize;
+ var iterations = cfg.iterations;
+
+ // Generate key
+ while (derivedKeyWords.length < keySize) {
+ var block = hmac.update(salt).finalize(blockIndex);
+ hmac.reset();
+
+ // Shortcuts
+ var blockWords = block.words;
+ var blockWordsLength = blockWords.length;
+
+ // Iterations
+ var intermediate = block;
+ for (var i = 1; i < iterations; i++) {
+ intermediate = hmac.finalize(intermediate);
+ hmac.reset();
+
+ // Shortcut
+ var intermediateWords = intermediate.words;
+
+ // XOR intermediate with block
+ for (var j = 0; j < blockWordsLength; j++) {
+ blockWords[j] ^= intermediateWords[j];
+ }
+ }
+
+ derivedKey.concat(block);
+ blockIndexWords[0]++;
+ }
+ derivedKey.sigBytes = keySize * 4;
+
+ return derivedKey;
+ }
+ });
+
+ /**
+ * Computes the Password-Based Key Derivation Function 2.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ * @param {Object} cfg (Optional) The configuration options to use for this computation.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var key = CryptoJS.PBKDF2(password, salt);
+ * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
+ * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
+ */
+ C.PBKDF2 = function (password, salt, cfg) {
+ return PBKDF2.create(cfg).compute(password, salt);
+ };
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var WordArray = C_lib.WordArray;
+ var C_algo = C.algo;
+ var MD5 = C_algo.MD5;
+
+ /**
+ * This key derivation function is meant to conform with EVP_BytesToKey.
+ * www.openssl.org/docs/crypto/EVP_BytesToKey.html
+ */
+ var EvpKDF = C_algo.EvpKDF = Base.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
+ * @property {Hasher} hasher The hash algorithm to use. Default: MD5
+ * @property {number} iterations The number of iterations to perform. Default: 1
+ */
+ cfg: Base.extend({
+ keySize: 128/32,
+ hasher: MD5,
+ iterations: 1
+ }),
+
+ /**
+ * Initializes a newly created key derivation function.
+ *
+ * @param {Object} cfg (Optional) The configuration options to use for the derivation.
+ *
+ * @example
+ *
+ * var kdf = CryptoJS.algo.EvpKDF.create();
+ * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
+ * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
+ */
+ init: function (cfg) {
+ this.cfg = this.cfg.extend(cfg);
+ },
+
+ /**
+ * Derives a key from a password.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @example
+ *
+ * var key = kdf.compute(password, salt);
+ */
+ compute: function (password, salt) {
+ var block;
+
+ // Shortcut
+ var cfg = this.cfg;
+
+ // Init hasher
+ var hasher = cfg.hasher.create();
+
+ // Initial values
+ var derivedKey = WordArray.create();
+
+ // Shortcuts
+ var derivedKeyWords = derivedKey.words;
+ var keySize = cfg.keySize;
+ var iterations = cfg.iterations;
+
+ // Generate key
+ while (derivedKeyWords.length < keySize) {
+ if (block) {
+ hasher.update(block);
+ }
+ block = hasher.update(password).finalize(salt);
+ hasher.reset();
+
+ // Iterations
+ for (var i = 1; i < iterations; i++) {
+ block = hasher.finalize(block);
+ hasher.reset();
+ }
+
+ derivedKey.concat(block);
+ }
+ derivedKey.sigBytes = keySize * 4;
+
+ return derivedKey;
+ }
+ });
+
+ /**
+ * Derives a key from a password.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ * @param {Object} cfg (Optional) The configuration options to use for this computation.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var key = CryptoJS.EvpKDF(password, salt);
+ * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
+ * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
+ */
+ C.EvpKDF = function (password, salt, cfg) {
+ return EvpKDF.create(cfg).compute(password, salt);
+ };
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var C_algo = C.algo;
+ var SHA256 = C_algo.SHA256;
+
+ /**
+ * SHA-224 hash algorithm.
+ */
+ var SHA224 = C_algo.SHA224 = SHA256.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init([
+ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
+ 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
+ ]);
+ },
+
+ _doFinalize: function () {
+ var hash = SHA256._doFinalize.call(this);
+
+ hash.sigBytes -= 4;
+
+ return hash;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA224('message');
+ * var hash = CryptoJS.SHA224(wordArray);
+ */
+ C.SHA224 = SHA256._createHelper(SHA224);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA224(message, key);
+ */
+ C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
+ }());
+
+
+ (function (undefined) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var X32WordArray = C_lib.WordArray;
+
+ /**
+ * x64 namespace.
+ */
+ var C_x64 = C.x64 = {};
+
+ /**
+ * A 64-bit word.
+ */
+ var X64Word = C_x64.Word = Base.extend({
+ /**
+ * Initializes a newly created 64-bit word.
+ *
+ * @param {number} high The high 32 bits.
+ * @param {number} low The low 32 bits.
+ *
+ * @example
+ *
+ * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
+ */
+ init: function (high, low) {
+ this.high = high;
+ this.low = low;
+ }
+
+ /**
+ * Bitwise NOTs this word.
+ *
+ * @return {X64Word} A new x64-Word object after negating.
+ *
+ * @example
+ *
+ * var negated = x64Word.not();
+ */
+ // not: function () {
+ // var high = ~this.high;
+ // var low = ~this.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Bitwise ANDs this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to AND with this word.
+ *
+ * @return {X64Word} A new x64-Word object after ANDing.
+ *
+ * @example
+ *
+ * var anded = x64Word.and(anotherX64Word);
+ */
+ // and: function (word) {
+ // var high = this.high & word.high;
+ // var low = this.low & word.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Bitwise ORs this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to OR with this word.
+ *
+ * @return {X64Word} A new x64-Word object after ORing.
+ *
+ * @example
+ *
+ * var ored = x64Word.or(anotherX64Word);
+ */
+ // or: function (word) {
+ // var high = this.high | word.high;
+ // var low = this.low | word.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Bitwise XORs this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to XOR with this word.
+ *
+ * @return {X64Word} A new x64-Word object after XORing.
+ *
+ * @example
+ *
+ * var xored = x64Word.xor(anotherX64Word);
+ */
+ // xor: function (word) {
+ // var high = this.high ^ word.high;
+ // var low = this.low ^ word.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Shifts this word n bits to the left.
+ *
+ * @param {number} n The number of bits to shift.
+ *
+ * @return {X64Word} A new x64-Word object after shifting.
+ *
+ * @example
+ *
+ * var shifted = x64Word.shiftL(25);
+ */
+ // shiftL: function (n) {
+ // if (n < 32) {
+ // var high = (this.high << n) | (this.low >>> (32 - n));
+ // var low = this.low << n;
+ // } else {
+ // var high = this.low << (n - 32);
+ // var low = 0;
+ // }
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Shifts this word n bits to the right.
+ *
+ * @param {number} n The number of bits to shift.
+ *
+ * @return {X64Word} A new x64-Word object after shifting.
+ *
+ * @example
+ *
+ * var shifted = x64Word.shiftR(7);
+ */
+ // shiftR: function (n) {
+ // if (n < 32) {
+ // var low = (this.low >>> n) | (this.high << (32 - n));
+ // var high = this.high >>> n;
+ // } else {
+ // var low = this.high >>> (n - 32);
+ // var high = 0;
+ // }
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Rotates this word n bits to the left.
+ *
+ * @param {number} n The number of bits to rotate.
+ *
+ * @return {X64Word} A new x64-Word object after rotating.
+ *
+ * @example
+ *
+ * var rotated = x64Word.rotL(25);
+ */
+ // rotL: function (n) {
+ // return this.shiftL(n).or(this.shiftR(64 - n));
+ // },
+
+ /**
+ * Rotates this word n bits to the right.
+ *
+ * @param {number} n The number of bits to rotate.
+ *
+ * @return {X64Word} A new x64-Word object after rotating.
+ *
+ * @example
+ *
+ * var rotated = x64Word.rotR(7);
+ */
+ // rotR: function (n) {
+ // return this.shiftR(n).or(this.shiftL(64 - n));
+ // },
+
+ /**
+ * Adds this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to add with this word.
+ *
+ * @return {X64Word} A new x64-Word object after adding.
+ *
+ * @example
+ *
+ * var added = x64Word.add(anotherX64Word);
+ */
+ // add: function (word) {
+ // var low = (this.low + word.low) | 0;
+ // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
+ // var high = (this.high + word.high + carry) | 0;
+
+ // return X64Word.create(high, low);
+ // }
+ });
+
+ /**
+ * An array of 64-bit words.
+ *
+ * @property {Array} words The array of CryptoJS.x64.Word objects.
+ * @property {number} sigBytes The number of significant bytes in this word array.
+ */
+ var X64WordArray = C_x64.WordArray = Base.extend({
+ /**
+ * Initializes a newly created word array.
+ *
+ * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.x64.WordArray.create();
+ *
+ * var wordArray = CryptoJS.x64.WordArray.create([
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
+ * ]);
+ *
+ * var wordArray = CryptoJS.x64.WordArray.create([
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
+ * ], 10);
+ */
+ init: function (words, sigBytes) {
+ words = this.words = words || [];
+
+ if (sigBytes != undefined) {
+ this.sigBytes = sigBytes;
+ } else {
+ this.sigBytes = words.length * 8;
+ }
+ },
+
+ /**
+ * Converts this 64-bit word array to a 32-bit word array.
+ *
+ * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
+ *
+ * @example
+ *
+ * var x32WordArray = x64WordArray.toX32();
+ */
+ toX32: function () {
+ // Shortcuts
+ var x64Words = this.words;
+ var x64WordsLength = x64Words.length;
+
+ // Convert
+ var x32Words = [];
+ for (var i = 0; i < x64WordsLength; i++) {
+ var x64Word = x64Words[i];
+ x32Words.push(x64Word.high);
+ x32Words.push(x64Word.low);
+ }
+
+ return X32WordArray.create(x32Words, this.sigBytes);
+ },
+
+ /**
+ * Creates a copy of this word array.
+ *
+ * @return {X64WordArray} The clone.
+ *
+ * @example
+ *
+ * var clone = x64WordArray.clone();
+ */
+ clone: function () {
+ var clone = Base.clone.call(this);
+
+ // Clone "words" array
+ var words = clone.words = this.words.slice(0);
+
+ // Clone each X64Word object
+ var wordsLength = words.length;
+ for (var i = 0; i < wordsLength; i++) {
+ words[i] = words[i].clone();
+ }
+
+ return clone;
+ }
+ });
+ }());
+
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_x64 = C.x64;
+ var X64Word = C_x64.Word;
+ var C_algo = C.algo;
+
+ // Constants tables
+ var RHO_OFFSETS = [];
+ var PI_INDEXES = [];
+ var ROUND_CONSTANTS = [];
+
+ // Compute Constants
+ (function () {
+ // Compute rho offset constants
+ var x = 1, y = 0;
+ for (var t = 0; t < 24; t++) {
+ RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;
+
+ var newX = y % 5;
+ var newY = (2 * x + 3 * y) % 5;
+ x = newX;
+ y = newY;
+ }
+
+ // Compute pi index constants
+ for (var x = 0; x < 5; x++) {
+ for (var y = 0; y < 5; y++) {
+ PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;
+ }
+ }
+
+ // Compute round constants
+ var LFSR = 0x01;
+ for (var i = 0; i < 24; i++) {
+ var roundConstantMsw = 0;
+ var roundConstantLsw = 0;
+
+ for (var j = 0; j < 7; j++) {
+ if (LFSR & 0x01) {
+ var bitPosition = (1 << j) - 1;
+ if (bitPosition < 32) {
+ roundConstantLsw ^= 1 << bitPosition;
+ } else /* if (bitPosition >= 32) */ {
+ roundConstantMsw ^= 1 << (bitPosition - 32);
+ }
+ }
+
+ // Compute next LFSR
+ if (LFSR & 0x80) {
+ // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
+ LFSR = (LFSR << 1) ^ 0x71;
+ } else {
+ LFSR <<= 1;
+ }
+ }
+
+ ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
+ }
+ }());
+
+ // Reusable objects for temporary values
+ var T = [];
+ (function () {
+ for (var i = 0; i < 25; i++) {
+ T[i] = X64Word.create();
+ }
+ }());
+
+ /**
+ * SHA-3 hash algorithm.
+ */
+ var SHA3 = C_algo.SHA3 = Hasher.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} outputLength
+ * The desired number of bits in the output hash.
+ * Only values permitted are: 224, 256, 384, 512.
+ * Default: 512
+ */
+ cfg: Hasher.cfg.extend({
+ outputLength: 512
+ }),
+
+ _doReset: function () {
+ var state = this._state = []
+ for (var i = 0; i < 25; i++) {
+ state[i] = new X64Word.init();
+ }
+
+ this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcuts
+ var state = this._state;
+ var nBlockSizeLanes = this.blockSize / 2;
+
+ // Absorb
+ for (var i = 0; i < nBlockSizeLanes; i++) {
+ // Shortcuts
+ var M2i = M[offset + 2 * i];
+ var M2i1 = M[offset + 2 * i + 1];
+
+ // Swap endian
+ M2i = (
+ (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |
+ (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)
+ );
+ M2i1 = (
+ (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |
+ (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)
+ );
+
+ // Absorb message into state
+ var lane = state[i];
+ lane.high ^= M2i1;
+ lane.low ^= M2i;
+ }
+
+ // Rounds
+ for (var round = 0; round < 24; round++) {
+ // Theta
+ for (var x = 0; x < 5; x++) {
+ // Mix column lanes
+ var tMsw = 0, tLsw = 0;
+ for (var y = 0; y < 5; y++) {
+ var lane = state[x + 5 * y];
+ tMsw ^= lane.high;
+ tLsw ^= lane.low;
+ }
+
+ // Temporary values
+ var Tx = T[x];
+ Tx.high = tMsw;
+ Tx.low = tLsw;
+ }
+ for (var x = 0; x < 5; x++) {
+ // Shortcuts
+ var Tx4 = T[(x + 4) % 5];
+ var Tx1 = T[(x + 1) % 5];
+ var Tx1Msw = Tx1.high;
+ var Tx1Lsw = Tx1.low;
+
+ // Mix surrounding columns
+ var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));
+ var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));
+ for (var y = 0; y < 5; y++) {
+ var lane = state[x + 5 * y];
+ lane.high ^= tMsw;
+ lane.low ^= tLsw;
+ }
+ }
+
+ // Rho Pi
+ for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
+ var tMsw;
+ var tLsw;
+
+ // Shortcuts
+ var lane = state[laneIndex];
+ var laneMsw = lane.high;
+ var laneLsw = lane.low;
+ var rhoOffset = RHO_OFFSETS[laneIndex];
+
+ // Rotate lanes
+ if (rhoOffset < 32) {
+ tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));
+ tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));
+ } else /* if (rhoOffset >= 32) */ {
+ tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));
+ tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));
+ }
+
+ // Transpose lanes
+ var TPiLane = T[PI_INDEXES[laneIndex]];
+ TPiLane.high = tMsw;
+ TPiLane.low = tLsw;
+ }
+
+ // Rho pi at x = y = 0
+ var T0 = T[0];
+ var state0 = state[0];
+ T0.high = state0.high;
+ T0.low = state0.low;
+
+ // Chi
+ for (var x = 0; x < 5; x++) {
+ for (var y = 0; y < 5; y++) {
+ // Shortcuts
+ var laneIndex = x + 5 * y;
+ var lane = state[laneIndex];
+ var TLane = T[laneIndex];
+ var Tx1Lane = T[((x + 1) % 5) + 5 * y];
+ var Tx2Lane = T[((x + 2) % 5) + 5 * y];
+
+ // Mix rows
+ lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);
+ lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);
+ }
+ }
+
+ // Iota
+ var lane = state[0];
+ var roundConstant = ROUND_CONSTANTS[round];
+ lane.high ^= roundConstant.high;
+ lane.low ^= roundConstant.low;
+ }
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+ var blockSizeBits = this.blockSize * 32;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);
+ dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Shortcuts
+ var state = this._state;
+ var outputLengthBytes = this.cfg.outputLength / 8;
+ var outputLengthLanes = outputLengthBytes / 8;
+
+ // Squeeze
+ var hashWords = [];
+ for (var i = 0; i < outputLengthLanes; i++) {
+ // Shortcuts
+ var lane = state[i];
+ var laneMsw = lane.high;
+ var laneLsw = lane.low;
+
+ // Swap endian
+ laneMsw = (
+ (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |
+ (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)
+ );
+ laneLsw = (
+ (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |
+ (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)
+ );
+
+ // Squeeze state to retrieve hash
+ hashWords.push(laneLsw);
+ hashWords.push(laneMsw);
+ }
+
+ // Return final computed hash
+ return new WordArray.init(hashWords, outputLengthBytes);
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+
+ var state = clone._state = this._state.slice(0);
+ for (var i = 0; i < 25; i++) {
+ state[i] = state[i].clone();
+ }
+
+ return clone;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA3('message');
+ * var hash = CryptoJS.SHA3(wordArray);
+ */
+ C.SHA3 = Hasher._createHelper(SHA3);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA3(message, key);
+ */
+ C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
+ }(Math));
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Hasher = C_lib.Hasher;
+ var C_x64 = C.x64;
+ var X64Word = C_x64.Word;
+ var X64WordArray = C_x64.WordArray;
+ var C_algo = C.algo;
+
+ function X64Word_create() {
+ return X64Word.create.apply(X64Word, arguments);
+ }
+
+ // Constants
+ var K = [
+ X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),
+ X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),
+ X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),
+ X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),
+ X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),
+ X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),
+ X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),
+ X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),
+ X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),
+ X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),
+ X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),
+ X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),
+ X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),
+ X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),
+ X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),
+ X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),
+ X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),
+ X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
+ X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),
+ X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),
+ X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),
+ X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),
+ X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),
+ X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),
+ X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),
+ X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),
+ X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),
+ X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),
+ X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),
+ X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),
+ X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),
+ X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),
+ X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),
+ X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),
+ X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),
+ X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),
+ X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
+ X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
+ X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
+ X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
+ ];
+
+ // Reusable objects
+ var W = [];
+ (function () {
+ for (var i = 0; i < 80; i++) {
+ W[i] = X64Word_create();
+ }
+ }());
+
+ /**
+ * SHA-512 hash algorithm.
+ */
+ var SHA512 = C_algo.SHA512 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new X64WordArray.init([
+ new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
+ new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
+ new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
+ new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
+ ]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcuts
+ var H = this._hash.words;
+
+ var H0 = H[0];
+ var H1 = H[1];
+ var H2 = H[2];
+ var H3 = H[3];
+ var H4 = H[4];
+ var H5 = H[5];
+ var H6 = H[6];
+ var H7 = H[7];
+
+ var H0h = H0.high;
+ var H0l = H0.low;
+ var H1h = H1.high;
+ var H1l = H1.low;
+ var H2h = H2.high;
+ var H2l = H2.low;
+ var H3h = H3.high;
+ var H3l = H3.low;
+ var H4h = H4.high;
+ var H4l = H4.low;
+ var H5h = H5.high;
+ var H5l = H5.low;
+ var H6h = H6.high;
+ var H6l = H6.low;
+ var H7h = H7.high;
+ var H7l = H7.low;
+
+ // Working variables
+ var ah = H0h;
+ var al = H0l;
+ var bh = H1h;
+ var bl = H1l;
+ var ch = H2h;
+ var cl = H2l;
+ var dh = H3h;
+ var dl = H3l;
+ var eh = H4h;
+ var el = H4l;
+ var fh = H5h;
+ var fl = H5l;
+ var gh = H6h;
+ var gl = H6l;
+ var hh = H7h;
+ var hl = H7l;
+
+ // Rounds
+ for (var i = 0; i < 80; i++) {
+ var Wil;
+ var Wih;
+
+ // Shortcut
+ var Wi = W[i];
+
+ // Extend message
+ if (i < 16) {
+ Wih = Wi.high = M[offset + i * 2] | 0;
+ Wil = Wi.low = M[offset + i * 2 + 1] | 0;
+ } else {
+ // Gamma0
+ var gamma0x = W[i - 15];
+ var gamma0xh = gamma0x.high;
+ var gamma0xl = gamma0x.low;
+ var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);
+ var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));
+
+ // Gamma1
+ var gamma1x = W[i - 2];
+ var gamma1xh = gamma1x.high;
+ var gamma1xl = gamma1x.low;
+ var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);
+ var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));
+
+ // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
+ var Wi7 = W[i - 7];
+ var Wi7h = Wi7.high;
+ var Wi7l = Wi7.low;
+
+ var Wi16 = W[i - 16];
+ var Wi16h = Wi16.high;
+ var Wi16l = Wi16.low;
+
+ Wil = gamma0l + Wi7l;
+ Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);
+ Wil = Wil + gamma1l;
+ Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);
+ Wil = Wil + Wi16l;
+ Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);
+
+ Wi.high = Wih;
+ Wi.low = Wil;
+ }
+
+ var chh = (eh & fh) ^ (~eh & gh);
+ var chl = (el & fl) ^ (~el & gl);
+ var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);
+ var majl = (al & bl) ^ (al & cl) ^ (bl & cl);
+
+ var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));
+ var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));
+ var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));
+ var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));
+
+ // t1 = h + sigma1 + ch + K[i] + W[i]
+ var Ki = K[i];
+ var Kih = Ki.high;
+ var Kil = Ki.low;
+
+ var t1l = hl + sigma1l;
+ var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);
+ var t1l = t1l + chl;
+ var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);
+ var t1l = t1l + Kil;
+ var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);
+ var t1l = t1l + Wil;
+ var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);
+
+ // t2 = sigma0 + maj
+ var t2l = sigma0l + majl;
+ var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);
+
+ // Update working variables
+ hh = gh;
+ hl = gl;
+ gh = fh;
+ gl = fl;
+ fh = eh;
+ fl = el;
+ el = (dl + t1l) | 0;
+ eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
+ dh = ch;
+ dl = cl;
+ ch = bh;
+ cl = bl;
+ bh = ah;
+ bl = al;
+ al = (t1l + t2l) | 0;
+ ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;
+ }
+
+ // Intermediate hash value
+ H0l = H0.low = (H0l + al);
+ H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));
+ H1l = H1.low = (H1l + bl);
+ H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));
+ H2l = H2.low = (H2l + cl);
+ H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));
+ H3l = H3.low = (H3l + dl);
+ H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));
+ H4l = H4.low = (H4l + el);
+ H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));
+ H5l = H5.low = (H5l + fl);
+ H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));
+ H6l = H6.low = (H6l + gl);
+ H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));
+ H7l = H7.low = (H7l + hl);
+ H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
+ dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Convert hash to 32-bit word array before returning
+ var hash = this._hash.toX32();
+
+ // Return final computed hash
+ return hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ },
+
+ blockSize: 1024/32
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA512('message');
+ * var hash = CryptoJS.SHA512(wordArray);
+ */
+ C.SHA512 = Hasher._createHelper(SHA512);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA512(message, key);
+ */
+ C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_x64 = C.x64;
+ var X64Word = C_x64.Word;
+ var X64WordArray = C_x64.WordArray;
+ var C_algo = C.algo;
+ var SHA512 = C_algo.SHA512;
+
+ /**
+ * SHA-384 hash algorithm.
+ */
+ var SHA384 = C_algo.SHA384 = SHA512.extend({
+ _doReset: function () {
+ this._hash = new X64WordArray.init([
+ new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
+ new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
+ new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
+ new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
+ ]);
+ },
+
+ _doFinalize: function () {
+ var hash = SHA512._doFinalize.call(this);
+
+ hash.sigBytes -= 16;
+
+ return hash;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA384('message');
+ * var hash = CryptoJS.SHA384(wordArray);
+ */
+ C.SHA384 = SHA512._createHelper(SHA384);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA384(message, key);
+ */
+ C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
+ }());
+
+
+ /**
+ * Cipher core components.
+ */
+ CryptoJS.lib.Cipher || (function (undefined) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var WordArray = C_lib.WordArray;
+ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
+ var C_enc = C.enc;
+ var Utf8 = C_enc.Utf8;
+ var Base64 = C_enc.Base64;
+ var C_algo = C.algo;
+ var EvpKDF = C_algo.EvpKDF;
+
+ /**
+ * Abstract base cipher template.
+ *
+ * @property {number} keySize This cipher's key size. Default: 4 (128 bits)
+ * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
+ * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
+ * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
+ */
+ var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {WordArray} iv The IV to use for this operation.
+ */
+ cfg: Base.extend(),
+
+ /**
+ * Creates this cipher in encryption mode.
+ *
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {Cipher} A cipher instance.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
+ */
+ createEncryptor: function (key, cfg) {
+ return this.create(this._ENC_XFORM_MODE, key, cfg);
+ },
+
+ /**
+ * Creates this cipher in decryption mode.
+ *
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {Cipher} A cipher instance.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
+ */
+ createDecryptor: function (key, cfg) {
+ return this.create(this._DEC_XFORM_MODE, key, cfg);
+ },
+
+ /**
+ * Initializes a newly created cipher.
+ *
+ * @param {number} xformMode Either the encryption or decryption transormation mode constant.
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @example
+ *
+ * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
+ */
+ init: function (xformMode, key, cfg) {
+ // Apply config defaults
+ this.cfg = this.cfg.extend(cfg);
+
+ // Store transform mode and key
+ this._xformMode = xformMode;
+ this._key = key;
+
+ // Set initial values
+ this.reset();
+ },
+
+ /**
+ * Resets this cipher to its initial state.
+ *
+ * @example
+ *
+ * cipher.reset();
+ */
+ reset: function () {
+ // Reset data buffer
+ BufferedBlockAlgorithm.reset.call(this);
+
+ // Perform concrete-cipher logic
+ this._doReset();
+ },
+
+ /**
+ * Adds data to be encrypted or decrypted.
+ *
+ * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
+ *
+ * @return {WordArray} The data after processing.
+ *
+ * @example
+ *
+ * var encrypted = cipher.process('data');
+ * var encrypted = cipher.process(wordArray);
+ */
+ process: function (dataUpdate) {
+ // Append
+ this._append(dataUpdate);
+
+ // Process available blocks
+ return this._process();
+ },
+
+ /**
+ * Finalizes the encryption or decryption process.
+ * Note that the finalize operation is effectively a destructive, read-once operation.
+ *
+ * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
+ *
+ * @return {WordArray} The data after final processing.
+ *
+ * @example
+ *
+ * var encrypted = cipher.finalize();
+ * var encrypted = cipher.finalize('data');
+ * var encrypted = cipher.finalize(wordArray);
+ */
+ finalize: function (dataUpdate) {
+ // Final data update
+ if (dataUpdate) {
+ this._append(dataUpdate);
+ }
+
+ // Perform concrete-cipher logic
+ var finalProcessedData = this._doFinalize();
+
+ return finalProcessedData;
+ },
+
+ keySize: 128/32,
+
+ ivSize: 128/32,
+
+ _ENC_XFORM_MODE: 1,
+
+ _DEC_XFORM_MODE: 2,
+
+ /**
+ * Creates shortcut functions to a cipher's object interface.
+ *
+ * @param {Cipher} cipher The cipher to create a helper for.
+ *
+ * @return {Object} An object with encrypt and decrypt shortcut functions.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
+ */
+ _createHelper: (function () {
+ function selectCipherStrategy(key) {
+ if (typeof key == 'string') {
+ return PasswordBasedCipher;
+ } else {
+ return SerializableCipher;
+ }
+ }
+
+ return function (cipher) {
+ return {
+ encrypt: function (message, key, cfg) {
+ return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
+ },
+
+ decrypt: function (ciphertext, key, cfg) {
+ return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
+ }
+ };
+ };
+ }())
+ });
+
+ /**
+ * Abstract base stream cipher template.
+ *
+ * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
+ */
+ var StreamCipher = C_lib.StreamCipher = Cipher.extend({
+ _doFinalize: function () {
+ // Process partial blocks
+ var finalProcessedBlocks = this._process(!!'flush');
+
+ return finalProcessedBlocks;
+ },
+
+ blockSize: 1
+ });
+
+ /**
+ * Mode namespace.
+ */
+ var C_mode = C.mode = {};
+
+ /**
+ * Abstract base block cipher mode template.
+ */
+ var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
+ /**
+ * Creates this mode for encryption.
+ *
+ * @param {Cipher} cipher A block cipher instance.
+ * @param {Array} iv The IV words.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
+ */
+ createEncryptor: function (cipher, iv) {
+ return this.Encryptor.create(cipher, iv);
+ },
+
+ /**
+ * Creates this mode for decryption.
+ *
+ * @param {Cipher} cipher A block cipher instance.
+ * @param {Array} iv The IV words.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
+ */
+ createDecryptor: function (cipher, iv) {
+ return this.Decryptor.create(cipher, iv);
+ },
+
+ /**
+ * Initializes a newly created mode.
+ *
+ * @param {Cipher} cipher A block cipher instance.
+ * @param {Array} iv The IV words.
+ *
+ * @example
+ *
+ * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
+ */
+ init: function (cipher, iv) {
+ this._cipher = cipher;
+ this._iv = iv;
+ }
+ });
+
+ /**
+ * Cipher Block Chaining mode.
+ */
+ var CBC = C_mode.CBC = (function () {
+ /**
+ * Abstract base CBC mode.
+ */
+ var CBC = BlockCipherMode.extend();
+
+ /**
+ * CBC encryptor.
+ */
+ CBC.Encryptor = CBC.extend({
+ /**
+ * Processes the data block at offset.
+ *
+ * @param {Array} words The data words to operate on.
+ * @param {number} offset The offset where the block starts.
+ *
+ * @example
+ *
+ * mode.processBlock(data.words, offset);
+ */
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ // XOR and encrypt
+ xorBlock.call(this, words, offset, blockSize);
+ cipher.encryptBlock(words, offset);
+
+ // Remember this block to use with next block
+ this._prevBlock = words.slice(offset, offset + blockSize);
+ }
+ });
+
+ /**
+ * CBC decryptor.
+ */
+ CBC.Decryptor = CBC.extend({
+ /**
+ * Processes the data block at offset.
+ *
+ * @param {Array} words The data words to operate on.
+ * @param {number} offset The offset where the block starts.
+ *
+ * @example
+ *
+ * mode.processBlock(data.words, offset);
+ */
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ // Remember this block to use with next block
+ var thisBlock = words.slice(offset, offset + blockSize);
+
+ // Decrypt and XOR
+ cipher.decryptBlock(words, offset);
+ xorBlock.call(this, words, offset, blockSize);
+
+ // This block becomes the previous block
+ this._prevBlock = thisBlock;
+ }
+ });
+
+ function xorBlock(words, offset, blockSize) {
+ var block;
+
+ // Shortcut
+ var iv = this._iv;
+
+ // Choose mixing block
+ if (iv) {
+ block = iv;
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ } else {
+ block = this._prevBlock;
+ }
+
+ // XOR blocks
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= block[i];
+ }
+ }
+
+ return CBC;
+ }());
+
+ /**
+ * Padding namespace.
+ */
+ var C_pad = C.pad = {};
+
+ /**
+ * PKCS #5/7 padding strategy.
+ */
+ var Pkcs7 = C_pad.Pkcs7 = {
+ /**
+ * Pads data using the algorithm defined in PKCS #5/7.
+ *
+ * @param {WordArray} data The data to pad.
+ * @param {number} blockSize The multiple that the data should be padded to.
+ *
+ * @static
+ *
+ * @example
+ *
+ * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
+ */
+ pad: function (data, blockSize) {
+ // Shortcut
+ var blockSizeBytes = blockSize * 4;
+
+ // Count padding bytes
+ var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
+
+ // Create padding word
+ var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;
+
+ // Create padding
+ var paddingWords = [];
+ for (var i = 0; i < nPaddingBytes; i += 4) {
+ paddingWords.push(paddingWord);
+ }
+ var padding = WordArray.create(paddingWords, nPaddingBytes);
+
+ // Add padding
+ data.concat(padding);
+ },
+
+ /**
+ * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
+ *
+ * @param {WordArray} data The data to unpad.
+ *
+ * @static
+ *
+ * @example
+ *
+ * CryptoJS.pad.Pkcs7.unpad(wordArray);
+ */
+ unpad: function (data) {
+ // Get number of padding bytes from last byte
+ var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
+
+ // Remove padding
+ data.sigBytes -= nPaddingBytes;
+ }
+ };
+
+ /**
+ * Abstract base block cipher template.
+ *
+ * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
+ */
+ var BlockCipher = C_lib.BlockCipher = Cipher.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {Mode} mode The block mode to use. Default: CBC
+ * @property {Padding} padding The padding strategy to use. Default: Pkcs7
+ */
+ cfg: Cipher.cfg.extend({
+ mode: CBC,
+ padding: Pkcs7
+ }),
+
+ reset: function () {
+ var modeCreator;
+
+ // Reset cipher
+ Cipher.reset.call(this);
+
+ // Shortcuts
+ var cfg = this.cfg;
+ var iv = cfg.iv;
+ var mode = cfg.mode;
+
+ // Reset block mode
+ if (this._xformMode == this._ENC_XFORM_MODE) {
+ modeCreator = mode.createEncryptor;
+ } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
+ modeCreator = mode.createDecryptor;
+ // Keep at least one block in the buffer for unpadding
+ this._minBufferSize = 1;
+ }
+
+ if (this._mode && this._mode.__creator == modeCreator) {
+ this._mode.init(this, iv && iv.words);
+ } else {
+ this._mode = modeCreator.call(mode, this, iv && iv.words);
+ this._mode.__creator = modeCreator;
+ }
+ },
+
+ _doProcessBlock: function (words, offset) {
+ this._mode.processBlock(words, offset);
+ },
+
+ _doFinalize: function () {
+ var finalProcessedBlocks;
+
+ // Shortcut
+ var padding = this.cfg.padding;
+
+ // Finalize
+ if (this._xformMode == this._ENC_XFORM_MODE) {
+ // Pad data
+ padding.pad(this._data, this.blockSize);
+
+ // Process final blocks
+ finalProcessedBlocks = this._process(!!'flush');
+ } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
+ // Process final blocks
+ finalProcessedBlocks = this._process(!!'flush');
+
+ // Unpad data
+ padding.unpad(finalProcessedBlocks);
+ }
+
+ return finalProcessedBlocks;
+ },
+
+ blockSize: 128/32
+ });
+
+ /**
+ * A collection of cipher parameters.
+ *
+ * @property {WordArray} ciphertext The raw ciphertext.
+ * @property {WordArray} key The key to this ciphertext.
+ * @property {WordArray} iv The IV used in the ciphering operation.
+ * @property {WordArray} salt The salt used with a key derivation function.
+ * @property {Cipher} algorithm The cipher algorithm.
+ * @property {Mode} mode The block mode used in the ciphering operation.
+ * @property {Padding} padding The padding scheme used in the ciphering operation.
+ * @property {number} blockSize The block size of the cipher.
+ * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
+ */
+ var CipherParams = C_lib.CipherParams = Base.extend({
+ /**
+ * Initializes a newly created cipher params object.
+ *
+ * @param {Object} cipherParams An object with any of the possible cipher parameters.
+ *
+ * @example
+ *
+ * var cipherParams = CryptoJS.lib.CipherParams.create({
+ * ciphertext: ciphertextWordArray,
+ * key: keyWordArray,
+ * iv: ivWordArray,
+ * salt: saltWordArray,
+ * algorithm: CryptoJS.algo.AES,
+ * mode: CryptoJS.mode.CBC,
+ * padding: CryptoJS.pad.PKCS7,
+ * blockSize: 4,
+ * formatter: CryptoJS.format.OpenSSL
+ * });
+ */
+ init: function (cipherParams) {
+ this.mixIn(cipherParams);
+ },
+
+ /**
+ * Converts this cipher params object to a string.
+ *
+ * @param {Format} formatter (Optional) The formatting strategy to use.
+ *
+ * @return {string} The stringified cipher params.
+ *
+ * @throws Error If neither the formatter nor the default formatter is set.
+ *
+ * @example
+ *
+ * var string = cipherParams + '';
+ * var string = cipherParams.toString();
+ * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
+ */
+ toString: function (formatter) {
+ return (formatter || this.formatter).stringify(this);
+ }
+ });
+
+ /**
+ * Format namespace.
+ */
+ var C_format = C.format = {};
+
+ /**
+ * OpenSSL formatting strategy.
+ */
+ var OpenSSLFormatter = C_format.OpenSSL = {
+ /**
+ * Converts a cipher params object to an OpenSSL-compatible string.
+ *
+ * @param {CipherParams} cipherParams The cipher params object.
+ *
+ * @return {string} The OpenSSL-compatible string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
+ */
+ stringify: function (cipherParams) {
+ var wordArray;
+
+ // Shortcuts
+ var ciphertext = cipherParams.ciphertext;
+ var salt = cipherParams.salt;
+
+ // Format
+ if (salt) {
+ wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
+ } else {
+ wordArray = ciphertext;
+ }
+
+ return wordArray.toString(Base64);
+ },
+
+ /**
+ * Converts an OpenSSL-compatible string to a cipher params object.
+ *
+ * @param {string} openSSLStr The OpenSSL-compatible string.
+ *
+ * @return {CipherParams} The cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
+ */
+ parse: function (openSSLStr) {
+ var salt;
+
+ // Parse base64
+ var ciphertext = Base64.parse(openSSLStr);
+
+ // Shortcut
+ var ciphertextWords = ciphertext.words;
+
+ // Test for salt
+ if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
+ // Extract salt
+ salt = WordArray.create(ciphertextWords.slice(2, 4));
+
+ // Remove salt from ciphertext
+ ciphertextWords.splice(0, 4);
+ ciphertext.sigBytes -= 16;
+ }
+
+ return CipherParams.create({ ciphertext: ciphertext, salt: salt });
+ }
+ };
+
+ /**
+ * A cipher wrapper that returns ciphertext as a serializable cipher params object.
+ */
+ var SerializableCipher = C_lib.SerializableCipher = Base.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
+ */
+ cfg: Base.extend({
+ format: OpenSSLFormatter
+ }),
+
+ /**
+ * Encrypts a message.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {WordArray|string} message The message to encrypt.
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {CipherParams} A cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
+ */
+ encrypt: function (cipher, message, key, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Encrypt
+ var encryptor = cipher.createEncryptor(key, cfg);
+ var ciphertext = encryptor.finalize(message);
+
+ // Shortcut
+ var cipherCfg = encryptor.cfg;
+
+ // Create and return serializable cipher params
+ return CipherParams.create({
+ ciphertext: ciphertext,
+ key: key,
+ iv: cipherCfg.iv,
+ algorithm: cipher,
+ mode: cipherCfg.mode,
+ padding: cipherCfg.padding,
+ blockSize: cipher.blockSize,
+ formatter: cfg.format
+ });
+ },
+
+ /**
+ * Decrypts serialized ciphertext.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
+ * @param {WordArray} key The key.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {WordArray} The plaintext.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
+ * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
+ */
+ decrypt: function (cipher, ciphertext, key, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Convert string to CipherParams
+ ciphertext = this._parse(ciphertext, cfg.format);
+
+ // Decrypt
+ var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
+
+ return plaintext;
+ },
+
+ /**
+ * Converts serialized ciphertext to CipherParams,
+ * else assumed CipherParams already and returns ciphertext unchanged.
+ *
+ * @param {CipherParams|string} ciphertext The ciphertext.
+ * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
+ *
+ * @return {CipherParams} The unserialized ciphertext.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
+ */
+ _parse: function (ciphertext, format) {
+ if (typeof ciphertext == 'string') {
+ return format.parse(ciphertext, this);
+ } else {
+ return ciphertext;
+ }
+ }
+ });
+
+ /**
+ * Key derivation function namespace.
+ */
+ var C_kdf = C.kdf = {};
+
+ /**
+ * OpenSSL key derivation function.
+ */
+ var OpenSSLKdf = C_kdf.OpenSSL = {
+ /**
+ * Derives a key and IV from a password.
+ *
+ * @param {string} password The password to derive from.
+ * @param {number} keySize The size in words of the key to generate.
+ * @param {number} ivSize The size in words of the IV to generate.
+ * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
+ *
+ * @return {CipherParams} A cipher params object with the key, IV, and salt.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
+ * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
+ */
+ execute: function (password, keySize, ivSize, salt) {
+ // Generate random salt
+ if (!salt) {
+ salt = WordArray.random(64/8);
+ }
+
+ // Derive key and IV
+ var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
+
+ // Separate key and IV
+ var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
+ key.sigBytes = keySize * 4;
+
+ // Return params
+ return CipherParams.create({ key: key, iv: iv, salt: salt });
+ }
+ };
+
+ /**
+ * A serializable cipher wrapper that derives the key from a password,
+ * and returns ciphertext as a serializable cipher params object.
+ */
+ var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
+ */
+ cfg: SerializableCipher.cfg.extend({
+ kdf: OpenSSLKdf
+ }),
+
+ /**
+ * Encrypts a message using a password.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {WordArray|string} message The message to encrypt.
+ * @param {string} password The password.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {CipherParams} A cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
+ * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
+ */
+ encrypt: function (cipher, message, password, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Derive key and other params
+ var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
+
+ // Add IV to config
+ cfg.iv = derivedParams.iv;
+
+ // Encrypt
+ var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
+
+ // Mix in derived params
+ ciphertext.mixIn(derivedParams);
+
+ return ciphertext;
+ },
+
+ /**
+ * Decrypts serialized ciphertext using a password.
+ *
+ * @param {Cipher} cipher The cipher algorithm to use.
+ * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
+ * @param {string} password The password.
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
+ *
+ * @return {WordArray} The plaintext.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
+ * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
+ */
+ decrypt: function (cipher, ciphertext, password, cfg) {
+ // Apply config defaults
+ cfg = this.cfg.extend(cfg);
+
+ // Convert string to CipherParams
+ ciphertext = this._parse(ciphertext, cfg.format);
+
+ // Derive key and other params
+ var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
+
+ // Add IV to config
+ cfg.iv = derivedParams.iv;
+
+ // Decrypt
+ var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
+
+ return plaintext;
+ }
+ });
+ }());
+
+
+ /**
+ * Cipher Feedback block mode.
+ */
+ CryptoJS.mode.CFB = (function () {
+ var CFB = CryptoJS.lib.BlockCipherMode.extend();
+
+ CFB.Encryptor = CFB.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
+
+ // Remember this block to use with next block
+ this._prevBlock = words.slice(offset, offset + blockSize);
+ }
+ });
+
+ CFB.Decryptor = CFB.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ // Remember this block to use with next block
+ var thisBlock = words.slice(offset, offset + blockSize);
+
+ generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
+
+ // This block becomes the previous block
+ this._prevBlock = thisBlock;
+ }
+ });
+
+ function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
+ var keystream;
+
+ // Shortcut
+ var iv = this._iv;
+
+ // Generate keystream
+ if (iv) {
+ keystream = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ } else {
+ keystream = this._prevBlock;
+ }
+ cipher.encryptBlock(keystream, 0);
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+
+ return CFB;
+ }());
+
+
+ /**
+ * Electronic Codebook block mode.
+ */
+ CryptoJS.mode.ECB = (function () {
+ var ECB = CryptoJS.lib.BlockCipherMode.extend();
+
+ ECB.Encryptor = ECB.extend({
+ processBlock: function (words, offset) {
+ this._cipher.encryptBlock(words, offset);
+ }
+ });
+
+ ECB.Decryptor = ECB.extend({
+ processBlock: function (words, offset) {
+ this._cipher.decryptBlock(words, offset);
+ }
+ });
+
+ return ECB;
+ }());
+
+
+ /**
+ * ANSI X.923 padding strategy.
+ */
+ CryptoJS.pad.AnsiX923 = {
+ pad: function (data, blockSize) {
+ // Shortcuts
+ var dataSigBytes = data.sigBytes;
+ var blockSizeBytes = blockSize * 4;
+
+ // Count padding bytes
+ var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
+
+ // Compute last byte position
+ var lastBytePos = dataSigBytes + nPaddingBytes - 1;
+
+ // Pad
+ data.clamp();
+ data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);
+ data.sigBytes += nPaddingBytes;
+ },
+
+ unpad: function (data) {
+ // Get number of padding bytes from last byte
+ var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
+
+ // Remove padding
+ data.sigBytes -= nPaddingBytes;
+ }
+ };
+
+
+ /**
+ * ISO 10126 padding strategy.
+ */
+ CryptoJS.pad.Iso10126 = {
+ pad: function (data, blockSize) {
+ // Shortcut
+ var blockSizeBytes = blockSize * 4;
+
+ // Count padding bytes
+ var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
+
+ // Pad
+ data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
+ concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
+ },
+
+ unpad: function (data) {
+ // Get number of padding bytes from last byte
+ var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
+
+ // Remove padding
+ data.sigBytes -= nPaddingBytes;
+ }
+ };
+
+
+ /**
+ * ISO/IEC 9797-1 Padding Method 2.
+ */
+ CryptoJS.pad.Iso97971 = {
+ pad: function (data, blockSize) {
+ // Add 0x80 byte
+ data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
+
+ // Zero pad the rest
+ CryptoJS.pad.ZeroPadding.pad(data, blockSize);
+ },
+
+ unpad: function (data) {
+ // Remove zero padding
+ CryptoJS.pad.ZeroPadding.unpad(data);
+
+ // Remove one more byte -- the 0x80 byte
+ data.sigBytes--;
+ }
+ };
+
+
+ /**
+ * Output Feedback block mode.
+ */
+ CryptoJS.mode.OFB = (function () {
+ var OFB = CryptoJS.lib.BlockCipherMode.extend();
+
+ var Encryptor = OFB.Encryptor = OFB.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher
+ var blockSize = cipher.blockSize;
+ var iv = this._iv;
+ var keystream = this._keystream;
+
+ // Generate keystream
+ if (iv) {
+ keystream = this._keystream = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ }
+ cipher.encryptBlock(keystream, 0);
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+ });
+
+ OFB.Decryptor = Encryptor;
+
+ return OFB;
+ }());
+
+
+ /**
+ * A noop padding strategy.
+ */
+ CryptoJS.pad.NoPadding = {
+ pad: function () {
+ },
+
+ unpad: function () {
+ }
+ };
+
+
+ (function (undefined) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var CipherParams = C_lib.CipherParams;
+ var C_enc = C.enc;
+ var Hex = C_enc.Hex;
+ var C_format = C.format;
+
+ var HexFormatter = C_format.Hex = {
+ /**
+ * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
+ *
+ * @param {CipherParams} cipherParams The cipher params object.
+ *
+ * @return {string} The hexadecimally encoded string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hexString = CryptoJS.format.Hex.stringify(cipherParams);
+ */
+ stringify: function (cipherParams) {
+ return cipherParams.ciphertext.toString(Hex);
+ },
+
+ /**
+ * Converts a hexadecimally encoded ciphertext string to a cipher params object.
+ *
+ * @param {string} input The hexadecimally encoded string.
+ *
+ * @return {CipherParams} The cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipherParams = CryptoJS.format.Hex.parse(hexString);
+ */
+ parse: function (input) {
+ var ciphertext = Hex.parse(input);
+ return CipherParams.create({ ciphertext: ciphertext });
+ }
+ };
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var BlockCipher = C_lib.BlockCipher;
+ var C_algo = C.algo;
+
+ // Lookup tables
+ var SBOX = [];
+ var INV_SBOX = [];
+ var SUB_MIX_0 = [];
+ var SUB_MIX_1 = [];
+ var SUB_MIX_2 = [];
+ var SUB_MIX_3 = [];
+ var INV_SUB_MIX_0 = [];
+ var INV_SUB_MIX_1 = [];
+ var INV_SUB_MIX_2 = [];
+ var INV_SUB_MIX_3 = [];
+
+ // Compute lookup tables
+ (function () {
+ // Compute double table
+ var d = [];
+ for (var i = 0; i < 256; i++) {
+ if (i < 128) {
+ d[i] = i << 1;
+ } else {
+ d[i] = (i << 1) ^ 0x11b;
+ }
+ }
+
+ // Walk GF(2^8)
+ var x = 0;
+ var xi = 0;
+ for (var i = 0; i < 256; i++) {
+ // Compute sbox
+ var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
+ sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
+ SBOX[x] = sx;
+ INV_SBOX[sx] = x;
+
+ // Compute multiplication
+ var x2 = d[x];
+ var x4 = d[x2];
+ var x8 = d[x4];
+
+ // Compute sub bytes, mix columns tables
+ var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
+ SUB_MIX_0[x] = (t << 24) | (t >>> 8);
+ SUB_MIX_1[x] = (t << 16) | (t >>> 16);
+ SUB_MIX_2[x] = (t << 8) | (t >>> 24);
+ SUB_MIX_3[x] = t;
+
+ // Compute inv sub bytes, inv mix columns tables
+ var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
+ INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
+ INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
+ INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);
+ INV_SUB_MIX_3[sx] = t;
+
+ // Compute next counter
+ if (!x) {
+ x = xi = 1;
+ } else {
+ x = x2 ^ d[d[d[x8 ^ x2]]];
+ xi ^= d[d[xi]];
+ }
+ }
+ }());
+
+ // Precomputed Rcon lookup
+ var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
+
+ /**
+ * AES block cipher algorithm.
+ */
+ var AES = C_algo.AES = BlockCipher.extend({
+ _doReset: function () {
+ var t;
+
+ // Skip reset of nRounds has been set before and key did not change
+ if (this._nRounds && this._keyPriorReset === this._key) {
+ return;
+ }
+
+ // Shortcuts
+ var key = this._keyPriorReset = this._key;
+ var keyWords = key.words;
+ var keySize = key.sigBytes / 4;
+
+ // Compute number of rounds
+ var nRounds = this._nRounds = keySize + 6;
+
+ // Compute number of key schedule rows
+ var ksRows = (nRounds + 1) * 4;
+
+ // Compute key schedule
+ var keySchedule = this._keySchedule = [];
+ for (var ksRow = 0; ksRow < ksRows; ksRow++) {
+ if (ksRow < keySize) {
+ keySchedule[ksRow] = keyWords[ksRow];
+ } else {
+ t = keySchedule[ksRow - 1];
+
+ if (!(ksRow % keySize)) {
+ // Rot word
+ t = (t << 8) | (t >>> 24);
+
+ // Sub word
+ t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
+
+ // Mix Rcon
+ t ^= RCON[(ksRow / keySize) | 0] << 24;
+ } else if (keySize > 6 && ksRow % keySize == 4) {
+ // Sub word
+ t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
+ }
+
+ keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
+ }
+ }
+
+ // Compute inv key schedule
+ var invKeySchedule = this._invKeySchedule = [];
+ for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
+ var ksRow = ksRows - invKsRow;
+
+ if (invKsRow % 4) {
+ var t = keySchedule[ksRow];
+ } else {
+ var t = keySchedule[ksRow - 4];
+ }
+
+ if (invKsRow < 4 || ksRow <= 4) {
+ invKeySchedule[invKsRow] = t;
+ } else {
+ invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
+ INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
+ }
+ }
+ },
+
+ encryptBlock: function (M, offset) {
+ this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
+ },
+
+ decryptBlock: function (M, offset) {
+ // Swap 2nd and 4th rows
+ var t = M[offset + 1];
+ M[offset + 1] = M[offset + 3];
+ M[offset + 3] = t;
+
+ this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
+
+ // Inv swap 2nd and 4th rows
+ var t = M[offset + 1];
+ M[offset + 1] = M[offset + 3];
+ M[offset + 3] = t;
+ },
+
+ _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
+ // Shortcut
+ var nRounds = this._nRounds;
+
+ // Get input, add round key
+ var s0 = M[offset] ^ keySchedule[0];
+ var s1 = M[offset + 1] ^ keySchedule[1];
+ var s2 = M[offset + 2] ^ keySchedule[2];
+ var s3 = M[offset + 3] ^ keySchedule[3];
+
+ // Key schedule row counter
+ var ksRow = 4;
+
+ // Rounds
+ for (var round = 1; round < nRounds; round++) {
+ // Shift rows, sub bytes, mix columns, add round key
+ var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
+ var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
+ var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
+ var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
+
+ // Update state
+ s0 = t0;
+ s1 = t1;
+ s2 = t2;
+ s3 = t3;
+ }
+
+ // Shift rows, sub bytes, add round key
+ var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
+ var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
+ var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
+ var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
+
+ // Set output
+ M[offset] = t0;
+ M[offset + 1] = t1;
+ M[offset + 2] = t2;
+ M[offset + 3] = t3;
+ },
+
+ keySize: 256/32
+ });
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
+ */
+ C.AES = BlockCipher._createHelper(AES);
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var BlockCipher = C_lib.BlockCipher;
+ var C_algo = C.algo;
+
+ // Permuted Choice 1 constants
+ var PC1 = [
+ 57, 49, 41, 33, 25, 17, 9, 1,
+ 58, 50, 42, 34, 26, 18, 10, 2,
+ 59, 51, 43, 35, 27, 19, 11, 3,
+ 60, 52, 44, 36, 63, 55, 47, 39,
+ 31, 23, 15, 7, 62, 54, 46, 38,
+ 30, 22, 14, 6, 61, 53, 45, 37,
+ 29, 21, 13, 5, 28, 20, 12, 4
+ ];
+
+ // Permuted Choice 2 constants
+ var PC2 = [
+ 14, 17, 11, 24, 1, 5,
+ 3, 28, 15, 6, 21, 10,
+ 23, 19, 12, 4, 26, 8,
+ 16, 7, 27, 20, 13, 2,
+ 41, 52, 31, 37, 47, 55,
+ 30, 40, 51, 45, 33, 48,
+ 44, 49, 39, 56, 34, 53,
+ 46, 42, 50, 36, 29, 32
+ ];
+
+ // Cumulative bit shift constants
+ var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
+
+ // SBOXes and round permutation constants
+ var SBOX_P = [
+ {
+ 0x0: 0x808200,
+ 0x10000000: 0x8000,
+ 0x20000000: 0x808002,
+ 0x30000000: 0x2,
+ 0x40000000: 0x200,
+ 0x50000000: 0x808202,
+ 0x60000000: 0x800202,
+ 0x70000000: 0x800000,
+ 0x80000000: 0x202,
+ 0x90000000: 0x800200,
+ 0xa0000000: 0x8200,
+ 0xb0000000: 0x808000,
+ 0xc0000000: 0x8002,
+ 0xd0000000: 0x800002,
+ 0xe0000000: 0x0,
+ 0xf0000000: 0x8202,
+ 0x8000000: 0x0,
+ 0x18000000: 0x808202,
+ 0x28000000: 0x8202,
+ 0x38000000: 0x8000,
+ 0x48000000: 0x808200,
+ 0x58000000: 0x200,
+ 0x68000000: 0x808002,
+ 0x78000000: 0x2,
+ 0x88000000: 0x800200,
+ 0x98000000: 0x8200,
+ 0xa8000000: 0x808000,
+ 0xb8000000: 0x800202,
+ 0xc8000000: 0x800002,
+ 0xd8000000: 0x8002,
+ 0xe8000000: 0x202,
+ 0xf8000000: 0x800000,
+ 0x1: 0x8000,
+ 0x10000001: 0x2,
+ 0x20000001: 0x808200,
+ 0x30000001: 0x800000,
+ 0x40000001: 0x808002,
+ 0x50000001: 0x8200,
+ 0x60000001: 0x200,
+ 0x70000001: 0x800202,
+ 0x80000001: 0x808202,
+ 0x90000001: 0x808000,
+ 0xa0000001: 0x800002,
+ 0xb0000001: 0x8202,
+ 0xc0000001: 0x202,
+ 0xd0000001: 0x800200,
+ 0xe0000001: 0x8002,
+ 0xf0000001: 0x0,
+ 0x8000001: 0x808202,
+ 0x18000001: 0x808000,
+ 0x28000001: 0x800000,
+ 0x38000001: 0x200,
+ 0x48000001: 0x8000,
+ 0x58000001: 0x800002,
+ 0x68000001: 0x2,
+ 0x78000001: 0x8202,
+ 0x88000001: 0x8002,
+ 0x98000001: 0x800202,
+ 0xa8000001: 0x202,
+ 0xb8000001: 0x808200,
+ 0xc8000001: 0x800200,
+ 0xd8000001: 0x0,
+ 0xe8000001: 0x8200,
+ 0xf8000001: 0x808002
+ },
+ {
+ 0x0: 0x40084010,
+ 0x1000000: 0x4000,
+ 0x2000000: 0x80000,
+ 0x3000000: 0x40080010,
+ 0x4000000: 0x40000010,
+ 0x5000000: 0x40084000,
+ 0x6000000: 0x40004000,
+ 0x7000000: 0x10,
+ 0x8000000: 0x84000,
+ 0x9000000: 0x40004010,
+ 0xa000000: 0x40000000,
+ 0xb000000: 0x84010,
+ 0xc000000: 0x80010,
+ 0xd000000: 0x0,
+ 0xe000000: 0x4010,
+ 0xf000000: 0x40080000,
+ 0x800000: 0x40004000,
+ 0x1800000: 0x84010,
+ 0x2800000: 0x10,
+ 0x3800000: 0x40004010,
+ 0x4800000: 0x40084010,
+ 0x5800000: 0x40000000,
+ 0x6800000: 0x80000,
+ 0x7800000: 0x40080010,
+ 0x8800000: 0x80010,
+ 0x9800000: 0x0,
+ 0xa800000: 0x4000,
+ 0xb800000: 0x40080000,
+ 0xc800000: 0x40000010,
+ 0xd800000: 0x84000,
+ 0xe800000: 0x40084000,
+ 0xf800000: 0x4010,
+ 0x10000000: 0x0,
+ 0x11000000: 0x40080010,
+ 0x12000000: 0x40004010,
+ 0x13000000: 0x40084000,
+ 0x14000000: 0x40080000,
+ 0x15000000: 0x10,
+ 0x16000000: 0x84010,
+ 0x17000000: 0x4000,
+ 0x18000000: 0x4010,
+ 0x19000000: 0x80000,
+ 0x1a000000: 0x80010,
+ 0x1b000000: 0x40000010,
+ 0x1c000000: 0x84000,
+ 0x1d000000: 0x40004000,
+ 0x1e000000: 0x40000000,
+ 0x1f000000: 0x40084010,
+ 0x10800000: 0x84010,
+ 0x11800000: 0x80000,
+ 0x12800000: 0x40080000,
+ 0x13800000: 0x4000,
+ 0x14800000: 0x40004000,
+ 0x15800000: 0x40084010,
+ 0x16800000: 0x10,
+ 0x17800000: 0x40000000,
+ 0x18800000: 0x40084000,
+ 0x19800000: 0x40000010,
+ 0x1a800000: 0x40004010,
+ 0x1b800000: 0x80010,
+ 0x1c800000: 0x0,
+ 0x1d800000: 0x4010,
+ 0x1e800000: 0x40080010,
+ 0x1f800000: 0x84000
+ },
+ {
+ 0x0: 0x104,
+ 0x100000: 0x0,
+ 0x200000: 0x4000100,
+ 0x300000: 0x10104,
+ 0x400000: 0x10004,
+ 0x500000: 0x4000004,
+ 0x600000: 0x4010104,
+ 0x700000: 0x4010000,
+ 0x800000: 0x4000000,
+ 0x900000: 0x4010100,
+ 0xa00000: 0x10100,
+ 0xb00000: 0x4010004,
+ 0xc00000: 0x4000104,
+ 0xd00000: 0x10000,
+ 0xe00000: 0x4,
+ 0xf00000: 0x100,
+ 0x80000: 0x4010100,
+ 0x180000: 0x4010004,
+ 0x280000: 0x0,
+ 0x380000: 0x4000100,
+ 0x480000: 0x4000004,
+ 0x580000: 0x10000,
+ 0x680000: 0x10004,
+ 0x780000: 0x104,
+ 0x880000: 0x4,
+ 0x980000: 0x100,
+ 0xa80000: 0x4010000,
+ 0xb80000: 0x10104,
+ 0xc80000: 0x10100,
+ 0xd80000: 0x4000104,
+ 0xe80000: 0x4010104,
+ 0xf80000: 0x4000000,
+ 0x1000000: 0x4010100,
+ 0x1100000: 0x10004,
+ 0x1200000: 0x10000,
+ 0x1300000: 0x4000100,
+ 0x1400000: 0x100,
+ 0x1500000: 0x4010104,
+ 0x1600000: 0x4000004,
+ 0x1700000: 0x0,
+ 0x1800000: 0x4000104,
+ 0x1900000: 0x4000000,
+ 0x1a00000: 0x4,
+ 0x1b00000: 0x10100,
+ 0x1c00000: 0x4010000,
+ 0x1d00000: 0x104,
+ 0x1e00000: 0x10104,
+ 0x1f00000: 0x4010004,
+ 0x1080000: 0x4000000,
+ 0x1180000: 0x104,
+ 0x1280000: 0x4010100,
+ 0x1380000: 0x0,
+ 0x1480000: 0x10004,
+ 0x1580000: 0x4000100,
+ 0x1680000: 0x100,
+ 0x1780000: 0x4010004,
+ 0x1880000: 0x10000,
+ 0x1980000: 0x4010104,
+ 0x1a80000: 0x10104,
+ 0x1b80000: 0x4000004,
+ 0x1c80000: 0x4000104,
+ 0x1d80000: 0x4010000,
+ 0x1e80000: 0x4,
+ 0x1f80000: 0x10100
+ },
+ {
+ 0x0: 0x80401000,
+ 0x10000: 0x80001040,
+ 0x20000: 0x401040,
+ 0x30000: 0x80400000,
+ 0x40000: 0x0,
+ 0x50000: 0x401000,
+ 0x60000: 0x80000040,
+ 0x70000: 0x400040,
+ 0x80000: 0x80000000,
+ 0x90000: 0x400000,
+ 0xa0000: 0x40,
+ 0xb0000: 0x80001000,
+ 0xc0000: 0x80400040,
+ 0xd0000: 0x1040,
+ 0xe0000: 0x1000,
+ 0xf0000: 0x80401040,
+ 0x8000: 0x80001040,
+ 0x18000: 0x40,
+ 0x28000: 0x80400040,
+ 0x38000: 0x80001000,
+ 0x48000: 0x401000,
+ 0x58000: 0x80401040,
+ 0x68000: 0x0,
+ 0x78000: 0x80400000,
+ 0x88000: 0x1000,
+ 0x98000: 0x80401000,
+ 0xa8000: 0x400000,
+ 0xb8000: 0x1040,
+ 0xc8000: 0x80000000,
+ 0xd8000: 0x400040,
+ 0xe8000: 0x401040,
+ 0xf8000: 0x80000040,
+ 0x100000: 0x400040,
+ 0x110000: 0x401000,
+ 0x120000: 0x80000040,
+ 0x130000: 0x0,
+ 0x140000: 0x1040,
+ 0x150000: 0x80400040,
+ 0x160000: 0x80401000,
+ 0x170000: 0x80001040,
+ 0x180000: 0x80401040,
+ 0x190000: 0x80000000,
+ 0x1a0000: 0x80400000,
+ 0x1b0000: 0x401040,
+ 0x1c0000: 0x80001000,
+ 0x1d0000: 0x400000,
+ 0x1e0000: 0x40,
+ 0x1f0000: 0x1000,
+ 0x108000: 0x80400000,
+ 0x118000: 0x80401040,
+ 0x128000: 0x0,
+ 0x138000: 0x401000,
+ 0x148000: 0x400040,
+ 0x158000: 0x80000000,
+ 0x168000: 0x80001040,
+ 0x178000: 0x40,
+ 0x188000: 0x80000040,
+ 0x198000: 0x1000,
+ 0x1a8000: 0x80001000,
+ 0x1b8000: 0x80400040,
+ 0x1c8000: 0x1040,
+ 0x1d8000: 0x80401000,
+ 0x1e8000: 0x400000,
+ 0x1f8000: 0x401040
+ },
+ {
+ 0x0: 0x80,
+ 0x1000: 0x1040000,
+ 0x2000: 0x40000,
+ 0x3000: 0x20000000,
+ 0x4000: 0x20040080,
+ 0x5000: 0x1000080,
+ 0x6000: 0x21000080,
+ 0x7000: 0x40080,
+ 0x8000: 0x1000000,
+ 0x9000: 0x20040000,
+ 0xa000: 0x20000080,
+ 0xb000: 0x21040080,
+ 0xc000: 0x21040000,
+ 0xd000: 0x0,
+ 0xe000: 0x1040080,
+ 0xf000: 0x21000000,
+ 0x800: 0x1040080,
+ 0x1800: 0x21000080,
+ 0x2800: 0x80,
+ 0x3800: 0x1040000,
+ 0x4800: 0x40000,
+ 0x5800: 0x20040080,
+ 0x6800: 0x21040000,
+ 0x7800: 0x20000000,
+ 0x8800: 0x20040000,
+ 0x9800: 0x0,
+ 0xa800: 0x21040080,
+ 0xb800: 0x1000080,
+ 0xc800: 0x20000080,
+ 0xd800: 0x21000000,
+ 0xe800: 0x1000000,
+ 0xf800: 0x40080,
+ 0x10000: 0x40000,
+ 0x11000: 0x80,
+ 0x12000: 0x20000000,
+ 0x13000: 0x21000080,
+ 0x14000: 0x1000080,
+ 0x15000: 0x21040000,
+ 0x16000: 0x20040080,
+ 0x17000: 0x1000000,
+ 0x18000: 0x21040080,
+ 0x19000: 0x21000000,
+ 0x1a000: 0x1040000,
+ 0x1b000: 0x20040000,
+ 0x1c000: 0x40080,
+ 0x1d000: 0x20000080,
+ 0x1e000: 0x0,
+ 0x1f000: 0x1040080,
+ 0x10800: 0x21000080,
+ 0x11800: 0x1000000,
+ 0x12800: 0x1040000,
+ 0x13800: 0x20040080,
+ 0x14800: 0x20000000,
+ 0x15800: 0x1040080,
+ 0x16800: 0x80,
+ 0x17800: 0x21040000,
+ 0x18800: 0x40080,
+ 0x19800: 0x21040080,
+ 0x1a800: 0x0,
+ 0x1b800: 0x21000000,
+ 0x1c800: 0x1000080,
+ 0x1d800: 0x40000,
+ 0x1e800: 0x20040000,
+ 0x1f800: 0x20000080
+ },
+ {
+ 0x0: 0x10000008,
+ 0x100: 0x2000,
+ 0x200: 0x10200000,
+ 0x300: 0x10202008,
+ 0x400: 0x10002000,
+ 0x500: 0x200000,
+ 0x600: 0x200008,
+ 0x700: 0x10000000,
+ 0x800: 0x0,
+ 0x900: 0x10002008,
+ 0xa00: 0x202000,
+ 0xb00: 0x8,
+ 0xc00: 0x10200008,
+ 0xd00: 0x202008,
+ 0xe00: 0x2008,
+ 0xf00: 0x10202000,
+ 0x80: 0x10200000,
+ 0x180: 0x10202008,
+ 0x280: 0x8,
+ 0x380: 0x200000,
+ 0x480: 0x202008,
+ 0x580: 0x10000008,
+ 0x680: 0x10002000,
+ 0x780: 0x2008,
+ 0x880: 0x200008,
+ 0x980: 0x2000,
+ 0xa80: 0x10002008,
+ 0xb80: 0x10200008,
+ 0xc80: 0x0,
+ 0xd80: 0x10202000,
+ 0xe80: 0x202000,
+ 0xf80: 0x10000000,
+ 0x1000: 0x10002000,
+ 0x1100: 0x10200008,
+ 0x1200: 0x10202008,
+ 0x1300: 0x2008,
+ 0x1400: 0x200000,
+ 0x1500: 0x10000000,
+ 0x1600: 0x10000008,
+ 0x1700: 0x202000,
+ 0x1800: 0x202008,
+ 0x1900: 0x0,
+ 0x1a00: 0x8,
+ 0x1b00: 0x10200000,
+ 0x1c00: 0x2000,
+ 0x1d00: 0x10002008,
+ 0x1e00: 0x10202000,
+ 0x1f00: 0x200008,
+ 0x1080: 0x8,
+ 0x1180: 0x202000,
+ 0x1280: 0x200000,
+ 0x1380: 0x10000008,
+ 0x1480: 0x10002000,
+ 0x1580: 0x2008,
+ 0x1680: 0x10202008,
+ 0x1780: 0x10200000,
+ 0x1880: 0x10202000,
+ 0x1980: 0x10200008,
+ 0x1a80: 0x2000,
+ 0x1b80: 0x202008,
+ 0x1c80: 0x200008,
+ 0x1d80: 0x0,
+ 0x1e80: 0x10000000,
+ 0x1f80: 0x10002008
+ },
+ {
+ 0x0: 0x100000,
+ 0x10: 0x2000401,
+ 0x20: 0x400,
+ 0x30: 0x100401,
+ 0x40: 0x2100401,
+ 0x50: 0x0,
+ 0x60: 0x1,
+ 0x70: 0x2100001,
+ 0x80: 0x2000400,
+ 0x90: 0x100001,
+ 0xa0: 0x2000001,
+ 0xb0: 0x2100400,
+ 0xc0: 0x2100000,
+ 0xd0: 0x401,
+ 0xe0: 0x100400,
+ 0xf0: 0x2000000,
+ 0x8: 0x2100001,
+ 0x18: 0x0,
+ 0x28: 0x2000401,
+ 0x38: 0x2100400,
+ 0x48: 0x100000,
+ 0x58: 0x2000001,
+ 0x68: 0x2000000,
+ 0x78: 0x401,
+ 0x88: 0x100401,
+ 0x98: 0x2000400,
+ 0xa8: 0x2100000,
+ 0xb8: 0x100001,
+ 0xc8: 0x400,
+ 0xd8: 0x2100401,
+ 0xe8: 0x1,
+ 0xf8: 0x100400,
+ 0x100: 0x2000000,
+ 0x110: 0x100000,
+ 0x120: 0x2000401,
+ 0x130: 0x2100001,
+ 0x140: 0x100001,
+ 0x150: 0x2000400,
+ 0x160: 0x2100400,
+ 0x170: 0x100401,
+ 0x180: 0x401,
+ 0x190: 0x2100401,
+ 0x1a0: 0x100400,
+ 0x1b0: 0x1,
+ 0x1c0: 0x0,
+ 0x1d0: 0x2100000,
+ 0x1e0: 0x2000001,
+ 0x1f0: 0x400,
+ 0x108: 0x100400,
+ 0x118: 0x2000401,
+ 0x128: 0x2100001,
+ 0x138: 0x1,
+ 0x148: 0x2000000,
+ 0x158: 0x100000,
+ 0x168: 0x401,
+ 0x178: 0x2100400,
+ 0x188: 0x2000001,
+ 0x198: 0x2100000,
+ 0x1a8: 0x0,
+ 0x1b8: 0x2100401,
+ 0x1c8: 0x100401,
+ 0x1d8: 0x400,
+ 0x1e8: 0x2000400,
+ 0x1f8: 0x100001
+ },
+ {
+ 0x0: 0x8000820,
+ 0x1: 0x20000,
+ 0x2: 0x8000000,
+ 0x3: 0x20,
+ 0x4: 0x20020,
+ 0x5: 0x8020820,
+ 0x6: 0x8020800,
+ 0x7: 0x800,
+ 0x8: 0x8020000,
+ 0x9: 0x8000800,
+ 0xa: 0x20800,
+ 0xb: 0x8020020,
+ 0xc: 0x820,
+ 0xd: 0x0,
+ 0xe: 0x8000020,
+ 0xf: 0x20820,
+ 0x80000000: 0x800,
+ 0x80000001: 0x8020820,
+ 0x80000002: 0x8000820,
+ 0x80000003: 0x8000000,
+ 0x80000004: 0x8020000,
+ 0x80000005: 0x20800,
+ 0x80000006: 0x20820,
+ 0x80000007: 0x20,
+ 0x80000008: 0x8000020,
+ 0x80000009: 0x820,
+ 0x8000000a: 0x20020,
+ 0x8000000b: 0x8020800,
+ 0x8000000c: 0x0,
+ 0x8000000d: 0x8020020,
+ 0x8000000e: 0x8000800,
+ 0x8000000f: 0x20000,
+ 0x10: 0x20820,
+ 0x11: 0x8020800,
+ 0x12: 0x20,
+ 0x13: 0x800,
+ 0x14: 0x8000800,
+ 0x15: 0x8000020,
+ 0x16: 0x8020020,
+ 0x17: 0x20000,
+ 0x18: 0x0,
+ 0x19: 0x20020,
+ 0x1a: 0x8020000,
+ 0x1b: 0x8000820,
+ 0x1c: 0x8020820,
+ 0x1d: 0x20800,
+ 0x1e: 0x820,
+ 0x1f: 0x8000000,
+ 0x80000010: 0x20000,
+ 0x80000011: 0x800,
+ 0x80000012: 0x8020020,
+ 0x80000013: 0x20820,
+ 0x80000014: 0x20,
+ 0x80000015: 0x8020000,
+ 0x80000016: 0x8000000,
+ 0x80000017: 0x8000820,
+ 0x80000018: 0x8020820,
+ 0x80000019: 0x8000020,
+ 0x8000001a: 0x8000800,
+ 0x8000001b: 0x0,
+ 0x8000001c: 0x20800,
+ 0x8000001d: 0x820,
+ 0x8000001e: 0x20020,
+ 0x8000001f: 0x8020800
+ }
+ ];
+
+ // Masks that select the SBOX input
+ var SBOX_MASK = [
+ 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
+ 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f
+ ];
+
+ /**
+ * DES block cipher algorithm.
+ */
+ var DES = C_algo.DES = BlockCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var key = this._key;
+ var keyWords = key.words;
+
+ // Select 56 bits according to PC1
+ var keyBits = [];
+ for (var i = 0; i < 56; i++) {
+ var keyBitPos = PC1[i] - 1;
+ keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;
+ }
+
+ // Assemble 16 subkeys
+ var subKeys = this._subKeys = [];
+ for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
+ // Create subkey
+ var subKey = subKeys[nSubKey] = [];
+
+ // Shortcut
+ var bitShift = BIT_SHIFTS[nSubKey];
+
+ // Select 48 bits according to PC2
+ for (var i = 0; i < 24; i++) {
+ // Select from the left 28 key bits
+ subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);
+
+ // Select from the right 28 key bits
+ subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);
+ }
+
+ // Since each subkey is applied to an expanded 32-bit input,
+ // the subkey can be broken into 8 values scaled to 32-bits,
+ // which allows the key to be used without expansion
+ subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);
+ for (var i = 1; i < 7; i++) {
+ subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);
+ }
+ subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);
+ }
+
+ // Compute inverse subkeys
+ var invSubKeys = this._invSubKeys = [];
+ for (var i = 0; i < 16; i++) {
+ invSubKeys[i] = subKeys[15 - i];
+ }
+ },
+
+ encryptBlock: function (M, offset) {
+ this._doCryptBlock(M, offset, this._subKeys);
+ },
+
+ decryptBlock: function (M, offset) {
+ this._doCryptBlock(M, offset, this._invSubKeys);
+ },
+
+ _doCryptBlock: function (M, offset, subKeys) {
+ // Get input
+ this._lBlock = M[offset];
+ this._rBlock = M[offset + 1];
+
+ // Initial permutation
+ exchangeLR.call(this, 4, 0x0f0f0f0f);
+ exchangeLR.call(this, 16, 0x0000ffff);
+ exchangeRL.call(this, 2, 0x33333333);
+ exchangeRL.call(this, 8, 0x00ff00ff);
+ exchangeLR.call(this, 1, 0x55555555);
+
+ // Rounds
+ for (var round = 0; round < 16; round++) {
+ // Shortcuts
+ var subKey = subKeys[round];
+ var lBlock = this._lBlock;
+ var rBlock = this._rBlock;
+
+ // Feistel function
+ var f = 0;
+ for (var i = 0; i < 8; i++) {
+ f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
+ }
+ this._lBlock = rBlock;
+ this._rBlock = lBlock ^ f;
+ }
+
+ // Undo swap from last round
+ var t = this._lBlock;
+ this._lBlock = this._rBlock;
+ this._rBlock = t;
+
+ // Final permutation
+ exchangeLR.call(this, 1, 0x55555555);
+ exchangeRL.call(this, 8, 0x00ff00ff);
+ exchangeRL.call(this, 2, 0x33333333);
+ exchangeLR.call(this, 16, 0x0000ffff);
+ exchangeLR.call(this, 4, 0x0f0f0f0f);
+
+ // Set output
+ M[offset] = this._lBlock;
+ M[offset + 1] = this._rBlock;
+ },
+
+ keySize: 64/32,
+
+ ivSize: 64/32,
+
+ blockSize: 64/32
+ });
+
+ // Swap bits across the left and right words
+ function exchangeLR(offset, mask) {
+ var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;
+ this._rBlock ^= t;
+ this._lBlock ^= t << offset;
+ }
+
+ function exchangeRL(offset, mask) {
+ var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;
+ this._lBlock ^= t;
+ this._rBlock ^= t << offset;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);
+ */
+ C.DES = BlockCipher._createHelper(DES);
+
+ /**
+ * Triple-DES block cipher algorithm.
+ */
+ var TripleDES = C_algo.TripleDES = BlockCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var key = this._key;
+ var keyWords = key.words;
+ // Make sure the key length is valid (64, 128 or >= 192 bit)
+ if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
+ throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');
+ }
+
+ // Extend the key according to the keying options defined in 3DES standard
+ var key1 = keyWords.slice(0, 2);
+ var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
+ var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
+
+ // Create DES instances
+ this._des1 = DES.createEncryptor(WordArray.create(key1));
+ this._des2 = DES.createEncryptor(WordArray.create(key2));
+ this._des3 = DES.createEncryptor(WordArray.create(key3));
+ },
+
+ encryptBlock: function (M, offset) {
+ this._des1.encryptBlock(M, offset);
+ this._des2.decryptBlock(M, offset);
+ this._des3.encryptBlock(M, offset);
+ },
+
+ decryptBlock: function (M, offset) {
+ this._des3.decryptBlock(M, offset);
+ this._des2.encryptBlock(M, offset);
+ this._des1.decryptBlock(M, offset);
+ },
+
+ keySize: 192/32,
+
+ ivSize: 64/32,
+
+ blockSize: 64/32
+ });
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
+ */
+ C.TripleDES = BlockCipher._createHelper(TripleDES);
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var StreamCipher = C_lib.StreamCipher;
+ var C_algo = C.algo;
+
+ /**
+ * RC4 stream cipher algorithm.
+ */
+ var RC4 = C_algo.RC4 = StreamCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var key = this._key;
+ var keyWords = key.words;
+ var keySigBytes = key.sigBytes;
+
+ // Init sbox
+ var S = this._S = [];
+ for (var i = 0; i < 256; i++) {
+ S[i] = i;
+ }
+
+ // Key setup
+ for (var i = 0, j = 0; i < 256; i++) {
+ var keyByteIndex = i % keySigBytes;
+ var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;
+
+ j = (j + S[i] + keyByte) % 256;
+
+ // Swap
+ var t = S[i];
+ S[i] = S[j];
+ S[j] = t;
+ }
+
+ // Counters
+ this._i = this._j = 0;
+ },
+
+ _doProcessBlock: function (M, offset) {
+ M[offset] ^= generateKeystreamWord.call(this);
+ },
+
+ keySize: 256/32,
+
+ ivSize: 0
+ });
+
+ function generateKeystreamWord() {
+ // Shortcuts
+ var S = this._S;
+ var i = this._i;
+ var j = this._j;
+
+ // Generate keystream word
+ var keystreamWord = 0;
+ for (var n = 0; n < 4; n++) {
+ i = (i + 1) % 256;
+ j = (j + S[i]) % 256;
+
+ // Swap
+ var t = S[i];
+ S[i] = S[j];
+ S[j] = t;
+
+ keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);
+ }
+
+ // Update counters
+ this._i = i;
+ this._j = j;
+
+ return keystreamWord;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
+ */
+ C.RC4 = StreamCipher._createHelper(RC4);
+
+ /**
+ * Modified RC4 stream cipher algorithm.
+ */
+ var RC4Drop = C_algo.RC4Drop = RC4.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} drop The number of keystream words to drop. Default 192
+ */
+ cfg: RC4.cfg.extend({
+ drop: 192
+ }),
+
+ _doReset: function () {
+ RC4._doReset.call(this);
+
+ // Drop
+ for (var i = this.cfg.drop; i > 0; i--) {
+ generateKeystreamWord.call(this);
+ }
+ }
+ });
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
+ */
+ C.RC4Drop = StreamCipher._createHelper(RC4Drop);
+ }());
+
+
+ /** @preserve
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
+ * derived from CryptoJS.mode.CTR
+ * Jan Hruby jhruby.web@gmail.com
+ */
+ CryptoJS.mode.CTRGladman = (function () {
+ var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
+
+ function incWord(word)
+ {
+ if (((word >> 24) & 0xff) === 0xff) { //overflow
+ var b1 = (word >> 16)&0xff;
+ var b2 = (word >> 8)&0xff;
+ var b3 = word & 0xff;
+
+ if (b1 === 0xff) // overflow b1
+ {
+ b1 = 0;
+ if (b2 === 0xff)
+ {
+ b2 = 0;
+ if (b3 === 0xff)
+ {
+ b3 = 0;
+ }
+ else
+ {
+ ++b3;
+ }
+ }
+ else
+ {
+ ++b2;
+ }
+ }
+ else
+ {
+ ++b1;
+ }
+
+ word = 0;
+ word += (b1 << 16);
+ word += (b2 << 8);
+ word += b3;
+ }
+ else
+ {
+ word += (0x01 << 24);
+ }
+ return word;
+ }
+
+ function incCounter(counter)
+ {
+ if ((counter[0] = incWord(counter[0])) === 0)
+ {
+ // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8
+ counter[1] = incWord(counter[1]);
+ }
+ return counter;
+ }
+
+ var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher
+ var blockSize = cipher.blockSize;
+ var iv = this._iv;
+ var counter = this._counter;
+
+ // Generate keystream
+ if (iv) {
+ counter = this._counter = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ }
+
+ incCounter(counter);
+
+ var keystream = counter.slice(0);
+ cipher.encryptBlock(keystream, 0);
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+ });
+
+ CTRGladman.Decryptor = Encryptor;
+
+ return CTRGladman;
+ }());
+
+
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var StreamCipher = C_lib.StreamCipher;
+ var C_algo = C.algo;
+
+ // Reusable objects
+ var S = [];
+ var C_ = [];
+ var G = [];
+
+ /**
+ * Rabbit stream cipher algorithm
+ */
+ var Rabbit = C_algo.Rabbit = StreamCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var K = this._key.words;
+ var iv = this.cfg.iv;
+
+ // Swap endian
+ for (var i = 0; i < 4; i++) {
+ K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |
+ (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);
+ }
+
+ // Generate initial state values
+ var X = this._X = [
+ K[0], (K[3] << 16) | (K[2] >>> 16),
+ K[1], (K[0] << 16) | (K[3] >>> 16),
+ K[2], (K[1] << 16) | (K[0] >>> 16),
+ K[3], (K[2] << 16) | (K[1] >>> 16)
+ ];
+
+ // Generate initial counter values
+ var C = this._C = [
+ (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
+ (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
+ (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
+ (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
+ ];
+
+ // Carry bit
+ this._b = 0;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+
+ // Modify the counters
+ for (var i = 0; i < 8; i++) {
+ C[i] ^= X[(i + 4) & 7];
+ }
+
+ // IV setup
+ if (iv) {
+ // Shortcuts
+ var IV = iv.words;
+ var IV_0 = IV[0];
+ var IV_1 = IV[1];
+
+ // Generate four subvectors
+ var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
+ var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
+ var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
+ var i3 = (i2 << 16) | (i0 & 0x0000ffff);
+
+ // Modify counter values
+ C[0] ^= i0;
+ C[1] ^= i1;
+ C[2] ^= i2;
+ C[3] ^= i3;
+ C[4] ^= i0;
+ C[5] ^= i1;
+ C[6] ^= i2;
+ C[7] ^= i3;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+ }
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var X = this._X;
+
+ // Iterate the system
+ nextState.call(this);
+
+ // Generate four keystream words
+ S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
+ S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
+ S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
+ S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
+
+ for (var i = 0; i < 4; i++) {
+ // Swap endian
+ S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
+ (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
+
+ // Encrypt
+ M[offset + i] ^= S[i];
+ }
+ },
+
+ blockSize: 128/32,
+
+ ivSize: 64/32
+ });
+
+ function nextState() {
+ // Shortcuts
+ var X = this._X;
+ var C = this._C;
+
+ // Save old counter values
+ for (var i = 0; i < 8; i++) {
+ C_[i] = C[i];
+ }
+
+ // Calculate new counter values
+ C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
+ C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
+ C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
+ C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
+ C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
+ C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
+ C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
+ C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
+ this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
+
+ // Calculate the g-values
+ for (var i = 0; i < 8; i++) {
+ var gx = X[i] + C[i];
+
+ // Construct high and low argument for squaring
+ var ga = gx & 0xffff;
+ var gb = gx >>> 16;
+
+ // Calculate high and low result of squaring
+ var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
+ var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
+
+ // High XOR low
+ G[i] = gh ^ gl;
+ }
+
+ // Calculate new state values
+ X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
+ X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;
+ X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
+ X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;
+ X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
+ X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;
+ X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
+ X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
+ */
+ C.Rabbit = StreamCipher._createHelper(Rabbit);
+ }());
+
+
+ /**
+ * Counter block mode.
+ */
+ CryptoJS.mode.CTR = (function () {
+ var CTR = CryptoJS.lib.BlockCipherMode.extend();
+
+ var Encryptor = CTR.Encryptor = CTR.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher
+ var blockSize = cipher.blockSize;
+ var iv = this._iv;
+ var counter = this._counter;
+
+ // Generate keystream
+ if (iv) {
+ counter = this._counter = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ }
+ var keystream = counter.slice(0);
+ cipher.encryptBlock(keystream, 0);
+
+ // Increment counter
+ counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+ });
+
+ CTR.Decryptor = Encryptor;
+
+ return CTR;
+ }());
+
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var StreamCipher = C_lib.StreamCipher;
+ var C_algo = C.algo;
+
+ // Reusable objects
+ var S = [];
+ var C_ = [];
+ var G = [];
+
+ /**
+ * Rabbit stream cipher algorithm.
+ *
+ * This is a legacy version that neglected to convert the key to little-endian.
+ * This error doesn't affect the cipher's security,
+ * but it does affect its compatibility with other implementations.
+ */
+ var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var K = this._key.words;
+ var iv = this.cfg.iv;
+
+ // Generate initial state values
+ var X = this._X = [
+ K[0], (K[3] << 16) | (K[2] >>> 16),
+ K[1], (K[0] << 16) | (K[3] >>> 16),
+ K[2], (K[1] << 16) | (K[0] >>> 16),
+ K[3], (K[2] << 16) | (K[1] >>> 16)
+ ];
+
+ // Generate initial counter values
+ var C = this._C = [
+ (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
+ (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
+ (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
+ (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
+ ];
+
+ // Carry bit
+ this._b = 0;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+
+ // Modify the counters
+ for (var i = 0; i < 8; i++) {
+ C[i] ^= X[(i + 4) & 7];
+ }
+
+ // IV setup
+ if (iv) {
+ // Shortcuts
+ var IV = iv.words;
+ var IV_0 = IV[0];
+ var IV_1 = IV[1];
+
+ // Generate four subvectors
+ var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
+ var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
+ var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
+ var i3 = (i2 << 16) | (i0 & 0x0000ffff);
+
+ // Modify counter values
+ C[0] ^= i0;
+ C[1] ^= i1;
+ C[2] ^= i2;
+ C[3] ^= i3;
+ C[4] ^= i0;
+ C[5] ^= i1;
+ C[6] ^= i2;
+ C[7] ^= i3;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+ }
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var X = this._X;
+
+ // Iterate the system
+ nextState.call(this);
+
+ // Generate four keystream words
+ S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
+ S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
+ S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
+ S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
+
+ for (var i = 0; i < 4; i++) {
+ // Swap endian
+ S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
+ (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
+
+ // Encrypt
+ M[offset + i] ^= S[i];
+ }
+ },
+
+ blockSize: 128/32,
+
+ ivSize: 64/32
+ });
+
+ function nextState() {
+ // Shortcuts
+ var X = this._X;
+ var C = this._C;
+
+ // Save old counter values
+ for (var i = 0; i < 8; i++) {
+ C_[i] = C[i];
+ }
+
+ // Calculate new counter values
+ C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
+ C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
+ C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
+ C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
+ C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
+ C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
+ C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
+ C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
+ this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
+
+ // Calculate the g-values
+ for (var i = 0; i < 8; i++) {
+ var gx = X[i] + C[i];
+
+ // Construct high and low argument for squaring
+ var ga = gx & 0xffff;
+ var gb = gx >>> 16;
+
+ // Calculate high and low result of squaring
+ var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
+ var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
+
+ // High XOR low
+ G[i] = gh ^ gl;
+ }
+
+ // Calculate new state values
+ X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
+ X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;
+ X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
+ X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;
+ X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
+ X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;
+ X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
+ X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
+ */
+ C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
+ }());
+
+
+ /**
+ * Zero padding strategy.
+ */
+ CryptoJS.pad.ZeroPadding = {
+ pad: function (data, blockSize) {
+ // Shortcut
+ var blockSizeBytes = blockSize * 4;
+
+ // Pad
+ data.clamp();
+ data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);
+ },
+
+ unpad: function (data) {
+ // Shortcut
+ var dataWords = data.words;
+
+ // Unpad
+ var i = data.sigBytes - 1;
+ for (var i = data.sigBytes - 1; i >= 0; i--) {
+ if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {
+ data.sigBytes = i + 1;
+ break;
+ }
+ }
+ }
+ };
+
+
+ return CryptoJS;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/docs/QuickStartGuide.wiki b/wechat/miniprogram/node_modules/crypto-js/docs/QuickStartGuide.wiki
new file mode 100644
index 00000000..2bee35d2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/docs/QuickStartGuide.wiki
@@ -0,0 +1,470 @@
+
+
+----
+
+= Quick-start Guide =
+
+== Hashers ==
+
+=== The Hasher Algorithms ===
+
+==== MD5 ====
+
+MD5 is a widely used hash function. It's been used in a variety of security applications and is also commonly used to check the integrity of files. Though, MD5 is not collision resistant, and it isn't suitable for applications like SSL certificates or digital signatures that rely on this property.
+
+{{{
+
+
+}}}
+
+==== SHA-1 ====
+
+The SHA hash functions were designed by the National Security Agency (NSA). SHA-1 is the most established of the existing SHA hash functions, and it's used in a variety of security applications and protocols. Though, SHA-1's collision resistance has been weakening as new attacks are discovered or improved.
+
+{{{
+
+
+}}}
+
+==== SHA-2 ====
+
+SHA-256 is one of the four variants in the SHA-2 set. It isn't as widely used as SHA-1, though it appears to provide much better security.
+
+{{{
+
+
+}}}
+
+SHA-512 is largely identical to SHA-256 but operates on 64-bit words rather than 32.
+
+{{{
+
+
+}}}
+
+CryptoJS also supports SHA-224 and SHA-384, which are largely identical but truncated versions of SHA-256 and SHA-512 respectively.
+
+==== SHA-3 ====
+
+SHA-3 is the winner of a five-year competition to select a new cryptographic hash algorithm where 64 competing designs were evaluated.
+
+{{{
+
+
+}}}
+
+SHA-3 can be configured to output hash lengths of one of 224, 256, 384, or 512 bits. The default is 512 bits.
+
+{{{
+
+
+}}}
+
+==== RIPEMD-160 ====
+
+{{{
+
+
+}}}
+
+=== The Hasher Input ===
+
+The hash algorithms accept either strings or instances of CryptoJS.lib.WordArray. A WordArray object represents an array of 32-bit words. When you pass a string, it's automatically converted to a WordArray encoded as UTF-8.
+
+=== The Hasher Output ===
+
+The hash you get back isn't a string yet. It's a WordArray object. When you use a WordArray object in a string context, it's automatically converted to a hex string.
+
+{{{
+
+
+}}}
+
+You can convert a WordArray object to other formats by explicitly calling the toString method and passing an encoder.
+
+{{{
+
+
+
+}}}
+
+=== Progressive Hashing ===
+
+{{{
+
+
+}}}
+
+== HMAC ==
+
+Keyed-hash message authentication codes (HMAC) is a mechanism for message authentication using cryptographic hash functions.
+
+HMAC can be used in combination with any iterated cryptographic hash function.
+
+{{{
+
+
+
+
+
+}}}
+
+=== Progressive HMAC Hashing ===
+
+{{{
+
+
+}}}
+
+== PBKDF2 ==
+
+PBKDF2 is a password-based key derivation function. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.
+
+A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.
+
+{{{
+
+
+}}}
+
+== Ciphers ==
+
+=== The Cipher Algorithms ===
+
+==== AES ====
+
+The Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.
+
+{{{
+
+
+}}}
+
+CryptoJS supports AES-128, AES-192, and AES-256. It will pick the variant by the size of the key you pass in. If you use a passphrase, then it will generate a 256-bit key.
+
+==== DES, Triple DES ====
+
+DES is a previously dominant algorithm for encryption, and was published as an official Federal Information Processing Standard (FIPS). DES is now considered to be insecure due to the small key size.
+
+{{{
+
+
+}}}
+
+Triple DES applies DES three times to each block to increase the key size. The algorithm is believed to be secure in this form.
+
+{{{
+
+
+}}}
+
+==== Rabbit ====
+
+Rabbit is a high-performance stream cipher and a finalist in the eSTREAM Portfolio. It is one of the four designs selected after a 3 1/2-year process where 22 designs were evaluated.
+
+{{{
+
+
+}}}
+
+==== RC4, RC4Drop ====
+
+RC4 is a widely-used stream cipher. It's used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security.
+
+{{{
+
+
+}}}
+
+It was discovered that the first few bytes of keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop.
+
+By default, 192 words (768 bytes) are dropped, but you can configure the algorithm to drop any number of words.
+
+{{{
+
+
+}}}
+
+=== Custom Key and IV ===
+
+{{{
+
+
+}}}
+
+=== Block Modes and Padding ===
+
+{{{
+
+
+
+
+}}}
+
+CryptoJS supports the following modes:
+
+ * CBC (the default)
+ * CFB
+ * CTR
+ * OFB
+ * ECB
+
+And CryptoJS supports the following padding schemes:
+
+ * Pkcs7 (the default)
+ * Iso97971
+ * AnsiX923
+ * Iso10126
+ * ZeroPadding
+ * NoPadding
+
+=== The Cipher Input ===
+
+For the plaintext message, the cipher algorithms accept either strings or instances of CryptoJS.lib.WordArray.
+
+For the key, when you pass a string, it's treated as a passphrase and used to derive an actual key and IV. Or you can pass a WordArray that represents the actual key. If you pass the actual key, you must also pass the actual IV.
+
+For the ciphertext, the cipher algorithms accept either strings or instances of CryptoJS.lib.CipherParams. A CipherParams object represents a collection of parameters such as the IV, a salt, and the raw ciphertext itself. When you pass a string, it's automatically converted to a CipherParams object according to a configurable format strategy.
+
+=== The Cipher Output ===
+
+The plaintext you get back after decryption is a WordArray object. See Hashers' Output for more detail.
+
+The ciphertext you get back after encryption isn't a string yet. It's a CipherParams object. A CipherParams object gives you access to all the parameters used during encryption. When you use a CipherParams object in a string context, it's automatically converted to a string according to a format strategy. The default is an OpenSSL-compatible format.
+
+{{{
+
+
+}}}
+
+You can define your own formats in order to be compatible with other crypto implementations. A format is an object with two methods—stringify and parse—that converts between CipherParams objects and ciphertext strings.
+
+Here's how you might write a JSON formatter:
+
+{{{
+
+
+}}}
+
+=== Progressive Ciphering ===
+
+{{{
+
+
+}}}
+
+=== Interoperability ===
+
+==== With OpenSSL ====
+
+Encrypt with OpenSSL:
+
+{{{
+openssl enc -aes-256-cbc -in infile -out outfile -pass pass:"Secret Passphrase" -e -base64
+}}}
+
+Decrypt with CryptoJS:
+
+{{{
+
+
+}}}
+
+== Encoders ==
+
+CryptoJS can convert from encoding formats such as Base64, Latin1 or Hex to WordArray objects and vica versa.
+
+{{{
+
+
+
+
+}}}
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/enc-base64.js b/wechat/miniprogram/node_modules/crypto-js/enc-base64.js
new file mode 100644
index 00000000..0ffcd53c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/enc-base64.js
@@ -0,0 +1,136 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var C_enc = C.enc;
+
+ /**
+ * Base64 encoding strategy.
+ */
+ var Base64 = C_enc.Base64 = {
+ /**
+ * Converts a word array to a Base64 string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The Base64 string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+ var map = this._map;
+
+ // Clamp excess bits
+ wordArray.clamp();
+
+ // Convert
+ var base64Chars = [];
+ for (var i = 0; i < sigBytes; i += 3) {
+ var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
+ var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
+ var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
+
+ var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
+
+ for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
+ base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
+ }
+ }
+
+ // Add padding
+ var paddingChar = map.charAt(64);
+ if (paddingChar) {
+ while (base64Chars.length % 4) {
+ base64Chars.push(paddingChar);
+ }
+ }
+
+ return base64Chars.join('');
+ },
+
+ /**
+ * Converts a Base64 string to a word array.
+ *
+ * @param {string} base64Str The Base64 string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Base64.parse(base64String);
+ */
+ parse: function (base64Str) {
+ // Shortcuts
+ var base64StrLength = base64Str.length;
+ var map = this._map;
+ var reverseMap = this._reverseMap;
+
+ if (!reverseMap) {
+ reverseMap = this._reverseMap = [];
+ for (var j = 0; j < map.length; j++) {
+ reverseMap[map.charCodeAt(j)] = j;
+ }
+ }
+
+ // Ignore padding
+ var paddingChar = map.charAt(64);
+ if (paddingChar) {
+ var paddingIndex = base64Str.indexOf(paddingChar);
+ if (paddingIndex !== -1) {
+ base64StrLength = paddingIndex;
+ }
+ }
+
+ // Convert
+ return parseLoop(base64Str, base64StrLength, reverseMap);
+
+ },
+
+ _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
+ };
+
+ function parseLoop(base64Str, base64StrLength, reverseMap) {
+ var words = [];
+ var nBytes = 0;
+ for (var i = 0; i < base64StrLength; i++) {
+ if (i % 4) {
+ var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
+ var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
+ var bitsCombined = bits1 | bits2;
+ words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
+ nBytes++;
+ }
+ }
+ return WordArray.create(words, nBytes);
+ }
+ }());
+
+
+ return CryptoJS.enc.Base64;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/enc-hex.js b/wechat/miniprogram/node_modules/crypto-js/enc-hex.js
new file mode 100644
index 00000000..88161ff5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/enc-hex.js
@@ -0,0 +1,18 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.enc.Hex;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/enc-latin1.js b/wechat/miniprogram/node_modules/crypto-js/enc-latin1.js
new file mode 100644
index 00000000..ade56dcd
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/enc-latin1.js
@@ -0,0 +1,18 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.enc.Latin1;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/enc-utf16.js b/wechat/miniprogram/node_modules/crypto-js/enc-utf16.js
new file mode 100644
index 00000000..7de62457
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/enc-utf16.js
@@ -0,0 +1,149 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var C_enc = C.enc;
+
+ /**
+ * UTF-16 BE encoding strategy.
+ */
+ var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
+ /**
+ * Converts a word array to a UTF-16 BE string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The UTF-16 BE string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var utf16Chars = [];
+ for (var i = 0; i < sigBytes; i += 2) {
+ var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;
+ utf16Chars.push(String.fromCharCode(codePoint));
+ }
+
+ return utf16Chars.join('');
+ },
+
+ /**
+ * Converts a UTF-16 BE string to a word array.
+ *
+ * @param {string} utf16Str The UTF-16 BE string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
+ */
+ parse: function (utf16Str) {
+ // Shortcut
+ var utf16StrLength = utf16Str.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < utf16StrLength; i++) {
+ words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
+ }
+
+ return WordArray.create(words, utf16StrLength * 2);
+ }
+ };
+
+ /**
+ * UTF-16 LE encoding strategy.
+ */
+ C_enc.Utf16LE = {
+ /**
+ * Converts a word array to a UTF-16 LE string.
+ *
+ * @param {WordArray} wordArray The word array.
+ *
+ * @return {string} The UTF-16 LE string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
+ */
+ stringify: function (wordArray) {
+ // Shortcuts
+ var words = wordArray.words;
+ var sigBytes = wordArray.sigBytes;
+
+ // Convert
+ var utf16Chars = [];
+ for (var i = 0; i < sigBytes; i += 2) {
+ var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);
+ utf16Chars.push(String.fromCharCode(codePoint));
+ }
+
+ return utf16Chars.join('');
+ },
+
+ /**
+ * Converts a UTF-16 LE string to a word array.
+ *
+ * @param {string} utf16Str The UTF-16 LE string.
+ *
+ * @return {WordArray} The word array.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
+ */
+ parse: function (utf16Str) {
+ // Shortcut
+ var utf16StrLength = utf16Str.length;
+
+ // Convert
+ var words = [];
+ for (var i = 0; i < utf16StrLength; i++) {
+ words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));
+ }
+
+ return WordArray.create(words, utf16StrLength * 2);
+ }
+ };
+
+ function swapEndian(word) {
+ return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);
+ }
+ }());
+
+
+ return CryptoJS.enc.Utf16;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/enc-utf8.js b/wechat/miniprogram/node_modules/crypto-js/enc-utf8.js
new file mode 100644
index 00000000..e7a251d8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/enc-utf8.js
@@ -0,0 +1,18 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.enc.Utf8;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/evpkdf.js b/wechat/miniprogram/node_modules/crypto-js/evpkdf.js
new file mode 100644
index 00000000..578974aa
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/evpkdf.js
@@ -0,0 +1,134 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./sha1", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var WordArray = C_lib.WordArray;
+ var C_algo = C.algo;
+ var MD5 = C_algo.MD5;
+
+ /**
+ * This key derivation function is meant to conform with EVP_BytesToKey.
+ * www.openssl.org/docs/crypto/EVP_BytesToKey.html
+ */
+ var EvpKDF = C_algo.EvpKDF = Base.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
+ * @property {Hasher} hasher The hash algorithm to use. Default: MD5
+ * @property {number} iterations The number of iterations to perform. Default: 1
+ */
+ cfg: Base.extend({
+ keySize: 128/32,
+ hasher: MD5,
+ iterations: 1
+ }),
+
+ /**
+ * Initializes a newly created key derivation function.
+ *
+ * @param {Object} cfg (Optional) The configuration options to use for the derivation.
+ *
+ * @example
+ *
+ * var kdf = CryptoJS.algo.EvpKDF.create();
+ * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
+ * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
+ */
+ init: function (cfg) {
+ this.cfg = this.cfg.extend(cfg);
+ },
+
+ /**
+ * Derives a key from a password.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @example
+ *
+ * var key = kdf.compute(password, salt);
+ */
+ compute: function (password, salt) {
+ var block;
+
+ // Shortcut
+ var cfg = this.cfg;
+
+ // Init hasher
+ var hasher = cfg.hasher.create();
+
+ // Initial values
+ var derivedKey = WordArray.create();
+
+ // Shortcuts
+ var derivedKeyWords = derivedKey.words;
+ var keySize = cfg.keySize;
+ var iterations = cfg.iterations;
+
+ // Generate key
+ while (derivedKeyWords.length < keySize) {
+ if (block) {
+ hasher.update(block);
+ }
+ block = hasher.update(password).finalize(salt);
+ hasher.reset();
+
+ // Iterations
+ for (var i = 1; i < iterations; i++) {
+ block = hasher.finalize(block);
+ hasher.reset();
+ }
+
+ derivedKey.concat(block);
+ }
+ derivedKey.sigBytes = keySize * 4;
+
+ return derivedKey;
+ }
+ });
+
+ /**
+ * Derives a key from a password.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ * @param {Object} cfg (Optional) The configuration options to use for this computation.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var key = CryptoJS.EvpKDF(password, salt);
+ * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
+ * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
+ */
+ C.EvpKDF = function (password, salt, cfg) {
+ return EvpKDF.create(cfg).compute(password, salt);
+ };
+ }());
+
+
+ return CryptoJS.EvpKDF;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/format-hex.js b/wechat/miniprogram/node_modules/crypto-js/format-hex.js
new file mode 100644
index 00000000..2e9a861f
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/format-hex.js
@@ -0,0 +1,66 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function (undefined) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var CipherParams = C_lib.CipherParams;
+ var C_enc = C.enc;
+ var Hex = C_enc.Hex;
+ var C_format = C.format;
+
+ var HexFormatter = C_format.Hex = {
+ /**
+ * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
+ *
+ * @param {CipherParams} cipherParams The cipher params object.
+ *
+ * @return {string} The hexadecimally encoded string.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hexString = CryptoJS.format.Hex.stringify(cipherParams);
+ */
+ stringify: function (cipherParams) {
+ return cipherParams.ciphertext.toString(Hex);
+ },
+
+ /**
+ * Converts a hexadecimally encoded ciphertext string to a cipher params object.
+ *
+ * @param {string} input The hexadecimally encoded string.
+ *
+ * @return {CipherParams} The cipher params object.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var cipherParams = CryptoJS.format.Hex.parse(hexString);
+ */
+ parse: function (input) {
+ var ciphertext = Hex.parse(input);
+ return CipherParams.create({ ciphertext: ciphertext });
+ }
+ };
+ }());
+
+
+ return CryptoJS.format.Hex;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/format-openssl.js b/wechat/miniprogram/node_modules/crypto-js/format-openssl.js
new file mode 100644
index 00000000..3373edc6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/format-openssl.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.format.OpenSSL;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-md5.js b/wechat/miniprogram/node_modules/crypto-js/hmac-md5.js
new file mode 100644
index 00000000..ad7a90ad
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-md5.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./md5"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./md5", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacMD5;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-ripemd160.js b/wechat/miniprogram/node_modules/crypto-js/hmac-ripemd160.js
new file mode 100644
index 00000000..73d55a77
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-ripemd160.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./ripemd160"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./ripemd160", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacRIPEMD160;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-sha1.js b/wechat/miniprogram/node_modules/crypto-js/hmac-sha1.js
new file mode 100644
index 00000000..0b570cbc
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-sha1.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./sha1", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacSHA1;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-sha224.js b/wechat/miniprogram/node_modules/crypto-js/hmac-sha224.js
new file mode 100644
index 00000000..3778863a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-sha224.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./sha256"), require("./sha224"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./sha256", "./sha224", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacSHA224;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-sha256.js b/wechat/miniprogram/node_modules/crypto-js/hmac-sha256.js
new file mode 100644
index 00000000..33b0c9fe
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-sha256.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./sha256", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacSHA256;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-sha3.js b/wechat/miniprogram/node_modules/crypto-js/hmac-sha3.js
new file mode 100644
index 00000000..12488049
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-sha3.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha3"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core", "./sha3", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacSHA3;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-sha384.js b/wechat/miniprogram/node_modules/crypto-js/hmac-sha384.js
new file mode 100644
index 00000000..0036e2b8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-sha384.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./sha384"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core", "./sha512", "./sha384", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacSHA384;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac-sha512.js b/wechat/miniprogram/node_modules/crypto-js/hmac-sha512.js
new file mode 100644
index 00000000..c1005b6a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac-sha512.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core", "./sha512", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.HmacSHA512;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/hmac.js b/wechat/miniprogram/node_modules/crypto-js/hmac.js
new file mode 100644
index 00000000..8c098511
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/hmac.js
@@ -0,0 +1,143 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var C_enc = C.enc;
+ var Utf8 = C_enc.Utf8;
+ var C_algo = C.algo;
+
+ /**
+ * HMAC algorithm.
+ */
+ var HMAC = C_algo.HMAC = Base.extend({
+ /**
+ * Initializes a newly created HMAC.
+ *
+ * @param {Hasher} hasher The hash algorithm to use.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @example
+ *
+ * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
+ */
+ init: function (hasher, key) {
+ // Init hasher
+ hasher = this._hasher = new hasher.init();
+
+ // Convert string to WordArray, else assume WordArray already
+ if (typeof key == 'string') {
+ key = Utf8.parse(key);
+ }
+
+ // Shortcuts
+ var hasherBlockSize = hasher.blockSize;
+ var hasherBlockSizeBytes = hasherBlockSize * 4;
+
+ // Allow arbitrary length keys
+ if (key.sigBytes > hasherBlockSizeBytes) {
+ key = hasher.finalize(key);
+ }
+
+ // Clamp excess bits
+ key.clamp();
+
+ // Clone key for inner and outer pads
+ var oKey = this._oKey = key.clone();
+ var iKey = this._iKey = key.clone();
+
+ // Shortcuts
+ var oKeyWords = oKey.words;
+ var iKeyWords = iKey.words;
+
+ // XOR keys with pad constants
+ for (var i = 0; i < hasherBlockSize; i++) {
+ oKeyWords[i] ^= 0x5c5c5c5c;
+ iKeyWords[i] ^= 0x36363636;
+ }
+ oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
+
+ // Set initial values
+ this.reset();
+ },
+
+ /**
+ * Resets this HMAC to its initial state.
+ *
+ * @example
+ *
+ * hmacHasher.reset();
+ */
+ reset: function () {
+ // Shortcut
+ var hasher = this._hasher;
+
+ // Reset
+ hasher.reset();
+ hasher.update(this._iKey);
+ },
+
+ /**
+ * Updates this HMAC with a message.
+ *
+ * @param {WordArray|string} messageUpdate The message to append.
+ *
+ * @return {HMAC} This HMAC instance.
+ *
+ * @example
+ *
+ * hmacHasher.update('message');
+ * hmacHasher.update(wordArray);
+ */
+ update: function (messageUpdate) {
+ this._hasher.update(messageUpdate);
+
+ // Chainable
+ return this;
+ },
+
+ /**
+ * Finalizes the HMAC computation.
+ * Note that the finalize operation is effectively a destructive, read-once operation.
+ *
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @example
+ *
+ * var hmac = hmacHasher.finalize();
+ * var hmac = hmacHasher.finalize('message');
+ * var hmac = hmacHasher.finalize(wordArray);
+ */
+ finalize: function (messageUpdate) {
+ // Shortcut
+ var hasher = this._hasher;
+
+ // Compute HMAC
+ var innerHash = hasher.finalize(messageUpdate);
+ hasher.reset();
+ var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
+
+ return hmac;
+ }
+ });
+ }());
+
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/index.js b/wechat/miniprogram/node_modules/crypto-js/index.js
new file mode 100644
index 00000000..c93556a7
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/index.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory);
+ }
+ else {
+ // Global (browser)
+ root.CryptoJS = factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/lib-typedarrays.js b/wechat/miniprogram/node_modules/crypto-js/lib-typedarrays.js
new file mode 100644
index 00000000..264b2107
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/lib-typedarrays.js
@@ -0,0 +1,76 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Check if typed arrays are supported
+ if (typeof ArrayBuffer != 'function') {
+ return;
+ }
+
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+
+ // Reference original init
+ var superInit = WordArray.init;
+
+ // Augment WordArray.init to handle typed arrays
+ var subInit = WordArray.init = function (typedArray) {
+ // Convert buffers to uint8
+ if (typedArray instanceof ArrayBuffer) {
+ typedArray = new Uint8Array(typedArray);
+ }
+
+ // Convert other array views to uint8
+ if (
+ typedArray instanceof Int8Array ||
+ (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) ||
+ typedArray instanceof Int16Array ||
+ typedArray instanceof Uint16Array ||
+ typedArray instanceof Int32Array ||
+ typedArray instanceof Uint32Array ||
+ typedArray instanceof Float32Array ||
+ typedArray instanceof Float64Array
+ ) {
+ typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
+ }
+
+ // Handle Uint8Array
+ if (typedArray instanceof Uint8Array) {
+ // Shortcut
+ var typedArrayByteLength = typedArray.byteLength;
+
+ // Extract bytes
+ var words = [];
+ for (var i = 0; i < typedArrayByteLength; i++) {
+ words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);
+ }
+
+ // Initialize this word array
+ superInit.call(this, words, typedArrayByteLength);
+ } else {
+ // Else call normal init
+ superInit.apply(this, arguments);
+ }
+ };
+
+ subInit.prototype = WordArray;
+ }());
+
+
+ return CryptoJS.lib.WordArray;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/md5.js b/wechat/miniprogram/node_modules/crypto-js/md5.js
new file mode 100644
index 00000000..12b0fdd4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/md5.js
@@ -0,0 +1,268 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Constants table
+ var T = [];
+
+ // Compute constants
+ (function () {
+ for (var i = 0; i < 64; i++) {
+ T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
+ }
+ }());
+
+ /**
+ * MD5 hash algorithm.
+ */
+ var MD5 = C_algo.MD5 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init([
+ 0x67452301, 0xefcdab89,
+ 0x98badcfe, 0x10325476
+ ]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Swap endian
+ for (var i = 0; i < 16; i++) {
+ // Shortcuts
+ var offset_i = offset + i;
+ var M_offset_i = M[offset_i];
+
+ M[offset_i] = (
+ (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
+ (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
+ );
+ }
+
+ // Shortcuts
+ var H = this._hash.words;
+
+ var M_offset_0 = M[offset + 0];
+ var M_offset_1 = M[offset + 1];
+ var M_offset_2 = M[offset + 2];
+ var M_offset_3 = M[offset + 3];
+ var M_offset_4 = M[offset + 4];
+ var M_offset_5 = M[offset + 5];
+ var M_offset_6 = M[offset + 6];
+ var M_offset_7 = M[offset + 7];
+ var M_offset_8 = M[offset + 8];
+ var M_offset_9 = M[offset + 9];
+ var M_offset_10 = M[offset + 10];
+ var M_offset_11 = M[offset + 11];
+ var M_offset_12 = M[offset + 12];
+ var M_offset_13 = M[offset + 13];
+ var M_offset_14 = M[offset + 14];
+ var M_offset_15 = M[offset + 15];
+
+ // Working varialbes
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+
+ // Computation
+ a = FF(a, b, c, d, M_offset_0, 7, T[0]);
+ d = FF(d, a, b, c, M_offset_1, 12, T[1]);
+ c = FF(c, d, a, b, M_offset_2, 17, T[2]);
+ b = FF(b, c, d, a, M_offset_3, 22, T[3]);
+ a = FF(a, b, c, d, M_offset_4, 7, T[4]);
+ d = FF(d, a, b, c, M_offset_5, 12, T[5]);
+ c = FF(c, d, a, b, M_offset_6, 17, T[6]);
+ b = FF(b, c, d, a, M_offset_7, 22, T[7]);
+ a = FF(a, b, c, d, M_offset_8, 7, T[8]);
+ d = FF(d, a, b, c, M_offset_9, 12, T[9]);
+ c = FF(c, d, a, b, M_offset_10, 17, T[10]);
+ b = FF(b, c, d, a, M_offset_11, 22, T[11]);
+ a = FF(a, b, c, d, M_offset_12, 7, T[12]);
+ d = FF(d, a, b, c, M_offset_13, 12, T[13]);
+ c = FF(c, d, a, b, M_offset_14, 17, T[14]);
+ b = FF(b, c, d, a, M_offset_15, 22, T[15]);
+
+ a = GG(a, b, c, d, M_offset_1, 5, T[16]);
+ d = GG(d, a, b, c, M_offset_6, 9, T[17]);
+ c = GG(c, d, a, b, M_offset_11, 14, T[18]);
+ b = GG(b, c, d, a, M_offset_0, 20, T[19]);
+ a = GG(a, b, c, d, M_offset_5, 5, T[20]);
+ d = GG(d, a, b, c, M_offset_10, 9, T[21]);
+ c = GG(c, d, a, b, M_offset_15, 14, T[22]);
+ b = GG(b, c, d, a, M_offset_4, 20, T[23]);
+ a = GG(a, b, c, d, M_offset_9, 5, T[24]);
+ d = GG(d, a, b, c, M_offset_14, 9, T[25]);
+ c = GG(c, d, a, b, M_offset_3, 14, T[26]);
+ b = GG(b, c, d, a, M_offset_8, 20, T[27]);
+ a = GG(a, b, c, d, M_offset_13, 5, T[28]);
+ d = GG(d, a, b, c, M_offset_2, 9, T[29]);
+ c = GG(c, d, a, b, M_offset_7, 14, T[30]);
+ b = GG(b, c, d, a, M_offset_12, 20, T[31]);
+
+ a = HH(a, b, c, d, M_offset_5, 4, T[32]);
+ d = HH(d, a, b, c, M_offset_8, 11, T[33]);
+ c = HH(c, d, a, b, M_offset_11, 16, T[34]);
+ b = HH(b, c, d, a, M_offset_14, 23, T[35]);
+ a = HH(a, b, c, d, M_offset_1, 4, T[36]);
+ d = HH(d, a, b, c, M_offset_4, 11, T[37]);
+ c = HH(c, d, a, b, M_offset_7, 16, T[38]);
+ b = HH(b, c, d, a, M_offset_10, 23, T[39]);
+ a = HH(a, b, c, d, M_offset_13, 4, T[40]);
+ d = HH(d, a, b, c, M_offset_0, 11, T[41]);
+ c = HH(c, d, a, b, M_offset_3, 16, T[42]);
+ b = HH(b, c, d, a, M_offset_6, 23, T[43]);
+ a = HH(a, b, c, d, M_offset_9, 4, T[44]);
+ d = HH(d, a, b, c, M_offset_12, 11, T[45]);
+ c = HH(c, d, a, b, M_offset_15, 16, T[46]);
+ b = HH(b, c, d, a, M_offset_2, 23, T[47]);
+
+ a = II(a, b, c, d, M_offset_0, 6, T[48]);
+ d = II(d, a, b, c, M_offset_7, 10, T[49]);
+ c = II(c, d, a, b, M_offset_14, 15, T[50]);
+ b = II(b, c, d, a, M_offset_5, 21, T[51]);
+ a = II(a, b, c, d, M_offset_12, 6, T[52]);
+ d = II(d, a, b, c, M_offset_3, 10, T[53]);
+ c = II(c, d, a, b, M_offset_10, 15, T[54]);
+ b = II(b, c, d, a, M_offset_1, 21, T[55]);
+ a = II(a, b, c, d, M_offset_8, 6, T[56]);
+ d = II(d, a, b, c, M_offset_15, 10, T[57]);
+ c = II(c, d, a, b, M_offset_6, 15, T[58]);
+ b = II(b, c, d, a, M_offset_13, 21, T[59]);
+ a = II(a, b, c, d, M_offset_4, 6, T[60]);
+ d = II(d, a, b, c, M_offset_11, 10, T[61]);
+ c = II(c, d, a, b, M_offset_2, 15, T[62]);
+ b = II(b, c, d, a, M_offset_9, 21, T[63]);
+
+ // Intermediate hash value
+ H[0] = (H[0] + a) | 0;
+ H[1] = (H[1] + b) | 0;
+ H[2] = (H[2] + c) | 0;
+ H[3] = (H[3] + d) | 0;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+
+ var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
+ var nBitsTotalL = nBitsTotal;
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
+ (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
+ );
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
+ (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
+ );
+
+ data.sigBytes = (dataWords.length + 1) * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Shortcuts
+ var hash = this._hash;
+ var H = hash.words;
+
+ // Swap endian
+ for (var i = 0; i < 4; i++) {
+ // Shortcut
+ var H_i = H[i];
+
+ H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
+ (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
+ }
+
+ // Return final computed hash
+ return hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+ function FF(a, b, c, d, x, s, t) {
+ var n = a + ((b & c) | (~b & d)) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ function GG(a, b, c, d, x, s, t) {
+ var n = a + ((b & d) | (c & ~d)) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ function HH(a, b, c, d, x, s, t) {
+ var n = a + (b ^ c ^ d) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ function II(a, b, c, d, x, s, t) {
+ var n = a + (c ^ (b | ~d)) + x + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ }
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.MD5('message');
+ * var hash = CryptoJS.MD5(wordArray);
+ */
+ C.MD5 = Hasher._createHelper(MD5);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacMD5(message, key);
+ */
+ C.HmacMD5 = Hasher._createHmacHelper(MD5);
+ }(Math));
+
+
+ return CryptoJS.MD5;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/mode-cfb.js b/wechat/miniprogram/node_modules/crypto-js/mode-cfb.js
new file mode 100644
index 00000000..444c9cb9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/mode-cfb.js
@@ -0,0 +1,80 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * Cipher Feedback block mode.
+ */
+ CryptoJS.mode.CFB = (function () {
+ var CFB = CryptoJS.lib.BlockCipherMode.extend();
+
+ CFB.Encryptor = CFB.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
+
+ // Remember this block to use with next block
+ this._prevBlock = words.slice(offset, offset + blockSize);
+ }
+ });
+
+ CFB.Decryptor = CFB.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher;
+ var blockSize = cipher.blockSize;
+
+ // Remember this block to use with next block
+ var thisBlock = words.slice(offset, offset + blockSize);
+
+ generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
+
+ // This block becomes the previous block
+ this._prevBlock = thisBlock;
+ }
+ });
+
+ function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
+ var keystream;
+
+ // Shortcut
+ var iv = this._iv;
+
+ // Generate keystream
+ if (iv) {
+ keystream = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ } else {
+ keystream = this._prevBlock;
+ }
+ cipher.encryptBlock(keystream, 0);
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+
+ return CFB;
+ }());
+
+
+ return CryptoJS.mode.CFB;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/mode-ctr-gladman.js b/wechat/miniprogram/node_modules/crypto-js/mode-ctr-gladman.js
new file mode 100644
index 00000000..bbc56876
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/mode-ctr-gladman.js
@@ -0,0 +1,116 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /** @preserve
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
+ * derived from CryptoJS.mode.CTR
+ * Jan Hruby jhruby.web@gmail.com
+ */
+ CryptoJS.mode.CTRGladman = (function () {
+ var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
+
+ function incWord(word)
+ {
+ if (((word >> 24) & 0xff) === 0xff) { //overflow
+ var b1 = (word >> 16)&0xff;
+ var b2 = (word >> 8)&0xff;
+ var b3 = word & 0xff;
+
+ if (b1 === 0xff) // overflow b1
+ {
+ b1 = 0;
+ if (b2 === 0xff)
+ {
+ b2 = 0;
+ if (b3 === 0xff)
+ {
+ b3 = 0;
+ }
+ else
+ {
+ ++b3;
+ }
+ }
+ else
+ {
+ ++b2;
+ }
+ }
+ else
+ {
+ ++b1;
+ }
+
+ word = 0;
+ word += (b1 << 16);
+ word += (b2 << 8);
+ word += b3;
+ }
+ else
+ {
+ word += (0x01 << 24);
+ }
+ return word;
+ }
+
+ function incCounter(counter)
+ {
+ if ((counter[0] = incWord(counter[0])) === 0)
+ {
+ // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8
+ counter[1] = incWord(counter[1]);
+ }
+ return counter;
+ }
+
+ var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher
+ var blockSize = cipher.blockSize;
+ var iv = this._iv;
+ var counter = this._counter;
+
+ // Generate keystream
+ if (iv) {
+ counter = this._counter = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ }
+
+ incCounter(counter);
+
+ var keystream = counter.slice(0);
+ cipher.encryptBlock(keystream, 0);
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+ });
+
+ CTRGladman.Decryptor = Encryptor;
+
+ return CTRGladman;
+ }());
+
+
+
+
+ return CryptoJS.mode.CTRGladman;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/mode-ctr.js b/wechat/miniprogram/node_modules/crypto-js/mode-ctr.js
new file mode 100644
index 00000000..c3d470a6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/mode-ctr.js
@@ -0,0 +1,58 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * Counter block mode.
+ */
+ CryptoJS.mode.CTR = (function () {
+ var CTR = CryptoJS.lib.BlockCipherMode.extend();
+
+ var Encryptor = CTR.Encryptor = CTR.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher
+ var blockSize = cipher.blockSize;
+ var iv = this._iv;
+ var counter = this._counter;
+
+ // Generate keystream
+ if (iv) {
+ counter = this._counter = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ }
+ var keystream = counter.slice(0);
+ cipher.encryptBlock(keystream, 0);
+
+ // Increment counter
+ counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+ });
+
+ CTR.Decryptor = Encryptor;
+
+ return CTR;
+ }());
+
+
+ return CryptoJS.mode.CTR;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/mode-ecb.js b/wechat/miniprogram/node_modules/crypto-js/mode-ecb.js
new file mode 100644
index 00000000..ff069217
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/mode-ecb.js
@@ -0,0 +1,40 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * Electronic Codebook block mode.
+ */
+ CryptoJS.mode.ECB = (function () {
+ var ECB = CryptoJS.lib.BlockCipherMode.extend();
+
+ ECB.Encryptor = ECB.extend({
+ processBlock: function (words, offset) {
+ this._cipher.encryptBlock(words, offset);
+ }
+ });
+
+ ECB.Decryptor = ECB.extend({
+ processBlock: function (words, offset) {
+ this._cipher.decryptBlock(words, offset);
+ }
+ });
+
+ return ECB;
+ }());
+
+
+ return CryptoJS.mode.ECB;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/mode-ofb.js b/wechat/miniprogram/node_modules/crypto-js/mode-ofb.js
new file mode 100644
index 00000000..c01314c2
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/mode-ofb.js
@@ -0,0 +1,54 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * Output Feedback block mode.
+ */
+ CryptoJS.mode.OFB = (function () {
+ var OFB = CryptoJS.lib.BlockCipherMode.extend();
+
+ var Encryptor = OFB.Encryptor = OFB.extend({
+ processBlock: function (words, offset) {
+ // Shortcuts
+ var cipher = this._cipher
+ var blockSize = cipher.blockSize;
+ var iv = this._iv;
+ var keystream = this._keystream;
+
+ // Generate keystream
+ if (iv) {
+ keystream = this._keystream = iv.slice(0);
+
+ // Remove IV for subsequent blocks
+ this._iv = undefined;
+ }
+ cipher.encryptBlock(keystream, 0);
+
+ // Encrypt
+ for (var i = 0; i < blockSize; i++) {
+ words[offset + i] ^= keystream[i];
+ }
+ }
+ });
+
+ OFB.Decryptor = Encryptor;
+
+ return OFB;
+ }());
+
+
+ return CryptoJS.mode.OFB;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/package.json b/wechat/miniprogram/node_modules/crypto-js/package.json
new file mode 100644
index 00000000..4b60e893
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "crypto-js",
+ "_id": "crypto-js@4.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==",
+ "_location": "/crypto-js",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "crypto-js",
+ "name": "crypto-js",
+ "escapedName": "crypto-js",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
+ "_shasum": "2904ab2677a9d042856a2ea2ef80de92e4a36dcc",
+ "_spec": "crypto-js",
+ "_where": "D:\\xiaoyiWechatMiniprogram\\CTWing\\miniprogram",
+ "author": {
+ "name": "Evan Vosberg",
+ "url": "http://github.com/evanvosberg"
+ },
+ "bugs": {
+ "url": "https://github.com/brix/crypto-js/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "JavaScript library of crypto standards.",
+ "homepage": "http://github.com/brix/crypto-js",
+ "keywords": [
+ "security",
+ "crypto",
+ "Hash",
+ "MD5",
+ "SHA1",
+ "SHA-1",
+ "SHA256",
+ "SHA-256",
+ "RC4",
+ "Rabbit",
+ "AES",
+ "DES",
+ "PBKDF2",
+ "HMAC",
+ "OFB",
+ "CFB",
+ "CTR",
+ "CBC",
+ "Base64"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "crypto-js",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/brix/crypto-js.git"
+ },
+ "version": "4.0.0"
+}
diff --git a/wechat/miniprogram/node_modules/crypto-js/pad-ansix923.js b/wechat/miniprogram/node_modules/crypto-js/pad-ansix923.js
new file mode 100644
index 00000000..f01f21e4
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pad-ansix923.js
@@ -0,0 +1,49 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * ANSI X.923 padding strategy.
+ */
+ CryptoJS.pad.AnsiX923 = {
+ pad: function (data, blockSize) {
+ // Shortcuts
+ var dataSigBytes = data.sigBytes;
+ var blockSizeBytes = blockSize * 4;
+
+ // Count padding bytes
+ var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
+
+ // Compute last byte position
+ var lastBytePos = dataSigBytes + nPaddingBytes - 1;
+
+ // Pad
+ data.clamp();
+ data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);
+ data.sigBytes += nPaddingBytes;
+ },
+
+ unpad: function (data) {
+ // Get number of padding bytes from last byte
+ var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
+
+ // Remove padding
+ data.sigBytes -= nPaddingBytes;
+ }
+ };
+
+
+ return CryptoJS.pad.Ansix923;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/pad-iso10126.js b/wechat/miniprogram/node_modules/crypto-js/pad-iso10126.js
new file mode 100644
index 00000000..6e2aefd8
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pad-iso10126.js
@@ -0,0 +1,44 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * ISO 10126 padding strategy.
+ */
+ CryptoJS.pad.Iso10126 = {
+ pad: function (data, blockSize) {
+ // Shortcut
+ var blockSizeBytes = blockSize * 4;
+
+ // Count padding bytes
+ var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
+
+ // Pad
+ data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
+ concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
+ },
+
+ unpad: function (data) {
+ // Get number of padding bytes from last byte
+ var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
+
+ // Remove padding
+ data.sigBytes -= nPaddingBytes;
+ }
+ };
+
+
+ return CryptoJS.pad.Iso10126;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/pad-iso97971.js b/wechat/miniprogram/node_modules/crypto-js/pad-iso97971.js
new file mode 100644
index 00000000..41049b45
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pad-iso97971.js
@@ -0,0 +1,40 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * ISO/IEC 9797-1 Padding Method 2.
+ */
+ CryptoJS.pad.Iso97971 = {
+ pad: function (data, blockSize) {
+ // Add 0x80 byte
+ data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
+
+ // Zero pad the rest
+ CryptoJS.pad.ZeroPadding.pad(data, blockSize);
+ },
+
+ unpad: function (data) {
+ // Remove zero padding
+ CryptoJS.pad.ZeroPadding.unpad(data);
+
+ // Remove one more byte -- the 0x80 byte
+ data.sigBytes--;
+ }
+ };
+
+
+ return CryptoJS.pad.Iso97971;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/pad-nopadding.js b/wechat/miniprogram/node_modules/crypto-js/pad-nopadding.js
new file mode 100644
index 00000000..c7787c94
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pad-nopadding.js
@@ -0,0 +1,30 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * A noop padding strategy.
+ */
+ CryptoJS.pad.NoPadding = {
+ pad: function () {
+ },
+
+ unpad: function () {
+ }
+ };
+
+
+ return CryptoJS.pad.NoPadding;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/pad-pkcs7.js b/wechat/miniprogram/node_modules/crypto-js/pad-pkcs7.js
new file mode 100644
index 00000000..35551685
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pad-pkcs7.js
@@ -0,0 +1,18 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ return CryptoJS.pad.Pkcs7;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/pad-zeropadding.js b/wechat/miniprogram/node_modules/crypto-js/pad-zeropadding.js
new file mode 100644
index 00000000..a1a459ef
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pad-zeropadding.js
@@ -0,0 +1,47 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /**
+ * Zero padding strategy.
+ */
+ CryptoJS.pad.ZeroPadding = {
+ pad: function (data, blockSize) {
+ // Shortcut
+ var blockSizeBytes = blockSize * 4;
+
+ // Pad
+ data.clamp();
+ data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);
+ },
+
+ unpad: function (data) {
+ // Shortcut
+ var dataWords = data.words;
+
+ // Unpad
+ var i = data.sigBytes - 1;
+ for (var i = data.sigBytes - 1; i >= 0; i--) {
+ if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {
+ data.sigBytes = i + 1;
+ break;
+ }
+ }
+ }
+ };
+
+
+ return CryptoJS.pad.ZeroPadding;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/pbkdf2.js b/wechat/miniprogram/node_modules/crypto-js/pbkdf2.js
new file mode 100644
index 00000000..1258251a
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/pbkdf2.js
@@ -0,0 +1,145 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./sha1", "./hmac"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var WordArray = C_lib.WordArray;
+ var C_algo = C.algo;
+ var SHA1 = C_algo.SHA1;
+ var HMAC = C_algo.HMAC;
+
+ /**
+ * Password-Based Key Derivation Function 2 algorithm.
+ */
+ var PBKDF2 = C_algo.PBKDF2 = Base.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
+ * @property {Hasher} hasher The hasher to use. Default: SHA1
+ * @property {number} iterations The number of iterations to perform. Default: 1
+ */
+ cfg: Base.extend({
+ keySize: 128/32,
+ hasher: SHA1,
+ iterations: 1
+ }),
+
+ /**
+ * Initializes a newly created key derivation function.
+ *
+ * @param {Object} cfg (Optional) The configuration options to use for the derivation.
+ *
+ * @example
+ *
+ * var kdf = CryptoJS.algo.PBKDF2.create();
+ * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
+ * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
+ */
+ init: function (cfg) {
+ this.cfg = this.cfg.extend(cfg);
+ },
+
+ /**
+ * Computes the Password-Based Key Derivation Function 2.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @example
+ *
+ * var key = kdf.compute(password, salt);
+ */
+ compute: function (password, salt) {
+ // Shortcut
+ var cfg = this.cfg;
+
+ // Init HMAC
+ var hmac = HMAC.create(cfg.hasher, password);
+
+ // Initial values
+ var derivedKey = WordArray.create();
+ var blockIndex = WordArray.create([0x00000001]);
+
+ // Shortcuts
+ var derivedKeyWords = derivedKey.words;
+ var blockIndexWords = blockIndex.words;
+ var keySize = cfg.keySize;
+ var iterations = cfg.iterations;
+
+ // Generate key
+ while (derivedKeyWords.length < keySize) {
+ var block = hmac.update(salt).finalize(blockIndex);
+ hmac.reset();
+
+ // Shortcuts
+ var blockWords = block.words;
+ var blockWordsLength = blockWords.length;
+
+ // Iterations
+ var intermediate = block;
+ for (var i = 1; i < iterations; i++) {
+ intermediate = hmac.finalize(intermediate);
+ hmac.reset();
+
+ // Shortcut
+ var intermediateWords = intermediate.words;
+
+ // XOR intermediate with block
+ for (var j = 0; j < blockWordsLength; j++) {
+ blockWords[j] ^= intermediateWords[j];
+ }
+ }
+
+ derivedKey.concat(block);
+ blockIndexWords[0]++;
+ }
+ derivedKey.sigBytes = keySize * 4;
+
+ return derivedKey;
+ }
+ });
+
+ /**
+ * Computes the Password-Based Key Derivation Function 2.
+ *
+ * @param {WordArray|string} password The password.
+ * @param {WordArray|string} salt A salt.
+ * @param {Object} cfg (Optional) The configuration options to use for this computation.
+ *
+ * @return {WordArray} The derived key.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var key = CryptoJS.PBKDF2(password, salt);
+ * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
+ * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
+ */
+ C.PBKDF2 = function (password, salt, cfg) {
+ return PBKDF2.create(cfg).compute(password, salt);
+ };
+ }());
+
+
+ return CryptoJS.PBKDF2;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/rabbit-legacy.js b/wechat/miniprogram/node_modules/crypto-js/rabbit-legacy.js
new file mode 100644
index 00000000..e118b6b6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/rabbit-legacy.js
@@ -0,0 +1,190 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var StreamCipher = C_lib.StreamCipher;
+ var C_algo = C.algo;
+
+ // Reusable objects
+ var S = [];
+ var C_ = [];
+ var G = [];
+
+ /**
+ * Rabbit stream cipher algorithm.
+ *
+ * This is a legacy version that neglected to convert the key to little-endian.
+ * This error doesn't affect the cipher's security,
+ * but it does affect its compatibility with other implementations.
+ */
+ var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var K = this._key.words;
+ var iv = this.cfg.iv;
+
+ // Generate initial state values
+ var X = this._X = [
+ K[0], (K[3] << 16) | (K[2] >>> 16),
+ K[1], (K[0] << 16) | (K[3] >>> 16),
+ K[2], (K[1] << 16) | (K[0] >>> 16),
+ K[3], (K[2] << 16) | (K[1] >>> 16)
+ ];
+
+ // Generate initial counter values
+ var C = this._C = [
+ (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
+ (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
+ (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
+ (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
+ ];
+
+ // Carry bit
+ this._b = 0;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+
+ // Modify the counters
+ for (var i = 0; i < 8; i++) {
+ C[i] ^= X[(i + 4) & 7];
+ }
+
+ // IV setup
+ if (iv) {
+ // Shortcuts
+ var IV = iv.words;
+ var IV_0 = IV[0];
+ var IV_1 = IV[1];
+
+ // Generate four subvectors
+ var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
+ var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
+ var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
+ var i3 = (i2 << 16) | (i0 & 0x0000ffff);
+
+ // Modify counter values
+ C[0] ^= i0;
+ C[1] ^= i1;
+ C[2] ^= i2;
+ C[3] ^= i3;
+ C[4] ^= i0;
+ C[5] ^= i1;
+ C[6] ^= i2;
+ C[7] ^= i3;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+ }
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var X = this._X;
+
+ // Iterate the system
+ nextState.call(this);
+
+ // Generate four keystream words
+ S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
+ S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
+ S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
+ S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
+
+ for (var i = 0; i < 4; i++) {
+ // Swap endian
+ S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
+ (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
+
+ // Encrypt
+ M[offset + i] ^= S[i];
+ }
+ },
+
+ blockSize: 128/32,
+
+ ivSize: 64/32
+ });
+
+ function nextState() {
+ // Shortcuts
+ var X = this._X;
+ var C = this._C;
+
+ // Save old counter values
+ for (var i = 0; i < 8; i++) {
+ C_[i] = C[i];
+ }
+
+ // Calculate new counter values
+ C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
+ C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
+ C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
+ C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
+ C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
+ C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
+ C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
+ C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
+ this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
+
+ // Calculate the g-values
+ for (var i = 0; i < 8; i++) {
+ var gx = X[i] + C[i];
+
+ // Construct high and low argument for squaring
+ var ga = gx & 0xffff;
+ var gb = gx >>> 16;
+
+ // Calculate high and low result of squaring
+ var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
+ var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
+
+ // High XOR low
+ G[i] = gh ^ gl;
+ }
+
+ // Calculate new state values
+ X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
+ X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;
+ X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
+ X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;
+ X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
+ X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;
+ X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
+ X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
+ */
+ C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
+ }());
+
+
+ return CryptoJS.RabbitLegacy;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/rabbit.js b/wechat/miniprogram/node_modules/crypto-js/rabbit.js
new file mode 100644
index 00000000..1b068336
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/rabbit.js
@@ -0,0 +1,192 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var StreamCipher = C_lib.StreamCipher;
+ var C_algo = C.algo;
+
+ // Reusable objects
+ var S = [];
+ var C_ = [];
+ var G = [];
+
+ /**
+ * Rabbit stream cipher algorithm
+ */
+ var Rabbit = C_algo.Rabbit = StreamCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var K = this._key.words;
+ var iv = this.cfg.iv;
+
+ // Swap endian
+ for (var i = 0; i < 4; i++) {
+ K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |
+ (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);
+ }
+
+ // Generate initial state values
+ var X = this._X = [
+ K[0], (K[3] << 16) | (K[2] >>> 16),
+ K[1], (K[0] << 16) | (K[3] >>> 16),
+ K[2], (K[1] << 16) | (K[0] >>> 16),
+ K[3], (K[2] << 16) | (K[1] >>> 16)
+ ];
+
+ // Generate initial counter values
+ var C = this._C = [
+ (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
+ (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
+ (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
+ (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
+ ];
+
+ // Carry bit
+ this._b = 0;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+
+ // Modify the counters
+ for (var i = 0; i < 8; i++) {
+ C[i] ^= X[(i + 4) & 7];
+ }
+
+ // IV setup
+ if (iv) {
+ // Shortcuts
+ var IV = iv.words;
+ var IV_0 = IV[0];
+ var IV_1 = IV[1];
+
+ // Generate four subvectors
+ var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
+ var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
+ var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
+ var i3 = (i2 << 16) | (i0 & 0x0000ffff);
+
+ // Modify counter values
+ C[0] ^= i0;
+ C[1] ^= i1;
+ C[2] ^= i2;
+ C[3] ^= i3;
+ C[4] ^= i0;
+ C[5] ^= i1;
+ C[6] ^= i2;
+ C[7] ^= i3;
+
+ // Iterate the system four times
+ for (var i = 0; i < 4; i++) {
+ nextState.call(this);
+ }
+ }
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var X = this._X;
+
+ // Iterate the system
+ nextState.call(this);
+
+ // Generate four keystream words
+ S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
+ S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
+ S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
+ S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
+
+ for (var i = 0; i < 4; i++) {
+ // Swap endian
+ S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
+ (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
+
+ // Encrypt
+ M[offset + i] ^= S[i];
+ }
+ },
+
+ blockSize: 128/32,
+
+ ivSize: 64/32
+ });
+
+ function nextState() {
+ // Shortcuts
+ var X = this._X;
+ var C = this._C;
+
+ // Save old counter values
+ for (var i = 0; i < 8; i++) {
+ C_[i] = C[i];
+ }
+
+ // Calculate new counter values
+ C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
+ C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
+ C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
+ C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
+ C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
+ C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
+ C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
+ C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
+ this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
+
+ // Calculate the g-values
+ for (var i = 0; i < 8; i++) {
+ var gx = X[i] + C[i];
+
+ // Construct high and low argument for squaring
+ var ga = gx & 0xffff;
+ var gb = gx >>> 16;
+
+ // Calculate high and low result of squaring
+ var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
+ var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
+
+ // High XOR low
+ G[i] = gh ^ gl;
+ }
+
+ // Calculate new state values
+ X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
+ X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;
+ X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
+ X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;
+ X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
+ X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;
+ X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
+ X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
+ */
+ C.Rabbit = StreamCipher._createHelper(Rabbit);
+ }());
+
+
+ return CryptoJS.Rabbit;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/rc4.js b/wechat/miniprogram/node_modules/crypto-js/rc4.js
new file mode 100644
index 00000000..0e4bdff5
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/rc4.js
@@ -0,0 +1,139 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var StreamCipher = C_lib.StreamCipher;
+ var C_algo = C.algo;
+
+ /**
+ * RC4 stream cipher algorithm.
+ */
+ var RC4 = C_algo.RC4 = StreamCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var key = this._key;
+ var keyWords = key.words;
+ var keySigBytes = key.sigBytes;
+
+ // Init sbox
+ var S = this._S = [];
+ for (var i = 0; i < 256; i++) {
+ S[i] = i;
+ }
+
+ // Key setup
+ for (var i = 0, j = 0; i < 256; i++) {
+ var keyByteIndex = i % keySigBytes;
+ var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;
+
+ j = (j + S[i] + keyByte) % 256;
+
+ // Swap
+ var t = S[i];
+ S[i] = S[j];
+ S[j] = t;
+ }
+
+ // Counters
+ this._i = this._j = 0;
+ },
+
+ _doProcessBlock: function (M, offset) {
+ M[offset] ^= generateKeystreamWord.call(this);
+ },
+
+ keySize: 256/32,
+
+ ivSize: 0
+ });
+
+ function generateKeystreamWord() {
+ // Shortcuts
+ var S = this._S;
+ var i = this._i;
+ var j = this._j;
+
+ // Generate keystream word
+ var keystreamWord = 0;
+ for (var n = 0; n < 4; n++) {
+ i = (i + 1) % 256;
+ j = (j + S[i]) % 256;
+
+ // Swap
+ var t = S[i];
+ S[i] = S[j];
+ S[j] = t;
+
+ keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);
+ }
+
+ // Update counters
+ this._i = i;
+ this._j = j;
+
+ return keystreamWord;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
+ */
+ C.RC4 = StreamCipher._createHelper(RC4);
+
+ /**
+ * Modified RC4 stream cipher algorithm.
+ */
+ var RC4Drop = C_algo.RC4Drop = RC4.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} drop The number of keystream words to drop. Default 192
+ */
+ cfg: RC4.cfg.extend({
+ drop: 192
+ }),
+
+ _doReset: function () {
+ RC4._doReset.call(this);
+
+ // Drop
+ for (var i = this.cfg.drop; i > 0; i--) {
+ generateKeystreamWord.call(this);
+ }
+ }
+ });
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
+ */
+ C.RC4Drop = StreamCipher._createHelper(RC4Drop);
+ }());
+
+
+ return CryptoJS.RC4;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/ripemd160.js b/wechat/miniprogram/node_modules/crypto-js/ripemd160.js
new file mode 100644
index 00000000..24feb47c
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/ripemd160.js
@@ -0,0 +1,267 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ /** @preserve
+ (c) 2012 by Cédric Mesnil. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Constants table
+ var _zl = WordArray.create([
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
+ 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
+ 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
+ 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);
+ var _zr = WordArray.create([
+ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
+ 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
+ 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
+ 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
+ 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);
+ var _sl = WordArray.create([
+ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
+ 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
+ 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
+ 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
+ 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);
+ var _sr = WordArray.create([
+ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
+ 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
+ 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
+ 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
+ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);
+
+ var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
+ var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
+
+ /**
+ * RIPEMD160 hash algorithm.
+ */
+ var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
+ _doReset: function () {
+ this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+
+ // Swap endian
+ for (var i = 0; i < 16; i++) {
+ // Shortcuts
+ var offset_i = offset + i;
+ var M_offset_i = M[offset_i];
+
+ // Swap
+ M[offset_i] = (
+ (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
+ (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
+ );
+ }
+ // Shortcut
+ var H = this._hash.words;
+ var hl = _hl.words;
+ var hr = _hr.words;
+ var zl = _zl.words;
+ var zr = _zr.words;
+ var sl = _sl.words;
+ var sr = _sr.words;
+
+ // Working variables
+ var al, bl, cl, dl, el;
+ var ar, br, cr, dr, er;
+
+ ar = al = H[0];
+ br = bl = H[1];
+ cr = cl = H[2];
+ dr = dl = H[3];
+ er = el = H[4];
+ // Computation
+ var t;
+ for (var i = 0; i < 80; i += 1) {
+ t = (al + M[offset+zl[i]])|0;
+ if (i<16){
+ t += f1(bl,cl,dl) + hl[0];
+ } else if (i<32) {
+ t += f2(bl,cl,dl) + hl[1];
+ } else if (i<48) {
+ t += f3(bl,cl,dl) + hl[2];
+ } else if (i<64) {
+ t += f4(bl,cl,dl) + hl[3];
+ } else {// if (i<80) {
+ t += f5(bl,cl,dl) + hl[4];
+ }
+ t = t|0;
+ t = rotl(t,sl[i]);
+ t = (t+el)|0;
+ al = el;
+ el = dl;
+ dl = rotl(cl, 10);
+ cl = bl;
+ bl = t;
+
+ t = (ar + M[offset+zr[i]])|0;
+ if (i<16){
+ t += f5(br,cr,dr) + hr[0];
+ } else if (i<32) {
+ t += f4(br,cr,dr) + hr[1];
+ } else if (i<48) {
+ t += f3(br,cr,dr) + hr[2];
+ } else if (i<64) {
+ t += f2(br,cr,dr) + hr[3];
+ } else {// if (i<80) {
+ t += f1(br,cr,dr) + hr[4];
+ }
+ t = t|0;
+ t = rotl(t,sr[i]) ;
+ t = (t+er)|0;
+ ar = er;
+ er = dr;
+ dr = rotl(cr, 10);
+ cr = br;
+ br = t;
+ }
+ // Intermediate hash value
+ t = (H[1] + cl + dr)|0;
+ H[1] = (H[2] + dl + er)|0;
+ H[2] = (H[3] + el + ar)|0;
+ H[3] = (H[4] + al + br)|0;
+ H[4] = (H[0] + bl + cr)|0;
+ H[0] = t;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
+ (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
+ );
+ data.sigBytes = (dataWords.length + 1) * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Shortcuts
+ var hash = this._hash;
+ var H = hash.words;
+
+ // Swap endian
+ for (var i = 0; i < 5; i++) {
+ // Shortcut
+ var H_i = H[i];
+
+ // Swap
+ H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
+ (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
+ }
+
+ // Return final computed hash
+ return hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+
+ function f1(x, y, z) {
+ return ((x) ^ (y) ^ (z));
+
+ }
+
+ function f2(x, y, z) {
+ return (((x)&(y)) | ((~x)&(z)));
+ }
+
+ function f3(x, y, z) {
+ return (((x) | (~(y))) ^ (z));
+ }
+
+ function f4(x, y, z) {
+ return (((x) & (z)) | ((y)&(~(z))));
+ }
+
+ function f5(x, y, z) {
+ return ((x) ^ ((y) |(~(z))));
+
+ }
+
+ function rotl(x,n) {
+ return (x<>>(32-n));
+ }
+
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.RIPEMD160('message');
+ * var hash = CryptoJS.RIPEMD160(wordArray);
+ */
+ C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacRIPEMD160(message, key);
+ */
+ C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
+ }(Math));
+
+
+ return CryptoJS.RIPEMD160;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/sha1.js b/wechat/miniprogram/node_modules/crypto-js/sha1.js
new file mode 100644
index 00000000..66911496
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/sha1.js
@@ -0,0 +1,150 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Reusable object
+ var W = [];
+
+ /**
+ * SHA-1 hash algorithm.
+ */
+ var SHA1 = C_algo.SHA1 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init([
+ 0x67452301, 0xefcdab89,
+ 0x98badcfe, 0x10325476,
+ 0xc3d2e1f0
+ ]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var H = this._hash.words;
+
+ // Working variables
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+
+ // Computation
+ for (var i = 0; i < 80; i++) {
+ if (i < 16) {
+ W[i] = M[offset + i] | 0;
+ } else {
+ var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
+ W[i] = (n << 1) | (n >>> 31);
+ }
+
+ var t = ((a << 5) | (a >>> 27)) + e + W[i];
+ if (i < 20) {
+ t += ((b & c) | (~b & d)) + 0x5a827999;
+ } else if (i < 40) {
+ t += (b ^ c ^ d) + 0x6ed9eba1;
+ } else if (i < 60) {
+ t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;
+ } else /* if (i < 80) */ {
+ t += (b ^ c ^ d) - 0x359d3e2a;
+ }
+
+ e = d;
+ d = c;
+ c = (b << 30) | (b >>> 2);
+ b = a;
+ a = t;
+ }
+
+ // Intermediate hash value
+ H[0] = (H[0] + a) | 0;
+ H[1] = (H[1] + b) | 0;
+ H[2] = (H[2] + c) | 0;
+ H[3] = (H[3] + d) | 0;
+ H[4] = (H[4] + e) | 0;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Return final computed hash
+ return this._hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA1('message');
+ * var hash = CryptoJS.SHA1(wordArray);
+ */
+ C.SHA1 = Hasher._createHelper(SHA1);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA1(message, key);
+ */
+ C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
+ }());
+
+
+ return CryptoJS.SHA1;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/sha224.js b/wechat/miniprogram/node_modules/crypto-js/sha224.js
new file mode 100644
index 00000000..d8ce9885
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/sha224.js
@@ -0,0 +1,80 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./sha256"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./sha256"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var C_algo = C.algo;
+ var SHA256 = C_algo.SHA256;
+
+ /**
+ * SHA-224 hash algorithm.
+ */
+ var SHA224 = C_algo.SHA224 = SHA256.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init([
+ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
+ 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
+ ]);
+ },
+
+ _doFinalize: function () {
+ var hash = SHA256._doFinalize.call(this);
+
+ hash.sigBytes -= 4;
+
+ return hash;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA224('message');
+ * var hash = CryptoJS.SHA224(wordArray);
+ */
+ C.SHA224 = SHA256._createHelper(SHA224);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA224(message, key);
+ */
+ C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
+ }());
+
+
+ return CryptoJS.SHA224;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/sha256.js b/wechat/miniprogram/node_modules/crypto-js/sha256.js
new file mode 100644
index 00000000..de2d7fca
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/sha256.js
@@ -0,0 +1,199 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_algo = C.algo;
+
+ // Initialization and round constants tables
+ var H = [];
+ var K = [];
+
+ // Compute constants
+ (function () {
+ function isPrime(n) {
+ var sqrtN = Math.sqrt(n);
+ for (var factor = 2; factor <= sqrtN; factor++) {
+ if (!(n % factor)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function getFractionalBits(n) {
+ return ((n - (n | 0)) * 0x100000000) | 0;
+ }
+
+ var n = 2;
+ var nPrime = 0;
+ while (nPrime < 64) {
+ if (isPrime(n)) {
+ if (nPrime < 8) {
+ H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
+ }
+ K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
+
+ nPrime++;
+ }
+
+ n++;
+ }
+ }());
+
+ // Reusable object
+ var W = [];
+
+ /**
+ * SHA-256 hash algorithm.
+ */
+ var SHA256 = C_algo.SHA256 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new WordArray.init(H.slice(0));
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcut
+ var H = this._hash.words;
+
+ // Working variables
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+ var f = H[5];
+ var g = H[6];
+ var h = H[7];
+
+ // Computation
+ for (var i = 0; i < 64; i++) {
+ if (i < 16) {
+ W[i] = M[offset + i] | 0;
+ } else {
+ var gamma0x = W[i - 15];
+ var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
+ ((gamma0x << 14) | (gamma0x >>> 18)) ^
+ (gamma0x >>> 3);
+
+ var gamma1x = W[i - 2];
+ var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
+ ((gamma1x << 13) | (gamma1x >>> 19)) ^
+ (gamma1x >>> 10);
+
+ W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
+ }
+
+ var ch = (e & f) ^ (~e & g);
+ var maj = (a & b) ^ (a & c) ^ (b & c);
+
+ var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));
+ var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));
+
+ var t1 = h + sigma1 + ch + K[i] + W[i];
+ var t2 = sigma0 + maj;
+
+ h = g;
+ g = f;
+ f = e;
+ e = (d + t1) | 0;
+ d = c;
+ c = b;
+ b = a;
+ a = (t1 + t2) | 0;
+ }
+
+ // Intermediate hash value
+ H[0] = (H[0] + a) | 0;
+ H[1] = (H[1] + b) | 0;
+ H[2] = (H[2] + c) | 0;
+ H[3] = (H[3] + d) | 0;
+ H[4] = (H[4] + e) | 0;
+ H[5] = (H[5] + f) | 0;
+ H[6] = (H[6] + g) | 0;
+ H[7] = (H[7] + h) | 0;
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
+ dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Return final computed hash
+ return this._hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA256('message');
+ * var hash = CryptoJS.SHA256(wordArray);
+ */
+ C.SHA256 = Hasher._createHelper(SHA256);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA256(message, key);
+ */
+ C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
+ }(Math));
+
+
+ return CryptoJS.SHA256;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/sha3.js b/wechat/miniprogram/node_modules/crypto-js/sha3.js
new file mode 100644
index 00000000..34ad86c9
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/sha3.js
@@ -0,0 +1,326 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function (Math) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var Hasher = C_lib.Hasher;
+ var C_x64 = C.x64;
+ var X64Word = C_x64.Word;
+ var C_algo = C.algo;
+
+ // Constants tables
+ var RHO_OFFSETS = [];
+ var PI_INDEXES = [];
+ var ROUND_CONSTANTS = [];
+
+ // Compute Constants
+ (function () {
+ // Compute rho offset constants
+ var x = 1, y = 0;
+ for (var t = 0; t < 24; t++) {
+ RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;
+
+ var newX = y % 5;
+ var newY = (2 * x + 3 * y) % 5;
+ x = newX;
+ y = newY;
+ }
+
+ // Compute pi index constants
+ for (var x = 0; x < 5; x++) {
+ for (var y = 0; y < 5; y++) {
+ PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;
+ }
+ }
+
+ // Compute round constants
+ var LFSR = 0x01;
+ for (var i = 0; i < 24; i++) {
+ var roundConstantMsw = 0;
+ var roundConstantLsw = 0;
+
+ for (var j = 0; j < 7; j++) {
+ if (LFSR & 0x01) {
+ var bitPosition = (1 << j) - 1;
+ if (bitPosition < 32) {
+ roundConstantLsw ^= 1 << bitPosition;
+ } else /* if (bitPosition >= 32) */ {
+ roundConstantMsw ^= 1 << (bitPosition - 32);
+ }
+ }
+
+ // Compute next LFSR
+ if (LFSR & 0x80) {
+ // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
+ LFSR = (LFSR << 1) ^ 0x71;
+ } else {
+ LFSR <<= 1;
+ }
+ }
+
+ ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
+ }
+ }());
+
+ // Reusable objects for temporary values
+ var T = [];
+ (function () {
+ for (var i = 0; i < 25; i++) {
+ T[i] = X64Word.create();
+ }
+ }());
+
+ /**
+ * SHA-3 hash algorithm.
+ */
+ var SHA3 = C_algo.SHA3 = Hasher.extend({
+ /**
+ * Configuration options.
+ *
+ * @property {number} outputLength
+ * The desired number of bits in the output hash.
+ * Only values permitted are: 224, 256, 384, 512.
+ * Default: 512
+ */
+ cfg: Hasher.cfg.extend({
+ outputLength: 512
+ }),
+
+ _doReset: function () {
+ var state = this._state = []
+ for (var i = 0; i < 25; i++) {
+ state[i] = new X64Word.init();
+ }
+
+ this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcuts
+ var state = this._state;
+ var nBlockSizeLanes = this.blockSize / 2;
+
+ // Absorb
+ for (var i = 0; i < nBlockSizeLanes; i++) {
+ // Shortcuts
+ var M2i = M[offset + 2 * i];
+ var M2i1 = M[offset + 2 * i + 1];
+
+ // Swap endian
+ M2i = (
+ (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |
+ (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)
+ );
+ M2i1 = (
+ (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |
+ (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)
+ );
+
+ // Absorb message into state
+ var lane = state[i];
+ lane.high ^= M2i1;
+ lane.low ^= M2i;
+ }
+
+ // Rounds
+ for (var round = 0; round < 24; round++) {
+ // Theta
+ for (var x = 0; x < 5; x++) {
+ // Mix column lanes
+ var tMsw = 0, tLsw = 0;
+ for (var y = 0; y < 5; y++) {
+ var lane = state[x + 5 * y];
+ tMsw ^= lane.high;
+ tLsw ^= lane.low;
+ }
+
+ // Temporary values
+ var Tx = T[x];
+ Tx.high = tMsw;
+ Tx.low = tLsw;
+ }
+ for (var x = 0; x < 5; x++) {
+ // Shortcuts
+ var Tx4 = T[(x + 4) % 5];
+ var Tx1 = T[(x + 1) % 5];
+ var Tx1Msw = Tx1.high;
+ var Tx1Lsw = Tx1.low;
+
+ // Mix surrounding columns
+ var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));
+ var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));
+ for (var y = 0; y < 5; y++) {
+ var lane = state[x + 5 * y];
+ lane.high ^= tMsw;
+ lane.low ^= tLsw;
+ }
+ }
+
+ // Rho Pi
+ for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
+ var tMsw;
+ var tLsw;
+
+ // Shortcuts
+ var lane = state[laneIndex];
+ var laneMsw = lane.high;
+ var laneLsw = lane.low;
+ var rhoOffset = RHO_OFFSETS[laneIndex];
+
+ // Rotate lanes
+ if (rhoOffset < 32) {
+ tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));
+ tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));
+ } else /* if (rhoOffset >= 32) */ {
+ tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));
+ tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));
+ }
+
+ // Transpose lanes
+ var TPiLane = T[PI_INDEXES[laneIndex]];
+ TPiLane.high = tMsw;
+ TPiLane.low = tLsw;
+ }
+
+ // Rho pi at x = y = 0
+ var T0 = T[0];
+ var state0 = state[0];
+ T0.high = state0.high;
+ T0.low = state0.low;
+
+ // Chi
+ for (var x = 0; x < 5; x++) {
+ for (var y = 0; y < 5; y++) {
+ // Shortcuts
+ var laneIndex = x + 5 * y;
+ var lane = state[laneIndex];
+ var TLane = T[laneIndex];
+ var Tx1Lane = T[((x + 1) % 5) + 5 * y];
+ var Tx2Lane = T[((x + 2) % 5) + 5 * y];
+
+ // Mix rows
+ lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);
+ lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);
+ }
+ }
+
+ // Iota
+ var lane = state[0];
+ var roundConstant = ROUND_CONSTANTS[round];
+ lane.high ^= roundConstant.high;
+ lane.low ^= roundConstant.low;
+ }
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+ var blockSizeBits = this.blockSize * 32;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);
+ dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Shortcuts
+ var state = this._state;
+ var outputLengthBytes = this.cfg.outputLength / 8;
+ var outputLengthLanes = outputLengthBytes / 8;
+
+ // Squeeze
+ var hashWords = [];
+ for (var i = 0; i < outputLengthLanes; i++) {
+ // Shortcuts
+ var lane = state[i];
+ var laneMsw = lane.high;
+ var laneLsw = lane.low;
+
+ // Swap endian
+ laneMsw = (
+ (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |
+ (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)
+ );
+ laneLsw = (
+ (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |
+ (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)
+ );
+
+ // Squeeze state to retrieve hash
+ hashWords.push(laneLsw);
+ hashWords.push(laneMsw);
+ }
+
+ // Return final computed hash
+ return new WordArray.init(hashWords, outputLengthBytes);
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+
+ var state = clone._state = this._state.slice(0);
+ for (var i = 0; i < 25; i++) {
+ state[i] = state[i].clone();
+ }
+
+ return clone;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA3('message');
+ * var hash = CryptoJS.SHA3(wordArray);
+ */
+ C.SHA3 = Hasher._createHelper(SHA3);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA3(message, key);
+ */
+ C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
+ }(Math));
+
+
+ return CryptoJS.SHA3;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/sha384.js b/wechat/miniprogram/node_modules/crypto-js/sha384.js
new file mode 100644
index 00000000..a0b95bf6
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/sha384.js
@@ -0,0 +1,83 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core", "./sha512"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_x64 = C.x64;
+ var X64Word = C_x64.Word;
+ var X64WordArray = C_x64.WordArray;
+ var C_algo = C.algo;
+ var SHA512 = C_algo.SHA512;
+
+ /**
+ * SHA-384 hash algorithm.
+ */
+ var SHA384 = C_algo.SHA384 = SHA512.extend({
+ _doReset: function () {
+ this._hash = new X64WordArray.init([
+ new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
+ new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
+ new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
+ new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
+ ]);
+ },
+
+ _doFinalize: function () {
+ var hash = SHA512._doFinalize.call(this);
+
+ hash.sigBytes -= 16;
+
+ return hash;
+ }
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA384('message');
+ * var hash = CryptoJS.SHA384(wordArray);
+ */
+ C.SHA384 = SHA512._createHelper(SHA384);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA384(message, key);
+ */
+ C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
+ }());
+
+
+ return CryptoJS.SHA384;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/sha512.js b/wechat/miniprogram/node_modules/crypto-js/sha512.js
new file mode 100644
index 00000000..d274ab0d
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/sha512.js
@@ -0,0 +1,326 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./x64-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./x64-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Hasher = C_lib.Hasher;
+ var C_x64 = C.x64;
+ var X64Word = C_x64.Word;
+ var X64WordArray = C_x64.WordArray;
+ var C_algo = C.algo;
+
+ function X64Word_create() {
+ return X64Word.create.apply(X64Word, arguments);
+ }
+
+ // Constants
+ var K = [
+ X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),
+ X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),
+ X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),
+ X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),
+ X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),
+ X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),
+ X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),
+ X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),
+ X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),
+ X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),
+ X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),
+ X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),
+ X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),
+ X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),
+ X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),
+ X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),
+ X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),
+ X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
+ X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),
+ X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),
+ X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),
+ X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),
+ X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),
+ X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),
+ X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),
+ X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),
+ X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),
+ X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),
+ X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),
+ X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),
+ X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),
+ X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),
+ X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),
+ X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),
+ X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),
+ X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),
+ X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
+ X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
+ X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
+ X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
+ ];
+
+ // Reusable objects
+ var W = [];
+ (function () {
+ for (var i = 0; i < 80; i++) {
+ W[i] = X64Word_create();
+ }
+ }());
+
+ /**
+ * SHA-512 hash algorithm.
+ */
+ var SHA512 = C_algo.SHA512 = Hasher.extend({
+ _doReset: function () {
+ this._hash = new X64WordArray.init([
+ new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
+ new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
+ new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
+ new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
+ ]);
+ },
+
+ _doProcessBlock: function (M, offset) {
+ // Shortcuts
+ var H = this._hash.words;
+
+ var H0 = H[0];
+ var H1 = H[1];
+ var H2 = H[2];
+ var H3 = H[3];
+ var H4 = H[4];
+ var H5 = H[5];
+ var H6 = H[6];
+ var H7 = H[7];
+
+ var H0h = H0.high;
+ var H0l = H0.low;
+ var H1h = H1.high;
+ var H1l = H1.low;
+ var H2h = H2.high;
+ var H2l = H2.low;
+ var H3h = H3.high;
+ var H3l = H3.low;
+ var H4h = H4.high;
+ var H4l = H4.low;
+ var H5h = H5.high;
+ var H5l = H5.low;
+ var H6h = H6.high;
+ var H6l = H6.low;
+ var H7h = H7.high;
+ var H7l = H7.low;
+
+ // Working variables
+ var ah = H0h;
+ var al = H0l;
+ var bh = H1h;
+ var bl = H1l;
+ var ch = H2h;
+ var cl = H2l;
+ var dh = H3h;
+ var dl = H3l;
+ var eh = H4h;
+ var el = H4l;
+ var fh = H5h;
+ var fl = H5l;
+ var gh = H6h;
+ var gl = H6l;
+ var hh = H7h;
+ var hl = H7l;
+
+ // Rounds
+ for (var i = 0; i < 80; i++) {
+ var Wil;
+ var Wih;
+
+ // Shortcut
+ var Wi = W[i];
+
+ // Extend message
+ if (i < 16) {
+ Wih = Wi.high = M[offset + i * 2] | 0;
+ Wil = Wi.low = M[offset + i * 2 + 1] | 0;
+ } else {
+ // Gamma0
+ var gamma0x = W[i - 15];
+ var gamma0xh = gamma0x.high;
+ var gamma0xl = gamma0x.low;
+ var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);
+ var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));
+
+ // Gamma1
+ var gamma1x = W[i - 2];
+ var gamma1xh = gamma1x.high;
+ var gamma1xl = gamma1x.low;
+ var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);
+ var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));
+
+ // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
+ var Wi7 = W[i - 7];
+ var Wi7h = Wi7.high;
+ var Wi7l = Wi7.low;
+
+ var Wi16 = W[i - 16];
+ var Wi16h = Wi16.high;
+ var Wi16l = Wi16.low;
+
+ Wil = gamma0l + Wi7l;
+ Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);
+ Wil = Wil + gamma1l;
+ Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);
+ Wil = Wil + Wi16l;
+ Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);
+
+ Wi.high = Wih;
+ Wi.low = Wil;
+ }
+
+ var chh = (eh & fh) ^ (~eh & gh);
+ var chl = (el & fl) ^ (~el & gl);
+ var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);
+ var majl = (al & bl) ^ (al & cl) ^ (bl & cl);
+
+ var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));
+ var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));
+ var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));
+ var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));
+
+ // t1 = h + sigma1 + ch + K[i] + W[i]
+ var Ki = K[i];
+ var Kih = Ki.high;
+ var Kil = Ki.low;
+
+ var t1l = hl + sigma1l;
+ var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);
+ var t1l = t1l + chl;
+ var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);
+ var t1l = t1l + Kil;
+ var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);
+ var t1l = t1l + Wil;
+ var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);
+
+ // t2 = sigma0 + maj
+ var t2l = sigma0l + majl;
+ var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);
+
+ // Update working variables
+ hh = gh;
+ hl = gl;
+ gh = fh;
+ gl = fl;
+ fh = eh;
+ fl = el;
+ el = (dl + t1l) | 0;
+ eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
+ dh = ch;
+ dl = cl;
+ ch = bh;
+ cl = bl;
+ bh = ah;
+ bl = al;
+ al = (t1l + t2l) | 0;
+ ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;
+ }
+
+ // Intermediate hash value
+ H0l = H0.low = (H0l + al);
+ H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));
+ H1l = H1.low = (H1l + bl);
+ H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));
+ H2l = H2.low = (H2l + cl);
+ H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));
+ H3l = H3.low = (H3l + dl);
+ H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));
+ H4l = H4.low = (H4l + el);
+ H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));
+ H5l = H5.low = (H5l + fl);
+ H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));
+ H6l = H6.low = (H6l + gl);
+ H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));
+ H7l = H7.low = (H7l + hl);
+ H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));
+ },
+
+ _doFinalize: function () {
+ // Shortcuts
+ var data = this._data;
+ var dataWords = data.words;
+
+ var nBitsTotal = this._nDataBytes * 8;
+ var nBitsLeft = data.sigBytes * 8;
+
+ // Add padding
+ dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
+ dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
+ dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;
+ data.sigBytes = dataWords.length * 4;
+
+ // Hash final blocks
+ this._process();
+
+ // Convert hash to 32-bit word array before returning
+ var hash = this._hash.toX32();
+
+ // Return final computed hash
+ return hash;
+ },
+
+ clone: function () {
+ var clone = Hasher.clone.call(this);
+ clone._hash = this._hash.clone();
+
+ return clone;
+ },
+
+ blockSize: 1024/32
+ });
+
+ /**
+ * Shortcut function to the hasher's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ *
+ * @return {WordArray} The hash.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hash = CryptoJS.SHA512('message');
+ * var hash = CryptoJS.SHA512(wordArray);
+ */
+ C.SHA512 = Hasher._createHelper(SHA512);
+
+ /**
+ * Shortcut function to the HMAC's object interface.
+ *
+ * @param {WordArray|string} message The message to hash.
+ * @param {WordArray|string} key The secret key.
+ *
+ * @return {WordArray} The HMAC.
+ *
+ * @static
+ *
+ * @example
+ *
+ * var hmac = CryptoJS.HmacSHA512(message, key);
+ */
+ C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
+ }());
+
+
+ return CryptoJS.SHA512;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/tripledes.js b/wechat/miniprogram/node_modules/crypto-js/tripledes.js
new file mode 100644
index 00000000..1a924772
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/tripledes.js
@@ -0,0 +1,779 @@
+;(function (root, factory, undef) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function () {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var WordArray = C_lib.WordArray;
+ var BlockCipher = C_lib.BlockCipher;
+ var C_algo = C.algo;
+
+ // Permuted Choice 1 constants
+ var PC1 = [
+ 57, 49, 41, 33, 25, 17, 9, 1,
+ 58, 50, 42, 34, 26, 18, 10, 2,
+ 59, 51, 43, 35, 27, 19, 11, 3,
+ 60, 52, 44, 36, 63, 55, 47, 39,
+ 31, 23, 15, 7, 62, 54, 46, 38,
+ 30, 22, 14, 6, 61, 53, 45, 37,
+ 29, 21, 13, 5, 28, 20, 12, 4
+ ];
+
+ // Permuted Choice 2 constants
+ var PC2 = [
+ 14, 17, 11, 24, 1, 5,
+ 3, 28, 15, 6, 21, 10,
+ 23, 19, 12, 4, 26, 8,
+ 16, 7, 27, 20, 13, 2,
+ 41, 52, 31, 37, 47, 55,
+ 30, 40, 51, 45, 33, 48,
+ 44, 49, 39, 56, 34, 53,
+ 46, 42, 50, 36, 29, 32
+ ];
+
+ // Cumulative bit shift constants
+ var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
+
+ // SBOXes and round permutation constants
+ var SBOX_P = [
+ {
+ 0x0: 0x808200,
+ 0x10000000: 0x8000,
+ 0x20000000: 0x808002,
+ 0x30000000: 0x2,
+ 0x40000000: 0x200,
+ 0x50000000: 0x808202,
+ 0x60000000: 0x800202,
+ 0x70000000: 0x800000,
+ 0x80000000: 0x202,
+ 0x90000000: 0x800200,
+ 0xa0000000: 0x8200,
+ 0xb0000000: 0x808000,
+ 0xc0000000: 0x8002,
+ 0xd0000000: 0x800002,
+ 0xe0000000: 0x0,
+ 0xf0000000: 0x8202,
+ 0x8000000: 0x0,
+ 0x18000000: 0x808202,
+ 0x28000000: 0x8202,
+ 0x38000000: 0x8000,
+ 0x48000000: 0x808200,
+ 0x58000000: 0x200,
+ 0x68000000: 0x808002,
+ 0x78000000: 0x2,
+ 0x88000000: 0x800200,
+ 0x98000000: 0x8200,
+ 0xa8000000: 0x808000,
+ 0xb8000000: 0x800202,
+ 0xc8000000: 0x800002,
+ 0xd8000000: 0x8002,
+ 0xe8000000: 0x202,
+ 0xf8000000: 0x800000,
+ 0x1: 0x8000,
+ 0x10000001: 0x2,
+ 0x20000001: 0x808200,
+ 0x30000001: 0x800000,
+ 0x40000001: 0x808002,
+ 0x50000001: 0x8200,
+ 0x60000001: 0x200,
+ 0x70000001: 0x800202,
+ 0x80000001: 0x808202,
+ 0x90000001: 0x808000,
+ 0xa0000001: 0x800002,
+ 0xb0000001: 0x8202,
+ 0xc0000001: 0x202,
+ 0xd0000001: 0x800200,
+ 0xe0000001: 0x8002,
+ 0xf0000001: 0x0,
+ 0x8000001: 0x808202,
+ 0x18000001: 0x808000,
+ 0x28000001: 0x800000,
+ 0x38000001: 0x200,
+ 0x48000001: 0x8000,
+ 0x58000001: 0x800002,
+ 0x68000001: 0x2,
+ 0x78000001: 0x8202,
+ 0x88000001: 0x8002,
+ 0x98000001: 0x800202,
+ 0xa8000001: 0x202,
+ 0xb8000001: 0x808200,
+ 0xc8000001: 0x800200,
+ 0xd8000001: 0x0,
+ 0xe8000001: 0x8200,
+ 0xf8000001: 0x808002
+ },
+ {
+ 0x0: 0x40084010,
+ 0x1000000: 0x4000,
+ 0x2000000: 0x80000,
+ 0x3000000: 0x40080010,
+ 0x4000000: 0x40000010,
+ 0x5000000: 0x40084000,
+ 0x6000000: 0x40004000,
+ 0x7000000: 0x10,
+ 0x8000000: 0x84000,
+ 0x9000000: 0x40004010,
+ 0xa000000: 0x40000000,
+ 0xb000000: 0x84010,
+ 0xc000000: 0x80010,
+ 0xd000000: 0x0,
+ 0xe000000: 0x4010,
+ 0xf000000: 0x40080000,
+ 0x800000: 0x40004000,
+ 0x1800000: 0x84010,
+ 0x2800000: 0x10,
+ 0x3800000: 0x40004010,
+ 0x4800000: 0x40084010,
+ 0x5800000: 0x40000000,
+ 0x6800000: 0x80000,
+ 0x7800000: 0x40080010,
+ 0x8800000: 0x80010,
+ 0x9800000: 0x0,
+ 0xa800000: 0x4000,
+ 0xb800000: 0x40080000,
+ 0xc800000: 0x40000010,
+ 0xd800000: 0x84000,
+ 0xe800000: 0x40084000,
+ 0xf800000: 0x4010,
+ 0x10000000: 0x0,
+ 0x11000000: 0x40080010,
+ 0x12000000: 0x40004010,
+ 0x13000000: 0x40084000,
+ 0x14000000: 0x40080000,
+ 0x15000000: 0x10,
+ 0x16000000: 0x84010,
+ 0x17000000: 0x4000,
+ 0x18000000: 0x4010,
+ 0x19000000: 0x80000,
+ 0x1a000000: 0x80010,
+ 0x1b000000: 0x40000010,
+ 0x1c000000: 0x84000,
+ 0x1d000000: 0x40004000,
+ 0x1e000000: 0x40000000,
+ 0x1f000000: 0x40084010,
+ 0x10800000: 0x84010,
+ 0x11800000: 0x80000,
+ 0x12800000: 0x40080000,
+ 0x13800000: 0x4000,
+ 0x14800000: 0x40004000,
+ 0x15800000: 0x40084010,
+ 0x16800000: 0x10,
+ 0x17800000: 0x40000000,
+ 0x18800000: 0x40084000,
+ 0x19800000: 0x40000010,
+ 0x1a800000: 0x40004010,
+ 0x1b800000: 0x80010,
+ 0x1c800000: 0x0,
+ 0x1d800000: 0x4010,
+ 0x1e800000: 0x40080010,
+ 0x1f800000: 0x84000
+ },
+ {
+ 0x0: 0x104,
+ 0x100000: 0x0,
+ 0x200000: 0x4000100,
+ 0x300000: 0x10104,
+ 0x400000: 0x10004,
+ 0x500000: 0x4000004,
+ 0x600000: 0x4010104,
+ 0x700000: 0x4010000,
+ 0x800000: 0x4000000,
+ 0x900000: 0x4010100,
+ 0xa00000: 0x10100,
+ 0xb00000: 0x4010004,
+ 0xc00000: 0x4000104,
+ 0xd00000: 0x10000,
+ 0xe00000: 0x4,
+ 0xf00000: 0x100,
+ 0x80000: 0x4010100,
+ 0x180000: 0x4010004,
+ 0x280000: 0x0,
+ 0x380000: 0x4000100,
+ 0x480000: 0x4000004,
+ 0x580000: 0x10000,
+ 0x680000: 0x10004,
+ 0x780000: 0x104,
+ 0x880000: 0x4,
+ 0x980000: 0x100,
+ 0xa80000: 0x4010000,
+ 0xb80000: 0x10104,
+ 0xc80000: 0x10100,
+ 0xd80000: 0x4000104,
+ 0xe80000: 0x4010104,
+ 0xf80000: 0x4000000,
+ 0x1000000: 0x4010100,
+ 0x1100000: 0x10004,
+ 0x1200000: 0x10000,
+ 0x1300000: 0x4000100,
+ 0x1400000: 0x100,
+ 0x1500000: 0x4010104,
+ 0x1600000: 0x4000004,
+ 0x1700000: 0x0,
+ 0x1800000: 0x4000104,
+ 0x1900000: 0x4000000,
+ 0x1a00000: 0x4,
+ 0x1b00000: 0x10100,
+ 0x1c00000: 0x4010000,
+ 0x1d00000: 0x104,
+ 0x1e00000: 0x10104,
+ 0x1f00000: 0x4010004,
+ 0x1080000: 0x4000000,
+ 0x1180000: 0x104,
+ 0x1280000: 0x4010100,
+ 0x1380000: 0x0,
+ 0x1480000: 0x10004,
+ 0x1580000: 0x4000100,
+ 0x1680000: 0x100,
+ 0x1780000: 0x4010004,
+ 0x1880000: 0x10000,
+ 0x1980000: 0x4010104,
+ 0x1a80000: 0x10104,
+ 0x1b80000: 0x4000004,
+ 0x1c80000: 0x4000104,
+ 0x1d80000: 0x4010000,
+ 0x1e80000: 0x4,
+ 0x1f80000: 0x10100
+ },
+ {
+ 0x0: 0x80401000,
+ 0x10000: 0x80001040,
+ 0x20000: 0x401040,
+ 0x30000: 0x80400000,
+ 0x40000: 0x0,
+ 0x50000: 0x401000,
+ 0x60000: 0x80000040,
+ 0x70000: 0x400040,
+ 0x80000: 0x80000000,
+ 0x90000: 0x400000,
+ 0xa0000: 0x40,
+ 0xb0000: 0x80001000,
+ 0xc0000: 0x80400040,
+ 0xd0000: 0x1040,
+ 0xe0000: 0x1000,
+ 0xf0000: 0x80401040,
+ 0x8000: 0x80001040,
+ 0x18000: 0x40,
+ 0x28000: 0x80400040,
+ 0x38000: 0x80001000,
+ 0x48000: 0x401000,
+ 0x58000: 0x80401040,
+ 0x68000: 0x0,
+ 0x78000: 0x80400000,
+ 0x88000: 0x1000,
+ 0x98000: 0x80401000,
+ 0xa8000: 0x400000,
+ 0xb8000: 0x1040,
+ 0xc8000: 0x80000000,
+ 0xd8000: 0x400040,
+ 0xe8000: 0x401040,
+ 0xf8000: 0x80000040,
+ 0x100000: 0x400040,
+ 0x110000: 0x401000,
+ 0x120000: 0x80000040,
+ 0x130000: 0x0,
+ 0x140000: 0x1040,
+ 0x150000: 0x80400040,
+ 0x160000: 0x80401000,
+ 0x170000: 0x80001040,
+ 0x180000: 0x80401040,
+ 0x190000: 0x80000000,
+ 0x1a0000: 0x80400000,
+ 0x1b0000: 0x401040,
+ 0x1c0000: 0x80001000,
+ 0x1d0000: 0x400000,
+ 0x1e0000: 0x40,
+ 0x1f0000: 0x1000,
+ 0x108000: 0x80400000,
+ 0x118000: 0x80401040,
+ 0x128000: 0x0,
+ 0x138000: 0x401000,
+ 0x148000: 0x400040,
+ 0x158000: 0x80000000,
+ 0x168000: 0x80001040,
+ 0x178000: 0x40,
+ 0x188000: 0x80000040,
+ 0x198000: 0x1000,
+ 0x1a8000: 0x80001000,
+ 0x1b8000: 0x80400040,
+ 0x1c8000: 0x1040,
+ 0x1d8000: 0x80401000,
+ 0x1e8000: 0x400000,
+ 0x1f8000: 0x401040
+ },
+ {
+ 0x0: 0x80,
+ 0x1000: 0x1040000,
+ 0x2000: 0x40000,
+ 0x3000: 0x20000000,
+ 0x4000: 0x20040080,
+ 0x5000: 0x1000080,
+ 0x6000: 0x21000080,
+ 0x7000: 0x40080,
+ 0x8000: 0x1000000,
+ 0x9000: 0x20040000,
+ 0xa000: 0x20000080,
+ 0xb000: 0x21040080,
+ 0xc000: 0x21040000,
+ 0xd000: 0x0,
+ 0xe000: 0x1040080,
+ 0xf000: 0x21000000,
+ 0x800: 0x1040080,
+ 0x1800: 0x21000080,
+ 0x2800: 0x80,
+ 0x3800: 0x1040000,
+ 0x4800: 0x40000,
+ 0x5800: 0x20040080,
+ 0x6800: 0x21040000,
+ 0x7800: 0x20000000,
+ 0x8800: 0x20040000,
+ 0x9800: 0x0,
+ 0xa800: 0x21040080,
+ 0xb800: 0x1000080,
+ 0xc800: 0x20000080,
+ 0xd800: 0x21000000,
+ 0xe800: 0x1000000,
+ 0xf800: 0x40080,
+ 0x10000: 0x40000,
+ 0x11000: 0x80,
+ 0x12000: 0x20000000,
+ 0x13000: 0x21000080,
+ 0x14000: 0x1000080,
+ 0x15000: 0x21040000,
+ 0x16000: 0x20040080,
+ 0x17000: 0x1000000,
+ 0x18000: 0x21040080,
+ 0x19000: 0x21000000,
+ 0x1a000: 0x1040000,
+ 0x1b000: 0x20040000,
+ 0x1c000: 0x40080,
+ 0x1d000: 0x20000080,
+ 0x1e000: 0x0,
+ 0x1f000: 0x1040080,
+ 0x10800: 0x21000080,
+ 0x11800: 0x1000000,
+ 0x12800: 0x1040000,
+ 0x13800: 0x20040080,
+ 0x14800: 0x20000000,
+ 0x15800: 0x1040080,
+ 0x16800: 0x80,
+ 0x17800: 0x21040000,
+ 0x18800: 0x40080,
+ 0x19800: 0x21040080,
+ 0x1a800: 0x0,
+ 0x1b800: 0x21000000,
+ 0x1c800: 0x1000080,
+ 0x1d800: 0x40000,
+ 0x1e800: 0x20040000,
+ 0x1f800: 0x20000080
+ },
+ {
+ 0x0: 0x10000008,
+ 0x100: 0x2000,
+ 0x200: 0x10200000,
+ 0x300: 0x10202008,
+ 0x400: 0x10002000,
+ 0x500: 0x200000,
+ 0x600: 0x200008,
+ 0x700: 0x10000000,
+ 0x800: 0x0,
+ 0x900: 0x10002008,
+ 0xa00: 0x202000,
+ 0xb00: 0x8,
+ 0xc00: 0x10200008,
+ 0xd00: 0x202008,
+ 0xe00: 0x2008,
+ 0xf00: 0x10202000,
+ 0x80: 0x10200000,
+ 0x180: 0x10202008,
+ 0x280: 0x8,
+ 0x380: 0x200000,
+ 0x480: 0x202008,
+ 0x580: 0x10000008,
+ 0x680: 0x10002000,
+ 0x780: 0x2008,
+ 0x880: 0x200008,
+ 0x980: 0x2000,
+ 0xa80: 0x10002008,
+ 0xb80: 0x10200008,
+ 0xc80: 0x0,
+ 0xd80: 0x10202000,
+ 0xe80: 0x202000,
+ 0xf80: 0x10000000,
+ 0x1000: 0x10002000,
+ 0x1100: 0x10200008,
+ 0x1200: 0x10202008,
+ 0x1300: 0x2008,
+ 0x1400: 0x200000,
+ 0x1500: 0x10000000,
+ 0x1600: 0x10000008,
+ 0x1700: 0x202000,
+ 0x1800: 0x202008,
+ 0x1900: 0x0,
+ 0x1a00: 0x8,
+ 0x1b00: 0x10200000,
+ 0x1c00: 0x2000,
+ 0x1d00: 0x10002008,
+ 0x1e00: 0x10202000,
+ 0x1f00: 0x200008,
+ 0x1080: 0x8,
+ 0x1180: 0x202000,
+ 0x1280: 0x200000,
+ 0x1380: 0x10000008,
+ 0x1480: 0x10002000,
+ 0x1580: 0x2008,
+ 0x1680: 0x10202008,
+ 0x1780: 0x10200000,
+ 0x1880: 0x10202000,
+ 0x1980: 0x10200008,
+ 0x1a80: 0x2000,
+ 0x1b80: 0x202008,
+ 0x1c80: 0x200008,
+ 0x1d80: 0x0,
+ 0x1e80: 0x10000000,
+ 0x1f80: 0x10002008
+ },
+ {
+ 0x0: 0x100000,
+ 0x10: 0x2000401,
+ 0x20: 0x400,
+ 0x30: 0x100401,
+ 0x40: 0x2100401,
+ 0x50: 0x0,
+ 0x60: 0x1,
+ 0x70: 0x2100001,
+ 0x80: 0x2000400,
+ 0x90: 0x100001,
+ 0xa0: 0x2000001,
+ 0xb0: 0x2100400,
+ 0xc0: 0x2100000,
+ 0xd0: 0x401,
+ 0xe0: 0x100400,
+ 0xf0: 0x2000000,
+ 0x8: 0x2100001,
+ 0x18: 0x0,
+ 0x28: 0x2000401,
+ 0x38: 0x2100400,
+ 0x48: 0x100000,
+ 0x58: 0x2000001,
+ 0x68: 0x2000000,
+ 0x78: 0x401,
+ 0x88: 0x100401,
+ 0x98: 0x2000400,
+ 0xa8: 0x2100000,
+ 0xb8: 0x100001,
+ 0xc8: 0x400,
+ 0xd8: 0x2100401,
+ 0xe8: 0x1,
+ 0xf8: 0x100400,
+ 0x100: 0x2000000,
+ 0x110: 0x100000,
+ 0x120: 0x2000401,
+ 0x130: 0x2100001,
+ 0x140: 0x100001,
+ 0x150: 0x2000400,
+ 0x160: 0x2100400,
+ 0x170: 0x100401,
+ 0x180: 0x401,
+ 0x190: 0x2100401,
+ 0x1a0: 0x100400,
+ 0x1b0: 0x1,
+ 0x1c0: 0x0,
+ 0x1d0: 0x2100000,
+ 0x1e0: 0x2000001,
+ 0x1f0: 0x400,
+ 0x108: 0x100400,
+ 0x118: 0x2000401,
+ 0x128: 0x2100001,
+ 0x138: 0x1,
+ 0x148: 0x2000000,
+ 0x158: 0x100000,
+ 0x168: 0x401,
+ 0x178: 0x2100400,
+ 0x188: 0x2000001,
+ 0x198: 0x2100000,
+ 0x1a8: 0x0,
+ 0x1b8: 0x2100401,
+ 0x1c8: 0x100401,
+ 0x1d8: 0x400,
+ 0x1e8: 0x2000400,
+ 0x1f8: 0x100001
+ },
+ {
+ 0x0: 0x8000820,
+ 0x1: 0x20000,
+ 0x2: 0x8000000,
+ 0x3: 0x20,
+ 0x4: 0x20020,
+ 0x5: 0x8020820,
+ 0x6: 0x8020800,
+ 0x7: 0x800,
+ 0x8: 0x8020000,
+ 0x9: 0x8000800,
+ 0xa: 0x20800,
+ 0xb: 0x8020020,
+ 0xc: 0x820,
+ 0xd: 0x0,
+ 0xe: 0x8000020,
+ 0xf: 0x20820,
+ 0x80000000: 0x800,
+ 0x80000001: 0x8020820,
+ 0x80000002: 0x8000820,
+ 0x80000003: 0x8000000,
+ 0x80000004: 0x8020000,
+ 0x80000005: 0x20800,
+ 0x80000006: 0x20820,
+ 0x80000007: 0x20,
+ 0x80000008: 0x8000020,
+ 0x80000009: 0x820,
+ 0x8000000a: 0x20020,
+ 0x8000000b: 0x8020800,
+ 0x8000000c: 0x0,
+ 0x8000000d: 0x8020020,
+ 0x8000000e: 0x8000800,
+ 0x8000000f: 0x20000,
+ 0x10: 0x20820,
+ 0x11: 0x8020800,
+ 0x12: 0x20,
+ 0x13: 0x800,
+ 0x14: 0x8000800,
+ 0x15: 0x8000020,
+ 0x16: 0x8020020,
+ 0x17: 0x20000,
+ 0x18: 0x0,
+ 0x19: 0x20020,
+ 0x1a: 0x8020000,
+ 0x1b: 0x8000820,
+ 0x1c: 0x8020820,
+ 0x1d: 0x20800,
+ 0x1e: 0x820,
+ 0x1f: 0x8000000,
+ 0x80000010: 0x20000,
+ 0x80000011: 0x800,
+ 0x80000012: 0x8020020,
+ 0x80000013: 0x20820,
+ 0x80000014: 0x20,
+ 0x80000015: 0x8020000,
+ 0x80000016: 0x8000000,
+ 0x80000017: 0x8000820,
+ 0x80000018: 0x8020820,
+ 0x80000019: 0x8000020,
+ 0x8000001a: 0x8000800,
+ 0x8000001b: 0x0,
+ 0x8000001c: 0x20800,
+ 0x8000001d: 0x820,
+ 0x8000001e: 0x20020,
+ 0x8000001f: 0x8020800
+ }
+ ];
+
+ // Masks that select the SBOX input
+ var SBOX_MASK = [
+ 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
+ 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f
+ ];
+
+ /**
+ * DES block cipher algorithm.
+ */
+ var DES = C_algo.DES = BlockCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var key = this._key;
+ var keyWords = key.words;
+
+ // Select 56 bits according to PC1
+ var keyBits = [];
+ for (var i = 0; i < 56; i++) {
+ var keyBitPos = PC1[i] - 1;
+ keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;
+ }
+
+ // Assemble 16 subkeys
+ var subKeys = this._subKeys = [];
+ for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
+ // Create subkey
+ var subKey = subKeys[nSubKey] = [];
+
+ // Shortcut
+ var bitShift = BIT_SHIFTS[nSubKey];
+
+ // Select 48 bits according to PC2
+ for (var i = 0; i < 24; i++) {
+ // Select from the left 28 key bits
+ subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);
+
+ // Select from the right 28 key bits
+ subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);
+ }
+
+ // Since each subkey is applied to an expanded 32-bit input,
+ // the subkey can be broken into 8 values scaled to 32-bits,
+ // which allows the key to be used without expansion
+ subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);
+ for (var i = 1; i < 7; i++) {
+ subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);
+ }
+ subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);
+ }
+
+ // Compute inverse subkeys
+ var invSubKeys = this._invSubKeys = [];
+ for (var i = 0; i < 16; i++) {
+ invSubKeys[i] = subKeys[15 - i];
+ }
+ },
+
+ encryptBlock: function (M, offset) {
+ this._doCryptBlock(M, offset, this._subKeys);
+ },
+
+ decryptBlock: function (M, offset) {
+ this._doCryptBlock(M, offset, this._invSubKeys);
+ },
+
+ _doCryptBlock: function (M, offset, subKeys) {
+ // Get input
+ this._lBlock = M[offset];
+ this._rBlock = M[offset + 1];
+
+ // Initial permutation
+ exchangeLR.call(this, 4, 0x0f0f0f0f);
+ exchangeLR.call(this, 16, 0x0000ffff);
+ exchangeRL.call(this, 2, 0x33333333);
+ exchangeRL.call(this, 8, 0x00ff00ff);
+ exchangeLR.call(this, 1, 0x55555555);
+
+ // Rounds
+ for (var round = 0; round < 16; round++) {
+ // Shortcuts
+ var subKey = subKeys[round];
+ var lBlock = this._lBlock;
+ var rBlock = this._rBlock;
+
+ // Feistel function
+ var f = 0;
+ for (var i = 0; i < 8; i++) {
+ f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
+ }
+ this._lBlock = rBlock;
+ this._rBlock = lBlock ^ f;
+ }
+
+ // Undo swap from last round
+ var t = this._lBlock;
+ this._lBlock = this._rBlock;
+ this._rBlock = t;
+
+ // Final permutation
+ exchangeLR.call(this, 1, 0x55555555);
+ exchangeRL.call(this, 8, 0x00ff00ff);
+ exchangeRL.call(this, 2, 0x33333333);
+ exchangeLR.call(this, 16, 0x0000ffff);
+ exchangeLR.call(this, 4, 0x0f0f0f0f);
+
+ // Set output
+ M[offset] = this._lBlock;
+ M[offset + 1] = this._rBlock;
+ },
+
+ keySize: 64/32,
+
+ ivSize: 64/32,
+
+ blockSize: 64/32
+ });
+
+ // Swap bits across the left and right words
+ function exchangeLR(offset, mask) {
+ var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;
+ this._rBlock ^= t;
+ this._lBlock ^= t << offset;
+ }
+
+ function exchangeRL(offset, mask) {
+ var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;
+ this._lBlock ^= t;
+ this._rBlock ^= t << offset;
+ }
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);
+ */
+ C.DES = BlockCipher._createHelper(DES);
+
+ /**
+ * Triple-DES block cipher algorithm.
+ */
+ var TripleDES = C_algo.TripleDES = BlockCipher.extend({
+ _doReset: function () {
+ // Shortcuts
+ var key = this._key;
+ var keyWords = key.words;
+ // Make sure the key length is valid (64, 128 or >= 192 bit)
+ if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
+ throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');
+ }
+
+ // Extend the key according to the keying options defined in 3DES standard
+ var key1 = keyWords.slice(0, 2);
+ var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
+ var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
+
+ // Create DES instances
+ this._des1 = DES.createEncryptor(WordArray.create(key1));
+ this._des2 = DES.createEncryptor(WordArray.create(key2));
+ this._des3 = DES.createEncryptor(WordArray.create(key3));
+ },
+
+ encryptBlock: function (M, offset) {
+ this._des1.encryptBlock(M, offset);
+ this._des2.decryptBlock(M, offset);
+ this._des3.encryptBlock(M, offset);
+ },
+
+ decryptBlock: function (M, offset) {
+ this._des3.decryptBlock(M, offset);
+ this._des2.encryptBlock(M, offset);
+ this._des1.decryptBlock(M, offset);
+ },
+
+ keySize: 192/32,
+
+ ivSize: 64/32,
+
+ blockSize: 64/32
+ });
+
+ /**
+ * Shortcut functions to the cipher's object interface.
+ *
+ * @example
+ *
+ * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
+ * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
+ */
+ C.TripleDES = BlockCipher._createHelper(TripleDES);
+ }());
+
+
+ return CryptoJS.TripleDES;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/node_modules/crypto-js/x64-core.js b/wechat/miniprogram/node_modules/crypto-js/x64-core.js
new file mode 100644
index 00000000..57dcc144
--- /dev/null
+++ b/wechat/miniprogram/node_modules/crypto-js/x64-core.js
@@ -0,0 +1,304 @@
+;(function (root, factory) {
+ if (typeof exports === "object") {
+ // CommonJS
+ module.exports = exports = factory(require("./core"));
+ }
+ else if (typeof define === "function" && define.amd) {
+ // AMD
+ define(["./core"], factory);
+ }
+ else {
+ // Global (browser)
+ factory(root.CryptoJS);
+ }
+}(this, function (CryptoJS) {
+
+ (function (undefined) {
+ // Shortcuts
+ var C = CryptoJS;
+ var C_lib = C.lib;
+ var Base = C_lib.Base;
+ var X32WordArray = C_lib.WordArray;
+
+ /**
+ * x64 namespace.
+ */
+ var C_x64 = C.x64 = {};
+
+ /**
+ * A 64-bit word.
+ */
+ var X64Word = C_x64.Word = Base.extend({
+ /**
+ * Initializes a newly created 64-bit word.
+ *
+ * @param {number} high The high 32 bits.
+ * @param {number} low The low 32 bits.
+ *
+ * @example
+ *
+ * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
+ */
+ init: function (high, low) {
+ this.high = high;
+ this.low = low;
+ }
+
+ /**
+ * Bitwise NOTs this word.
+ *
+ * @return {X64Word} A new x64-Word object after negating.
+ *
+ * @example
+ *
+ * var negated = x64Word.not();
+ */
+ // not: function () {
+ // var high = ~this.high;
+ // var low = ~this.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Bitwise ANDs this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to AND with this word.
+ *
+ * @return {X64Word} A new x64-Word object after ANDing.
+ *
+ * @example
+ *
+ * var anded = x64Word.and(anotherX64Word);
+ */
+ // and: function (word) {
+ // var high = this.high & word.high;
+ // var low = this.low & word.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Bitwise ORs this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to OR with this word.
+ *
+ * @return {X64Word} A new x64-Word object after ORing.
+ *
+ * @example
+ *
+ * var ored = x64Word.or(anotherX64Word);
+ */
+ // or: function (word) {
+ // var high = this.high | word.high;
+ // var low = this.low | word.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Bitwise XORs this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to XOR with this word.
+ *
+ * @return {X64Word} A new x64-Word object after XORing.
+ *
+ * @example
+ *
+ * var xored = x64Word.xor(anotherX64Word);
+ */
+ // xor: function (word) {
+ // var high = this.high ^ word.high;
+ // var low = this.low ^ word.low;
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Shifts this word n bits to the left.
+ *
+ * @param {number} n The number of bits to shift.
+ *
+ * @return {X64Word} A new x64-Word object after shifting.
+ *
+ * @example
+ *
+ * var shifted = x64Word.shiftL(25);
+ */
+ // shiftL: function (n) {
+ // if (n < 32) {
+ // var high = (this.high << n) | (this.low >>> (32 - n));
+ // var low = this.low << n;
+ // } else {
+ // var high = this.low << (n - 32);
+ // var low = 0;
+ // }
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Shifts this word n bits to the right.
+ *
+ * @param {number} n The number of bits to shift.
+ *
+ * @return {X64Word} A new x64-Word object after shifting.
+ *
+ * @example
+ *
+ * var shifted = x64Word.shiftR(7);
+ */
+ // shiftR: function (n) {
+ // if (n < 32) {
+ // var low = (this.low >>> n) | (this.high << (32 - n));
+ // var high = this.high >>> n;
+ // } else {
+ // var low = this.high >>> (n - 32);
+ // var high = 0;
+ // }
+
+ // return X64Word.create(high, low);
+ // },
+
+ /**
+ * Rotates this word n bits to the left.
+ *
+ * @param {number} n The number of bits to rotate.
+ *
+ * @return {X64Word} A new x64-Word object after rotating.
+ *
+ * @example
+ *
+ * var rotated = x64Word.rotL(25);
+ */
+ // rotL: function (n) {
+ // return this.shiftL(n).or(this.shiftR(64 - n));
+ // },
+
+ /**
+ * Rotates this word n bits to the right.
+ *
+ * @param {number} n The number of bits to rotate.
+ *
+ * @return {X64Word} A new x64-Word object after rotating.
+ *
+ * @example
+ *
+ * var rotated = x64Word.rotR(7);
+ */
+ // rotR: function (n) {
+ // return this.shiftR(n).or(this.shiftL(64 - n));
+ // },
+
+ /**
+ * Adds this word with the passed word.
+ *
+ * @param {X64Word} word The x64-Word to add with this word.
+ *
+ * @return {X64Word} A new x64-Word object after adding.
+ *
+ * @example
+ *
+ * var added = x64Word.add(anotherX64Word);
+ */
+ // add: function (word) {
+ // var low = (this.low + word.low) | 0;
+ // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
+ // var high = (this.high + word.high + carry) | 0;
+
+ // return X64Word.create(high, low);
+ // }
+ });
+
+ /**
+ * An array of 64-bit words.
+ *
+ * @property {Array} words The array of CryptoJS.x64.Word objects.
+ * @property {number} sigBytes The number of significant bytes in this word array.
+ */
+ var X64WordArray = C_x64.WordArray = Base.extend({
+ /**
+ * Initializes a newly created word array.
+ *
+ * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
+ *
+ * @example
+ *
+ * var wordArray = CryptoJS.x64.WordArray.create();
+ *
+ * var wordArray = CryptoJS.x64.WordArray.create([
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
+ * ]);
+ *
+ * var wordArray = CryptoJS.x64.WordArray.create([
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
+ * ], 10);
+ */
+ init: function (words, sigBytes) {
+ words = this.words = words || [];
+
+ if (sigBytes != undefined) {
+ this.sigBytes = sigBytes;
+ } else {
+ this.sigBytes = words.length * 8;
+ }
+ },
+
+ /**
+ * Converts this 64-bit word array to a 32-bit word array.
+ *
+ * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
+ *
+ * @example
+ *
+ * var x32WordArray = x64WordArray.toX32();
+ */
+ toX32: function () {
+ // Shortcuts
+ var x64Words = this.words;
+ var x64WordsLength = x64Words.length;
+
+ // Convert
+ var x32Words = [];
+ for (var i = 0; i < x64WordsLength; i++) {
+ var x64Word = x64Words[i];
+ x32Words.push(x64Word.high);
+ x32Words.push(x64Word.low);
+ }
+
+ return X32WordArray.create(x32Words, this.sigBytes);
+ },
+
+ /**
+ * Creates a copy of this word array.
+ *
+ * @return {X64WordArray} The clone.
+ *
+ * @example
+ *
+ * var clone = x64WordArray.clone();
+ */
+ clone: function () {
+ var clone = Base.clone.call(this);
+
+ // Clone "words" array
+ var words = clone.words = this.words.slice(0);
+
+ // Clone each X64Word object
+ var wordsLength = words.length;
+ for (var i = 0; i < wordsLength; i++) {
+ words[i] = words[i].clone();
+ }
+
+ return clone;
+ }
+ });
+ }());
+
+
+ return CryptoJS;
+
+}));
\ No newline at end of file
diff --git a/wechat/miniprogram/package-lock.json b/wechat/miniprogram/package-lock.json
new file mode 100644
index 00000000..9868effd
--- /dev/null
+++ b/wechat/miniprogram/package-lock.json
@@ -0,0 +1,18 @@
+{
+ "name": "miniprogram",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@vant/weapp": {
+ "version": "1.6.9",
+ "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.6.9.tgz",
+ "integrity": "sha512-d7hvWjs1cjlM4PjEAhBhbtdejqcltbIptw4/qfDC1RZUp+t7eYEDX/aRUZgtPAwTnipRXJPOyQIdf8K9jYUI/g=="
+ },
+ "crypto-js": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
+ "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg=="
+ }
+ }
+}
diff --git a/wechat/miniprogram/package.json b/wechat/miniprogram/package.json
new file mode 100644
index 00000000..00dee344
--- /dev/null
+++ b/wechat/miniprogram/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "miniprogram",
+ "version": "1.0.0",
+ "description": "",
+ "main": "app.js",
+ "dependencies": {
+ "@vant/weapp": "^1.6.9",
+ "crypto-js": "^4.0.0"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC"
+}
diff --git a/wechat/miniprogram/pages/index/index.js b/wechat/miniprogram/pages/index/index.js
new file mode 100644
index 00000000..585de607
--- /dev/null
+++ b/wechat/miniprogram/pages/index/index.js
@@ -0,0 +1,154 @@
+// miniprogram/pages/index/index.js
+const amap = require('../../libs/amap-wx.js');
+const { requestApi } = require('../../API/request.js');
+const app = getApp();
+const project_id = 'wHJB7a';
+var timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ weather:{}, //天气信息
+ products:[],
+ DeviceList:[],
+ fourGDeviceList:[],
+ show: false,
+ actions: [
+ { name: '绑定设备' },
+ ],
+
+ },
+ // },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ // this.getProducts();
+ // this.query();
+ // timer = setInterval(() => {
+ this.getDevices();
+ // }, 2000);
+ },
+
+
+ async getDevices(){
+ const res = await requestApi('/system/device/list');
+ console.log(res);
+ this.setData({ DeviceList:res.data.rows })
+ },
+
+
+
+
+ //获取天气
+ getWeather:async function(){
+ let that = this;
+ var myAmapFun = new amap.AMapWX({key:'5cafa1133f593cfe005081749a46e717'});
+ myAmapFun.getWeather({
+ success: function(data){
+ console.log(data);
+ that.setData({
+ weather:data
+ })
+ },
+ fail: function(info){
+ //失败回调
+ console.log(info)
+ }
+ })
+ },
+
+ goToDeviceControl(e){
+ if (e.currentTarget.dataset.info.categoryId !== 5) {
+ return;
+ }
+ wx.navigateTo({
+ url: '/pages/roomSystem/index',
+ success:(res)=>{
+ res.eventChannel.emit('getDeviceInfo',e.currentTarget.dataset.info)
+ }
+ })
+ },
+
+ deviceFail(){
+ wx.showToast({
+ title: '设备离线!',
+ icon:'error'
+ })
+ },
+ deviceNone(){
+ wx.showToast({
+ title: '设备未激活!',
+ icon:'error'
+ })
+ },
+
+ //底部弹起的模态面板
+ isShow:function(){
+ this.setData({
+ show:!this.data.show
+ })
+ },
+ onClose:function() {
+ this.setData({ show: false });
+ },
+ onCancel:function(){
+ this.setData({ show: false });
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.getWeather();
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ homeSelected:true,
+ userSelected:false //这个数字是当前页面在tabBar中list数组的索引
+ })
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+ clearInterval(timer);
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+ this.onLoad();
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/index/index.json b/wechat/miniprogram/pages/index/index.json
new file mode 100644
index 00000000..c6f2f268
--- /dev/null
+++ b/wechat/miniprogram/pages/index/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-action-sheet": "@vant/weapp/action-sheet/index",
+ "van-tab": "@vant/weapp/tab/index",
+ "van-tabs": "@vant/weapp/tabs/index"
+ }
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/index/index.wxml b/wechat/miniprogram/pages/index/index.wxml
new file mode 100644
index 00000000..08d6b98b
--- /dev/null
+++ b/wechat/miniprogram/pages/index/index.wxml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ {{ weather.temperature.data }}℃
+ 城市: {{ weather.city.data }}
+
+
+
+ 湿度: {{ weather.humidity.data }}
+ 天气: {{ weather.weather.data }}
+
+ 风向: {{ weather.winddirection.data }}
+ 风力: {{ weather.windpower.data }}
+
+
+
+
+
+
+
+
+
+ 全部 ({{ DeviceList.length }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 未激活
+ {{ item.categoryName }}
+
+
+ {{ item.deviceName }}
+
+
+
+
+
+
+
+
+
+ 在线
+ {{ item.categoryName }}
+
+
+ {{ item.deviceName }}
+
+
+
+
+
+
+
+
+
+ 离线
+ {{ item.categoryName }}
+
+
+ {{ item.deviceName }}
+
+
+
+
+
+ 暂无设备,请添加。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 未激活
+ {{ item.device_name }}
+
+
+ {{ item.product_name }}
+
+
+
+
+
+
+
+
+
+ 在线
+ {{ item.device_name }}
+
+
+ {{ item.product_name }}
+
+
+
+
+
+
+
+
+
+ 离线
+ {{ item.device_name }}
+
+
+ {{ item.product_name }}
+
+
+
+
+
+ 暂无设备,请添加。
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/pages/index/index.wxss b/wechat/miniprogram/pages/index/index.wxss
new file mode 100644
index 00000000..5c7b0991
--- /dev/null
+++ b/wechat/miniprogram/pages/index/index.wxss
@@ -0,0 +1,153 @@
+/* miniprogram/pages/myDevice/index.wxss */
+.top{
+ display:flex;
+ justify-content:space-around;
+ background-color:skyblue;
+ background-image: linear-gradient(to bottom right, skyblue, blue);
+ padding:30rpx 0;
+ border-radius:0 0 25rpx 25rpx;
+ color:#ffffff;
+ height:270rpx;
+}
+
+.top .top_left{
+ width:420rpx;
+ display:flex;
+ flex-direction:column;
+ justify-content:center;
+}
+.top .top_left .top_big_info{
+ padding:10rpx 0;
+}
+.top .top_left .top_small_info{
+ padding:10rpx 20rpx;
+ font-size:30rpx;
+}
+
+.temperature{
+ font-size:60rpx;
+ display:inline-block;
+ padding:0 20rpx;
+}
+.humidity::after{
+ content:'|';
+ width:55rpx;
+ display:inline-block;
+ text-align:center;
+ color:rgba(255,255,255,.5);
+}
+.winddirection::after{
+ content:'|';
+ width:55rpx;
+ display:inline-block;
+ text-align:center;
+ color:rgba(255,255,255,.5);
+}
+.top .top_right{
+ width:250rpx;
+ display:flex;
+ justify-content:center;
+ align-items:center;
+}
+.top .top_right .start{
+ position:relative;
+ width:220rpx;
+ height:220rpx;
+ animation:move 4s linear infinite;
+}
+@keyframes move{
+ 0%{ top:0rpx }
+ 25%{ top:-30rpx }
+ 50%{ top:0rpx }
+ 75%{ top:30rpx }
+ 100%{ top:0rpx }
+}
+.top .top_right .start image{
+ width:100%;
+ height:100%;
+}
+
+.devices .devices_tab{
+ font-size:36rpx;
+ padding:20rpx;
+}
+.devices .devices_list{
+ padding:10rpx 0;
+ display:flex;
+ flex-wrap:wrap;
+}
+.devices .devices_list .border{
+ width:50%;
+ display:flex;
+ justify-content:center;
+}
+.devices .devices_list .devices_item{
+ width:280rpx;
+ height:200rpx;
+ margin:30rpx 20rpx;
+ border-radius:10rpx;
+ display:flex;
+ flex-direction:column;
+ justify-content:center;
+ box-shadow:0rpx 5rpx 10rpx #bfbfbf;
+}
+.info{
+ flex: 3;
+ display: flex;
+}
+.status{
+ padding: 15rpx;
+ text-align: right;
+ flex: 1;
+}
+.devices .devices_list .devices_item:active{
+ background-color:rgba(0,0,0,.1);
+}
+.devices .devices_list .devices_item .img{
+ width:50%;
+ display:flex;
+ justify-content:center;
+ align-items:center;
+}
+.devices .devices_list .devices_item image{
+ width:100rpx;
+ height:100rpx;
+}
+.devices .devices_list .devices_item .name{
+ flex:2;
+ padding:0 20rpx;
+ /* background-color:rgba(0,0,0,.1); */
+ border-top:1rpx solid #bfbfbf;
+ display:flex;
+ align-items:center;
+}
+.noDevice{
+ display:block;
+ width:100%;
+ height:200rpx;
+ text-align:center;
+ line-height:200rpx;
+}
+.addDevice{
+ background-color:blue;
+ width:80rpx;
+ height:80rpx;
+ border-radius:50%;
+ position:fixed;
+ right:0;
+ top:30%;
+ display:flex;
+ justify-content:center;
+ align-items:center;
+}
+.addDevice:active{
+ background-color:deepskyblue;
+}
+.addDevice image{
+ width:40rpx;
+ height:40rpx;
+}
+scroll-view{
+ height: 60vh;
+ width: 100vw;
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/login/index.js b/wechat/miniprogram/pages/login/index.js
new file mode 100644
index 00000000..ebb0ac3c
--- /dev/null
+++ b/wechat/miniprogram/pages/login/index.js
@@ -0,0 +1,107 @@
+// miniprogram/pages/index/index.js
+const { loginApi } = require('../../API/request.js');
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ value:'',
+ img:'',
+ uuid:'',
+ password:'admin123',
+ username:'admin'
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getCaptchaImage();
+ },
+
+ //获取验证码图片和uuid
+ async getCaptchaImage(){
+ const res = await loginApi('/captchaImage',{ method:'GET' });
+ this.setData({
+ img:res.data.img,
+ uuid:res.data.uuid
+ })
+ },
+
+
+ //登录
+ async submit(){
+ const res = await loginApi('/login',{
+ method:'POST',
+ data:{
+ code:this.data.value,
+ uuid:this.data.uuid,
+ password: this.data.password,
+ username: this.data.username
+ },
+ })
+ wx.setStorageSync('token', res.data.token);
+ },
+
+
+ inputUsername(e){
+ this.setData({ username:e.detail });
+ },
+ inputPassword(e){
+ this.setData({ password:e.detail });
+ },
+ onChange(e){
+ this.setData({ value:e.detail });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/login/index.json b/wechat/miniprogram/pages/login/index.json
new file mode 100644
index 00000000..e52daced
--- /dev/null
+++ b/wechat/miniprogram/pages/login/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "van-field": "@vant/weapp/field/index"
+ }
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/login/index.wxml b/wechat/miniprogram/pages/login/index.wxml
new file mode 100644
index 00000000..c6f89272
--- /dev/null
+++ b/wechat/miniprogram/pages/login/index.wxml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wechat/miniprogram/pages/login/index.wxss b/wechat/miniprogram/pages/login/index.wxss
new file mode 100644
index 00000000..8e86a300
--- /dev/null
+++ b/wechat/miniprogram/pages/login/index.wxss
@@ -0,0 +1,33 @@
+/* miniprogram/pages/index/index.wxss */
+.form{
+ width: 90vw;
+ margin: 0 auto;
+}
+.input{
+ margin: 15rpx 0;
+ /* box-shadow: 0 0 5rpx 5rpx #bfbfbf; */
+ border-bottom: 1rpx solid #bfbfbf;
+}
+.cap{
+ display: flex;
+ width: 100%;
+}
+.captcha{
+ flex: 1;
+ margin-right: 30rpx;
+ /* box-shadow: 0 0 5rpx 5rpx #bfbfbf; */
+ border-bottom: 1rpx solid #bfbfbf;
+
+}
+.img{
+ /* box-shadow: 0 0 5rpx 5rpx #bfbfbf; */
+ border-bottom: 1rpx solid #bfbfbf;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.img image{
+ width: 200rpx;
+ display: inline-block;
+ height: 77rpx;
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/roomSystem/index.js b/wechat/miniprogram/pages/roomSystem/index.js
new file mode 100644
index 00000000..2c219cb8
--- /dev/null
+++ b/wechat/miniprogram/pages/roomSystem/index.js
@@ -0,0 +1,232 @@
+// miniprogram/pages/roomSystem/index.js
+const { requestApi } = require('../../API/request.js');
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ light_power:false,
+ gradientColor: {
+ '0%': '#ffd01e',
+ '100%': '#ee0a24',
+ },
+ curtainShow:false,
+ curtainAutoChecked:true,
+ curtainManvalChecked:false,
+ curtainPowerChecked:false,
+ fanShow:false,
+ tempShow:false,
+ realMaxTempValue:50,
+ maxTempValue:0,
+ currentValue:0,
+ deviceInfo:{},
+ nowDeviceData:{}
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ wx.setNavigationBarTitle({
+ title: '智能宿舍系统',
+ })
+ this.setData({
+ currentValue:this.data.realMaxTempValue,
+ maxTempValue:this.data.realMaxTempValue
+ });
+
+ this.getLastPageData();
+ this.query();
+ },
+
+
+ //查询设备最新数据
+ async query(){
+ const res = await requestApi(`/system/status/newByNum/${this.data.deviceInfo.deviceNum}`,{ method:'GET' });
+ let light_power;
+ if (res.data.data.lightStatus === 0) {
+ light_power = false;
+ }else if (res.data.data.lightStatus === 1) {
+ light_power =true;
+ }
+ this.setData({
+ nowDeviceData:res.data.data,
+ light_power
+ })
+ },
+
+
+
+
+ getLastPageData(){
+ const eventChannel = this.getOpenerEventChannel();
+ eventChannel.on('getDeviceInfo',(data)=>{
+ this.setData({ deviceInfo:data })
+ })
+ },
+
+
+ initParams(){
+ // const params = {
+ // deviceNum: this.data.deviceInfo.deviceNum,
+ // relayStatus: this.data.nowDeviceData.relayStatus,
+ // lightStatus: this.data.nowDeviceData.lightStatus,
+ // isOnline: this.data.nowDeviceData.isOnline,
+ // rssi: this.data.nowDeviceData.rssi,
+ // deviceTemperature: this.data.nowDeviceData.deviceTemperature,
+ // airTemperature: this.data.nowDeviceData.airTemperature,
+ // airHumidity: this.data.nowDeviceData.airHumidity,
+ // triggerSource: this.data.nowDeviceData.triggerSource,
+ // brightness: this.data.nowDeviceData.brightness,
+ // lightInterval: this.data.nowDeviceData.lightInterval,
+ // lightMode: this.data.nowDeviceData.lightMode,
+ // fadeTime: this.data.nowDeviceData.fadeTime,
+ // red: this.data.nowDeviceData.red,
+ // green: this.data.nowDeviceData.green,
+ // blue: this.data.nowDeviceData.blue,
+ // other:this.data.nowDeviceData.other
+ // };
+ const params = this.data.nowDeviceData;
+ return params;
+ },
+
+ async lightPower(){
+ let light_power = this.data.light_power;
+ let lightStatus;
+ if (light_power === false) {
+ lightStatus = 1;
+ }else if (light_power === true) {
+ lightStatus = 0;
+ }
+ let params = this.initParams();
+ params.lightStatus = lightStatus;
+ const res = await requestApi(`/system/status`,{
+ method:'PUT',
+ data:params
+ });
+ console.log('lightres:',res);
+ if (res.data.code !== 200) {
+ wx.showToast({
+ title: '操作失败',
+ icon:'error'
+ })
+ return;
+ }
+ this.setData({ light_power:!light_power });
+ },
+
+ showCurtain(){
+ this.setData({
+ curtainShow:true
+ })
+ },
+
+ onAutoCurtainMode(){
+ let curtainAutoChecked = !this.data.curtainAutoChecked;
+ this.setData({
+ curtainAutoChecked:curtainAutoChecked,
+ curtainManvalChecked:!curtainAutoChecked
+ })
+ },
+ onManvalCurtainMode(){
+ let curtainManvalChecked = !this.data.curtainManvalChecked;
+ this.setData({
+ curtainAutoChecked:!curtainManvalChecked,
+ curtainManvalChecked:curtainManvalChecked
+ })
+ },
+ onChangeCurtainPower(){
+ let curtainPowerChecked = this.data.curtainPowerChecked;
+ if (this.data.curtainManvalChecked) {
+ this.setData({ curtainPowerChecked:!curtainPowerChecked })
+ }
+ },
+
+ showFan(){
+ this.setData({
+ fanShow:true
+ })
+ },
+ showTemp(){
+ this.setData({
+ tempShow:true
+ })
+ },
+ onChangeValue(e){
+ this.setData({ maxTempValue:e.detail,currentValue:e.detail })
+ },
+ onDrag(e){
+ this.setData({ currentValue:e.detail.value })
+ },
+ onCancel(){
+ this.setData({
+ maxTempValue:this.data.realMaxTempValue,
+ currentValue:this.data.realMaxTempValue,
+ tempShow:false
+ })
+ },
+ onMakeSure(){
+ this.setData({
+ realMaxTempValue:this.data.maxTempValue,
+ tempShow:false
+ })
+ },
+ onClose(){
+ this.setData({
+ curtainShow:false,
+ fanShow:false
+ })
+ this.onCancel();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/roomSystem/index.json b/wechat/miniprogram/pages/roomSystem/index.json
new file mode 100644
index 00000000..7dfbe2fa
--- /dev/null
+++ b/wechat/miniprogram/pages/roomSystem/index.json
@@ -0,0 +1,11 @@
+{
+ "usingComponents": {
+ "van-circle": "@vant/weapp/circle/index",
+ "van-popup": "@vant/weapp/popup/index",
+ "van-cell": "@vant/weapp/cell/index",
+ "van-cell-group": "@vant/weapp/cell-group/index",
+ "van-switch": "@vant/weapp/switch/index",
+ "van-slider": "@vant/weapp/slider/index",
+ "van-button": "@vant/weapp/button/index"
+ }
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/pages/roomSystem/index.wxml b/wechat/miniprogram/pages/roomSystem/index.wxml
new file mode 100644
index 00000000..8f4f1475
--- /dev/null
+++ b/wechat/miniprogram/pages/roomSystem/index.wxml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+ 温度:{{ nowDeviceData.deviceTemperature }} ℃
+ 湿度:{{ nowDeviceData.airHumidity }}%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置温度最大值:{{ maxTempValue }}℃
+ 滑块当前值:{{ currentValue }}
+
+
+
+
+ 取 消
+ 确 定
+
+
+
diff --git a/wechat/miniprogram/pages/roomSystem/index.wxss b/wechat/miniprogram/pages/roomSystem/index.wxss
new file mode 100644
index 00000000..348dffac
--- /dev/null
+++ b/wechat/miniprogram/pages/roomSystem/index.wxss
@@ -0,0 +1,63 @@
+/* miniprogram/pages/roomSystem/index.wxss */
+.center{
+ display:flex;
+ justify-content:center;
+ align-items:center;
+}
+.top{
+ display:flex;
+ justify-content:space-around;
+ margin:100rpx 0;
+}
+.power{
+ background-color:#bfbfbf;
+}
+.around{
+ width:300rpx;
+ height:300rpx;
+ border-radius:50%;
+}
+.power_light:active{
+ background-color:#eee;
+}
+.power_light{
+ width:230rpx;
+ height:230rpx;
+ border-radius:50%;
+ background-color:#fff;
+}
+.power_light>image{
+ width:70rpx;
+ height:70rpx;
+ border-radius:50%;
+}
+.temp_text{
+ font-size:46rpx;
+ margin:15rpx 0;
+}
+
+.group{
+ width:90%;
+ margin:30rpx auto;
+}
+.item{
+ margin:25rpx 0;
+ width:100%;
+}
+.choose{
+ margin:15rpx 0;
+}
+.tempZu{
+ width:80%;
+ margin:35rpx auto;
+}
+.slider{
+ margin:70rpx auto;
+}
+.btns{
+ display:flex;
+ justify-content:space-around;
+}
+van-button{
+ width:200rpx;
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/sitemap.json b/wechat/miniprogram/sitemap.json
new file mode 100644
index 00000000..27b2b26d
--- /dev/null
+++ b/wechat/miniprogram/sitemap.json
@@ -0,0 +1,7 @@
+{
+ "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+ "rules": [{
+ "action": "allow",
+ "page": "*"
+ }]
+}
\ No newline at end of file
diff --git a/wechat/miniprogram/style/guide.wxss b/wechat/miniprogram/style/guide.wxss
new file mode 100644
index 00000000..5a77414e
--- /dev/null
+++ b/wechat/miniprogram/style/guide.wxss
@@ -0,0 +1,144 @@
+page {
+ background: #f6f6f6;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+}
+
+.list {
+ margin-top: 40rpx;
+ height: auto;
+ width: 100%;
+ background: #fff;
+ padding: 0 40rpx;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ border-left: none;
+ border-right: none;
+ transition: all 300ms ease;
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+ box-sizing: border-box;
+}
+
+.list-item {
+ width: 100%;
+ padding: 0;
+ line-height: 104rpx;
+ font-size: 34rpx;
+ color: #007aff;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ display: flex;
+ flex-direction: row;
+ align-content: center;
+ justify-content: space-between;
+ box-sizing: border-box;
+}
+
+.list-item:first-child {
+ border-top: none;
+}
+
+.list-item image {
+ max-width: 100%;
+ max-height: 20vh;
+ margin: 20rpx 0;
+}
+
+.request-text {
+ color: #222;
+ padding: 20rpx 0;
+ font-size: 24rpx;
+ line-height: 36rpx;
+ word-break: break-all;
+}
+
+.guide {
+ width: 100%;
+ padding: 40rpx;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+}
+
+.guide .headline {
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #555;
+ line-height: 40rpx;
+}
+
+.guide .p {
+ margin-top: 20rpx;
+ font-size: 28rpx;
+ line-height: 36rpx;
+ color: #666;
+}
+
+.guide .code {
+ margin-top: 20rpx;
+ font-size: 28rpx;
+ line-height: 36rpx;
+ color: #666;
+ background: white;
+ white-space: pre;
+}
+
+.guide .code-dark {
+ margin-top: 20rpx;
+ background: rgba(0, 0, 0, 0.8);
+ padding: 20rpx;
+ font-size: 28rpx;
+ line-height: 36rpx;
+ border-radius: 6rpx;
+ color: #fff;
+ white-space: pre
+}
+
+.guide image {
+ max-width: 100%;
+}
+
+.guide .image1 {
+ margin-top: 20rpx;
+ max-width: 100%;
+ width: 356px;
+ height: 47px;
+}
+
+.guide .image2 {
+ margin-top: 20rpx;
+ width: 264px;
+ height: 100px;
+}
+
+.guide .flat-image {
+ height: 100px;
+}
+
+.guide .code-image {
+ max-width: 100%;
+}
+
+.guide .copyBtn {
+ width: 180rpx;
+ font-size: 20rpx;
+ margin-top: 16rpx;
+ margin-left: 0;
+}
+
+.guide .nav {
+ margin-top: 50rpx;
+ display: flex;
+ flex-direction: row;
+ align-content: space-between;
+}
+
+.guide .nav .prev {
+ margin-left: unset;
+}
+
+.guide .nav .next {
+ margin-right: unset;
+}
+
diff --git a/wechat/miniprogram/utils/request.js b/wechat/miniprogram/utils/request.js
new file mode 100644
index 00000000..5dc7903d
--- /dev/null
+++ b/wechat/miniprogram/utils/request.js
@@ -0,0 +1,107 @@
+const CryptoJs = require('crypto-js');
+const HmacSHA1 = require('crypto-js').HmacSHA1;
+const { Base64,Utf8 } = require('crypto-js').enc;
+const application = 'YoWrZ2mYoZc'; //app_key
+const appSecret = 'qGJEtGEyfj'; //app_secret
+
+//获取服务器返回的时间戳
+const getTimestamp=()=>{
+ return new Promise((resolve,reject)=>{
+ wx.request({
+ url: 'https://ag-api.ctwing.cn/echo',
+ timeout: 0,
+ success: (result) => {
+ resolve(result.header['x-ag-timestamp'])
+ },
+ fail: (err)=>{
+ reject(err)
+ }
+ })
+ })
+};
+//计算时间偏移量offset
+const getOffset = async ()=>{
+ const start = (new Date()).valueOf(); //获取当前系统时间戳
+ const time = await getTimestamp();
+ const end = (new Date()).valueOf();
+ const offset = Math.round(time - (start + end)/2);
+ return offset;
+};
+
+//对象按名称ASCII码排序
+function sort_ASCII(obj){
+ var arr = new Array();
+ var num = 0;
+ for (var i in obj) {
+ arr[num] = i;
+ num++;
+ }
+ //sort方法让数组元素按ASCII码排序
+ var sortArr = arr.sort();
+ var sortObj = {};
+ for (var i in sortArr) {
+ sortObj[sortArr[i]] = obj[sortArr[i]];
+ }
+ return sortObj;
+}
+
+//将公共参数封装到请求中
+//url 请求地址 + 路径
+//method 请求方式
+//version API版本号
+//data 对象格式 非公共请求参数,如果不是必选参数,可以给其赋予空值,例如 { "pageSize":"" }
+//body 请求体参数
+export const request = async (url,method,version,data,body)=>{
+ data = (sort_ASCII(data)) || null;
+ const offset = await getOffset();
+ const timestamp = (new Date()).valueOf() + offset;
+ let params = data;
+ let Data = {
+ 'application':application,
+ 'timestamp':timestamp,
+ ...data
+ };
+ //生成要签名的字符串
+ let dataStr = JSON.stringify(Data).replace(/[\"|\{]/g,'').replace(/[\,|\}]/g,'\n');
+ if(body && body!== {}){
+ dataStr += (JSON.stringify(body).concat('\n'));
+ params = body;
+ if (data && Object.keys(data).length>1) {
+ let query = '';
+ for(let k in data){
+ if (k === 'MasterKey') {
+ continue;
+ }
+ query += `${ k }=${ data[k] }&`;
+ }
+ url = `${ url }?${ query }`
+ }
+ }
+
+ //生成签名
+ const signature = Base64.stringify(HmacSHA1(dataStr.toString(Utf8),appSecret));
+ let header = {
+ 'application':application,
+ 'signature':signature,
+ 'timestamp':timestamp,
+ 'version':version
+ };
+ if (data.MasterKey) {
+ header.MasterKey = data.MasterKey;
+ }
+ return new Promise((resolve,reject)=>{
+ wx.request({
+ url: `https://${ url }`,
+ method:method,
+ data: params,
+ //公共参数封装到请求头
+ header:header,
+ success: (result) => {
+ resolve(result);
+ },
+ fail: (res) => {
+ reject(res);
+ },
+ })
+ })
+}
diff --git a/wechat/project.config.json b/wechat/project.config.json
new file mode 100644
index 00000000..c0314a33
--- /dev/null
+++ b/wechat/project.config.json
@@ -0,0 +1,68 @@
+{
+ "miniprogramRoot": "miniprogram/",
+ "cloudfunctionRoot": "cloudfunctions/",
+ "setting": {
+ "urlCheck": false,
+ "es6": true,
+ "enhance": true,
+ "postcss": true,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "newFeature": true,
+ "coverView": true,
+ "nodeModules": true,
+ "autoAudits": false,
+ "showShadowRootInWxmlPanel": true,
+ "scopeDataCheck": false,
+ "uglifyFileName": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "compileHotReLoad": false,
+ "useMultiFrameRuntime": true,
+ "useApiHook": true,
+ "useApiHostProcess": false,
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ },
+ "enableEngineNative": false,
+ "bundle": false,
+ "useIsolateContext": true,
+ "useCompilerModule": true,
+ "userConfirmedUseCompilerModuleSwitch": false,
+ "userConfirmedBundleSwitch": false,
+ "packNpmManually": false,
+ "packNpmRelationList": [
+ 0
+ ],
+ "minifyWXSS": true
+ },
+ "appid": "wxd6dd7c637c5ece22",
+ "projectname": "ctwing",
+ "libVersion": "2.14.1",
+ "condition": {
+ "search": {
+ "list": []
+ },
+ "conversation": {
+ "list": []
+ },
+ "plugin": {
+ "list": []
+ },
+ "game": {
+ "list": []
+ },
+ "miniprogram": {
+ "list": [
+ {
+ "id": -1,
+ "name": "db guide",
+ "pathName": "pages/databaseGuide/databaseGuide"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/wechat/project.private.config.json b/wechat/project.private.config.json
new file mode 100644
index 00000000..0bb67bf6
--- /dev/null
+++ b/wechat/project.private.config.json
@@ -0,0 +1,36 @@
+{
+ "setting": {},
+ "condition": {
+ "plugin": {
+ "list": []
+ },
+ "game": {
+ "list": []
+ },
+ "gamePlugin": {
+ "list": []
+ },
+ "miniprogram": {
+ "list": [
+ {
+ "id": -1,
+ "name": "db guide",
+ "pathName": "pages/databaseGuide/databaseGuide",
+ "query": ""
+ },
+ {
+ "name": "pages/roomSystem/index",
+ "pathName": "pages/roomSystem/index",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/login/index",
+ "pathName": "pages/login/index",
+ "query": "",
+ "scene": null
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file