@peculiar/certificates-viewer 3.1.0 → 3.2.0

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.
Files changed (72) hide show
  1. package/dist/cjs/{certification_request-878e786a.js → certification_request-cde57123.js} +137 -266
  2. package/dist/cjs/csr-78378ed0.js +150 -0
  3. package/dist/cjs/download-6724f3a7.js +79 -0
  4. package/dist/cjs/{download-5e7d5455.js → index-ff818d4d.js} +0 -72
  5. package/dist/cjs/index.cjs.js +2 -1
  6. package/dist/cjs/l10n-a048a686.js +145 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/peculiar-attribute-certificate-viewer_2.cjs.entry.js +479 -0
  9. package/dist/cjs/peculiar-button_5.cjs.entry.js +148 -0
  10. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +173 -0
  11. package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
  12. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +124 -0
  13. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -4
  14. package/dist/cjs/peculiar.cjs.js +1 -1
  15. package/dist/cjs/public_key-e56dbe52.js +1104 -0
  16. package/dist/cjs/x509_attribute_certificate-cc325b70.js +87 -0
  17. package/dist/cjs/x509_certificate-51a97033.js +139 -0
  18. package/dist/collection/components/certificate-decoder/certificate-decoder.js +54 -23
  19. package/dist/collection/utils/index.js +0 -1
  20. package/dist/collection/www-copy/index.js +80 -0
  21. package/dist/esm/{certification_request-3402a181.js → certification_request-c0674647.js} +76 -205
  22. package/dist/esm/csr-c1b6a176.js +147 -0
  23. package/dist/esm/download-735fb2eb.js +76 -0
  24. package/dist/esm/{download-cf68ac2c.js → index-0ba131b0.js} +1 -71
  25. package/dist/esm/index.js +2 -1
  26. package/dist/esm/l10n-ac28fa92.js +141 -0
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/esm/peculiar-attribute-certificate-viewer_2.entry.js +474 -0
  29. package/dist/esm/peculiar-button_5.entry.js +140 -0
  30. package/dist/esm/peculiar-certificate-decoder.entry.js +169 -0
  31. package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
  32. package/dist/esm/peculiar-certificate-viewer.entry.js +120 -0
  33. package/dist/esm/peculiar-certificates-viewer.entry.js +5 -3
  34. package/dist/esm/peculiar.js +1 -1
  35. package/dist/esm/public_key-43b2cbf0.js +1089 -0
  36. package/dist/esm/x509_attribute_certificate-a6d4aa15.js +85 -0
  37. package/dist/esm/x509_certificate-12f6d344.js +137 -0
  38. package/dist/peculiar/index.esm.js +1 -1
  39. package/dist/peculiar/p-006865d7.js +4 -0
  40. package/dist/peculiar/p-17c4da7b.js +11 -0
  41. package/dist/peculiar/p-1ebab45c.js +78 -0
  42. package/dist/peculiar/{p-b09a1f0b.entry.js → p-38635919.entry.js} +1 -1
  43. package/dist/peculiar/p-3f8d1008.entry.js +4 -0
  44. package/dist/peculiar/p-42da7f97.js +11 -0
  45. package/dist/peculiar/p-464e0943.js +87 -0
  46. package/dist/peculiar/p-4f4c1d30.js +12 -0
  47. package/dist/peculiar/p-530afe84.entry.js +11 -0
  48. package/dist/peculiar/p-6011646e.entry.js +11 -0
  49. package/dist/peculiar/p-6c510523.js +18 -0
  50. package/dist/peculiar/p-d7a13cb4.js +18 -0
  51. package/dist/peculiar/p-dafae164.entry.js +4 -0
  52. package/dist/peculiar/p-e77d0ccc.entry.js +18 -0
  53. package/dist/peculiar/peculiar.esm.js +1 -1
  54. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +13 -1
  55. package/dist/types/components.d.ts +20 -0
  56. package/dist/types/utils/index.d.ts +0 -1
  57. package/package.json +2 -3
  58. package/dist/cjs/l10n-d4a77087.js +0 -767
  59. package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +0 -2187
  60. package/dist/collection/utils/history.js +0 -19
  61. package/dist/collection/utils/parse_hash.js +0 -28
  62. package/dist/collection/utils/query_stringify.js +0 -21
  63. package/dist/esm/l10n-9ac63748.js +0 -762
  64. package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +0 -2175
  65. package/dist/peculiar/p-08538084.entry.js +0 -113
  66. package/dist/peculiar/p-3fc37750.entry.js +0 -4
  67. package/dist/peculiar/p-8ad24aa3.js +0 -87
  68. package/dist/peculiar/p-99797a49.js +0 -34
  69. package/dist/peculiar/p-c774ec0b.js +0 -18
  70. package/dist/types/utils/history.d.ts +0 -9
  71. package/dist/types/utils/parse_hash.d.ts +0 -9
  72. package/dist/types/utils/query_stringify.d.ts +0 -8
@@ -1,762 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-bfbd2ad8.js';
5
-
6
- function _extends() {
7
- _extends = Object.assign || function (target) {
8
- for (var i = 1; i < arguments.length; i++) {
9
- var source = arguments[i];
10
-
11
- for (var key in source) {
12
- if (Object.prototype.hasOwnProperty.call(source, key)) {
13
- target[key] = source[key];
14
- }
15
- }
16
- }
17
-
18
- return target;
19
- };
20
-
21
- return _extends.apply(this, arguments);
22
- }
23
-
24
- function isAbsolute(pathname) {
25
- return pathname.charAt(0) === '/';
26
- }
27
-
28
- // About 1.5x faster than the two-arg version of Array#splice()
29
- function spliceOne(list, index) {
30
- for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
31
- list[i] = list[k];
32
- }
33
-
34
- list.pop();
35
- }
36
-
37
- // This implementation is based heavily on node's url.parse
38
- function resolvePathname(to, from) {
39
- if (from === undefined) from = '';
40
-
41
- var toParts = (to && to.split('/')) || [];
42
- var fromParts = (from && from.split('/')) || [];
43
-
44
- var isToAbs = to && isAbsolute(to);
45
- var isFromAbs = from && isAbsolute(from);
46
- var mustEndAbs = isToAbs || isFromAbs;
47
-
48
- if (to && isAbsolute(to)) {
49
- // to is absolute
50
- fromParts = toParts;
51
- } else if (toParts.length) {
52
- // to is relative, drop the filename
53
- fromParts.pop();
54
- fromParts = fromParts.concat(toParts);
55
- }
56
-
57
- if (!fromParts.length) return '/';
58
-
59
- var hasTrailingSlash;
60
- if (fromParts.length) {
61
- var last = fromParts[fromParts.length - 1];
62
- hasTrailingSlash = last === '.' || last === '..' || last === '';
63
- } else {
64
- hasTrailingSlash = false;
65
- }
66
-
67
- var up = 0;
68
- for (var i = fromParts.length; i >= 0; i--) {
69
- var part = fromParts[i];
70
-
71
- if (part === '.') {
72
- spliceOne(fromParts, i);
73
- } else if (part === '..') {
74
- spliceOne(fromParts, i);
75
- up++;
76
- } else if (up) {
77
- spliceOne(fromParts, i);
78
- up--;
79
- }
80
- }
81
-
82
- if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
83
-
84
- if (
85
- mustEndAbs &&
86
- fromParts[0] !== '' &&
87
- (!fromParts[0] || !isAbsolute(fromParts[0]))
88
- )
89
- fromParts.unshift('');
90
-
91
- var result = fromParts.join('/');
92
-
93
- if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
94
-
95
- return result;
96
- }
97
-
98
- var prefix = 'Invariant failed';
99
- function invariant(condition, message) {
100
- if (condition) {
101
- return;
102
- }
103
- {
104
- throw new Error(prefix);
105
- }
106
- }
107
-
108
- function addLeadingSlash(path) {
109
- return path.charAt(0) === '/' ? path : '/' + path;
110
- }
111
- function hasBasename(path, prefix) {
112
- return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
113
- }
114
- function stripBasename(path, prefix) {
115
- return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
116
- }
117
- function stripTrailingSlash(path) {
118
- return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
119
- }
120
- function parsePath(path) {
121
- var pathname = path || '/';
122
- var search = '';
123
- var hash = '';
124
- var hashIndex = pathname.indexOf('#');
125
-
126
- if (hashIndex !== -1) {
127
- hash = pathname.substr(hashIndex);
128
- pathname = pathname.substr(0, hashIndex);
129
- }
130
-
131
- var searchIndex = pathname.indexOf('?');
132
-
133
- if (searchIndex !== -1) {
134
- search = pathname.substr(searchIndex);
135
- pathname = pathname.substr(0, searchIndex);
136
- }
137
-
138
- return {
139
- pathname: pathname,
140
- search: search === '?' ? '' : search,
141
- hash: hash === '#' ? '' : hash
142
- };
143
- }
144
- function createPath(location) {
145
- var pathname = location.pathname,
146
- search = location.search,
147
- hash = location.hash;
148
- var path = pathname || '/';
149
- if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
150
- if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
151
- return path;
152
- }
153
-
154
- function createLocation(path, state, key, currentLocation) {
155
- var location;
156
-
157
- if (typeof path === 'string') {
158
- // Two-arg form: push(path, state)
159
- location = parsePath(path);
160
- location.state = state;
161
- } else {
162
- // One-arg form: push(location)
163
- location = _extends({}, path);
164
- if (location.pathname === undefined) location.pathname = '';
165
-
166
- if (location.search) {
167
- if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
168
- } else {
169
- location.search = '';
170
- }
171
-
172
- if (location.hash) {
173
- if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
174
- } else {
175
- location.hash = '';
176
- }
177
-
178
- if (state !== undefined && location.state === undefined) location.state = state;
179
- }
180
-
181
- try {
182
- location.pathname = decodeURI(location.pathname);
183
- } catch (e) {
184
- if (e instanceof URIError) {
185
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
186
- } else {
187
- throw e;
188
- }
189
- }
190
-
191
- if (key) location.key = key;
192
-
193
- if (currentLocation) {
194
- // Resolve incomplete/relative pathname relative to current location.
195
- if (!location.pathname) {
196
- location.pathname = currentLocation.pathname;
197
- } else if (location.pathname.charAt(0) !== '/') {
198
- location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
199
- }
200
- } else {
201
- // When there is no prior location and pathname is empty, set it to /
202
- if (!location.pathname) {
203
- location.pathname = '/';
204
- }
205
- }
206
-
207
- return location;
208
- }
209
-
210
- function createTransitionManager() {
211
- var prompt = null;
212
-
213
- function setPrompt(nextPrompt) {
214
- prompt = nextPrompt;
215
- return function () {
216
- if (prompt === nextPrompt) prompt = null;
217
- };
218
- }
219
-
220
- function confirmTransitionTo(location, action, getUserConfirmation, callback) {
221
- // TODO: If another transition starts while we're still confirming
222
- // the previous one, we may end up in a weird state. Figure out the
223
- // best way to handle this.
224
- if (prompt != null) {
225
- var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
226
-
227
- if (typeof result === 'string') {
228
- if (typeof getUserConfirmation === 'function') {
229
- getUserConfirmation(result, callback);
230
- } else {
231
- callback(true);
232
- }
233
- } else {
234
- // Return false from a transition hook to cancel the transition.
235
- callback(result !== false);
236
- }
237
- } else {
238
- callback(true);
239
- }
240
- }
241
-
242
- var listeners = [];
243
-
244
- function appendListener(fn) {
245
- var isActive = true;
246
-
247
- function listener() {
248
- if (isActive) fn.apply(void 0, arguments);
249
- }
250
-
251
- listeners.push(listener);
252
- return function () {
253
- isActive = false;
254
- listeners = listeners.filter(function (item) {
255
- return item !== listener;
256
- });
257
- };
258
- }
259
-
260
- function notifyListeners() {
261
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
262
- args[_key] = arguments[_key];
263
- }
264
-
265
- listeners.forEach(function (listener) {
266
- return listener.apply(void 0, args);
267
- });
268
- }
269
-
270
- return {
271
- setPrompt: setPrompt,
272
- confirmTransitionTo: confirmTransitionTo,
273
- appendListener: appendListener,
274
- notifyListeners: notifyListeners
275
- };
276
- }
277
-
278
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
279
- function getConfirmation(message, callback) {
280
- callback(window.confirm(message)); // eslint-disable-line no-alert
281
- }
282
- /**
283
- * Returns true if the HTML5 history API is supported. Taken from Modernizr.
284
- *
285
- * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
286
- * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
287
- * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
288
- */
289
-
290
- function supportsHistory() {
291
- var ua = window.navigator.userAgent;
292
- if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
293
- return window.history && 'pushState' in window.history;
294
- }
295
- /**
296
- * Returns true if browser fires popstate on hash change.
297
- * IE10 and IE11 do not.
298
- */
299
-
300
- function supportsPopStateOnHashChange() {
301
- return window.navigator.userAgent.indexOf('Trident') === -1;
302
- }
303
- /**
304
- * Returns true if a given popstate event is an extraneous WebKit event.
305
- * Accounts for the fact that Chrome on iOS fires real popstate events
306
- * containing undefined state when pressing the back button.
307
- */
308
-
309
- function isExtraneousPopstateEvent(event) {
310
- return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
311
- }
312
-
313
- var PopStateEvent = 'popstate';
314
- var HashChangeEvent = 'hashchange';
315
-
316
- function getHistoryState() {
317
- try {
318
- return window.history.state || {};
319
- } catch (e) {
320
- // IE 11 sometimes throws when accessing window.history.state
321
- // See https://github.com/ReactTraining/history/pull/289
322
- return {};
323
- }
324
- }
325
- /**
326
- * Creates a history object that uses the HTML5 history API including
327
- * pushState, replaceState, and the popstate event.
328
- */
329
-
330
-
331
- function createBrowserHistory(props) {
332
- if (props === void 0) {
333
- props = {};
334
- }
335
-
336
- !canUseDOM ? invariant(false) : void 0;
337
- var globalHistory = window.history;
338
- var canUseHistory = supportsHistory();
339
- var needsHashChangeListener = !supportsPopStateOnHashChange();
340
- var _props = props,
341
- _props$forceRefresh = _props.forceRefresh,
342
- forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
343
- _props$getUserConfirm = _props.getUserConfirmation,
344
- getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
345
- _props$keyLength = _props.keyLength,
346
- keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
347
- var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
348
-
349
- function getDOMLocation(historyState) {
350
- var _ref = historyState || {},
351
- key = _ref.key,
352
- state = _ref.state;
353
-
354
- var _window$location = window.location,
355
- pathname = _window$location.pathname,
356
- search = _window$location.search,
357
- hash = _window$location.hash;
358
- var path = pathname + search + hash;
359
- if (basename) path = stripBasename(path, basename);
360
- return createLocation(path, state, key);
361
- }
362
-
363
- function createKey() {
364
- return Math.random().toString(36).substr(2, keyLength);
365
- }
366
-
367
- var transitionManager = createTransitionManager();
368
-
369
- function setState(nextState) {
370
- _extends(history, nextState);
371
-
372
- history.length = globalHistory.length;
373
- transitionManager.notifyListeners(history.location, history.action);
374
- }
375
-
376
- function handlePopState(event) {
377
- // Ignore extraneous popstate events in WebKit.
378
- if (isExtraneousPopstateEvent(event)) return;
379
- handlePop(getDOMLocation(event.state));
380
- }
381
-
382
- function handleHashChange() {
383
- handlePop(getDOMLocation(getHistoryState()));
384
- }
385
-
386
- var forceNextPop = false;
387
-
388
- function handlePop(location) {
389
- if (forceNextPop) {
390
- forceNextPop = false;
391
- setState();
392
- } else {
393
- var action = 'POP';
394
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
395
- if (ok) {
396
- setState({
397
- action: action,
398
- location: location
399
- });
400
- } else {
401
- revertPop(location);
402
- }
403
- });
404
- }
405
- }
406
-
407
- function revertPop(fromLocation) {
408
- var toLocation = history.location; // TODO: We could probably make this more reliable by
409
- // keeping a list of keys we've seen in sessionStorage.
410
- // Instead, we just default to 0 for keys we don't know.
411
-
412
- var toIndex = allKeys.indexOf(toLocation.key);
413
- if (toIndex === -1) toIndex = 0;
414
- var fromIndex = allKeys.indexOf(fromLocation.key);
415
- if (fromIndex === -1) fromIndex = 0;
416
- var delta = toIndex - fromIndex;
417
-
418
- if (delta) {
419
- forceNextPop = true;
420
- go(delta);
421
- }
422
- }
423
-
424
- var initialLocation = getDOMLocation(getHistoryState());
425
- var allKeys = [initialLocation.key]; // Public interface
426
-
427
- function createHref(location) {
428
- return basename + createPath(location);
429
- }
430
-
431
- function push(path, state) {
432
- var action = 'PUSH';
433
- var location = createLocation(path, state, createKey(), history.location);
434
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
435
- if (!ok) return;
436
- var href = createHref(location);
437
- var key = location.key,
438
- state = location.state;
439
-
440
- if (canUseHistory) {
441
- globalHistory.pushState({
442
- key: key,
443
- state: state
444
- }, null, href);
445
-
446
- if (forceRefresh) {
447
- window.location.href = href;
448
- } else {
449
- var prevIndex = allKeys.indexOf(history.location.key);
450
- var nextKeys = allKeys.slice(0, prevIndex + 1);
451
- nextKeys.push(location.key);
452
- allKeys = nextKeys;
453
- setState({
454
- action: action,
455
- location: location
456
- });
457
- }
458
- } else {
459
- window.location.href = href;
460
- }
461
- });
462
- }
463
-
464
- function replace(path, state) {
465
- var action = 'REPLACE';
466
- var location = createLocation(path, state, createKey(), history.location);
467
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
468
- if (!ok) return;
469
- var href = createHref(location);
470
- var key = location.key,
471
- state = location.state;
472
-
473
- if (canUseHistory) {
474
- globalHistory.replaceState({
475
- key: key,
476
- state: state
477
- }, null, href);
478
-
479
- if (forceRefresh) {
480
- window.location.replace(href);
481
- } else {
482
- var prevIndex = allKeys.indexOf(history.location.key);
483
- if (prevIndex !== -1) allKeys[prevIndex] = location.key;
484
- setState({
485
- action: action,
486
- location: location
487
- });
488
- }
489
- } else {
490
- window.location.replace(href);
491
- }
492
- });
493
- }
494
-
495
- function go(n) {
496
- globalHistory.go(n);
497
- }
498
-
499
- function goBack() {
500
- go(-1);
501
- }
502
-
503
- function goForward() {
504
- go(1);
505
- }
506
-
507
- var listenerCount = 0;
508
-
509
- function checkDOMListeners(delta) {
510
- listenerCount += delta;
511
-
512
- if (listenerCount === 1 && delta === 1) {
513
- window.addEventListener(PopStateEvent, handlePopState);
514
- if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
515
- } else if (listenerCount === 0) {
516
- window.removeEventListener(PopStateEvent, handlePopState);
517
- if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
518
- }
519
- }
520
-
521
- var isBlocked = false;
522
-
523
- function block(prompt) {
524
- if (prompt === void 0) {
525
- prompt = false;
526
- }
527
-
528
- var unblock = transitionManager.setPrompt(prompt);
529
-
530
- if (!isBlocked) {
531
- checkDOMListeners(1);
532
- isBlocked = true;
533
- }
534
-
535
- return function () {
536
- if (isBlocked) {
537
- isBlocked = false;
538
- checkDOMListeners(-1);
539
- }
540
-
541
- return unblock();
542
- };
543
- }
544
-
545
- function listen(listener) {
546
- var unlisten = transitionManager.appendListener(listener);
547
- checkDOMListeners(1);
548
- return function () {
549
- checkDOMListeners(-1);
550
- unlisten();
551
- };
552
- }
553
-
554
- var history = {
555
- length: globalHistory.length,
556
- action: 'POP',
557
- location: initialLocation,
558
- createHref: createHref,
559
- push: push,
560
- replace: replace,
561
- go: go,
562
- goBack: goBack,
563
- goForward: goForward,
564
- block: block,
565
- listen: listen
566
- };
567
- return history;
568
- }
569
-
570
- /**
571
- * @license
572
- * Copyright (c) Peculiar Ventures, LLC.
573
- *
574
- * This source code is licensed under the MIT license found in the
575
- * LICENSE file in the root directory of this source tree.
576
- */
577
- function parseHash(hash = window.location.hash) {
578
- if (!hash.length) {
579
- return {};
580
- }
581
- const pairs = hash.replace(/^(#|\?)?\/?/, '').split('&');
582
- const result = {};
583
- for (let i = 0; i < pairs.length; i += 1) {
584
- const pair = pairs[i].split('=');
585
- try {
586
- result[pair[0]] = pair[1] && decodeURIComponent(pair[1]);
587
- }
588
- catch (error) {
589
- console.warn(error);
590
- }
591
- }
592
- return result;
593
- }
594
-
595
- /**
596
- * @license
597
- * Copyright (c) Peculiar Ventures, LLC.
598
- *
599
- * This source code is licensed under the MIT license found in the
600
- * LICENSE file in the root directory of this source tree.
601
- */
602
- function queryStringify(options) {
603
- const parameters = [];
604
- Object.keys(options).forEach((o) => {
605
- if (typeof options[o] === 'string'
606
- || typeof options[o] === 'boolean'
607
- || typeof options[o] === 'number') {
608
- parameters.push(`${o}=${encodeURIComponent(options[o])}`);
609
- }
610
- });
611
- return parameters.join('&');
612
- }
613
-
614
- /**
615
- * @license
616
- * Copyright (c) Peculiar Ventures, LLC.
617
- *
618
- * This source code is licensed under the MIT license found in the
619
- * LICENSE file in the root directory of this source tree.
620
- */
621
- const browserHistory = createBrowserHistory();
622
- const history = Object.assign(browserHistory, {
623
- parseHash,
624
- queryStringify,
625
- });
626
-
627
- var dayjs_min = createCommonjsModule(function (module, exports) {
628
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var v=this.$locale().weekStart||0,D=(y<v?y+7:y)-v;return $(r?m-D:m+(6-D),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,v=O.m(this,M);return v=(l={},l[c]=v/12,l[f]=v,l[h]=v/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?v:O.a(v)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[v],w.Ls=D,w.p={},w}));
629
- });
630
-
631
- var relativeTime = createCommonjsModule(function (module, exports) {
632
- !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
633
- });
634
-
635
- /**
636
- * @license
637
- * Copyright (c) Peculiar Ventures, LLC.
638
- *
639
- * This source code is licensed under the MIT license found in the
640
- * LICENSE file in the root directory of this source tree.
641
- */
642
- dayjs_min.extend(relativeTime);
643
- const dateShort = (date) => (new Date(date).toUTCString());
644
- const dateDiff = (dateStart, dateEnd) => {
645
- if (!dateStart || !dateEnd) {
646
- return '';
647
- }
648
- const start = dayjs_min(dateStart);
649
- const end = dayjs_min(dateEnd);
650
- return start.to(end, true);
651
- };
652
-
653
- const basicInformation = "Basic Information";
654
- const subjectName = "Subject Name";
655
- const issuerName = "Issuer Name";
656
- const publicKeyInfo = "Public Key Info";
657
- const signature = "Signature";
658
- const extensions = "Extensions";
659
- const miscellaneous = "Miscellaneous";
660
- const download = "Download";
661
- const serialNumber = "Serial Number";
662
- const version = "Version";
663
- const validity = "Validity";
664
- const issued = "Issued";
665
- const expired = "Expired";
666
- const algorithm = "Algorithm";
667
- const namedCurve = "Named Curve";
668
- const exponent = "Exponent";
669
- const modulus = "Modulus";
670
- const value = "Value";
671
- const valid = "Valid";
672
- const revoked = "Revoked";
673
- const issuer = "Issuer";
674
- const name = "Name";
675
- const publicKey = "Public Key";
676
- const fingerprint = "Fingerprint";
677
- const fingerprints = "Fingerprints";
678
- const actions = "Actions";
679
- const details = "Details";
680
- const testURLs = "Test URLs";
681
- const certificateDetails = "Certificate Details";
682
- const holder = "Holder";
683
- const digestInfo = "Digest Info";
684
- const type = "Type";
685
- const en = {
686
- basicInformation: basicInformation,
687
- subjectName: subjectName,
688
- issuerName: issuerName,
689
- publicKeyInfo: publicKeyInfo,
690
- signature: signature,
691
- extensions: extensions,
692
- miscellaneous: miscellaneous,
693
- download: download,
694
- "download.pem": "Download PEM",
695
- "download.der": "Download DER",
696
- serialNumber: serialNumber,
697
- version: version,
698
- validity: validity,
699
- issued: issued,
700
- expired: expired,
701
- algorithm: algorithm,
702
- namedCurve: namedCurve,
703
- exponent: exponent,
704
- modulus: modulus,
705
- value: value,
706
- valid: valid,
707
- revoked: revoked,
708
- issuer: issuer,
709
- name: name,
710
- publicKey: publicKey,
711
- fingerprint: fingerprint,
712
- fingerprints: fingerprints,
713
- actions: actions,
714
- details: details,
715
- testURLs: testURLs,
716
- certificateDetails: certificateDetails,
717
- holder: holder,
718
- digestInfo: digestInfo,
719
- type: type
720
- };
721
-
722
- /**
723
- * @license
724
- * Copyright (c) Peculiar Ventures, LLC.
725
- *
726
- * This source code is licensed under the MIT license found in the
727
- * LICENSE file in the root directory of this source tree.
728
- */
729
- const MESSAGES_ALL = {
730
- en,
731
- };
732
- class Localization {
733
- constructor() {
734
- this.setLocale = (locale) => {
735
- this.locale = locale && MESSAGES_ALL[locale] ? locale : 'en';
736
- };
737
- this.getLocale = () => this.locale;
738
- const language = window.navigator.language.slice(0, 2).toLowerCase();
739
- this.setLocale(language);
740
- }
741
- getString(id, replacer) {
742
- const value = MESSAGES_ALL[this.locale][id];
743
- if (!value) {
744
- return '';
745
- }
746
- if (!replacer) {
747
- return value;
748
- }
749
- const splitted = value.split(replacer.pattern);
750
- if (splitted.length > 1) {
751
- return [
752
- splitted[0],
753
- replacer.replacer,
754
- splitted[1],
755
- ];
756
- }
757
- return value;
758
- }
759
- }
760
- const l10n = new Localization();
761
-
762
- export { dateShort as a, dateDiff as d, history as h, l10n as l };