btxui 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,25 +1,13 @@
1
1
  import { defineComponent, ref, computed, reactive, onMounted, renderSlot, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, withModifiers, watch, createVNode, resolveComponent, createElementBlock, Fragment, createCommentVNode, withDirectives, vModelDynamic, vModelText } from "vue";
2
- function _mergeNamespaces(n, m) {
3
- for (var i = 0; i < m.length; i++) {
4
- const e = m[i];
5
- if (typeof e !== "string" && !Array.isArray(e)) {
6
- for (const k in e) {
7
- if (k !== "default" && !(k in n)) {
8
- const d = Object.getOwnPropertyDescriptor(e, k);
9
- if (d) {
10
- Object.defineProperty(n, k, d.get ? d : {
11
- enumerable: true,
12
- get: () => e[k]
13
- });
14
- }
15
- }
16
- }
17
- }
18
- }
19
- return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
20
- }
21
2
  const prestyles = {
22
3
  //预置样式-----------------------------------------------------------------------------------
4
+ // 文本对齐
5
+ "pcenter": `text-align: center;`,
6
+ "pright": `text-align: right;`,
7
+ "pleft": `text-align: left;`,
8
+ "pjustify": `text-align: justify;`,
9
+ // 首行缩进
10
+ "pindent": `text-indent: 2em;`,
23
11
  // 文字加粗
24
12
  "bold": `font-weight: bold;`,
25
13
  // 隐藏显示
@@ -143,10 +131,6 @@ const prestyles = {
143
131
  "objfit-none": `object-fit: none;`,
144
132
  "objfit-scaledown": `object-fit: scale-down;`,
145
133
  // 二段赋值-----------------------------------------------------------------------------------
146
- // 文本对齐
147
- "p": {
148
- pro: "text-align"
149
- },
150
134
  // 文字颜色
151
135
  "color": {
152
136
  pro: "color"
@@ -311,254 +295,217 @@ const theme = {
311
295
  this.colors = { ...this.colors, ...colors };
312
296
  }
313
297
  };
314
- function getDefaultExportFromCjs(x) {
315
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
316
- }
317
- var md5$2 = { exports: {} };
318
- var crypt = { exports: {} };
319
- (function() {
320
- var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", crypt$1 = {
321
- // Bit-wise rotation left
322
- rotl: function(n, b) {
323
- return n << b | n >>> 32 - b;
324
- },
325
- // Bit-wise rotation right
326
- rotr: function(n, b) {
327
- return n << 32 - b | n >>> b;
328
- },
329
- // Swap big-endian to little-endian and vice versa
330
- endian: function(n) {
331
- if (n.constructor == Number) {
332
- return crypt$1.rotl(n, 8) & 16711935 | crypt$1.rotl(n, 24) & 4278255360;
298
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
299
+ var md5Exports = {};
300
+ var md5$1 = {
301
+ get exports() {
302
+ return md5Exports;
303
+ },
304
+ set exports(v) {
305
+ md5Exports = v;
306
+ }
307
+ };
308
+ (function(module) {
309
+ (function($) {
310
+ function safeAdd(x, y) {
311
+ var lsw = (x & 65535) + (y & 65535);
312
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
313
+ return msw << 16 | lsw & 65535;
314
+ }
315
+ function bitRotateLeft(num, cnt) {
316
+ return num << cnt | num >>> 32 - cnt;
317
+ }
318
+ function md5cmn(q, a, b, x, s, t) {
319
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
320
+ }
321
+ function md5ff(a, b, c, d, x, s, t) {
322
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
323
+ }
324
+ function md5gg(a, b, c, d, x, s, t) {
325
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
326
+ }
327
+ function md5hh(a, b, c, d, x, s, t) {
328
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
329
+ }
330
+ function md5ii(a, b, c, d, x, s, t) {
331
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
332
+ }
333
+ function binlMD5(x, len) {
334
+ x[len >> 5] |= 128 << len % 32;
335
+ x[(len + 64 >>> 9 << 4) + 14] = len;
336
+ var i;
337
+ var olda;
338
+ var oldb;
339
+ var oldc;
340
+ var oldd;
341
+ var a = 1732584193;
342
+ var b = -271733879;
343
+ var c = -1732584194;
344
+ var d = 271733878;
345
+ for (i = 0; i < x.length; i += 16) {
346
+ olda = a;
347
+ oldb = b;
348
+ oldc = c;
349
+ oldd = d;
350
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
351
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
352
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
353
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
354
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
355
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
356
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
357
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
358
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
359
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
360
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
361
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
362
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
363
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
364
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
365
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
366
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
367
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
368
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
369
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
370
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
371
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
372
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
373
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
374
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
375
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
376
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
377
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
378
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
379
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
380
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
381
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
382
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
383
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
384
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
385
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
386
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
387
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
388
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
389
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
390
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
391
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
392
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
393
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
394
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
395
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
396
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
397
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
398
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
399
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
400
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
401
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
402
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
403
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
404
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
405
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
406
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
407
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
408
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
409
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
410
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
411
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
412
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
413
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
414
+ a = safeAdd(a, olda);
415
+ b = safeAdd(b, oldb);
416
+ c = safeAdd(c, oldc);
417
+ d = safeAdd(d, oldd);
333
418
  }
334
- for (var i = 0; i < n.length; i++)
335
- n[i] = crypt$1.endian(n[i]);
336
- return n;
337
- },
338
- // Generate an array of any length of random bytes
339
- randomBytes: function(n) {
340
- for (var bytes = []; n > 0; n--)
341
- bytes.push(Math.floor(Math.random() * 256));
342
- return bytes;
343
- },
344
- // Convert a byte array to big-endian 32-bit words
345
- bytesToWords: function(bytes) {
346
- for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
347
- words[b >>> 5] |= bytes[i] << 24 - b % 32;
348
- return words;
349
- },
350
- // Convert big-endian 32-bit words to a byte array
351
- wordsToBytes: function(words) {
352
- for (var bytes = [], b = 0; b < words.length * 32; b += 8)
353
- bytes.push(words[b >>> 5] >>> 24 - b % 32 & 255);
354
- return bytes;
355
- },
356
- // Convert a byte array to a hex string
357
- bytesToHex: function(bytes) {
358
- for (var hex = [], i = 0; i < bytes.length; i++) {
359
- hex.push((bytes[i] >>> 4).toString(16));
360
- hex.push((bytes[i] & 15).toString(16));
419
+ return [a, b, c, d];
420
+ }
421
+ function binl2rstr(input) {
422
+ var i;
423
+ var output = "";
424
+ var length32 = input.length * 32;
425
+ for (i = 0; i < length32; i += 8) {
426
+ output += String.fromCharCode(input[i >> 5] >>> i % 32 & 255);
361
427
  }
362
- return hex.join("");
363
- },
364
- // Convert a hex string to a byte array
365
- hexToBytes: function(hex) {
366
- for (var bytes = [], c = 0; c < hex.length; c += 2)
367
- bytes.push(parseInt(hex.substr(c, 2), 16));
368
- return bytes;
369
- },
370
- // Convert a byte array to a base-64 string
371
- bytesToBase64: function(bytes) {
372
- for (var base64 = [], i = 0; i < bytes.length; i += 3) {
373
- var triplet = bytes[i] << 16 | bytes[i + 1] << 8 | bytes[i + 2];
374
- for (var j = 0; j < 4; j++)
375
- if (i * 8 + j * 6 <= bytes.length * 8)
376
- base64.push(base64map.charAt(triplet >>> 6 * (3 - j) & 63));
377
- else
378
- base64.push("=");
428
+ return output;
429
+ }
430
+ function rstr2binl(input) {
431
+ var i;
432
+ var output = [];
433
+ output[(input.length >> 2) - 1] = void 0;
434
+ for (i = 0; i < output.length; i += 1) {
435
+ output[i] = 0;
379
436
  }
380
- return base64.join("");
381
- },
382
- // Convert a base-64 string to a byte array
383
- base64ToBytes: function(base64) {
384
- base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
385
- for (var bytes = [], i = 0, imod4 = 0; i < base64.length; imod4 = ++i % 4) {
386
- if (imod4 == 0)
387
- continue;
388
- bytes.push((base64map.indexOf(base64.charAt(i - 1)) & Math.pow(2, -2 * imod4 + 8) - 1) << imod4 * 2 | base64map.indexOf(base64.charAt(i)) >>> 6 - imod4 * 2);
437
+ var length8 = input.length * 8;
438
+ for (i = 0; i < length8; i += 8) {
439
+ output[i >> 5] |= (input.charCodeAt(i / 8) & 255) << i % 32;
389
440
  }
390
- return bytes;
441
+ return output;
391
442
  }
392
- };
393
- crypt.exports = crypt$1;
394
- })();
395
- var cryptExports = crypt.exports;
396
- var charenc = {
397
- // UTF-8 encoding
398
- utf8: {
399
- // Convert a string to a byte array
400
- stringToBytes: function(str) {
401
- return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
402
- },
403
- // Convert a byte array to a string
404
- bytesToString: function(bytes) {
405
- return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
443
+ function rstrMD5(s) {
444
+ return binl2rstr(binlMD5(rstr2binl(s), s.length * 8));
406
445
  }
407
- },
408
- // Binary encoding
409
- bin: {
410
- // Convert a string to a byte array
411
- stringToBytes: function(str) {
412
- for (var bytes = [], i = 0; i < str.length; i++)
413
- bytes.push(str.charCodeAt(i) & 255);
414
- return bytes;
415
- },
416
- // Convert a byte array to a string
417
- bytesToString: function(bytes) {
418
- for (var str = [], i = 0; i < bytes.length; i++)
419
- str.push(String.fromCharCode(bytes[i]));
420
- return str.join("");
446
+ function rstrHMACMD5(key, data) {
447
+ var i;
448
+ var bkey = rstr2binl(key);
449
+ var ipad = [];
450
+ var opad = [];
451
+ var hash;
452
+ ipad[15] = opad[15] = void 0;
453
+ if (bkey.length > 16) {
454
+ bkey = binlMD5(bkey, key.length * 8);
455
+ }
456
+ for (i = 0; i < 16; i += 1) {
457
+ ipad[i] = bkey[i] ^ 909522486;
458
+ opad[i] = bkey[i] ^ 1549556828;
459
+ }
460
+ hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
461
+ return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
421
462
  }
422
- }
423
- };
424
- var charenc_1 = charenc;
425
- /*!
426
- * Determine if an object is a Buffer
427
- *
428
- * @author Feross Aboukhadijeh <https://feross.org>
429
- * @license MIT
430
- */
431
- var isBuffer_1 = function(obj) {
432
- return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer);
433
- };
434
- function isBuffer(obj) {
435
- return !!obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
436
- }
437
- function isSlowBuffer(obj) {
438
- return typeof obj.readFloatLE === "function" && typeof obj.slice === "function" && isBuffer(obj.slice(0, 0));
439
- }
440
- (function() {
441
- var crypt2 = cryptExports, utf8 = charenc_1.utf8, isBuffer2 = isBuffer_1, bin = charenc_1.bin, md52 = function(message, options) {
442
- if (message.constructor == String)
443
- if (options && options.encoding === "binary")
444
- message = bin.stringToBytes(message);
445
- else
446
- message = utf8.stringToBytes(message);
447
- else if (isBuffer2(message))
448
- message = Array.prototype.slice.call(message, 0);
449
- else if (!Array.isArray(message) && message.constructor !== Uint8Array)
450
- message = message.toString();
451
- var m = crypt2.bytesToWords(message), l = message.length * 8, a = 1732584193, b = -271733879, c = -1732584194, d = 271733878;
452
- for (var i = 0; i < m.length; i++) {
453
- m[i] = (m[i] << 8 | m[i] >>> 24) & 16711935 | (m[i] << 24 | m[i] >>> 8) & 4278255360;
463
+ function rstr2hex(input) {
464
+ var hexTab = "0123456789abcdef";
465
+ var output = "";
466
+ var x;
467
+ var i;
468
+ for (i = 0; i < input.length; i += 1) {
469
+ x = input.charCodeAt(i);
470
+ output += hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15);
471
+ }
472
+ return output;
473
+ }
474
+ function str2rstrUTF8(input) {
475
+ return unescape(encodeURIComponent(input));
476
+ }
477
+ function rawMD5(s) {
478
+ return rstrMD5(str2rstrUTF8(s));
479
+ }
480
+ function hexMD5(s) {
481
+ return rstr2hex(rawMD5(s));
482
+ }
483
+ function rawHMACMD5(k, d) {
484
+ return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d));
485
+ }
486
+ function hexHMACMD5(k, d) {
487
+ return rstr2hex(rawHMACMD5(k, d));
488
+ }
489
+ function md52(string, key, raw) {
490
+ if (!key) {
491
+ if (!raw) {
492
+ return hexMD5(string);
493
+ }
494
+ return rawMD5(string);
495
+ }
496
+ if (!raw) {
497
+ return hexHMACMD5(key, string);
498
+ }
499
+ return rawHMACMD5(key, string);
454
500
  }
455
- m[l >>> 5] |= 128 << l % 32;
456
- m[(l + 64 >>> 9 << 4) + 14] = l;
457
- var FF = md52._ff, GG = md52._gg, HH = md52._hh, II = md52._ii;
458
- for (var i = 0; i < m.length; i += 16) {
459
- var aa = a, bb = b, cc = c, dd = d;
460
- a = FF(a, b, c, d, m[i + 0], 7, -680876936);
461
- d = FF(d, a, b, c, m[i + 1], 12, -389564586);
462
- c = FF(c, d, a, b, m[i + 2], 17, 606105819);
463
- b = FF(b, c, d, a, m[i + 3], 22, -1044525330);
464
- a = FF(a, b, c, d, m[i + 4], 7, -176418897);
465
- d = FF(d, a, b, c, m[i + 5], 12, 1200080426);
466
- c = FF(c, d, a, b, m[i + 6], 17, -1473231341);
467
- b = FF(b, c, d, a, m[i + 7], 22, -45705983);
468
- a = FF(a, b, c, d, m[i + 8], 7, 1770035416);
469
- d = FF(d, a, b, c, m[i + 9], 12, -1958414417);
470
- c = FF(c, d, a, b, m[i + 10], 17, -42063);
471
- b = FF(b, c, d, a, m[i + 11], 22, -1990404162);
472
- a = FF(a, b, c, d, m[i + 12], 7, 1804603682);
473
- d = FF(d, a, b, c, m[i + 13], 12, -40341101);
474
- c = FF(c, d, a, b, m[i + 14], 17, -1502002290);
475
- b = FF(b, c, d, a, m[i + 15], 22, 1236535329);
476
- a = GG(a, b, c, d, m[i + 1], 5, -165796510);
477
- d = GG(d, a, b, c, m[i + 6], 9, -1069501632);
478
- c = GG(c, d, a, b, m[i + 11], 14, 643717713);
479
- b = GG(b, c, d, a, m[i + 0], 20, -373897302);
480
- a = GG(a, b, c, d, m[i + 5], 5, -701558691);
481
- d = GG(d, a, b, c, m[i + 10], 9, 38016083);
482
- c = GG(c, d, a, b, m[i + 15], 14, -660478335);
483
- b = GG(b, c, d, a, m[i + 4], 20, -405537848);
484
- a = GG(a, b, c, d, m[i + 9], 5, 568446438);
485
- d = GG(d, a, b, c, m[i + 14], 9, -1019803690);
486
- c = GG(c, d, a, b, m[i + 3], 14, -187363961);
487
- b = GG(b, c, d, a, m[i + 8], 20, 1163531501);
488
- a = GG(a, b, c, d, m[i + 13], 5, -1444681467);
489
- d = GG(d, a, b, c, m[i + 2], 9, -51403784);
490
- c = GG(c, d, a, b, m[i + 7], 14, 1735328473);
491
- b = GG(b, c, d, a, m[i + 12], 20, -1926607734);
492
- a = HH(a, b, c, d, m[i + 5], 4, -378558);
493
- d = HH(d, a, b, c, m[i + 8], 11, -2022574463);
494
- c = HH(c, d, a, b, m[i + 11], 16, 1839030562);
495
- b = HH(b, c, d, a, m[i + 14], 23, -35309556);
496
- a = HH(a, b, c, d, m[i + 1], 4, -1530992060);
497
- d = HH(d, a, b, c, m[i + 4], 11, 1272893353);
498
- c = HH(c, d, a, b, m[i + 7], 16, -155497632);
499
- b = HH(b, c, d, a, m[i + 10], 23, -1094730640);
500
- a = HH(a, b, c, d, m[i + 13], 4, 681279174);
501
- d = HH(d, a, b, c, m[i + 0], 11, -358537222);
502
- c = HH(c, d, a, b, m[i + 3], 16, -722521979);
503
- b = HH(b, c, d, a, m[i + 6], 23, 76029189);
504
- a = HH(a, b, c, d, m[i + 9], 4, -640364487);
505
- d = HH(d, a, b, c, m[i + 12], 11, -421815835);
506
- c = HH(c, d, a, b, m[i + 15], 16, 530742520);
507
- b = HH(b, c, d, a, m[i + 2], 23, -995338651);
508
- a = II(a, b, c, d, m[i + 0], 6, -198630844);
509
- d = II(d, a, b, c, m[i + 7], 10, 1126891415);
510
- c = II(c, d, a, b, m[i + 14], 15, -1416354905);
511
- b = II(b, c, d, a, m[i + 5], 21, -57434055);
512
- a = II(a, b, c, d, m[i + 12], 6, 1700485571);
513
- d = II(d, a, b, c, m[i + 3], 10, -1894986606);
514
- c = II(c, d, a, b, m[i + 10], 15, -1051523);
515
- b = II(b, c, d, a, m[i + 1], 21, -2054922799);
516
- a = II(a, b, c, d, m[i + 8], 6, 1873313359);
517
- d = II(d, a, b, c, m[i + 15], 10, -30611744);
518
- c = II(c, d, a, b, m[i + 6], 15, -1560198380);
519
- b = II(b, c, d, a, m[i + 13], 21, 1309151649);
520
- a = II(a, b, c, d, m[i + 4], 6, -145523070);
521
- d = II(d, a, b, c, m[i + 11], 10, -1120210379);
522
- c = II(c, d, a, b, m[i + 2], 15, 718787259);
523
- b = II(b, c, d, a, m[i + 9], 21, -343485551);
524
- a = a + aa >>> 0;
525
- b = b + bb >>> 0;
526
- c = c + cc >>> 0;
527
- d = d + dd >>> 0;
501
+ if (module.exports) {
502
+ module.exports = md52;
503
+ } else {
504
+ $.md5 = md52;
528
505
  }
529
- return crypt2.endian([a, b, c, d]);
530
- };
531
- md52._ff = function(a, b, c, d, x, s, t) {
532
- var n = a + (b & c | ~b & d) + (x >>> 0) + t;
533
- return (n << s | n >>> 32 - s) + b;
534
- };
535
- md52._gg = function(a, b, c, d, x, s, t) {
536
- var n = a + (b & d | c & ~d) + (x >>> 0) + t;
537
- return (n << s | n >>> 32 - s) + b;
538
- };
539
- md52._hh = function(a, b, c, d, x, s, t) {
540
- var n = a + (b ^ c ^ d) + (x >>> 0) + t;
541
- return (n << s | n >>> 32 - s) + b;
542
- };
543
- md52._ii = function(a, b, c, d, x, s, t) {
544
- var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
545
- return (n << s | n >>> 32 - s) + b;
546
- };
547
- md52._blocksize = 16;
548
- md52._digestsize = 16;
549
- md5$2.exports = function(message, options) {
550
- if (message === void 0 || message === null)
551
- throw new Error("Illegal argument " + message);
552
- var digestbytes = crypt2.wordsToBytes(md52(message, options));
553
- return options && options.asBytes ? digestbytes : options && options.asString ? bin.bytesToString(digestbytes) : crypt2.bytesToHex(digestbytes);
554
- };
555
- })();
556
- var md5Exports = md5$2.exports;
557
- const md5 = /* @__PURE__ */ getDefaultExportFromCjs(md5Exports);
558
- const md5$1 = /* @__PURE__ */ _mergeNamespaces({
559
- __proto__: null,
560
- default: md5
561
- }, [md5Exports]);
506
+ })(commonjsGlobal);
507
+ })(md5$1);
508
+ const md5 = md5Exports;
562
509
  const GLOBAL_STYLE_NAME = "BTXUIGlobal";
563
510
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
564
511
  __name: "b-style",
@@ -683,9 +630,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
683
630
  };
684
631
  const combineClassName = (_class) => {
685
632
  const classArr = _class.split(" ").sort();
686
- console.log(md5$1);
687
- console.log(`B-${md5$1(classArr.join("&"))}`);
688
- const compSelector = `B-${md5$1(classArr.join("&"))}`;
633
+ const compSelector = `B-${md5(classArr.join("&"))}`;
689
634
  className.value = `${_class} ${compSelector}`;
690
635
  if (!styleMap.value.includes(compSelector)) {
691
636
  styleMap.value.push(compSelector);
package/dist/index.js.gz CHANGED
Binary file
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";function t(e,t){for(var o=0;o<t.length;o++){const r=t[o];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const o=Object.getOwnPropertyDescriptor(r,t);o&&Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const o={bold:"font-weight: bold;",show:"display: block;",hide:"display: none;",wrap:"flex-wrap: wrap;",flex:"display: flex; justify-content: flex-start; align-items: stretch;","flex-column":"display: flex; flex-direction: column;","flex-between":"display: flex; justify-content: space-between; align-items: center;","flex-around":"display: flex; justify-content: space-around; align-items: center;",grid:"display: flex; flex-wrap: wrap; align-content: flex-start;","flex-1":"display: flex; justify-content: flex-start; align-items: flex-start;","flex-2":"display: flex; justify-content: center; align-items: flex-start;","flex-3":"display: flex; justify-content: flex-end; align-items: flex-start;","flex-4":"display: flex; justify-content: flex-start; align-items: center","flex-5":"display: flex; justify-content: center; align-items: center;","flex-6":"display: flex; justify-content: flex-end; align-items: center;","flex-7":"display: flex; justify-content: flex-start; align-items: flex-end;","flex-8":"display: flex; justify-content: center; align-items: flex-end;","flex-9":"display: flex; justify-content: flex-end; align-items: flex-end;","max-h":"height: 100%;","max-w":"width: 100%;",max:"height: 100%; width: 100%;","max-fixed":"height: 100%; width: 100%; position: fixed; left: 0; top: 0;","max-screen":"height: 100vh; width: 100%;",item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:"position: fixed;",rel:"position: relative;",abs:"position: absolute;","over-hide":"overflow: hidden;","over-show":"overflow: visible;","over-scroll":"overflow: auto;","bg-repeat":"background-repeat: repeat;","bg-repeat-x":"background-repeat: repeat-x;","bg-repeat-y":"background-repeat: repeat-y;","bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":"background-position: left top;","bg-pos-2":"background-position: center top;","bg-pos-3":"background-position: right top;","bg-pos-4":"background-position: left center;","bg-pos-5":"background-position: center center;","bg-pos-6":"background-position: right center;","bg-pos-7":"background-position: left bottom;","bg-pos-8":"background-position: center bottom;","bg-pos-9":"background-position: right bottom;","bg-fixed":"background-attachment: scroll;",round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"border-radius: 4px;","round-t":"border-bottom-right-radius: 0; border-bottom-left-radius: 0;","round-b":"border-top-right-radius: 0; border-top-left-radius: 0;","round-l":"border-top-right-radius: 0; border-bottom-right-radius: 0;","round-r":"border-top-left-radius: 0; border-bottom-left-radius: 0;",solid:"border-style: solid;",dashed:"border-style: dashed;","solid-l":"border-left-style: solid;","solid-r":"border-right-style: solid;","solid-t":"border-top-style: solid;","solid-b":"border-bottom-style: solid;","dashed-l":"border-left-style: dashed;","dashed-r":"border-right-style: dashed;","dashed-t":"border-top-style: dashed;","dashed-b":"border-bottom-style: dashed;","line-outside":"background-clip: padding-box;",shadow:"box-shadow: 0 4px 17px;","shadow-sm":"box-shadow: 0 2px 4px;","shadow-lg":"box-shadow: 0 14px 40px;","shadow-relief":"box-shadow: 1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4);",trans:"transition: all .7s;","trans-fast":"transition: all .4s;","trans-slow":"transition: all 1.4s;","trans-no":"transition: none;","blur-no":"filter: blur(0px);","blur-sm":"filter: blur(2px);","blur-md":"filter: blur(7px);","blur-lg":"filter: blur(17px);","dark-no":"filter: brightness(100%);","dark-sm":"filter: brightness(80%);","dark-md":"filter: brightness(50%);","dark-lg":"filter: brightness(20%);","gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: auto;","touch-none":"touchAction: none;",ellipsis:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-line":"textShadow: 1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5);","alpha-0":"opacity: 0; visibility: hidden;","objfit-fill":"object-fit: fill;","objfit-cover":"object-fit: cover;","objfit-contain":"object-fit: contain;","objfit-none":"object-fit: none;","objfit-scaledown":"object-fit: scale-down;",p:{pro:"text-align"},color:{pro:"color"},bg:{pro:"background"},alpha:{pro:"opacity"},font:{pro:"font-family"},lh:{pro:"line-height"},z:{pro:"z-index"},line:{pro:"border-color"},origin:{pro:"transform-origin"},order:{pro:"order"},grow:{pro:"flex-grow"},basis:{pro:"flex-basis"},lspace:{pro:"letter-spacing",unit:"rem"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},rw:{pro:"max-width",unit:"rem"},lw:{pro:"min-width",unit:"rem"},th:{pro:"max-height",unit:"rem"},bh:{pro:"min-height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},fsize:{pro:"font-size",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},thick:{pro:"border-width",unit:"px"},delay:{pro:"transition-delay",unit:"s"},rule_2:{column:{pro:"columnCount",extra:{columnGap:0}}},rule_3:{gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"}}},r={colors:{none:"transparent",main:"#051c24",sub:"#b4967a",light:"#fff",lgray:"#eee",mgray:"#a7a7a7",dgray:"#373737",dark:"#111",blue:"#4085f3",green:"#02b9a1",yellow:"#fdba00",red:"#ec4334",neutral:"rgba(134,134,134,.17)"},append(e){this.colors={...this.colors,...e}}};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,s,l={exports:{}},i={exports:{}};n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&s.rotl(e,8)|4278255360&s.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=s.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],o=0,r=0;o<e.length;o++,r+=8)t[r>>>5]|=e[o]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],o=0;o<32*e.length;o+=8)t.push(e[o>>>5]>>>24-o%32&255);return t},bytesToHex:function(e){for(var t=[],o=0;o<e.length;o++)t.push((e[o]>>>4).toString(16)),t.push((15&e[o]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],o=0;o<e.length;o+=2)t.push(parseInt(e.substr(o,2),16));return t},bytesToBase64:function(e){for(var t=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],a=0;a<4;a++)8*o+6*a<=8*e.length?t.push(n.charAt(r>>>6*(3-a)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&t.push((n.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|n.indexOf(e.charAt(o))>>>6-2*r);return t}},i.exports=s;var c,u,d,p,f,m=i.exports,g={utf8:{stringToBytes:function(e){return g.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(g.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],o=0;o<e.length;o++)t.push(255&e.charCodeAt(o));return t},bytesToString:function(e){for(var t=[],o=0;o<e.length;o++)t.push(String.fromCharCode(e[o]));return t.join("")}}},h=g,b=function(e){return null!=e&&(x(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&x(e.slice(0,0))}(e)||!!e._isBuffer)};function x(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}c=m,u=h.utf8,d=b,p=h.bin,(f=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?p.stringToBytes(e):u.stringToBytes(e):d(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=c.bytesToWords(e),r=8*e.length,a=1732584193,n=-271733879,s=-1732584194,l=271733878,i=0;i<o.length;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8);o[r>>>5]|=128<<r%32,o[14+(r+64>>>9<<4)]=r;var m=f._ff,g=f._gg,h=f._hh,b=f._ii;for(i=0;i<o.length;i+=16){var x=a,v=n,y=s,_=l;a=m(a,n,s,l,o[i+0],7,-680876936),l=m(l,a,n,s,o[i+1],12,-389564586),s=m(s,l,a,n,o[i+2],17,606105819),n=m(n,s,l,a,o[i+3],22,-1044525330),a=m(a,n,s,l,o[i+4],7,-176418897),l=m(l,a,n,s,o[i+5],12,1200080426),s=m(s,l,a,n,o[i+6],17,-1473231341),n=m(n,s,l,a,o[i+7],22,-45705983),a=m(a,n,s,l,o[i+8],7,1770035416),l=m(l,a,n,s,o[i+9],12,-1958414417),s=m(s,l,a,n,o[i+10],17,-42063),n=m(n,s,l,a,o[i+11],22,-1990404162),a=m(a,n,s,l,o[i+12],7,1804603682),l=m(l,a,n,s,o[i+13],12,-40341101),s=m(s,l,a,n,o[i+14],17,-1502002290),a=g(a,n=m(n,s,l,a,o[i+15],22,1236535329),s,l,o[i+1],5,-165796510),l=g(l,a,n,s,o[i+6],9,-1069501632),s=g(s,l,a,n,o[i+11],14,643717713),n=g(n,s,l,a,o[i+0],20,-373897302),a=g(a,n,s,l,o[i+5],5,-701558691),l=g(l,a,n,s,o[i+10],9,38016083),s=g(s,l,a,n,o[i+15],14,-660478335),n=g(n,s,l,a,o[i+4],20,-405537848),a=g(a,n,s,l,o[i+9],5,568446438),l=g(l,a,n,s,o[i+14],9,-1019803690),s=g(s,l,a,n,o[i+3],14,-187363961),n=g(n,s,l,a,o[i+8],20,1163531501),a=g(a,n,s,l,o[i+13],5,-1444681467),l=g(l,a,n,s,o[i+2],9,-51403784),s=g(s,l,a,n,o[i+7],14,1735328473),a=h(a,n=g(n,s,l,a,o[i+12],20,-1926607734),s,l,o[i+5],4,-378558),l=h(l,a,n,s,o[i+8],11,-2022574463),s=h(s,l,a,n,o[i+11],16,1839030562),n=h(n,s,l,a,o[i+14],23,-35309556),a=h(a,n,s,l,o[i+1],4,-1530992060),l=h(l,a,n,s,o[i+4],11,1272893353),s=h(s,l,a,n,o[i+7],16,-155497632),n=h(n,s,l,a,o[i+10],23,-1094730640),a=h(a,n,s,l,o[i+13],4,681279174),l=h(l,a,n,s,o[i+0],11,-358537222),s=h(s,l,a,n,o[i+3],16,-722521979),n=h(n,s,l,a,o[i+6],23,76029189),a=h(a,n,s,l,o[i+9],4,-640364487),l=h(l,a,n,s,o[i+12],11,-421815835),s=h(s,l,a,n,o[i+15],16,530742520),a=b(a,n=h(n,s,l,a,o[i+2],23,-995338651),s,l,o[i+0],6,-198630844),l=b(l,a,n,s,o[i+7],10,1126891415),s=b(s,l,a,n,o[i+14],15,-1416354905),n=b(n,s,l,a,o[i+5],21,-57434055),a=b(a,n,s,l,o[i+12],6,1700485571),l=b(l,a,n,s,o[i+3],10,-1894986606),s=b(s,l,a,n,o[i+10],15,-1051523),n=b(n,s,l,a,o[i+1],21,-2054922799),a=b(a,n,s,l,o[i+8],6,1873313359),l=b(l,a,n,s,o[i+15],10,-30611744),s=b(s,l,a,n,o[i+6],15,-1560198380),n=b(n,s,l,a,o[i+13],21,1309151649),a=b(a,n,s,l,o[i+4],6,-145523070),l=b(l,a,n,s,o[i+11],10,-1120210379),s=b(s,l,a,n,o[i+2],15,718787259),n=b(n,s,l,a,o[i+9],21,-343485551),a=a+x>>>0,n=n+v>>>0,s=s+y>>>0,l=l+_>>>0}return c.endian([a,n,s,l])})._ff=function(e,t,o,r,a,n,s){var l=e+(t&o|~t&r)+(a>>>0)+s;return(l<<n|l>>>32-n)+t},f._gg=function(e,t,o,r,a,n,s){var l=e+(t&r|o&~r)+(a>>>0)+s;return(l<<n|l>>>32-n)+t},f._hh=function(e,t,o,r,a,n,s){var l=e+(t^o^r)+(a>>>0)+s;return(l<<n|l>>>32-n)+t},f._ii=function(e,t,o,r,a,n,s){var l=e+(o^(t|~r))+(a>>>0)+s;return(l<<n|l>>>32-n)+t},f._blocksize=16,f._digestsize=16,l.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var o=c.wordsToBytes(f(e,t));return t&&t.asBytes?o:t&&t.asString?p.bytesToString(o):c.bytesToHex(o)};var v=l.exports;const y=t({__proto__:null,default:a(v)},[v]),_="BTXUIGlobal",w=e.defineComponent({__name:"b-style",props:{class:{},focus:{},hover:{},active:{},states:{}},setup(t){const a=t,n=e.ref(),s=e.ref(""),l=e.computed((()=>{const e=[];for(let t of n.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),i=e.reactive({}),c=e=>{if(e&&0===e.search("_"))return e.substr(1);const t=(e=>{if(!isNaN(1*e))return e;let t=e;return/^f\d+$/.test(t)&&(t=-1*t.substr(1)),/^\d*d\d+$/.test(t)&&(t=1*t.replace("d",".")),!isNaN(t)&&t})(e);if(!1!==t)return t;const o=(e=>r.colors[e]?r.colors[e]:!(!e||0!==e.search("C"))&&`#${e.substr(1)}`)(e);return!1!==o&&o},u=e=>{if(!e)return"";return e.split(" ").reduce(((e,t)=>{const r=(e=>{let t=o[e];if(t)return t;const r=e.split("-"),a={l:["left"],t:["top"],r:["right"],b:["bottom"],v:["top","bottom"],h:["left","right"]};let[n,s,l,i]=r;if(t=o[n],t){let e=c(s);if(e)return`${t.pro}: ${e}${l||t.unit||""}`;if(e=c(l),e){const o=a[s];if(o){let r="";return o.forEach((o=>{r+=`${t.pro}-${o}: ${e}${i||t.unit||""};`})),r}return`${t.pro}-${s}: ${e}${i||t.unit||""}`}}})(t);if(r)return e+=`${r};`}),"").replace(/;+/g,";")},d=(e,t)=>{const o=u(t);o&&(l.value.includes(e)||(l.value.push(e),i[e]=o))};return e.onMounted((()=>{if(a.class){(()=>{let e=document.head.querySelector(`#${_}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",_),document.head.appendChild(e)),n.value=e})(),(t=a.class)&&t.split(" ").forEach((e=>{d(e,e)}));const o=(e=>{const t=e.split(" ").sort();console.log(y),console.log(`B-${y(t.join("&"))}`);const o=`B-${y(t.join("&"))}`;return s.value=`${e} ${o}`,l.value.includes(o)||l.value.push(o),o})(a.class);(e=>{a.focus&&d(e,a.focus)})(`${o}[focus='true']:focus`),(e=>{a.hover&&d(e,a.hover)})(`${o}[hover='true']:hover`),(e=>{a.active&&d(e,a.active)})(`${o}[active='true']:active`),e=o,a.states&&Object.keys(a.states).forEach((t=>{d(`${e}[state="${t}"]`,a.states[t])})),Object.keys(i).forEach((e=>{n.value.sheet.addRule(`.${e}`,i[e])}))}var e,t})),(t,o)=>e.renderSlot(t.$slots,"className",{className:s.value})}}),k=["state"],B=e.defineComponent({__name:"b-view",props:{class:{},state:{type:[String,Boolean]},states:{},bgImg:{},matrix:{}},setup(t){const o=t,r=e.computed((()=>{var e,t,r,a,n,s,l,i;const c=o.bgImg?{backgroundImage:`url(${o.bgImg})`}:{},u=(null==(e=o.matrix)?void 0:e.translate)?`translate(${null==(t=o.matrix)?void 0:t.translate})`:"",d=(null==(r=o.matrix)?void 0:r.scale)?`scale(${null==(a=o.matrix)?void 0:a.scale})`:"",p=(null==(n=o.matrix)?void 0:n.rotate)?`rotate(${null==(s=o.matrix)?void 0:s.rotate})`:"",f=(null==(l=o.matrix)?void 0:l.skew)?`skew(${null==(i=o.matrix)?void 0:i.skew})`:"";return{...c,...o.matrix?{transform:`${u} ${d} ${p} ${f}`}:{}}}));return(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("div",{class:e.normalizeClass(o.className),state:t.state,style:e.normalizeStyle(r.value)},[e.renderSlot(t.$slots,"default")],14,k)])),_:3},8,["class","states"]))}}),C=["state"],$=e.defineComponent({__name:"b-text",props:{class:{},state:{type:[String,Boolean]},states:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("span",{class:e.normalizeClass(o.className),state:t.state},[e.renderSlot(t.$slots,"default")],10,C)])),_:3},8,["class","states"]))}),N=["onClick","onDblclick","target","hover","state","active","href"],z=e.defineComponent({__name:"b-hot",props:{link:{},class:{},state:{type:[String,Boolean]},states:{},hover:{},active:{},forbid:{type:Boolean},download:{},anchor:{}},emits:["on_click","on_enter","on_move","on_leave","on_dblclick"],setup(t,{emit:o}){const r=t,a=e.ref(),n=e.ref(""),s=e.computed((()=>{const e=r.link;return r.forbid||!e?"javascript: void 0;":0===e.search("http")?(n.value="_blank",e):(e.search(/^(tel|mailto):/),e)})),l=e.computed((()=>r.forbid?"":"pointer")),i=e=>{if(r.anchor){const e=document.querySelector(r.anchor);e&&e.scrollIntoView({behavior:"smooth"})}!r.forbid&&o("on_click",e)},c=e=>{!r.forbid&&o("on_dblclick",e)},u=e=>{o("on_enter",e)},d=e=>{o("on_move",e)},p=e=>{o("on_leave",e)};return e.onMounted((()=>{r.download&&(a.value.download=r.download)})),(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),states:t.states,hover:t.hover,active:t.active},{className:e.withCtx((o=>[e.createElementVNode("a",{style:e.normalizeStyle(`user-select: none; cursor: ${l.value};`),ref_key:"$anchor",ref:a,onMouseenter:u,onTouchstart:u,onMousemove:d,onTouchmove:d,onMouseleave:p,onTouchend:p,onClick:e.withModifiers(i,["stop"]),onDblclick:e.withModifiers(c,["stop"]),target:n.value,class:e.normalizeClass(o.className),hover:!!t.hover||"",state:t.state,active:!!t.active||"",href:s.value},[e.renderSlot(t.$slots,"default")],46,N)])),_:3},8,["class","states","hover","active"]))}}),S=["src","alt"],j=e.defineComponent({__name:"b-img",props:{img:{},class:{},defaultSrc:{},alt:{}},emits:["on_load"],setup(t,{emit:o}){const r=t,a=e.computed((()=>r.img)),n=e.ref(""),s=()=>{r.defaultSrc&&(n.value=r.defaultSrc);const e=new Image;e.onload=()=>{n.value=r.img,o("on_load")},e.src=r.img};return e.watch(a,s),e.onMounted((()=>{s()})),(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("img",{src:n.value,class:e.normalizeClass(o.className),style:{display:"block"},alt:t.alt},null,10,S)])),_:1},8,["class"]))}}),T=e.defineComponent({__name:"ani-success",setup:t=>(t,o)=>(e.openBlock(),e.createBlock(B,{class:"flex-5",matrix:{translate:"0,9px",rotate:"45deg"}},{default:e.withCtx((()=>[e.createVNode($,{class:"ani-success-part1 w-1 h-3-px bg-color-green round-sm"}),e.createVNode($,{class:"ani-success-part2 w-1d7 h-3-px bg-color-green round-sm rel t-1-px l-f1-px"})])),_:1}))}),E=(e,t)=>{const o=e.__vccOpts||e;for(const[r,a]of t)o[r]=a;return o};const V=E({},[["render",function(t,o){const r=e.resolveComponent("b-text"),a=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(a,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(r,{class:"ani-fail-part1 w-3-px h-1d7 rel l-2-px bg-color-red round-sm"}),e.createVNode(r,{class:"ani-fail-part2 w-3-px h-1d7 rel r-1-px bg-color-red round-sm"})])),_:1})}]]);const M=E({},[["render",function(t,o){const r=e.resolveComponent("b-text"),a=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(a,{class:"flex-5",matrix:{rotate:"90deg"}},{default:e.withCtx((()=>[e.createVNode(r,{class:"ani-notic-part1 w-3-px h-3-px bg-color-blue round"}),e.createVNode(r,{class:"ani-notic-part2 w-1d3 h-3-px mrg-l-4-px bg-color-blue round-sm"})])),_:1})}]]);const I=E({},[["render",function(t,o){const r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(r,{class:"ani-loading rel w-2d2 h-2d2 round"})])),_:1})}]]),O=e.defineComponent({__name:"b-icon",props:{icon:{},class:{}},setup(t){const o=t;return(t,r)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class)},{className:e.withCtx((r=>[0===t.icon.search("ani_")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["ani_success"===t.icon?(e.openBlock(),e.createBlock(T,{key:"success"})):e.createCommentVNode("",!0),"ani_fail"===t.icon?(e.openBlock(),e.createBlock(V,{key:"fail"})):e.createCommentVNode("",!0),"ani_notic"===t.icon?(e.openBlock(),e.createBlock(M,{key:"notic"})):e.createCommentVNode("",!0),"ani_loading"===t.icon?(e.openBlock(),e.createBlock(I,{key:"loading"})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.icon.search("/")>-1?(e.openBlock(),e.createBlock(j,{key:1,img:t.icon,class:e.normalizeClass(r.className)},null,8,["img","class"])):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`ico-${o.icon} ${r.className}`)},null,2))])),_:1},8,["class"]))}}),A=["type","name","focus","state","placeholder","maxlength","readonly"],D=e.defineComponent({__name:"b-input",props:{type:{},name:{},class:{},state:{type:[String,Boolean]},states:{},text:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},rule:{}},emits:["update:text","on_focus","on_blur","on_change"],setup(t,{expose:o,emit:r}){const a=t,n=e.ref(a.text),s={required:{regexp:/[\w\.\-_\u4e00-\u9fa5]+/,notic:"输入内容为空!"},tel:{regexp:/^1[3-9]\d{9}$/,notic:"手机号格式有误!"},email:{regexp:/^[\w\.]+@(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"邮箱格式有误!"},url:{regexp:/^((http|https):\/\/)?(wwww\.)?(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"url 格式有误!"},uname:{regexp:/^[\w_]+$/,notic:"请输入英文字母、数字或下划线!"},zh:{regexp:/^[\u4e00-\u9fa5]+$/,notic:"请输入中文字符!"},uid:{regexp:/^\d{15}(\d{2}[0-9x])?$/i,notic:"身份证号输入有误!"}},l=()=>{var e;r("update:text",null==(e=n.value)?void 0:e.trim())},i=e=>{r("on_change",u(),e)},c=e=>{r("on_blur",u(),e)},u=()=>{if(a.rule){const e=s[a.rule.type],t=e?e.regexp:a.rule.type;return{name:a.name,notic:a.rule.notic?a.rule.notic:e?e.notic:`${a.name}格式有误!`,pass:t.test(n.value)}}return!0};return o({check:u}),(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((r=>[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(r.className),type:t.type,onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:c,onChange:i,onInput:l,"onUpdate:modelValue":o[1]||(o[1]=e=>n.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,autocomplete:"off"},null,42,A),[[e.vModelDynamic,n.value]])])),_:1},8,["class","focus","states"]))}}),P=["name","focus","state","placeholder","maxlength","readonly","rows"],H=e.defineComponent({__name:"b-textarea",props:{text:{},name:{},class:{},state:{type:[String,Boolean]},states:{},rows:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{}},emits:["on_focus","on_blur","on_change","update:text"],setup(t,{emit:o}){const r=t,a=e.ref(r.text),n=()=>{o("update:text",a.value.replace(/[\n\r]/g,"<br>"))};return(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((r=>[e.withDirectives(e.createElementVNode("textarea",{class:e.normalizeClass(r.className),onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:o[1]||(o[1]=e=>t.$emit("on_blur",e)),onChange:o[2]||(o[2]=e=>t.$emit("on_change",e)),onInput:n,"onUpdate:modelValue":o[3]||(o[3]=e=>a.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,rows:t.rows||7},null,42,P),[[e.vModelText,a.value]])])),_:1},8,["class","focus","states"]))}}),U=["muted","src","autoplay","loop"],q=e.defineComponent({__name:"b-video",props:{video:{},class:{},autoPlay:{type:Boolean},loop:{type:Boolean}},setup(t){const o=e.ref();return(t,r)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class)},{className:e.withCtx((r=>[e.createElementVNode("video",{ref_key:"$video",ref:o,class:e.normalizeClass(r.className),muted:t.autoPlay,src:t.video,autoplay:t.autoPlay,loop:t.loop},null,10,U)])),_:1},8,["class"]))}}),F=["state"],R=e.defineComponent({__name:"b-list",props:{scroll:{},class:{},state:{type:[String,Boolean]},states:{},scrollType:{}},emits:["on_scroll","on_to_top","on_to_bottom"],setup(t,{expose:o,emit:r}){const a=t,n=e.ref(),s=e.computed((()=>a.scrollType?`${a.scrollType}-scroll`:"thin-scroll"));let l={x:0,y:0};return o({reset:()=>{n.value.scrollTop=0}}),e.onMounted((()=>{n.value.onscroll=e=>{const t=e.target.scrollTop,o=e.target.scrollLeft,a=o-l.x,n=t-l.y;let s;Math.abs(a)>=Math.abs(n)?(e.stopPropagation(),s=a>=0?"l2r":"r2l"):s=n>=0?"t2b":"b2t",l.x=o,l.y=t,r("on_scroll",{dir:s,left:o,top:t}),0===t&&r("on_to_top",e),t>=e.target.scrollHeight-e.target.clientHeight-2&&r("on_to_bottom",e)}})),(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((r=>[e.createElementVNode("div",{class:e.normalizeClass(r.className),style:{position:"relative"},state:t.state},[e.createElementVNode("div",{ref_key:"$list",ref:n,class:e.normalizeClass(s.value),style:e.normalizeStyle(`overflow-x: ${t.scroll.x}; overflow-y: ${t.scroll.y}; width: 100%; height: 100%;`),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["stop"]))},[e.renderSlot(t.$slots,"default")],38)],10,F)])),_:3},8,["class","states"]))}}),W=["state","draggable"],X=e.defineComponent({__name:"b-drag",props:{class:{},dataInfo:{},dragStart:{},dragOver:{},freeDrag:{type:Boolean}},emits:["on_drag_start","on_drag_end","on_drag_over","on_drag_leave","on_drop","on_move"],setup(t,{emit:o}){const r=t,a=e.ref(),n=e.ref(""),s=e.ref(!1),l=e.ref(!1),i=e.reactive({x:0,y:0}),c=e=>{o("on_drag_start",e),n.value="dragStart",e.dataTransfer.setData("info",JSON.stringify(r.dataInfo))},u=e=>{e.preventDefault(),s.value=!0},d=e=>{o("on_drag_end",e),s.value=!1,n.value=""},p=e=>{e.preventDefault(),o("on_drag_over",e),n.value="dragOver"},f=e=>{o("on_drag_leave",e),n.value=""},m=e=>{o("on_drop",e.dataTransfer.getData("info"),e),n.value=""};let g;const h=e.reactive({x:0,y:0}),b=e.reactive({width:0,height:0}),x=e=>{e.preventDefault(),g||(g=a.value.offsetParent,g.onmousemove=v,g.ontouchmove=v,g.onmouseleave=y,g.onmouseup=y,g.ontouchend=y,Array.prototype.forEach.call(g.children,(e=>{e!==a.value&&(e.style.pointerEvents="none")})),b.width=a.value.offsetWidth,b.height=a.value.offsetHeight),n.value="dragStart",l.value=!0,h.x=e.offsetX,h.y=e.offsetY,a.value.style.pointerEvents="none"},v=e=>{if(!l.value)return;const t=e.offsetX-h.x,r=e.offsetY-h.y;i.x=Math.max(0,t),i.y=Math.max(0,r),i.x=Math.min(i.x+b.width,g.offsetWidth)-b.width,i.y=Math.min(i.y+b.height,g.offsetHeight)-b.height,o("on_move",i,e)},y=()=>{l.value&&(n.value="",l.value=!1,h.x=0,h.y=0,a.value.style.pointerEvents="auto")};return e.onMounted((()=>{(()=>{const e=a.value;r.freeDrag?(e.onmousedown=x,e.ontouchstart=x):(e.ondragstart=c,e.ondrag=u,e.ondragend=d,e.ondragover=p,e.ondragleave=f,e.ondrop=m)})()})),(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class),states:{dragStart:t.dragStart,dragOver:t.dragOver}},{className:e.withCtx((o=>[e.createElementVNode("div",{style:e.normalizeStyle({cursor:t.dragOver?"default":"move",visibility:s.value?"hidden":"visible",position:t.freeDrag?"absolute":"relative",left:0,top:0,transform:`translate(${i.x}px, ${i.y}px)`}),ref_key:"$el",ref:a,class:e.normalizeClass(o.className),state:n.value,draggable:!!t.dragStart},[e.renderSlot(t.$slots,"default")],14,W)])),_:3},8,["class","states"]))}}),G=["src"],L=[w,B,$,z,j,O,q,R,e.defineComponent({__name:"b-webview",props:{src:{},class:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(w,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("iframe",{class:e.normalizeClass(o.className),frameborder:"0",src:t.src},null,10,G)])),_:1},8,["class"]))}),D,X,H];return{name:"btxui",install(e){L.forEach((t=>{e.component(t.__name,t)}))}}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";const t={pcenter:"text-align: center;",pright:"text-align: right;",pleft:"text-align: left;",pjustify:"text-align: justify;",pindent:"text-indent: 2em;",bold:"font-weight: bold;",show:"display: block;",hide:"display: none;",wrap:"flex-wrap: wrap;",flex:"display: flex; justify-content: flex-start; align-items: stretch;","flex-column":"display: flex; flex-direction: column;","flex-between":"display: flex; justify-content: space-between; align-items: center;","flex-around":"display: flex; justify-content: space-around; align-items: center;",grid:"display: flex; flex-wrap: wrap; align-content: flex-start;","flex-1":"display: flex; justify-content: flex-start; align-items: flex-start;","flex-2":"display: flex; justify-content: center; align-items: flex-start;","flex-3":"display: flex; justify-content: flex-end; align-items: flex-start;","flex-4":"display: flex; justify-content: flex-start; align-items: center","flex-5":"display: flex; justify-content: center; align-items: center;","flex-6":"display: flex; justify-content: flex-end; align-items: center;","flex-7":"display: flex; justify-content: flex-start; align-items: flex-end;","flex-8":"display: flex; justify-content: center; align-items: flex-end;","flex-9":"display: flex; justify-content: flex-end; align-items: flex-end;","max-h":"height: 100%;","max-w":"width: 100%;",max:"height: 100%; width: 100%;","max-fixed":"height: 100%; width: 100%; position: fixed; left: 0; top: 0;","max-screen":"height: 100vh; width: 100%;",item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:"position: fixed;",rel:"position: relative;",abs:"position: absolute;","over-hide":"overflow: hidden;","over-show":"overflow: visible;","over-scroll":"overflow: auto;","bg-repeat":"background-repeat: repeat;","bg-repeat-x":"background-repeat: repeat-x;","bg-repeat-y":"background-repeat: repeat-y;","bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":"background-position: left top;","bg-pos-2":"background-position: center top;","bg-pos-3":"background-position: right top;","bg-pos-4":"background-position: left center;","bg-pos-5":"background-position: center center;","bg-pos-6":"background-position: right center;","bg-pos-7":"background-position: left bottom;","bg-pos-8":"background-position: center bottom;","bg-pos-9":"background-position: right bottom;","bg-fixed":"background-attachment: scroll;",round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"border-radius: 4px;","round-t":"border-bottom-right-radius: 0; border-bottom-left-radius: 0;","round-b":"border-top-right-radius: 0; border-top-left-radius: 0;","round-l":"border-top-right-radius: 0; border-bottom-right-radius: 0;","round-r":"border-top-left-radius: 0; border-bottom-left-radius: 0;",solid:"border-style: solid;",dashed:"border-style: dashed;","solid-l":"border-left-style: solid;","solid-r":"border-right-style: solid;","solid-t":"border-top-style: solid;","solid-b":"border-bottom-style: solid;","dashed-l":"border-left-style: dashed;","dashed-r":"border-right-style: dashed;","dashed-t":"border-top-style: dashed;","dashed-b":"border-bottom-style: dashed;","line-outside":"background-clip: padding-box;",shadow:"box-shadow: 0 4px 17px;","shadow-sm":"box-shadow: 0 2px 4px;","shadow-lg":"box-shadow: 0 14px 40px;","shadow-relief":"box-shadow: 1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4);",trans:"transition: all .7s;","trans-fast":"transition: all .4s;","trans-slow":"transition: all 1.4s;","trans-no":"transition: none;","blur-no":"filter: blur(0px);","blur-sm":"filter: blur(2px);","blur-md":"filter: blur(7px);","blur-lg":"filter: blur(17px);","dark-no":"filter: brightness(100%);","dark-sm":"filter: brightness(80%);","dark-md":"filter: brightness(50%);","dark-lg":"filter: brightness(20%);","gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: auto;","touch-none":"touchAction: none;",ellipsis:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-line":"textShadow: 1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5);","alpha-0":"opacity: 0; visibility: hidden;","objfit-fill":"object-fit: fill;","objfit-cover":"object-fit: cover;","objfit-contain":"object-fit: contain;","objfit-none":"object-fit: none;","objfit-scaledown":"object-fit: scale-down;",color:{pro:"color"},bg:{pro:"background"},alpha:{pro:"opacity"},font:{pro:"font-family"},lh:{pro:"line-height"},z:{pro:"z-index"},line:{pro:"border-color"},origin:{pro:"transform-origin"},order:{pro:"order"},grow:{pro:"flex-grow"},basis:{pro:"flex-basis"},lspace:{pro:"letter-spacing",unit:"rem"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},rw:{pro:"max-width",unit:"rem"},lw:{pro:"min-width",unit:"rem"},th:{pro:"max-height",unit:"rem"},bh:{pro:"min-height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},fsize:{pro:"font-size",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},thick:{pro:"border-width",unit:"px"},delay:{pro:"transition-delay",unit:"s"},rule_2:{column:{pro:"columnCount",extra:{columnGap:0}}},rule_3:{gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"}}},o={colors:{none:"transparent",main:"#051c24",sub:"#b4967a",light:"#fff",lgray:"#eee",mgray:"#a7a7a7",dgray:"#373737",dark:"#111",blue:"#4085f3",green:"#02b9a1",yellow:"#fdba00",red:"#ec4334",neutral:"rgba(134,134,134,.17)"},append(e){this.colors={...this.colors,...e}}};var a,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s={};a={get exports(){return s},set exports(e){s=e}},function(e){function t(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function o(e,o,a,r,s,n){return t((l=t(t(o,e),t(r,n)))<<(i=s)|l>>>32-i,a);var l,i}function r(e,t,a,r,s,n,l){return o(t&a|~t&r,e,t,s,n,l)}function s(e,t,a,r,s,n,l){return o(t&r|a&~r,e,t,s,n,l)}function n(e,t,a,r,s,n,l){return o(t^a^r,e,t,s,n,l)}function l(e,t,a,r,s,n,l){return o(a^(t|~r),e,t,s,n,l)}function i(e,o){var a,i,c,d,u;e[o>>5]|=128<<o%32,e[14+(o+64>>>9<<4)]=o;var p=1732584193,f=-271733879,m=-1732584194,g=271733878;for(a=0;a<e.length;a+=16)i=p,c=f,d=m,u=g,p=r(p,f,m,g,e[a],7,-680876936),g=r(g,p,f,m,e[a+1],12,-389564586),m=r(m,g,p,f,e[a+2],17,606105819),f=r(f,m,g,p,e[a+3],22,-1044525330),p=r(p,f,m,g,e[a+4],7,-176418897),g=r(g,p,f,m,e[a+5],12,1200080426),m=r(m,g,p,f,e[a+6],17,-1473231341),f=r(f,m,g,p,e[a+7],22,-45705983),p=r(p,f,m,g,e[a+8],7,1770035416),g=r(g,p,f,m,e[a+9],12,-1958414417),m=r(m,g,p,f,e[a+10],17,-42063),f=r(f,m,g,p,e[a+11],22,-1990404162),p=r(p,f,m,g,e[a+12],7,1804603682),g=r(g,p,f,m,e[a+13],12,-40341101),m=r(m,g,p,f,e[a+14],17,-1502002290),p=s(p,f=r(f,m,g,p,e[a+15],22,1236535329),m,g,e[a+1],5,-165796510),g=s(g,p,f,m,e[a+6],9,-1069501632),m=s(m,g,p,f,e[a+11],14,643717713),f=s(f,m,g,p,e[a],20,-373897302),p=s(p,f,m,g,e[a+5],5,-701558691),g=s(g,p,f,m,e[a+10],9,38016083),m=s(m,g,p,f,e[a+15],14,-660478335),f=s(f,m,g,p,e[a+4],20,-405537848),p=s(p,f,m,g,e[a+9],5,568446438),g=s(g,p,f,m,e[a+14],9,-1019803690),m=s(m,g,p,f,e[a+3],14,-187363961),f=s(f,m,g,p,e[a+8],20,1163531501),p=s(p,f,m,g,e[a+13],5,-1444681467),g=s(g,p,f,m,e[a+2],9,-51403784),m=s(m,g,p,f,e[a+7],14,1735328473),p=n(p,f=s(f,m,g,p,e[a+12],20,-1926607734),m,g,e[a+5],4,-378558),g=n(g,p,f,m,e[a+8],11,-2022574463),m=n(m,g,p,f,e[a+11],16,1839030562),f=n(f,m,g,p,e[a+14],23,-35309556),p=n(p,f,m,g,e[a+1],4,-1530992060),g=n(g,p,f,m,e[a+4],11,1272893353),m=n(m,g,p,f,e[a+7],16,-155497632),f=n(f,m,g,p,e[a+10],23,-1094730640),p=n(p,f,m,g,e[a+13],4,681279174),g=n(g,p,f,m,e[a],11,-358537222),m=n(m,g,p,f,e[a+3],16,-722521979),f=n(f,m,g,p,e[a+6],23,76029189),p=n(p,f,m,g,e[a+9],4,-640364487),g=n(g,p,f,m,e[a+12],11,-421815835),m=n(m,g,p,f,e[a+15],16,530742520),p=l(p,f=n(f,m,g,p,e[a+2],23,-995338651),m,g,e[a],6,-198630844),g=l(g,p,f,m,e[a+7],10,1126891415),m=l(m,g,p,f,e[a+14],15,-1416354905),f=l(f,m,g,p,e[a+5],21,-57434055),p=l(p,f,m,g,e[a+12],6,1700485571),g=l(g,p,f,m,e[a+3],10,-1894986606),m=l(m,g,p,f,e[a+10],15,-1051523),f=l(f,m,g,p,e[a+1],21,-2054922799),p=l(p,f,m,g,e[a+8],6,1873313359),g=l(g,p,f,m,e[a+15],10,-30611744),m=l(m,g,p,f,e[a+6],15,-1560198380),f=l(f,m,g,p,e[a+13],21,1309151649),p=l(p,f,m,g,e[a+4],6,-145523070),g=l(g,p,f,m,e[a+11],10,-1120210379),m=l(m,g,p,f,e[a+2],15,718787259),f=l(f,m,g,p,e[a+9],21,-343485551),p=t(p,i),f=t(f,c),m=t(m,d),g=t(g,u);return[p,f,m,g]}function c(e){var t,o="",a=32*e.length;for(t=0;t<a;t+=8)o+=String.fromCharCode(e[t>>5]>>>t%32&255);return o}function d(e){var t,o=[];for(o[(e.length>>2)-1]=void 0,t=0;t<o.length;t+=1)o[t]=0;var a=8*e.length;for(t=0;t<a;t+=8)o[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return o}function u(e){var t,o,a="0123456789abcdef",r="";for(o=0;o<e.length;o+=1)t=e.charCodeAt(o),r+=a.charAt(t>>>4&15)+a.charAt(15&t);return r}function p(e){return unescape(encodeURIComponent(e))}function f(e){return function(e){return c(i(d(e),8*e.length))}(p(e))}function m(e,t){return function(e,t){var o,a,r=d(e),s=[],n=[];for(s[15]=n[15]=void 0,r.length>16&&(r=i(r,8*e.length)),o=0;o<16;o+=1)s[o]=909522486^r[o],n[o]=1549556828^r[o];return a=i(s.concat(d(t)),512+8*t.length),c(i(n.concat(a),640))}(p(e),p(t))}function g(e,t,o){return t?o?m(t,e):u(m(t,e)):o?f(e):u(f(e))}a.exports?a.exports=g:e.md5=g}(r);const n=s,l="BTXUIGlobal",i=e.defineComponent({__name:"b-style",props:{class:{},focus:{},hover:{},active:{},states:{}},setup(a){const r=a,s=e.ref(),i=e.ref(""),c=e.computed((()=>{const e=[];for(let t of s.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),d=e.reactive({}),u=e=>{if(e&&0===e.search("_"))return e.substr(1);const t=(e=>{if(!isNaN(1*e))return e;let t=e;return/^f\d+$/.test(t)&&(t=-1*t.substr(1)),/^\d*d\d+$/.test(t)&&(t=1*t.replace("d",".")),!isNaN(t)&&t})(e);if(!1!==t)return t;const a=(e=>o.colors[e]?o.colors[e]:!(!e||0!==e.search("C"))&&`#${e.substr(1)}`)(e);return!1!==a&&a},p=e=>{if(!e)return"";return e.split(" ").reduce(((e,o)=>{const a=(e=>{let o=t[e];if(o)return o;const a=e.split("-"),r={l:["left"],t:["top"],r:["right"],b:["bottom"],v:["top","bottom"],h:["left","right"]};let[s,n,l,i]=a;if(o=t[s],o){let e=u(n);if(e)return`${o.pro}: ${e}${l||o.unit||""}`;if(e=u(l),e){const t=r[n];if(t){let a="";return t.forEach((t=>{a+=`${o.pro}-${t}: ${e}${i||o.unit||""};`})),a}return`${o.pro}-${n}: ${e}${i||o.unit||""}`}}})(o);if(a)return e+=`${a};`}),"").replace(/;+/g,";")},f=(e,t)=>{const o=p(t);o&&(c.value.includes(e)||(c.value.push(e),d[e]=o))};return e.onMounted((()=>{if(r.class){(()=>{let e=document.head.querySelector(`#${l}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",l),document.head.appendChild(e)),s.value=e})(),(t=r.class)&&t.split(" ").forEach((e=>{f(e,e)}));const o=(e=>{const t=e.split(" ").sort(),o=`B-${n(t.join("&"))}`;return i.value=`${e} ${o}`,c.value.includes(o)||c.value.push(o),o})(r.class);(e=>{r.focus&&f(e,r.focus)})(`${o}[focus='true']:focus`),(e=>{r.hover&&f(e,r.hover)})(`${o}[hover='true']:hover`),(e=>{r.active&&f(e,r.active)})(`${o}[active='true']:active`),e=o,r.states&&Object.keys(r.states).forEach((t=>{f(`${e}[state="${t}"]`,r.states[t])})),Object.keys(d).forEach((e=>{s.value.sheet.addRule(`.${e}`,d[e])}))}var e,t})),(t,o)=>e.renderSlot(t.$slots,"className",{className:i.value})}}),c=["state"],d=e.defineComponent({__name:"b-view",props:{class:{},state:{type:[String,Boolean]},states:{},bgImg:{},matrix:{}},setup(t){const o=t,a=e.computed((()=>{var e,t,a,r,s,n,l,i;const c=o.bgImg?{backgroundImage:`url(${o.bgImg})`}:{},d=(null==(e=o.matrix)?void 0:e.translate)?`translate(${null==(t=o.matrix)?void 0:t.translate})`:"",u=(null==(a=o.matrix)?void 0:a.scale)?`scale(${null==(r=o.matrix)?void 0:r.scale})`:"",p=(null==(s=o.matrix)?void 0:s.rotate)?`rotate(${null==(n=o.matrix)?void 0:n.rotate})`:"",f=(null==(l=o.matrix)?void 0:l.skew)?`skew(${null==(i=o.matrix)?void 0:i.skew})`:"";return{...c,...o.matrix?{transform:`${d} ${u} ${p} ${f}`}:{}}}));return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("div",{class:e.normalizeClass(o.className),state:t.state,style:e.normalizeStyle(a.value)},[e.renderSlot(t.$slots,"default")],14,c)])),_:3},8,["class","states"]))}}),u=["state"],p=e.defineComponent({__name:"b-text",props:{class:{},state:{type:[String,Boolean]},states:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("span",{class:e.normalizeClass(o.className),state:t.state},[e.renderSlot(t.$slots,"default")],10,u)])),_:3},8,["class","states"]))}),f=["onClick","onDblclick","target","hover","state","active","href"],m=e.defineComponent({__name:"b-hot",props:{link:{},class:{},state:{type:[String,Boolean]},states:{},hover:{},active:{},forbid:{type:Boolean},download:{},anchor:{}},emits:["on_click","on_enter","on_move","on_leave","on_dblclick"],setup(t,{emit:o}){const a=t,r=e.ref(),s=e.ref(""),n=e.computed((()=>{const e=a.link;return a.forbid||!e?"javascript: void 0;":0===e.search("http")?(s.value="_blank",e):(e.search(/^(tel|mailto):/),e)})),l=e.computed((()=>a.forbid?"":"pointer")),c=e=>{if(a.anchor){const e=document.querySelector(a.anchor);e&&e.scrollIntoView({behavior:"smooth"})}!a.forbid&&o("on_click",e)},d=e=>{!a.forbid&&o("on_dblclick",e)},u=e=>{o("on_enter",e)},p=e=>{o("on_move",e)},m=e=>{o("on_leave",e)};return e.onMounted((()=>{a.download&&(r.value.download=a.download)})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states,hover:t.hover,active:t.active},{className:e.withCtx((o=>[e.createElementVNode("a",{style:e.normalizeStyle(`user-select: none; cursor: ${l.value};`),ref_key:"$anchor",ref:r,onMouseenter:u,onTouchstart:u,onMousemove:p,onTouchmove:p,onMouseleave:m,onTouchend:m,onClick:e.withModifiers(c,["stop"]),onDblclick:e.withModifiers(d,["stop"]),target:s.value,class:e.normalizeClass(o.className),hover:!!t.hover||"",state:t.state,active:!!t.active||"",href:n.value},[e.renderSlot(t.$slots,"default")],46,f)])),_:3},8,["class","states","hover","active"]))}}),g=["src","alt"],h=e.defineComponent({__name:"b-img",props:{img:{},class:{},defaultSrc:{},alt:{}},emits:["on_load"],setup(t,{emit:o}){const a=t,r=e.computed((()=>a.img)),s=e.ref(""),n=()=>{a.defaultSrc&&(s.value=a.defaultSrc);const e=new Image;e.onload=()=>{s.value=a.img,o("on_load")},e.src=a.img};return e.watch(r,n),e.onMounted((()=>{n()})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("img",{src:s.value,class:e.normalizeClass(o.className),style:{display:"block"},alt:t.alt},null,10,g)])),_:1},8,["class"]))}}),b=e.defineComponent({__name:"ani-success",setup:t=>(t,o)=>(e.openBlock(),e.createBlock(d,{class:"flex-5",matrix:{translate:"0,9px",rotate:"45deg"}},{default:e.withCtx((()=>[e.createVNode(p,{class:"ani-success-part1 w-1 h-3-px bg-color-green round-sm"}),e.createVNode(p,{class:"ani-success-part2 w-1d7 h-3-px bg-color-green round-sm rel t-1-px l-f1-px"})])),_:1}))}),x=(e,t)=>{const o=e.__vccOpts||e;for(const[a,r]of t)o[a]=r;return o};const v=x({},[["render",function(t,o){const a=e.resolveComponent("b-text"),r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-fail-part1 w-3-px h-1d7 rel l-2-px bg-color-red round-sm"}),e.createVNode(a,{class:"ani-fail-part2 w-3-px h-1d7 rel r-1-px bg-color-red round-sm"})])),_:1})}]]);const y=x({},[["render",function(t,o){const a=e.resolveComponent("b-text"),r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5",matrix:{rotate:"90deg"}},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-notic-part1 w-3-px h-3-px bg-color-blue round"}),e.createVNode(a,{class:"ani-notic-part2 w-1d3 h-3-px mrg-l-4-px bg-color-blue round-sm"})])),_:1})}]]);const w=x({},[["render",function(t,o){const a=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(a,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-loading rel w-2d2 h-2d2 round"})])),_:1})}]]),_=e.defineComponent({__name:"b-icon",props:{icon:{},class:{}},setup(t){const o=t;return(t,a)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((a=>[0===t.icon.search("ani_")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["ani_success"===t.icon?(e.openBlock(),e.createBlock(b,{key:"success"})):e.createCommentVNode("",!0),"ani_fail"===t.icon?(e.openBlock(),e.createBlock(v,{key:"fail"})):e.createCommentVNode("",!0),"ani_notic"===t.icon?(e.openBlock(),e.createBlock(y,{key:"notic"})):e.createCommentVNode("",!0),"ani_loading"===t.icon?(e.openBlock(),e.createBlock(w,{key:"loading"})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.icon.search("/")>-1?(e.openBlock(),e.createBlock(h,{key:1,img:t.icon,class:e.normalizeClass(a.className)},null,8,["img","class"])):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`ico-${o.icon} ${a.className}`)},null,2))])),_:1},8,["class"]))}}),k=["type","name","focus","state","placeholder","maxlength","readonly"],C=e.defineComponent({__name:"b-input",props:{type:{},name:{},class:{},state:{type:[String,Boolean]},states:{},text:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},rule:{}},emits:["update:text","on_focus","on_blur","on_change"],setup(t,{expose:o,emit:a}){const r=t,s=e.ref(r.text),n={required:{regexp:/[\w\.\-_\u4e00-\u9fa5]+/,notic:"输入内容为空!"},tel:{regexp:/^1[3-9]\d{9}$/,notic:"手机号格式有误!"},email:{regexp:/^[\w\.]+@(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"邮箱格式有误!"},url:{regexp:/^((http|https):\/\/)?(wwww\.)?(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"url 格式有误!"},uname:{regexp:/^[\w_]+$/,notic:"请输入英文字母、数字或下划线!"},zh:{regexp:/^[\u4e00-\u9fa5]+$/,notic:"请输入中文字符!"},uid:{regexp:/^\d{15}(\d{2}[0-9x])?$/i,notic:"身份证号输入有误!"}},l=()=>{var e;a("update:text",null==(e=s.value)?void 0:e.trim())},c=e=>{a("on_change",u(),e)},d=e=>{a("on_blur",u(),e)},u=()=>{if(r.rule){const e=n[r.rule.type],t=e?e.regexp:r.rule.type;return{name:r.name,notic:r.rule.notic?r.rule.notic:e?e.notic:`${r.name}格式有误!`,pass:t.test(s.value)}}return!0};return o({check:u}),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((a=>[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(a.className),type:t.type,onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:d,onChange:c,onInput:l,"onUpdate:modelValue":o[1]||(o[1]=e=>s.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,autocomplete:"off"},null,42,k),[[e.vModelDynamic,s.value]])])),_:1},8,["class","focus","states"]))}}),$=["name","focus","state","placeholder","maxlength","readonly","rows"],B=e.defineComponent({__name:"b-textarea",props:{text:{},name:{},class:{},state:{type:[String,Boolean]},states:{},rows:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{}},emits:["on_focus","on_blur","on_change","update:text"],setup(t,{emit:o}){const a=t,r=e.ref(a.text),s=()=>{o("update:text",r.value.replace(/[\n\r]/g,"<br>"))};return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((a=>[e.withDirectives(e.createElementVNode("textarea",{class:e.normalizeClass(a.className),onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:o[1]||(o[1]=e=>t.$emit("on_blur",e)),onChange:o[2]||(o[2]=e=>t.$emit("on_change",e)),onInput:s,"onUpdate:modelValue":o[3]||(o[3]=e=>r.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,rows:t.rows||7},null,42,$),[[e.vModelText,r.value]])])),_:1},8,["class","focus","states"]))}}),N=["muted","src","autoplay","loop"],z=e.defineComponent({__name:"b-video",props:{video:{},class:{},autoPlay:{type:Boolean},loop:{type:Boolean}},setup(t){const o=e.ref();return(t,a)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((a=>[e.createElementVNode("video",{ref_key:"$video",ref:o,class:e.normalizeClass(a.className),muted:t.autoPlay,src:t.video,autoplay:t.autoPlay,loop:t.loop},null,10,N)])),_:1},8,["class"]))}}),S=["state"],j=e.defineComponent({__name:"b-list",props:{scroll:{},class:{},state:{type:[String,Boolean]},states:{},scrollType:{}},emits:["on_scroll","on_to_top","on_to_bottom"],setup(t,{expose:o,emit:a}){const r=t,s=e.ref(),n=e.computed((()=>r.scrollType?`${r.scrollType}-scroll`:"thin-scroll"));let l={x:0,y:0};return o({reset:()=>{s.value.scrollTop=0}}),e.onMounted((()=>{s.value.onscroll=e=>{const t=e.target.scrollTop,o=e.target.scrollLeft,r=o-l.x,s=t-l.y;let n;Math.abs(r)>=Math.abs(s)?(e.stopPropagation(),n=r>=0?"l2r":"r2l"):n=s>=0?"t2b":"b2t",l.x=o,l.y=t,a("on_scroll",{dir:n,left:o,top:t}),0===t&&a("on_to_top",e),t>=e.target.scrollHeight-e.target.clientHeight-2&&a("on_to_bottom",e)}})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((a=>[e.createElementVNode("div",{class:e.normalizeClass(a.className),style:{position:"relative"},state:t.state},[e.createElementVNode("div",{ref_key:"$list",ref:s,class:e.normalizeClass(n.value),style:e.normalizeStyle(`overflow-x: ${t.scroll.x}; overflow-y: ${t.scroll.y}; width: 100%; height: 100%;`),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["stop"]))},[e.renderSlot(t.$slots,"default")],38)],10,S)])),_:3},8,["class","states"]))}}),V=["state","draggable"],E=e.defineComponent({__name:"b-drag",props:{class:{},dataInfo:{},dragStart:{},dragOver:{},freeDrag:{type:Boolean}},emits:["on_drag_start","on_drag_end","on_drag_over","on_drag_leave","on_drop","on_move"],setup(t,{emit:o}){const a=t,r=e.ref(),s=e.ref(""),n=e.ref(!1),l=e.ref(!1),c=e.reactive({x:0,y:0}),d=e=>{o("on_drag_start",e),s.value="dragStart",e.dataTransfer.setData("info",JSON.stringify(a.dataInfo))},u=e=>{e.preventDefault(),n.value=!0},p=e=>{o("on_drag_end",e),n.value=!1,s.value=""},f=e=>{e.preventDefault(),o("on_drag_over",e),s.value="dragOver"},m=e=>{o("on_drag_leave",e),s.value=""},g=e=>{o("on_drop",e.dataTransfer.getData("info"),e),s.value=""};let h;const b=e.reactive({x:0,y:0}),x=e.reactive({width:0,height:0}),v=e=>{e.preventDefault(),h||(h=r.value.offsetParent,h.onmousemove=y,h.ontouchmove=y,h.onmouseleave=w,h.onmouseup=w,h.ontouchend=w,Array.prototype.forEach.call(h.children,(e=>{e!==r.value&&(e.style.pointerEvents="none")})),x.width=r.value.offsetWidth,x.height=r.value.offsetHeight),s.value="dragStart",l.value=!0,b.x=e.offsetX,b.y=e.offsetY,r.value.style.pointerEvents="none"},y=e=>{if(!l.value)return;const t=e.offsetX-b.x,a=e.offsetY-b.y;c.x=Math.max(0,t),c.y=Math.max(0,a),c.x=Math.min(c.x+x.width,h.offsetWidth)-x.width,c.y=Math.min(c.y+x.height,h.offsetHeight)-x.height,o("on_move",c,e)},w=()=>{l.value&&(s.value="",l.value=!1,b.x=0,b.y=0,r.value.style.pointerEvents="auto")};return e.onMounted((()=>{(()=>{const e=r.value;a.freeDrag?(e.onmousedown=v,e.ontouchstart=v):(e.ondragstart=d,e.ondrag=u,e.ondragend=p,e.ondragover=f,e.ondragleave=m,e.ondrop=g)})()})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:{dragStart:t.dragStart,dragOver:t.dragOver}},{className:e.withCtx((o=>[e.createElementVNode("div",{style:e.normalizeStyle({cursor:t.dragOver?"default":"move",visibility:n.value?"hidden":"visible",position:t.freeDrag?"absolute":"relative",left:0,top:0,transform:`translate(${c.x}px, ${c.y}px)`}),ref_key:"$el",ref:r,class:e.normalizeClass(o.className),state:s.value,draggable:!!t.dragStart},[e.renderSlot(t.$slots,"default")],14,V)])),_:3},8,["class","states"]))}}),M=["src"],T=[i,d,p,m,h,_,z,j,e.defineComponent({__name:"b-webview",props:{src:{},class:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("iframe",{class:e.normalizeClass(o.className),frameborder:"0",src:t.src},null,10,M)])),_:1},8,["class"]))}),C,E,B];return{name:"btxui",install(e){T.forEach((t=>{e.component(t.__name,t)}))}}}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btxui",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -10,6 +10,6 @@
10
10
  "author": "btxstudio",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "md5": "^2.3.0"
13
+ "blueimp-md5": "^2.19.0"
14
14
  }
15
15
  }