lew-ui 1.1.2 → 1.1.3

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.
@@ -0,0 +1,71 @@
1
+ pre code.hljs {
2
+ display: block;
3
+ overflow-x: auto;
4
+ padding: 1em;
5
+ }
6
+ code.hljs {
7
+ padding: 3px 5px;
8
+ }
9
+ .hljs {
10
+ color: #abb2bf;
11
+ background: #282c34;
12
+ }
13
+ .hljs-comment,
14
+ .hljs-quote {
15
+ color: #5c6370;
16
+ font-style: italic;
17
+ }
18
+ .hljs-doctag,
19
+ .hljs-formula,
20
+ .hljs-keyword {
21
+ color: #c678dd;
22
+ }
23
+ .hljs-deletion,
24
+ .hljs-name,
25
+ .hljs-section,
26
+ .hljs-selector-tag,
27
+ .hljs-subst {
28
+ color: #e06c75;
29
+ }
30
+ .hljs-literal {
31
+ color: #56b6c2;
32
+ }
33
+ .hljs-addition,
34
+ .hljs-attribute,
35
+ .hljs-meta .hljs-string,
36
+ .hljs-regexp,
37
+ .hljs-string {
38
+ color: #98c379;
39
+ }
40
+ .hljs-attr,
41
+ .hljs-number,
42
+ .hljs-selector-attr,
43
+ .hljs-selector-class,
44
+ .hljs-selector-pseudo,
45
+ .hljs-template-variable,
46
+ .hljs-type,
47
+ .hljs-variable {
48
+ color: #d19a66;
49
+ }
50
+ .hljs-bullet,
51
+ .hljs-link,
52
+ .hljs-meta,
53
+ .hljs-selector-id,
54
+ .hljs-symbol,
55
+ .hljs-title {
56
+ color: #61aeee;
57
+ }
58
+ .hljs-built_in,
59
+ .hljs-class .hljs-title,
60
+ .hljs-title.class_ {
61
+ color: #e6c07b;
62
+ }
63
+ .hljs-emphasis {
64
+ font-style: italic;
65
+ }
66
+ .hljs-strong {
67
+ font-weight: 700;
68
+ }
69
+ .hljs-link {
70
+ text-decoration: underline;
71
+ }
Binary file
@@ -0,0 +1,531 @@
1
+ /**
2
+ * Minified by jsDelivr using Terser v5.10.0.
3
+ * Original file: /npm/canvas-confetti@1.5.1/dist/confetti.browser.js
4
+ *
5
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6
+ */
7
+ !(function (t, e) {
8
+ !(function t(e, n, a, i) {
9
+ var o = !!(
10
+ e.Worker &&
11
+ e.Blob &&
12
+ e.Promise &&
13
+ e.OffscreenCanvas &&
14
+ e.OffscreenCanvasRenderingContext2D &&
15
+ e.HTMLCanvasElement &&
16
+ e.HTMLCanvasElement.prototype.transferControlToOffscreen &&
17
+ e.URL &&
18
+ e.URL.createObjectURL
19
+ );
20
+ function r() {}
21
+ function l(t) {
22
+ var a = n.exports.Promise,
23
+ i = void 0 !== a ? a : e.Promise;
24
+ return 'function' == typeof i ? new i(t) : (t(r, r), null);
25
+ }
26
+ var c,
27
+ s,
28
+ u,
29
+ d,
30
+ f,
31
+ h,
32
+ m,
33
+ g,
34
+ b,
35
+ v =
36
+ ((u = Math.floor(1e3 / 60)),
37
+ (d = {}),
38
+ (f = 0),
39
+ 'function' == typeof requestAnimationFrame &&
40
+ 'function' == typeof cancelAnimationFrame
41
+ ? ((c = function (t) {
42
+ var e = Math.random();
43
+ return (
44
+ (d[e] = requestAnimationFrame(function n(a) {
45
+ f === a || f + u - 1 < a
46
+ ? ((f = a), delete d[e], t())
47
+ : (d[e] = requestAnimationFrame(n));
48
+ })),
49
+ e
50
+ );
51
+ }),
52
+ (s = function (t) {
53
+ d[t] && cancelAnimationFrame(d[t]);
54
+ }))
55
+ : ((c = function (t) {
56
+ return setTimeout(t, u);
57
+ }),
58
+ (s = function (t) {
59
+ return clearTimeout(t);
60
+ })),
61
+ { frame: c, cancel: s }),
62
+ p =
63
+ ((g = {}),
64
+ function () {
65
+ if (h) return h;
66
+ if (!a && o) {
67
+ var e = [
68
+ 'var CONFETTI, SIZE = {}, module = {};',
69
+ '(' + t.toString() + ')(this, module, true, SIZE);',
70
+ 'onmessage = function(msg) {',
71
+ ' if (msg.data.options) {',
72
+ ' CONFETTI(msg.data.options).then(function () {',
73
+ ' if (msg.data.callback) {',
74
+ ' postMessage({ callback: msg.data.callback });',
75
+ ' }',
76
+ ' });',
77
+ ' } else if (msg.data.reset) {',
78
+ ' CONFETTI.reset();',
79
+ ' } else if (msg.data.resize) {',
80
+ ' SIZE.width = msg.data.resize.width;',
81
+ ' SIZE.height = msg.data.resize.height;',
82
+ ' } else if (msg.data.canvas) {',
83
+ ' SIZE.width = msg.data.canvas.width;',
84
+ ' SIZE.height = msg.data.canvas.height;',
85
+ ' CONFETTI = module.exports.create(msg.data.canvas);',
86
+ ' }',
87
+ '}',
88
+ ].join('\n');
89
+ try {
90
+ h = new Worker(URL.createObjectURL(new Blob([e])));
91
+ } catch (t) {
92
+ return (
93
+ void 0 !== typeof console &&
94
+ 'function' == typeof console.warn &&
95
+ console.warn('🎊 Could not load worker', t),
96
+ null
97
+ );
98
+ }
99
+ !(function (t) {
100
+ function e(e, n) {
101
+ t.postMessage({
102
+ options: e || {},
103
+ callback: n,
104
+ });
105
+ }
106
+ (t.init = function (e) {
107
+ var n = e.transferControlToOffscreen();
108
+ t.postMessage({ canvas: n }, [n]);
109
+ }),
110
+ (t.fire = function (n, a, i) {
111
+ if (m) return e(n, null), m;
112
+ var o = Math.random().toString(36).slice(2);
113
+ return (m = l(function (a) {
114
+ function r(e) {
115
+ e.data.callback === o &&
116
+ (delete g[o],
117
+ t.removeEventListener(
118
+ 'message',
119
+ r,
120
+ ),
121
+ (m = null),
122
+ i(),
123
+ a());
124
+ }
125
+ t.addEventListener('message', r),
126
+ e(n, o),
127
+ (g[o] = r.bind(null, {
128
+ data: { callback: o },
129
+ }));
130
+ }));
131
+ }),
132
+ (t.reset = function () {
133
+ for (var e in (t.postMessage({ reset: !0 }),
134
+ g))
135
+ g[e](), delete g[e];
136
+ });
137
+ })(h);
138
+ }
139
+ return h;
140
+ }),
141
+ y = {
142
+ particleCount: 50,
143
+ angle: 90,
144
+ spread: 45,
145
+ startVelocity: 45,
146
+ decay: 0.9,
147
+ gravity: 1,
148
+ drift: 0,
149
+ ticks: 200,
150
+ x: 0.5,
151
+ y: 0.5,
152
+ shapes: ['square', 'circle'],
153
+ zIndex: 100,
154
+ colors: [
155
+ '#26ccff',
156
+ '#a25afd',
157
+ '#ff5e7e',
158
+ '#88ff5a',
159
+ '#fcff42',
160
+ '#ffa62d',
161
+ '#ff36ff',
162
+ ],
163
+ disableForReducedMotion: !1,
164
+ scalar: 1,
165
+ };
166
+ function M(t, e, n) {
167
+ return (function (t, e) {
168
+ return e ? e(t) : t;
169
+ })(t && null != t[e] ? t[e] : y[e], n);
170
+ }
171
+ function w(t) {
172
+ return t < 0 ? 0 : Math.floor(t);
173
+ }
174
+ function x(t) {
175
+ return parseInt(t, 16);
176
+ }
177
+ function C(t) {
178
+ return t.map(k);
179
+ }
180
+ function k(t) {
181
+ var e = String(t).replace(/[^0-9a-f]/gi, '');
182
+ return (
183
+ e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]),
184
+ {
185
+ r: x(e.substring(0, 2)),
186
+ g: x(e.substring(2, 4)),
187
+ b: x(e.substring(4, 6)),
188
+ }
189
+ );
190
+ }
191
+ function I(t) {
192
+ (t.width = document.documentElement.clientWidth),
193
+ (t.height = document.documentElement.clientHeight);
194
+ }
195
+ function S(t) {
196
+ var e = t.getBoundingClientRect();
197
+ (t.width = e.width), (t.height = e.height);
198
+ }
199
+ function T(t, e, n, o, r) {
200
+ var c,
201
+ s,
202
+ u = e.slice(),
203
+ d = t.getContext('2d'),
204
+ f = l(function (e) {
205
+ function l() {
206
+ (c = s = null),
207
+ d.clearRect(0, 0, o.width, o.height),
208
+ r(),
209
+ e();
210
+ }
211
+ (c = v.frame(function e() {
212
+ !a ||
213
+ (o.width === i.width && o.height === i.height) ||
214
+ ((o.width = t.width = i.width),
215
+ (o.height = t.height = i.height)),
216
+ o.width ||
217
+ o.height ||
218
+ (n(t),
219
+ (o.width = t.width),
220
+ (o.height = t.height)),
221
+ d.clearRect(0, 0, o.width, o.height),
222
+ (u = u.filter(function (t) {
223
+ return (function (t, e) {
224
+ (e.x +=
225
+ Math.cos(e.angle2D) * e.velocity +
226
+ e.drift),
227
+ (e.y +=
228
+ Math.sin(e.angle2D) * e.velocity +
229
+ e.gravity),
230
+ (e.wobble += e.wobbleSpeed),
231
+ (e.velocity *= e.decay),
232
+ (e.tiltAngle += 0.1),
233
+ (e.tiltSin = Math.sin(e.tiltAngle)),
234
+ (e.tiltCos = Math.cos(e.tiltAngle)),
235
+ (e.random = Math.random() + 2),
236
+ (e.wobbleX =
237
+ e.x +
238
+ 10 * e.scalar * Math.cos(e.wobble)),
239
+ (e.wobbleY =
240
+ e.y +
241
+ 10 * e.scalar * Math.sin(e.wobble));
242
+ var n = e.tick++ / e.totalTicks,
243
+ a = e.x + e.random * e.tiltCos,
244
+ i = e.y + e.random * e.tiltSin,
245
+ o = e.wobbleX + e.random * e.tiltCos,
246
+ r = e.wobbleY + e.random * e.tiltSin;
247
+ return (
248
+ (t.fillStyle =
249
+ 'rgba(' +
250
+ e.color.r +
251
+ ', ' +
252
+ e.color.g +
253
+ ', ' +
254
+ e.color.b +
255
+ ', ' +
256
+ (1 - n) +
257
+ ')'),
258
+ t.beginPath(),
259
+ 'circle' === e.shape
260
+ ? t.ellipse
261
+ ? t.ellipse(
262
+ e.x,
263
+ e.y,
264
+ Math.abs(o - a) *
265
+ e.ovalScalar,
266
+ Math.abs(r - i) *
267
+ e.ovalScalar,
268
+ (Math.PI / 10) * e.wobble,
269
+ 0,
270
+ 2 * Math.PI,
271
+ )
272
+ : (function (
273
+ t,
274
+ e,
275
+ n,
276
+ a,
277
+ i,
278
+ o,
279
+ r,
280
+ l,
281
+ c,
282
+ ) {
283
+ t.save(),
284
+ t.translate(e, n),
285
+ t.rotate(o),
286
+ t.scale(a, i),
287
+ t.arc(
288
+ 0,
289
+ 0,
290
+ 1,
291
+ r,
292
+ l,
293
+ c,
294
+ ),
295
+ t.restore();
296
+ })(
297
+ t,
298
+ e.x,
299
+ e.y,
300
+ Math.abs(o - a) *
301
+ e.ovalScalar,
302
+ Math.abs(r - i) *
303
+ e.ovalScalar,
304
+ (Math.PI / 10) * e.wobble,
305
+ 0,
306
+ 2 * Math.PI,
307
+ )
308
+ : (t.moveTo(
309
+ Math.floor(e.x),
310
+ Math.floor(e.y),
311
+ ),
312
+ t.lineTo(
313
+ Math.floor(e.wobbleX),
314
+ Math.floor(i),
315
+ ),
316
+ t.lineTo(
317
+ Math.floor(o),
318
+ Math.floor(r),
319
+ ),
320
+ t.lineTo(
321
+ Math.floor(a),
322
+ Math.floor(e.wobbleY),
323
+ )),
324
+ t.closePath(),
325
+ t.fill(),
326
+ e.tick < e.totalTicks
327
+ );
328
+ })(d, t);
329
+ })),
330
+ u.length ? (c = v.frame(e)) : l();
331
+ })),
332
+ (s = l);
333
+ });
334
+ return {
335
+ addFettis: function (t) {
336
+ return (u = u.concat(t)), f;
337
+ },
338
+ canvas: t,
339
+ promise: f,
340
+ reset: function () {
341
+ c && v.cancel(c), s && s();
342
+ },
343
+ };
344
+ }
345
+ function E(t, n) {
346
+ var a,
347
+ i = !t,
348
+ r = !!M(n || {}, 'resize'),
349
+ c = M(n, 'disableForReducedMotion', Boolean),
350
+ s = o && !!M(n || {}, 'useWorker') ? p() : null,
351
+ u = i ? I : S,
352
+ d = !(!t || !s) && !!t.__confetti_initialized,
353
+ f =
354
+ 'function' == typeof matchMedia &&
355
+ matchMedia('(prefers-reduced-motion)').matches;
356
+ function h(e, n, i) {
357
+ for (
358
+ var o,
359
+ r,
360
+ l,
361
+ c,
362
+ s,
363
+ d = M(e, 'particleCount', w),
364
+ f = M(e, 'angle', Number),
365
+ h = M(e, 'spread', Number),
366
+ m = M(e, 'startVelocity', Number),
367
+ g = M(e, 'decay', Number),
368
+ b = M(e, 'gravity', Number),
369
+ v = M(e, 'drift', Number),
370
+ p = M(e, 'colors', C),
371
+ y = M(e, 'ticks', Number),
372
+ x = M(e, 'shapes'),
373
+ k = M(e, 'scalar'),
374
+ I = (function (t) {
375
+ var e = M(t, 'origin', Object);
376
+ return (
377
+ (e.x = M(e, 'x', Number)),
378
+ (e.y = M(e, 'y', Number)),
379
+ e
380
+ );
381
+ })(e),
382
+ S = d,
383
+ E = [],
384
+ F = t.width * I.x,
385
+ N = t.height * I.y;
386
+ S--;
387
+
388
+ )
389
+ E.push(
390
+ ((o = {
391
+ x: F,
392
+ y: N,
393
+ angle: f,
394
+ spread: h,
395
+ startVelocity: m,
396
+ color: p[S % p.length],
397
+ shape: x[
398
+ ((c = 0),
399
+ (s = x.length),
400
+ Math.floor(Math.random() * (s - c)) + c)
401
+ ],
402
+ ticks: y,
403
+ decay: g,
404
+ gravity: b,
405
+ drift: v,
406
+ scalar: k,
407
+ }),
408
+ (r = void 0),
409
+ (l = void 0),
410
+ (r = o.angle * (Math.PI / 180)),
411
+ (l = o.spread * (Math.PI / 180)),
412
+ {
413
+ x: o.x,
414
+ y: o.y,
415
+ wobble: 10 * Math.random(),
416
+ wobbleSpeed: Math.min(
417
+ 0.11,
418
+ 0.1 * Math.random() + 0.05,
419
+ ),
420
+ velocity:
421
+ 0.5 * o.startVelocity +
422
+ Math.random() * o.startVelocity,
423
+ angle2D: -r + (0.5 * l - Math.random() * l),
424
+ tiltAngle: (0.5 * Math.random() + 0.25) * Math.PI,
425
+ color: o.color,
426
+ shape: o.shape,
427
+ tick: 0,
428
+ totalTicks: o.ticks,
429
+ decay: o.decay,
430
+ drift: o.drift,
431
+ random: Math.random() + 2,
432
+ tiltSin: 0,
433
+ tiltCos: 0,
434
+ wobbleX: 0,
435
+ wobbleY: 0,
436
+ gravity: 3 * o.gravity,
437
+ ovalScalar: 0.6,
438
+ scalar: o.scalar,
439
+ }),
440
+ );
441
+ return a ? a.addFettis(E) : (a = T(t, E, u, n, i)).promise;
442
+ }
443
+ function m(n) {
444
+ var o = c || M(n, 'disableForReducedMotion', Boolean),
445
+ m = M(n, 'zIndex', Number);
446
+ if (o && f)
447
+ return l(function (t) {
448
+ t();
449
+ });
450
+ i && a
451
+ ? (t = a.canvas)
452
+ : i &&
453
+ !t &&
454
+ ((t = (function (t) {
455
+ var e = document.createElement('canvas');
456
+ return (
457
+ (e.style.position = 'fixed'),
458
+ (e.style.top = '0px'),
459
+ (e.style.left = '0px'),
460
+ (e.style.pointerEvents = 'none'),
461
+ (e.style.zIndex = t),
462
+ e
463
+ );
464
+ })(m)),
465
+ document.body.appendChild(t)),
466
+ r && !d && u(t);
467
+ var g = { width: t.width, height: t.height };
468
+ function b() {
469
+ if (s) {
470
+ var e = {
471
+ getBoundingClientRect: function () {
472
+ if (!i) return t.getBoundingClientRect();
473
+ },
474
+ };
475
+ return (
476
+ u(e),
477
+ void s.postMessage({
478
+ resize: { width: e.width, height: e.height },
479
+ })
480
+ );
481
+ }
482
+ g.width = g.height = null;
483
+ }
484
+ function v() {
485
+ (a = null),
486
+ r && e.removeEventListener('resize', b),
487
+ i &&
488
+ t &&
489
+ (document.body.removeChild(t),
490
+ (t = null),
491
+ (d = !1));
492
+ }
493
+ return (
494
+ s && !d && s.init(t),
495
+ (d = !0),
496
+ s && (t.__confetti_initialized = !0),
497
+ r && e.addEventListener('resize', b, !1),
498
+ s ? s.fire(n, g, v) : h(n, g, v)
499
+ );
500
+ }
501
+ return (
502
+ (m.reset = function () {
503
+ s && s.reset(), a && a.reset();
504
+ }),
505
+ m
506
+ );
507
+ }
508
+ function F() {
509
+ return b || (b = E(null, { useWorker: !0, resize: !0 })), b;
510
+ }
511
+ (n.exports = function () {
512
+ return F().apply(this, arguments);
513
+ }),
514
+ (n.exports.reset = function () {
515
+ F().reset();
516
+ }),
517
+ (n.exports.create = E);
518
+ })(
519
+ (function () {
520
+ return void 0 !== t
521
+ ? t
522
+ : 'undefined' != typeof self
523
+ ? self
524
+ : this || {};
525
+ })(),
526
+ e,
527
+ !1,
528
+ ),
529
+ (t.confetti = e.exports);
530
+ })(window, {});
531
+ //# sourceMappingURL=/sm/ab60d7fb9bf5b5ded42c77782b65b071de85f56c21da42948364d6b2b1961762.map
Binary file
Binary file