ku4web-components 6.5.6 → 6.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. package/angular/index.js +3 -1
  2. package/angular/index.mjs +1 -1
  3. package/dist/cjs/{index-e69a9e98.js → index-4e2544a7.js} +10 -8
  4. package/dist/cjs/index-ad5278ca.js +10 -0
  5. package/dist/cjs/ku4-carousel-controls.cjs.entry.js +2 -2
  6. package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
  7. package/dist/cjs/ku4-carousel.cjs.entry.js +3 -3
  8. package/dist/cjs/ku4-col.cjs.entry.js +1 -1
  9. package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
  10. package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
  11. package/dist/cjs/ku4-focus-trap.cjs.entry.js +26 -26
  12. package/dist/cjs/ku4-form.cjs.entry.js +3 -3
  13. package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
  14. package/dist/cjs/ku4-label.cjs.entry.js +2 -2
  15. package/dist/cjs/ku4-mask.cjs.entry.js +2 -2
  16. package/dist/cjs/ku4-modal.cjs.entry.js +3 -3
  17. package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
  18. package/dist/cjs/ku4-preview.cjs.entry.js +14 -43
  19. package/dist/cjs/ku4-tab-list.cjs.entry.js +4 -4
  20. package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
  21. package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
  22. package/dist/cjs/ku4-table.cjs.entry.js +1 -1
  23. package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
  24. package/dist/cjs/ku4-validation.cjs.entry.js +2 -2
  25. package/dist/cjs/ku4web-components.cjs.js +7 -102
  26. package/dist/cjs/loader.cjs.js +2 -18
  27. package/dist/cjs/{shadow-css-42acdd0e.js → shadow-css-abc19485.js} +2 -3
  28. package/dist/esm/{index-3a223c58.js → index-e5173978.js} +10 -8
  29. package/dist/esm/index-f06d1dc2.js +3 -0
  30. package/dist/esm/ku4-carousel-controls.entry.js +2 -2
  31. package/dist/esm/ku4-carousel-slide.entry.js +1 -1
  32. package/dist/esm/ku4-carousel.entry.js +3 -3
  33. package/dist/esm/ku4-col.entry.js +1 -1
  34. package/dist/esm/ku4-drawer.entry.js +1 -1
  35. package/dist/esm/ku4-feature.entry.js +2 -2
  36. package/dist/esm/ku4-focus-trap.entry.js +3 -3
  37. package/dist/esm/ku4-form.entry.js +3 -3
  38. package/dist/esm/ku4-grid.entry.js +1 -1
  39. package/dist/esm/ku4-label.entry.js +2 -2
  40. package/dist/esm/ku4-mask.entry.js +2 -2
  41. package/dist/esm/ku4-modal.entry.js +3 -3
  42. package/dist/esm/ku4-panel.entry.js +1 -1
  43. package/dist/esm/ku4-preview.entry.js +5 -34
  44. package/dist/esm/ku4-tab-list.entry.js +4 -4
  45. package/dist/esm/ku4-tab-panel.entry.js +3 -3
  46. package/dist/esm/ku4-tab.entry.js +3 -3
  47. package/dist/esm/ku4-table.entry.js +1 -1
  48. package/dist/esm/ku4-tooltip.entry.js +2 -2
  49. package/dist/esm/ku4-validation.entry.js +2 -2
  50. package/dist/esm/ku4web-components.js +7 -102
  51. package/dist/esm/loader.js +2 -18
  52. package/dist/{ku4web-components/shadow-css-38a1326b.js → esm/shadow-css-02866686.js} +2 -3
  53. package/dist/esm-es5/{index-3a223c58.js → index-e5173978.js} +2 -1
  54. package/dist/esm-es5/index-f06d1dc2.js +1 -0
  55. package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
  56. package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
  57. package/dist/esm-es5/ku4-carousel.entry.js +1 -1
  58. package/dist/esm-es5/ku4-col.entry.js +1 -1
  59. package/dist/esm-es5/ku4-drawer.entry.js +1 -1
  60. package/dist/esm-es5/ku4-feature.entry.js +1 -1
  61. package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
  62. package/dist/esm-es5/ku4-form.entry.js +1 -1
  63. package/dist/esm-es5/ku4-grid.entry.js +1 -1
  64. package/dist/esm-es5/ku4-label.entry.js +1 -1
  65. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  66. package/dist/esm-es5/ku4-modal.entry.js +1 -1
  67. package/dist/esm-es5/ku4-panel.entry.js +1 -1
  68. package/dist/esm-es5/ku4-preview.entry.js +1 -1
  69. package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
  70. package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
  71. package/dist/esm-es5/ku4-tab.entry.js +1 -1
  72. package/dist/esm-es5/ku4-table.entry.js +1 -1
  73. package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
  74. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  75. package/dist/esm-es5/ku4web-components.js +1 -1
  76. package/dist/esm-es5/loader.js +1 -1
  77. package/dist/esm-es5/shadow-css-02866686.js +12 -0
  78. package/dist/index.js +1 -1
  79. package/dist/ku4web-components/index.esm.js +0 -1
  80. package/dist/ku4web-components/ku4web-components.css +1 -299
  81. package/dist/ku4web-components/ku4web-components.esm.js +1 -129
  82. package/dist/ku4web-components/ku4web-components.js +1 -1
  83. package/dist/ku4web-components/{p-96033515.system.entry.js → p-02eef79e.system.entry.js} +1 -1
  84. package/dist/ku4web-components/p-06b0b9bc.js +2 -0
  85. package/dist/ku4web-components/{p-2ee63f57.system.js → p-0b3bdc7f.system.js} +1 -1
  86. package/dist/ku4web-components/{p-b1680ef4.entry.js → p-155f4481.entry.js} +1 -1
  87. package/dist/ku4web-components/{p-c5448cc1.system.entry.js → p-2723d2b6.system.entry.js} +1 -1
  88. package/dist/ku4web-components/{p-e31755cd.system.entry.js → p-2c79be2e.system.entry.js} +1 -1
  89. package/dist/ku4web-components/p-2df8696a.entry.js +1 -0
  90. package/dist/ku4web-components/{p-046b3990.entry.js → p-364b562f.entry.js} +1 -1
  91. package/dist/ku4web-components/{p-bb698020.system.entry.js → p-3ba44adc.system.entry.js} +1 -1
  92. package/dist/ku4web-components/{p-4ecd9b1d.system.entry.js → p-42d52222.system.entry.js} +1 -1
  93. package/dist/ku4web-components/{p-0f1646ca.system.entry.js → p-4733f8b6.system.entry.js} +1 -1
  94. package/dist/ku4web-components/{p-8173d389.system.entry.js → p-48b0bb76.system.entry.js} +1 -1
  95. package/dist/ku4web-components/p-5109ce9d.system.js +1 -0
  96. package/dist/ku4web-components/{p-ae7ce1fe.system.entry.js → p-55a4a947.system.entry.js} +1 -1
  97. package/dist/ku4web-components/{p-d0f3bec4.js → p-5a51f33e.js} +1 -1
  98. package/dist/ku4web-components/{p-e11fbd79.entry.js → p-5c296352.entry.js} +1 -1
  99. package/dist/ku4web-components/{p-3deab7f6.system.entry.js → p-5e666fe4.system.entry.js} +1 -1
  100. package/dist/ku4web-components/{p-bb5410b5.entry.js → p-6028fc6f.entry.js} +1 -1
  101. package/dist/ku4web-components/{p-72be654e.system.entry.js → p-65643a0b.system.entry.js} +1 -1
  102. package/dist/ku4web-components/{p-4da33ea7.entry.js → p-67a2204b.entry.js} +1 -1
  103. package/dist/ku4web-components/{p-7b6ca6a8.entry.js → p-6ab4928a.entry.js} +1 -1
  104. package/dist/ku4web-components/{p-cfd1b93c.entry.js → p-6e918f89.entry.js} +1 -1
  105. package/dist/ku4web-components/{p-1e19bc01.system.entry.js → p-71cbf981.system.entry.js} +1 -1
  106. package/dist/ku4web-components/{p-7b93a362.system.entry.js → p-7260c454.system.entry.js} +1 -1
  107. package/dist/ku4web-components/{p-5e628256.entry.js → p-731cff07.entry.js} +1 -1
  108. package/dist/ku4web-components/{p-fd3d3f56.system.js → p-8f2e658a.system.js} +2 -1
  109. package/dist/ku4web-components/{p-9e2f37cc.entry.js → p-939f438f.entry.js} +1 -1
  110. package/dist/ku4web-components/{p-6509d3e7.system.entry.js → p-9a6aa058.system.entry.js} +1 -1
  111. package/dist/ku4web-components/{p-da8a8b83.entry.js → p-9db782b0.entry.js} +1 -1
  112. package/dist/ku4web-components/{p-0b777b57.entry.js → p-9ebb7181.entry.js} +1 -1
  113. package/dist/ku4web-components/{p-d42bd64d.entry.js → p-9fcb26bb.entry.js} +1 -1
  114. package/dist/ku4web-components/{p-27647af0.system.entry.js → p-a3b9acd3.system.entry.js} +1 -1
  115. package/dist/ku4web-components/{p-de3b2ba1.entry.js → p-a45df4c1.entry.js} +1 -1
  116. package/dist/ku4web-components/{p-17c2a7ac.system.entry.js → p-b2512286.system.entry.js} +1 -1
  117. package/dist/ku4web-components/{p-ea1961f5.entry.js → p-b334f07e.entry.js} +1 -1
  118. package/dist/ku4web-components/{p-a13796dc.system.entry.js → p-bc388bcc.system.entry.js} +1 -1
  119. package/dist/ku4web-components/p-c00ad706.system.js +13 -0
  120. package/dist/ku4web-components/{p-6515c623.system.entry.js → p-c0dce18b.system.entry.js} +1 -1
  121. package/dist/ku4web-components/{p-1abe6f26.entry.js → p-c46a6ff5.entry.js} +1 -1
  122. package/dist/ku4web-components/p-ccf9d584.js +1 -0
  123. package/dist/ku4web-components/{p-9778d082.system.entry.js → p-e4693cda.system.entry.js} +1 -1
  124. package/dist/ku4web-components/{p-d4877fdf.entry.js → p-e5170dc1.entry.js} +1 -1
  125. package/dist/ku4web-components/{p-0a68e802.entry.js → p-e65f0ac5.entry.js} +1 -1
  126. package/dist/ku4web-components/{p-1a09ae2c.entry.js → p-ea1b0df6.entry.js} +1 -1
  127. package/dist/ku4web-components/{p-5e8921ef.system.entry.js → p-f0dbdb77.system.entry.js} +1 -1
  128. package/dist/ku4web-components/{p-9b01a63a.entry.js → p-f76dfee1.entry.js} +1 -1
  129. package/dist/ku4web-components/{p-a7ab7c23.system.entry.js → p-faa0713d.system.entry.js} +1 -1
  130. package/dist/types/components.d.ts +27 -7
  131. package/package.json +37 -30
  132. package/react/index.js +3 -1
  133. package/react/index.mjs +1 -1
  134. package/vue/index.js +3 -1
  135. package/vue/index.mjs +1 -1
  136. package/vue3/index.js +3 -1
  137. package/vue3/index.mjs +1 -1
  138. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  139. package/dist/cjs/css-shim-f1391d35.js +0 -6
  140. package/dist/cjs/dom-5345ed9a.js +0 -75
  141. package/dist/cjs/index-065185f8.js +0 -3093
  142. package/dist/cjs/index-16f16ed9.js +0 -14
  143. package/dist/cjs/index-436596bf.js +0 -10
  144. package/dist/cjs/index-49d3746b.js +0 -10
  145. package/dist/cjs/uid-a1348ea5.js +0 -11
  146. package/dist/collection/capabilities/a11y/aria.js +0 -26
  147. package/dist/collection/capabilities/angular/index.js +0 -24
  148. package/dist/collection/capabilities/decorators/deprecated.js +0 -20
  149. package/dist/collection/capabilities/decorators/index.js +0 -3
  150. package/dist/collection/capabilities/decorators/memoize.js +0 -7
  151. package/dist/collection/capabilities/dom/isFocusable.js +0 -7
  152. package/dist/collection/capabilities/dom/queryFocusable.js +0 -2
  153. package/dist/collection/capabilities/identity/uid.js +0 -6
  154. package/dist/collection/capabilities/mask/index.js +0 -5
  155. package/dist/collection/capabilities/mask/patterns/date.js +0 -40
  156. package/dist/collection/capabilities/mask/patterns/index.js +0 -7
  157. package/dist/collection/capabilities/react/index.js +0 -25
  158. package/dist/collection/capabilities/testing/html.js +0 -14
  159. package/dist/collection/capabilities/testing/styles.js +0 -14
  160. package/dist/collection/capabilities/vue/index.js +0 -28
  161. package/dist/collection/capabilities/vue3/index.js +0 -26
  162. package/dist/collection/collection-manifest.json +0 -31
  163. package/dist/collection/components/ku4-carousel/ku4-carousel.css +0 -221
  164. package/dist/collection/components/ku4-carousel/ku4-carousel.js +0 -369
  165. package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.css +0 -32
  166. package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.js +0 -112
  167. package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.css +0 -3
  168. package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.js +0 -159
  169. package/dist/collection/components/ku4-col/ku4-col.css +0 -601
  170. package/dist/collection/components/ku4-col/ku4-col.js +0 -288
  171. package/dist/collection/components/ku4-drawer/ku4-drawer.css +0 -56
  172. package/dist/collection/components/ku4-drawer/ku4-drawer.js +0 -163
  173. package/dist/collection/components/ku4-feature/ku4-feature.js +0 -70
  174. package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.css +0 -3
  175. package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.js +0 -441
  176. package/dist/collection/components/ku4-form/ku4-form.js +0 -265
  177. package/dist/collection/components/ku4-grid/ku4-grid.css +0 -751
  178. package/dist/collection/components/ku4-grid/ku4-grid.js +0 -408
  179. package/dist/collection/components/ku4-label/ku4-label.css +0 -36
  180. package/dist/collection/components/ku4-label/ku4-label.js +0 -115
  181. package/dist/collection/components/ku4-mask/ku4-mask.css +0 -3
  182. package/dist/collection/components/ku4-mask/ku4-mask.js +0 -459
  183. package/dist/collection/components/ku4-modal/ku4-modal.css +0 -85
  184. package/dist/collection/components/ku4-modal/ku4-modal.js +0 -231
  185. package/dist/collection/components/ku4-panel/ku4-panel.css +0 -14
  186. package/dist/collection/components/ku4-panel/ku4-panel.js +0 -119
  187. package/dist/collection/components/ku4-preview/ku4-preview.css +0 -23
  188. package/dist/collection/components/ku4-preview/ku4-preview.js +0 -266
  189. package/dist/collection/components/ku4-tab/ku4-tab.css +0 -82
  190. package/dist/collection/components/ku4-tab/ku4-tab.js +0 -191
  191. package/dist/collection/components/ku4-tab-list/ku4-tab-list.css +0 -6
  192. package/dist/collection/components/ku4-tab-list/ku4-tab-list.js +0 -118
  193. package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.css +0 -26
  194. package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.js +0 -166
  195. package/dist/collection/components/ku4-table/ku4-table.css +0 -116
  196. package/dist/collection/components/ku4-table/ku4-table.js +0 -120
  197. package/dist/collection/components/ku4-tooltip/ku4-tooltip.css +0 -56
  198. package/dist/collection/components/ku4-tooltip/ku4-tooltip.js +0 -274
  199. package/dist/collection/components/ku4-validation/ku4-validation.css +0 -19
  200. package/dist/collection/components/ku4-validation/ku4-validation.js +0 -364
  201. package/dist/collection/components/ku4-validation/validate.js +0 -14
  202. package/dist/collection/index.js +0 -1
  203. package/dist/collection/security.js +0 -27
  204. package/dist/esm/app-globals-0f993ce5.js +0 -3
  205. package/dist/esm/css-shim-10e6e2ae.js +0 -4
  206. package/dist/esm/dom-7cd9cf71.js +0 -73
  207. package/dist/esm/index-5448a818.js +0 -3
  208. package/dist/esm/index-6cfd87e4.js +0 -3
  209. package/dist/esm/index-a02dcfc8.js +0 -3057
  210. package/dist/esm/index-aa119486.js +0 -3
  211. package/dist/esm/shadow-css-38a1326b.js +0 -388
  212. package/dist/esm/uid-3716c2c4.js +0 -9
  213. package/dist/esm-es5/index-5448a818.js +0 -1
  214. package/dist/esm-es5/shadow-css-38a1326b.js +0 -12
  215. package/dist/ku4web-components/app-globals-0f993ce5.js +0 -3
  216. package/dist/ku4web-components/app-globals-497eb362.system.js +0 -1
  217. package/dist/ku4web-components/css-shim-10e6e2ae.js +0 -4
  218. package/dist/ku4web-components/css-shim-c8dd4551.system.js +0 -1
  219. package/dist/ku4web-components/dom-67d1e45e.system.js +0 -21
  220. package/dist/ku4web-components/dom-7cd9cf71.js +0 -73
  221. package/dist/ku4web-components/index-1c93827a.system.js +0 -1
  222. package/dist/ku4web-components/index-29f2b09f.system.js +0 -1
  223. package/dist/ku4web-components/index-5d0cb00d.system.js +0 -1
  224. package/dist/ku4web-components/index-6cfd87e4.js +0 -3
  225. package/dist/ku4web-components/index-a02dcfc8.js +0 -3057
  226. package/dist/ku4web-components/index-aa119486.js +0 -3
  227. package/dist/ku4web-components/index.system.js +0 -1
  228. package/dist/ku4web-components/ku4-carousel-controls.entry.js +0 -89
  229. package/dist/ku4web-components/ku4-carousel-controls.system.entry.js +0 -1
  230. package/dist/ku4web-components/ku4-carousel-slide.entry.js +0 -47
  231. package/dist/ku4web-components/ku4-carousel-slide.system.entry.js +0 -1
  232. package/dist/ku4web-components/ku4-carousel.entry.js +0 -175
  233. package/dist/ku4web-components/ku4-carousel.system.entry.js +0 -1
  234. package/dist/ku4web-components/ku4-col.entry.js +0 -75
  235. package/dist/ku4web-components/ku4-col.system.entry.js +0 -1
  236. package/dist/ku4web-components/ku4-drawer.entry.js +0 -35
  237. package/dist/ku4web-components/ku4-drawer.system.entry.js +0 -1
  238. package/dist/ku4web-components/ku4-feature.entry.js +0 -29
  239. package/dist/ku4web-components/ku4-feature.system.entry.js +0 -1
  240. package/dist/ku4web-components/ku4-focus-trap.entry.js +0 -323
  241. package/dist/ku4web-components/ku4-focus-trap.system.entry.js +0 -1
  242. package/dist/ku4web-components/ku4-form.entry.js +0 -120
  243. package/dist/ku4web-components/ku4-form.system.entry.js +0 -1
  244. package/dist/ku4web-components/ku4-grid.entry.js +0 -108
  245. package/dist/ku4web-components/ku4-grid.system.entry.js +0 -1
  246. package/dist/ku4web-components/ku4-label.entry.js +0 -70
  247. package/dist/ku4web-components/ku4-label.system.entry.js +0 -1
  248. package/dist/ku4web-components/ku4-mask.entry.js +0 -343
  249. package/dist/ku4web-components/ku4-mask.system.entry.js +0 -1
  250. package/dist/ku4web-components/ku4-modal.entry.js +0 -80
  251. package/dist/ku4web-components/ku4-modal.system.entry.js +0 -1
  252. package/dist/ku4web-components/ku4-panel.entry.js +0 -49
  253. package/dist/ku4web-components/ku4-panel.system.entry.js +0 -1
  254. package/dist/ku4web-components/ku4-preview.entry.js +0 -128
  255. package/dist/ku4web-components/ku4-preview.system.entry.js +0 -1
  256. package/dist/ku4web-components/ku4-tab-list.entry.js +0 -76
  257. package/dist/ku4web-components/ku4-tab-list.system.entry.js +0 -1
  258. package/dist/ku4web-components/ku4-tab-panel.entry.js +0 -72
  259. package/dist/ku4web-components/ku4-tab-panel.system.entry.js +0 -1
  260. package/dist/ku4web-components/ku4-tab.entry.js +0 -63
  261. package/dist/ku4web-components/ku4-tab.system.entry.js +0 -1
  262. package/dist/ku4web-components/ku4-table.entry.js +0 -79
  263. package/dist/ku4web-components/ku4-table.system.entry.js +0 -1
  264. package/dist/ku4web-components/ku4-tooltip.entry.js +0 -120
  265. package/dist/ku4web-components/ku4-tooltip.system.entry.js +0 -1
  266. package/dist/ku4web-components/ku4-validation.entry.js +0 -162
  267. package/dist/ku4web-components/ku4-validation.system.entry.js +0 -1
  268. package/dist/ku4web-components/ku4web-components.system.js +0 -1
  269. package/dist/ku4web-components/p-016a7b4e.js +0 -1
  270. package/dist/ku4web-components/p-0de744b1.system.js +0 -1
  271. package/dist/ku4web-components/p-791e2dfc.js +0 -1
  272. package/dist/ku4web-components/p-ac7884f3.entry.js +0 -1
  273. package/dist/ku4web-components/p-e7cd2284.system.js +0 -13
  274. package/dist/ku4web-components/shadow-css-7fde17ac.system.js +0 -13
  275. package/dist/ku4web-components/uid-2ed9f227.system.js +0 -1
  276. package/dist/ku4web-components/uid-3716c2c4.js +0 -9
@@ -1,3 +0,0 @@
1
- class t{static isNull(e){return null===e}static isEmpty(e){return t.isString(e)&&""===e||t.isArray(e)&&e.length<1||t.isObjectLiteral(e)&&Object.keys(e).length<1}static isUndefined(e){return void 0===e}static isZero(e){return 0===e}static exists(e){return !(t.isUndefined(e)||t.isNull(e))}static isNullOrEmpty(e){return !t.exists(e)||t.isEmpty(e)}static isArray(e){return Array.isArray(e)}static isBool(e){return "boolean"==typeof e}static isTrue(e){return t.isBool(e)&&!0===e}static isFalse(e){return t.isBool(e)&&!1===e}static isDate(e){return e instanceof Date}static isNumber(e){return ("number"==typeof e||e instanceof Number)&&!isNaN(e)}static isEven(e){return this.isNumber(e)&&!this.isZero(e)&&e%2==0}static isOdd(e){return this.isNumber(e)&&!this.isZero(e)&&!this.isEven(e)}static isString(e){return "string"==typeof e||e instanceof String}static isFunction(e){return e instanceof Function}static isAsyncFunction(e){try{return "AsyncFunction"===Object.getPrototypeOf(e).constructor.name||t.isFunction(e)&&/^async/.test(e.toString())||t.isFunction(e().then)}catch(e){return !1}}static isPromise(e){return e instanceof Promise}static isObject(e){return t.exists(e)&&"object"==typeof e&&!(t.isBool(e)||t.isNumber(e)||t.isDate(e)||t.isArray(e)||t.isString(e)||t.isFunction(e))}static isObjectLiteral(e){return t.isObject(e)&&e.constructor==={}.constructor}static isTruthy(e){return !t.isFalsy(e)}static isFalsy(e){return t.isZero(e)||t.isFalse(e)||t.isNullOrEmpty(e)||isNaN(e)}}function e(...e){return "".concat(...e)}function r(e,...t){return t.reduce(((e,t,r)=>e.replace(new RegExp(`\\{${r}\\}`,"g"),t&&t.toString?t.toString():t)),e)}function i(e){return s(n(e))}function s(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/^[\s\n]*/,""):e}function n(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/[\s\n]*$/,""):e}var a=Object.freeze({__proto__:null,build:e,chunk:function(e,r=0){if(!t.isString(e)||Number.isNaN(r)||r<0)return [];if(r<e.length){let t=0;const n=r||e.length,s=[];for(;t<e.length;)s.push(e.slice(t,t+n)),t+=n;return s}return [e]},format:r,trim:i,trimStart:s,trimEnd:n,capitalize:function(e=""){return (e||"").charAt(0).toUpperCase()+(e||"").slice(1).toLowerCase()},mask:function(e,r,n="_"){return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((e,t)=>e.replace(new RegExp(n),t)),r)},unmask:function(e,r,n="_"){const s=new RegExp(n);return t.isFunction(r)?r(e):t.isString(r)&&e.length===r.length&&r.split("").every(((t,r)=>s.test(t)||t===e.charAt(r)))?e.split("").reduce(((e,t,n)=>s.test(t)||!s.test(r.charAt(n))&&r.charAt(n)===t?e:e+t),""):e}});function h(e,t){try{return e()}catch{return t}}let l;h.async=async(e,t)=>{try{return await e()}catch{return t}};class d{constructor(e,t,r){if(t<1||t>12)throw new Error("Invalid month at Assert.DayPoint");if(r<1||r>y(t,e))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(e,t-1,r):new Date,this._day=this._value.getDay(),this._date=r,this._month=t,this._year=e;}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const e=this._year.toString();return parseInt(e.substr(e.length-2))}get isWeekday(){const e=this._day;return e>0&&e<6}get isWeekend(){return !this.isWeekday}get isLeapYear(){return f(this._year)}get nextDay(){return p(this,1,0,0)}get prevDay(){return p(this,-1,0,0)}get nextMonth(){return p(this,0,1,0)}get prevMonth(){return p(this,0,-1,0)}get nextYear(){return p(this,0,0,1)}get prevYear(){return p(this,0,0,-1)}get firstDayOfMonth(){return new d(this._year,this._month,1)}get lastDayOfMonth(){return new d(this._year,this._month,y(this._month,this._year))}add(e,t,r){function n(e,t,r){let n=e,s=t;for(;s--;)n=n[r];return n}const{abs:s}=Math,o=s(e),i=s(r),a=s(t),c=r<0?"prevDay":"nextDay",u=t<0?"prevMonth":"nextMonth";return n(n(n(this,o,e<0?"prevYear":"nextYear"),a,u),i,c)}isBefore(e){return !(this.isAfter(e)||this.equals(e))}isAfter(e){const t=this._year,r=e.year,n=this._month,s=e.month;return t>r||t===r&&n>s||t===r&&n===s&&this._date>e.date}equals(e){return this._year===e.year&&this._month===e.month&&this._date===e.date}toString(e="mm/dd/yyyy"){const t=/y{3,}/i.test(e)?this._year:this.shortYear,n=this._month,s=this._date,o=/m{2}/i.test(e)&&n<10?"0{1}":"{1}",i=/d{2}/i.test(e)&&s<10?"0{2}":"{2}";return r(e.replace(/y+/gi,"{0}").replace(/m+/gi,o).replace(/d+/gi,i),t,n,s)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(e){return t.isString(e)||t.isNumber(e)||t.isDate(e)?!isNaN(new Date(e).valueOf()):e instanceof d}static parse(e){if(e instanceof d)return e;let n=t.isString(e)?i(e).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):e;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(n)){const e=n.split("-"),[t]=e;e.push(t),e.shift(),n=e.join("/");}const s=new Date(n);if(!t.exists(n)||Number.isNaN(s.valueOf()))throw new Error(r("Cannot parse value= {0}",n));return new d(s.getFullYear(),s.getMonth()+1,s.getDate())}static tryParse(e){return h((()=>d.parse(e)),null)}static assumeNow(e){l=d.parse(e);}static get today(){return l||d.parse(new Date)}}function y(e,r){return 2===e?f(r)?29:28:e<8&&t.isEven(e)||e>7&&t.isOdd(e)?30:31}function f(t){const r=t.toString().split(/\B/);return parseFloat(e(r[r.length-2],r[r.length-1]))%4==0}function p(e,t,r,n){const s=e.month,o=e.year,i=e.date,a=r,c=n;let u=i+t,l=s+a,h=o+c;if(i+t>y(s,o)&&(u=1,l=s+a+1),i+t<1){const t=e.prevMonth;u=y(t.month,t.year),l=s+a-1;}return l>12&&(l=1,h=o+c+1),l<1&&(l=12,h=o+c-1),new d(h,l,u)}function m(e,t=0){const r=Math.pow(10,-t);return Math.round(parseFloat((e*r).toFixed(Math.abs(t))))/r}function g(e,t=0){return m(e+5*Math.pow(10,t-1),t)}function _(e,t=0){return 0===e?0:m(e-5*Math.pow(10,t-1),t)}function w(e,t=0){return e<0?g(e,t):_(e,t)}function x(e){const t=(e,r=0,n=1)=>0<e?t(--e,n,r+n):r;return t(e)}function v(e){let t=0,r=1,n=0;for(;e>1;)n=t,t=r,r+=n,e--;return e<1?t:r}function b(e,t=0){const r=parseInt(e);return Number.isNaN(r)?t:r}var N=Object.freeze({__proto__:null,random:function(e=0,t=1){return Math.random()*(t-e)+e},round:m,roundUp:g,roundDown:_,roundTowardZero:w,gcd:function e(t,r){return 0===r?Math.abs(t):e(r,t%r)},fib:x,fib2:v,fibArray:function(e){return Array(e).fill(0).map((()=>x(--e))).reverse()},fib2Array:function(e){return Array(e).fill(0).map((()=>v(--e))).reverse()},tryParseInt:b,tryParseFloat:function(e,t=0){const r=parseFloat(e);return Number.isNaN(r)?t:r}});class ${constructor(e=0,r=0){if(!t.isNumber(e)||!t.isNumber(r))throw new Error("Coord requires numeric x and y values");this._x=e,this._y=r;}get x(){return this._x}get y(){return this._y}get value(){return {x:this.x,y:this.y}}get half(){return this.divide(new $(2,2))}get abs(){return new $(Math.abs(this.x),Math.abs(this.y))}equals(e){return this.x===e.x&&this.y===e.y}add(e){return new $(this.x+e.x,this.y+e.y)}subtract(e){return new $(this.x-e.x,this.y-e.y)}multiply(e){return new $(this.x*e.x,this.y*e.y)}divide(e){return new $(this.x/e.x,this.y/e.y)}round(e=0){return new $(m(this.x,e),m(this.y,e))}toString(){return `(${this.x},${this.y})`}static canParse(e){return t.isArray(e)?!(Number.isNaN(e[0])||Number.isNaN(e[1])):t.isObjectLiteral(e)&&"x"in e&&"y"in e?!(Number.isNaN(e.x)||Number.isNaN(e.y)):e instanceof $}static parse(e){return t.exists(e)?e instanceof $?e:t.isArray(e)?new $(e[0],e[1]):t.isObjectLiteral(e)&&t.exists(e.x)&&t.exists(e.y)?new $(e.x,e.y):null:null}static tryParse(e){return h((()=>$.parse(e)),null)}}class F extends ${constructor(e=0,t=0){super(e,t),this._lengthSquared=Math.pow(e,2)+Math.pow(t,2),this._magnitude=Math.sqrt(this._lengthSquared),this._unitNormalX=0===e&&0===t?0:e/this._magnitude,this._unitNormalY=0===e&&0===t?0:t/this._magnitude;}get magnitude(){return this._magnitude}get isZero(){return 0===this.x&&0===this.y}get normal(){return new F(this._unitNormalX,this._unitNormalY)}get invert(){return new F(-this.x,-this.y)}get norm(){return new F(Math.abs(this.x),Math.abs(this.y))}get perpendicular(){return new F(-this.y,this.x)}equals(e){return e instanceof F&&this.x===e.x&&this.y===e.y}add(e){return e instanceof F?new F(this.x+e.x,this.y+e.y):null}dot(e){return e instanceof F?this.x*e.x+this.y*e.y:null}perpendicularAtTo(e){if(!(e instanceof F))return null;const t=e.add(this.projectionOfOnto(e).invert);return new F(t.x,t.y)}projectionOfOnto(e){if(!(e instanceof F))return null;const t=e.normal.scale(this.dot(e.normal));return new F(t.x,t.y)}scale(e){return new F(this.x*e,this.y*e)}unitNormalDot(e){return e instanceof F?this.normal.x*e.normal.x+this.normal.y*e.normal.y:null}reflect(e){if(!(e instanceof F))return null;if(e.isZero)return this;const t=e.normal;return this.add(t.scale(2*t.dot(this)).invert)}round(e=0){return new F(m(this.x,e),m(this.y,e))}}class O extends ${constructor(e,t){super(e,t);}isAbove(e){return this.y<e.y}isBelow(e){return this.y>e.y}isLeftOf(e){return this.x<e.x}isRightOf(e){return this.x>e.x}distanceFrom(e){return new F(this.x-e.x,this.y-e.y)}distanceTo(e){return this.distanceFrom(e).invert}static canParse(e){return e instanceof O||$.canParse(e)}static parse(e){if(e instanceof O)return e;const t=$.parse(e);return new O(t.x,t.y)}static tryParse(e){return h((()=>O.parse(e)),null)}}function k(e){const t=isNaN(parseInt(e))||e<0||e>24?24:e,r=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return r.concat(n).substring(0,t)}function Z(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}var R=Object.freeze({__proto__:null,uid:k,uuid:Z,suid:function(){return Symbol(k())},suuid:function(){return Symbol(Z())}});Object.freeze({__proto__:null,pattern:e=>e.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class Cookie{static serialize(e,r=defaultParams){try{if(t.isUndefined(e))throw new Error;const{name:n,expires:s,path:o,domain:i,secure:a}=Object.assign(defaultParams,r),c=kvPair(n,e),u=d.canParse(s)?kvPair("; expires",d.parse(s).toDate().toGMTString()):"",l=o?kvPair("; path",o.split("/").map((e=>encodeURIComponent(e))).join("/")):"",h=i?kvPair("; domain",encodeURIComponent(i)):"";return c+u+l+h+(a?"; secure":"")}catch(t){throw new Error(a.format("Cannot serialize {0}",e))}}static deserialize(e){try{return read$1(e)[1]}catch(t){throw new Error(a.format("Cannot deserialize {0}",e))}}static read(e){try{const[t,r]=read$1(e);return {name:t,value:r}}catch(t){throw new Error(a.format("Cannot read {0}",e))}}}const defaultParams={name:R.uid(),expires:d.today.nextYear.toDate(),path:"/",domain:null,secure:!1},kvPair=(e,t)=>`${e}=${t}`,read$1=e=>/;/.test(e)?e.substring(0,e.search(";")).split("="):e.split("=");class Device{static get orientation(){const{screen:e}=window,t=(e.orientation||{}).type||e.mozOrientation||e.msOrientation,r=window.orientation;return t===Device.landscapePrimary||90===r?Device.landscapePrimary:t===Device.landscapeSecondary||-90===r?Device.landscapeSecondary:t===Device.portraitPrimary||0===r?Device.portraitPrimary:t===Device.portraitSecondary||180===r?Device.portraitSecondary:void 0}static get landscapePrimary(){return "landscape-primary"}static get landscapeSecondary(){return "landscape-secondary"}static get portraitPrimary(){return "portrait-primary"}static get portraitSecondary(){return "portrait-secondary"}static get isMobile(){return /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(window.navigator.userAgent)}}const onPreventScroll=new Set,onResumeScroll=new Set;let scroll,lastPageYOffset,lastPageXOffset,scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1;class Document{static get scrollbarWidth(){return window.innerWidth-document.documentElement.clientWidth}static get isScrollPrevented(){return t.exists(Document.scrollY)}static preventScroll(){try{onPreventScroll.forEach((e=>e()));}catch(e){}Document.position=document.body.style.position,Document.offsetY=document.body.style.top,Document.offsetX=document.body.style.left,Document.width=document.body.style.width,Document.height=document.body.style.height,Document.documentWidth=document.documentElement.style.width,Document.documentWidth=document.documentElement.style.width,Document.documentHeight=document.documentElement.style.height,Document.overflowY=document.documentElement.style.overflowY,Document.scrollX=window.scrollX||window.pageXOffset,Document.scrollY=window.scrollY||window.pageYOffset;const{scrollbarWidth:e}=Document;document.body.style.position="fixed",document.body.style.left=`-${Document.scrollX}px`,document.body.style.top=`calc(-${Document.scrollY}px - ${window.getComputedStyle(document.body)["padding-top"]} - ${window.getComputedStyle(document.body)["margin-top"]})`,document.body.style.width=`calc(100vw - ${e}px - ${window.getComputedStyle(document.body)["padding-left"]} - ${window.getComputedStyle(document.body)["padding-right"]} - ${window.getComputedStyle(document.body)["margin-left"]} - ${window.getComputedStyle(document.body)["margin-right"]})`,document.documentElement.style.width="100wh",document.documentElement.style.height="100vh",document.documentElement.style.overflowY=e&&"scroll";}static resumeScroll(){try{onResumeScroll.forEach((e=>e()));}catch(e){}document.body.style.position=Document.position,document.body.style.top=Document.offsetY,document.body.style.left=Document.offsetX,document.body.style.width=Document.width,document.body.style.height=Document.height,document.documentElement.style.width=Document.documentWidth,document.documentElement.style.height=Document.documentHeight,document.documentElement.style.overflowY=Document.overflowY,window.scrollTo(Document.scrollX,Document.scrollY),Document.position=null,Document.offsetY=null,Document.offsetX=null,Document.width=null,Document.height=null,Document.documentWidth=null,Document.documentHeight=null,Document.overflowY=null,Document.scrollX=null,Document.scrollY=null;}static onPreventScroll(e){onPreventScroll.add(e);}static onResumeScroll(e){onResumeScroll.add(e);}static get scroll(){return scroll||(scroll=new Scroll,lastPageYOffset=window.pageYOffset,lastPageXOffset=window.pageXOffset,scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1,window.addEventListener("unload",(()=>scroll.unload()))),scroll}}const updateScrollValue=()=>{const e=window.pageYOffset,t=window.pageXOffset;scrollIsDown=e>lastPageYOffset,scrollIsUp=e<lastPageYOffset,scrollIsRight=t>lastPageXOffset,scrollIsLeft=t<lastPageXOffset,lastPageYOffset=e||window.pageYOffset,lastPageXOffset=t||window.pageXOffset;};class Scroll{constructor(){document.addEventListener("scroll",updateScrollValue,{passive:!0});}get down(){return scrollIsDown}get up(){return scrollIsUp}get left(){return scrollIsLeft}get right(){return scrollIsRight}unload(){document.removeEventListener("scroll",updateScrollValue),scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1,lastPageYOffset=window.pageYOffset,lastPageXOffset=window.pageXOffset,scroll=null;}}function encodeBase64(e,r=!1){if(!t.isString(e))throw new Error("Cannot encode non-string values.");const n=window.btoa(e);return r?n.replace(/=/g,""):n}function decodeBase64(e){if(!t.isString(e))throw new Error("Cannot encode non-string values.");return window.atob(e)}function encodeUtf8(e){if(!t.isString(e))throw new Error("Cannot encode non-string values.");return decodeURIComponent(encodeURIComponent(e))}function decodeUtf8(e){if(!t.isString(e))throw new Error("Cannot decode non-string values.");return decodeURIComponent(encodeURIComponent(e))}class Json{static serialize(e){if(t.isFunction(e))return;if(!t.exists(e))return e;if(!t.isArray(e)&&!t.isObject(e))return e.toString();const r=t.isArray(e)?"[{0}]":"{{0}}",n=[];return Object.keys(e).forEach((r=>{const s=e[r];if(t.isUndefined(s))return;const o=t.isNumber(s)?s:t.isDate(s)?`"${d.parse(s).toJson()}"`:t.isString(s)?`"${serializeString(s)}"`:Json.serialize(s);n[n.length]=(t.isObject(e)&&!t.isArray(e)?`"${r}":`:"")+o;})),a.format(r,n)}static deserialize(e){return /function|(=$)/i.test(e)?e:Json.deserialize_unsafe(e)}static deserialize_unsafe(value){try{const result=t.isString(value)&&!/^0/.test(value)?eval(`(${deserializeString(value)})`):value;return t.exists(result)?t.isNullOrEmpty(result.tagName)&&(t.isObject(result)||t.isArray(result))?(Object.keys(result).forEach((e=>{const r=result[e];(t.isObject(r)||t.isArray(r))&&(result[e]=Json.deserialize(r)),/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(r)&&d.canParse(r)&&(result[e]=d.parse(r).toDate());})),result):/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(result)?d.parse(result).toDate():result:result}catch(e){throw new Error(a.format("Cannot deserialize {0}",value))}}static encode(e,t=!1){try{return encodeBase64(Json.serialize(e),t)}catch(t){throw new Error(a.format("Cannot encode {0}",e))}}static decode(e){try{return Json.deserialize(decodeBase64(e))}catch(t){throw new Error(a.format("Cannot decode {0}",e))}}}function serializeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\//g,"/").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function deserializeString(e){return e.replace(/\\\//g,"/").replace(/\\\\f/g,"\\f").replace(/\\\\n/g,"\\n").replace(/\\\\r/g,"\\r").replace(/\\\\t/g,"\\t")}class QueryString{static serialize(e){try{let r="";return Object.keys(e).forEach((n=>{const s=e[n],o=t.isDate(s)?d.parse(s).toJson():s;r+=a.format("&{0}={1}",encodeURIComponent(n),encodeURIComponent(Json.serialize(o)));})),r.replace(/^&/,"")}catch(t){throw new Error(a.format("Cannot serialize {0}",e))}}static deserialize(e){if(/\??[^\s"'<>]+=[^\s"'<>]+/.test(e)){const t=e.replace(/.*\?/,"").split("&"),r={};return t.forEach((e=>{const[t,n]=e.split("="),s=/^null$|^true$|^false$|^\d+(\.\d+?)?$|^\[.*]$|^{.*}$/.test(n)?n:`"${n}"`;r[decodeURIComponent(t)]=Json.deserialize(decodeURIComponent(s));})),r}}}var worker=e=>{const t=e.toString(),r=t.indexOf("{")+1,n=t.lastIndexOf("}"),s=/(=>)/.test(t)&&!/{/gm.test(t)?`${t.replace("=>","=> {")}}`:t.substring(r,n),o=new self.Blob([s],{type:"text/javascript"});return new Worker(URL.createObjectURL(o))},connection=()=>{const e=self.indexedDB||self.mozIndexedDB||self.webkitIndexedDB||self.msIndexedDB;function t(t){if(!/^[A-z][A-z0-9]*$/.test(t))throw new Error("Invalid collection name. Must be alphanumeric and begin with an alpha character");return new Promise(((r,n)=>{try{const s=e.open(t);s.onerror=()=>{n(new Error("Error opening IndexedDB."));},s.onupgradeneeded=e=>{e.target.result.createObjectStore(t,{autoIncrement:!1});},s.onsuccess=()=>{r(s.result);};}catch(e){n(e);}}))}onmessage=function(e){const r=e.data[0],n=e.data[1],s=e.data[2];try{"read"===r&&function(e){return t(e).then((t=>new Promise(((r,n)=>{const s=t.transaction([e],"readonly").objectStore(e).get(1);s.onsuccess=e=>{t.close(),r(e.target.result);},s.onerror=()=>{t.close(),n(s.error);};}))))}(n).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message]))),"write"===r&&function(e,r){return t(e).then((t=>new Promise(((n,s)=>{const o=t.transaction([e],"readwrite").objectStore(e).put(r,1);o.onsuccess=e=>{t.close(),n(e.target.result);},o.onerror=()=>{t.close(),s(o.error);};}))))}(n,s).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message]))),"remove"===r&&function(e){return t(e).then((t=>new Promise(((r,n)=>{const s=t.transaction([e],"readwrite").objectStore(e).delete(1);s.onsuccess=e=>{t.close(),r(e.target.result);},s.onerror=()=>{t.close(),n(s.error);};}))))}(n).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message]))),"drop"===r&&function(e){return t(e).then((t=>(t.onversionchange=()=>t.close(),new Promise(((t,r)=>{const n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0);},n.onerror=()=>{r(n.error);},n.onblocked=()=>{r(n.error);};})))))}(n).then((e=>postMessage([r,n,e]))).catch((e=>postMessage(["error",e.message])));}catch(e){postMessage(["error",e.message]);}};};const validCollection=/^[A-z]+$/;let connectionThread;class Store{static get connected(){return t.exists(connectionThread)}static connect(){try{return Store.connected||(connectionThread=worker(connection)),Store}catch{throw new Error("Store could not connect.")}}static disconnect(){try{if(Store.connected)return connectionThread.terminate(),connectionThread=null,Store}catch{throw new Error("Store could not be disconnected.")}}static async read(e){return new Promise(((r,n)=>{if(validCollection.test(e))if(t.exists(connectionThread)){const t=s=>{const[o,i,a]=s.data;"error"===o&&i===e&&(n(new Error(a)),connectionThread.removeEventListener("message",t)),"read"===o&&i===e&&(r(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["read",e]);}else n(new Error("Cannot read disconnected Store."));else n(new Error("Invalid collection name must contain only alpha characters."));}))}static async write(e,r){return new Promise(((n,s)=>{if(validCollection.test(e))if(t.exists(connectionThread)){const t=r=>{const[o,i,a]=r.data;"error"===o&&i===e&&(s(new Error(a)),connectionThread.removeEventListener("message",t)),"write"===o&&i===e&&(n(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["write",e,r]);}else s(Error("Cannot write disconnected Store."));else s(new Error("Invalid collection name must contain only alpha characters."));}))}static async remove(e){return new Promise(((r,n)=>{if(validCollection.test(e))if(t.exists(connectionThread)){const t=s=>{const[o,i,a]=s.data;"error"===o&&i===e&&(n(new Error(a)),connectionThread.removeEventListener("message",t)),"remove"===o&&i===e&&(r(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["remove",e]);}else n(Error("Cannot write disconnected Store."));else n(new Error("Invalid collection name must contain only alpha characters."));}))}static async delete(e){return new Promise(((r,n)=>{if(!t.isNullOrEmpty(e)&&validCollection.test(e))if(t.exists(connectionThread)){const t=s=>{const[o,i,a]=s.data;"error"===o&&i===e&&(n(new Error(a)),connectionThread.removeEventListener("message",t)),"drop"===o&&i===e&&(r(a),connectionThread.removeEventListener("message",t));};connectionThread.addEventListener("message",t),connectionThread.postMessage(["drop",e]);}else n(Error("Cannot drop disconnected Store."));else n(new Error("Invalid collection name must contain only alpha characters."));}))}static async save(){try{return await navigator.storage.persist()}catch(e){return !1}}static async estimate(){try{const e=navigator.storage||navigator.webkitPersistentStorage,{quota:t=NaN,usage:r=NaN}=await e.estimate()||{};return {quota:t,usage:r,free:`${N.roundUp((t-r)/t*100,-4)}%`,used:`${N.roundUp(r/t*100,-4)}%`}}catch(e){return {}}}static async saved(){try{return await navigator.storage.persisted()}catch{return !1}}}class Dto{constructor(e={},r){if(!t.isArray(e)&&!t.isObject(e))throw new TypeError("Dto value must be Array or object literal");this._value=e,this._name=r;}get value(){return t.isArray(this._value)?[...this._value]:{...this._value}}get name(){return this._name}set name(e){this._name=e;}read(e){return t.exists(e)?!t.isArray(this._value)||t.isNumber(e)?this._value[e]:void 0:this.value}remove(e){return t.isString(e)&&t.exists(e)&&delete this._value[e],t.isFunction(e)&&this._value.splice(this._value.findIndex(e),1),this}write(e,r){return t.isNullOrEmpty(e)||(t.isArray(this._value)?(t.isUndefined(r)&&this._value.push(e),t.isNumber(e)&&(this._value[e]=r)):this._value[e]=r),this}update(e){const r=Object.assign(this.value,e);return this._value=t.isArray(this._value)?Object.values(r):r,this}clear(){return this._value=t.isArray(this._value)?[]:{},this}async save(){return Store.connect(),await Store.write(this.name,this.encode(!0,!0)),await Store.save()}async saveAs(e){return this.name=e,Store.connect(),await Store.delete(this.name),this.save()}async delete(){return Store.connect(),await Store.delete(this.name),this}encode(e=!1,t=!1){const r=Json.serialize(this._value);return encodeBase64(t?encodeURIComponent(r):r,e)}static decode(e,t){const r=decodeBase64(e),n=decodeURIComponent(r);return new Dto(Json.deserialize(n),t)}toFormData(){const{value:e}=this,t=new window.FormData;return Object.keys(e).forEach((r=>t.append(r,e[r]))),t}toJson(){return Json.serialize(this._value)}toQueryString(){return QueryString.serialize(this._value)}static parseFormData(e){const t={};for(const[r,n]of e.entries())t[r]=n;return new Dto(t)}static parseJson(e){return new Dto(Json.deserialize(e))}static parseJwt(e){try{const[,t]=e.split(".");return new Dto(JSON.parse(window.atob(t)))}catch(t){throw new SyntaxError(`Cannot parseJwt: ${e}`)}}static parseQueryString(e){return new Dto(QueryString.deserialize(e))}static async load(e){return Store.connect(),Store.read(e).then((t=>{try{return Dto.decode(t,e)}catch{return}})).catch((()=>{}))}}class Event{static mute(e){return !!t.exists(e)&&(t.isFunction(e.preventDefault)&&e.preventDefault(),t.isFunction(e.stopPropagation)&&e.stopPropagation(),t.isFunction(e.stopImmediatePropagation)&&e.stopImmediatePropagation(),t.exists(e.cancelBubble)&&(e.cancelBubble=!0),!1)}}const readFieldNames=e=>{const t=e.getAttribute("id"),r=[...e.querySelectorAll("[name]")].map((e=>e.name)),n=t?[...document.querySelectorAll(`[form="${t}"]`)].map((e=>e.name)):[];return [...r,...n]},readData=e=>new window.FormData(e),read=e=>{const r={};try{readData(e).forEach(((e,n)=>{const s=r[n];t.isArray(s)?r[n].push(e):t.exists(s)?r[n]=[r[n],e]:r[n]=e;}));}catch(t){[...e.elements].forEach((e=>{const{name:t,type:n,value:s,files:o}=e;if("file"===n)r[t]=o[0];else if("checkbox"===n||"radio"===n)e.checked&&(r[t]=s);else if(e.multiple){const n=[];e.querySelectorAll("option").forEach((e=>e.selected&&n.push(e.value))),r[t]=n.length<2?n[0]:n;}else r[t]=s;}));}return r},readJson=e=>JSON.stringify(read(e)),write=(e,r)=>{[...e.elements].forEach((e=>{/^select$/i.test(e.nodeName)?t.isArray(r[e.name])?[...e.options].forEach((t=>{t.selected=r[e.name].indexOf(t.value)>=0;})):t.exists(r[e.name])&&(e.value=r[e.name]):t.exists(r[e.name])&&("checkbox"===e.type||"radio"===e.type?e.checked=r[e.name]===e.value:e.value=r[e.name]);}));};var index={readFieldNames:readFieldNames,read:read,readData:readData,readJson:readJson,write:write};class Key{constructor(e,t,r={}){this.key=e,this.msKey=t||e,this.altKey=r.altKey||!1,this.ctrlKey=r.ctrlKey||!1,this.metaKey=r.metaKey||!1,this.shiftKey=r.shiftKey||!1;}get alt(){const{key:e,msKey:t,ctrlKey:r,metaKey:n,shiftKey:s}=this;return new Key(e,t,{altKey:!0,ctrlKey:r,metaKey:n,shiftKey:s})}get ctrl(){const{key:e,msKey:t,altKey:r,metaKey:n,shiftKey:s}=this;return new Key(e,t,{altKey:r,ctrlKey:!0,metaKey:n,shiftKey:s})}get meta(){const{key:e,msKey:t,altKey:r,ctrlKey:n,shiftKey:s}=this;return new Key(e,t,{altKey:r,ctrlKey:n,metaKey:!0,shiftKey:s})}get shift(){const{key:e,msKey:t,altKey:r,ctrlKey:n,metaKey:s}=this;return new Key(e,t,{altKey:r,ctrlKey:n,metaKey:s,shiftKey:!0})}equals(e){return e instanceof Key&&this.altKey===e.altKey&&this.ctrlKey===e.ctrlKey&&this.metaKey===e.metaKey&&this.shiftKey===e.shiftKey&&(this.key===e.key||this.msKey===e.msKey)}didFire(e){const{code:t,key:r,altKey:n,ctrlKey:s,metaKey:o,shiftKey:i}=e,a="Dead"===r?t:r;return e&&("ANY"===this.key||this.equals(new Key(a,a,{altKey:n,ctrlKey:s,metaKey:o,shiftKey:i})))}static get press(){return "keypress"}static get down(){return "keydown"}static get up(){return "keyup"}static get any(){return new Key("ANY")}static get esc(){return new Key("Escape","Esc")}static get enter(){return new Key("Enter")}static get space(){return new Key(" ","Spacebar")}static get tab(){return new Key("Tab")}static get left(){return new Key("ArrowLeft","Left")}static get right(){return new Key("ArrowRight","Right")}}class Keyboard{static on(e,t,r,n){const s=e=>t.didFire(e)?r(e,t):null;return window.addEventListener(e,s,n),{unsubscribe:()=>{window.removeEventListener(e,s);}}}static onKeyPress(e,t,r){return Keyboard.on(Key.press,e,t,r)}static onKeyDown(e,t,r){return Keyboard.on(Key.down,e,t,r)}static onKeyUp(e,t,r){return Keyboard.on(Key.up,e,t,r)}}class Swipe{constructor(e,t=0){this.didTouchStart=this.didTouchStart.bind(this),this.didTouchEnd=this.didTouchEnd.bind(this),this.didTouchMove=this.didTouchMove.bind(this),e.addEventListener("touchstart",this.didTouchStart,{capture:!1,passive:!0}),e.addEventListener("touchend",this.didTouchEnd,{capture:!1,passive:!0}),e.addEventListener("touchmove",this.didTouchMove,{capture:!1,passive:!0}),this.element=e,this.tolerance=t,this.didSwipeLeft=()=>{},this.didSwipeRight=()=>{},this.didMove=()=>{};}onLeft(e){return this.didSwipeLeft=e,this}onRight(e){return this.didSwipeRight=e,this}onMove(e){return this.didMove=e,this}destroy(){const{element:e}=this;return e.removeEventListener("touchstart",this.didTouchStart,{capture:!1}),e.removeEventListener("touchend",this.didTouchEnd,{capture:!1}),e.removeEventListener("touchmove",this.didTouchMove,{capture:!1}),this}didTouchStart({touches:[e]}){this.touchStartPoint=new O(e.pageX,e.pageY);}didTouchEnd(e){const[t]=e.changedTouches,{touchStartPoint:r}=this,n=new O(t.pageX,t.pageY);n.isLeftOf(r)&&Math.abs(n.distanceFrom(r).x)>this.tolerance&&this.didSwipeLeft(e),n.isRightOf(r)&&Math.abs(n.distanceFrom(r).x)>this.tolerance&&this.didSwipeRight(e);}didTouchMove(e){const[t]=e.touches,{touchStartPoint:r}=this,n=new O(t.pageX,t.pageY);this.didMove({distance:n.distanceFrom(r),up:n.isAbove(r),down:n.isBelow(r),left:n.isLeftOf(r),right:n.isRightOf(r)});}}
2
-
3
- export { Document as D, Event as E, Key as K, Swipe as S, Device as a, index as i };
@@ -1,388 +0,0 @@
1
- /*
2
- Stencil Client Platform v2.15.2 | MIT Licensed | https://stenciljs.com
3
- */
4
- /**
5
- * @license
6
- * Copyright Google Inc. All Rights Reserved.
7
- *
8
- * Use of this source code is governed by an MIT-style license that can be
9
- * found in the LICENSE file at https://angular.io/license
10
- *
11
- * This file is a port of shadowCSS from webcomponents.js to TypeScript.
12
- * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
13
- * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
14
- */
15
- const safeSelector = (selector) => {
16
- const placeholders = [];
17
- let index = 0;
18
- let content;
19
- // Replaces attribute selectors with placeholders.
20
- // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
21
- selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
22
- const replaceBy = `__ph-${index}__`;
23
- placeholders.push(keep);
24
- index++;
25
- return replaceBy;
26
- });
27
- // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
28
- // WS and "+" would otherwise be interpreted as selector separators.
29
- content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
30
- const replaceBy = `__ph-${index}__`;
31
- placeholders.push(exp);
32
- index++;
33
- return pseudo + replaceBy;
34
- });
35
- const ss = {
36
- content,
37
- placeholders,
38
- };
39
- return ss;
40
- };
41
- const restoreSafeSelector = (placeholders, content) => {
42
- return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
43
- };
44
- const _polyfillHost = '-shadowcsshost';
45
- const _polyfillSlotted = '-shadowcssslotted';
46
- // note: :host-context pre-processed to -shadowcsshostcontext.
47
- const _polyfillHostContext = '-shadowcsscontext';
48
- const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
49
- const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
50
- const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
51
- const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
52
- const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
53
- const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
54
- const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
55
- const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
56
- const _polyfillHostRe = /-shadowcsshost/gim;
57
- const _colonHostRe = /:host/gim;
58
- const _colonSlottedRe = /::slotted/gim;
59
- const _colonHostContextRe = /:host-context/gim;
60
- const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
61
- const stripComments = (input) => {
62
- return input.replace(_commentRe, '');
63
- };
64
- const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
65
- const extractCommentsWithHash = (input) => {
66
- return input.match(_commentWithHashRe) || [];
67
- };
68
- const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
69
- const _curlyRe = /([{}])/g;
70
- const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
71
- const OPEN_CURLY = '{';
72
- const CLOSE_CURLY = '}';
73
- const BLOCK_PLACEHOLDER = '%BLOCK%';
74
- const processRules = (input, ruleCallback) => {
75
- const inputWithEscapedBlocks = escapeBlocks(input);
76
- let nextBlockIndex = 0;
77
- return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
78
- const selector = m[2];
79
- let content = '';
80
- let suffix = m[4];
81
- let contentPrefix = '';
82
- if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
83
- content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
84
- suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
85
- contentPrefix = '{';
86
- }
87
- const cssRule = {
88
- selector,
89
- content,
90
- };
91
- const rule = ruleCallback(cssRule);
92
- return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
93
- });
94
- };
95
- const escapeBlocks = (input) => {
96
- const inputParts = input.split(_curlyRe);
97
- const resultParts = [];
98
- const escapedBlocks = [];
99
- let bracketCount = 0;
100
- let currentBlockParts = [];
101
- for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
102
- const part = inputParts[partIndex];
103
- if (part === CLOSE_CURLY) {
104
- bracketCount--;
105
- }
106
- if (bracketCount > 0) {
107
- currentBlockParts.push(part);
108
- }
109
- else {
110
- if (currentBlockParts.length > 0) {
111
- escapedBlocks.push(currentBlockParts.join(''));
112
- resultParts.push(BLOCK_PLACEHOLDER);
113
- currentBlockParts = [];
114
- }
115
- resultParts.push(part);
116
- }
117
- if (part === OPEN_CURLY) {
118
- bracketCount++;
119
- }
120
- }
121
- if (currentBlockParts.length > 0) {
122
- escapedBlocks.push(currentBlockParts.join(''));
123
- resultParts.push(BLOCK_PLACEHOLDER);
124
- }
125
- const strEscapedBlocks = {
126
- escapedString: resultParts.join(''),
127
- blocks: escapedBlocks,
128
- };
129
- return strEscapedBlocks;
130
- };
131
- const insertPolyfillHostInCssText = (selector) => {
132
- selector = selector
133
- .replace(_colonHostContextRe, _polyfillHostContext)
134
- .replace(_colonHostRe, _polyfillHost)
135
- .replace(_colonSlottedRe, _polyfillSlotted);
136
- return selector;
137
- };
138
- const convertColonRule = (cssText, regExp, partReplacer) => {
139
- // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
140
- return cssText.replace(regExp, (...m) => {
141
- if (m[2]) {
142
- const parts = m[2].split(',');
143
- const r = [];
144
- for (let i = 0; i < parts.length; i++) {
145
- const p = parts[i].trim();
146
- if (!p)
147
- break;
148
- r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
149
- }
150
- return r.join(',');
151
- }
152
- else {
153
- return _polyfillHostNoCombinator + m[3];
154
- }
155
- });
156
- };
157
- const colonHostPartReplacer = (host, part, suffix) => {
158
- return host + part.replace(_polyfillHost, '') + suffix;
159
- };
160
- const convertColonHost = (cssText) => {
161
- return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
162
- };
163
- const colonHostContextPartReplacer = (host, part, suffix) => {
164
- if (part.indexOf(_polyfillHost) > -1) {
165
- return colonHostPartReplacer(host, part, suffix);
166
- }
167
- else {
168
- return host + part + suffix + ', ' + part + ' ' + host + suffix;
169
- }
170
- };
171
- const convertColonSlotted = (cssText, slotScopeId) => {
172
- const slotClass = '.' + slotScopeId + ' > ';
173
- const selectors = [];
174
- cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
175
- if (m[2]) {
176
- const compound = m[2].trim();
177
- const suffix = m[3];
178
- const slottedSelector = slotClass + compound + suffix;
179
- let prefixSelector = '';
180
- for (let i = m[4] - 1; i >= 0; i--) {
181
- const char = m[5][i];
182
- if (char === '}' || char === ',') {
183
- break;
184
- }
185
- prefixSelector = char + prefixSelector;
186
- }
187
- const orgSelector = prefixSelector + slottedSelector;
188
- const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
189
- if (orgSelector.trim() !== addedSelector.trim()) {
190
- const updatedSelector = `${addedSelector}, ${orgSelector}`;
191
- selectors.push({
192
- orgSelector,
193
- updatedSelector,
194
- });
195
- }
196
- return slottedSelector;
197
- }
198
- else {
199
- return _polyfillHostNoCombinator + m[3];
200
- }
201
- });
202
- return {
203
- selectors,
204
- cssText,
205
- };
206
- };
207
- const convertColonHostContext = (cssText) => {
208
- return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
209
- };
210
- const convertShadowDOMSelectors = (cssText) => {
211
- return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
212
- };
213
- const makeScopeMatcher = (scopeSelector) => {
214
- const lre = /\[/g;
215
- const rre = /\]/g;
216
- scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
217
- return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
218
- };
219
- const selectorNeedsScoping = (selector, scopeSelector) => {
220
- const re = makeScopeMatcher(scopeSelector);
221
- return !re.test(selector);
222
- };
223
- const injectScopingSelector = (selector, scopingSelector) => {
224
- return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
225
- return before + scopingSelector + colon + after;
226
- });
227
- };
228
- const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
229
- // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
230
- _polyfillHostRe.lastIndex = 0;
231
- if (_polyfillHostRe.test(selector)) {
232
- const replaceBy = `.${hostSelector}`;
233
- return selector
234
- .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
235
- .replace(_polyfillHostRe, replaceBy + ' ');
236
- }
237
- return scopeSelector + ' ' + selector;
238
- };
239
- const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
240
- const isRe = /\[is=([^\]]*)\]/g;
241
- scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
242
- const className = '.' + scopeSelector;
243
- const _scopeSelectorPart = (p) => {
244
- let scopedP = p.trim();
245
- if (!scopedP) {
246
- return '';
247
- }
248
- if (p.indexOf(_polyfillHostNoCombinator) > -1) {
249
- scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
250
- }
251
- else {
252
- // remove :host since it should be unnecessary
253
- const t = p.replace(_polyfillHostRe, '');
254
- if (t.length > 0) {
255
- scopedP = injectScopingSelector(t, className);
256
- }
257
- }
258
- return scopedP;
259
- };
260
- const safeContent = safeSelector(selector);
261
- selector = safeContent.content;
262
- let scopedSelector = '';
263
- let startIndex = 0;
264
- let res;
265
- const sep = /( |>|\+|~(?!=))\s*/g;
266
- // If a selector appears before :host it should not be shimmed as it
267
- // matches on ancestor elements and not on elements in the host's shadow
268
- // `:host-context(div)` is transformed to
269
- // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
270
- // the `div` is not part of the component in the 2nd selectors and should not be scoped.
271
- // Historically `component-tag:host` was matching the component so we also want to preserve
272
- // this behavior to avoid breaking legacy apps (it should not match).
273
- // The behavior should be:
274
- // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
275
- // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
276
- // `:host-context(tag)`)
277
- const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
278
- // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
279
- let shouldScope = !hasHost;
280
- while ((res = sep.exec(selector)) !== null) {
281
- const separator = res[1];
282
- const part = selector.slice(startIndex, res.index).trim();
283
- shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
284
- const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
285
- scopedSelector += `${scopedPart} ${separator} `;
286
- startIndex = sep.lastIndex;
287
- }
288
- const part = selector.substring(startIndex);
289
- shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
290
- scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
291
- // replace the placeholders with their original values
292
- return restoreSafeSelector(safeContent.placeholders, scopedSelector);
293
- };
294
- const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
295
- return selector
296
- .split(',')
297
- .map((shallowPart) => {
298
- if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
299
- return shallowPart.trim();
300
- }
301
- if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
302
- return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
303
- }
304
- else {
305
- return shallowPart.trim();
306
- }
307
- })
308
- .join(', ');
309
- };
310
- const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
311
- return processRules(cssText, (rule) => {
312
- let selector = rule.selector;
313
- let content = rule.content;
314
- if (rule.selector[0] !== '@') {
315
- selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
316
- }
317
- else if (rule.selector.startsWith('@media') ||
318
- rule.selector.startsWith('@supports') ||
319
- rule.selector.startsWith('@page') ||
320
- rule.selector.startsWith('@document')) {
321
- content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
322
- }
323
- const cssRule = {
324
- selector: selector.replace(/\s{2,}/g, ' ').trim(),
325
- content,
326
- };
327
- return cssRule;
328
- });
329
- };
330
- const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
331
- cssText = insertPolyfillHostInCssText(cssText);
332
- cssText = convertColonHost(cssText);
333
- cssText = convertColonHostContext(cssText);
334
- const slotted = convertColonSlotted(cssText, slotScopeId);
335
- cssText = slotted.cssText;
336
- cssText = convertShadowDOMSelectors(cssText);
337
- if (scopeId) {
338
- cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
339
- }
340
- cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
341
- cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
342
- return {
343
- cssText: cssText.trim(),
344
- slottedSelectors: slotted.selectors,
345
- };
346
- };
347
- const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
348
- const hostScopeId = scopeId + '-h';
349
- const slotScopeId = scopeId + '-s';
350
- const commentsWithHash = extractCommentsWithHash(cssText);
351
- cssText = stripComments(cssText);
352
- const orgSelectors = [];
353
- if (commentOriginalSelector) {
354
- const processCommentedSelector = (rule) => {
355
- const placeholder = `/*!@___${orgSelectors.length}___*/`;
356
- const comment = `/*!@${rule.selector}*/`;
357
- orgSelectors.push({ placeholder, comment });
358
- rule.selector = placeholder + rule.selector;
359
- return rule;
360
- };
361
- cssText = processRules(cssText, (rule) => {
362
- if (rule.selector[0] !== '@') {
363
- return processCommentedSelector(rule);
364
- }
365
- else if (rule.selector.startsWith('@media') ||
366
- rule.selector.startsWith('@supports') ||
367
- rule.selector.startsWith('@page') ||
368
- rule.selector.startsWith('@document')) {
369
- rule.content = processRules(rule.content, processCommentedSelector);
370
- return rule;
371
- }
372
- return rule;
373
- });
374
- }
375
- const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
376
- cssText = [scoped.cssText, ...commentsWithHash].join('\n');
377
- if (commentOriginalSelector) {
378
- orgSelectors.forEach(({ placeholder, comment }) => {
379
- cssText = cssText.replace(placeholder, comment);
380
- });
381
- }
382
- scoped.slottedSelectors.forEach((slottedSelector) => {
383
- cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
384
- });
385
- return cssText;
386
- };
387
-
388
- export { scopeCss };
@@ -1,9 +0,0 @@
1
- import { R } from './index-6cfd87e4.js';
2
-
3
- const uid = () => {
4
- // @ts-ignore
5
- let value;
6
- return (() => { value = R.uid(); })();
7
- };
8
-
9
- export { uid as u };
@@ -1 +0,0 @@
1
- var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(t,n,r,o){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,u){function a(t){try{c(o.next(t))}catch(e){u(e)}}function s(t){try{c(o["throw"](t))}catch(e){u(e)}}function c(e){e.done?r(e.value):i(e.value).then(a,s)}c((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,i,u,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,i&&(u=a[0]&2?i["return"]:a[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,a[1])).done)return u;if(i=0,u)a=[a[0]&2,u.value];switch(a[0]){case 0:case 1:u=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){r.label=a[1];break}if(a[0]===6&&r.label<u[1]){r.label=u[1];u=a;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(a);break}if(u[2])r.ops.pop();r.trys.pop();continue}a=n.call(t,r)}catch(e){a=[6,e];i=0}finally{o=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++){if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))};var t=function(){function e(){}e.isNull=function(e){return null===e};e.isEmpty=function(t){return e.isString(t)&&""===t||e.isArray(t)&&t.length<1||e.isObjectLiteral(t)&&Object.keys(t).length<1};e.isUndefined=function(e){return void 0===e};e.isZero=function(e){return 0===e};e.exists=function(t){return!(e.isUndefined(t)||e.isNull(t))};e.isNullOrEmpty=function(t){return!e.exists(t)||e.isEmpty(t)};e.isArray=function(e){return Array.isArray(e)};e.isBool=function(e){return"boolean"==typeof e};e.isTrue=function(t){return e.isBool(t)&&!0===t};e.isFalse=function(t){return e.isBool(t)&&!1===t};e.isDate=function(e){return e instanceof Date};e.isNumber=function(e){return("number"==typeof e||e instanceof Number)&&!isNaN(e)};e.isEven=function(e){return this.isNumber(e)&&!this.isZero(e)&&e%2==0};e.isOdd=function(e){return this.isNumber(e)&&!this.isZero(e)&&!this.isEven(e)};e.isString=function(e){return"string"==typeof e||e instanceof String};e.isFunction=function(e){return e instanceof Function};e.isAsyncFunction=function(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||e.isFunction(t)&&/^async/.test(t.toString())||e.isFunction(t().then)}catch(t){return!1}};e.isPromise=function(e){return e instanceof Promise};e.isObject=function(t){return e.exists(t)&&"object"==typeof t&&!(e.isBool(t)||e.isNumber(t)||e.isDate(t)||e.isArray(t)||e.isString(t)||e.isFunction(t))};e.isObjectLiteral=function(t){return e.isObject(t)&&t.constructor==={}.constructor};e.isTruthy=function(t){return!e.isFalsy(t)};e.isFalsy=function(t){return e.isZero(t)||e.isFalse(t)||e.isNullOrEmpty(t)||isNaN(t)};return e}();function e(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return"".concat.apply("",e)}function r(e){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}return t.reduce((function(e,t,n){return e.replace(new RegExp("\\{".concat(n,"\\}"),"g"),t&&t.toString?t.toString():t)}),e)}function i(e){return s(n(e))}function s(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/^[\s\n]*/,""):e}function n(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/[\s\n]*$/,""):e}Object.freeze({__proto__:null,build:e,chunk:function(e,n){if(n===void 0){n=0}if(!t.isString(e)||Number.isNaN(n)||n<0)return[];if(n<e.length){var r=0;var o=n||e.length,i=[];for(;r<e.length;)i.push(e.slice(r,r+o)),r+=o;return i}return[e]},format:r,trim:i,trimStart:s,trimEnd:n,capitalize:function(e){if(e===void 0){e=""}return(e||"").charAt(0).toUpperCase()+(e||"").slice(1).toLowerCase()},mask:function(e,n,r){if(r===void 0){r="_"}return t.isFunction(n)?n(e):t.isString(n)&&e.split("").reduce((function(e,t){return e.replace(new RegExp(r),t)}),n)},unmask:function(e,n,r){if(r===void 0){r="_"}var o=new RegExp(r);return t.isFunction(n)?n(e):t.isString(n)&&e.length===n.length&&n.split("").every((function(t,n){return o.test(t)||t===e.charAt(n)}))?e.split("").reduce((function(e,t,r){return o.test(t)||!o.test(n.charAt(r))&&n.charAt(r)===t?e:e+t}),""):e}});function h(e,t){try{return e()}catch(n){return t}}var l;h.async=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,e()];case 1:return[2,r.sent()];case 2:n=r.sent();return[2,t];case 3:return[2]}}))}))};var d=function(){function e(e,t,n){if(t<1||t>12)throw new Error("Invalid month at Assert.DayPoint");if(n<1||n>y(t,e))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(e,t-1,n):new Date,this._day=this._value.getDay(),this._date=n,this._month=t,this._year=e}Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"day",{get:function(){return this._day},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"date",{get:function(){return this._date},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"month",{get:function(){return this._month},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"year",{get:function(){return this._year},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"shortYear",{get:function(){var e=this._year.toString();return parseInt(e.substr(e.length-2))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isWeekday",{get:function(){var e=this._day;return e>0&&e<6},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isWeekend",{get:function(){return!this.isWeekday},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isLeapYear",{get:function(){return f(this._year)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"nextDay",{get:function(){return p(this,1,0,0)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"prevDay",{get:function(){return p(this,-1,0,0)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"nextMonth",{get:function(){return p(this,0,1,0)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"prevMonth",{get:function(){return p(this,0,-1,0)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"nextYear",{get:function(){return p(this,0,0,1)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"prevYear",{get:function(){return p(this,0,0,-1)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"firstDayOfMonth",{get:function(){return new e(this._year,this._month,1)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"lastDayOfMonth",{get:function(){return new e(this._year,this._month,y(this._month,this._year))},enumerable:false,configurable:true});e.prototype.add=function(e,t,n){function r(e,t,n){var r=e,o=t;for(;o--;)r=r[n];return r}var o=Math.abs,i=o(e),u=o(n),a=o(t),s=n<0?"prevDay":"nextDay",c=t<0?"prevMonth":"nextMonth";return r(r(r(this,i,e<0?"prevYear":"nextYear"),a,c),u,s)};e.prototype.isBefore=function(e){return!(this.isAfter(e)||this.equals(e))};e.prototype.isAfter=function(e){var t=this._year,n=e.year,r=this._month,o=e.month;return t>n||t===n&&r>o||t===n&&r===o&&this._date>e.date};e.prototype.equals=function(e){return this._year===e.year&&this._month===e.month&&this._date===e.date};e.prototype.toString=function(e){if(e===void 0){e="mm/dd/yyyy"}var t=/y{3,}/i.test(e)?this._year:this.shortYear,n=this._month,o=this._date,i=/m{2}/i.test(e)&&n<10?"0{1}":"{1}",u=/d{2}/i.test(e)&&o<10?"0{2}":"{2}";return r(e.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,u),t,n,o)};e.prototype.toDate=function(){return this._value};e.prototype.toJson=function(){return this._value.toJSON()};e.canParse=function(n){return t.isString(n)||t.isNumber(n)||t.isDate(n)?!isNaN(new Date(n).valueOf()):n instanceof e};e.parse=function(n){if(n instanceof e)return n;var o=t.isString(n)?i(n).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):n;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(o)){var u=o.split("-"),a=u[0];u.push(a),u.shift(),o=u.join("/")}var s=new Date(o);if(!t.exists(o)||Number.isNaN(s.valueOf()))throw new Error(r("Cannot parse value= {0}",o));return new e(s.getFullYear(),s.getMonth()+1,s.getDate())};e.tryParse=function(t){return h((function(){return e.parse(t)}),null)};e.assumeNow=function(t){l=e.parse(t)};Object.defineProperty(e,"today",{get:function(){return l||e.parse(new Date)},enumerable:false,configurable:true});return e}();function y(e,n){return 2===e?f(n)?29:28:e<8&&t.isEven(e)||e>7&&t.isOdd(e)?30:31}function f(t){var n=t.toString().split(/\B/);return parseFloat(e(n[n.length-2],n[n.length-1]))%4==0}function p(e,t,n,r){var o=e.month,i=e.year,u=e.date,a=n,s=r;var c=u+t,l=o+a,f=i+s;if(u+t>y(o,i)&&(c=1,l=o+a+1),u+t<1){var p=e.prevMonth;c=y(p.month,p.year),l=o+a-1}return l>12&&(l=1,f=i+s+1),l<1&&(l=12,f=i+s-1),new d(f,l,c)}function m(e,t){if(t===void 0){t=0}var n=Math.pow(10,-t);return Math.round(parseFloat((e*n).toFixed(Math.abs(t))))/n}function g(e,t){if(t===void 0){t=0}return m(e+5*Math.pow(10,t-1),t)}function _(e,t){if(t===void 0){t=0}return 0===e?0:m(e-5*Math.pow(10,t-1),t)}function w(e,t){if(t===void 0){t=0}return e<0?g(e,t):_(e,t)}function x(e){var t=function(e,n,r){if(n===void 0){n=0}if(r===void 0){r=1}return 0<e?t(--e,r,n+r):n};return t(e)}function v(e){var t=0,n=1,r=0;for(;e>1;)r=t,t=n,n+=r,e--;return e<1?t:n}function b(e,t){if(t===void 0){t=0}var n=parseInt(e);return Number.isNaN(n)?t:n}Object.freeze({__proto__:null,random:function(e,t){if(e===void 0){e=0}if(t===void 0){t=1}return Math.random()*(t-e)+e},round:m,roundUp:g,roundDown:_,roundTowardZero:w,gcd:function e(t,n){return 0===n?Math.abs(t):e(n,t%n)},fib:x,fib2:v,fibArray:function(e){return Array(e).fill(0).map((function(){return x(--e)})).reverse()},fib2Array:function(e){return Array(e).fill(0).map((function(){return v(--e)})).reverse()},tryParseInt:b,tryParseFloat:function(e,t){if(t===void 0){t=0}var n=parseFloat(e);return Number.isNaN(n)?t:n}});var $=function(){function e(e,n){if(e===void 0){e=0}if(n===void 0){n=0}if(!t.isNumber(e)||!t.isNumber(n))throw new Error("Coord requires numeric x and y values");this._x=e,this._y=n}Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return{x:this.x,y:this.y}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"half",{get:function(){return this.divide(new e(2,2))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"abs",{get:function(){return new e(Math.abs(this.x),Math.abs(this.y))},enumerable:false,configurable:true});e.prototype.equals=function(e){return this.x===e.x&&this.y===e.y};e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)};e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)};e.prototype.multiply=function(t){return new e(this.x*t.x,this.y*t.y)};e.prototype.divide=function(t){return new e(this.x/t.x,this.y/t.y)};e.prototype.round=function(t){if(t===void 0){t=0}return new e(m(this.x,t),m(this.y,t))};e.prototype.toString=function(){return"(".concat(this.x,",").concat(this.y,")")};e.canParse=function(n){return t.isArray(n)?!(Number.isNaN(n[0])||Number.isNaN(n[1])):t.isObjectLiteral(n)&&"x"in n&&"y"in n?!(Number.isNaN(n.x)||Number.isNaN(n.y)):n instanceof e};e.parse=function(n){return t.exists(n)?n instanceof e?n:t.isArray(n)?new e(n[0],n[1]):t.isObjectLiteral(n)&&t.exists(n.x)&&t.exists(n.y)?new e(n.x,n.y):null:null};e.tryParse=function(t){return h((function(){return e.parse(t)}),null)};return e}();var F=function(e){__extends(t,e);function t(t,n){if(t===void 0){t=0}if(n===void 0){n=0}var r=this;r=e.call(this,t,n)||this,r._lengthSquared=Math.pow(t,2)+Math.pow(n,2),r._magnitude=Math.sqrt(r._lengthSquared),r._unitNormalX=0===t&&0===n?0:t/r._magnitude,r._unitNormalY=0===t&&0===n?0:n/r._magnitude;return r}Object.defineProperty(t.prototype,"magnitude",{get:function(){return this._magnitude},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isZero",{get:function(){return 0===this.x&&0===this.y},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"normal",{get:function(){return new t(this._unitNormalX,this._unitNormalY)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"invert",{get:function(){return new t(-this.x,-this.y)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"norm",{get:function(){return new t(Math.abs(this.x),Math.abs(this.y))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"perpendicular",{get:function(){return new t(-this.y,this.x)},enumerable:false,configurable:true});t.prototype.equals=function(e){return e instanceof t&&this.x===e.x&&this.y===e.y};t.prototype.add=function(e){return e instanceof t?new t(this.x+e.x,this.y+e.y):null};t.prototype.dot=function(e){return e instanceof t?this.x*e.x+this.y*e.y:null};t.prototype.perpendicularAtTo=function(e){if(!(e instanceof t))return null;var n=e.add(this.projectionOfOnto(e).invert);return new t(n.x,n.y)};t.prototype.projectionOfOnto=function(e){if(!(e instanceof t))return null;var n=e.normal.scale(this.dot(e.normal));return new t(n.x,n.y)};t.prototype.scale=function(e){return new t(this.x*e,this.y*e)};t.prototype.unitNormalDot=function(e){return e instanceof t?this.normal.x*e.normal.x+this.normal.y*e.normal.y:null};t.prototype.reflect=function(e){if(!(e instanceof t))return null;if(e.isZero)return this;var n=e.normal;return this.add(n.scale(2*n.dot(this)).invert)};t.prototype.round=function(e){if(e===void 0){e=0}return new t(m(this.x,e),m(this.y,e))};return t}($);var O=function(e){__extends(t,e);function t(t,n){return e.call(this,t,n)||this}t.prototype.isAbove=function(e){return this.y<e.y};t.prototype.isBelow=function(e){return this.y>e.y};t.prototype.isLeftOf=function(e){return this.x<e.x};t.prototype.isRightOf=function(e){return this.x>e.x};t.prototype.distanceFrom=function(e){return new F(this.x-e.x,this.y-e.y)};t.prototype.distanceTo=function(e){return this.distanceFrom(e).invert};t.canParse=function(e){return e instanceof t||$.canParse(e)};t.parse=function(e){if(e instanceof t)return e;var n=$.parse(e);return new t(n.x,n.y)};t.tryParse=function(e){return h((function(){return t.parse(e)}),null)};return t}($);function k(e){var t=isNaN(parseInt(e))||e<0||e>24?24:e,n=Math.random().toString().substring(2),r=Math.random().toString().substring(2);return n.concat(r).substring(0,t)}function Z(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}var R=Object.freeze({__proto__:null,uid:k,uuid:Z,suid:function(){return Symbol(k())},suuid:function(){return Symbol(Z())}});Object.freeze({__proto__:null,pattern:function(e){return e.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\")},escape:function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});({name:R.uid(),expires:d.today.nextYear.toDate(),path:"/",domain:null,secure:!1});var Device=function(){function e(){}Object.defineProperty(e,"orientation",{get:function(){var t=window.screen,n=(t.orientation||{}).type||t.mozOrientation||t.msOrientation,r=window.orientation;return n===e.landscapePrimary||90===r?e.landscapePrimary:n===e.landscapeSecondary||-90===r?e.landscapeSecondary:n===e.portraitPrimary||0===r?e.portraitPrimary:n===e.portraitSecondary||180===r?e.portraitSecondary:void 0},enumerable:false,configurable:true});Object.defineProperty(e,"landscapePrimary",{get:function(){return"landscape-primary"},enumerable:false,configurable:true});Object.defineProperty(e,"landscapeSecondary",{get:function(){return"landscape-secondary"},enumerable:false,configurable:true});Object.defineProperty(e,"portraitPrimary",{get:function(){return"portrait-primary"},enumerable:false,configurable:true});Object.defineProperty(e,"portraitSecondary",{get:function(){return"portrait-secondary"},enumerable:false,configurable:true});Object.defineProperty(e,"isMobile",{get:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(window.navigator.userAgent)},enumerable:false,configurable:true});return e}();var onPreventScroll=new Set,onResumeScroll=new Set;var scroll,lastPageYOffset,lastPageXOffset,scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1;var Document=function(){function n(){}Object.defineProperty(n,"scrollbarWidth",{get:function(){return window.innerWidth-document.documentElement.clientWidth},enumerable:false,configurable:true});Object.defineProperty(n,"isScrollPrevented",{get:function(){return t.exists(n.scrollY)},enumerable:false,configurable:true});n.preventScroll=function(){try{onPreventScroll.forEach((function(e){return e()}))}catch(e){}n.position=document.body.style.position,n.offsetY=document.body.style.top,n.offsetX=document.body.style.left,n.width=document.body.style.width,n.height=document.body.style.height,n.documentWidth=document.documentElement.style.width,n.documentWidth=document.documentElement.style.width,n.documentHeight=document.documentElement.style.height,n.overflowY=document.documentElement.style.overflowY,n.scrollX=window.scrollX||window.pageXOffset,n.scrollY=window.scrollY||window.pageYOffset;var e=n.scrollbarWidth;document.body.style.position="fixed",document.body.style.left="-".concat(n.scrollX,"px"),document.body.style.top="calc(-".concat(n.scrollY,"px - ").concat(window.getComputedStyle(document.body)["padding-top"]," - ").concat(window.getComputedStyle(document.body)["margin-top"],")"),document.body.style.width="calc(100vw - ".concat(e,"px - ").concat(window.getComputedStyle(document.body)["padding-left"]," - ").concat(window.getComputedStyle(document.body)["padding-right"]," - ").concat(window.getComputedStyle(document.body)["margin-left"]," - ").concat(window.getComputedStyle(document.body)["margin-right"],")"),document.documentElement.style.width="100wh",document.documentElement.style.height="100vh",document.documentElement.style.overflowY=e&&"scroll"};n.resumeScroll=function(){try{onResumeScroll.forEach((function(e){return e()}))}catch(e){}document.body.style.position=n.position,document.body.style.top=n.offsetY,document.body.style.left=n.offsetX,document.body.style.width=n.width,document.body.style.height=n.height,document.documentElement.style.width=n.documentWidth,document.documentElement.style.height=n.documentHeight,document.documentElement.style.overflowY=n.overflowY,window.scrollTo(n.scrollX,n.scrollY),n.position=null,n.offsetY=null,n.offsetX=null,n.width=null,n.height=null,n.documentWidth=null,n.documentHeight=null,n.overflowY=null,n.scrollX=null,n.scrollY=null};n.onPreventScroll=function(e){onPreventScroll.add(e)};n.onResumeScroll=function(e){onResumeScroll.add(e)};Object.defineProperty(n,"scroll",{get:function(){return scroll||(scroll=new Scroll,lastPageYOffset=window.pageYOffset,lastPageXOffset=window.pageXOffset,scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1,window.addEventListener("unload",(function(){return scroll.unload()}))),scroll},enumerable:false,configurable:true});return n}();var updateScrollValue=function(){var e=window.pageYOffset,t=window.pageXOffset;scrollIsDown=e>lastPageYOffset,scrollIsUp=e<lastPageYOffset,scrollIsRight=t>lastPageXOffset,scrollIsLeft=t<lastPageXOffset,lastPageYOffset=e||window.pageYOffset,lastPageXOffset=t||window.pageXOffset};var Scroll=function(){function e(){document.addEventListener("scroll",updateScrollValue,{passive:!0})}Object.defineProperty(e.prototype,"down",{get:function(){return scrollIsDown},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"up",{get:function(){return scrollIsUp},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"left",{get:function(){return scrollIsLeft},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"right",{get:function(){return scrollIsRight},enumerable:false,configurable:true});e.prototype.unload=function(){document.removeEventListener("scroll",updateScrollValue),scrollIsDown=!1,scrollIsUp=!1,scrollIsLeft=!1,scrollIsRight=!1,lastPageYOffset=window.pageYOffset,lastPageXOffset=window.pageXOffset,scroll=null};return e}();var Event=function(){function e(){}e.mute=function(e){return!!t.exists(e)&&(t.isFunction(e.preventDefault)&&e.preventDefault(),t.isFunction(e.stopPropagation)&&e.stopPropagation(),t.isFunction(e.stopImmediatePropagation)&&e.stopImmediatePropagation(),t.exists(e.cancelBubble)&&(e.cancelBubble=!0),!1)};return e}();var readFieldNames=function(e){var t=e.getAttribute("id"),n=__spreadArray([],e.querySelectorAll("[name]"),true).map((function(e){return e.name})),r=t?__spreadArray([],document.querySelectorAll('[form="'.concat(t,'"]')),true).map((function(e){return e.name})):[];return __spreadArray(__spreadArray([],n,true),r,true)},readData=function(e){return new window.FormData(e)},read=function(e){var n={};try{readData(e).forEach((function(e,r){var o=n[r];t.isArray(o)?n[r].push(e):t.exists(o)?n[r]=[n[r],e]:n[r]=e}))}catch(t){__spreadArray([],e.elements,true).forEach((function(e){var t=e.name,r=e.type,o=e.value,i=e.files;if("file"===r)n[t]=i[0];else if("checkbox"===r||"radio"===r)e.checked&&(n[t]=o);else if(e.multiple){var u=[];e.querySelectorAll("option").forEach((function(e){return e.selected&&u.push(e.value)})),n[t]=u.length<2?u[0]:u}else n[t]=o}))}return n},readJson=function(e){return JSON.stringify(read(e))},write=function(e,n){__spreadArray([],e.elements,true).forEach((function(e){/^select$/i.test(e.nodeName)?t.isArray(n[e.name])?__spreadArray([],e.options,true).forEach((function(t){t.selected=n[e.name].indexOf(t.value)>=0})):t.exists(n[e.name])&&(e.value=n[e.name]):t.exists(n[e.name])&&("checkbox"===e.type||"radio"===e.type?e.checked=n[e.name]===e.value:e.value=n[e.name])}))};var index={readFieldNames:readFieldNames,read:read,readData:readData,readJson:readJson,write:write};var Key=function(){function e(e,t,n){if(n===void 0){n={}}this.key=e,this.msKey=t||e,this.altKey=n.altKey||!1,this.ctrlKey=n.ctrlKey||!1,this.metaKey=n.metaKey||!1,this.shiftKey=n.shiftKey||!1}Object.defineProperty(e.prototype,"alt",{get:function(){var t=this,n=t.key,r=t.msKey,o=t.ctrlKey,i=t.metaKey,u=t.shiftKey;return new e(n,r,{altKey:!0,ctrlKey:o,metaKey:i,shiftKey:u})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ctrl",{get:function(){var t=this,n=t.key,r=t.msKey,o=t.altKey,i=t.metaKey,u=t.shiftKey;return new e(n,r,{altKey:o,ctrlKey:!0,metaKey:i,shiftKey:u})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"meta",{get:function(){var t=this,n=t.key,r=t.msKey,o=t.altKey,i=t.ctrlKey,u=t.shiftKey;return new e(n,r,{altKey:o,ctrlKey:i,metaKey:!0,shiftKey:u})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"shift",{get:function(){var t=this,n=t.key,r=t.msKey,o=t.altKey,i=t.ctrlKey,u=t.metaKey;return new e(n,r,{altKey:o,ctrlKey:i,metaKey:u,shiftKey:!0})},enumerable:false,configurable:true});e.prototype.equals=function(t){return t instanceof e&&this.altKey===t.altKey&&this.ctrlKey===t.ctrlKey&&this.metaKey===t.metaKey&&this.shiftKey===t.shiftKey&&(this.key===t.key||this.msKey===t.msKey)};e.prototype.didFire=function(t){var n=t.code,r=t.key,o=t.altKey,i=t.ctrlKey,u=t.metaKey,a=t.shiftKey,s="Dead"===r?n:r;return t&&("ANY"===this.key||this.equals(new e(s,s,{altKey:o,ctrlKey:i,metaKey:u,shiftKey:a})))};Object.defineProperty(e,"press",{get:function(){return"keypress"},enumerable:false,configurable:true});Object.defineProperty(e,"down",{get:function(){return"keydown"},enumerable:false,configurable:true});Object.defineProperty(e,"up",{get:function(){return"keyup"},enumerable:false,configurable:true});Object.defineProperty(e,"any",{get:function(){return new e("ANY")},enumerable:false,configurable:true});Object.defineProperty(e,"esc",{get:function(){return new e("Escape","Esc")},enumerable:false,configurable:true});Object.defineProperty(e,"enter",{get:function(){return new e("Enter")},enumerable:false,configurable:true});Object.defineProperty(e,"space",{get:function(){return new e(" ","Spacebar")},enumerable:false,configurable:true});Object.defineProperty(e,"tab",{get:function(){return new e("Tab")},enumerable:false,configurable:true});Object.defineProperty(e,"left",{get:function(){return new e("ArrowLeft","Left")},enumerable:false,configurable:true});Object.defineProperty(e,"right",{get:function(){return new e("ArrowRight","Right")},enumerable:false,configurable:true});return e}();var Swipe=function(){function e(e,t){if(t===void 0){t=0}this.didTouchStart=this.didTouchStart.bind(this),this.didTouchEnd=this.didTouchEnd.bind(this),this.didTouchMove=this.didTouchMove.bind(this),e.addEventListener("touchstart",this.didTouchStart,{capture:!1,passive:!0}),e.addEventListener("touchend",this.didTouchEnd,{capture:!1,passive:!0}),e.addEventListener("touchmove",this.didTouchMove,{capture:!1,passive:!0}),this.element=e,this.tolerance=t,this.didSwipeLeft=function(){},this.didSwipeRight=function(){},this.didMove=function(){}}e.prototype.onLeft=function(e){return this.didSwipeLeft=e,this};e.prototype.onRight=function(e){return this.didSwipeRight=e,this};e.prototype.onMove=function(e){return this.didMove=e,this};e.prototype.destroy=function(){var e=this.element;return e.removeEventListener("touchstart",this.didTouchStart,{capture:!1}),e.removeEventListener("touchend",this.didTouchEnd,{capture:!1}),e.removeEventListener("touchmove",this.didTouchMove,{capture:!1}),this};e.prototype.didTouchStart=function(e){var t=e.touches[0];this.touchStartPoint=new O(t.pageX,t.pageY)};e.prototype.didTouchEnd=function(e){var t=e.changedTouches[0],n=this.touchStartPoint,r=new O(t.pageX,t.pageY);r.isLeftOf(n)&&Math.abs(r.distanceFrom(n).x)>this.tolerance&&this.didSwipeLeft(e),r.isRightOf(n)&&Math.abs(r.distanceFrom(n).x)>this.tolerance&&this.didSwipeRight(e)};e.prototype.didTouchMove=function(e){var t=e.touches[0],n=this.touchStartPoint,r=new O(t.pageX,t.pageY);this.didMove({distance:r.distanceFrom(n),up:r.isAbove(n),down:r.isBelow(n),left:r.isLeftOf(n),right:r.isRightOf(n)})};return e}();export{Document as D,Event as E,Key as K,Swipe as S,Device as a,index as i};
@@ -1,12 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,c;o<n;o++){if(c||!(o in t)){if(!c)c=Array.prototype.slice.call(t,0,o);c[o]=t[o]}}return e.concat(c||Array.prototype.slice.call(t))};
2
- /**
3
- * @license
4
- * Copyright Google Inc. All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
8
- *
9
- * This file is a port of shadowCSS from webcomponents.js to TypeScript.
10
- * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
11
- * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
12
- */var safeSelector=function(e){var t=[];var r=0;var o;e=e.replace(/(\[[^\]]*\])/g,(function(e,o){var n="__ph-".concat(r,"__");t.push(o);r++;return n}));o=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(function(e,o,n){var c="__ph-".concat(r,"__");t.push(n);r++;return o+c}));var n={content:o,placeholders:t};return n};var restoreSafeSelector=function(e,t){return t.replace(/__ph-(\d+)__/g,(function(t,r){return e[+r]}))};var _polyfillHost="-shadowcsshost";var _polyfillSlotted="-shadowcssslotted";var _polyfillHostContext="-shadowcsscontext";var _parenSuffix=")(?:\\(("+"(?:\\([^)(]*\\)|[^)(]*)+?"+")\\))?([^,{]*)";var _cssColonHostRe=new RegExp("("+_polyfillHost+_parenSuffix,"gim");var _cssColonHostContextRe=new RegExp("("+_polyfillHostContext+_parenSuffix,"gim");var _cssColonSlottedRe=new RegExp("("+_polyfillSlotted+_parenSuffix,"gim");var _polyfillHostNoCombinator=_polyfillHost+"-no-combinator";var _polyfillHostNoCombinatorRe=/-shadowcsshost-no-combinator([^\s]*)/;var _shadowDOMSelectorsRe=[/::shadow/g,/::content/g];var _selectorReSuffix="([>\\s~+[.,{:][\\s\\S]*)?$";var _polyfillHostRe=/-shadowcsshost/gim;var _colonHostRe=/:host/gim;var _colonSlottedRe=/::slotted/gim;var _colonHostContextRe=/:host-context/gim;var _commentRe=/\/\*\s*[\s\S]*?\*\//g;var stripComments=function(e){return e.replace(_commentRe,"")};var _commentWithHashRe=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;var extractCommentsWithHash=function(e){return e.match(_commentWithHashRe)||[]};var _ruleRe=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;var _curlyRe=/([{}])/g;var _selectorPartsRe=/(^.*?[^\\])??((:+)(.*)|$)/;var OPEN_CURLY="{";var CLOSE_CURLY="}";var BLOCK_PLACEHOLDER="%BLOCK%";var processRules=function(e,t){var r=escapeBlocks(e);var o=0;return r.escapedString.replace(_ruleRe,(function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var c=e[2];var s="";var l=e[4];var a="";if(l&&l.startsWith("{"+BLOCK_PLACEHOLDER)){s=r.blocks[o++];l=l.substring(BLOCK_PLACEHOLDER.length+1);a="{"}var i={selector:c,content:s};var p=t(i);return"".concat(e[1]).concat(p.selector).concat(e[3]).concat(a).concat(p.content).concat(l)}))};var escapeBlocks=function(e){var t=e.split(_curlyRe);var r=[];var o=[];var n=0;var c=[];for(var s=0;s<t.length;s++){var l=t[s];if(l===CLOSE_CURLY){n--}if(n>0){c.push(l)}else{if(c.length>0){o.push(c.join(""));r.push(BLOCK_PLACEHOLDER);c=[]}r.push(l)}if(l===OPEN_CURLY){n++}}if(c.length>0){o.push(c.join(""));r.push(BLOCK_PLACEHOLDER)}var a={escapedString:r.join(""),blocks:o};return a};var insertPolyfillHostInCssText=function(e){e=e.replace(_colonHostContextRe,_polyfillHostContext).replace(_colonHostRe,_polyfillHost).replace(_colonSlottedRe,_polyfillSlotted);return e};var convertColonRule=function(e,t,r){return e.replace(t,(function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e[2]){var o=e[2].split(",");var n=[];for(var c=0;c<o.length;c++){var s=o[c].trim();if(!s)break;n.push(r(_polyfillHostNoCombinator,s,e[3]))}return n.join(",")}else{return _polyfillHostNoCombinator+e[3]}}))};var colonHostPartReplacer=function(e,t,r){return e+t.replace(_polyfillHost,"")+r};var convertColonHost=function(e){return convertColonRule(e,_cssColonHostRe,colonHostPartReplacer)};var colonHostContextPartReplacer=function(e,t,r){if(t.indexOf(_polyfillHost)>-1){return colonHostPartReplacer(e,t,r)}else{return e+t+r+", "+t+" "+e+r}};var convertColonSlotted=function(e,t){var r="."+t+" > ";var o=[];e=e.replace(_cssColonSlottedRe,(function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e[2]){var n=e[2].trim();var c=e[3];var s=r+n+c;var l="";for(var a=e[4]-1;a>=0;a--){var i=e[5][a];if(i==="}"||i===","){break}l=i+l}var p=l+s;var v="".concat(l.trimRight()).concat(s.trim());if(p.trim()!==v.trim()){var f="".concat(v,", ").concat(p);o.push({orgSelector:p,updatedSelector:f})}return s}else{return _polyfillHostNoCombinator+e[3]}}));return{selectors:o,cssText:e}};var convertColonHostContext=function(e){return convertColonRule(e,_cssColonHostContextRe,colonHostContextPartReplacer)};var convertShadowDOMSelectors=function(e){return _shadowDOMSelectorsRe.reduce((function(e,t){return e.replace(t," ")}),e)};var makeScopeMatcher=function(e){var t=/\[/g;var r=/\]/g;e=e.replace(t,"\\[").replace(r,"\\]");return new RegExp("^("+e+")"+_selectorReSuffix,"m")};var selectorNeedsScoping=function(e,t){var r=makeScopeMatcher(t);return!r.test(e)};var injectScopingSelector=function(e,t){return e.replace(_selectorPartsRe,(function(e,r,o,n,c){if(r===void 0){r=""}if(n===void 0){n=""}if(c===void 0){c=""}return r+t+n+c}))};var applySimpleSelectorScope=function(e,t,r){_polyfillHostRe.lastIndex=0;if(_polyfillHostRe.test(e)){var o=".".concat(r);return e.replace(_polyfillHostNoCombinatorRe,(function(e,t){return injectScopingSelector(t,o)})).replace(_polyfillHostRe,o+" ")}return t+" "+e};var applyStrictSelectorScope=function(e,t,r){var o=/\[is=([^\]]*)\]/g;t=t.replace(o,(function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}return t[0]}));var n="."+t;var c=function(e){var o=e.trim();if(!o){return""}if(e.indexOf(_polyfillHostNoCombinator)>-1){o=applySimpleSelectorScope(e,t,r)}else{var c=e.replace(_polyfillHostRe,"");if(c.length>0){o=injectScopingSelector(c,n)}}return o};var s=safeSelector(e);e=s.content;var l="";var a=0;var i;var p=/( |>|\+|~(?!=))\s*/g;var v=e.indexOf(_polyfillHostNoCombinator)>-1;var f=!v;while((i=p.exec(e))!==null){var u=i[1];var _=e.slice(a,i.index).trim();f=f||_.indexOf(_polyfillHostNoCombinator)>-1;var h=f?c(_):_;l+="".concat(h," ").concat(u," ");a=p.lastIndex}var S=e.substring(a);f=f||S.indexOf(_polyfillHostNoCombinator)>-1;l+=f?c(S):S;return restoreSafeSelector(s.placeholders,l)};var scopeSelector=function(e,t,r,o){return e.split(",").map((function(e){if(o&&e.indexOf("."+o)>-1){return e.trim()}if(selectorNeedsScoping(e,t)){return applyStrictSelectorScope(e,t,r).trim()}else{return e.trim()}})).join(", ")};var scopeSelectors=function(e,t,r,o,n){return processRules(e,(function(e){var n=e.selector;var c=e.content;if(e.selector[0]!=="@"){n=scopeSelector(e.selector,t,r,o)}else if(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document")){c=scopeSelectors(e.content,t,r,o)}var s={selector:n.replace(/\s{2,}/g," ").trim(),content:c};return s}))};var scopeCssText=function(e,t,r,o,n){e=insertPolyfillHostInCssText(e);e=convertColonHost(e);e=convertColonHostContext(e);var c=convertColonSlotted(e,o);e=c.cssText;e=convertShadowDOMSelectors(e);if(t){e=scopeSelectors(e,t,r,o)}e=e.replace(/-shadowcsshost-no-combinator/g,".".concat(r));e=e.replace(/>\s*\*\s+([^{, ]+)/gm," $1 ");return{cssText:e.trim(),slottedSelectors:c.selectors}};var scopeCss=function(e,t,r){var o=t+"-h";var n=t+"-s";var c=extractCommentsWithHash(e);e=stripComments(e);var s=[];if(r){var l=function(e){var t="/*!@___".concat(s.length,"___*/");var r="/*!@".concat(e.selector,"*/");s.push({placeholder:t,comment:r});e.selector=t+e.selector;return e};e=processRules(e,(function(e){if(e.selector[0]!=="@"){return l(e)}else if(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document")){e.content=processRules(e.content,l);return e}return e}))}var a=scopeCssText(e,t,o,n);e=__spreadArray([a.cssText],c,true).join("\n");if(r){s.forEach((function(t){var r=t.placeholder,o=t.comment;e=e.replace(r,o)}))}a.slottedSelectors.forEach((function(t){e=e.replace(t.orgSelector,t.updatedSelector)}));return e};export{scopeCss};
@@ -1,3 +0,0 @@
1
- const globalScripts = () => {};
2
-
3
- export { globalScripts as g };
@@ -1 +0,0 @@
1
- System.register([],(function(t){"use strict";return{execute:function(){var e=t("g",(function(){}))}}}));
@@ -1,4 +0,0 @@
1
- /*
2
- Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
3
- */
4
- 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.slice(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,"\\.".concat(t),".".concat(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="".concat(s.scopeId,"-").concat(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);