@verdocs/web-sdk 1.0.15 → 1.0.19

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 (160) hide show
  1. package/dist/cjs/{Content-986f7a13.js → Content-1d98b2f3.js} +297 -17
  2. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  3. package/dist/cjs/css-shim-88cc6900.js +6 -0
  4. package/dist/cjs/document-status-indicator.cjs.entry.js +1 -1
  5. package/dist/cjs/dom-95afd968.js +75 -0
  6. package/dist/cjs/dropdown-menu.cjs.entry.js +191 -4
  7. package/dist/cjs/index-0b9c3c7d.js +3064 -0
  8. package/dist/cjs/loader.cjs.js +19 -3
  9. package/dist/cjs/org-popup.cjs.entry.js +1 -1
  10. package/dist/cjs/pdf-viewer.cjs.entry.js +87 -6
  11. package/dist/cjs/search-box.cjs.entry.js +19 -7
  12. package/dist/cjs/search-embed.cjs.entry.js +1 -1
  13. package/dist/cjs/search-quick-functions.cjs.entry.js +1 -1
  14. package/dist/cjs/search-recent.cjs.entry.js +2 -2
  15. package/dist/cjs/search-saved.cjs.entry.js +2 -2
  16. package/dist/cjs/search-starred.cjs.entry.js +1 -1
  17. package/dist/cjs/search-tabs.cjs.entry.js +1 -1
  18. package/dist/cjs/shadow-css-71d0f821.js +391 -0
  19. package/dist/cjs/tags-indicator.cjs.entry.js +1 -1
  20. package/dist/cjs/template-card.cjs.entry.js +1 -1
  21. package/dist/cjs/toggle-icon-buttons.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-web-sdk.cjs.js +113 -5
  23. package/dist/collection/collection-manifest.json +2 -2
  24. package/dist/collection/components/elements/search-box/search-box.css +4 -0
  25. package/dist/collection/components/elements/search-box/search-box.js +73 -14
  26. package/dist/collection/components/elements/search-box/search-box.stories.js +3 -1
  27. package/dist/custom-elements/index.js +597 -34
  28. package/dist/docs.json +40 -5
  29. package/dist/esm/{Content-386637c8.js → Content-0d614ff3.js} +297 -17
  30. package/dist/esm/app-globals-0f993ce5.js +3 -0
  31. package/dist/esm/css-shim-c64026cd.js +4 -0
  32. package/dist/esm/document-status-indicator.entry.js +1 -1
  33. package/dist/esm/dom-a712b575.js +73 -0
  34. package/dist/esm/dropdown-menu.entry.js +191 -4
  35. package/dist/esm/index-81ec66c1.js +3027 -0
  36. package/dist/esm/loader.js +19 -3
  37. package/dist/esm/org-popup.entry.js +1 -1
  38. package/dist/esm/pdf-viewer.entry.js +87 -6
  39. package/dist/esm/search-box.entry.js +19 -7
  40. package/dist/esm/search-embed.entry.js +1 -1
  41. package/dist/esm/search-quick-functions.entry.js +1 -1
  42. package/dist/esm/search-recent.entry.js +2 -2
  43. package/dist/esm/search-saved.entry.js +2 -2
  44. package/dist/esm/search-starred.entry.js +1 -1
  45. package/dist/esm/search-tabs.entry.js +1 -1
  46. package/dist/esm/shadow-css-1e16431b.js +389 -0
  47. package/dist/esm/tags-indicator.entry.js +1 -1
  48. package/dist/esm/template-card.entry.js +1 -1
  49. package/dist/esm/toggle-icon-buttons.entry.js +1 -1
  50. package/dist/esm/verdocs-web-sdk.js +113 -5
  51. package/dist/esm-es5/Content-0d614ff3.js +1 -0
  52. package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
  53. package/dist/esm-es5/css-shim-c64026cd.js +1 -0
  54. package/dist/esm-es5/document-status-indicator.entry.js +1 -1
  55. package/dist/esm-es5/dom-a712b575.js +21 -0
  56. package/dist/esm-es5/dropdown-menu.entry.js +1 -1
  57. package/dist/esm-es5/index-81ec66c1.js +1 -0
  58. package/dist/esm-es5/loader.js +1 -1
  59. package/dist/esm-es5/org-popup.entry.js +1 -1
  60. package/dist/esm-es5/pdf-viewer.entry.js +2 -2
  61. package/dist/esm-es5/search-box.entry.js +1 -1
  62. package/dist/esm-es5/search-embed.entry.js +1 -1
  63. package/dist/esm-es5/search-quick-functions.entry.js +1 -1
  64. package/dist/esm-es5/search-recent.entry.js +1 -1
  65. package/dist/esm-es5/search-saved.entry.js +1 -1
  66. package/dist/esm-es5/search-starred.entry.js +1 -1
  67. package/dist/esm-es5/search-tabs.entry.js +1 -1
  68. package/dist/esm-es5/shadow-css-1e16431b.js +12 -0
  69. package/dist/esm-es5/tags-indicator.entry.js +1 -1
  70. package/dist/esm-es5/template-card.entry.js +1 -1
  71. package/dist/esm-es5/toggle-icon-buttons.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  73. package/dist/types/components/elements/search-box/search-box.d.ts +20 -5
  74. package/dist/types/components/elements/search-box/search-box.stories.d.ts +3 -1
  75. package/dist/types/components.d.ts +23 -1
  76. package/dist/verdocs-web-sdk/Content-0d614ff3.js +2175 -0
  77. package/dist/verdocs-web-sdk/Content-42ddf5ec.system.js +1 -0
  78. package/dist/verdocs-web-sdk/app-globals-0f993ce5.js +3 -0
  79. package/dist/verdocs-web-sdk/app-globals-497eb362.system.js +1 -0
  80. package/dist/verdocs-web-sdk/css-shim-0e9af51a.system.js +1 -0
  81. package/dist/verdocs-web-sdk/css-shim-c64026cd.js +4 -0
  82. package/dist/verdocs-web-sdk/document-status-indicator.entry.js +55 -0
  83. package/dist/verdocs-web-sdk/document-status-indicator.system.entry.js +1 -0
  84. package/dist/verdocs-web-sdk/dom-a712b575.js +73 -0
  85. package/dist/verdocs-web-sdk/dom-f6327147.system.js +21 -0
  86. package/dist/verdocs-web-sdk/dropdown-menu.entry.js +1990 -0
  87. package/dist/verdocs-web-sdk/dropdown-menu.system.entry.js +1 -0
  88. package/dist/verdocs-web-sdk/index-46cb292b.system.js +1 -0
  89. package/dist/verdocs-web-sdk/index-81ec66c1.js +3027 -0
  90. package/dist/verdocs-web-sdk/index.esm.js +1 -0
  91. package/dist/verdocs-web-sdk/{p-50ea2036.system.js → index.system.js} +0 -0
  92. package/dist/verdocs-web-sdk/org-popup.entry.js +21 -0
  93. package/dist/verdocs-web-sdk/org-popup.system.entry.js +1 -0
  94. package/dist/verdocs-web-sdk/pdf-viewer.entry.js +13754 -0
  95. package/dist/verdocs-web-sdk/pdf-viewer.system.entry.js +23 -0
  96. package/dist/verdocs-web-sdk/search-box.entry.js +46 -0
  97. package/dist/verdocs-web-sdk/search-box.system.entry.js +1 -0
  98. package/dist/verdocs-web-sdk/search-embed.entry.js +15 -0
  99. package/dist/verdocs-web-sdk/search-embed.system.entry.js +1 -0
  100. package/dist/verdocs-web-sdk/search-quick-functions.entry.js +27 -0
  101. package/dist/verdocs-web-sdk/search-quick-functions.system.entry.js +1 -0
  102. package/dist/verdocs-web-sdk/search-recent.entry.js +35 -0
  103. package/dist/verdocs-web-sdk/search-recent.system.entry.js +1 -0
  104. package/dist/verdocs-web-sdk/search-saved.entry.js +35 -0
  105. package/dist/verdocs-web-sdk/search-saved.system.entry.js +1 -0
  106. package/dist/verdocs-web-sdk/search-starred.entry.js +42 -0
  107. package/dist/verdocs-web-sdk/search-starred.system.entry.js +1 -0
  108. package/dist/verdocs-web-sdk/search-tabs.entry.js +16 -0
  109. package/dist/verdocs-web-sdk/search-tabs.system.entry.js +1 -0
  110. package/dist/verdocs-web-sdk/shadow-css-1e16431b.js +389 -0
  111. package/dist/verdocs-web-sdk/shadow-css-ef154fe4.system.js +13 -0
  112. package/dist/verdocs-web-sdk/tags-indicator.entry.js +16 -0
  113. package/dist/verdocs-web-sdk/tags-indicator.system.entry.js +1 -0
  114. package/dist/verdocs-web-sdk/template-card.entry.js +24 -0
  115. package/dist/verdocs-web-sdk/template-card.system.entry.js +1 -0
  116. package/dist/verdocs-web-sdk/toggle-icon-buttons.entry.js +28 -0
  117. package/dist/verdocs-web-sdk/toggle-icon-buttons.system.entry.js +1 -0
  118. package/dist/verdocs-web-sdk/verdocs-web-sdk.css +12 -1
  119. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +125 -1
  120. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  121. package/dist/verdocs-web-sdk/verdocs-web-sdk.system.js +1 -0
  122. package/package.json +5 -5
  123. package/dist/cjs/index-e2fb537e.js +0 -1631
  124. package/dist/custom-elements.json +0 -266
  125. package/dist/esm/index-183a8995.js +0 -1602
  126. package/dist/esm-es5/Content-386637c8.js +0 -1
  127. package/dist/esm-es5/index-183a8995.js +0 -1
  128. package/dist/verdocs-web-sdk/p-153879ad.entry.js +0 -1
  129. package/dist/verdocs-web-sdk/p-1d1bc463.system.entry.js +0 -1
  130. package/dist/verdocs-web-sdk/p-29cb7cbc.entry.js +0 -1
  131. package/dist/verdocs-web-sdk/p-2cec77cf.entry.js +0 -1
  132. package/dist/verdocs-web-sdk/p-32a5788a.entry.js +0 -1
  133. package/dist/verdocs-web-sdk/p-33f73371.system.js +0 -1
  134. package/dist/verdocs-web-sdk/p-349248f0.system.entry.js +0 -1
  135. package/dist/verdocs-web-sdk/p-36082c90.entry.js +0 -1
  136. package/dist/verdocs-web-sdk/p-3a032151.entry.js +0 -1
  137. package/dist/verdocs-web-sdk/p-3cc8281f.system.entry.js +0 -1
  138. package/dist/verdocs-web-sdk/p-440d8a73.system.entry.js +0 -1
  139. package/dist/verdocs-web-sdk/p-4d4e090f.system.entry.js +0 -1
  140. package/dist/verdocs-web-sdk/p-55660c24.entry.js +0 -1
  141. package/dist/verdocs-web-sdk/p-63107dd5.system.entry.js +0 -1
  142. package/dist/verdocs-web-sdk/p-6b569aa1.system.entry.js +0 -1
  143. package/dist/verdocs-web-sdk/p-6e033b90.system.entry.js +0 -1
  144. package/dist/verdocs-web-sdk/p-6ee008ff.entry.js +0 -1
  145. package/dist/verdocs-web-sdk/p-7ab216be.system.entry.js +0 -1
  146. package/dist/verdocs-web-sdk/p-7d10b067.system.entry.js +0 -23
  147. package/dist/verdocs-web-sdk/p-89be87e5.js +0 -1
  148. package/dist/verdocs-web-sdk/p-92e7863c.system.entry.js +0 -1
  149. package/dist/verdocs-web-sdk/p-99ebfee7.system.entry.js +0 -1
  150. package/dist/verdocs-web-sdk/p-9af63b8a.system.js +0 -1
  151. package/dist/verdocs-web-sdk/p-9da35744.entry.js +0 -1
  152. package/dist/verdocs-web-sdk/p-b3d5601a.entry.js +0 -1
  153. package/dist/verdocs-web-sdk/p-b466e003.entry.js +0 -1
  154. package/dist/verdocs-web-sdk/p-bb99a203.entry.js +0 -1
  155. package/dist/verdocs-web-sdk/p-cbc784a6.system.js +0 -1
  156. package/dist/verdocs-web-sdk/p-cf030985.js +0 -1
  157. package/dist/verdocs-web-sdk/p-d73f486f.entry.js +0 -23
  158. package/dist/verdocs-web-sdk/p-dea09611.entry.js +0 -1
  159. package/dist/verdocs-web-sdk/p-e34538bd.system.entry.js +0 -1
  160. package/dist/verdocs-web-sdk/p-e59eda0c.system.entry.js +0 -1
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ 'use strict';
4
+
3
5
  var bind = function bind(fn, thisArg) {
4
6
  return function wrap() {
5
7
  var args = new Array(arguments.length);
@@ -10,6 +12,10 @@ var bind = function bind(fn, thisArg) {
10
12
  };
11
13
  };
12
14
 
15
+ 'use strict';
16
+
17
+
18
+
13
19
  // utils is a library of generic helper functions non-specific to axios
14
20
 
15
21
  var toString = Object.prototype.toString;
@@ -356,6 +362,10 @@ var utils = {
356
362
  stripBOM: stripBOM
357
363
  };
358
364
 
365
+ 'use strict';
366
+
367
+
368
+
359
369
  function encode(val) {
360
370
  return encodeURIComponent(val).
361
371
  replace(/%3A/gi, ':').
@@ -423,6 +433,10 @@ var buildURL = function buildURL(url, params, paramsSerializer) {
423
433
  return url;
424
434
  };
425
435
 
436
+ 'use strict';
437
+
438
+
439
+
426
440
  function InterceptorManager() {
427
441
  this.handlers = [];
428
442
  }
@@ -474,6 +488,10 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
474
488
 
475
489
  var InterceptorManager_1 = InterceptorManager;
476
490
 
491
+ 'use strict';
492
+
493
+
494
+
477
495
  var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
478
496
  utils.forEach(headers, function processHeader(value, name) {
479
497
  if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
@@ -483,6 +501,8 @@ var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName)
483
501
  });
484
502
  };
485
503
 
504
+ 'use strict';
505
+
486
506
  /**
487
507
  * Update an Error with the specified config, error code, and response.
488
508
  *
@@ -524,6 +544,10 @@ var enhanceError = function enhanceError(error, config, code, request, response)
524
544
  return error;
525
545
  };
526
546
 
547
+ 'use strict';
548
+
549
+
550
+
527
551
  /**
528
552
  * Create an Error with the specified message, config, error code, request and response.
529
553
  *
@@ -539,6 +563,10 @@ var createError = function createError(message, config, code, request, response)
539
563
  return enhanceError(error, config, code, request, response);
540
564
  };
541
565
 
566
+ 'use strict';
567
+
568
+
569
+
542
570
  /**
543
571
  * Resolve or reject a Promise based on response status.
544
572
  *
@@ -561,6 +589,10 @@ var settle = function settle(resolve, reject, response) {
561
589
  }
562
590
  };
563
591
 
592
+ 'use strict';
593
+
594
+
595
+
564
596
  var cookies = (
565
597
  utils.isStandardBrowserEnv() ?
566
598
 
@@ -611,6 +643,8 @@ var cookies = (
611
643
  })()
612
644
  );
613
645
 
646
+ 'use strict';
647
+
614
648
  /**
615
649
  * Determines whether the specified URL is absolute
616
650
  *
@@ -624,6 +658,8 @@ var isAbsoluteURL = function isAbsoluteURL(url) {
624
658
  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
625
659
  };
626
660
 
661
+ 'use strict';
662
+
627
663
  /**
628
664
  * Creates a new URL by combining the specified URLs
629
665
  *
@@ -637,6 +673,11 @@ var combineURLs = function combineURLs(baseURL, relativeURL) {
637
673
  : baseURL;
638
674
  };
639
675
 
676
+ 'use strict';
677
+
678
+
679
+
680
+
640
681
  /**
641
682
  * Creates a new URL by combining the baseURL with the requestedURL,
642
683
  * only when the requestedURL is not already an absolute URL.
@@ -653,6 +694,10 @@ var buildFullPath = function buildFullPath(baseURL, requestedURL) {
653
694
  return requestedURL;
654
695
  };
655
696
 
697
+ 'use strict';
698
+
699
+
700
+
656
701
  // Headers whose duplicates are ignored by node
657
702
  // c.f. https://nodejs.org/api/http.html#http_message_headers
658
703
  var ignoreDuplicateOf = [
@@ -703,6 +748,10 @@ var parseHeaders = function parseHeaders(headers) {
703
748
  return parsed;
704
749
  };
705
750
 
751
+ 'use strict';
752
+
753
+
754
+
706
755
  var isURLSameOrigin = (
707
756
  utils.isStandardBrowserEnv() ?
708
757
 
@@ -768,6 +817,17 @@ var isURLSameOrigin = (
768
817
  })()
769
818
  );
770
819
 
820
+ 'use strict';
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
771
831
  var xhr = function xhrAdapter(config) {
772
832
  return new Promise(function dispatchXhrRequest(resolve, reject) {
773
833
  var requestData = config.data;
@@ -947,6 +1007,12 @@ var xhr = function xhrAdapter(config) {
947
1007
  });
948
1008
  };
949
1009
 
1010
+ 'use strict';
1011
+
1012
+
1013
+
1014
+
1015
+
950
1016
  var DEFAULT_CONTENT_TYPE = {
951
1017
  'Content-Type': 'application/x-www-form-urlencoded'
952
1018
  };
@@ -1076,6 +1142,11 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1076
1142
 
1077
1143
  var defaults_1 = defaults;
1078
1144
 
1145
+ 'use strict';
1146
+
1147
+
1148
+
1149
+
1079
1150
  /**
1080
1151
  * Transform the data for a request or a response
1081
1152
  *
@@ -1094,10 +1165,19 @@ var transformData = function transformData(data, headers, fns) {
1094
1165
  return data;
1095
1166
  };
1096
1167
 
1168
+ 'use strict';
1169
+
1097
1170
  var isCancel = function isCancel(value) {
1098
1171
  return !!(value && value.__CANCEL__);
1099
1172
  };
1100
1173
 
1174
+ 'use strict';
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1101
1181
  /**
1102
1182
  * Throws a `Cancel` if cancellation has been requested.
1103
1183
  */
@@ -1174,6 +1254,10 @@ var dispatchRequest = function dispatchRequest(config) {
1174
1254
  });
1175
1255
  };
1176
1256
 
1257
+ 'use strict';
1258
+
1259
+
1260
+
1177
1261
  /**
1178
1262
  * Config-specific merge-function which creates a new config-object
1179
1263
  * by merging two configuration objects together.
@@ -1403,6 +1487,10 @@ const pkg = {
1403
1487
  version: version
1404
1488
  };
1405
1489
 
1490
+ 'use strict';
1491
+
1492
+
1493
+
1406
1494
  var validators$1 = {};
1407
1495
 
1408
1496
  // eslint-disable-next-line func-names
@@ -1505,6 +1593,15 @@ var validator = {
1505
1593
  validators: validators$1
1506
1594
  };
1507
1595
 
1596
+ 'use strict';
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+
1604
+
1508
1605
  var validators = validator.validators;
1509
1606
  /**
1510
1607
  * Create a new instance of Axios
@@ -1645,6 +1742,8 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1645
1742
 
1646
1743
  var Axios_1 = Axios;
1647
1744
 
1745
+ 'use strict';
1746
+
1648
1747
  /**
1649
1748
  * A `Cancel` is an object that is thrown when an operation is canceled.
1650
1749
  *
@@ -1663,6 +1762,10 @@ Cancel.prototype.__CANCEL__ = true;
1663
1762
 
1664
1763
  var Cancel_1 = Cancel;
1665
1764
 
1765
+ 'use strict';
1766
+
1767
+
1768
+
1666
1769
  /**
1667
1770
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
1668
1771
  *
@@ -1717,6 +1820,8 @@ CancelToken.source = function source() {
1717
1820
 
1718
1821
  var CancelToken_1 = CancelToken;
1719
1822
 
1823
+ 'use strict';
1824
+
1720
1825
  /**
1721
1826
  * Syntactic sugar for invoking a function and expanding an array for arguments.
1722
1827
  *
@@ -1743,6 +1848,8 @@ var spread = function spread(callback) {
1743
1848
  };
1744
1849
  };
1745
1850
 
1851
+ 'use strict';
1852
+
1746
1853
  /**
1747
1854
  * Determines whether the payload is an error thrown by Axios
1748
1855
  *
@@ -1753,6 +1860,14 @@ var isAxiosError = function isAxiosError(payload) {
1753
1860
  return (typeof payload === 'object') && (payload.isAxiosError === true);
1754
1861
  };
1755
1862
 
1863
+ 'use strict';
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1756
1871
  /**
1757
1872
  * Create an instance of Axios
1758
1873
  *
@@ -1805,25 +1920,154 @@ axios_1.default = _default;
1805
1920
 
1806
1921
  var axios = axios_1;
1807
1922
 
1808
- var TRACE_ID = '' + Math.floor(Math.random() * 100000);
1809
- // tslint:disable-next-line
1810
- console.log('[JS-SDK Loaded]', TRACE_ID);
1811
- // console.log('[JS-SDK Loaded]', TRACE_ID, import.meta.url);
1812
- var config = {
1923
+ "use strict";
1924
+ // This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
1925
+ // an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
1926
+ // (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
1927
+ // tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
1928
+ // StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
1929
+ // when those Components load js-sdk they get a separate instance. Without messy options like having to
1930
+ // pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
1931
+ // have no way to access authenticated sessions unless we make the Endpoint a true global.
1932
+ //
1933
+ // @credit https://github.com/medikoo/es5-ext/blob/master/global.js
1934
+ // @credit https://mathiasbynens.be/notes/globalthis
1935
+ var naiveFallback = function () {
1936
+ if (typeof self === 'object' && self)
1937
+ return self;
1938
+ if (typeof window === 'object' && window)
1939
+ return window;
1940
+ throw new Error('Unable to resolve global `this`');
1941
+ };
1942
+ var globalThis_1 = (function () {
1943
+ if (this)
1944
+ return this;
1945
+ // Unexpected strict mode (may happen if e.g. bundled into ESM module)
1946
+ // Fallback to standard globalThis if available
1947
+ if (typeof globalThis === 'object' && globalThis)
1948
+ return globalThis;
1949
+ // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
1950
+ // In all ES5+ engines global object inherits from Object.prototype
1951
+ // (if you approached one that doesn't please report)
1952
+ try {
1953
+ Object.defineProperty(Object.prototype, '__global__', {
1954
+ get: function () {
1955
+ return this;
1956
+ },
1957
+ configurable: true,
1958
+ });
1959
+ }
1960
+ catch (error) {
1961
+ // Unfortunate case of updates to Object.prototype being restricted
1962
+ // via preventExtensions, seal or freeze
1963
+ return naiveFallback();
1964
+ }
1965
+ try {
1966
+ // Safari case (window.__global__ works, but __global__ does not)
1967
+ if (!__global__)
1968
+ return naiveFallback();
1969
+ return __global__;
1970
+ }
1971
+ finally {
1972
+ delete Object.prototype.__global__;
1973
+ }
1974
+ })();
1975
+
1976
+ /**
1977
+ * The Transport Endpoint is a global singleton used to call Verdocs APIs. There can only be one Endpoint per application, and
1978
+ * its configuration settings are shared for all callers.
1979
+ *
1980
+ * @module
1981
+ */
1982
+ var DEFAULTS = {
1813
1983
  baseURL: 'https://api.verdocs.com/',
1814
1984
  timeout: 3000,
1815
1985
  headers: { 'X-Client-ID': 'NONE' },
1816
1986
  };
1817
- var recreateEndpoint = function () {
1818
- endpoint = axios.create(config);
1819
- endpoint.interceptors.request.use(function (r) {
1820
- // tslint:disable-next-line
1821
- console.log("[JS-SDK] " + TRACE_ID + " :: " + r.method.toUpperCase() + " " + r.url, JSON.stringify(r.data), JSON.stringify(r.headers));
1822
- return r;
1823
- });
1987
+ // @credit https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/
1988
+ // Also see globalThis for comments about why we're doing this in the first place.
1989
+ var ENDPOINT_KEY = Symbol.for('verdocs-api-endpoint');
1990
+ if (!globalThis_1[ENDPOINT_KEY]) {
1991
+ globalThis_1[ENDPOINT_KEY] = axios.create(DEFAULTS);
1992
+ }
1993
+ var endpoint = globalThis_1[ENDPOINT_KEY];
1994
+ var requestLogger = function (r) {
1995
+ // tslint:disable-next-line
1996
+ console.log("[JS-SDK] " + r.method.toUpperCase() + " " + r.baseURL + r.url, r.data ? JSON.stringify(r.data) : '');
1997
+ return r;
1998
+ };
1999
+ /**
2000
+ * Set the auth token that will be used for Verdocs API calls.
2001
+ *
2002
+ * ```typescript
2003
+ * import {Transport} from '@verdocs/js-sdk/HTTP';
2004
+ *
2005
+ * Transport.setAuthorization(accessToken);
2006
+ * ```
2007
+ */
2008
+ var setAuthorization = function (accessToken) {
2009
+ if (accessToken) {
2010
+ endpoint.defaults.headers.Authorization = "Bearer " + accessToken;
2011
+ }
2012
+ else {
2013
+ delete endpoint.defaults.headers.Authorization;
2014
+ }
2015
+ };
2016
+ /**
2017
+ * Set the Client ID for Verdocs API calls.
2018
+ *
2019
+ * ```typescript
2020
+ * import {Transport} from '@verdocs/js-sdk/HTTP';
2021
+ *
2022
+ * Transport.setClientID('1234);
2023
+ * ```
2024
+ */
2025
+ var setClientID = function (clientID) {
2026
+ endpoint.defaults.headers['X-Client-ID'] = clientID;
2027
+ };
2028
+ /**
2029
+ * Set the base URL for API calls. This defaults to https://api.verdocs.com/ and should only be changed after consultation with
2030
+ * Verdocs Developer Support (e.g. to access a private API endpoint).
2031
+ *
2032
+ * ```typescript
2033
+ * import {Transport} from '@verdocs/js-sdk/HTTP';
2034
+ *
2035
+ * Transport.setBaseUrl('https://my-private-api.verdocs.com');
2036
+ * ```
2037
+ */
2038
+ var setBaseUrl = function (baseUrl) {
2039
+ endpoint.defaults.baseURL = baseUrl;
2040
+ };
2041
+ /**
2042
+ * Set the timeout for API calls in milliseconds. 2000-4000ms is recommended for most purposes. 3000ms is the default.
2043
+ *
2044
+ * ```typescript
2045
+ * import {Transport} from '@verdocs/js-sdk/HTTP';
2046
+ *
2047
+ * Transport.setTimeout(3000);
2048
+ * ```
2049
+ */
2050
+ var setTimeout$1 = function (timeout) {
2051
+ endpoint.defaults.timeout = timeout;
2052
+ };
2053
+ /**
2054
+ * Enable or disable request logging. This may expose sensitive data in the console log, so it should only be used for debugging.
2055
+ *
2056
+ * ```typescript
2057
+ * import {Transport} from '@verdocs/js-sdk/HTTP';
2058
+ *
2059
+ * Transport.logRequests(true);
2060
+ * ```
2061
+ */
2062
+ var requestLoggerId = null;
2063
+ var logRequests = function (enable) {
2064
+ if (enable && requestLoggerId === null) {
2065
+ requestLoggerId = endpoint.interceptors.request.use(requestLogger);
2066
+ }
2067
+ else if (!enable && requestLoggerId !== null) {
2068
+ endpoint.interceptors.request.eject(requestLoggerId);
2069
+ }
1824
2070
  };
1825
- var endpoint;
1826
- recreateEndpoint();
1827
2071
  /**
1828
2072
  * Helper to get the endpoint for direct access to HTTP functions.
1829
2073
  *
@@ -1834,12 +2078,16 @@ recreateEndpoint();
1834
2078
  * ```
1835
2079
  */
1836
2080
  var getEndpoint = function () {
1837
- if (!endpoint) {
1838
- recreateEndpoint();
1839
- }
1840
2081
  return endpoint;
1841
2082
  };
1842
2083
 
2084
+ /**
2085
+ * Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
2086
+ * to locate items across all content types. More specific retrievals may be performed using the various "list" endpoints within
2087
+ * each collection (e.g. {@link Documents.Documents.searchDocuments} or {@link Templates.Templates.searchTemplates}).
2088
+ *
2089
+ * @module
2090
+ */
1843
2091
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1844
2092
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1845
2093
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1893,5 +2141,37 @@ var getSearchHistory = function () { return __awaiter(void 0, void 0, void 0, fu
1893
2141
  .then(function (r) { return r.data; })];
1894
2142
  });
1895
2143
  }); };
2144
+ /**
2145
+ * Save a search. If a name is re-used, that saved search will be overwritten with the new parameters.
2146
+ *
2147
+ * ```typescript
2148
+ * import {Content} from '@verdocs/js-sdk/Search';
2149
+ *
2150
+ * const entry = await Documents.saveSearch('W9 Forms', {q: 'w9', type: 'template});
2151
+ * ```
2152
+ */
2153
+ var saveSearch = function (name, params) { return __awaiter(void 0, void 0, void 0, function () {
2154
+ return __generator(this, function (_a) {
2155
+ return [2 /*return*/, getEndpoint()
2156
+ .post('/search/saved', { name: name, params: params })
2157
+ .then(function (r) { return r.data; })];
2158
+ });
2159
+ }); };
2160
+ /**
2161
+ * Search for documents matching various criteria.
2162
+ *
2163
+ * ```typescript
2164
+ * import {Content} from '@verdocs/js-sdk/Search';
2165
+ *
2166
+ * const {result, page, total} = await Documents.search({ ... });
2167
+ * ```
2168
+ */
2169
+ var searchContent = function (params) { return __awaiter(void 0, void 0, void 0, function () {
2170
+ return __generator(this, function (_a) {
2171
+ return [2 /*return*/, getEndpoint()
2172
+ .post('/search/content')
2173
+ .then(function (r) { return r.data; })];
2174
+ });
2175
+ }); };
1896
2176
 
1897
2177
  exports.getSearchHistory = getSearchHistory;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ /*
4
+ Stencil Client Patch Esm v2.10.0 | MIT Licensed | https://stenciljs.com
5
+ */
6
+ var __assign=undefined&&undefined.__assign||function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e2fb537e.js');
5
+ const index = require('./index-0b9c3c7d.js');
6
6
 
7
7
  const CancelledIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"/></svg>`;
8
8
 
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ /*
4
+ Stencil Client Patch Browser v2.10.0 | MIT Licensed | https://stenciljs.com
5
+ */
6
+ (function(){
7
+ var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function g(a){var b=aa.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return !b&&a}function l(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return !(!a||!(a.__CE_isImportDocument||a instanceof Document))}
8
+ function n(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
9
+ function p(a,b,d){d=void 0===d?new Set:d;for(var c=a;c;){if(c.nodeType===Node.ELEMENT_NODE){var e=c;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){c=e.import;if(c instanceof Node&&!d.has(c))for(d.add(c),c=c.firstChild;c;c=c.nextSibling)p(c,b,d);c=n(a,e);continue}else if("template"===f){c=n(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)p(e,b,d);}c=c.firstChild?c.firstChild:n(a,c);}}function r(a,b,d){a[b]=d;}function u(){this.a=new Map;this.g=new Map;this.c=[];this.f=[];this.b=!1;}function ba(a,b,d){a.a.set(b,d);a.g.set(d.constructorFunction,d);}function ca(a,b){a.b=!0;a.c.push(b);}function da(a,b){a.b=!0;a.f.push(b);}function v(a,b){a.b&&p(b,function(b){return w(a,b)});}function w(a,b){if(a.b&&!b.__CE_patched){b.__CE_patched=!0;for(var d=0;d<a.c.length;d++)a.c[d](b);for(d=0;d<a.f.length;d++)a.f[d](b);}}
10
+ function x(a,b){var d=[];p(b,function(b){return d.push(b)});for(b=0;b<d.length;b++){var c=d[b];1===c.__CE_state?a.connectedCallback(c):y(a,c);}}function z(a,b){var d=[];p(b,function(b){return d.push(b)});for(b=0;b<d.length;b++){var c=d[b];1===c.__CE_state&&a.disconnectedCallback(c);}}
11
+ function A(a,b,d){d=void 0===d?{}:d;var c=d.u||new Set,e=d.i||function(b){return y(a,b)},f=[];p(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var d=b.import;d instanceof Node&&(d.__CE_isImportDocument=!0,d.__CE_hasRegistry=!0);d&&"complete"===d.readyState?d.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var d=b.import;if(!d.__CE_documentLoadHandled){d.__CE_documentLoadHandled=!0;var f=new Set(c);f.delete(d);A(a,d,{u:f,i:e});}});}else f.push(b);},c);if(a.b)for(b=
12
+ 0;b<f.length;b++)w(a,f[b]);for(b=0;b<f.length;b++)e(f[b]);}
13
+ function y(a,b){if(void 0===b.__CE_state){var d=b.ownerDocument;if(d.defaultView||d.__CE_isImportDocument&&d.__CE_hasRegistry)if(d=a.a.get(b.localName)){d.constructionStack.push(b);var c=d.constructorFunction;try{try{if(new c!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{d.constructionStack.pop();}}catch(t){throw b.__CE_state=2,t;}b.__CE_state=1;b.__CE_definition=d;if(d.attributeChangedCallback)for(d=d.observedAttributes,c=0;c<d.length;c++){var e=
14
+ d[c],f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null);}l(b)&&a.connectedCallback(b);}}}u.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a);};u.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a);};
15
+ u.prototype.attributeChangedCallback=function(a,b,d,c,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,d,c,e);};function B(a){var b=document;this.c=a;this.a=b;this.b=void 0;A(this.c,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}));}function C(a){a.b&&a.b.disconnect();}B.prototype.f=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||C(this);for(b=0;b<a.length;b++)for(var d=a[b].addedNodes,c=0;c<d.length;c++)A(this.c,d[c]);};function ea(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a);});}function D(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0);}function E(a){this.c=!1;this.a=a;this.j=new Map;this.f=function(b){return b()};this.b=!1;this.g=[];this.o=new B(a);}
16
+ E.prototype.l=function(a,b){var d=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!g(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.a.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var c=function(b){var a=e[b];if(void 0!==a&&!(a instanceof Function))throw Error("The '"+b+"' callback must be a function.");
17
+ return a},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=c("connectedCallback");var t=c("disconnectedCallback");var k=c("adoptedCallback");var h=c("attributeChangedCallback");var m=b.observedAttributes||[];}catch(q){return}finally{this.c=!1;}b={localName:a,constructorFunction:b,connectedCallback:f,disconnectedCallback:t,adoptedCallback:k,attributeChangedCallback:h,observedAttributes:m,constructionStack:[]};ba(this.a,
18
+ a,b);this.g.push(b);this.b||(this.b=!0,this.f(function(){return fa(d)}));};E.prototype.i=function(a){A(this.a,a);};
19
+ function fa(a){if(!1!==a.b){a.b=!1;for(var b=a.g,d=[],c=new Map,e=0;e<b.length;e++)c.set(b[e].localName,[]);A(a.a,document,{i:function(b){if(void 0===b.__CE_state){var e=b.localName,f=c.get(e);f?f.push(b):a.a.a.get(e)&&d.push(b);}}});for(e=0;e<d.length;e++)y(a.a,d[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=c.get(f.localName);for(var t=0;t<f.length;t++)y(a.a,f[t]);(e=a.j.get(e))&&D(e);}}}E.prototype.get=function(a){if(a=this.a.a.get(a))return a.constructorFunction};
20
+ E.prototype.m=function(a){if(!g(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.j.get(a);if(b)return b.c;b=new ea;this.j.set(a,b);this.a.a.get(a)&&!this.g.some(function(b){return b.localName===a})&&D(b);return b.c};E.prototype.s=function(a){C(this.o);var b=this.f;this.f=function(d){return a(function(){return b(d)})};};window.CustomElementRegistry=E;E.prototype.define=E.prototype.l;E.prototype.upgrade=E.prototype.i;E.prototype.get=E.prototype.get;
21
+ E.prototype.whenDefined=E.prototype.m;E.prototype.polyfillWrapFlushCallback=E.prototype.s;var F=window.Document.prototype.createElement,G=window.Document.prototype.createElementNS,ha=window.Document.prototype.importNode,ia=window.Document.prototype.prepend,ja=window.Document.prototype.append,ka=window.DocumentFragment.prototype.prepend,la=window.DocumentFragment.prototype.append,H=window.Node.prototype.cloneNode,I=window.Node.prototype.appendChild,J=window.Node.prototype.insertBefore,K=window.Node.prototype.removeChild,L=window.Node.prototype.replaceChild,M=Object.getOwnPropertyDescriptor(window.Node.prototype,
22
+ "textContent"),N=window.Element.prototype.attachShadow,O=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),P=window.Element.prototype.getAttribute,Q=window.Element.prototype.setAttribute,R=window.Element.prototype.removeAttribute,S=window.Element.prototype.getAttributeNS,T=window.Element.prototype.setAttributeNS,U=window.Element.prototype.removeAttributeNS,ma=window.Element.prototype.insertAdjacentElement,na=window.Element.prototype.insertAdjacentHTML,oa=window.Element.prototype.prepend,
23
+ pa=window.Element.prototype.append,V=window.Element.prototype.before,qa=window.Element.prototype.after,ra=window.Element.prototype.replaceWith,sa=window.Element.prototype.remove,ta=window.HTMLElement,W=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),ua=window.HTMLElement.prototype.insertAdjacentElement,va=window.HTMLElement.prototype.insertAdjacentHTML;var wa=new function(){};function xa(){var a=X;window.HTMLElement=function(){function b(){var b=this.constructor,c=a.g.get(b);if(!c)throw Error("The custom element being constructed was not registered with `customElements`.");var e=c.constructionStack;if(0===e.length)return e=F.call(document,c.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=c,w(a,e),e;c=e.length-1;var f=e[c];if(f===wa)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
24
+ e[c]=wa;Object.setPrototypeOf(f,b.prototype);w(a,f);return f}b.prototype=ta.prototype;Object.defineProperty(b.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:b});return b}();}function Y(a,b,d){function c(b){return function(d){for(var e=[],c=0;c<arguments.length;++c)e[c]=arguments[c];c=[];for(var f=[],m=0;m<e.length;m++){var q=e[m];q instanceof Element&&l(q)&&f.push(q);if(q instanceof DocumentFragment)for(q=q.firstChild;q;q=q.nextSibling)c.push(q);else c.push(q);}b.apply(this,e);for(e=0;e<f.length;e++)z(a,f[e]);if(l(this))for(e=0;e<c.length;e++)f=c[e],f instanceof Element&&x(a,f);}}void 0!==d.h&&(b.prepend=c(d.h));void 0!==d.append&&(b.append=c(d.append));}function ya(){var a=X;r(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var d=a.a.get(b);if(d)return new d.constructorFunction}b=F.call(this,b);w(a,b);return b});r(Document.prototype,"importNode",function(b,d){b=ha.call(this,b,!!d);this.__CE_hasRegistry?A(a,b):v(a,b);return b});r(Document.prototype,"createElementNS",function(b,d){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var c=a.a.get(d);if(c)return new c.constructorFunction}b=G.call(this,b,
25
+ d);w(a,b);return b});Y(a,Document.prototype,{h:ia,append:ja});}function za(){function a(a,c){Object.defineProperty(a,"textContent",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){if(this.nodeType===Node.TEXT_NODE)c.set.call(this,a);else {var d=void 0;if(this.firstChild){var e=this.childNodes,k=e.length;if(0<k&&l(this)){d=Array(k);for(var h=0;h<k;h++)d[h]=e[h];}}c.set.call(this,a);if(d)for(a=0;a<d.length;a++)z(b,d[a]);}}});}var b=X;r(Node.prototype,"insertBefore",function(a,c){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);
26
+ a=J.call(this,a,c);if(l(this))for(c=0;c<e.length;c++)x(b,e[c]);return a}e=l(a);c=J.call(this,a,c);e&&z(b,a);l(this)&&x(b,a);return c});r(Node.prototype,"appendChild",function(a){if(a instanceof DocumentFragment){var c=Array.prototype.slice.apply(a.childNodes);a=I.call(this,a);if(l(this))for(var e=0;e<c.length;e++)x(b,c[e]);return a}c=l(a);e=I.call(this,a);c&&z(b,a);l(this)&&x(b,a);return e});r(Node.prototype,"cloneNode",function(a){a=H.call(this,!!a);this.ownerDocument.__CE_hasRegistry?A(b,a):v(b,
27
+ a);return a});r(Node.prototype,"removeChild",function(a){var c=l(a),e=K.call(this,a);c&&z(b,a);return e});r(Node.prototype,"replaceChild",function(a,c){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);a=L.call(this,a,c);if(l(this))for(z(b,c),c=0;c<e.length;c++)x(b,e[c]);return a}e=l(a);var f=L.call(this,a,c),d=l(this);d&&z(b,c);e&&z(b,a);d&&x(b,a);return f});M&&M.get?a(Node.prototype,M):ca(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){for(var a=[],
28
+ b=0;b<this.childNodes.length;b++){var f=this.childNodes[b];f.nodeType!==Node.COMMENT_NODE&&a.push(f.textContent);}return a.join("")},set:function(a){for(;this.firstChild;)K.call(this,this.firstChild);null!=a&&""!==a&&I.call(this,document.createTextNode(a));}});});}function Aa(a){function b(b){return function(e){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];d=[];for(var k=[],h=0;h<c.length;h++){var m=c[h];m instanceof Element&&l(m)&&k.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)d.push(m);else d.push(m);}b.apply(this,c);for(c=0;c<k.length;c++)z(a,k[c]);if(l(this))for(c=0;c<d.length;c++)k=d[c],k instanceof Element&&x(a,k);}}var d=Element.prototype;void 0!==V&&(d.before=b(V));void 0!==V&&(d.after=b(qa));void 0!==ra&&
29
+ r(d,"replaceWith",function(b){for(var e=[],c=0;c<arguments.length;++c)e[c]=arguments[c];c=[];for(var d=[],k=0;k<e.length;k++){var h=e[k];h instanceof Element&&l(h)&&d.push(h);if(h instanceof DocumentFragment)for(h=h.firstChild;h;h=h.nextSibling)c.push(h);else c.push(h);}k=l(this);ra.apply(this,e);for(e=0;e<d.length;e++)z(a,d[e]);if(k)for(z(a,this),e=0;e<c.length;e++)d=c[e],d instanceof Element&&x(a,d);});void 0!==sa&&r(d,"remove",function(){var b=l(this);sa.call(this);b&&z(a,this);});}function Ba(){function a(a,b){Object.defineProperty(a,"innerHTML",{enumerable:b.enumerable,configurable:!0,get:b.get,set:function(a){var e=this,d=void 0;l(this)&&(d=[],p(this,function(a){a!==e&&d.push(a);}));b.set.call(this,a);if(d)for(var f=0;f<d.length;f++){var t=d[f];1===t.__CE_state&&c.disconnectedCallback(t);}this.ownerDocument.__CE_hasRegistry?A(c,this):v(c,this);return a}});}function b(a,b){r(a,"insertAdjacentElement",function(a,e){var d=l(e);a=b.call(this,a,e);d&&z(c,e);l(a)&&x(c,e);return a});}
30
+ function d(a,b){function e(a,b){for(var e=[];a!==b;a=a.nextSibling)e.push(a);for(b=0;b<e.length;b++)A(c,e[b]);}r(a,"insertAdjacentHTML",function(a,c){a=a.toLowerCase();if("beforebegin"===a){var d=this.previousSibling;b.call(this,a,c);e(d||this.parentNode.firstChild,this);}else if("afterbegin"===a)d=this.firstChild,b.call(this,a,c),e(this.firstChild,d);else if("beforeend"===a)d=this.lastChild,b.call(this,a,c),e(d||this.firstChild,null);else if("afterend"===a)d=this.nextSibling,b.call(this,a,c),e(this.nextSibling,
31
+ d);else throw new SyntaxError("The value provided ("+String(a)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");});}var c=X;N&&r(Element.prototype,"attachShadow",function(a){a=N.call(this,a);var b=c;if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var e=0;e<b.c.length;e++)b.c[e](a);}return this.__CE_shadowRoot=a});O&&O.get?a(Element.prototype,O):W&&W.get?a(HTMLElement.prototype,W):da(c,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){return H.call(this,!0).innerHTML},
32
+ set:function(a){var b="template"===this.localName,c=b?this.content:this,e=G.call(document,this.namespaceURI,this.localName);for(e.innerHTML=a;0<c.childNodes.length;)K.call(c,c.childNodes[0]);for(a=b?e.content:e;0<a.childNodes.length;)I.call(c,a.childNodes[0]);}});});r(Element.prototype,"setAttribute",function(a,b){if(1!==this.__CE_state)return Q.call(this,a,b);var e=P.call(this,a);Q.call(this,a,b);b=P.call(this,a);c.attributeChangedCallback(this,a,e,b,null);});r(Element.prototype,"setAttributeNS",function(a,
33
+ b,d){if(1!==this.__CE_state)return T.call(this,a,b,d);var e=S.call(this,a,b);T.call(this,a,b,d);d=S.call(this,a,b);c.attributeChangedCallback(this,b,e,d,a);});r(Element.prototype,"removeAttribute",function(a){if(1!==this.__CE_state)return R.call(this,a);var b=P.call(this,a);R.call(this,a);null!==b&&c.attributeChangedCallback(this,a,b,null,null);});r(Element.prototype,"removeAttributeNS",function(a,b){if(1!==this.__CE_state)return U.call(this,a,b);var d=S.call(this,a,b);U.call(this,a,b);var e=S.call(this,
34
+ a,b);d!==e&&c.attributeChangedCallback(this,b,d,e,a);});ua?b(HTMLElement.prototype,ua):ma?b(Element.prototype,ma):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");va?d(HTMLElement.prototype,va):na?d(Element.prototype,na):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");Y(c,Element.prototype,{h:oa,append:pa});Aa(c);}var Z=window.customElements;if(!Z||Z.forcePolyfill||"function"!=typeof Z.define||"function"!=typeof Z.get){var X=new u;xa();ya();Y(X,DocumentFragment.prototype,{h:ka,append:la});za();Ba();document.__CE_hasRegistry=!0;var customElements=new E(X);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements});}}).call(self);
35
+
36
+ // Polyfill document.baseURI
37
+ "string"!==typeof document.baseURI&&Object.defineProperty(Document.prototype,"baseURI",{enumerable:!0,configurable:!0,get:function(){var a=document.querySelector("base");return a&&a.href?a.href:document.URL}});
38
+
39
+ // Polyfill CustomEvent
40
+ "function"!==typeof window.CustomEvent&&(window.CustomEvent=function(c,a){a=a||{bubbles:!1,cancelable:!1,detail:void 0};var b=document.createEvent("CustomEvent");b.initCustomEvent(c,a.bubbles,a.cancelable,a.detail);return b},window.CustomEvent.prototype=window.Event.prototype);
41
+
42
+ // Event.composedPath
43
+ (function(b,c,d){b.composedPath||(b.composedPath=function(){if(this.path)return this.path;var a=this.target;for(this.path=[];null!==a.parentNode;)this.path.push(a),a=a.parentNode;this.path.push(c,d);return this.path});})(Event.prototype,document,window);
44
+
45
+ /*!
46
+ Element.closest and Element.matches
47
+ https://github.com/jonathantneal/closest
48
+ Creative Commons Zero v1.0 Universal
49
+ */
50
+ (function(a){"function"!==typeof a.matches&&(a.matches=a.msMatchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||function(a){a=(this.document||this.ownerDocument).querySelectorAll(a);for(var b=0;a[b]&&a[b]!==this;)++b;return !!a[b]});"function"!==typeof a.closest&&(a.closest=function(a){for(var b=this;b&&1===b.nodeType;){if(b.matches(a))return b;b=b.parentNode;}return null});})(window.Element.prototype);
51
+
52
+ /*!
53
+ Element.getRootNode()
54
+ */
55
+ (function(c){function d(a){a=b(a);return a&&11===a.nodeType?d(a.host):a}function b(a){return a&&a.parentNode?b(a.parentNode):a}"function"!==typeof c.getRootNode&&(c.getRootNode=function(a){return a&&a.composed?d(this):b(this)});})(Element.prototype);
56
+
57
+ /*!
58
+ Element.isConnected()
59
+ */
60
+ (function(a){"isConnected"in a||Object.defineProperty(a,"isConnected",{configurable:!0,enumerable:!0,get:function(){var a=this.getRootNode({composed:!0});return a&&9===a.nodeType}});})(Element.prototype);
61
+
62
+ /*!
63
+ Element.remove()
64
+ */
65
+ (function(b){b.forEach(function(a){a.hasOwnProperty("remove")||Object.defineProperty(a,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this);}});});})([Element.prototype,CharacterData.prototype,DocumentType.prototype]);
66
+
67
+ /*!
68
+ Element.classList
69
+ */
70
+ !function(e){'classList'in e||Object.defineProperty(e,"classList",{get:function(){var e=this,t=(e.getAttribute("class")||"").replace(/^\s+|\s$/g,"").split(/\s+/g);function n(){t.length>0?e.setAttribute("class",t.join(" ")):e.removeAttribute("class");}return ""===t[0]&&t.splice(0,1),t.toggle=function(e,i){void 0!==i?i?t.add(e):t.remove(e):-1!==t.indexOf(e)?t.splice(t.indexOf(e),1):t.push(e),n();},t.add=function(){for(var e=[].slice.call(arguments),i=0,s=e.length;i<s;i++)-1===t.indexOf(e[i])&&t.push(e[i]);n();},t.remove=function(){for(var e=[].slice.call(arguments),i=0,s=e.length;i<s;i++)-1!==t.indexOf(e[i])&&t.splice(t.indexOf(e[i]),1);n();},t.item=function(e){return t[e]},t.contains=function(e){return -1!==t.indexOf(e)},t.replace=function(e,i){-1!==t.indexOf(e)&&t.splice(t.indexOf(e),1,i),n();},t.value=e.getAttribute("class")||"",t}});}(Element.prototype);
71
+
72
+ /*!
73
+ DOMTokenList
74
+ */
75
+ (function(b){try{document.body.classList.add();}catch(e){var c=b.add,d=b.remove;b.add=function(){for(var a=0;a<arguments.length;a++)c.call(this,arguments[a]);};b.remove=function(){for(var a=0;a<arguments.length;a++)d.call(this,arguments[a]);};}})(DOMTokenList.prototype);