@postnord/pn-marketweb-components 2.0.140 → 2.0.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (665) hide show
  1. package/cjs/{index-e3e27c79.js → index-4199ff85.js} +595 -278
  2. package/cjs/{index-28bbc937.js → index-95e5b7f9.js} +1 -1
  3. package/cjs/loader.cjs.js +3 -2
  4. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
  5. package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
  6. package/cjs/pn-breakpoints.cjs.entry.js +2 -2
  7. package/cjs/pn-chart.cjs.entry.js +8 -7
  8. package/cjs/pn-charts-card.cjs.entry.js +9 -2
  9. package/cjs/pn-choice-button.cjs.entry.js +5 -2
  10. package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
  11. package/cjs/pn-customernumber-selector.cjs.entry.js +2 -2
  12. package/cjs/pn-filter-checkbox.cjs.entry.js +5 -2
  13. package/cjs/pn-find-price-result.cjs.entry.js +7 -4
  14. package/cjs/{pn-find-price-store-0b8c195c.js → pn-find-price-store-6b418730.js} +1 -1
  15. package/cjs/pn-find-price.cjs.entry.js +4 -4
  16. package/cjs/pn-find-service-and-price-result.cjs.entry.js +4 -4
  17. package/cjs/{pn-find-service-and-price-store-16a7936c.js → pn-find-service-and-price-store-6e26630d.js} +1 -1
  18. package/cjs/pn-find-service-and-price.cjs.entry.js +4 -4
  19. package/cjs/pn-language-selector_9.cjs.entry.js +16 -39
  20. package/cjs/pn-line-shape.cjs.entry.js +2 -2
  21. package/cjs/pn-mainnav-link.cjs.entry.js +4 -10
  22. package/cjs/{pn-mainnav-store-61a75ea0.js → pn-mainnav-store-8c337865.js} +1 -1
  23. package/cjs/pn-market-web-components.cjs.js +6 -2
  24. package/cjs/pn-marketweb-input.cjs.entry.js +2 -7
  25. package/cjs/pn-marketweb-search.cjs.entry.js +2 -6
  26. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +10 -15
  27. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +2 -2
  28. package/cjs/pn-marketweb-siteheader-login-links_2.cjs.entry.js +3 -5
  29. package/cjs/pn-marketweb-siteheader.cjs.entry.js +8 -35
  30. package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
  31. package/cjs/pn-pex-pricefinder.cjs.entry.js +2 -5
  32. package/cjs/pn-product-card_4.cjs.entry.js +16 -7
  33. package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
  34. package/cjs/pn-product-pricelist.cjs.entry.js +4 -4
  35. package/cjs/pn-product-tile-info_2.cjs.entry.js +10 -3
  36. package/cjs/pn-product-tile.cjs.entry.js +2 -2
  37. package/cjs/pn-profile-modal-customernumber.cjs.entry.js +2 -2
  38. package/cjs/pn-profile-modal-profile.cjs.entry.js +4 -4
  39. package/cjs/{pn-profile-modal-store-6117e304.js → pn-profile-modal-store-947b08ae.js} +1 -1
  40. package/cjs/pn-profile-modal-type.cjs.entry.js +4 -4
  41. package/cjs/pn-profile-modal.cjs.entry.js +4 -4
  42. package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
  43. package/cjs/pn-profile-selector.cjs.entry.js +5 -5
  44. package/cjs/pn-proxio-pricegroup.cjs.entry.js +3 -5
  45. package/cjs/pn-proxio-productcard_4.cjs.entry.js +12 -5
  46. package/cjs/pn-quick-cta.cjs.entry.js +2 -2
  47. package/cjs/pn-quote-card.cjs.entry.js +2 -3
  48. package/cjs/pn-sidenav-level.cjs.entry.js +4 -4
  49. package/cjs/pn-sidenav-link.cjs.entry.js +4 -12
  50. package/cjs/{pn-sidenav-store-d9bd9e00.js → pn-sidenav-store-d2389306.js} +1 -1
  51. package/cjs/pn-sidenav-togglebutton.cjs.entry.js +4 -5
  52. package/cjs/pn-sidenav.cjs.entry.js +4 -6
  53. package/cjs/pn-site-footer_2.cjs.entry.js +4 -5
  54. package/cjs/pn-spotlight.cjs.entry.js +2 -2
  55. package/cjs/pn-stats-info-data.cjs.entry.js +8 -8
  56. package/cjs/pn-stats-info.cjs.entry.js +2 -2
  57. package/cjs/pn-teaser-card.cjs.entry.js +3 -4
  58. package/collection/collection-manifest.json +2 -2
  59. package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js +12 -11
  60. package/collection/components/cards/pn-quote-card/pn-quote-card.js +68 -79
  61. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +109 -113
  62. package/collection/components/charts/pn-chart/pn-chart.js +81 -74
  63. package/collection/components/charts/pn-charts-card/pn-charts-card.js +142 -146
  64. package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +133 -128
  65. package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +51 -49
  66. package/collection/components/cta/pn-spotlight/pn-spotlight.js +51 -51
  67. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +119 -114
  68. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +82 -77
  69. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +93 -87
  70. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +193 -195
  71. package/collection/components/input/pn-choice-button/pn-choice-button.js +145 -137
  72. package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +128 -122
  73. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +347 -355
  74. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +258 -260
  75. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.js +0 -3
  76. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +201 -221
  77. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +95 -90
  78. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +122 -117
  79. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +195 -204
  80. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +212 -205
  81. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +170 -172
  82. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +474 -524
  83. package/collection/components/minor/pn-titletag/pn-titletag.js +51 -49
  84. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +119 -123
  85. package/collection/components/navigation/pn-language-selector/pn-language-selector.js +71 -64
  86. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +58 -58
  87. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +92 -97
  88. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +39 -33
  89. package/collection/components/navigation/pn-mainnav/pn-mainnav.js +182 -183
  90. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +29 -22
  91. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +128 -134
  92. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +39 -34
  93. package/collection/components/navigation/pn-sidenav/pn-sidenav.js +71 -66
  94. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +11 -29
  95. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +34 -29
  96. package/collection/components/navigation/pn-site-footer/pn-site-footer.js +68 -75
  97. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +85 -89
  98. package/collection/components/navigation/pn-site-selector/pn-site-selector.js +73 -73
  99. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +68 -67
  100. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +90 -90
  101. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +85 -79
  102. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +182 -188
  103. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +91 -84
  104. package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +116 -115
  105. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +68 -67
  106. package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +78 -76
  107. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +48 -42
  108. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +163 -179
  109. package/collection/components/widgets/pn-find-price/pn-find-price.js +99 -113
  110. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +66 -67
  111. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +133 -148
  112. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +87 -102
  113. package/collection/components/widgets/pn-product-card/pn-product-card-info.js +92 -94
  114. package/collection/components/widgets/pn-product-card/pn-product-card-price.js +138 -131
  115. package/collection/components/widgets/pn-product-card/pn-product-card.js +12 -21
  116. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +101 -108
  117. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +137 -140
  118. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +70 -62
  119. package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +87 -83
  120. package/collection/components/widgets/pn-product-tile/pn-product-tile.js +12 -16
  121. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +130 -145
  122. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +87 -82
  123. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +55 -57
  124. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +70 -61
  125. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +12 -20
  126. package/collection/docs/installation/installation.stories.js +21 -0
  127. package/custom-elements/index.js +142 -193
  128. package/esm/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  129. package/esm/{index-5397620b.js → index-c118284d.js} +595 -279
  130. package/esm/loader.js +3 -2
  131. package/esm/pn-bonus-progressbar-level.entry.js +2 -2
  132. package/esm/pn-bonus-progressbar.entry.js +2 -2
  133. package/esm/pn-breakpoints.entry.js +2 -2
  134. package/esm/pn-chart.entry.js +8 -7
  135. package/esm/pn-charts-card.entry.js +9 -2
  136. package/esm/pn-choice-button.entry.js +5 -2
  137. package/esm/pn-customernumber-selector-option.entry.js +2 -2
  138. package/esm/pn-customernumber-selector.entry.js +2 -2
  139. package/esm/pn-filter-checkbox.entry.js +5 -2
  140. package/esm/pn-find-price-result.entry.js +7 -4
  141. package/esm/{pn-find-price-store-b4556c9b.js → pn-find-price-store-2cef65c5.js} +1 -1
  142. package/esm/pn-find-price.entry.js +4 -4
  143. package/esm/pn-find-service-and-price-result.entry.js +4 -4
  144. package/esm/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  145. package/esm/pn-find-service-and-price.entry.js +4 -4
  146. package/esm/pn-language-selector_9.entry.js +16 -39
  147. package/esm/pn-line-shape.entry.js +2 -2
  148. package/esm/pn-mainnav-link.entry.js +4 -10
  149. package/esm/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  150. package/esm/pn-market-web-components.js +3 -2
  151. package/esm/pn-marketweb-input.entry.js +2 -7
  152. package/esm/pn-marketweb-search.entry.js +2 -6
  153. package/esm/pn-marketweb-sitefooter.entry.js +10 -15
  154. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +2 -2
  155. package/esm/pn-marketweb-siteheader-login-links_2.entry.js +3 -5
  156. package/esm/pn-marketweb-siteheader.entry.js +8 -35
  157. package/esm/pn-parcel-tracker.entry.js +2 -2
  158. package/esm/pn-pex-pricefinder.entry.js +2 -5
  159. package/esm/pn-product-card_4.entry.js +16 -7
  160. package/esm/pn-product-pricelist-result.entry.js +3 -3
  161. package/esm/pn-product-pricelist.entry.js +4 -4
  162. package/esm/pn-product-tile-info_2.entry.js +10 -3
  163. package/esm/pn-product-tile.entry.js +2 -2
  164. package/esm/pn-profile-modal-customernumber.entry.js +2 -2
  165. package/esm/pn-profile-modal-profile.entry.js +4 -4
  166. package/esm/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  167. package/esm/pn-profile-modal-type.entry.js +4 -4
  168. package/esm/pn-profile-modal.entry.js +4 -4
  169. package/esm/pn-profile-selector-option.entry.js +2 -2
  170. package/esm/pn-profile-selector.entry.js +5 -5
  171. package/esm/pn-proxio-pricegroup.entry.js +3 -5
  172. package/esm/pn-proxio-productcard_4.entry.js +12 -5
  173. package/esm/pn-quick-cta.entry.js +2 -2
  174. package/esm/pn-quote-card.entry.js +2 -3
  175. package/esm/pn-sidenav-level.entry.js +4 -4
  176. package/esm/pn-sidenav-link.entry.js +4 -12
  177. package/esm/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  178. package/esm/pn-sidenav-togglebutton.entry.js +4 -5
  179. package/esm/pn-sidenav.entry.js +4 -6
  180. package/esm/pn-site-footer_2.entry.js +4 -5
  181. package/esm/pn-spotlight.entry.js +2 -2
  182. package/esm/pn-stats-info-data.entry.js +8 -8
  183. package/esm/pn-stats-info.entry.js +2 -2
  184. package/esm/pn-teaser-card.entry.js +3 -4
  185. package/esm/polyfills/css-shim.js +1 -1
  186. package/esm-es5/MarketWebContextService-872043cc.js +1 -1
  187. package/esm-es5/MarketWebLoginManager-9499bd89.js +1 -1
  188. package/esm-es5/convert-f6377d13.js +1 -1
  189. package/esm-es5/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  190. package/esm-es5/index-c118284d.js +2 -0
  191. package/esm-es5/loader.js +1 -1
  192. package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
  193. package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
  194. package/esm-es5/pn-breakpoints.entry.js +1 -1
  195. package/esm-es5/pn-chart.entry.js +2 -2
  196. package/esm-es5/pn-charts-card.entry.js +1 -1
  197. package/esm-es5/pn-choice-button.entry.js +1 -1
  198. package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
  199. package/esm-es5/pn-customernumber-selector.entry.js +1 -1
  200. package/esm-es5/pn-filter-checkbox.entry.js +1 -1
  201. package/esm-es5/pn-find-price-result.entry.js +1 -1
  202. package/esm-es5/{pn-find-price-store-b4556c9b.js → pn-find-price-store-2cef65c5.js} +1 -1
  203. package/esm-es5/pn-find-price.entry.js +1 -1
  204. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
  205. package/esm-es5/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  206. package/esm-es5/pn-find-service-and-price.entry.js +1 -1
  207. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  208. package/esm-es5/pn-line-shape.entry.js +1 -1
  209. package/esm-es5/pn-mainnav-link.entry.js +1 -1
  210. package/esm-es5/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  211. package/esm-es5/pn-market-web-components.js +1 -1
  212. package/esm-es5/pn-marketweb-input.entry.js +1 -1
  213. package/esm-es5/pn-marketweb-search.entry.js +1 -1
  214. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  215. package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
  216. package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -1
  217. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  218. package/esm-es5/pn-parcel-tracker.entry.js +1 -1
  219. package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
  220. package/esm-es5/pn-product-card_4.entry.js +1 -1
  221. package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
  222. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  223. package/esm-es5/pn-product-tile-info_2.entry.js +1 -1
  224. package/esm-es5/pn-product-tile.entry.js +1 -1
  225. package/esm-es5/pn-profile-modal-customernumber.entry.js +1 -1
  226. package/esm-es5/pn-profile-modal-profile.entry.js +1 -1
  227. package/esm-es5/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  228. package/esm-es5/pn-profile-modal-type.entry.js +1 -1
  229. package/esm-es5/pn-profile-modal.entry.js +1 -1
  230. package/esm-es5/pn-profile-selector-option.entry.js +1 -1
  231. package/esm-es5/pn-profile-selector.entry.js +1 -1
  232. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
  233. package/esm-es5/pn-proxio-productcard_4.entry.js +1 -1
  234. package/esm-es5/pn-quick-cta.entry.js +1 -1
  235. package/esm-es5/pn-quote-card.entry.js +1 -1
  236. package/esm-es5/pn-sidenav-level.entry.js +1 -1
  237. package/esm-es5/pn-sidenav-link.entry.js +1 -1
  238. package/esm-es5/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  239. package/esm-es5/pn-sidenav-togglebutton.entry.js +1 -1
  240. package/esm-es5/pn-sidenav.entry.js +1 -1
  241. package/esm-es5/pn-site-footer_2.entry.js +1 -1
  242. package/esm-es5/pn-spotlight.entry.js +1 -1
  243. package/esm-es5/pn-stats-info-data.entry.js +1 -1
  244. package/esm-es5/pn-stats-info.entry.js +1 -1
  245. package/esm-es5/pn-teaser-card.entry.js +1 -1
  246. package/package.json +3 -2
  247. package/pn-market-web-components/p-09d66012.system.entry.js +1 -0
  248. package/pn-market-web-components/{p-1c38553b.system.entry.js → p-0c46847e.system.entry.js} +1 -1
  249. package/pn-market-web-components/p-0fbcacf3.system.entry.js +1 -0
  250. package/pn-market-web-components/p-0ffa3353.entry.js +1 -0
  251. package/pn-market-web-components/p-1545fb34.entry.js +1 -0
  252. package/pn-market-web-components/p-156fedd7.entry.js +1 -0
  253. package/pn-market-web-components/p-15e680a8.entry.js +1 -0
  254. package/pn-market-web-components/{p-28bad7f5.system.entry.js → p-16afb058.system.entry.js} +1 -1
  255. package/pn-market-web-components/p-17fb8d9e.entry.js +1 -0
  256. package/pn-market-web-components/p-19b622e7.entry.js +1 -0
  257. package/pn-market-web-components/p-1a9b2a0e.system.entry.js +1 -0
  258. package/pn-market-web-components/{p-a43543e5.system.entry.js → p-1ae6cc5f.system.entry.js} +1 -1
  259. package/pn-market-web-components/p-1c382898.entry.js +1 -0
  260. package/pn-market-web-components/{p-fc1083d2.system.entry.js → p-1d50340b.system.entry.js} +1 -1
  261. package/pn-market-web-components/p-1f8423d6.entry.js +1 -0
  262. package/pn-market-web-components/{p-1ce871c5.system.entry.js → p-1fb4eae4.system.entry.js} +1 -1
  263. package/pn-market-web-components/{p-80dce81e.system.entry.js → p-2145d5e0.system.entry.js} +1 -1
  264. package/pn-market-web-components/p-22a60cb6.system.entry.js +1 -0
  265. package/pn-market-web-components/p-247cd393.entry.js +1 -0
  266. package/pn-market-web-components/p-2967a563.entry.js +1 -0
  267. package/pn-market-web-components/p-31fd7a95.system.js +1 -1
  268. package/pn-market-web-components/p-34c0b146.entry.js +1 -0
  269. package/pn-market-web-components/p-34fefe22.entry.js +1 -0
  270. package/pn-market-web-components/p-37d26cef.entry.js +1 -0
  271. package/pn-market-web-components/p-38f135fd.entry.js +1 -0
  272. package/pn-market-web-components/{p-a5f75560.system.js → p-396b254a.system.js} +1 -1
  273. package/pn-market-web-components/{p-94958580.system.js → p-3a450371.system.js} +1 -1
  274. package/pn-market-web-components/p-41b34b21.entry.js +1 -0
  275. package/pn-market-web-components/p-4305724d.entry.js +1 -0
  276. package/pn-market-web-components/{p-add7d76c.system.js → p-441249d9.system.js} +1 -1
  277. package/pn-market-web-components/p-44c05fba.entry.js +1 -0
  278. package/pn-market-web-components/p-44f58f15.js +1 -0
  279. package/pn-market-web-components/p-4653f5db.system.entry.js +1 -0
  280. package/pn-market-web-components/p-47d717a3.entry.js +1 -0
  281. package/pn-market-web-components/{p-18380cb2.system.entry.js → p-488a5506.system.entry.js} +1 -1
  282. package/pn-market-web-components/p-48c74c53.entry.js +1 -0
  283. package/pn-market-web-components/p-49f60496.entry.js +1 -0
  284. package/pn-market-web-components/p-4a8e35d3.system.entry.js +1 -0
  285. package/pn-market-web-components/{p-198d9c77.system.entry.js → p-4ccf1b55.system.entry.js} +1 -1
  286. package/pn-market-web-components/{p-7079df88.system.entry.js → p-4d561de4.system.entry.js} +1 -1
  287. package/pn-market-web-components/p-4ef54288.entry.js +1 -0
  288. package/pn-market-web-components/p-507f8886.entry.js +1 -0
  289. package/pn-market-web-components/{p-74d35edf.system.entry.js → p-545a40a7.system.entry.js} +1 -1
  290. package/pn-market-web-components/{p-2b67469f.system.entry.js → p-5a41c1bb.system.entry.js} +1 -1
  291. package/pn-market-web-components/{p-723b9901.system.entry.js → p-5a506356.system.entry.js} +1 -1
  292. package/pn-market-web-components/p-5a6761da.js +1 -0
  293. package/pn-market-web-components/{p-8117b79e.system.entry.js → p-68324e6f.system.entry.js} +1 -1
  294. package/pn-market-web-components/{p-7b9fb94f.system.entry.js → p-6d050c3a.system.entry.js} +1 -1
  295. package/pn-market-web-components/{p-a275bffb.system.entry.js → p-6e43a937.system.entry.js} +1 -1
  296. package/pn-market-web-components/{p-02ea55ad.system.js → p-6f1d6a1a.system.js} +1 -1
  297. package/pn-market-web-components/p-73ee3141.entry.js +1 -0
  298. package/pn-market-web-components/p-7c1b31e8.js +2 -0
  299. package/pn-market-web-components/p-7d992089.entry.js +1 -0
  300. package/pn-market-web-components/p-7decf8dd.entry.js +1 -0
  301. package/pn-market-web-components/p-7dff99ed.entry.js +1 -0
  302. package/pn-market-web-components/p-8079dfd5.system.entry.js +1 -0
  303. package/pn-market-web-components/p-82db879c.entry.js +1 -0
  304. package/pn-market-web-components/p-833bab34.entry.js +1 -0
  305. package/pn-market-web-components/{p-290d5824.system.entry.js → p-853e6559.system.entry.js} +1 -1
  306. package/pn-market-web-components/p-8766fa86.system.js +1 -1
  307. package/pn-market-web-components/{p-cd68d0e8.system.entry.js → p-8879ac54.system.entry.js} +1 -1
  308. package/pn-market-web-components/{p-679ebd2a.system.entry.js → p-8a834594.system.entry.js} +1 -1
  309. package/pn-market-web-components/p-8acb60c5.entry.js +1 -0
  310. package/pn-market-web-components/p-8b28ac30.entry.js +1 -0
  311. package/pn-market-web-components/{p-450cbe76.system.entry.js → p-8ca063a9.system.entry.js} +1 -1
  312. package/pn-market-web-components/{p-9edaf6b6.system.entry.js → p-8cefd900.system.entry.js} +1 -1
  313. package/pn-market-web-components/{p-58a57436.system.entry.js → p-8fee0115.system.entry.js} +1 -1
  314. package/pn-market-web-components/{p-aa271997.system.entry.js → p-9010c32a.system.entry.js} +1 -1
  315. package/pn-market-web-components/p-9a6af82e.entry.js +1 -0
  316. package/pn-market-web-components/{p-4f67721e.system.entry.js → p-9f95b3c9.system.entry.js} +1 -1
  317. package/pn-market-web-components/{p-0cacf9fb.js → p-a1a58fe4.js} +1 -1
  318. package/pn-market-web-components/p-a3b8ec51.system.entry.js +1 -0
  319. package/pn-market-web-components/p-a5faec68.system.js +2 -0
  320. package/pn-market-web-components/p-a61101e6.entry.js +1 -0
  321. package/pn-market-web-components/p-a781c8dd.entry.js +1 -0
  322. package/pn-market-web-components/p-a799fee1.entry.js +1 -0
  323. package/pn-market-web-components/{p-1610d018.system.entry.js → p-ab5fdc81.system.entry.js} +1 -1
  324. package/pn-market-web-components/{p-2718b89a.system.entry.js → p-abfed655.system.entry.js} +1 -1
  325. package/pn-market-web-components/p-ad1f57dc.entry.js +1 -0
  326. package/pn-market-web-components/p-b0102ff6.entry.js +1 -0
  327. package/pn-market-web-components/{p-625fb7fb.system.entry.js → p-b890f3f9.system.entry.js} +1 -1
  328. package/pn-market-web-components/p-beefd9f7.entry.js +1 -0
  329. package/pn-market-web-components/p-bfe239ca.js +1 -1
  330. package/pn-market-web-components/p-c229035c.entry.js +1 -0
  331. package/pn-market-web-components/{p-84699999.js → p-c5727e83.js} +1 -1
  332. package/pn-market-web-components/{p-447ef543.system.entry.js → p-c576ac3e.system.entry.js} +1 -1
  333. package/pn-market-web-components/p-c5bb2237.system.entry.js +1 -0
  334. package/pn-market-web-components/p-c7e8ab14.entry.js +1 -0
  335. package/pn-market-web-components/{p-af415c1a.system.entry.js → p-ca1f0abc.system.entry.js} +1 -1
  336. package/pn-market-web-components/p-ccf891fc.entry.js +16 -0
  337. package/pn-market-web-components/p-cd6b402e.system.entry.js +1 -0
  338. package/pn-market-web-components/p-ced9727b.system.js +1 -1
  339. package/pn-market-web-components/p-d295ef71.system.js +1 -0
  340. package/pn-market-web-components/{p-825b8fb8.system.js → p-d34c9be2.system.js} +1 -1
  341. package/pn-market-web-components/p-d5ae9797.entry.js +1 -0
  342. package/pn-market-web-components/p-d70e685c.entry.js +1 -0
  343. package/pn-market-web-components/p-d9dec5b8.entry.js +1 -0
  344. package/pn-market-web-components/p-dbd7837e.entry.js +1 -0
  345. package/pn-market-web-components/p-dc598ef8.entry.js +1 -0
  346. package/pn-market-web-components/p-e0e45eb0.system.entry.js +1 -0
  347. package/pn-market-web-components/p-e1513762.entry.js +1 -0
  348. package/pn-market-web-components/p-e4754d3b.system.entry.js +1 -0
  349. package/pn-market-web-components/{p-36a1b8e1.system.entry.js → p-e4961116.system.entry.js} +1 -1
  350. package/pn-market-web-components/p-e4fbd06c.entry.js +1 -0
  351. package/pn-market-web-components/{p-93cecc43.system.entry.js → p-e737c51d.system.entry.js} +1 -1
  352. package/pn-market-web-components/{p-86f06e26.js → p-ecaad0c1.js} +1 -1
  353. package/pn-market-web-components/p-ed5e91eb.system.entry.js +1 -0
  354. package/pn-market-web-components/{p-e6fa11ad.system.entry.js → p-ef721555.system.entry.js} +1 -1
  355. package/pn-market-web-components/{p-c4254e9e.js → p-f04afb39.js} +1 -1
  356. package/pn-market-web-components/{p-37017f68.system.js → p-f4a6d005.system.js} +1 -1
  357. package/pn-market-web-components/{p-1151bf60.system.entry.js → p-f7cb2ef9.system.entry.js} +1 -1
  358. package/pn-market-web-components/{p-e66a8bb8.system.entry.js → p-f9725e57.system.entry.js} +1 -1
  359. package/pn-market-web-components/{p-c7d886d7.system.entry.js → p-fdec849a.system.entry.js} +2 -2
  360. package/pn-market-web-components/p-ff975b67.entry.js +1 -0
  361. package/pn-market-web-components/{p-b88337dd.system.entry.js → p-ffe18938.system.entry.js} +1 -1
  362. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  363. package/pn-market-web-components/pn-market-web-components.js +2 -1
  364. package/types/components.d.ts +53 -21
  365. package/types/stencil-public-runtime.d.ts +79 -7
  366. package/umd/pn-marketweb-init.js +1 -1
  367. package/umd/pn-marketweb-salesforce.js +2 -2
  368. package/esm-es5/index-5397620b.js +0 -1
  369. package/pn-market-web-components/p-022d9a78.entry.js +0 -1
  370. package/pn-market-web-components/p-0796f9b2.entry.js +0 -1
  371. package/pn-market-web-components/p-08411f5e.entry.js +0 -1
  372. package/pn-market-web-components/p-0fce4494.entry.js +0 -1
  373. package/pn-market-web-components/p-15112837.entry.js +0 -1
  374. package/pn-market-web-components/p-16c4bc50.entry.js +0 -1
  375. package/pn-market-web-components/p-17c4004f.entry.js +0 -1
  376. package/pn-market-web-components/p-227e1d46.entry.js +0 -1
  377. package/pn-market-web-components/p-249964b5.entry.js +0 -1
  378. package/pn-market-web-components/p-2878af00.system.entry.js +0 -1
  379. package/pn-market-web-components/p-2a23d908.entry.js +0 -1
  380. package/pn-market-web-components/p-2a598ee8.entry.js +0 -1
  381. package/pn-market-web-components/p-2da8e5e8.system.entry.js +0 -1
  382. package/pn-market-web-components/p-332e9005.entry.js +0 -1
  383. package/pn-market-web-components/p-35af1c4a.entry.js +0 -1
  384. package/pn-market-web-components/p-35fcd76c.system.entry.js +0 -1
  385. package/pn-market-web-components/p-36654f2a.system.js +0 -1
  386. package/pn-market-web-components/p-381b3ec0.entry.js +0 -1
  387. package/pn-market-web-components/p-3ae38e63.entry.js +0 -1
  388. package/pn-market-web-components/p-3c0d63fb.system.entry.js +0 -1
  389. package/pn-market-web-components/p-4bef1bf3.entry.js +0 -1
  390. package/pn-market-web-components/p-4efe43e9.entry.js +0 -1
  391. package/pn-market-web-components/p-5117ac1f.entry.js +0 -1
  392. package/pn-market-web-components/p-58e8d7d5.js +0 -1
  393. package/pn-market-web-components/p-5b05ceb5.system.entry.js +0 -1
  394. package/pn-market-web-components/p-61dbe832.entry.js +0 -1
  395. package/pn-market-web-components/p-67380aa4.entry.js +0 -1
  396. package/pn-market-web-components/p-67887512.system.js +0 -1
  397. package/pn-market-web-components/p-715d1ef7.entry.js +0 -1
  398. package/pn-market-web-components/p-736e5b84.system.entry.js +0 -1
  399. package/pn-market-web-components/p-77557da8.entry.js +0 -1
  400. package/pn-market-web-components/p-7ce41d14.entry.js +0 -1
  401. package/pn-market-web-components/p-7fd8b012.entry.js +0 -1
  402. package/pn-market-web-components/p-81426cd9.entry.js +0 -1
  403. package/pn-market-web-components/p-81773857.entry.js +0 -1
  404. package/pn-market-web-components/p-81d764a0.entry.js +0 -1
  405. package/pn-market-web-components/p-88185835.entry.js +0 -1
  406. package/pn-market-web-components/p-885bc8d7.system.entry.js +0 -1
  407. package/pn-market-web-components/p-8db654e0.system.entry.js +0 -1
  408. package/pn-market-web-components/p-8e146205.entry.js +0 -1
  409. package/pn-market-web-components/p-8e38c337.entry.js +0 -1
  410. package/pn-market-web-components/p-8e4d292f.entry.js +0 -1
  411. package/pn-market-web-components/p-8fe91339.entry.js +0 -1
  412. package/pn-market-web-components/p-9344cd23.js +0 -1
  413. package/pn-market-web-components/p-996d8a6a.entry.js +0 -1
  414. package/pn-market-web-components/p-a247058b.system.entry.js +0 -1
  415. package/pn-market-web-components/p-a27836fc.entry.js +0 -1
  416. package/pn-market-web-components/p-a7bb94a0.entry.js +0 -1
  417. package/pn-market-web-components/p-a921d3fd.system.entry.js +0 -1
  418. package/pn-market-web-components/p-aab2e28f.entry.js +0 -1
  419. package/pn-market-web-components/p-ac0e3c22.system.entry.js +0 -1
  420. package/pn-market-web-components/p-b60a151b.entry.js +0 -16
  421. package/pn-market-web-components/p-bb626ab4.js +0 -1
  422. package/pn-market-web-components/p-bd22aaac.entry.js +0 -1
  423. package/pn-market-web-components/p-c714a790.entry.js +0 -1
  424. package/pn-market-web-components/p-d0155ddf.entry.js +0 -1
  425. package/pn-market-web-components/p-d57f4246.system.entry.js +0 -1
  426. package/pn-market-web-components/p-d7e3d918.entry.js +0 -1
  427. package/pn-market-web-components/p-e32dc098.entry.js +0 -1
  428. package/pn-market-web-components/p-e4a4e68f.system.entry.js +0 -1
  429. package/pn-market-web-components/p-e9576f26.entry.js +0 -1
  430. package/pn-market-web-components/p-e9fe5c54.entry.js +0 -1
  431. package/pn-market-web-components/p-f774e2cc.entry.js +0 -1
  432. package/pn-market-web-components/p-fc974bca.entry.js +0 -1
  433. package/pn-market-web-components/p-fd4bb638.entry.js +0 -1
  434. package/pn-market-web-components/p-fea72975.entry.js +0 -1
  435. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/LICENSE.md +0 -27
  436. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/bin/stencil +0 -57
  437. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/config-flags.d.ts +0 -102
  438. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +0 -2325
  439. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.d.ts +0 -16
  440. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +0 -2299
  441. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +0 -14
  442. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.d.ts +0 -24
  443. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.d.ts +0 -17791
  444. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.iterable.d.ts +0 -323
  445. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.collection.d.ts +0 -89
  446. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.core.d.ts +0 -559
  447. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.d.ts +0 -30
  448. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.generator.d.ts +0 -79
  449. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.iterable.d.ts +0 -497
  450. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.promise.d.ts +0 -78
  451. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.proxy.d.ts +0 -41
  452. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.reflect.d.ts +0 -123
  453. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.d.ts +0 -48
  454. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.wellknown.d.ts +0 -324
  455. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.array.include.d.ts +0 -118
  456. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.d.ts +0 -22
  457. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.full.d.ts +0 -25
  458. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.d.ts +0 -26
  459. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.full.d.ts +0 -25
  460. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.intl.d.ts +0 -32
  461. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.object.d.ts +0 -51
  462. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.sharedmemory.d.ts +0 -137
  463. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.string.d.ts +0 -47
  464. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.typedarrays.d.ts +0 -55
  465. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asyncgenerator.d.ts +0 -79
  466. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asynciterable.d.ts +0 -45
  467. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.d.ts +0 -26
  468. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.full.d.ts +0 -25
  469. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.intl.d.ts +0 -73
  470. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.promise.d.ts +0 -32
  471. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.regexp.d.ts +0 -39
  472. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.array.d.ts +0 -85
  473. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.d.ts +0 -25
  474. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.full.d.ts +0 -25
  475. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.object.d.ts +0 -35
  476. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.string.d.ts +0 -39
  477. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.symbol.d.ts +0 -26
  478. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.bigint.d.ts +0 -728
  479. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.d.ts +0 -27
  480. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.full.d.ts +0 -25
  481. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.intl.d.ts +0 -368
  482. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.promise.d.ts +0 -49
  483. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.sharedmemory.d.ts +0 -99
  484. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.string.d.ts +0 -30
  485. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.symbol.wellknown.d.ts +0 -39
  486. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.d.ts +0 -25
  487. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.full.d.ts +0 -25
  488. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.intl.d.ts +0 -44
  489. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.promise.d.ts +0 -50
  490. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.string.d.ts +0 -35
  491. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.weakref.d.ts +0 -75
  492. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es5.d.ts +0 -4495
  493. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es6.d.ts +0 -25
  494. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.d.ts +0 -22
  495. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.full.d.ts +0 -25
  496. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.intl.d.ts +0 -23
  497. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.promise.d.ts +0 -43
  498. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.string.d.ts +0 -35
  499. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.weakref.d.ts +0 -75
  500. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.scripthost.d.ts +0 -327
  501. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.d.ts +0 -5733
  502. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.importscripts.d.ts +0 -26
  503. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.iterable.d.ts +0 -160
  504. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +0 -8
  505. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.d.ts +0 -95
  506. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +0 -67330
  507. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.min.js +0 -4
  508. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dependencies.json +0 -109
  509. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/app-error.d.ts +0 -18
  510. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/events.d.ts +0 -6
  511. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-components.d.ts +0 -1
  512. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-external-styles.d.ts +0 -1
  513. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-images.d.ts +0 -1
  514. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-inline-styles.d.ts +0 -1
  515. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-util.d.ts +0 -9
  516. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-window.d.ts +0 -10
  517. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.d.ts +0 -6
  518. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +0 -808
  519. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/logger.d.ts +0 -5
  520. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +0 -8
  521. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/progress.d.ts +0 -3
  522. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/status.d.ts +0 -4
  523. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/hmr-util.spec.d.ts +0 -1
  524. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/status.spec.d.ts +0 -1
  525. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +0 -6
  526. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.d.ts +0 -3
  527. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +0 -264
  528. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/open-in-editor-api.js +0 -1
  529. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +0 -8
  530. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +0 -1765
  531. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-worker-thread.js +0 -39
  532. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/static/favicon.ico +0 -0
  533. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/directory-index.html +0 -132
  534. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/initial-load.html +0 -160
  535. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/visualstudio.vbs +0 -82
  536. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/ws.js +0 -1
  537. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/xdg-open +0 -1066
  538. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.cjs +0 -92
  539. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.d.ts +0 -4
  540. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.js +0 -88
  541. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +0 -15
  542. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/css-shim.js +0 -4
  543. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/dom.js +0 -73
  544. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +0 -3064
  545. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +0 -8
  546. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +0 -124
  547. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-esm.js +0 -23
  548. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/core-js.js +0 -11
  549. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/css-shim.js +0 -1
  550. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/dom.js +0 -79
  551. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/es5-html-element.js +0 -1
  552. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/index.js +0 -34
  553. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/system.js +0 -6
  554. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +0 -387
  555. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +0 -1132
  556. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +0 -7
  557. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.d.ts +0 -217
  558. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +0 -777
  559. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/shadow-css.js +0 -143
  560. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.d.ts +0 -4
  561. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.js +0 -2
  562. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +0 -9
  563. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.cjs +0 -1
  564. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +0 -52
  565. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.js +0 -16
  566. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +0 -41
  567. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +0 -2293
  568. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +0 -2293
  569. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +0 -116
  570. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +0 -1565
  571. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +0 -1093
  572. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +0 -7
  573. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/shadow-css.js +0 -143
  574. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +0 -4794
  575. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +0 -1004
  576. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +0 -4758
  577. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +0 -15
  578. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +0 -200
  579. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/readme.md +0 -105
  580. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/favicon.ico +0 -0
  581. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/logo.png +0 -0
  582. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.css +0 -1
  583. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.esm.js +0 -1
  584. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.js +0 -33
  585. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/index.esm.js +0 -0
  586. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-081b0641.js +0 -1
  587. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-227a1e18.entry.js +0 -1
  588. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-2c298727.entry.js +0 -1
  589. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-5479268c.entry.js +0 -1
  590. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-573ec8a4.entry.js +0 -1
  591. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6ba08604.entry.js +0 -1
  592. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6bc63295.entry.js +0 -1
  593. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7a3759fd.entry.js +0 -1
  594. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7b4e3ba7.js +0 -1
  595. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-988eb362.css +0 -1
  596. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-9b6a9315.js +0 -1
  597. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-b4cc611c.entry.js +0 -1
  598. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-d1bf53f5.entry.js +0 -1
  599. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e2efe0df.js +0 -1
  600. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e8ca6d97.entry.js +0 -1
  601. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-ec2f13e0.entry.js +0 -1
  602. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f0b99977.entry.js +0 -1
  603. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f4745c2f.entry.js +0 -1
  604. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-fbbae598.js +0 -1
  605. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/host.config.json +0 -15
  606. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/index.html +0 -1
  607. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/manifest.json +0 -13
  608. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/connector.js +0 -2
  609. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +0 -661
  610. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/local-connector.js +0 -2
  611. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +0 -15
  612. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +0 -2673
  613. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +0 -8
  614. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +0 -1
  615. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +0 -1
  616. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.d.ts +0 -18
  617. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +0 -6135
  618. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +0 -1
  619. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +0 -8
  620. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +0 -1
  621. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +0 -52
  622. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.d.ts +0 -12
  623. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +0 -4140
  624. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-config.d.ts +0 -16
  625. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-environment.d.ts +0 -15
  626. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-preprocessor.d.ts +0 -59
  627. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-runner.d.ts +0 -10
  628. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-screenshot.d.ts +0 -2
  629. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-serializer.d.ts +0 -5
  630. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-setup-test-framework.d.ts +0 -1
  631. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-config.spec.d.ts +0 -1
  632. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-preprocessor.spec.d.ts +0 -1
  633. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-runner.spec.d.ts +0 -1
  634. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-serializer.spec.d.ts +0 -1
  635. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-environment.js +0 -3
  636. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preprocessor.js +0 -3
  637. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preset.js +0 -37
  638. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-runner.js +0 -3
  639. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-setuptestframework.js +0 -3
  640. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/attributes.d.ts +0 -14
  641. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/class-list.d.ts +0 -12
  642. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/events.d.ts +0 -21
  643. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/html.d.ts +0 -12
  644. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/index.d.ts +0 -23
  645. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/screenshot.d.ts +0 -5
  646. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/text.d.ts +0 -4
  647. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mock-fetch.d.ts +0 -11
  648. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mocks.d.ts +0 -55
  649. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +0 -8
  650. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/index.d.ts +0 -2
  651. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-browser.d.ts +0 -6
  652. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-declarations.d.ts +0 -429
  653. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-element.d.ts +0 -67
  654. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  655. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-events.d.ts +0 -21
  656. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-page.d.ts +0 -2
  657. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  658. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/reset-build-conditionals.d.ts +0 -2
  659. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/spec-page.d.ts +0 -2
  660. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test/testing-utils.spec.d.ts +0 -1
  661. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test-transpile.d.ts +0 -2
  662. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-logger.d.ts +0 -25
  663. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-sys.d.ts +0 -6
  664. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-utils.d.ts +0 -78
  665. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing.d.ts +0 -2
@@ -1,4140 +0,0 @@
1
- /*!
2
- Stencil Testing v2.17.1 | MIT Licensed | https://stenciljs.com
3
- */
4
- function _lazyRequire(e) {
5
- return new Proxy({}, {
6
- get(t, r) {
7
- const s = require(e);
8
- return Reflect.get(s, r);
9
- },
10
- set(t, r, s) {
11
- const n = require(e);
12
- return Reflect.set(n, r, s);
13
- }
14
- });
15
- }
16
-
17
- function _interopDefaultLegacy(e) {
18
- return e && "object" == typeof e && "default" in e ? e : {
19
- default: e
20
- };
21
- }
22
-
23
- function _interopNamespace(e) {
24
- if (e && e.__esModule) return e;
25
- var t = Object.create(null);
26
- return e && Object.keys(e).forEach((function(r) {
27
- if ("default" !== r) {
28
- var s = Object.getOwnPropertyDescriptor(e, r);
29
- Object.defineProperty(t, r, s.get ? s : {
30
- enumerable: !0,
31
- get: function() {
32
- return e[r];
33
- }
34
- });
35
- }
36
- })), t.default = e, Object.freeze(t);
37
- }
38
-
39
- async function startPuppeteerBrowser(e) {
40
- if (!e.flags.e2e) return null;
41
- const t = process.env, r = e.testing.browserExecutablePath ? "puppeteer-core" : "puppeteer", s = e.sys.lazyRequire.getModulePath(e.rootDir, r), n = e.sys.lazyRequire.require(e.rootDir, s);
42
- t.__STENCIL_PUPPETEER_MODULE__ = s, t.__STENCIL_BROWSER_WAIT_UNTIL = e.testing.browserWaitUntil,
43
- e.flags.devtools && (e.testing.browserDevtools = !0, e.testing.browserHeadless = !1,
44
- t.__STENCIL_E2E_DEVTOOLS__ = "true"), e.logger.debug(`puppeteer: ${s}`), e.logger.debug(`puppeteer headless: ${e.testing.browserHeadless}`),
45
- Array.isArray(e.testing.browserArgs) && e.logger.debug(`puppeteer args: ${e.testing.browserArgs.join(" ")}`),
46
- "boolean" == typeof e.testing.browserDevtools && e.logger.debug(`puppeteer devtools: ${e.testing.browserDevtools}`),
47
- "number" == typeof e.testing.browserSlowMo && e.logger.debug(`puppeteer slowMo: ${e.testing.browserSlowMo}`);
48
- const o = {
49
- ignoreHTTPSErrors: !0,
50
- slowMo: e.testing.browserSlowMo
51
- };
52
- let i;
53
- if (e.testing.browserWSEndpoint) i = await n.connect({
54
- browserWSEndpoint: e.testing.browserWSEndpoint,
55
- ...o
56
- }); else {
57
- const t = {
58
- args: e.testing.browserArgs,
59
- headless: e.testing.browserHeadless,
60
- devtools: e.testing.browserDevtools,
61
- ...o
62
- };
63
- e.testing.browserExecutablePath && (t.executablePath = e.testing.browserExecutablePath),
64
- i = await n.launch({
65
- ...t
66
- });
67
- }
68
- return t.__STENCIL_BROWSER_WS_ENDPOINT__ = i.wsEndpoint(), e.logger.debug(`puppeteer browser wsEndpoint: ${t.__STENCIL_BROWSER_WS_ENDPOINT__}`),
69
- i;
70
- }
71
-
72
- function getAppStyleUrl(e, t) {
73
- return e.globalStyle ? getAppUrl(e, t, `${e.fsNamespace}.css`) : null;
74
- }
75
-
76
- function getAppUrl(e, t, r) {
77
- const s = e.outputTargets.find(isOutputTargetWww);
78
- if (s) {
79
- const e = s.buildDir, n = path$2.join(e, r), o = path$2.relative(s.dir, n);
80
- return new URL(o, t).href;
81
- }
82
- const n = e.outputTargets.find(isOutputTargetDistLazy);
83
- if (n) {
84
- const s = n.esmDir, o = path$2.join(s, r), i = path$2.relative(e.rootDir, o);
85
- return new URL(i, t).href;
86
- }
87
- return t;
88
- }
89
-
90
- function setScreenshotEmulateData(e, t) {
91
- const r = {
92
- userAgent: "default",
93
- viewport: {
94
- width: 800,
95
- height: 600,
96
- deviceScaleFactor: 1,
97
- isMobile: !1,
98
- hasTouch: !1,
99
- isLandscape: !1
100
- }
101
- };
102
- if ("string" == typeof e.device) try {
103
- const s = require(t.__STENCIL_PUPPETEER_MODULE__ + "/DeviceDescriptors")[e.device];
104
- if (!s) return void console.error(`invalid emulate device: ${e.device}`);
105
- r.device = e.device, r.userAgent = s.userAgent, r.viewport = s.viewport;
106
- } catch (e) {
107
- return void console.error("error loading puppeteer DeviceDescriptors", e);
108
- }
109
- e.viewport && ("number" == typeof e.viewport.width && (r.viewport.width = e.viewport.width),
110
- "number" == typeof e.viewport.height && (r.viewport.height = e.viewport.height),
111
- "number" == typeof e.viewport.deviceScaleFactor && (r.viewport.deviceScaleFactor = e.viewport.deviceScaleFactor),
112
- "boolean" == typeof e.viewport.hasTouch && (r.viewport.hasTouch = e.viewport.hasTouch),
113
- "boolean" == typeof e.viewport.isLandscape && (r.viewport.isLandscape = e.viewport.isLandscape),
114
- "boolean" == typeof e.viewport.isMobile && (r.viewport.isMobile = e.viewport.isMobile),
115
- "string" == typeof e.userAgent && (r.userAgent = e.userAgent)), t.__STENCIL_EMULATE__ = JSON.stringify(r);
116
- }
117
-
118
- async function runJest(e, t) {
119
- let r = !1;
120
- try {
121
- const s = function s(e, t) {
122
- let r = e.emulate.slice();
123
- if ("string" == typeof t.emulate) {
124
- const e = t.emulate.toLowerCase();
125
- r = r.filter((t => "string" == typeof t.device && t.device.toLowerCase() === e || !("string" != typeof t.userAgent || !t.userAgent.toLowerCase().includes(e))));
126
- }
127
- return r;
128
- }(e.testing, e.flags);
129
- t.__STENCIL_EMULATE_CONFIGS__ = JSON.stringify(s), t.__STENCIL_ENV__ = JSON.stringify(e.env),
130
- e.flags.ci || e.flags.e2e ? t.__STENCIL_DEFAULT_TIMEOUT__ = "30000" : t.__STENCIL_DEFAULT_TIMEOUT__ = "15000",
131
- e.flags.devtools && (t.__STENCIL_DEFAULT_TIMEOUT__ = "300000000"), e.logger.debug(`default timeout: ${t.__STENCIL_DEFAULT_TIMEOUT__}`);
132
- const n = function n(e) {
133
- const t = require("yargs"), r = [ ...e.flags.unknownArgs.slice(), ...e.flags.knownArgs.slice() ];
134
- r.some((e => e.startsWith("--max-workers") || e.startsWith("--maxWorkers"))) || r.push(`--max-workers=${e.maxConcurrentWorkers}`),
135
- e.flags.devtools && r.push("--runInBand"), e.logger.info(e.logger.magenta(`jest args: ${r.join(" ")}`));
136
- let s = t(r).argv;
137
- if (s = {
138
- detectLeaks: !1,
139
- "detect-leaks": !1,
140
- detectOpenHandles: !1,
141
- "detect-open-handles": !1,
142
- errorOnDeprecated: !1,
143
- "error-on-deprecated": !1,
144
- listTests: !1,
145
- "list-tests": !1,
146
- maxConcurrency: 5,
147
- "max-concurrency": 5,
148
- notifyMode: "failure-change",
149
- "notify-mode": "failure-change",
150
- passWithNoTests: !1,
151
- "pass-with-no-tests": !1,
152
- runTestsByPath: !1,
153
- "run-tests-by-path": !1,
154
- testLocationInResults: !1,
155
- "test-location-in-results": !1,
156
- ...s
157
- }, s.config = function n(e) {
158
- const t = e.testing, r = require("jest-config").defaults, s = Object.keys(r), n = {};
159
- return Object.keys(t).forEach((e => {
160
- s.includes(e) && (n[e] = t[e]);
161
- })), n.rootDir = e.rootDir, isString(t.collectCoverage) && (n.collectCoverage = t.collectCoverage),
162
- Array.isArray(t.collectCoverageFrom) && (n.collectCoverageFrom = t.collectCoverageFrom),
163
- isString(t.coverageDirectory) && (n.coverageDirectory = t.coverageDirectory), t.coverageThreshold && (n.coverageThreshold = t.coverageThreshold),
164
- isString(t.globalSetup) && (n.globalSetup = t.globalSetup), isString(t.globalTeardown) && (n.globalTeardown = t.globalTeardown),
165
- isString(t.preset) && (n.preset = t.preset), t.projects && (n.projects = t.projects),
166
- Array.isArray(t.reporters) && (n.reporters = t.reporters), isString(t.testResultsProcessor) && (n.testResultsProcessor = t.testResultsProcessor),
167
- t.transform && (n.transform = t.transform), t.verbose && (n.verbose = t.verbose),
168
- n.testRunner = "jest-jasmine2", JSON.stringify(n);
169
- }(e), "string" == typeof s.maxWorkers) try {
170
- s.maxWorkers = parseInt(s.maxWorkers, 10);
171
- } catch (e) {}
172
- return "string" == typeof s.ci && (s.ci = "true" === s.ci || "" === s.ci), s;
173
- }(e), o = function o(e, t) {
174
- const r = t.projects ? t.projects : [];
175
- return r.push(e.rootDir), r;
176
- }(e, n), {runCLI: i} = require("@jest/core");
177
- r = !!(await i(n, o)).results.success;
178
- } catch (t) {
179
- e.logger.error(`runJest: ${t}`);
180
- }
181
- return r;
182
- }
183
-
184
- function createBuildId() {
185
- const e = new Date;
186
- let t = e.getFullYear() + "";
187
- return t += ("0" + (e.getMonth() + 1)).slice(-2), t += ("0" + e.getDate()).slice(-2),
188
- t += ("0" + e.getHours()).slice(-2), t += ("0" + e.getMinutes()).slice(-2), t += ("0" + e.getSeconds()).slice(-2),
189
- t;
190
- }
191
-
192
- function createBuildMessage() {
193
- const e = new Date;
194
- let t = e.getFullYear() + "-";
195
- return t += ("0" + (e.getMonth() + 1)).slice(-2) + "-", t += ("0" + e.getDate()).slice(-2) + " ",
196
- t += ("0" + e.getHours()).slice(-2) + ":", t += ("0" + e.getMinutes()).slice(-2) + ":",
197
- t += ("0" + e.getSeconds()).slice(-2), `Build: ${t}`;
198
- }
199
-
200
- function transpile(e, t = {}) {
201
- t = {
202
- ...t,
203
- componentExport: null,
204
- componentMetadata: "compilerstatic",
205
- coreImportPath: isString(t.coreImportPath) ? t.coreImportPath : "@stencil/core/internal/testing",
206
- currentDirectory: t.currentDirectory || process.cwd(),
207
- module: "cjs",
208
- proxy: null,
209
- sourceMap: "inline",
210
- style: null,
211
- styleImportData: "queryparams",
212
- target: "es2015"
213
- };
214
- try {
215
- const e = process.versions.node.split(".");
216
- parseInt(e[0], 10) >= 10 && (t.target = "es2017");
217
- } catch (e) {}
218
- return stencil_js.transpileSync(e, t);
219
- }
220
-
221
- function formatDiagnostic(e) {
222
- let t = "";
223
- return e.relFilePath && (t += e.relFilePath, "number" == typeof e.lineNumber && (t += ":" + e.lineNumber + 1,
224
- "number" == typeof e.columnNumber && (t += ":" + e.columnNumber)), t += "\n"), t += e.messageText,
225
- t;
226
- }
227
-
228
- function getCompilerOptions(e) {
229
- if (_tsCompilerOptions) return _tsCompilerOptions;
230
- if ("string" != typeof e) return null;
231
- e = normalizePath(e);
232
- const t = stencil_js.ts.findConfigFile(e, stencil_js.ts.sys.fileExists);
233
- if (!t) return null;
234
- const r = stencil_js.ts.readConfigFile(t, stencil_js.ts.sys.readFile);
235
- if (r.error) throw new Error(formatDiagnostic((e => {
236
- const t = {
237
- level: "warn",
238
- type: "typescript",
239
- language: "typescript",
240
- header: "TypeScript",
241
- code: e.code.toString(),
242
- messageText: flattenDiagnosticMessageText(e, e.messageText),
243
- relFilePath: null,
244
- absFilePath: null,
245
- lines: []
246
- };
247
- if (1 === e.category && (t.level = "error"), e.file) {
248
- t.absFilePath = e.file.fileName;
249
- const s = "string" != typeof (r = e.file.text) ? [] : (r = r.replace(/\\r/g, "\n")).split("\n"), n = e.file.getLineAndCharacterOfPosition(e.start), o = {
250
- lineIndex: n.line,
251
- lineNumber: n.line + 1,
252
- text: s[n.line],
253
- errorCharStart: n.character,
254
- errorLength: Math.max(e.length, 1)
255
- };
256
- if (t.lineNumber = o.lineNumber, t.columnNumber = o.errorCharStart + 1, t.lines.push(o),
257
- 0 === o.errorLength && o.errorCharStart > 0 && (o.errorLength = 1, o.errorCharStart--),
258
- o.lineIndex > 0) {
259
- const e = {
260
- lineIndex: o.lineIndex - 1,
261
- lineNumber: o.lineNumber - 1,
262
- text: s[o.lineIndex - 1],
263
- errorCharStart: -1,
264
- errorLength: -1
265
- };
266
- t.lines.unshift(e);
267
- }
268
- if (o.lineIndex + 1 < s.length) {
269
- const e = {
270
- lineIndex: o.lineIndex + 1,
271
- lineNumber: o.lineNumber + 1,
272
- text: s[o.lineIndex + 1],
273
- errorCharStart: -1,
274
- errorLength: -1
275
- };
276
- t.lines.push(e);
277
- }
278
- }
279
- var r;
280
- return t;
281
- })(r.error)));
282
- const s = stencil_js.ts.parseJsonConfigFileContent(r.config, stencil_js.ts.sys, e, void 0, t);
283
- return _tsCompilerOptions = s.options, _tsCompilerOptions;
284
- }
285
-
286
- function compareHtml(e, t, r) {
287
- if (null == e) throw new Error(`expect toEqualHtml() value is "${e}"`);
288
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
289
- let s;
290
- if (1 === e.nodeType) {
291
- const t = function n(e) {
292
- return e && e.ownerDocument && e.ownerDocument.defaultView && e.ownerDocument.defaultView.__stencil_spec_options || {};
293
- }(e);
294
- s = index_cjs.serializeNodeToHtml(e, {
295
- prettyHtml: !0,
296
- outerHtml: !0,
297
- removeHtmlComments: !1 === t.includeAnnotations,
298
- excludeTags: [ "body" ],
299
- serializeShadowRoot: r
300
- });
301
- } else if (11 === e.nodeType) s = index_cjs.serializeNodeToHtml(e, {
302
- prettyHtml: !0,
303
- excludeTags: [ "style" ],
304
- excludeTagContent: [ "style" ],
305
- serializeShadowRoot: r
306
- }); else {
307
- if ("string" != typeof e) throw new Error("expect toEqualHtml() value should be an element, shadow root or string.");
308
- {
309
- const t = index_cjs.parseHtmlToFragment(e);
310
- s = index_cjs.serializeNodeToHtml(t, {
311
- prettyHtml: !0,
312
- serializeShadowRoot: r
313
- });
314
- }
315
- }
316
- const o = index_cjs.parseHtmlToFragment(t), i = index_cjs.serializeNodeToHtml(o, {
317
- prettyHtml: !0,
318
- excludeTags: [ "body" ]
319
- });
320
- return s !== i ? (expect(s).toBe(i), {
321
- message: () => "HTML does not match",
322
- pass: !1
323
- }) : {
324
- message: () => "expect HTML to match",
325
- pass: !0
326
- };
327
- }
328
-
329
- function toHaveClasses(e, t) {
330
- if (!e) throw new Error("expect toHaveClasses value is null");
331
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
332
- if (1 !== e.nodeType) throw new Error("expect toHaveClasses value is not an element");
333
- const r = t.every((t => e.classList.contains(t)));
334
- return {
335
- message: () => `expected to ${r ? "not " : ""}have css classes "${t.join(" ")}", but className is "${e.className}"`,
336
- pass: r
337
- };
338
- }
339
-
340
- async function globalMockFetch(e) {
341
- let t;
342
- if (null == e) throw new Error("missing url input for mock fetch()");
343
- if ("string" == typeof e) t = e; else {
344
- if ("string" != typeof e.url) throw new Error("invalid url for mock fetch()");
345
- t = e.url;
346
- }
347
- t = new URL(t, location.href).href;
348
- let r = mockedResponses.get(t);
349
- if (null == r) {
350
- const e = new URL(FETCH_DEFAULT_PATH, location.href);
351
- r = mockedResponses.get(e.href);
352
- }
353
- if (null == r) return new MockResponse404;
354
- const s = r.response.clone();
355
- return "number" != typeof s.status && (s.status = 200), "string" != typeof s.statusText && (s.status >= 500 ? s.statusText = "Internal Server Error" : 404 === s.status ? s.statusText = "Not Found" : s.status >= 400 ? s.statusText = "Bad Request" : 302 === s.status ? s.statusText = "Found" : 301 === s.status ? s.statusText = "Moved Permanently" : s.status >= 300 ? s.statusText = "Redirection" : s.statusText = "OK"),
356
- s.ok = s.status >= 200 && s.status <= 299, "string" != typeof s.type && (s.type = "basic"),
357
- s;
358
- }
359
-
360
- function setMockedResponse(e, t, r) {
361
- if (!e) throw new Error("MockResponse required");
362
- "string" == typeof e.url && "" !== e.url || ("string" == typeof t ? e.url = t : t && "string" == typeof t.url ? e.url = t.url : e.url = FETCH_DEFAULT_PATH);
363
- const s = new URL(e.url, location.href);
364
- e.url = s.href;
365
- const n = {
366
- response: e,
367
- reject: r
368
- };
369
- mockedResponses.set(e.url, n);
370
- }
371
-
372
- function resetBuildConditionals(e) {
373
- Object.keys(e).forEach((t => {
374
- e[t] = !0;
375
- })), e.isDev = !0, e.isTesting = !0, e.isDebug = !1, e.lazyLoad = !0, e.member = !0,
376
- e.reflect = !0, e.scoped = !0, e.shadowDom = !0, e.slotRelocation = !0, e.asyncLoading = !0,
377
- e.svg = !0, e.updatable = !0, e.vdomAttribute = !0, e.vdomClass = !0, e.vdomFunctional = !0,
378
- e.vdomKey = !0, e.vdomPropOrAttr = !0, e.vdomRef = !0, e.vdomListener = !0, e.vdomStyle = !0,
379
- e.vdomText = !0, e.vdomXlink = !0, e.allRenderFn = !1, e.devTools = !1, e.hydrateClientSide = !1,
380
- e.hydrateServerSide = !1, e.cssAnnotations = !1, e.style = !1, e.hydratedAttribute = !1,
381
- e.hydratedClass = !0, e.invisiblePrehydration = !0, e.appendChildSlotFix = !1, e.cloneNodeFix = !1,
382
- e.dynamicImportShim = !1, e.hotModuleReplacement = !1, e.safari10 = !1, e.scriptDataOpts = !1,
383
- e.scopedSlotTextContentFix = !1, e.slotChildNodesFix = !1;
384
- }
385
-
386
- function assertPath(e) {
387
- if ("string" != typeof e) throw new TypeError("Path must be a string. Received " + JSON.stringify(e));
388
- }
389
-
390
- function normalizeStringPosix(e, t) {
391
- var r, s, n, o = "", i = 0, a = -1, l = 0;
392
- for (s = 0; s <= e.length; ++s) {
393
- if (s < e.length) r = e.charCodeAt(s); else {
394
- if (47 === r) break;
395
- r = 47;
396
- }
397
- if (47 === r) {
398
- if (a === s - 1 || 1 === l) ; else if (a !== s - 1 && 2 === l) {
399
- if (o.length < 2 || 2 !== i || 46 !== o.charCodeAt(o.length - 1) || 46 !== o.charCodeAt(o.length - 2)) if (o.length > 2) {
400
- if ((n = o.lastIndexOf("/")) !== o.length - 1) {
401
- -1 === n ? (o = "", i = 0) : i = (o = o.slice(0, n)).length - 1 - o.lastIndexOf("/"),
402
- a = s, l = 0;
403
- continue;
404
- }
405
- } else if (2 === o.length || 1 === o.length) {
406
- o = "", i = 0, a = s, l = 0;
407
- continue;
408
- }
409
- t && (o.length > 0 ? o += "/.." : o = "..", i = 2);
410
- } else o.length > 0 ? o += "/" + e.slice(a + 1, s) : o = e.slice(a + 1, s), i = s - a - 1;
411
- a = s, l = 0;
412
- } else 46 === r && -1 !== l ? ++l : l = -1;
413
- }
414
- return o;
415
- }
416
-
417
- function specifierIncluded$1(e, t) {
418
- var r, s, n, o = e.split("."), i = t.split(" "), a = i.length > 1 ? i[0] : "=", l = (i.length > 1 ? i[1] : i[0]).split(".");
419
- for (r = 0; r < 3; ++r) if ((s = parseInt(o[r] || 0, 10)) !== (n = parseInt(l[r] || 0, 10))) return "<" === a ? s < n : ">=" === a && s >= n;
420
- return ">=" === a;
421
- }
422
-
423
- function matchesRange$1(e, t) {
424
- var r, s = t.split(/ ?&& ?/);
425
- if (0 === s.length) return !1;
426
- for (r = 0; r < s.length; ++r) if (!specifierIncluded$1(e, s[r])) return !1;
427
- return !0;
428
- }
429
-
430
- function specifierIncluded(e) {
431
- var t, r, s, n = e.split(" "), o = n.length > 1 ? n[0] : "=", i = (n.length > 1 ? n[1] : n[0]).split(".");
432
- for (t = 0; t < 3; ++t) if ((r = parseInt(current[t] || 0, 10)) !== (s = parseInt(i[t] || 0, 10))) return "<" === o ? r < s : ">=" === o && r >= s;
433
- return ">=" === o;
434
- }
435
-
436
- function matchesRange(e) {
437
- var t, r = e.split(/ ?&& ?/);
438
- if (0 === r.length) return !1;
439
- for (t = 0; t < r.length; ++t) if (!specifierIncluded(r[t])) return !1;
440
- return !0;
441
- }
442
-
443
- function versionIncluded(e) {
444
- if ("boolean" == typeof e) return e;
445
- if (e && "object" == typeof e) {
446
- for (var t = 0; t < e.length; ++t) if (matchesRange(e[t])) return !0;
447
- return !1;
448
- }
449
- return matchesRange(e);
450
- }
451
-
452
- function mockConfig(e) {
453
- const t = path__default.default.resolve("/");
454
- return e || (e = createTestingSystem()), e.getCurrentDirectory = () => t, {
455
- _isTesting: !0,
456
- namespace: "Testing",
457
- rootDir: t,
458
- globalScript: null,
459
- devMode: !0,
460
- enableCache: !1,
461
- buildAppCore: !1,
462
- buildDist: !0,
463
- flags: {},
464
- bundles: null,
465
- outputTargets: null,
466
- buildEs5: !1,
467
- hashFileNames: !1,
468
- logger: new TestingLogger,
469
- maxConcurrentWorkers: 0,
470
- minifyCss: !1,
471
- minifyJs: !1,
472
- sys: e,
473
- testing: null,
474
- validateTypes: !1,
475
- extras: {},
476
- nodeResolve: {
477
- customResolveOptions: {}
478
- },
479
- sourceMap: !0,
480
- rollupPlugins: {
481
- before: [],
482
- after: []
483
- }
484
- };
485
- }
486
-
487
- function mockCompilerCtx(e) {
488
- e || (e = mockConfig());
489
- const t = {
490
- version: 1,
491
- activeBuildId: 0,
492
- activeDirsAdded: [],
493
- activeDirsDeleted: [],
494
- activeFilesAdded: [],
495
- activeFilesDeleted: [],
496
- activeFilesUpdated: [],
497
- addWatchDir: noop,
498
- addWatchFile: noop,
499
- cachedGlobalStyle: null,
500
- changedFiles: new Set,
501
- changedModules: new Set,
502
- collections: [],
503
- compilerOptions: null,
504
- cache: null,
505
- cssModuleImports: new Map,
506
- events: buildEvents(),
507
- fs: null,
508
- hasSuccessfulBuild: !1,
509
- isActivelyBuilding: !1,
510
- lastBuildResults: null,
511
- moduleMap: new Map,
512
- nodeMap: new WeakMap,
513
- reset: noop,
514
- resolvedCollections: new Set,
515
- rollupCache: new Map,
516
- rollupCacheHydrate: null,
517
- rollupCacheLazy: null,
518
- rollupCacheNative: null,
519
- styleModeNames: new Set,
520
- worker: stencil_js.createWorkerContext(e.sys)
521
- };
522
- return Object.defineProperty(t, "fs", {
523
- get() {
524
- return null == this._fs && (this._fs = (e => {
525
- const t = new Map, r = new Map, s = async e => {
526
- const t = b(e);
527
- if ("boolean" == typeof t.exists) return {
528
- exists: t.exists,
529
- isDirectory: t.isDirectory,
530
- isFile: t.isFile
531
- };
532
- const r = {
533
- exists: !1,
534
- isDirectory: !1,
535
- isFile: !1
536
- }, s = await c(e);
537
- return s ? (t.exists = s.exists, t.isDirectory = s.isDirectory, t.isFile = s.isFile,
538
- r.exists = t.exists, r.isDirectory = t.isDirectory, r.isFile = t.isFile) : t.exists = !1,
539
- r;
540
- }, n = async (e, r = {}) => {
541
- e = normalizePath(e);
542
- const s = [];
543
- if (!0 === r.inMemoryOnly) {
544
- let n = e;
545
- n.endsWith("/") || (n += "/");
546
- const o = e.split("/");
547
- t.forEach(((t, n) => {
548
- if (!n.startsWith(e)) return;
549
- const a = n.split("/");
550
- if ((a.length === o.length + 1 || r.recursive && a.length > o.length) && t.exists) {
551
- const e = {
552
- absPath: n,
553
- relPath: a[o.length],
554
- isDirectory: t.isDirectory,
555
- isFile: t.isFile
556
- };
557
- i(r, e) || s.push(e);
558
- }
559
- }));
560
- } else await o(e, e, r, s);
561
- return s.sort(((e, t) => e.absPath < t.absPath ? -1 : e.absPath > t.absPath ? 1 : 0));
562
- }, o = async (t, r, s, n) => {
563
- const a = await e.readDir(r);
564
- if (a.length > 0) {
565
- const e = b(r);
566
- e.exists = !0, e.isFile = !1, e.isDirectory = !0, await Promise.all(a.map((async e => {
567
- const r = normalizePath(e), a = normalizePath(path$2.relative(t, r)), l = await c(r), u = {
568
- absPath: r,
569
- relPath: a,
570
- isDirectory: l.isDirectory,
571
- isFile: l.isFile
572
- };
573
- i(s, u) || (n.push(u), !0 === s.recursive && !0 === l.isDirectory && await o(t, r, s, n));
574
- })));
575
- }
576
- }, i = (e, t) => {
577
- if (t.isDirectory) {
578
- if (Array.isArray(e.excludeDirNames)) {
579
- const r = path$2.basename(t.absPath);
580
- if (e.excludeDirNames.some((e => r === e))) return !0;
581
- }
582
- } else if (Array.isArray(e.excludeExtensions)) {
583
- const r = t.relPath.toLowerCase();
584
- if (e.excludeExtensions.some((e => r.endsWith(e)))) return !0;
585
- }
586
- return !1;
587
- }, a = async e => {
588
- const t = b(e);
589
- t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk || (t.queueDeleteFromDisk = !0);
590
- try {
591
- const t = await n(e, {
592
- recursive: !0
593
- });
594
- await Promise.all(t.map((e => e.relPath.endsWith(".gitkeep") ? null : l(e.absPath))));
595
- } catch (e) {}
596
- }, l = async e => {
597
- const t = b(e);
598
- t.queueWriteToDisk || (t.queueDeleteFromDisk = !0);
599
- }, c = async t => {
600
- const r = b(t);
601
- if ("boolean" != typeof r.isDirectory || "boolean" != typeof r.isFile) {
602
- const s = await e.stat(t);
603
- s.error ? r.exists = !1 : (r.exists = !0, s.isFile ? (r.isFile = !0, r.isDirectory = !1,
604
- r.size = s.size) : s.isDirectory ? (r.isFile = !1, r.isDirectory = !0, r.size = s.size) : (r.isFile = !1,
605
- r.isDirectory = !1, r.size = null));
606
- }
607
- return {
608
- exists: !!r.exists,
609
- isFile: !!r.isFile,
610
- isDirectory: !!r.isDirectory,
611
- size: "number" == typeof r.size ? r.size : 0
612
- };
613
- }, u = t => {
614
- const r = b(t);
615
- if ("boolean" != typeof r.isDirectory || "boolean" != typeof r.isFile) {
616
- const s = e.statSync(t);
617
- s.error ? r.exists = !1 : (r.exists = !0, s.isFile ? (r.isFile = !0, r.isDirectory = !1,
618
- r.size = s.size) : s.isDirectory ? (r.isFile = !1, r.isDirectory = !0, r.size = s.size) : (r.isFile = !1,
619
- r.isDirectory = !1, r.size = null));
620
- }
621
- return {
622
- exists: !!r.exists,
623
- isFile: !!r.isFile,
624
- isDirectory: !!r.isDirectory
625
- };
626
- }, d = async (t, s, n) => {
627
- if ("string" != typeof t) throw new Error(`writeFile, invalid filePath: ${t}`);
628
- if ("string" != typeof s) throw new Error(`writeFile, invalid content: ${t}`);
629
- const o = {
630
- ignored: !1,
631
- changedContent: !1,
632
- queuedWrite: !1
633
- };
634
- if (!0 === shouldIgnore(t)) return o.ignored = !0, o;
635
- const i = b(t);
636
- if (i.exists = !0, i.isFile = !0, i.isDirectory = !1, i.queueDeleteFromDisk = !1,
637
- "string" == typeof i.fileText ? o.changedContent = i.fileText.replace(/\r/g, "") !== s.replace(/\r/g, "") : o.changedContent = !0,
638
- i.fileText = s, o.queuedWrite = !1, null != n && ("string" == typeof n.outputTargetType && r.set(t, n.outputTargetType),
639
- !1 === n.useCache && (i.useCache = !1)), null != n && !0 === n.inMemoryOnly) i.queueWriteToDisk ? o.queuedWrite = !0 : i.queueWriteToDisk = !1,
640
- await h(t, !0); else if (null != n && !0 === n.immediateWrite) {
641
- if (o.changedContent || !0 !== n.useCache) {
642
- const r = await e.readFile(t);
643
- "string" == typeof r && (o.changedContent = i.fileText.replace(/\r/g, "") !== r.replace(/\r/g, "")),
644
- o.changedContent && (await h(t, !1), await e.writeFile(t, i.fileText));
645
- }
646
- } else i.queueWriteToDisk || !0 !== o.changedContent || (i.queueWriteToDisk = !0,
647
- o.queuedWrite = !0);
648
- return o;
649
- }, h = async (e, t) => {
650
- const r = [];
651
- for (;"string" == typeof (e = path$2.dirname(e)) && e.length > 0 && "/" !== e && !1 === e.endsWith(":/") && !1 === e.endsWith(":\\"); ) r.push(e);
652
- r.reverse(), await p(r, t);
653
- }, p = async (t, r) => {
654
- const s = [];
655
- for (const n of t) {
656
- const t = b(n);
657
- if (!0 !== t.exists || !0 !== t.isDirectory) try {
658
- t.exists = !0, t.isDirectory = !0, t.isFile = !1, r || await e.createDir(n), s.push(n);
659
- } catch (e) {}
660
- }
661
- return s;
662
- }, f = t => Promise.all(t.map((async t => {
663
- const r = t[0], s = t[1];
664
- return await e.copyFile(r, s), [ r, s ];
665
- }))), m = e => Promise.all(e.map((async e => {
666
- if ("string" != typeof e) throw new Error("unable to writeFile without filePath");
667
- return g(e);
668
- }))), g = async t => {
669
- const r = b(t);
670
- if (null == r.fileText) throw new Error(`unable to find item fileText to write: ${t}`);
671
- return await e.writeFile(t, r.fileText), !1 === r.useCache && v(t), t;
672
- }, y = async t => await Promise.all(t.map((async t => {
673
- if ("string" != typeof t) throw new Error("unable to unlink without filePath");
674
- return await e.removeFile(t), t;
675
- }))), w = async t => {
676
- const r = [];
677
- for (const s of t) await e.removeDir(s), r.push(s);
678
- return r;
679
- }, _ = e => {
680
- e = normalizePath(e), t.forEach(((t, r) => {
681
- const s = path$2.relative(e, r).split("/")[0];
682
- s.startsWith(".") || s.startsWith("/") || v(r);
683
- }));
684
- }, v = e => {
685
- e = normalizePath(e);
686
- const r = t.get(e);
687
- null == r || r.queueWriteToDisk || t.delete(e);
688
- }, b = e => {
689
- e = normalizePath(e);
690
- let r = t.get(e);
691
- return null != r || t.set(e, r = {
692
- exists: null,
693
- fileText: null,
694
- size: null,
695
- mtimeMs: null,
696
- isDirectory: null,
697
- isFile: null,
698
- queueCopyFileToDest: null,
699
- queueDeleteFromDisk: null,
700
- queueWriteToDisk: null,
701
- useCache: null
702
- }), r;
703
- }, E = 5242880;
704
- return {
705
- access: async e => (await s(e)).exists,
706
- accessSync: e => {
707
- const t = b(e);
708
- if ("boolean" != typeof t.exists) {
709
- const r = u(e);
710
- t.exists = r.exists, t.isDirectory = r.isDirectory, t.isFile = r.isFile;
711
- }
712
- return t.exists;
713
- },
714
- accessData: s,
715
- cancelDeleteDirectoriesFromDisk: e => {
716
- for (const t of e) {
717
- const e = b(t);
718
- !0 === e.queueDeleteFromDisk && (e.queueDeleteFromDisk = !1);
719
- }
720
- },
721
- cancelDeleteFilesFromDisk: e => {
722
- for (const t of e) {
723
- const e = b(t);
724
- !0 === e.isFile && !0 === e.queueDeleteFromDisk && (e.queueDeleteFromDisk = !1);
725
- }
726
- },
727
- clearCache: () => t.clear(),
728
- clearDirCache: _,
729
- clearFileCache: v,
730
- commit: async () => {
731
- const e = getCommitInstructions(t), r = await p(e.dirsToEnsure, !1), s = await m(e.filesToWrite), n = await f(e.filesToCopy), o = await y(e.filesToDelete), i = await w(e.dirsToDelete);
732
- return e.filesToDelete.forEach(v), e.dirsToDelete.forEach(_), {
733
- filesCopied: n,
734
- filesWritten: s,
735
- filesDeleted: o,
736
- dirsDeleted: i,
737
- dirsAdded: r
738
- };
739
- },
740
- copyFile: async (e, t) => {
741
- b(e).queueCopyFileToDest = t;
742
- },
743
- emptyDirs: async e => {
744
- e = e.filter(isString).map(normalizePath).reduce(((e, t) => (e.includes(t) || e.push(t),
745
- e)), []);
746
- const t = await Promise.all(e.map((e => n(e, {
747
- recursive: !0
748
- })))), r = [];
749
- for (const e of t) for (const t of e) r.includes(t.absPath) || r.push(t.absPath);
750
- r.sort(((e, t) => {
751
- const r = e.split("/").length, s = t.split("/").length;
752
- return r < s ? 1 : r > s ? -1 : 0;
753
- })), await Promise.all(r.map(l)), e.forEach((e => {
754
- const t = b(e);
755
- t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk = !0, t.queueDeleteFromDisk = !1;
756
- }));
757
- },
758
- getBuildOutputs: () => {
759
- const e = [];
760
- return r.forEach(((t, r) => {
761
- const s = e.find((e => e.type === t));
762
- s ? s.files.push(r) : e.push({
763
- type: t,
764
- files: [ r ]
765
- });
766
- })), e.forEach((e => e.files.sort())), e.sort(((e, t) => e.type < t.type ? -1 : e.type > t.type ? 1 : 0));
767
- },
768
- getItem: b,
769
- getMemoryStats: () => `data length: ${t.size}`,
770
- keys: () => Array.from(t.keys()).sort(),
771
- readFile: async (t, r) => {
772
- if (null == r || !0 === r.useCache || void 0 === r.useCache) {
773
- const e = b(t);
774
- if (e.exists && "string" == typeof e.fileText) return e.fileText;
775
- }
776
- const s = await e.readFile(t), n = b(t);
777
- return "string" == typeof s ? s.length < E && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
778
- n.fileText = s) : n.exists = !1, s;
779
- },
780
- readFileSync: (t, r) => {
781
- if (null == r || !0 === r.useCache || void 0 === r.useCache) {
782
- const e = b(t);
783
- if (e.exists && "string" == typeof e.fileText) return e.fileText;
784
- }
785
- const s = e.readFileSync(t), n = b(t);
786
- return "string" == typeof s ? s.length < E && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
787
- n.fileText = s) : n.exists = !1, s;
788
- },
789
- readdir: n,
790
- remove: async e => {
791
- const t = await c(e);
792
- !0 === t.isDirectory ? await a(e) : !0 === t.isFile && await l(e);
793
- },
794
- stat: c,
795
- statSync: u,
796
- sys: e,
797
- writeFile: d,
798
- writeFiles: (e, t) => {
799
- const r = [];
800
- return isIterable(e) ? e.forEach(((e, s) => {
801
- r.push(d(s, e, t));
802
- })) : Object.keys(e).map((s => {
803
- r.push(d(s, e[s], t));
804
- })), Promise.all(r);
805
- }
806
- };
807
- })(e.sys)), this._fs;
808
- }
809
- }), Object.defineProperty(t, "cache", {
810
- get() {
811
- return null == this._cache && (this._cache = function r(e, t) {
812
- e || (e = mockConfig()), t || (t = mockCompilerCtx(e)), e.enableCache = !0;
813
- const r = new Cache(e, t.fs);
814
- return r.initCacheDir(), r;
815
- }(e, t)), this._cache;
816
- }
817
- }), t;
818
- }
819
-
820
- function mockLogger() {
821
- return new TestingLogger;
822
- }
823
-
824
- function findRootComponent(e, t) {
825
- if (null != t) {
826
- const r = t.children, s = r.length;
827
- for (let t = 0; t < s; t++) {
828
- const s = r[t];
829
- if (e.has(s.nodeName.toLowerCase())) return s;
830
- }
831
- for (let t = 0; t < s; t++) {
832
- const s = findRootComponent(e, r[t]);
833
- if (null != s) return s;
834
- }
835
- }
836
- return null;
837
- }
838
-
839
- async function initPageEvents(e) {
840
- e._e2eEvents = new Map, e._e2eEventIds = 0, e.spyOnEvent = pageSpyOnEvent.bind(e, e),
841
- await e.exposeFunction("stencilOnEvent", ((t, r) => {
842
- !function s(e, t, r) {
843
- const s = e.get(t);
844
- s && s.callback(r);
845
- }(e._e2eEvents, t, r);
846
- })), await e.evaluateOnNewDocument(browserContextEvents);
847
- }
848
-
849
- async function pageSpyOnEvent(e, t, r) {
850
- const s = new EventSpy(t), n = "document" !== r ? () => window : () => document, o = await e.evaluateHandle(n);
851
- return await addE2EListener(e, o, t, (e => {
852
- s.push(e);
853
- })), s;
854
- }
855
-
856
- async function waitForEvent(e, t, r) {
857
- const s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = await e.evaluate(((e, t, r) => new Promise(((s, n) => {
858
- const o = setTimeout((() => {
859
- n(new Error(`waitForEvent() timeout, eventName: ${t}`));
860
- }), r);
861
- e.addEventListener(t, (e => {
862
- clearTimeout(o), s(window.stencilSerializeEvent(e));
863
- }), {
864
- once: !0
865
- });
866
- }))), r, t, s);
867
- return await e.waitForChanges(), n;
868
- }
869
-
870
- async function addE2EListener(e, t, r, s) {
871
- const n = e._e2eEventIds++;
872
- e._e2eEvents.set(n, {
873
- eventName: r,
874
- callback: s
875
- });
876
- const o = t.executionContext();
877
- await o.evaluate(((e, t, r) => {
878
- e.addEventListener(r, (e => {
879
- window.stencilOnEvent(t, window.stencilSerializeEvent(e));
880
- }));
881
- }), t, n, r);
882
- }
883
-
884
- function browserContextEvents() {
885
- const e = () => {
886
- const e = [], t = (e, r) => {
887
- if (null != r && 1 === r.nodeType) for (let s = 0; s < r.children.length; s++) {
888
- const n = r.children[s];
889
- n.tagName.includes("-") && "function" == typeof n.componentOnReady && e.push(n.componentOnReady()),
890
- t(e, n);
891
- }
892
- };
893
- return t(e, window.document.documentElement), Promise.all(e).catch((e => console.error(e)));
894
- }, t = () => e().then((() => new Promise((e => {
895
- requestAnimationFrame(e);
896
- })))).then((() => e())).then((() => {
897
- window.stencilAppLoaded = !0;
898
- }));
899
- window.stencilSerializeEventTarget = e => e ? e === window ? {
900
- serializedWindow: !0
901
- } : e === document ? {
902
- serializedDocument: !0
903
- } : null != e.nodeType ? {
904
- serializedElement: !0,
905
- nodeName: e.nodeName,
906
- nodeValue: e.nodeValue,
907
- nodeType: e.nodeType,
908
- tagName: e.tagName,
909
- className: e.className,
910
- id: e.id
911
- } : null : null, window.stencilSerializeEvent = e => ({
912
- bubbles: e.bubbles,
913
- cancelBubble: e.cancelBubble,
914
- cancelable: e.cancelable,
915
- composed: e.composed,
916
- currentTarget: window.stencilSerializeEventTarget(e.currentTarget),
917
- defaultPrevented: e.defaultPrevented,
918
- detail: e.detail,
919
- eventPhase: e.eventPhase,
920
- isTrusted: e.isTrusted,
921
- returnValue: e.returnValue,
922
- srcElement: window.stencilSerializeEventTarget(e.srcElement),
923
- target: window.stencilSerializeEventTarget(e.target),
924
- timeStamp: e.timeStamp,
925
- type: e.type,
926
- isSerializedEvent: !0
927
- }), "complete" === window.document.readyState ? t() : document.addEventListener("readystatechange", (function(e) {
928
- "complete" == e.target.readyState && t();
929
- }));
930
- }
931
-
932
- async function find(e, t, r) {
933
- const {lightSelector: s, shadowSelector: n, text: o, contains: i} = getSelector(r);
934
- let a;
935
- if (a = "string" == typeof s ? await async function l(e, t, r, s) {
936
- let n = await t.$(r);
937
- if (!n) return null;
938
- if (s) {
939
- const t = await e.evaluateHandle(((e, t) => {
940
- if (!e.shadowRoot) throw new Error(`shadow root does not exist for element: ${e.tagName.toLowerCase()}`);
941
- return e.shadowRoot.querySelector(t);
942
- }), n, s);
943
- if (await n.dispose(), !t) return null;
944
- n = t.asElement();
945
- }
946
- return n;
947
- }(e, t, s, n) : await async function c(e, t, r, s) {
948
- const n = await e.evaluateHandle(((e, t, r) => {
949
- let s = null;
950
- return function e(n) {
951
- if (n && !s) if (3 === n.nodeType) {
952
- if ("string" == typeof t && n.textContent.trim() === t) return void (s = n.parentElement);
953
- if ("string" == typeof r && n.textContent.includes(r)) return void (s = n.parentElement);
954
- } else {
955
- if ("SCRIPT" === n.nodeName || "STYLE" === n.nodeName) return;
956
- if (e(n.shadowRoot), n.childNodes) for (let t = 0; t < n.childNodes.length; t++) e(n.childNodes[t]);
957
- }
958
- }(e), s;
959
- }), t, r, s);
960
- return n ? n.asElement() : null;
961
- }(e, t, o, i), !a) return null;
962
- const u = new E2EElement(e, a);
963
- return await u.e2eSync(), u;
964
- }
965
-
966
- async function findAll(e, t, r) {
967
- const s = [], {lightSelector: n, shadowSelector: o} = getSelector(r), i = await t.$$(n);
968
- if (0 === i.length) return s;
969
- if (o) for (let t = 0; t < i.length; t++) {
970
- const r = i[t].executionContext(), n = await r.evaluateHandle(((e, t) => {
971
- if (!e.shadowRoot) throw new Error(`shadow root does not exist for element: ${e.tagName.toLowerCase()}`);
972
- return e.shadowRoot.querySelectorAll(t);
973
- }), i[t], o);
974
- await i[t].dispose();
975
- const a = await n.getProperties();
976
- await n.dispose();
977
- for (const t of a.values()) {
978
- const r = t.asElement();
979
- if (r) {
980
- const t = new E2EElement(e, r);
981
- await t.e2eSync(), s.push(t);
982
- }
983
- }
984
- } else for (let t = 0; t < i.length; t++) {
985
- const r = new E2EElement(e, i[t]);
986
- await r.e2eSync(), s.push(r);
987
- }
988
- return s;
989
- }
990
-
991
- function getSelector(e) {
992
- const t = {
993
- lightSelector: null,
994
- shadowSelector: null,
995
- text: null,
996
- contains: null
997
- };
998
- if ("string" == typeof e) {
999
- const r = e.split(">>>");
1000
- t.lightSelector = r[0].trim(), t.shadowSelector = r.length > 1 ? r[1].trim() : null;
1001
- } else if ("string" == typeof e.text) t.text = e.text.trim(); else {
1002
- if ("string" != typeof e.contains) throw new Error(`invalid find selector: ${e}`);
1003
- t.contains = e.contains.trim();
1004
- }
1005
- return t;
1006
- }
1007
-
1008
- async function writeScreenshotData(e, t) {
1009
- const r = function s(e, t) {
1010
- const r = `${t}.json`;
1011
- return path__default.default.join(e, r);
1012
- }(e, t.id), n = JSON.stringify(t, null, 2);
1013
- await writeFile(r, n);
1014
- }
1015
-
1016
- function writeFile(e, t) {
1017
- return new Promise(((r, s) => {
1018
- fs__default.default.writeFile(e, t, (e => {
1019
- e ? s(e) : r();
1020
- }));
1021
- }));
1022
- }
1023
-
1024
- async function compareScreenshot(e, t, r, s, n, o, i, a) {
1025
- const l = `${crypto$3.createHash("md5").update(r).digest("hex")}.png`, c = path$2.join(t.imagesDir, l);
1026
- await async function u(e, t) {
1027
- await function r(e) {
1028
- return new Promise((t => {
1029
- fs__default.default.access(e, (e => t(!e)));
1030
- }));
1031
- }(e) || await writeFile(e, t);
1032
- }(c, r), r = null, i && (i = normalizePath(path$2.relative(t.rootDir, i)));
1033
- const d = function h(e, t) {
1034
- if ("string" != typeof t || 0 === t.trim().length) throw new Error("invalid test description");
1035
- const r = crypto$3.createHash("md5");
1036
- return r.update(t + ":"), r.update(e.userAgent + ":"), r.update(e.viewport.width + ":"),
1037
- r.update(e.viewport.height + ":"), r.update(e.viewport.deviceScaleFactor + ":"),
1038
- r.update(e.viewport.hasTouch + ":"), r.update(e.viewport.isMobile + ":"), r.digest("hex").slice(0, 8).toLowerCase();
1039
- }(e, s), p = {
1040
- id: d,
1041
- image: l,
1042
- device: e.device,
1043
- userAgent: e.userAgent,
1044
- desc: s,
1045
- testPath: i,
1046
- width: n,
1047
- height: o,
1048
- deviceScaleFactor: e.viewport.deviceScaleFactor,
1049
- hasTouch: e.viewport.hasTouch,
1050
- isLandscape: e.viewport.isLandscape,
1051
- isMobile: e.viewport.isMobile,
1052
- diff: {
1053
- id: d,
1054
- desc: s,
1055
- imageA: l,
1056
- imageB: l,
1057
- mismatchedPixels: 0,
1058
- device: e.device,
1059
- userAgent: e.userAgent,
1060
- width: n,
1061
- height: o,
1062
- deviceScaleFactor: e.viewport.deviceScaleFactor,
1063
- hasTouch: e.viewport.hasTouch,
1064
- isLandscape: e.viewport.isLandscape,
1065
- isMobile: e.viewport.isMobile,
1066
- allowableMismatchedPixels: t.allowableMismatchedPixels,
1067
- allowableMismatchedRatio: t.allowableMismatchedRatio,
1068
- testPath: i
1069
- }
1070
- };
1071
- if (t.updateMaster) return await writeScreenshotData(t.currentBuildDir, p), p.diff;
1072
- const f = t.masterScreenshots[p.id];
1073
- if (!f) return await writeScreenshotData(t.currentBuildDir, p), p.diff;
1074
- if (p.diff.imageA = f, p.diff.imageA !== p.diff.imageB) {
1075
- p.diff.cacheKey = function m(e, t, r) {
1076
- const s = crypto$3.createHash("md5");
1077
- return s.update(`${e}:${t}:${r}`), s.digest("hex").slice(0, 10);
1078
- }(p.diff.imageA, p.diff.imageB, a);
1079
- const r = t.cache[p.diff.cacheKey];
1080
- if ("number" != typeof r || isNaN(r)) {
1081
- const r = Math.round(e.viewport.width * e.viewport.deviceScaleFactor), s = Math.round(e.viewport.height * e.viewport.deviceScaleFactor), n = {
1082
- imageAPath: path$2.join(t.imagesDir, p.diff.imageA),
1083
- imageBPath: path$2.join(t.imagesDir, p.diff.imageB),
1084
- width: r,
1085
- height: s,
1086
- pixelmatchThreshold: a
1087
- };
1088
- p.diff.mismatchedPixels = await async function g(e, t) {
1089
- return new Promise(((r, s) => {
1090
- const n = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, o = setTimeout((() => {
1091
- s(`getMismatchedPixels timeout: ${n}ms`);
1092
- }), n);
1093
- try {
1094
- const n = {
1095
- execArgv: process.execArgv.filter((e => !/^--(debug|inspect)/.test(e))),
1096
- env: process.env,
1097
- cwd: process.cwd(),
1098
- stdio: [ "pipe", "pipe", "pipe", "ipc" ]
1099
- }, i = child_process$2.fork(e, [], n);
1100
- i.on("message", (e => {
1101
- i.kill(), clearTimeout(o), r(e);
1102
- })), i.on("error", (e => {
1103
- clearTimeout(o), s(e);
1104
- })), i.send(t);
1105
- } catch (e) {
1106
- clearTimeout(o), s(`getMismatchedPixels error: ${e}`);
1107
- }
1108
- }));
1109
- }(t.pixelmatchModulePath, n);
1110
- } else p.diff.mismatchedPixels = r;
1111
- }
1112
- return await writeScreenshotData(t.currentBuildDir, p), p.diff;
1113
- }
1114
-
1115
- async function e2eGoTo(e, t, r = {}) {
1116
- if (e.isClosed()) throw new Error("e2eGoTo unavailable: page already closed");
1117
- if ("string" != typeof t) throw new Error("invalid gotoTest() url");
1118
- if (!t.startsWith("/")) throw new Error("gotoTest() url must start with /");
1119
- const s = env.__STENCIL_BROWSER_URL__;
1120
- if ("string" != typeof s) throw new Error("invalid gotoTest() browser url");
1121
- const n = s + t.substring(1);
1122
- r.waitUntil || (r.waitUntil = env.__STENCIL_BROWSER_WAIT_UNTIL);
1123
- const o = await e._e2eGoto(n, r);
1124
- if (!o.ok()) throw new Error(`Testing unable to load ${t}, HTTP status: ${o.status()}`);
1125
- return await waitForStencil(e, r), o;
1126
- }
1127
-
1128
- async function e2eSetContent(e, t, r = {}) {
1129
- if (e.isClosed()) throw new Error("e2eSetContent unavailable: page already closed");
1130
- if ("string" != typeof t) throw new Error("invalid e2eSetContent() html");
1131
- const s = [], n = env.__STENCIL_APP_SCRIPT_URL__;
1132
- if ("string" != typeof n) throw new Error("invalid e2eSetContent() app script url");
1133
- s.push("<!doctype html>"), s.push("<html>"), s.push("<head>");
1134
- const o = env.__STENCIL_APP_STYLE_URL__;
1135
- "string" == typeof o && s.push(`<link rel="stylesheet" href="${o}">`), s.push(`<script type="module" src="${n}"><\/script>`),
1136
- s.push("</head>"), s.push("<body>"), s.push(t), s.push("</body>"), s.push("</html>");
1137
- const i = env.__STENCIL_BROWSER_URL__;
1138
- await e.setRequestInterception(!0), e.on("request", (e => {
1139
- i === e.url() ? e.respond({
1140
- status: 200,
1141
- contentType: "text/html",
1142
- body: s.join("\n")
1143
- }) : e.continue();
1144
- })), r.waitUntil || (r.waitUntil = env.__STENCIL_BROWSER_WAIT_UNTIL);
1145
- const a = await e._e2eGoto(i, r);
1146
- if (!a.ok()) throw new Error("Testing unable to load content");
1147
- return await waitForStencil(e, r), a;
1148
- }
1149
-
1150
- async function waitForStencil(e, t) {
1151
- try {
1152
- const r = "number" == typeof t.timeout ? t.timeout : 4750;
1153
- await e.waitForFunction("window.stencilAppLoaded", {
1154
- timeout: r
1155
- });
1156
- } catch (e) {
1157
- throw new Error("App did not load in allowed time. Please ensure the content loads a stencil application.");
1158
- }
1159
- }
1160
-
1161
- async function waitForChanges(e) {
1162
- try {
1163
- if (e.isClosed()) return;
1164
- if (await Promise.all(e._e2eElements.map((e => e.e2eRunActions()))), e.isClosed()) return;
1165
- if (await e.evaluate((() => new Promise((e => {
1166
- requestAnimationFrame((() => {
1167
- const t = [], r = (e, t) => {
1168
- if (null != e) {
1169
- "shadowRoot" in e && e.shadowRoot instanceof ShadowRoot && r(e.shadowRoot, t);
1170
- const s = e.children, n = s.length;
1171
- for (let e = 0; e < n; e++) {
1172
- const n = s[e];
1173
- null != n && (n.tagName.includes("-") && "function" == typeof n.componentOnReady && t.push(n.componentOnReady()),
1174
- r(n, t));
1175
- }
1176
- }
1177
- };
1178
- r(document.documentElement, t), Promise.all(t).then((() => {
1179
- e();
1180
- })).catch((() => {
1181
- e();
1182
- }));
1183
- }));
1184
- })))), e.isClosed()) return;
1185
- "function" == typeof e.waitForTimeout ? await e.waitForTimeout(100) : await e.waitFor(100),
1186
- await Promise.all(e._e2eElements.map((e => e.e2eSync())));
1187
- } catch (e) {}
1188
- }
1189
-
1190
- function serializeConsoleMessage(e) {
1191
- return `${e.text()} ${function t(e) {
1192
- let t = "";
1193
- return e && e.url && (t = `\nLocation: ${e.url}`, e.lineNumber && (t += `:${e.lineNumber}`),
1194
- e.columnNumber && (t += `:${e.columnNumber}`)), t;
1195
- }(e.location())}`;
1196
- }
1197
-
1198
- var posix, pathBrowserify, caller, pathParse, parse, getNodeModulesDirs, nodeModulesPaths, normalizeOptions, ERROR_MESSAGE, slice, toStr, implementation, functionBind, src, isCoreModule, realpathFS$1, defaultIsFile$1, defaultIsDir$1, defaultRealpath, maybeRealpath, defaultReadPackage, getPackageCandidates$1, async, current, core, mod, core_1, isCore, realpathFS, defaultIsFile, defaultIsDir, defaultRealpathSync, maybeRealpathSync, defaultReadPackageSync, getPackageCandidates, sync, resolve;
1199
-
1200
- const path$2 = require("path"), index_js = _lazyRequire("../dev-server/index.js"), stencil_js = require("../compiler/stencil.js"), appData = _lazyRequire("@stencil/core/internal/app-data"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), testing = _lazyRequire("@stencil/core/internal/testing"), process$3 = require("process"), os$2 = require("os"), fs$2 = require("fs"), crypto$3 = require("crypto"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), process__namespace = _interopNamespace(process$3), os__namespace = _interopNamespace(os$2), fs__default = _interopDefaultLegacy(fs$2), formatComponentRuntimeMembers = (e, t = !0) => ({
1201
- ...formatPropertiesRuntimeMember(e.properties),
1202
- ...formatStatesRuntimeMember(e.states),
1203
- ...t ? formatMethodsRuntimeMember(e.methods) : {}
1204
- }), formatPropertiesRuntimeMember = e => {
1205
- const t = {};
1206
- return e.forEach((e => {
1207
- t[e.name] = trimFalsy([ formatFlags(e), formatAttrName(e) ]);
1208
- })), t;
1209
- }, formatFlags = e => {
1210
- let t = formatPropType(e.type);
1211
- return e.mutable && (t |= 1024), e.reflect && (t |= 512), t;
1212
- }, formatAttrName = e => {
1213
- if ("string" == typeof e.attribute) {
1214
- if (e.name === e.attribute) return;
1215
- return e.attribute;
1216
- }
1217
- }, formatPropType = e => "string" === e ? 1 : "number" === e ? 2 : "boolean" === e ? 4 : "any" === e ? 8 : 16, formatStatesRuntimeMember = e => {
1218
- const t = {};
1219
- return e.forEach((e => {
1220
- t[e.name] = [ 32 ];
1221
- })), t;
1222
- }, formatMethodsRuntimeMember = e => {
1223
- const t = {};
1224
- return e.forEach((e => {
1225
- t[e.name] = [ 64 ];
1226
- })), t;
1227
- }, formatHostListeners = e => e.listeners.map((e => [ computeListenerFlags(e), e.name, e.method ])), computeListenerFlags = e => {
1228
- let t = 0;
1229
- switch (e.capture && (t |= 2), e.passive && (t |= 1), e.target) {
1230
- case "document":
1231
- t |= 4;
1232
- break;
1233
-
1234
- case "window":
1235
- t |= 8;
1236
- break;
1237
-
1238
- case "body":
1239
- t |= 16;
1240
- break;
1241
-
1242
- case "parent":
1243
- t |= 32;
1244
- }
1245
- return t;
1246
- }, trimFalsy = e => {
1247
- const t = e;
1248
- for (let e = t.length - 1; e >= 0 && !t[e]; e--) t.pop();
1249
- return t;
1250
- }, noop = () => {}, isFunction = e => "function" == typeof e, isString = e => "string" == typeof e, isIterable = e => (e => null != e)(e) && isFunction(e[Symbol.iterator]), windowsPathRegex = /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?[\\/]$/, hasError = e => null != e && 0 !== e.length && e.some((e => "error" === e.level && "runtime" !== e.type)), normalizePath = e => {
1251
- if ("string" != typeof e) throw new Error("invalid path to normalize");
1252
- e = normalizeSlashes(e.trim());
1253
- const t = pathComponents(e, getRootLength(e)), r = reducePathComponents(t), s = r[0], n = r[1], o = s + r.slice(1).join("/");
1254
- return "" === o ? "." : "" === s && n && e.includes("/") && !n.startsWith(".") && !n.startsWith("@") ? "./" + o : o;
1255
- }, normalizeSlashes = e => e.replace(backslashRegExp, "/"), backslashRegExp = /\\/g, reducePathComponents = e => {
1256
- if (!Array.isArray(e) || 0 === e.length) return [];
1257
- const t = [ e[0] ];
1258
- for (let r = 1; r < e.length; r++) {
1259
- const s = e[r];
1260
- if (s && "." !== s) {
1261
- if (".." === s) if (t.length > 1) {
1262
- if (".." !== t[t.length - 1]) {
1263
- t.pop();
1264
- continue;
1265
- }
1266
- } else if (t[0]) continue;
1267
- t.push(s);
1268
- }
1269
- }
1270
- return t;
1271
- }, getRootLength = e => {
1272
- const t = getEncodedRootLength(e);
1273
- return t < 0 ? ~t : t;
1274
- }, getEncodedRootLength = e => {
1275
- if (!e) return 0;
1276
- const t = e.charCodeAt(0);
1277
- if (47 === t || 92 === t) {
1278
- if (e.charCodeAt(1) !== t) return 1;
1279
- const r = e.indexOf(47 === t ? "/" : "\\", 2);
1280
- return r < 0 ? e.length : r + 1;
1281
- }
1282
- if (isVolumeCharacter(t) && 58 === e.charCodeAt(1)) {
1283
- const t = e.charCodeAt(2);
1284
- if (47 === t || 92 === t) return 3;
1285
- if (2 === e.length) return 2;
1286
- }
1287
- const r = e.indexOf("://");
1288
- if (-1 !== r) {
1289
- const t = r + "://".length, s = e.indexOf("/", t);
1290
- if (-1 !== s) {
1291
- const n = e.slice(0, r), o = e.slice(t, s);
1292
- if ("file" === n && ("" === o || "localhost" === o) && isVolumeCharacter(e.charCodeAt(s + 1))) {
1293
- const t = getFileUrlVolumeSeparatorEnd(e, s + 2);
1294
- if (-1 !== t) {
1295
- if (47 === e.charCodeAt(t)) return ~(t + 1);
1296
- if (t === e.length) return ~t;
1297
- }
1298
- }
1299
- return ~(s + 1);
1300
- }
1301
- return ~e.length;
1302
- }
1303
- return 0;
1304
- }, isVolumeCharacter = e => e >= 97 && e <= 122 || e >= 65 && e <= 90, getFileUrlVolumeSeparatorEnd = (e, t) => {
1305
- const r = e.charCodeAt(t);
1306
- if (58 === r) return t + 1;
1307
- if (37 === r && 51 === e.charCodeAt(t + 1)) {
1308
- const r = e.charCodeAt(t + 2);
1309
- if (97 === r || 65 === r) return t + 3;
1310
- }
1311
- return -1;
1312
- }, pathComponents = (e, t) => {
1313
- const r = e.substring(0, t), s = e.substring(t).split("/"), n = s.length;
1314
- return n > 0 && !s[n - 1] && s.pop(), [ r, ...s ];
1315
- }, normalizeFsPath = e => normalizePath(e.split("?")[0].replace(/\0/g, "")), flattenDiagnosticMessageText = (e, t) => {
1316
- if ("string" == typeof t) return t;
1317
- if (void 0 === t) return "";
1318
- const r = [], s = e.file.fileName.includes("stencil.config");
1319
- s && r.push(2322);
1320
- let n = "";
1321
- if (!r.includes(t.code) && (n = t.messageText, isIterable(t.next))) for (const r of t.next) n += flattenDiagnosticMessageText(e, r);
1322
- return s && (n = n.replace("type 'StencilConfig'", "Stencil Config"), n = n.replace("Object literal may only specify known properties, but ", ""),
1323
- n = n.replace("Object literal may only specify known properties, and ", "")), n.trim();
1324
- }, isOutputTargetDistLazy = e => e.type === DIST_LAZY, isOutputTargetWww = e => e.type === WWW, DIST_LAZY = "dist-lazy", WWW = "www", isJest27TransformOptions = e => "object" == typeof e && e.hasOwnProperty("config");
1325
-
1326
- let _tsCompilerOptions = null, _tsCompilerOptionsKey = null;
1327
-
1328
- const jestPreprocessor = {
1329
- process(e, t, r, s) {
1330
- if (isJest27TransformOptions(r) && (s = r.config), function n(e, t) {
1331
- const r = e.split(".").pop().toLowerCase().split("?")[0];
1332
- if ("ts" === r || "tsx" === r || "jsx" === r) return !0;
1333
- if ("mjs" === r) return !0;
1334
- if ("js" === r) {
1335
- if (t.includes("import ") || t.includes("import.") || t.includes("import(")) return !0;
1336
- if (t.includes("export ")) return !0;
1337
- }
1338
- return "css" === r;
1339
- }(t, e)) {
1340
- const r = {
1341
- file: t,
1342
- currentDirectory: s.rootDir
1343
- }, n = getCompilerOptions(s.rootDir);
1344
- n && (n.baseUrl && (r.baseUrl = n.baseUrl), n.paths && (r.paths = n.paths));
1345
- const o = transpile(e, r), i = o.diagnostics.some((e => "error" === e.level));
1346
- if (o.diagnostics && i) {
1347
- const e = o.diagnostics.map(formatDiagnostic).join("\n\n");
1348
- throw new Error(e);
1349
- }
1350
- return o.code;
1351
- }
1352
- return e;
1353
- },
1354
- getCacheKey(e, t, r, s) {
1355
- if (isJest27TransformOptions(r) && (s = r.config), !_tsCompilerOptionsKey) {
1356
- const e = getCompilerOptions(s.rootDir);
1357
- _tsCompilerOptionsKey = JSON.stringify(e);
1358
- }
1359
- return [ process.version, _tsCompilerOptionsKey, e, t, r, !!s.instrument, 7 ].join(":");
1360
- }
1361
- }, deepEqual = function e(t, r) {
1362
- if (t === r) return !0;
1363
- if (t && r && "object" == typeof t && "object" == typeof r) {
1364
- const s = Array.isArray(t), n = Array.isArray(r);
1365
- let o, i, a;
1366
- if (s && n) {
1367
- if (i = t.length, i != r.length) return !1;
1368
- for (o = i; 0 != o--; ) if (!e(t[o], r[o])) return !1;
1369
- return !0;
1370
- }
1371
- if (s != n) return !1;
1372
- const l = t instanceof Date, c = r instanceof Date;
1373
- if (l != c) return !1;
1374
- if (l && c) return t.getTime() == r.getTime();
1375
- const u = t instanceof RegExp, d = r instanceof RegExp;
1376
- if (u != d) return !1;
1377
- if (u && d) return t.toString() == r.toString();
1378
- const h = Object.keys(t);
1379
- if (i = h.length, i !== Object.keys(r).length) return !1;
1380
- for (o = i; 0 != o--; ) if (!Object.prototype.hasOwnProperty.call(r, h[o])) return !1;
1381
- for (o = i; 0 != o--; ) if (a = h[o], !e(t[a], r[a])) return !1;
1382
- return !0;
1383
- }
1384
- return t != t && r != r;
1385
- }, expectExtend = {
1386
- toEqualAttribute: function toEqualAttribute(e, t, r) {
1387
- if (!e) throw new Error("expect toMatchAttribute value is null");
1388
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
1389
- if (1 !== e.nodeType) throw new Error("expect toMatchAttribute value is not an element");
1390
- let s = e.getAttribute(t);
1391
- null != r && (r = String(r)), null != s && (s = String(s));
1392
- const n = r === s;
1393
- return {
1394
- message: () => `expected attribute ${t} "${r}" to ${n ? "not " : ""}equal "${s}"`,
1395
- pass: n
1396
- };
1397
- },
1398
- toEqualAttributes: function toEqualAttributes(e, t) {
1399
- if (!e) throw new Error("expect toEqualAttributes value is null");
1400
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
1401
- if (1 !== e.nodeType) throw new Error("expect toEqualAttributes value is not an element");
1402
- const r = Object.keys(t), s = r.every((r => {
1403
- let s = t[r];
1404
- return null != s && (s = String(s)), e.getAttribute(r) === s;
1405
- }));
1406
- return {
1407
- message: () => `expected attributes to ${s ? "not " : ""}equal ${r.map((e => `[${e}="${t[e]}"]`)).join(", ")}`,
1408
- pass: s
1409
- };
1410
- },
1411
- toEqualHtml: function toEqualHtml(e, t) {
1412
- return compareHtml(e, t, !0);
1413
- },
1414
- toEqualLightHtml: function toEqualLightHtml(e, t) {
1415
- return compareHtml(e, t, !1);
1416
- },
1417
- toEqualText: function toEqualText(e, t) {
1418
- if (null == e) throw new Error(`expect toEqualText() value is "${e}"`);
1419
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
1420
- let r;
1421
- 1 === e.nodeType ? r = e.textContent.replace(/\s\s+/g, " ").trim() : null != e && (r = String(e).replace(/\s\s+/g, " ").trim()),
1422
- "string" == typeof t && (t = t.replace(/\s\s+/g, " ").trim());
1423
- const s = r === t;
1424
- return {
1425
- message: () => `expected textContent "${t}" to ${s ? "not " : ""}equal "${r}"`,
1426
- pass: s
1427
- };
1428
- },
1429
- toHaveAttribute: function toHaveAttribute(e, t) {
1430
- if (!e) throw new Error("expect toHaveAttribute value is null");
1431
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
1432
- if (1 !== e.nodeType) throw new Error("expect toHaveAttribute value is not an element");
1433
- const r = e.hasAttribute(t);
1434
- return {
1435
- message: () => `expected to ${r ? "not " : ""}have the attribute "${t}"`,
1436
- pass: r
1437
- };
1438
- },
1439
- toHaveClass: function toHaveClass(e, t) {
1440
- if (!e) throw new Error("expect toHaveClass value is null");
1441
- if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
1442
- if (1 !== e.nodeType) throw new Error("expect toHaveClass value is not an element");
1443
- const r = e.classList.contains(t);
1444
- return {
1445
- message: () => `expected to ${r ? "not " : ""}have css class "${t}"`,
1446
- pass: r
1447
- };
1448
- },
1449
- toHaveClasses,
1450
- toMatchClasses: function toMatchClasses(e, t) {
1451
- let {pass: r} = toHaveClasses(e, t);
1452
- return r && (r = t.length === e.classList.length), {
1453
- message: () => `expected to ${r ? "not " : ""}match css classes "${t.join(" ")}", but className is "${e.className}"`,
1454
- pass: r
1455
- };
1456
- },
1457
- toHaveReceivedEvent: function toHaveReceivedEvent(e) {
1458
- if (!e) throw new Error("toHaveReceivedEvent event spy is null");
1459
- if ("function" == typeof e.then) throw new Error("event spy must be a resolved value, not a promise, before it can be tested");
1460
- if (!e.eventName) throw new Error("toHaveReceivedEvent did not receive an event spy");
1461
- const t = e.events.length > 0;
1462
- return {
1463
- message: () => `expected to have ${t ? "not " : ""}called "${e.eventName}" event`,
1464
- pass: t
1465
- };
1466
- },
1467
- toHaveReceivedEventDetail: function toHaveReceivedEventDetail(e, t) {
1468
- if (!e) throw new Error("toHaveReceivedEventDetail event spy is null");
1469
- if ("function" == typeof e.then) throw new Error("event spy must be a resolved value, not a promise, before it can be tested");
1470
- if (!e.eventName) throw new Error("toHaveReceivedEventDetail did not receive an event spy");
1471
- if (!e.lastEvent) throw new Error(`event "${e.eventName}" was not received`);
1472
- const r = deepEqual(e.lastEvent.detail, t);
1473
- return expect(e.lastEvent.detail).toEqual(t), {
1474
- message: () => `expected event "${e.eventName}" detail to ${r ? "not " : ""}equal`,
1475
- pass: r
1476
- };
1477
- },
1478
- toHaveReceivedEventTimes: function toHaveReceivedEventTimes(e, t) {
1479
- if (!e) throw new Error("toHaveReceivedEventTimes event spy is null");
1480
- if ("function" == typeof e.then) throw new Error("event spy must be a resolved value, not a promise, before it can be tested");
1481
- if (!e.eventName) throw new Error("toHaveReceivedEventTimes did not receive an event spy");
1482
- return {
1483
- message: () => `expected event "${e.eventName}" to have been called ${t} times, but was called ${e.events.length} time${e.events.length > 1 ? "s" : ""}`,
1484
- pass: e.length === t
1485
- };
1486
- },
1487
- toHaveFirstReceivedEventDetail: function toHaveFirstReceivedEventDetail(e, t) {
1488
- if (!e) throw new Error("toHaveFirstReceivedEventDetail event spy is null");
1489
- if ("function" == typeof e.then) throw new Error("event spy must be a resolved value, not a promise, before it can be tested");
1490
- if (!e.eventName) throw new Error("toHaveFirstReceivedEventDetail did not receive an event spy");
1491
- if (!e.firstEvent) throw new Error(`event "${e.eventName}" was not received`);
1492
- const r = deepEqual(e.firstEvent.detail, t);
1493
- return expect(e.lastEvent.detail).toEqual(t), {
1494
- message: () => `expected event "${e.eventName}" detail to ${r ? "not " : ""}equal`,
1495
- pass: r
1496
- };
1497
- },
1498
- toHaveNthReceivedEventDetail: function toHaveNthReceivedEventDetail(e, t, r) {
1499
- if (!e) throw new Error("toHaveNthReceivedEventDetail event spy is null");
1500
- if ("function" == typeof e.then) throw new Error("event spy must be a resolved value, not a promise, before it can be tested");
1501
- if (!e.eventName) throw new Error("toHaveNthReceivedEventDetail did not receive an event spy");
1502
- if (!e.firstEvent) throw new Error(`event "${e.eventName}" was not received`);
1503
- const s = e.events[t];
1504
- if (!s) throw new Error(`event at index ${t} was not received`);
1505
- const n = deepEqual(s.detail, r);
1506
- return expect(s.detail).toEqual(r), {
1507
- message: () => `expected event "${e.eventName}" detail to ${n ? "not " : ""}equal`,
1508
- pass: n
1509
- };
1510
- },
1511
- toMatchScreenshot: function toMatchScreenshot(e, t = {}) {
1512
- if (!e) throw new Error("expect toMatchScreenshot value is null");
1513
- if ("function" == typeof e.then) throw new Error("expect(compare).toMatchScreenshot() must be a resolved value, not a promise, before it can be tested");
1514
- if ("number" != typeof e.mismatchedPixels) throw new Error("expect toMatchScreenshot() value is not a screenshot compare");
1515
- const r = e.device || e.userAgent;
1516
- if ("number" == typeof t.allowableMismatchedRatio) {
1517
- if (t.allowableMismatchedRatio < 0 || t.allowableMismatchedRatio > 1) throw new Error("expect toMatchScreenshot() allowableMismatchedRatio must be a value ranging from 0 to 1");
1518
- const s = e.mismatchedPixels / (e.width * e.deviceScaleFactor * (e.height * e.deviceScaleFactor));
1519
- return {
1520
- message: () => `${r}: screenshot has a mismatch ratio of "${s}" for "${e.desc}", but expected ratio to be less than "${t.allowableMismatchedRatio}"`,
1521
- pass: s <= t.allowableMismatchedRatio
1522
- };
1523
- }
1524
- if ("number" == typeof t.allowableMismatchedPixels) {
1525
- if (t.allowableMismatchedPixels < 0) throw new Error("expect toMatchScreenshot() allowableMismatchedPixels value must be a value that is 0 or greater");
1526
- return {
1527
- message: () => `${r}: screenshot has "${e.mismatchedPixels}" mismatched pixels for "${e.desc}", but expected less than "${t.allowableMismatchedPixels}" mismatched pixels`,
1528
- pass: e.mismatchedPixels <= t.allowableMismatchedPixels
1529
- };
1530
- }
1531
- if ("number" == typeof e.allowableMismatchedRatio) {
1532
- const t = e.mismatchedPixels / (e.width * e.deviceScaleFactor * (e.height * e.deviceScaleFactor));
1533
- return {
1534
- message: () => `${r}: screenshot has a mismatch ratio of "${t}" for "${e.desc}", but expected ratio to be less than "${e.allowableMismatchedRatio}"`,
1535
- pass: t <= e.allowableMismatchedRatio
1536
- };
1537
- }
1538
- if ("number" == typeof e.allowableMismatchedPixels) return {
1539
- message: () => `${r}: screenshot has "${e.mismatchedPixels}" mismatched pixels for "${e.desc}", but expected less than "${e.allowableMismatchedPixels}" mismatched pixels`,
1540
- pass: e.mismatchedPixels <= e.allowableMismatchedPixels
1541
- };
1542
- throw new Error("expect toMatchScreenshot() missing allowableMismatchedPixels in testing config");
1543
- }
1544
- };
1545
-
1546
- class MockHeaders {
1547
- constructor(e) {
1548
- if (this._values = [], "object" == typeof e) if ("function" == typeof e[Symbol.iterator]) {
1549
- const t = [];
1550
- for (const r of e) "function" == typeof r[Symbol.iterator] && t.push([ ...r ]);
1551
- for (const e of t) this.append(e[0], e[1]);
1552
- } else for (const t in e) this.append(t, e[t]);
1553
- }
1554
- append(e, t) {
1555
- this._values.push([ e, t + "" ]);
1556
- }
1557
- delete(e) {
1558
- e = e.toLowerCase();
1559
- for (let t = this._values.length - 1; t >= 0; t--) this._values[t][0].toLowerCase() === e && this._values.splice(t, 1);
1560
- }
1561
- entries() {
1562
- const e = [];
1563
- for (const t of this.keys()) e.push([ t, this.get(t) ]);
1564
- let t = -1;
1565
- return {
1566
- next: () => (t++, {
1567
- value: e[t],
1568
- done: !e[t]
1569
- }),
1570
- [Symbol.iterator]() {
1571
- return this;
1572
- }
1573
- };
1574
- }
1575
- forEach(e) {
1576
- for (const t of this.entries()) e(t[1], t[0]);
1577
- }
1578
- get(e) {
1579
- const t = [];
1580
- e = e.toLowerCase();
1581
- for (const r of this._values) r[0].toLowerCase() === e && t.push(r[1]);
1582
- return t.length > 0 ? t.join(", ") : null;
1583
- }
1584
- has(e) {
1585
- e = e.toLowerCase();
1586
- for (const t of this._values) if (t[0].toLowerCase() === e) return !0;
1587
- return !1;
1588
- }
1589
- keys() {
1590
- const e = [];
1591
- for (const t of this._values) {
1592
- const r = t[0].toLowerCase();
1593
- e.includes(r) || e.push(r);
1594
- }
1595
- let t = -1;
1596
- return {
1597
- next: () => (t++, {
1598
- value: e[t],
1599
- done: !e[t]
1600
- }),
1601
- [Symbol.iterator]() {
1602
- return this;
1603
- }
1604
- };
1605
- }
1606
- set(e, t) {
1607
- for (const r of this._values) if (r[0].toLowerCase() === e.toLowerCase()) return void (r[1] = t + "");
1608
- this.append(e, t);
1609
- }
1610
- values() {
1611
- const e = this._values;
1612
- let t = -1;
1613
- return {
1614
- next() {
1615
- t++;
1616
- const r = !e[t];
1617
- return {
1618
- value: r ? void 0 : e[t][1],
1619
- done: r
1620
- };
1621
- },
1622
- [Symbol.iterator]() {
1623
- return this;
1624
- }
1625
- };
1626
- }
1627
- [Symbol.iterator]() {
1628
- return this.entries();
1629
- }
1630
- }
1631
-
1632
- class MockRequest {
1633
- constructor(e, t = {}) {
1634
- this._method = "GET", this._url = "/", this.bodyUsed = !1, this.cache = "default",
1635
- this.credentials = "same-origin", this.integrity = "", this.keepalive = !1, this.mode = "cors",
1636
- this.redirect = "follow", this.referrer = "about:client", this.referrerPolicy = "",
1637
- "string" == typeof e ? this.url = e : e && (Object.assign(this, e), this.headers = new MockHeaders(e.headers)),
1638
- Object.assign(this, t), t.headers && (this.headers = new MockHeaders(t.headers)),
1639
- this.headers || (this.headers = new MockHeaders);
1640
- }
1641
- get url() {
1642
- return "string" == typeof this._url ? new URL(this._url, location.href).href : new URL("/", location.href).href;
1643
- }
1644
- set url(e) {
1645
- this._url = e;
1646
- }
1647
- get method() {
1648
- return "string" == typeof this._method ? this._method.toUpperCase() : "GET";
1649
- }
1650
- set method(e) {
1651
- this._method = e;
1652
- }
1653
- clone() {
1654
- const e = {
1655
- ...this
1656
- };
1657
- return e.headers = new MockHeaders(this.headers), new MockRequest(e);
1658
- }
1659
- }
1660
-
1661
- class MockResponse {
1662
- constructor(e, t = {}) {
1663
- this.ok = !0, this.status = 200, this.statusText = "", this.type = "default", this.url = "",
1664
- this._body = e, t && Object.assign(this, t), this.headers = new MockHeaders(t.headers);
1665
- }
1666
- async json() {
1667
- return JSON.parse(this._body);
1668
- }
1669
- async text() {
1670
- return this._body;
1671
- }
1672
- clone() {
1673
- const e = {
1674
- ...this
1675
- };
1676
- return e.headers = new MockHeaders(this.headers), new MockResponse(this._body, e);
1677
- }
1678
- }
1679
-
1680
- const mockedResponses = new Map, mockFetch = {
1681
- json(e, t) {
1682
- setMockedResponse(new MockResponse(JSON.stringify(e, null, 2), {
1683
- headers: new MockHeaders({
1684
- "Content-Type": "application/json"
1685
- })
1686
- }), t, !1);
1687
- },
1688
- text(e, t) {
1689
- setMockedResponse(new MockResponse(e, {
1690
- headers: new MockHeaders({
1691
- "Content-Type": "text/plain"
1692
- })
1693
- }), t, !1);
1694
- },
1695
- response(e, t) {
1696
- setMockedResponse(e, t, !1);
1697
- },
1698
- reject(e, t) {
1699
- setMockedResponse(e, t, !0);
1700
- },
1701
- reset: function mockFetchReset() {
1702
- mockedResponses.clear();
1703
- }
1704
- };
1705
-
1706
- class MockResponse404 extends MockResponse {
1707
- constructor() {
1708
- super("", {
1709
- headers: new MockHeaders({
1710
- "Content-Type": "text/plain"
1711
- })
1712
- }), this.ok = !1, this.status = 404, this.statusText = "Not Found";
1713
- }
1714
- async json() {
1715
- return {
1716
- status: 404,
1717
- statusText: "Not Found"
1718
- };
1719
- }
1720
- async text() {
1721
- return "Not Found";
1722
- }
1723
- }
1724
-
1725
- const FETCH_DEFAULT_PATH = "/mock-fetch-data", HtmlSerializer = {
1726
- print: e => index_cjs.serializeNodeToHtml(e, {
1727
- serializeShadowRoot: !0,
1728
- prettyHtml: !0,
1729
- outerHtml: !0
1730
- }),
1731
- test: e => null != e && (e instanceof HTMLElement || e instanceof index_cjs.MockNode)
1732
- };
1733
-
1734
- class BuildContext {
1735
- constructor(e, t) {
1736
- this.buildId = -1, this.buildMessages = [], this.buildResults = null, this.bundleBuildCount = 0,
1737
- this.collections = [], this.completedTasks = [], this.components = [], this.componentGraph = new Map,
1738
- this.data = {}, this.buildStats = void 0, this.diagnostics = [], this.dirsAdded = [],
1739
- this.dirsDeleted = [], this.entryModules = [], this.filesAdded = [], this.filesChanged = [],
1740
- this.filesDeleted = [], this.filesUpdated = [], this.filesWritten = [], this.globalStyle = void 0,
1741
- this.hasConfigChanges = !1, this.hasFinished = !1, this.hasHtmlChanges = !1, this.hasPrintedResults = !1,
1742
- this.hasServiceWorkerChanges = !1, this.hasScriptChanges = !0, this.hasStyleChanges = !0,
1743
- this.hydrateAppFilePath = null, this.indexBuildCount = 0, this.indexDoc = void 0,
1744
- this.isRebuild = !1, this.moduleFiles = [], this.outputs = [], this.packageJson = {},
1745
- this.packageJsonFilePath = null, this.pendingCopyTasks = [], this.requiresFullBuild = !0,
1746
- this.scriptsAdded = [], this.scriptsDeleted = [], this.startTime = Date.now(), this.styleBuildCount = 0,
1747
- this.stylesPromise = null, this.stylesUpdated = [], this.timeSpan = null, this.transpileBuildCount = 0,
1748
- this.config = e, this.compilerCtx = t, this.buildId = ++this.compilerCtx.activeBuildId,
1749
- this.debug = e.logger.debug.bind(e.logger);
1750
- }
1751
- start() {
1752
- const e = `${this.isRebuild ? "rebuild" : "build"}, ${this.config.fsNamespace}, ${this.config.devMode ? "dev" : "prod"} mode, started`, t = {
1753
- buildId: this.buildId,
1754
- messages: [],
1755
- progress: 0
1756
- };
1757
- this.compilerCtx.events.emit("buildLog", t), this.timeSpan = this.createTimeSpan(e),
1758
- this.timestamp = getBuildTimestamp(), this.debug(`start build, ${this.timestamp}`);
1759
- const r = {
1760
- buildId: this.buildId,
1761
- timestamp: this.timestamp
1762
- };
1763
- this.compilerCtx.events.emit("buildStart", r);
1764
- }
1765
- createTimeSpan(e, t) {
1766
- if (!this.hasFinished || t) {
1767
- t && this.config.watch && (e = `${this.config.logger.cyan("[" + this.buildId + "]")} ${e}`);
1768
- const r = this.config.logger.createTimeSpan(e, t, this.buildMessages);
1769
- if (!t && this.compilerCtx.events) {
1770
- const e = {
1771
- buildId: this.buildId,
1772
- messages: this.buildMessages,
1773
- progress: getProgress(this.completedTasks)
1774
- };
1775
- this.compilerCtx.events.emit("buildLog", e);
1776
- }
1777
- return {
1778
- duration: () => r.duration(),
1779
- finish: (e, s, n, o) => {
1780
- if ((!this.hasFinished || t) && (t && this.config.watch && (e = `${this.config.logger.cyan("[" + this.buildId + "]")} ${e}`),
1781
- r.finish(e, s, n, o), !t)) {
1782
- const e = {
1783
- buildId: this.buildId,
1784
- messages: this.buildMessages.slice(),
1785
- progress: getProgress(this.completedTasks)
1786
- };
1787
- this.compilerCtx.events.emit("buildLog", e);
1788
- }
1789
- return r.duration();
1790
- }
1791
- };
1792
- }
1793
- return {
1794
- duration: () => 0,
1795
- finish: () => 0
1796
- };
1797
- }
1798
- debug(e) {
1799
- this.config.logger.debug(e);
1800
- }
1801
- get hasError() {
1802
- return hasError(this.diagnostics);
1803
- }
1804
- get hasWarning() {
1805
- return null != (e = this.diagnostics) && 0 !== e.length && e.some((e => "warn" === e.level));
1806
- var e;
1807
- }
1808
- progress(e) {
1809
- this.completedTasks.push(e);
1810
- }
1811
- async validateTypesBuild() {
1812
- this.hasError || this.validateTypesPromise && (this.config.watch || (this.debug("build, non-watch, waiting on validateTypes"),
1813
- await this.validateTypesPromise, this.debug("build, non-watch, finished waiting on validateTypes")));
1814
- }
1815
- }
1816
-
1817
- const getBuildTimestamp = () => {
1818
- const e = new Date;
1819
- let t = e.getUTCFullYear() + "-";
1820
- return t += ("0" + (e.getUTCMonth() + 1)).slice(-2) + "-", t += ("0" + e.getUTCDate()).slice(-2) + "T",
1821
- t += ("0" + e.getUTCHours()).slice(-2) + ":", t += ("0" + e.getUTCMinutes()).slice(-2) + ":",
1822
- t += ("0" + e.getUTCSeconds()).slice(-2), t;
1823
- }, getProgress = e => {
1824
- let t = 0;
1825
- const r = Object.keys(ProgressTask);
1826
- return r.forEach(((r, s) => {
1827
- e.includes(ProgressTask[r]) && (t = s);
1828
- })), (t + 1) / r.length;
1829
- }, ProgressTask = {
1830
- emptyOutputTargets: {},
1831
- transpileApp: {},
1832
- generateStyles: {},
1833
- generateOutputTargets: {},
1834
- validateTypesBuild: {},
1835
- writeBuildFiles: {}
1836
- };
1837
-
1838
- class Cache {
1839
- constructor(e, t) {
1840
- this.config = e, this.cacheFs = t, this.failed = 0, this.skip = !1, this.sys = e.sys,
1841
- this.logger = e.logger;
1842
- }
1843
- async initCacheDir() {
1844
- if (!this.config._isTesting && this.config.cacheDir) {
1845
- if (!this.config.enableCache || !this.cacheFs) return this.config.logger.info("cache optimizations disabled"),
1846
- void this.clearDiskCache();
1847
- this.config.logger.debug(`cache enabled, cacheDir: ${this.config.cacheDir}`);
1848
- try {
1849
- const e = path$2.join(this.config.cacheDir, "_README.log");
1850
- await this.cacheFs.writeFile(e, CACHE_DIR_README);
1851
- } catch (e) {
1852
- this.logger.error(`Cache, initCacheDir: ${e}`), this.config.enableCache = !1;
1853
- }
1854
- }
1855
- }
1856
- async get(e) {
1857
- if (!this.config.enableCache || this.skip) return null;
1858
- if (this.failed >= MAX_FAILED) return this.skip || (this.skip = !0, this.logger.debug(`cache had ${this.failed} failed ops, skip disk ops for remander of build`)),
1859
- null;
1860
- let t;
1861
- try {
1862
- t = await this.cacheFs.readFile(this.getCacheFilePath(e)), this.failed = 0, this.skip = !1;
1863
- } catch (e) {
1864
- this.failed++, t = null;
1865
- }
1866
- return t;
1867
- }
1868
- async put(e, t) {
1869
- if (!this.config.enableCache) return !1;
1870
- let r;
1871
- try {
1872
- await this.cacheFs.writeFile(this.getCacheFilePath(e), t), r = !0;
1873
- } catch (e) {
1874
- this.failed++, r = !1;
1875
- }
1876
- return r;
1877
- }
1878
- async has(e) {
1879
- return "string" == typeof await this.get(e);
1880
- }
1881
- async createKey(e, ...t) {
1882
- return this.config.enableCache ? e + "_" + await this.sys.generateContentHash(JSON.stringify(t), 32) : e + 9999999 * Math.random();
1883
- }
1884
- async commit() {
1885
- this.config.enableCache && (this.skip = !1, this.failed = 0, await this.cacheFs.commit(),
1886
- await this.clearExpiredCache());
1887
- }
1888
- clear() {
1889
- null != this.cacheFs && this.cacheFs.clearCache();
1890
- }
1891
- async clearExpiredCache() {
1892
- if (null == this.cacheFs || null == this.sys.cacheStorage) return;
1893
- const e = Date.now(), t = await this.sys.cacheStorage.get(EXP_STORAGE_KEY);
1894
- if (null != t) {
1895
- if (e - t < ONE_DAY) return;
1896
- const r = this.cacheFs.sys, s = await r.readDir(this.config.cacheDir), n = s.map((e => path$2.join(this.config.cacheDir, e)));
1897
- let o = 0;
1898
- const i = n.map((async t => {
1899
- const s = (await r.stat(t)).mtimeMs;
1900
- e - s > ONE_WEEK && (await r.removeFile(t), o++);
1901
- }));
1902
- await Promise.all(i), this.logger.debug(`clearExpiredCache, cachedFileNames: ${s.length}, totalCleared: ${o}`);
1903
- }
1904
- this.logger.debug("clearExpiredCache, set last clear"), await this.sys.cacheStorage.set(EXP_STORAGE_KEY, e);
1905
- }
1906
- async clearDiskCache() {
1907
- null != this.cacheFs && await this.cacheFs.access(this.config.cacheDir) && (await this.cacheFs.remove(this.config.cacheDir),
1908
- await this.cacheFs.commit());
1909
- }
1910
- getCacheFilePath(e) {
1911
- return path$2.join(this.config.cacheDir, e) + ".log";
1912
- }
1913
- getMemoryStats() {
1914
- return null != this.cacheFs ? this.cacheFs.getMemoryStats() : null;
1915
- }
1916
- }
1917
-
1918
- const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY = "last_clear_expired_cache", CACHE_DIR_README = '# Stencil Cache Directory\n\nThis directory contains files which the compiler has\ncached for faster builds. To disable caching, please set\n"enableCache: false" within the stencil config.\n\nTo change the cache directory, please update the\n"cacheDir" property within the stencil config.\n', getCommitInstructions = e => {
1919
- const t = {
1920
- filesToDelete: [],
1921
- filesToWrite: [],
1922
- filesToCopy: [],
1923
- dirsToDelete: [],
1924
- dirsToEnsure: []
1925
- };
1926
- e.forEach(((e, r) => {
1927
- if (!0 === e.queueWriteToDisk) {
1928
- if (!0 === e.isFile) {
1929
- t.filesToWrite.push(r);
1930
- const e = normalizePath(path$2.dirname(r));
1931
- t.dirsToEnsure.includes(e) || t.dirsToEnsure.push(e);
1932
- const s = t.dirsToDelete.indexOf(e);
1933
- s > -1 && t.dirsToDelete.splice(s, 1);
1934
- const n = t.filesToDelete.indexOf(r);
1935
- n > -1 && t.filesToDelete.splice(n, 1);
1936
- } else if (!0 === e.isDirectory) {
1937
- t.dirsToEnsure.includes(r) || t.dirsToEnsure.push(r);
1938
- const e = t.dirsToDelete.indexOf(r);
1939
- e > -1 && t.dirsToDelete.splice(e, 1);
1940
- }
1941
- } else if (!0 === e.queueDeleteFromDisk) e.isDirectory && !t.dirsToEnsure.includes(r) ? t.dirsToDelete.push(r) : e.isFile && !t.filesToWrite.includes(r) && t.filesToDelete.push(r); else if ("string" == typeof e.queueCopyFileToDest) {
1942
- const s = r, n = e.queueCopyFileToDest;
1943
- t.filesToCopy.push([ s, n ]);
1944
- const o = normalizePath(path$2.dirname(n));
1945
- t.dirsToEnsure.includes(o) || t.dirsToEnsure.push(o);
1946
- const i = t.dirsToDelete.indexOf(o);
1947
- i > -1 && t.dirsToDelete.splice(i, 1);
1948
- const a = t.filesToDelete.indexOf(n);
1949
- a > -1 && t.filesToDelete.splice(a, 1);
1950
- }
1951
- e.queueDeleteFromDisk = !1, e.queueWriteToDisk = !1;
1952
- }));
1953
- for (let e = 0, r = t.dirsToEnsure.length; e < r; e++) {
1954
- const r = t.dirsToEnsure[e].split("/");
1955
- for (let e = 2; e < r.length; e++) {
1956
- const s = r.slice(0, e).join("/");
1957
- !1 === t.dirsToEnsure.includes(s) && t.dirsToEnsure.push(s);
1958
- }
1959
- }
1960
- t.dirsToEnsure.sort(((e, t) => {
1961
- const r = e.split("/").length, s = t.split("/").length;
1962
- return r < s ? -1 : r > s ? 1 : e.length < t.length ? -1 : e.length > t.length ? 1 : 0;
1963
- })), t.dirsToDelete.sort(((e, t) => {
1964
- const r = e.split("/").length, s = t.split("/").length;
1965
- return r < s ? 1 : r > s ? -1 : e.length < t.length ? 1 : e.length > t.length ? -1 : 0;
1966
- }));
1967
- for (const e of t.dirsToEnsure) {
1968
- const r = t.dirsToDelete.indexOf(e);
1969
- r > -1 && t.dirsToDelete.splice(r, 1);
1970
- }
1971
- return t.dirsToDelete = t.dirsToDelete.filter((e => "/" !== e && !0 !== e.endsWith(":/"))),
1972
- t.dirsToEnsure = t.dirsToEnsure.filter((t => {
1973
- const r = e.get(t);
1974
- return (null == r || !0 !== r.exists || !0 !== r.isDirectory) && "/" !== t && !t.endsWith(":/");
1975
- })), t;
1976
- }, shouldIgnore = e => (e = e.trim().toLowerCase(), IGNORE.some((t => e.endsWith(t)))), IGNORE = [ ".ds_store", ".gitignore", "desktop.ini", "thumbs.db" ];
1977
-
1978
- (posix = {
1979
- resolve: function e() {
1980
- var t, r, s, n = "", o = !1;
1981
- for (r = arguments.length - 1; r >= -1 && !o; r--) r >= 0 ? s = arguments[r] : (void 0 === t && (t = process.cwd()),
1982
- s = t), assertPath(s), 0 !== s.length && (n = s + "/" + n, o = 47 === s.charCodeAt(0));
1983
- return n = normalizeStringPosix(n, !o), o ? n.length > 0 ? "/" + n : "/" : n.length > 0 ? n : ".";
1984
- },
1985
- normalize: function e(t) {
1986
- var r, s;
1987
- return assertPath(t), 0 === t.length ? "." : (r = 47 === t.charCodeAt(0), s = 47 === t.charCodeAt(t.length - 1),
1988
- 0 !== (t = normalizeStringPosix(t, !r)).length || r || (t = "."), t.length > 0 && s && (t += "/"),
1989
- r ? "/" + t : t);
1990
- },
1991
- isAbsolute: function e(t) {
1992
- return assertPath(t), t.length > 0 && 47 === t.charCodeAt(0);
1993
- },
1994
- join: function e() {
1995
- var t, r, s;
1996
- if (0 === arguments.length) return ".";
1997
- for (r = 0; r < arguments.length; ++r) assertPath(s = arguments[r]), s.length > 0 && (void 0 === t ? t = s : t += "/" + s);
1998
- return void 0 === t ? "." : posix.normalize(t);
1999
- },
2000
- relative: function e(t, r) {
2001
- var s, n, o, i, a, l, c, u, d, h;
2002
- if (assertPath(t), assertPath(r), t === r) return "";
2003
- if ((t = posix.resolve(t)) === (r = posix.resolve(r))) return "";
2004
- for (s = 1; s < t.length && 47 === t.charCodeAt(s); ++s) ;
2005
- for (o = (n = t.length) - s, i = 1; i < r.length && 47 === r.charCodeAt(i); ++i) ;
2006
- for (l = o < (a = r.length - i) ? o : a, c = -1, u = 0; u <= l; ++u) {
2007
- if (u === l) {
2008
- if (a > l) {
2009
- if (47 === r.charCodeAt(i + u)) return r.slice(i + u + 1);
2010
- if (0 === u) return r.slice(i + u);
2011
- } else o > l && (47 === t.charCodeAt(s + u) ? c = u : 0 === u && (c = 0));
2012
- break;
2013
- }
2014
- if ((d = t.charCodeAt(s + u)) !== r.charCodeAt(i + u)) break;
2015
- 47 === d && (c = u);
2016
- }
2017
- for (h = "", u = s + c + 1; u <= n; ++u) u !== n && 47 !== t.charCodeAt(u) || (0 === h.length ? h += ".." : h += "/..");
2018
- return h.length > 0 ? h + r.slice(i + c) : (i += c, 47 === r.charCodeAt(i) && ++i,
2019
- r.slice(i));
2020
- },
2021
- _makeLong: function e(t) {
2022
- return t;
2023
- },
2024
- dirname: function e(t) {
2025
- var r, s, n, o;
2026
- if (assertPath(t), 0 === t.length) return ".";
2027
- for (r = 47 === t.charCodeAt(0), s = -1, n = !0, o = t.length - 1; o >= 1; --o) if (47 === t.charCodeAt(o)) {
2028
- if (!n) {
2029
- s = o;
2030
- break;
2031
- }
2032
- } else n = !1;
2033
- return -1 === s ? r ? "/" : "." : r && 1 === s ? "//" : t.slice(0, s);
2034
- },
2035
- basename: function e(t, r) {
2036
- var s, n, o, i, a, l, c;
2037
- if (void 0 !== r && "string" != typeof r) throw new TypeError('"ext" argument must be a string');
2038
- if (assertPath(t), s = 0, n = -1, o = !0, void 0 !== r && r.length > 0 && r.length <= t.length) {
2039
- if (r.length === t.length && r === t) return "";
2040
- for (a = r.length - 1, l = -1, i = t.length - 1; i >= 0; --i) if (47 === (c = t.charCodeAt(i))) {
2041
- if (!o) {
2042
- s = i + 1;
2043
- break;
2044
- }
2045
- } else -1 === l && (o = !1, l = i + 1), a >= 0 && (c === r.charCodeAt(a) ? -1 == --a && (n = i) : (a = -1,
2046
- n = l));
2047
- return s === n ? n = l : -1 === n && (n = t.length), t.slice(s, n);
2048
- }
2049
- for (i = t.length - 1; i >= 0; --i) if (47 === t.charCodeAt(i)) {
2050
- if (!o) {
2051
- s = i + 1;
2052
- break;
2053
- }
2054
- } else -1 === n && (o = !1, n = i + 1);
2055
- return -1 === n ? "" : t.slice(s, n);
2056
- },
2057
- extname: function e(t) {
2058
- var r, s, n, o, i, a, l;
2059
- for (assertPath(t), r = -1, s = 0, n = -1, o = !0, i = 0, a = t.length - 1; a >= 0; --a) if (47 !== (l = t.charCodeAt(a))) -1 === n && (o = !1,
2060
- n = a + 1), 46 === l ? -1 === r ? r = a : 1 !== i && (i = 1) : -1 !== r && (i = -1); else if (!o) {
2061
- s = a + 1;
2062
- break;
2063
- }
2064
- return -1 === r || -1 === n || 0 === i || 1 === i && r === n - 1 && r === s + 1 ? "" : t.slice(r, n);
2065
- },
2066
- format: function e(t) {
2067
- if (null === t || "object" != typeof t) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t);
2068
- return function r(e, t) {
2069
- var r = t.dir || t.root, s = t.base || (t.name || "") + (t.ext || "");
2070
- return r ? r === t.root ? r + s : r + e + s : s;
2071
- }("/", t);
2072
- },
2073
- parse: function e(t) {
2074
- var r, s, n, o, i, a, l, c, u, d;
2075
- if (assertPath(t), r = {
2076
- root: "",
2077
- dir: "",
2078
- base: "",
2079
- ext: "",
2080
- name: ""
2081
- }, 0 === t.length) return r;
2082
- for ((n = 47 === (s = t.charCodeAt(0))) ? (r.root = "/", o = 1) : o = 0, i = -1,
2083
- a = 0, l = -1, c = !0, u = t.length - 1, d = 0; u >= o; --u) if (47 !== (s = t.charCodeAt(u))) -1 === l && (c = !1,
2084
- l = u + 1), 46 === s ? -1 === i ? i = u : 1 !== d && (d = 1) : -1 !== i && (d = -1); else if (!c) {
2085
- a = u + 1;
2086
- break;
2087
- }
2088
- return -1 === i || -1 === l || 0 === d || 1 === d && i === l - 1 && i === a + 1 ? -1 !== l && (r.base = r.name = 0 === a && n ? t.slice(1, l) : t.slice(a, l)) : (0 === a && n ? (r.name = t.slice(1, i),
2089
- r.base = t.slice(1, l)) : (r.name = t.slice(a, i), r.base = t.slice(a, l)), r.ext = t.slice(i, l)),
2090
- a > 0 ? r.dir = t.slice(0, a - 1) : n && (r.dir = "/"), r;
2091
- },
2092
- sep: "/",
2093
- delimiter: ":",
2094
- win32: null,
2095
- posix: null
2096
- }).posix = posix, pathBrowserify = posix;
2097
-
2098
- const buildEvents = () => {
2099
- const e = [], t = t => {
2100
- const r = e.findIndex((e => e.callback === t));
2101
- return r > -1 && (e.splice(r, 1), !0);
2102
- };
2103
- return {
2104
- emit: (t, r) => {
2105
- const s = t.toLowerCase().trim(), n = e.slice();
2106
- for (const e of n) if (null == e.eventName) try {
2107
- e.callback(t, r);
2108
- } catch (e) {
2109
- console.error(e);
2110
- } else if (e.eventName === s) try {
2111
- e.callback(r);
2112
- } catch (e) {
2113
- console.error(e);
2114
- }
2115
- },
2116
- on: (r, s) => {
2117
- if ("function" == typeof r) {
2118
- const s = null, n = r;
2119
- return e.push({
2120
- eventName: s,
2121
- callback: n
2122
- }), () => t(n);
2123
- }
2124
- if ("string" == typeof r && "function" == typeof s) {
2125
- const n = r.toLowerCase().trim(), o = s;
2126
- return e.push({
2127
- eventName: n,
2128
- callback: o
2129
- }), () => t(o);
2130
- }
2131
- return () => !1;
2132
- },
2133
- unsubscribeAll: () => {
2134
- e.length = 0;
2135
- }
2136
- };
2137
- }, IS_NODE_ENV = !("undefined" == typeof global || "function" != typeof require || !global.process || "string" != typeof __filename || global.origin && "string" == typeof global.origin);
2138
-
2139
- IS_NODE_ENV && process.platform;
2140
-
2141
- const IS_BROWSER_ENV = "undefined" != typeof location && "undefined" != typeof navigator && "undefined" != typeof XMLHttpRequest, IS_WEB_WORKER_ENV = IS_BROWSER_ENV && "undefined" != typeof self && "function" == typeof self.importScripts, HAS_WEB_WORKER = IS_BROWSER_ENV && "function" == typeof Worker, IS_FETCH_ENV = "function" == typeof fetch;
2142
-
2143
- IS_NODE_ENV && require, IS_NODE_ENV && process.cwd;
2144
-
2145
- const YELLOW = "#f39c12", RED = "#c0392b", BLUE = "#3498db", COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json", ".md" ], COMMON_DIR_FILENAMES = [ "package.json", "index.js", "index.mjs" ], getCommonDirName = (e, t) => e + "/" + t, isCommonDirModuleFile = e => COMMON_DIR_MODULE_EXTS.some((t => e.endsWith(t))), shouldFetchModule = e => IS_FETCH_ENV && IS_BROWSER_ENV && isNodeModulePath(e), isNodeModulePath = e => normalizePath(e).split("/").includes("node_modules"), getPackageDirPath = (e, t) => {
2146
- const r = normalizePath(e).split("/"), s = (e => {
2147
- e.startsWith("~") && (e = e.substring(1));
2148
- const t = e.split("/"), r = {
2149
- moduleId: null,
2150
- filePath: null,
2151
- scope: null,
2152
- scopeSubModuleId: null
2153
- };
2154
- return e.startsWith("@") && t.length > 1 ? (r.moduleId = t.slice(0, 2).join("/"),
2155
- r.filePath = t.slice(2).join("/"), r.scope = t[0], r.scopeSubModuleId = t[1]) : (r.moduleId = t[0],
2156
- r.filePath = t.slice(1).join("/")), r;
2157
- })(t);
2158
- for (let e = r.length - 1; e >= 1; e--) if ("node_modules" === r[e - 1]) if (s.scope) {
2159
- if (r[e] === s.scope && r[e + 1] === s.scopeSubModuleId) return r.slice(0, e + 2).join("/");
2160
- } else if (r[e] === s.moduleId) return r.slice(0, e + 1).join("/");
2161
- return null;
2162
- }, packageVersions = new Map, known404Urls = new Set, getCommonDirUrl = (e, t, r, s) => getNodeModuleFetchUrl(e, t, r) + "/" + s, getNodeModuleFetchUrl = (e, t, r) => {
2163
- let s = (r = normalizePath(r)).split("/").filter((e => e.length));
2164
- const n = s.lastIndexOf("node_modules");
2165
- n > -1 && n < s.length - 1 && (s = s.slice(n + 1));
2166
- let o = s.shift();
2167
- o.startsWith("@") && (o += "/" + s.shift());
2168
- const i = s.join("/");
2169
- return "@stencil/core" === o ? ((e, t) => {
2170
- let r = (t = normalizePath(t)).split("/");
2171
- const s = r.lastIndexOf("node_modules");
2172
- s > -1 && s < r.length - 1 && (r = r.slice(s + 1), r = r[0].startsWith("@") ? r.slice(2) : r.slice(1),
2173
- t = r.join("/"));
2174
- const n = new URL("../", e).href;
2175
- return new URL("./" + t, n).href;
2176
- })(e.getCompilerExecutingPath(), i) : e.getRemoteModuleUrl({
2177
- moduleId: o,
2178
- version: t.get(o),
2179
- path: i
2180
- });
2181
- }, knownUrlSkips = [ "/@stencil/core/internal.js", "/@stencil/core/internal.json", "/@stencil/core/internal.mjs", "/@stencil/core/internal/stencil-core.js/index.json", "/@stencil/core/internal/stencil-core.js.json", "/@stencil/core/internal/stencil-core.js/package.json", "/@stencil/core.js", "/@stencil/core.json", "/@stencil/core.mjs", "/@stencil/core.css", "/@stencil/core/index.js", "/@stencil/core/index.json", "/@stencil/core/index.mjs", "/@stencil/core/index.css", "/@stencil/package.json" ], fetchModuleAsync = async (e, t, r, s, n) => {
2182
- if (!((e => {
2183
- if (!(e => e.endsWith(".d.ts"))(t = e) && t.endsWith(".ts") || (e => e.endsWith(".tsx"))(e)) return !0;
2184
- var t;
2185
- const r = e.split("/"), s = r[r.length - 2], n = r[r.length - 1];
2186
- return !("node_modules" !== s || !isCommonDirModuleFile(n));
2187
- })(n) || known404Urls.has(s) || (e => knownUrlSkips.some((t => e.endsWith(t))))(s))) try {
2188
- const o = await ((e, t, r) => e && isFunction(e.fetch) ? e.fetch(t, r) : fetch(t, r))(e, s);
2189
- if (o) {
2190
- if (o.ok) {
2191
- const i = await o.clone().text();
2192
- return await (async (e, t, r, s, n, o) => {
2193
- r.endsWith("package.json") && ((e, t) => {
2194
- try {
2195
- const r = JSON.parse(t);
2196
- r.name && r.version && ((e, t, r) => {
2197
- e.set(t, r);
2198
- })(e, r.name, r.version);
2199
- } catch (e) {}
2200
- })(o, n);
2201
- let i = path$2.dirname(s);
2202
- for (;"/" !== i && "" !== i; ) t ? (t.clearFileCache(i), await t.sys.createDir(i)) : await e.createDir(i),
2203
- i = path$2.dirname(i);
2204
- t ? (t.clearFileCache(s), await t.sys.writeFile(s, n)) : await e.writeFile(s, n);
2205
- })(e, t, s, n, i, r), i;
2206
- }
2207
- 404 === o.status && known404Urls.add(s);
2208
- }
2209
- } catch (e) {
2210
- console.error(e);
2211
- }
2212
- };
2213
-
2214
- caller = function() {
2215
- var e, t = Error.prepareStackTrace;
2216
- return Error.prepareStackTrace = function(e, t) {
2217
- return t;
2218
- }, e = (new Error).stack, Error.prepareStackTrace = t, e[2].getFileName();
2219
- }, pathParse = function createCommonjsModule(e, t, r) {
2220
- return e(r = {
2221
- path: t,
2222
- exports: {},
2223
- require: function(e, t) {
2224
- return function s() {
2225
- throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
2226
- }(null == t && r.path);
2227
- }
2228
- }, r.exports), r.exports;
2229
- }((function(e) {
2230
- var t, r, s = "win32" === process.platform, n = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/, o = {
2231
- parse: function(e) {
2232
- if ("string" != typeof e) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof e);
2233
- var t = function r(e) {
2234
- return n.exec(e).slice(1);
2235
- }(e);
2236
- if (!t || 5 !== t.length) throw new TypeError("Invalid path '" + e + "'");
2237
- return {
2238
- root: t[1],
2239
- dir: t[0] === t[1] ? t[0] : t[0].slice(0, -1),
2240
- base: t[2],
2241
- ext: t[4],
2242
- name: t[3]
2243
- };
2244
- }
2245
- };
2246
- t = /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/, (r = {}).parse = function(e) {
2247
- if ("string" != typeof e) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof e);
2248
- var r = function s(e) {
2249
- return t.exec(e).slice(1);
2250
- }(e);
2251
- if (!r || 5 !== r.length) throw new TypeError("Invalid path '" + e + "'");
2252
- return {
2253
- root: r[1],
2254
- dir: r[0].slice(0, -1),
2255
- base: r[2],
2256
- ext: r[4],
2257
- name: r[3]
2258
- };
2259
- }, e.exports = s ? o.parse : r.parse, e.exports.posix = r.parse, e.exports.win32 = o.parse;
2260
- })), parse = path__default.default.parse || pathParse, getNodeModulesDirs = function e(t, r) {
2261
- var s, n, o = "/";
2262
- for (/^([A-Za-z]:)/.test(t) ? o = "" : /^\\\\/.test(t) && (o = "\\\\"), s = [ t ],
2263
- n = parse(t); n.dir !== s[s.length - 1]; ) s.push(n.dir), n = parse(n.dir);
2264
- return s.reduce((function(e, t) {
2265
- return e.concat(r.map((function(e) {
2266
- return path__default.default.resolve(o, t, e);
2267
- })));
2268
- }), []);
2269
- }, nodeModulesPaths = function e(t, r, s) {
2270
- var n, o = r && r.moduleDirectory ? [].concat(r.moduleDirectory) : [ "node_modules" ];
2271
- return r && "function" == typeof r.paths ? r.paths(s, t, (function() {
2272
- return getNodeModulesDirs(t, o);
2273
- }), r) : (n = getNodeModulesDirs(t, o), r && r.paths ? n.concat(r.paths) : n);
2274
- }, normalizeOptions = function(e, t) {
2275
- return t || {};
2276
- }, ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", slice = Array.prototype.slice,
2277
- toStr = Object.prototype.toString, implementation = function e(t) {
2278
- var r, s, n, o, i, a, l, c = this;
2279
- if ("function" != typeof c || "[object Function]" !== toStr.call(c)) throw new TypeError(ERROR_MESSAGE + c);
2280
- for (r = slice.call(arguments, 1), n = function() {
2281
- if (this instanceof s) {
2282
- var e = c.apply(this, r.concat(slice.call(arguments)));
2283
- return Object(e) === e ? e : this;
2284
- }
2285
- return c.apply(t, r.concat(slice.call(arguments)));
2286
- }, o = Math.max(0, c.length - r.length), i = [], a = 0; a < o; a++) i.push("$" + a);
2287
- return s = Function("binder", "return function (" + i.join(",") + "){ return binder.apply(this,arguments); }")(n),
2288
- c.prototype && ((l = function e() {}).prototype = c.prototype, s.prototype = new l,
2289
- l.prototype = null), s;
2290
- }, functionBind = Function.prototype.bind || implementation, src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2291
-
2292
- const data$1 = {
2293
- assert: !0,
2294
- "assert/strict": ">= 15",
2295
- async_hooks: ">= 8",
2296
- buffer_ieee754: "< 0.9.7",
2297
- buffer: !0,
2298
- child_process: !0,
2299
- cluster: !0,
2300
- console: !0,
2301
- constants: !0,
2302
- crypto: !0,
2303
- _debug_agent: ">= 1 && < 8",
2304
- _debugger: "< 8",
2305
- dgram: !0,
2306
- diagnostics_channel: ">= 15.1",
2307
- dns: !0,
2308
- "dns/promises": ">= 15",
2309
- domain: ">= 0.7.12",
2310
- events: !0,
2311
- freelist: "< 6",
2312
- fs: !0,
2313
- "fs/promises": [ ">= 10 && < 10.1", ">= 14" ],
2314
- _http_agent: ">= 0.11.1",
2315
- _http_client: ">= 0.11.1",
2316
- _http_common: ">= 0.11.1",
2317
- _http_incoming: ">= 0.11.1",
2318
- _http_outgoing: ">= 0.11.1",
2319
- _http_server: ">= 0.11.1",
2320
- http: !0,
2321
- http2: ">= 8.8",
2322
- https: !0,
2323
- inspector: ">= 8.0.0",
2324
- _linklist: "< 8",
2325
- module: !0,
2326
- net: !0,
2327
- "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
2328
- "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
2329
- "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
2330
- os: !0,
2331
- path: !0,
2332
- "path/posix": ">= 15.3",
2333
- "path/win32": ">= 15.3",
2334
- perf_hooks: ">= 8.5",
2335
- process: ">= 1",
2336
- punycode: !0,
2337
- querystring: !0,
2338
- readline: !0,
2339
- repl: !0,
2340
- smalloc: ">= 0.11.5 && < 3",
2341
- _stream_duplex: ">= 0.9.4",
2342
- _stream_transform: ">= 0.9.4",
2343
- _stream_wrap: ">= 1.4.1",
2344
- _stream_passthrough: ">= 0.9.4",
2345
- _stream_readable: ">= 0.9.4",
2346
- _stream_writable: ">= 0.9.4",
2347
- stream: !0,
2348
- "stream/promises": ">= 15",
2349
- string_decoder: !0,
2350
- sys: [ ">= 0.6 && < 0.7", ">= 0.8" ],
2351
- timers: !0,
2352
- "timers/promises": ">= 15",
2353
- _tls_common: ">= 0.11.13",
2354
- _tls_legacy: ">= 0.11.3 && < 10",
2355
- _tls_wrap: ">= 0.11.3",
2356
- tls: !0,
2357
- trace_events: ">= 10",
2358
- tty: !0,
2359
- url: !0,
2360
- util: !0,
2361
- "util/types": ">= 15.3",
2362
- "v8/tools/arguments": ">= 10 && < 12",
2363
- "v8/tools/codemap": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2364
- "v8/tools/consarray": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2365
- "v8/tools/csvparser": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2366
- "v8/tools/logreader": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2367
- "v8/tools/profile_view": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2368
- "v8/tools/splaytree": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2369
- v8: ">= 1",
2370
- vm: !0,
2371
- wasi: ">= 13.4 && < 13.5",
2372
- worker_threads: ">= 11.7",
2373
- zlib: !0
2374
- };
2375
-
2376
- isCoreModule = function e(t, r) {
2377
- return src(data$1, t) && function s(e, t) {
2378
- var r, s;
2379
- if ("boolean" == typeof t) return t;
2380
- if ("string" != typeof (r = void 0 === e ? process.versions && process.versions.node && process.versions.node : e)) throw new TypeError(void 0 === e ? "Unable to determine current node version" : "If provided, a valid node version is required");
2381
- if (t && "object" == typeof t) {
2382
- for (s = 0; s < t.length; ++s) if (matchesRange$1(r, t[s])) return !0;
2383
- return !1;
2384
- }
2385
- return matchesRange$1(r, t);
2386
- }(r, data$1[t]);
2387
- }, realpathFS$1 = fs__default.default.realpath && "function" == typeof fs__default.default.realpath.native ? fs__default.default.realpath.native : fs__default.default.realpath,
2388
- defaultIsFile$1 = function e(t, r) {
2389
- fs__default.default.stat(t, (function(e, t) {
2390
- return e ? "ENOENT" === e.code || "ENOTDIR" === e.code ? r(null, !1) : r(e) : r(null, t.isFile() || t.isFIFO());
2391
- }));
2392
- }, defaultIsDir$1 = function e(t, r) {
2393
- fs__default.default.stat(t, (function(e, t) {
2394
- return e ? "ENOENT" === e.code || "ENOTDIR" === e.code ? r(null, !1) : r(e) : r(null, t.isDirectory());
2395
- }));
2396
- }, defaultRealpath = function e(t, r) {
2397
- realpathFS$1(t, (function(e, s) {
2398
- e && "ENOENT" !== e.code ? r(e) : r(null, e ? t : s);
2399
- }));
2400
- }, maybeRealpath = function e(t, r, s, n) {
2401
- s && !1 === s.preserveSymlinks ? t(r, n) : n(null, r);
2402
- }, defaultReadPackage = function e(t, r, s) {
2403
- t(r, (function(e, t) {
2404
- if (e) s(e); else try {
2405
- var r = JSON.parse(t);
2406
- s(null, r);
2407
- } catch (e) {
2408
- s(null);
2409
- }
2410
- }));
2411
- }, getPackageCandidates$1 = function e(t, r, s) {
2412
- var n, o = nodeModulesPaths(r, s, t);
2413
- for (n = 0; n < o.length; n++) o[n] = path__default.default.join(o[n], t);
2414
- return o;
2415
- }, async = function e(t, r, s) {
2416
- function n(e) {
2417
- if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) T = path__default.default.resolve(e, t),
2418
- "." !== t && ".." !== t && "/" !== t.slice(-1) || (T += "/"), /\/$/.test(t) && T === e ? l(T, C.package, o) : i(T, C.package, o); else {
2419
- if (_ && isCoreModule(t)) return S(null, t);
2420
- !function r(e, t, s) {
2421
- var n = function() {
2422
- return getPackageCandidates$1(e, t, C);
2423
- };
2424
- c(s, y ? y(e, t, n, C) : n());
2425
- }(t, e, (function(e, r, s) {
2426
- if (e) S(e); else {
2427
- if (r) return maybeRealpath(f, r, C, (function(e, t) {
2428
- e ? S(e) : S(null, t, s);
2429
- }));
2430
- var n = new Error("Cannot find module '" + t + "' from '" + b + "'");
2431
- n.code = "MODULE_NOT_FOUND", S(n);
2432
- }
2433
- }));
2434
- }
2435
- }
2436
- function o(e, r, s) {
2437
- e ? S(e) : r ? S(null, r, s) : l(T, (function(e, r, s) {
2438
- if (e) S(e); else if (r) maybeRealpath(f, r, C, (function(e, t) {
2439
- e ? S(e) : S(null, t, s);
2440
- })); else {
2441
- var n = new Error("Cannot find module '" + t + "' from '" + b + "'");
2442
- n.code = "MODULE_NOT_FOUND", S(n);
2443
- }
2444
- }));
2445
- }
2446
- function i(e, t, r) {
2447
- var s = t, n = r;
2448
- "function" == typeof s && (n = s, s = void 0), function e(t, r, s) {
2449
- function o(s, o, a) {
2450
- var u, h, p;
2451
- return c = o, s ? n(s) : a && c && C.pathFilter && (h = (u = path__default.default.relative(a, l)).slice(0, u.length - t[0].length),
2452
- p = C.pathFilter(c, r, h)) ? e([ "" ].concat(w.slice()), path__default.default.resolve(a, p), c) : void d(l, i);
2453
- }
2454
- function i(s, o) {
2455
- return s ? n(s) : o ? n(null, l, c) : void e(t.slice(1), r, c);
2456
- }
2457
- var l, c;
2458
- if (0 === t.length) return n(null, void 0, s);
2459
- l = r + t[0], (c = s) ? o(null, c) : a(path__default.default.dirname(l), o);
2460
- }([ "" ].concat(w), e, s);
2461
- }
2462
- function a(e, t) {
2463
- return "" === e || "/" === e || "win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e) ? t(null) : void maybeRealpath(f, e, C, (function(r, s) {
2464
- if (r) return a(path__default.default.dirname(e), t);
2465
- var n = path__default.default.join(s, "package.json");
2466
- d(n, (function(r, s) {
2467
- if (!s) return a(path__default.default.dirname(e), t);
2468
- m(p, n, (function(r, s) {
2469
- r && t(r);
2470
- var o = s;
2471
- o && C.packageFilter && (o = C.packageFilter(o, n)), t(null, o, e);
2472
- }));
2473
- }));
2474
- }));
2475
- }
2476
- function l(e, t, r) {
2477
- var s = r, n = t;
2478
- "function" == typeof n && (s = n, n = C.package), maybeRealpath(f, e, C, (function(t, r) {
2479
- if (t) return s(t);
2480
- var o = path__default.default.join(r, "package.json");
2481
- d(o, (function(t, r) {
2482
- return t ? s(t) : r ? void m(p, o, (function(t, r) {
2483
- var n, a;
2484
- return t ? s(t) : ((n = r) && C.packageFilter && (n = C.packageFilter(n, o)), n && n.main ? "string" != typeof n.main ? ((a = new TypeError("package “" + n.name + "” `main` must be a string")).code = "INVALID_PACKAGE_MAIN",
2485
- s(a)) : ("." !== n.main && "./" !== n.main || (n.main = "index"), void i(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
2486
- return t ? s(t) : r ? s(null, r, n) : n ? void l(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
2487
- return t ? s(t) : r ? s(null, r, n) : void i(path__default.default.join(e, "index"), n, s);
2488
- })) : i(path__default.default.join(e, "index"), n, s);
2489
- }))) : void i(path__default.default.join(e, "/index"), n, s));
2490
- })) : i(path__default.default.join(e, "index"), n, s);
2491
- }));
2492
- }));
2493
- }
2494
- function c(e, t) {
2495
- function r(t, r, o) {
2496
- return t ? e(t) : r ? e(null, r, o) : void l(n, C.package, s);
2497
- }
2498
- function s(r, s, n) {
2499
- return r ? e(r) : s ? e(null, s, n) : void c(e, t.slice(1));
2500
- }
2501
- if (0 === t.length) return e(null, void 0);
2502
- var n = t[0];
2503
- h(path__default.default.dirname(n), (function o(s, a) {
2504
- return s ? e(s) : a ? void i(n, C.package, r) : c(e, t.slice(1));
2505
- }));
2506
- }
2507
- var u, d, h, p, f, m, g, y, w, _, v, b, E, T, S = s, C = r;
2508
- return "function" == typeof r && (S = C, C = {}), "string" != typeof t ? (u = new TypeError("Path must be a string."),
2509
- process.nextTick((function() {
2510
- S(u);
2511
- }))) : (C = normalizeOptions(0, C), d = C.isFile || defaultIsFile$1, h = C.isDirectory || defaultIsDir$1,
2512
- p = C.readFile || fs__default.default.readFile, f = C.realpath || defaultRealpath,
2513
- m = C.readPackage || defaultReadPackage, C.readFile && C.readPackage ? (g = new TypeError("`readFile` and `readPackage` are mutually exclusive."),
2514
- process.nextTick((function() {
2515
- S(g);
2516
- }))) : (y = C.packageIterator, w = C.extensions || [ ".js" ], _ = !1 !== C.includeCoreModules,
2517
- v = C.basedir || path__default.default.dirname(caller()), b = C.filename || v, C.paths = C.paths || [],
2518
- E = path__default.default.resolve(v), void maybeRealpath(f, E, C, (function(e, t) {
2519
- e ? S(e) : n(t);
2520
- }))));
2521
- };
2522
-
2523
- const data = {
2524
- assert: !0,
2525
- "assert/strict": ">= 15",
2526
- async_hooks: ">= 8",
2527
- buffer_ieee754: "< 0.9.7",
2528
- buffer: !0,
2529
- child_process: !0,
2530
- cluster: !0,
2531
- console: !0,
2532
- constants: !0,
2533
- crypto: !0,
2534
- _debug_agent: ">= 1 && < 8",
2535
- _debugger: "< 8",
2536
- dgram: !0,
2537
- diagnostics_channel: ">= 15.1",
2538
- dns: !0,
2539
- "dns/promises": ">= 15",
2540
- domain: ">= 0.7.12",
2541
- events: !0,
2542
- freelist: "< 6",
2543
- fs: !0,
2544
- "fs/promises": [ ">= 10 && < 10.1", ">= 14" ],
2545
- _http_agent: ">= 0.11.1",
2546
- _http_client: ">= 0.11.1",
2547
- _http_common: ">= 0.11.1",
2548
- _http_incoming: ">= 0.11.1",
2549
- _http_outgoing: ">= 0.11.1",
2550
- _http_server: ">= 0.11.1",
2551
- http: !0,
2552
- http2: ">= 8.8",
2553
- https: !0,
2554
- inspector: ">= 8.0.0",
2555
- _linklist: "< 8",
2556
- module: !0,
2557
- net: !0,
2558
- "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
2559
- "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
2560
- "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
2561
- os: !0,
2562
- path: !0,
2563
- "path/posix": ">= 15.3",
2564
- "path/win32": ">= 15.3",
2565
- perf_hooks: ">= 8.5",
2566
- process: ">= 1",
2567
- punycode: !0,
2568
- querystring: !0,
2569
- readline: !0,
2570
- repl: !0,
2571
- smalloc: ">= 0.11.5 && < 3",
2572
- _stream_duplex: ">= 0.9.4",
2573
- _stream_transform: ">= 0.9.4",
2574
- _stream_wrap: ">= 1.4.1",
2575
- _stream_passthrough: ">= 0.9.4",
2576
- _stream_readable: ">= 0.9.4",
2577
- _stream_writable: ">= 0.9.4",
2578
- stream: !0,
2579
- "stream/promises": ">= 15",
2580
- string_decoder: !0,
2581
- sys: [ ">= 0.6 && < 0.7", ">= 0.8" ],
2582
- timers: !0,
2583
- "timers/promises": ">= 15",
2584
- _tls_common: ">= 0.11.13",
2585
- _tls_legacy: ">= 0.11.3 && < 10",
2586
- _tls_wrap: ">= 0.11.3",
2587
- tls: !0,
2588
- trace_events: ">= 10",
2589
- tty: !0,
2590
- url: !0,
2591
- util: !0,
2592
- "util/types": ">= 15.3",
2593
- "v8/tools/arguments": ">= 10 && < 12",
2594
- "v8/tools/codemap": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2595
- "v8/tools/consarray": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2596
- "v8/tools/csvparser": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2597
- "v8/tools/logreader": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2598
- "v8/tools/profile_view": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2599
- "v8/tools/splaytree": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
2600
- v8: ">= 1",
2601
- vm: !0,
2602
- wasi: ">= 13.4 && < 13.5",
2603
- worker_threads: ">= 11.7",
2604
- zlib: !0
2605
- };
2606
-
2607
- for (mod in current = process.versions && process.versions.node && process.versions.node.split(".") || [],
2608
- core = {}, data) Object.prototype.hasOwnProperty.call(data, mod) && (core[mod] = versionIncluded(data[mod]));
2609
-
2610
- core_1 = core, isCore = function e(t) {
2611
- return isCoreModule(t);
2612
- }, realpathFS = fs__default.default.realpathSync && "function" == typeof fs__default.default.realpathSync.native ? fs__default.default.realpathSync.native : fs__default.default.realpathSync,
2613
- defaultIsFile = function e(t) {
2614
- try {
2615
- var r = fs__default.default.statSync(t);
2616
- } catch (e) {
2617
- if (e && ("ENOENT" === e.code || "ENOTDIR" === e.code)) return !1;
2618
- throw e;
2619
- }
2620
- return r.isFile() || r.isFIFO();
2621
- }, defaultIsDir = function e(t) {
2622
- try {
2623
- var r = fs__default.default.statSync(t);
2624
- } catch (e) {
2625
- if (e && ("ENOENT" === e.code || "ENOTDIR" === e.code)) return !1;
2626
- throw e;
2627
- }
2628
- return r.isDirectory();
2629
- }, defaultRealpathSync = function e(t) {
2630
- try {
2631
- return realpathFS(t);
2632
- } catch (e) {
2633
- if ("ENOENT" !== e.code) throw e;
2634
- }
2635
- return t;
2636
- }, maybeRealpathSync = function e(t, r, s) {
2637
- return s && !1 === s.preserveSymlinks ? t(r) : r;
2638
- }, defaultReadPackageSync = function e(t, r) {
2639
- var s = t(r);
2640
- try {
2641
- return JSON.parse(s);
2642
- } catch (e) {}
2643
- }, getPackageCandidates = function e(t, r, s) {
2644
- var n, o = nodeModulesPaths(r, s, t);
2645
- for (n = 0; n < o.length; n++) o[n] = path__default.default.join(o[n], t);
2646
- return o;
2647
- }, sync = function e(t, r) {
2648
- function s(e) {
2649
- var t, r, s, o, l = n(path__default.default.dirname(e));
2650
- if (l && l.dir && l.pkg && i.pathFilter && (t = path__default.default.relative(l.dir, e),
2651
- (r = i.pathFilter(l.pkg, e, t)) && (e = path__default.default.resolve(l.dir, r))),
2652
- a(e)) return e;
2653
- for (s = 0; s < p.length; s++) if (o = e + p[s], a(o)) return o;
2654
- }
2655
- function n(e) {
2656
- var t, r;
2657
- if ("" !== e && "/" !== e && !("win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e))) return t = path__default.default.join(maybeRealpathSync(u, e, i), "package.json"),
2658
- a(t) ? ((r = d(l, t)) && i.packageFilter && (r = i.packageFilter(r, e)), {
2659
- pkg: r,
2660
- dir: e
2661
- }) : n(path__default.default.dirname(e));
2662
- }
2663
- function o(e) {
2664
- var t, r, n, c, h = path__default.default.join(maybeRealpathSync(u, e, i), "/package.json");
2665
- if (a(h)) {
2666
- try {
2667
- t = d(l, h);
2668
- } catch (e) {}
2669
- if (t && i.packageFilter && (t = i.packageFilter(t, e)), t && t.main) {
2670
- if ("string" != typeof t.main) throw (r = new TypeError("package “" + t.name + "” `main` must be a string")).code = "INVALID_PACKAGE_MAIN",
2671
- r;
2672
- "." !== t.main && "./" !== t.main || (t.main = "index");
2673
- try {
2674
- if (n = s(path__default.default.resolve(e, t.main))) return n;
2675
- if (c = o(path__default.default.resolve(e, t.main))) return c;
2676
- } catch (e) {}
2677
- }
2678
- }
2679
- return s(path__default.default.join(e, "/index"));
2680
- }
2681
- var i, a, l, c, u, d, h, p, f, m, g, y, w, _, v, b;
2682
- if ("string" != typeof t) throw new TypeError("Path must be a string.");
2683
- if (i = normalizeOptions(0, r), a = i.isFile || defaultIsFile, l = i.readFileSync || fs__default.default.readFileSync,
2684
- c = i.isDirectory || defaultIsDir, u = i.realpathSync || defaultRealpathSync, d = i.readPackageSync || defaultReadPackageSync,
2685
- i.readFileSync && i.readPackageSync) throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");
2686
- if (h = i.packageIterator, p = i.extensions || [ ".js" ], f = !1 !== i.includeCoreModules,
2687
- m = i.basedir || path__default.default.dirname(caller()), g = i.filename || m, i.paths = i.paths || [],
2688
- y = maybeRealpathSync(u, path__default.default.resolve(m), i), /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) {
2689
- if (w = path__default.default.resolve(y, t), "." !== t && ".." !== t && "/" !== t.slice(-1) || (w += "/"),
2690
- _ = s(w) || o(w)) return maybeRealpathSync(u, _, i);
2691
- } else {
2692
- if (f && isCoreModule(t)) return t;
2693
- if (v = function E(e, t) {
2694
- var r, n, a, l, u = function() {
2695
- return getPackageCandidates(e, t, i);
2696
- }, d = h ? h(e, t, u, i) : u();
2697
- for (r = 0; r < d.length; r++) if (n = d[r], c(path__default.default.dirname(n))) {
2698
- if (a = s(n)) return a;
2699
- if (l = o(n)) return l;
2700
- }
2701
- }(t, y)) return maybeRealpathSync(u, v, i);
2702
- }
2703
- throw (b = new Error("Cannot find module '" + t + "' from '" + g + "'")).code = "MODULE_NOT_FOUND",
2704
- b;
2705
- }, async.core = core_1, async.isCore = isCore, async.sync = sync, resolve = async;
2706
-
2707
- const createSystem = e => {
2708
- const t = e && e.logger ? e.logger : (() => {
2709
- let e = IS_BROWSER_ENV, t = "info";
2710
- return {
2711
- enableColors: t => e = t,
2712
- getLevel: () => t,
2713
- setLevel: e => t = e,
2714
- emoji: e => e,
2715
- info: console.log.bind(console),
2716
- warn: console.warn.bind(console),
2717
- error: console.error.bind(console),
2718
- debug: console.debug.bind(console),
2719
- red: e => e,
2720
- green: e => e,
2721
- yellow: e => e,
2722
- blue: e => e,
2723
- magenta: e => e,
2724
- cyan: e => e,
2725
- gray: e => e,
2726
- bold: e => e,
2727
- dim: e => e,
2728
- bgRed: e => e,
2729
- createTimeSpan: (e, t = !1) => ({
2730
- duration: () => 0,
2731
- finish: () => 0
2732
- }),
2733
- printDiagnostics(t) {
2734
- t.forEach((t => ((e, t) => {
2735
- let r = BLUE, s = "Build", n = "";
2736
- "error" === e.level ? (r = RED, s = "Error") : "warn" === e.level && (r = YELLOW,
2737
- s = "Warning"), e.header && (s = e.header);
2738
- const o = e.relFilePath || e.absFilePath;
2739
- if (o && (n += o, "number" == typeof e.lineNumber && e.lineNumber > 0 && (n += ", line " + e.lineNumber,
2740
- "number" == typeof e.columnNumber && e.columnNumber > 0 && (n += ", column " + e.columnNumber)),
2741
- n += "\n"), n += e.messageText, e.lines && e.lines.length > 0 && (e.lines.forEach((e => {
2742
- n += "\n" + e.lineNumber + ": " + e.text;
2743
- })), n += "\n"), t) {
2744
- const e = [ "%c" + s, `background: ${r}; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` ];
2745
- console.log(...e, n);
2746
- } else "error" === e.level ? console.error(n) : "warn" === e.level ? console.warn(n) : console.log(n);
2747
- })(t, e)));
2748
- }
2749
- };
2750
- })(), r = new Map, s = new Set, n = e => s.add(e), o = e => s.delete(e), i = buildEvents(), a = IS_BROWSER_ENV && navigator.hardwareConcurrency || 1, l = e => {
2751
- if ("/" === e || "" === e) return "/";
2752
- const t = path$2.dirname(e), r = path$2.basename(e);
2753
- return t.endsWith("/") ? normalizePath(`${t}${r}`) : normalizePath(`${t}/${r}`);
2754
- }, c = e => {
2755
- const t = r.get(l(e));
2756
- return !(!t || !(t.isDirectory || t.isFile && "string" == typeof t.data));
2757
- }, u = (e, t) => {
2758
- e = l(e);
2759
- const r = {
2760
- basename: path$2.basename(e),
2761
- dirname: path$2.dirname(e),
2762
- path: e,
2763
- newDirs: [],
2764
- error: null
2765
- };
2766
- return d(e, t, r), r;
2767
- }, d = (e, t, s) => {
2768
- const n = path$2.dirname(e);
2769
- t && t.recursive && !(e => "/" === e || windowsPathRegex.test(e))(n) && d(n, t, s);
2770
- const o = r.get(e);
2771
- o ? (o.isDirectory = !0, o.isFile = !1) : (r.set(e, {
2772
- basename: path$2.basename(e),
2773
- dirname: n,
2774
- isDirectory: !0,
2775
- isFile: !1,
2776
- watcherCallbacks: null,
2777
- data: void 0
2778
- }), s.newDirs.push(e), v(e, new Set));
2779
- }, h = e => {
2780
- e = l(e);
2781
- const t = [], s = r.get(e);
2782
- return s && s.isDirectory && r.forEach(((r, s) => {
2783
- "/" !== s && (r.isDirectory || r.isFile && "string" == typeof r.data) && (e.endsWith("/") && `${e}${r.basename}` === s || `${e}/${r.basename}` === s) && t.push(s);
2784
- })), t.sort();
2785
- }, p = e => {
2786
- e = l(e);
2787
- const t = r.get(e);
2788
- if (t && t.isFile) return t.data;
2789
- }, f = e => ({
2790
- path: l(e),
2791
- error: null
2792
- }), m = (e, t, s) => {
2793
- const n = w(e);
2794
- if (!n.error && !s.error) if (n.isFile) {
2795
- const n = path$2.dirname(t), o = u(n, {
2796
- recursive: !0
2797
- }), i = r.get(e).data, a = b(t, i);
2798
- s.newDirs.push(...o.newDirs), s.renamed.push({
2799
- oldPath: e,
2800
- newPath: t,
2801
- isDirectory: !1,
2802
- isFile: !0
2803
- }), a.error ? s.error = a.error : s.newFiles.push(t);
2804
- } else if (n.isDirectory) {
2805
- const r = h(e), n = u(t, {
2806
- recursive: !0
2807
- });
2808
- s.newDirs.push(...n.newDirs), s.renamed.push({
2809
- oldPath: e,
2810
- newPath: t,
2811
- isDirectory: !0,
2812
- isFile: !1
2813
- });
2814
- for (const n of r) {
2815
- const r = n.replace(e, t);
2816
- m(n, r, s);
2817
- }
2818
- }
2819
- }, g = (e, t = {}) => {
2820
- const r = {
2821
- basename: path$2.basename(e),
2822
- dirname: path$2.dirname(e),
2823
- path: e,
2824
- removedDirs: [],
2825
- removedFiles: [],
2826
- error: null
2827
- };
2828
- return y(e, t, r), r;
2829
- }, y = (e, t, s) => {
2830
- if (!s.error) {
2831
- e = l(e);
2832
- const n = h(e);
2833
- if (t && t.recursive) for (const e of n) {
2834
- const n = r.get(e);
2835
- if (n) if (n.isDirectory) y(e, t, s); else if (n.isFile) {
2836
- const t = _(e);
2837
- t.error ? s.error = t.error : s.removedFiles.push(e);
2838
- }
2839
- } else if (n.length > 0) return void (s.error = "cannot delete directory that contains files/subdirectories");
2840
- r.delete(e), v(e, new Set), s.removedDirs.push(e);
2841
- }
2842
- }, w = e => {
2843
- e = l(e);
2844
- const t = r.get(e);
2845
- return t && (t.isDirectory || t.isFile && "string" == typeof t.data) ? {
2846
- isDirectory: t.isDirectory,
2847
- isFile: t.isFile,
2848
- isSymbolicLink: !1,
2849
- size: t.isFile && t.data ? t.data.length : 0,
2850
- error: null
2851
- } : {
2852
- isDirectory: !1,
2853
- isFile: !1,
2854
- isSymbolicLink: !1,
2855
- size: 0,
2856
- error: `ENOENT: no such file or directory, statSync '${e}'`
2857
- };
2858
- }, _ = e => {
2859
- e = l(e);
2860
- const t = {
2861
- basename: path$2.basename(e),
2862
- dirname: path$2.dirname(e),
2863
- path: e,
2864
- error: null
2865
- }, s = r.get(e);
2866
- if (s) {
2867
- if (s.watcherCallbacks) for (const t of s.watcherCallbacks) t(e, "fileDelete");
2868
- r.delete(e), v(e, new Set);
2869
- }
2870
- return t;
2871
- }, v = (e, t) => {
2872
- const s = l(path$2.dirname(e)), n = r.get(s);
2873
- if (n && n.isDirectory && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, null);
2874
- t.has(s) || (t.add(s), v(s, t));
2875
- }, b = (e, t) => {
2876
- const s = {
2877
- path: e = l(e),
2878
- error: null
2879
- }, n = r.get(e);
2880
- if (n) {
2881
- const r = n.data !== t;
2882
- if (n.data = t, r && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, "fileUpdate");
2883
- } else r.set(e, {
2884
- basename: path$2.basename(e),
2885
- dirname: path$2.dirname(e),
2886
- isDirectory: !1,
2887
- isFile: !0,
2888
- watcherCallbacks: null,
2889
- data: t
2890
- }), v(e, new Set);
2891
- return s;
2892
- }, E = "undefined" != typeof self ? null === self || void 0 === self ? void 0 : self.fetch : "undefined" != typeof window ? null === window || void 0 === window ? void 0 : window.fetch : "undefined" != typeof global ? null === global || void 0 === global ? void 0 : global.fetch : void 0, T = Promise.resolve();
2893
- u("/");
2894
- const S = {
2895
- name: "in-memory",
2896
- version: "2.17.1",
2897
- events: i,
2898
- access: async e => c(e),
2899
- accessSync: c,
2900
- addDestory: n,
2901
- copyFile: async (e, t) => (b(t, p(e)), !0),
2902
- createDir: async (e, t) => u(e, t),
2903
- createDirSync: u,
2904
- homeDir: () => os__namespace.homedir(),
2905
- isTTY: () => {
2906
- var e;
2907
- return !!(null === (e = null == process__namespace ? void 0 : process__namespace.stdout) || void 0 === e ? void 0 : e.isTTY);
2908
- },
2909
- getEnvironmentVar: e => null == process__namespace ? void 0 : process__namespace.env[e],
2910
- destroy: async () => {
2911
- const e = [];
2912
- s.forEach((r => {
2913
- try {
2914
- const t = r();
2915
- t && t.then && e.push(t);
2916
- } catch (e) {
2917
- t.error(`stencil sys destroy: ${e}`);
2918
- }
2919
- })), await Promise.all(e), s.clear();
2920
- },
2921
- encodeToBase64: e => btoa(unescape(encodeURIComponent(e))),
2922
- exit: async e => t.warn(`exit ${e}`),
2923
- getCurrentDirectory: () => "/",
2924
- getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href : S.getRemoteModuleUrl({
2925
- moduleId: "@stencil/core",
2926
- path: "compiler/stencil.min.js"
2927
- }),
2928
- getLocalModulePath: e => path$2.join(e.rootDir, "node_modules", e.moduleId, e.path),
2929
- getRemoteModuleUrl: e => {
2930
- const t = `${e.moduleId}${e.version ? "@" + e.version : ""}/${e.path}`;
2931
- return new URL(t, "https://cdn.jsdelivr.net/npm/").href;
2932
- },
2933
- hardwareConcurrency: a,
2934
- isSymbolicLink: async e => !1,
2935
- nextTick: e => T.then(e),
2936
- normalizePath: l,
2937
- platformPath: pathBrowserify,
2938
- readDir: async e => h(e),
2939
- readDirSync: h,
2940
- readFile: async e => p(e),
2941
- readFileSync: p,
2942
- realpath: async e => f(e),
2943
- realpathSync: f,
2944
- removeDestory: o,
2945
- rename: async (e, t) => {
2946
- const r = {
2947
- oldPath: e = normalizePath(e),
2948
- newPath: t = normalizePath(t),
2949
- renamed: [],
2950
- oldDirs: [],
2951
- oldFiles: [],
2952
- newDirs: [],
2953
- newFiles: [],
2954
- isFile: !1,
2955
- isDirectory: !1,
2956
- error: null
2957
- }, s = w(e);
2958
- if (s.error) r.error = `${e} does not exist`; else if (s.isFile ? r.isFile = !0 : s.isDirectory && (r.isDirectory = !0),
2959
- m(e, t, r), !r.error) if (r.isDirectory) {
2960
- const t = g(e, {
2961
- recursive: !0
2962
- });
2963
- t.error ? r.error = t.error : (r.oldDirs.push(...t.removedDirs), r.oldFiles.push(...t.removedFiles));
2964
- } else if (r.isFile) {
2965
- const t = _(e);
2966
- t.error ? r.error = t.error : r.oldFiles.push(e);
2967
- }
2968
- return r;
2969
- },
2970
- fetch: E,
2971
- resolvePath: e => l(e),
2972
- removeDir: async (e, t = {}) => g(e, t),
2973
- removeDirSync: g,
2974
- stat: async e => w(e),
2975
- statSync: w,
2976
- tmpDirSync: () => "/.tmp",
2977
- removeFile: async e => _(e),
2978
- removeFileSync: _,
2979
- watchDirectory: (e, t) => {
2980
- e = l(e);
2981
- const s = r.get(e), i = () => {
2982
- const s = r.get(e);
2983
- if (s && s.watcherCallbacks) {
2984
- const e = s.watcherCallbacks.indexOf(t);
2985
- e > -1 && s.watcherCallbacks.splice(e, 1);
2986
- }
2987
- };
2988
- return n(i), s ? (s.isDirectory = !0, s.isFile = !1, s.watcherCallbacks = s.watcherCallbacks || [],
2989
- s.watcherCallbacks.push(t)) : r.set(e, {
2990
- basename: path$2.basename(e),
2991
- dirname: path$2.dirname(e),
2992
- isDirectory: !0,
2993
- isFile: !1,
2994
- watcherCallbacks: [ t ],
2995
- data: void 0
2996
- }), {
2997
- close() {
2998
- o(i), i();
2999
- }
3000
- };
3001
- },
3002
- watchFile: (e, t) => {
3003
- e = l(e);
3004
- const s = r.get(e), i = () => {
3005
- const s = r.get(e);
3006
- if (s && s.watcherCallbacks) {
3007
- const e = s.watcherCallbacks.indexOf(t);
3008
- e > -1 && s.watcherCallbacks.splice(e, 1);
3009
- }
3010
- };
3011
- return n(i), s ? (s.isDirectory = !1, s.isFile = !0, s.watcherCallbacks = s.watcherCallbacks || [],
3012
- s.watcherCallbacks.push(t)) : r.set(e, {
3013
- basename: path$2.basename(e),
3014
- dirname: path$2.dirname(e),
3015
- isDirectory: !1,
3016
- isFile: !0,
3017
- watcherCallbacks: [ t ],
3018
- data: void 0
3019
- }), {
3020
- close() {
3021
- o(i), i();
3022
- }
3023
- };
3024
- },
3025
- watchTimeout: 32,
3026
- writeFile: async (e, t) => b(e, t),
3027
- writeFileSync: b,
3028
- generateContentHash: async (e, t) => {
3029
- const r = await crypto.subtle.digest("SHA-256", (new TextEncoder).encode(e));
3030
- let s = Array.from(new Uint8Array(r)).map((e => e.toString(16).padStart(2, "0"))).join("");
3031
- return "number" == typeof t && (s = s.slice(0, t)), s;
3032
- },
3033
- createWorkerController: HAS_WEB_WORKER ? e => ((e, t) => {
3034
- let r, s = 0, n = !1, o = !1, i = 0;
3035
- const a = new Map, l = [], c = [], u = Math.max(Math.min(t, e.hardwareConcurrency), 2) - 1, d = Promise.resolve(), h = e => console.error(e), p = () => {
3036
- let t = null;
3037
- const s = e.getCompilerExecutingPath(), o = {
3038
- name: "stencil.worker." + i++
3039
- };
3040
- try {
3041
- t = new Worker(s, o);
3042
- } catch (e) {
3043
- null == r && (r = new Blob([ `importScripts('${s}');` ], {
3044
- type: "application/javascript"
3045
- })), t = new Worker(URL.createObjectURL(r), o);
3046
- }
3047
- const l = {
3048
- worker: t,
3049
- activeTasks: 0,
3050
- sendQueue: []
3051
- };
3052
- return t.onerror = h, t.onmessage = e => ((e, t) => {
3053
- if (!n) {
3054
- const r = t.data;
3055
- if (Array.isArray(r)) for (const t of r) if (t) {
3056
- const r = a.get(t.stencilId);
3057
- r ? (a.delete(t.stencilId), t.stencilRtnError ? r.reject(t.stencilRtnError) : r.resolve(t.stencilRtnValue),
3058
- e.activeTasks--, (e.activeTasks < 0 || e.activeTasks > 50) && (e.activeTasks = 0)) : t.stencilRtnError && console.error(t.stencilRtnError);
3059
- }
3060
- }
3061
- })(l, e), l;
3062
- }, f = e => {
3063
- e.sendQueue.length > 0 && (e.worker.postMessage(e.sendQueue), e.sendQueue.length = 0);
3064
- }, m = e => {
3065
- let t;
3066
- if (c.length > 0) {
3067
- if (t = c[0], u > 1) {
3068
- for (const e of c) e.activeTasks < t.activeTasks && (t = e);
3069
- t.activeTasks > 0 && c.length < u && (t = p(), c.push(t));
3070
- }
3071
- } else t = p(), c.push(t);
3072
- t.activeTasks++, t.sendQueue.push(e);
3073
- }, g = () => {
3074
- o = !1, l.forEach(m), l.length = 0, c.forEach(f);
3075
- }, y = (...e) => new Promise(((t, r) => {
3076
- if (n) r("task canceled"); else {
3077
- const n = {
3078
- stencilId: s++,
3079
- args: e
3080
- };
3081
- l.push(n), a.set(n.stencilId, {
3082
- resolve: t,
3083
- reject: r
3084
- }), o || (o = !0, d.then(g));
3085
- }
3086
- }));
3087
- return {
3088
- send: y,
3089
- destroy: () => {
3090
- n = !0, a.forEach((e => e.reject("task canceled"))), a.clear(), c.forEach((e => e.worker.terminate())),
3091
- c.length = 0;
3092
- },
3093
- handler: e => function(...t) {
3094
- return y(e, ...t);
3095
- },
3096
- maxWorkers: u
3097
- };
3098
- })(S, e) : null,
3099
- details: {
3100
- cpuModel: "",
3101
- freemem: () => 0,
3102
- platform: "",
3103
- release: "",
3104
- totalmem: 0
3105
- },
3106
- copy: async (e, r) => (t.info("todo, copy task", e.length, r), {
3107
- diagnostics: [],
3108
- dirPaths: [],
3109
- filePaths: []
3110
- })
3111
- };
3112
- return S.resolveModuleId = e => ((e, t, r) => {
3113
- const s = ((e, t, r) => ({
3114
- async isFile(s, n) {
3115
- const o = normalizeFsPath(s);
3116
- if ((await t.stat(o)).isFile) n(null, !0); else {
3117
- if (shouldFetchModule(o) && r.some((e => o.endsWith(e)))) {
3118
- const r = getNodeModuleFetchUrl(e, packageVersions, o);
3119
- return void n(null, "string" == typeof await fetchModuleAsync(e, t, packageVersions, r, o));
3120
- }
3121
- n(null, !1);
3122
- }
3123
- },
3124
- async isDirectory(r, s) {
3125
- const n = normalizeFsPath(r);
3126
- if ((await t.stat(n)).isDirectory) s(null, !0); else {
3127
- if (shouldFetchModule(n)) {
3128
- if ("node_modules" === path$2.basename(n)) return t.sys.createDirSync(n), t.clearFileCache(n),
3129
- void s(null, !0);
3130
- if (isCommonDirModuleFile(n)) return void s(null, !1);
3131
- for (const r of COMMON_DIR_FILENAMES) {
3132
- const o = getCommonDirUrl(e, packageVersions, n, r), i = getCommonDirName(n, r), a = await fetchModuleAsync(e, t, packageVersions, o, i);
3133
- if (isString(a)) return void s(null, !0);
3134
- }
3135
- }
3136
- s(null, !1);
3137
- }
3138
- },
3139
- async readFile(e, r) {
3140
- const s = normalizeFsPath(e), n = await t.readFile(s);
3141
- return isString(n) ? r(null, n) : r(`readFile not found: ${e}`);
3142
- },
3143
- async realpath(t, r) {
3144
- const s = normalizeFsPath(t), n = await e.realpath(s);
3145
- n.error && "ENOENT" !== n.error.code ? r(n.error) : r(null, n.error ? s : n.path);
3146
- },
3147
- extensions: r
3148
- }))(e, null, r.exts);
3149
- return s.basedir = path$2.dirname(normalizeFsPath(r.containingFile)), r.packageFilter ? s.packageFilter = r.packageFilter : null !== r.packageFilter && (s.packageFilter = e => (isString(e.main) && "" !== e.main || (e.main = "package.json"),
3150
- e)), new Promise(((e, t) => {
3151
- resolve(r.moduleId, s, ((s, n, o) => {
3152
- if (s) t(s); else {
3153
- n = normalizePath(n);
3154
- const t = {
3155
- moduleId: r.moduleId,
3156
- resolveId: n,
3157
- pkgData: o,
3158
- pkgDirPath: getPackageDirPath(n, r.moduleId)
3159
- };
3160
- e(t);
3161
- }
3162
- }));
3163
- }));
3164
- })(S, 0, e), S;
3165
- }, createTestingSystem = () => {
3166
- let e = 0, t = 0;
3167
- const r = createSystem();
3168
- r.platformPath = path__default.default, r.generateContentHash = (e, t) => {
3169
- let r = crypto$3.createHash("sha1").update(e).digest("hex").toLowerCase();
3170
- return "number" == typeof t && (r = r.slice(0, t)), Promise.resolve(r);
3171
- };
3172
- const s = t => {
3173
- const r = t;
3174
- return (...t) => (e++, r.apply(r, t));
3175
- }, n = e => {
3176
- const r = e;
3177
- return (...e) => (t++, r.apply(r, e));
3178
- };
3179
- if (r.access = s(r.access), r.accessSync = s(r.accessSync), r.homeDir = s(r.homeDir),
3180
- r.readFile = s(r.readFile), r.readFileSync = s(r.readFileSync), r.readDir = s(r.readDir),
3181
- r.readDirSync = s(r.readDirSync), r.stat = s(r.stat), r.statSync = s(r.statSync),
3182
- r.copyFile = n(r.copyFile), r.createDir = n(r.createDir), r.createDirSync = n(r.createDirSync),
3183
- r.removeFile = n(r.removeFile), r.removeFileSync = n(r.removeFileSync), r.writeFile = n(r.writeFile),
3184
- r.writeFileSync = n(r.writeFileSync), r.getCompilerExecutingPath = () => "bin/stencil.js",
3185
- Object.defineProperties(r, {
3186
- diskReads: {
3187
- get: () => e,
3188
- set(t) {
3189
- e = t;
3190
- }
3191
- },
3192
- diskWrites: {
3193
- get: () => t,
3194
- set(e) {
3195
- t = e;
3196
- }
3197
- }
3198
- }), !function o(e) {
3199
- return "diskReads" in e && "diskWrites" in e;
3200
- }(r)) throw new Error("could not generate TestingSystem");
3201
- return r;
3202
- };
3203
-
3204
- class TestingLogger {
3205
- constructor() {
3206
- this.isEnabled = !1;
3207
- }
3208
- setLevel(e) {}
3209
- getLevel() {
3210
- return "info";
3211
- }
3212
- enableColors(e) {}
3213
- emoji(e) {
3214
- return "";
3215
- }
3216
- info(...e) {
3217
- this.isEnabled && console.log(...e);
3218
- }
3219
- warn(...e) {
3220
- this.isEnabled && console.warn(...e);
3221
- }
3222
- error(...e) {
3223
- this.isEnabled && console.error(...e);
3224
- }
3225
- debug(...e) {
3226
- this.isEnabled && console.log(...e);
3227
- }
3228
- color(e, t) {}
3229
- red(e) {
3230
- return e;
3231
- }
3232
- green(e) {
3233
- return e;
3234
- }
3235
- yellow(e) {
3236
- return e;
3237
- }
3238
- blue(e) {
3239
- return e;
3240
- }
3241
- magenta(e) {
3242
- return e;
3243
- }
3244
- cyan(e) {
3245
- return e;
3246
- }
3247
- gray(e) {
3248
- return e;
3249
- }
3250
- bold(e) {
3251
- return e;
3252
- }
3253
- dim(e) {
3254
- return e;
3255
- }
3256
- bgRed(e) {
3257
- return e;
3258
- }
3259
- createTimeSpan(e, t = !1) {
3260
- return {
3261
- duration: () => 0,
3262
- finish: () => 0
3263
- };
3264
- }
3265
- printDiagnostics(e) {}
3266
- }
3267
-
3268
- class EventSpy {
3269
- constructor(e) {
3270
- this.eventName = e, this.events = [], this.cursor = 0, this.queuedHandler = [];
3271
- }
3272
- get length() {
3273
- return this.events.length;
3274
- }
3275
- get firstEvent() {
3276
- return this.events[0] || null;
3277
- }
3278
- get lastEvent() {
3279
- return this.events[this.events.length - 1] || null;
3280
- }
3281
- next() {
3282
- const e = this.cursor;
3283
- this.cursor++;
3284
- const t = this.events[e];
3285
- if (t) return Promise.resolve({
3286
- done: !1,
3287
- value: t
3288
- });
3289
- {
3290
- let t;
3291
- const r = new Promise((e => t = e));
3292
- return this.queuedHandler.push(t), r.then((() => ({
3293
- done: !1,
3294
- value: this.events[e]
3295
- })));
3296
- }
3297
- }
3298
- push(e) {
3299
- this.events.push(e);
3300
- const t = this.queuedHandler.shift();
3301
- t && t();
3302
- }
3303
- }
3304
-
3305
- class E2EElement extends index_cjs.MockHTMLElement {
3306
- constructor(e, t) {
3307
- super(null, null), this._page = e, this._elmHandle = t, this._queuedActions = [],
3308
- e._e2eElements.push(this);
3309
- }
3310
- _queueAction(e) {
3311
- this._queuedActions.push(e);
3312
- }
3313
- find(e) {
3314
- return find(this._page, this._elmHandle, e);
3315
- }
3316
- findAll(e) {
3317
- return findAll(this._page, this._elmHandle, e);
3318
- }
3319
- callMethod(e, ...t) {
3320
- return this._queueAction({
3321
- methodName: e,
3322
- methodArgs: t
3323
- }), this.e2eRunActions();
3324
- }
3325
- triggerEvent(e, t) {
3326
- this._queueAction({
3327
- eventName: e,
3328
- eventInitDict: t
3329
- });
3330
- }
3331
- async spyOnEvent(e) {
3332
- const t = new EventSpy(e);
3333
- return await addE2EListener(this._page, this._elmHandle, e, (e => {
3334
- t.push(e);
3335
- })), t;
3336
- }
3337
- async click(e) {
3338
- await this._elmHandle.click(e), await this._page.waitForChanges();
3339
- }
3340
- async focus() {
3341
- await this._elmHandle.focus(), await this._page.waitForChanges();
3342
- }
3343
- async hover() {
3344
- await this._elmHandle.hover(), await this._page.waitForChanges();
3345
- }
3346
- async isVisible() {
3347
- this._validate();
3348
- let e = !1;
3349
- try {
3350
- const t = this._elmHandle.executionContext();
3351
- e = await t.evaluate((e => new Promise((t => {
3352
- window.requestAnimationFrame((() => {
3353
- if (e.isConnected) {
3354
- const r = window.getComputedStyle(e);
3355
- r && "none" !== r.display && "hidden" !== r.visibility && "0" !== r.opacity ? window.requestAnimationFrame((() => {
3356
- e.clientWidth, t(!0);
3357
- })) : t(!1);
3358
- } else t(!1);
3359
- }));
3360
- }))), this._elmHandle);
3361
- } catch (e) {}
3362
- return e;
3363
- }
3364
- waitForEvent(e) {
3365
- return waitForEvent(this._page, e, this._elmHandle);
3366
- }
3367
- waitForVisible() {
3368
- return new Promise(((e, t) => {
3369
- const r = setInterval((async () => {
3370
- await this.isVisible() && (clearInterval(r), clearTimeout(o), e());
3371
- }), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForVisible timed out: ${s}ms`), o = setTimeout((() => {
3372
- clearTimeout(r), t(n);
3373
- }), s);
3374
- }));
3375
- }
3376
- waitForNotVisible() {
3377
- return new Promise(((e, t) => {
3378
- const r = setInterval((async () => {
3379
- await this.isVisible() || (clearInterval(r), clearTimeout(o), e());
3380
- }), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForNotVisible timed out: ${s}ms`), o = setTimeout((() => {
3381
- clearTimeout(r), t(n);
3382
- }), s);
3383
- }));
3384
- }
3385
- isIntersectingViewport() {
3386
- return this._elmHandle.isIntersectingViewport();
3387
- }
3388
- async press(e, t) {
3389
- await this._elmHandle.press(e, t), await this._page.waitForChanges();
3390
- }
3391
- async tap() {
3392
- await this._elmHandle.tap(), await this._page.waitForChanges();
3393
- }
3394
- async type(e, t) {
3395
- await this._elmHandle.type(e, t), await this._page.waitForChanges();
3396
- }
3397
- async getProperty(e) {
3398
- this._validate();
3399
- const t = this._elmHandle.executionContext();
3400
- return await t.evaluate(((e, t) => e[t]), this._elmHandle, e);
3401
- }
3402
- setProperty(e, t) {
3403
- this._queueAction({
3404
- setPropertyName: e,
3405
- setPropertyValue: t
3406
- });
3407
- }
3408
- getAttribute(e) {
3409
- return this._validate(), super.getAttribute(e);
3410
- }
3411
- setAttribute(e, t) {
3412
- this._queueAction({
3413
- setAttributeName: e,
3414
- setAttributeValue: t
3415
- });
3416
- }
3417
- removeAttribute(e) {
3418
- this._queueAction({
3419
- removeAttribute: e
3420
- });
3421
- }
3422
- toggleAttribute(e, t) {
3423
- this._queueAction({
3424
- toggleAttributeName: e,
3425
- toggleAttributeForce: t
3426
- });
3427
- }
3428
- get classList() {
3429
- return {
3430
- add: (...e) => {
3431
- e.forEach((e => {
3432
- this._queueAction({
3433
- classAdd: e
3434
- });
3435
- }));
3436
- },
3437
- remove: (...e) => {
3438
- e.forEach((e => {
3439
- this._queueAction({
3440
- classRemove: e
3441
- });
3442
- }));
3443
- },
3444
- toggle: e => {
3445
- this._queueAction({
3446
- classToggle: e
3447
- });
3448
- },
3449
- contains: e => (this._validate(), super.className.split(" ").includes(e))
3450
- };
3451
- }
3452
- get className() {
3453
- return this._validate(), super.className;
3454
- }
3455
- set className(e) {
3456
- this._queueAction({
3457
- setPropertyName: "className",
3458
- setPropertyValue: e
3459
- });
3460
- }
3461
- get id() {
3462
- return this._validate(), super.id;
3463
- }
3464
- set id(e) {
3465
- this._queueAction({
3466
- setPropertyName: "id",
3467
- setPropertyValue: e
3468
- });
3469
- }
3470
- get innerHTML() {
3471
- return this._validate(), super.innerHTML;
3472
- }
3473
- set innerHTML(e) {
3474
- this._queueAction({
3475
- setPropertyName: "innerHTML",
3476
- setPropertyValue: e
3477
- });
3478
- }
3479
- get innerText() {
3480
- return this._validate(), super.innerText;
3481
- }
3482
- set innerText(e) {
3483
- this._queueAction({
3484
- setPropertyName: "innerText",
3485
- setPropertyValue: e
3486
- });
3487
- }
3488
- get nodeValue() {
3489
- return this._validate(), super.nodeValue;
3490
- }
3491
- set nodeValue(e) {
3492
- "string" == typeof e && this._queueAction({
3493
- setPropertyName: "nodeValue",
3494
- setPropertyValue: e
3495
- });
3496
- }
3497
- get outerHTML() {
3498
- return this._validate(), super.outerHTML;
3499
- }
3500
- set outerHTML(e) {
3501
- throw new Error("outerHTML is read-only");
3502
- }
3503
- get shadowRoot() {
3504
- return this._validate(), super.shadowRoot;
3505
- }
3506
- set shadowRoot(e) {
3507
- super.shadowRoot = e;
3508
- }
3509
- get tabIndex() {
3510
- return this._validate(), super.tabIndex;
3511
- }
3512
- set tabIndex(e) {
3513
- this._queueAction({
3514
- setPropertyName: "tabIndex",
3515
- setPropertyValue: e
3516
- });
3517
- }
3518
- get textContent() {
3519
- return this._validate(), super.textContent;
3520
- }
3521
- set textContent(e) {
3522
- this._queueAction({
3523
- setPropertyName: "textContent",
3524
- setPropertyValue: e
3525
- });
3526
- }
3527
- get title() {
3528
- return this._validate(), super.title;
3529
- }
3530
- set title(e) {
3531
- this._queueAction({
3532
- setPropertyName: "title",
3533
- setPropertyValue: e
3534
- });
3535
- }
3536
- async getComputedStyle(e) {
3537
- const t = await this._page.evaluate(((e, t) => {
3538
- const r = {}, s = window.getComputedStyle(e, t);
3539
- return Object.keys(s).forEach((e => {
3540
- if (isNaN(e)) {
3541
- const t = s[e];
3542
- null != t && (r[e] = t);
3543
- } else {
3544
- const t = s[e];
3545
- if (t.includes("-")) {
3546
- const e = s.getPropertyValue(t);
3547
- null != e && (r[t] = e);
3548
- }
3549
- }
3550
- })), r;
3551
- }), this._elmHandle, e);
3552
- return t.getPropertyValue = e => t[e], t;
3553
- }
3554
- async e2eRunActions() {
3555
- if (0 === this._queuedActions.length) return;
3556
- const e = this._elmHandle.executionContext(), t = await e.evaluate(((e, t) => e.componentOnReady().then((() => {
3557
- let r = null;
3558
- return t.forEach((t => {
3559
- if (t.methodName) r = e[t.methodName].apply(e, t.methodArgs); else if (t.setPropertyName) e[t.setPropertyName] = t.setPropertyValue; else if (t.setAttributeName) e.setAttribute(t.setAttributeName, t.setAttributeValue); else if (t.removeAttribute) e.removeAttribute(t.removeAttribute); else if (t.toggleAttributeName) "boolean" == typeof t.toggleAttributeForce ? e.toggleAttribute(t.toggleAttributeName, t.toggleAttributeForce) : e.toggleAttribute(t.toggleAttributeName); else if (t.classAdd) e.classList.add(t.classAdd); else if (t.classRemove) e.classList.remove(t.classRemove); else if (t.classToggle) e.classList.toggle(t.classToggle); else if (t.eventName) {
3560
- const r = t.eventInitDict || {};
3561
- "boolean" != typeof r.bubbles && (r.bubbles = !0), "boolean" != typeof r.cancelable && (r.cancelable = !0),
3562
- "boolean" != typeof r.composed && (r.composed = !0);
3563
- const s = new CustomEvent(t.eventName, r);
3564
- e.dispatchEvent(s);
3565
- }
3566
- })), r && "function" == typeof r.then ? r.then((e => e)) : r;
3567
- }))), this._elmHandle, this._queuedActions);
3568
- return this._queuedActions.length = 0, t;
3569
- }
3570
- async e2eSync() {
3571
- const e = this._elmHandle.executionContext(), {outerHTML: t, shadowRootHTML: r} = await e.evaluate((e => ({
3572
- outerHTML: e.outerHTML,
3573
- shadowRootHTML: e.shadowRoot ? e.shadowRoot.innerHTML : null
3574
- })), this._elmHandle);
3575
- "string" == typeof r ? (this.shadowRoot = index_cjs.parseHtmlToFragment(r), this.shadowRoot.host = this) : this.shadowRoot = null;
3576
- const s = index_cjs.parseHtmlToFragment(t).firstElementChild;
3577
- for (this.nodeName = s.nodeName, this.attributes = index_cjs.cloneAttributes(s.attributes); this.childNodes.length > 0; ) this.removeChild(this.childNodes[0]);
3578
- for (;s.childNodes.length > 0; ) this.appendChild(s.childNodes[0]);
3579
- }
3580
- _validate() {
3581
- if (this._queuedActions.length > 0) throw new Error("await page.waitForChanges() must be called before reading element information");
3582
- }
3583
- async e2eDispose() {
3584
- this._elmHandle && (await this._elmHandle.dispose(), this._elmHandle = null);
3585
- const e = this._page._e2eElements.indexOf(this);
3586
- e > -1 && this._page._e2eElements.splice(e, 1), this._page = null;
3587
- }
3588
- }
3589
-
3590
- const env = process.env;
3591
-
3592
- exports.MockHeaders = MockHeaders, exports.MockRequest = MockRequest, exports.MockResponse = MockResponse,
3593
- exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment() {
3594
- const e = require("jest-environment-node");
3595
- return class extends e {
3596
- constructor(e) {
3597
- super(e), this.browser = null, this.pages = [];
3598
- }
3599
- async setup() {
3600
- "true" === process.env.__STENCIL_E2E_TESTS__ && (this.global.__NEW_TEST_PAGE__ = this.newPuppeteerPage.bind(this),
3601
- this.global.__CLOSE_OPEN_PAGES__ = this.closeOpenPages.bind(this));
3602
- }
3603
- async newPuppeteerPage() {
3604
- this.browser || (this.browser = await async function e() {
3605
- const e = process.env, t = e.__STENCIL_BROWSER_WS_ENDPOINT__;
3606
- if (!t) return null;
3607
- const r = {
3608
- browserWSEndpoint: t,
3609
- ignoreHTTPSErrors: !0
3610
- }, s = require(e.__STENCIL_PUPPETEER_MODULE__);
3611
- return await s.connect(r);
3612
- }());
3613
- const t = await function r(e) {
3614
- return e.newPage();
3615
- }(this.browser);
3616
- this.pages.push(t);
3617
- const s = process.env;
3618
- return "string" == typeof s.__STENCIL_DEFAULT_TIMEOUT__ && t.setDefaultTimeout(parseInt(s.__STENCIL_DEFAULT_TIMEOUT__, 10)),
3619
- t;
3620
- }
3621
- async closeOpenPages() {
3622
- await Promise.all(this.pages.map((e => e.close()))), this.pages.length = 0;
3623
- }
3624
- async teardown() {
3625
- await super.teardown(), await this.closeOpenPages(), await async function e(t) {
3626
- if (t) try {
3627
- t.disconnect();
3628
- } catch (e) {}
3629
- }(this.browser), this.browser = null;
3630
- }
3631
- getVmContext() {
3632
- return super.getVmContext();
3633
- }
3634
- };
3635
- }, exports.createTestRunner = function createTestRunner() {
3636
- var e;
3637
- const t = null !== (e = require("jest-runner").default) && void 0 !== e ? e : require("jest-runner");
3638
- return class r extends t {
3639
- async runTests(e, t, r, s, n, o) {
3640
- const i = process.env;
3641
- if (e = e.filter((e => function t(e, r) {
3642
- const s = (e = e.toLowerCase().replace(/\\/g, "/")).includes(".e2e.") || e.includes("/e2e.");
3643
- return !("true" !== r.__STENCIL_E2E_TESTS__ || !s) || "true" === r.__STENCIL_SPEC_TESTS__ && !s;
3644
- }(e.path, i))), "true" === i.__STENCIL_SCREENSHOT__) {
3645
- const a = JSON.parse(i.__STENCIL_EMULATE_CONFIGS__);
3646
- for (let l = 0; l < a.length; l++) setScreenshotEmulateData(a[l], i), await super.runTests(e, t, r, s, n, o);
3647
- } else await super.runTests(e, t, r, s, n, o);
3648
- }
3649
- };
3650
- }, exports.createTesting = async e => {
3651
- e = function t(e) {
3652
- return e.buildEs5 = !1, e.devMode = !0, e.minifyCss = !1, e.minifyJs = !1, e.hashFileNames = !1,
3653
- e.validateTypes = !1, e._isTesting = !0, e.buildDist = !0, e.flags.serve = !1, e.flags.open = !1,
3654
- e.outputTargets.forEach((e => {
3655
- "www" === e.type && (e.serviceWorker = null);
3656
- })), e.flags.args.includes("--watchAll") && (e.watch = !0), e;
3657
- }(e);
3658
- const {createCompiler: r} = require("../compiler/stencil.js"), s = await r(e);
3659
- let n, o;
3660
- const i = async () => {
3661
- const t = [];
3662
- e && (e.sys && e.sys.destroy && t.push(e.sys.destroy()), e = null), n && (n.close && t.push(n.close()),
3663
- n = null), o && (o.close && t.push(o.close()), o = null), await Promise.all(t);
3664
- };
3665
- return {
3666
- destroy: i,
3667
- run: async (t = {}) => {
3668
- let r, a = !1, l = !1, c = null;
3669
- const u = [];
3670
- try {
3671
- if (!t.spec && !t.e2e) return e.logger.error("Testing requires either the --spec or --e2e command line flags, or both. For example, to run unit tests, use the command: stencil test --spec"),
3672
- !1;
3673
- if (r = process.env, t.e2e && (u.push("e2e"), r.__STENCIL_E2E_TESTS__ = "true"),
3674
- t.spec && (u.push("spec"), r.__STENCIL_SPEC_TESTS__ = "true"), e.logger.info(e.logger.magenta(`testing ${u.join(" and ")} files${e.watch ? " (watch)" : ""}`)),
3675
- a = !(!t.e2e || !t.screenshot), a && (r.__STENCIL_SCREENSHOT__ = "true", t.updateScreenshot ? e.logger.info(e.logger.magenta("updating master screenshots")) : e.logger.info(e.logger.magenta("comparing against master screenshots"))),
3676
- t.e2e) {
3677
- let t = null;
3678
- e.outputTargets.forEach((e => {
3679
- e.empty = !1;
3680
- }));
3681
- const a = !(e.flags && !1 === e.flags.build);
3682
- a && e.watch && (c = await s.createWatcher()), a && (c ? (t = new Promise((e => {
3683
- const t = c.on("buildFinish", (r => {
3684
- t(), e(r);
3685
- }));
3686
- })), c.start()) : t = s.build()), e.devServer.openBrowser = !1, e.devServer.gzip = !1,
3687
- e.devServer.reloadStrategy = null;
3688
- const l = await Promise.all([ index_js.start(e.devServer, e.logger), startPuppeteerBrowser(e) ]);
3689
- if (n = l[0], o = l[1], t) {
3690
- const r = await t;
3691
- if (!r || !e.watch && hasError(r && r.diagnostics)) return await i(), !1;
3692
- }
3693
- n && (r.__STENCIL_BROWSER_URL__ = n.browserUrl, e.logger.debug(`e2e dev server url: ${r.__STENCIL_BROWSER_URL__}`),
3694
- r.__STENCIL_APP_SCRIPT_URL__ = function d(e, t) {
3695
- return getAppUrl(e, t, `${e.fsNamespace}.esm.js`);
3696
- }(e, n.browserUrl), e.logger.debug(`e2e app script url: ${r.__STENCIL_APP_SCRIPT_URL__}`),
3697
- getAppStyleUrl(e, n.browserUrl) && (r.__STENCIL_APP_STYLE_URL__ = getAppStyleUrl(e, n.browserUrl),
3698
- e.logger.debug(`e2e app style url: ${r.__STENCIL_APP_STYLE_URL__}`)));
3699
- }
3700
- } catch (t) {
3701
- return e.logger.error(t), !1;
3702
- }
3703
- try {
3704
- l = a ? await async function h(e, t) {
3705
- e.logger.debug(`screenshot connector: ${e.testing.screenshotConnector}`);
3706
- const r = new (require(e.testing.screenshotConnector)), s = path$2.join(e.sys.getCompilerExecutingPath(), "..", "..", "screenshot", "pixel-match.js");
3707
- e.logger.debug(`pixelmatch module: ${s}`);
3708
- const n = e.logger.createTimeSpan("screenshot, initBuild started", !0);
3709
- await r.initBuild({
3710
- buildId: createBuildId(),
3711
- buildMessage: createBuildMessage(),
3712
- buildTimestamp: Date.now(),
3713
- appNamespace: e.namespace,
3714
- rootDir: e.rootDir,
3715
- cacheDir: e.cacheDir,
3716
- packageDir: path$2.join(e.sys.getCompilerExecutingPath(), "..", ".."),
3717
- updateMaster: e.flags.updateScreenshot,
3718
- logger: e.logger,
3719
- allowableMismatchedPixels: e.testing.allowableMismatchedPixels,
3720
- allowableMismatchedRatio: e.testing.allowableMismatchedRatio,
3721
- pixelmatchThreshold: e.testing.pixelmatchThreshold,
3722
- waitBeforeScreenshot: e.testing.waitBeforeScreenshot,
3723
- pixelmatchModulePath: s
3724
- }), e.flags.updateScreenshot || await r.pullMasterBuild(), n.finish("screenshot, initBuild finished");
3725
- const o = await Promise.all([ await r.getMasterBuild(), await r.getScreenshotCache() ]), i = o[0], a = o[1];
3726
- t.__STENCIL_SCREENSHOT_BUILD__ = r.toJson(i, a);
3727
- const l = e.logger.createTimeSpan("screenshot, tests started", !0), c = await runJest(e, t);
3728
- l.finish(`screenshot, tests finished, passed: ${c}`);
3729
- try {
3730
- const t = e.logger.createTimeSpan("screenshot, completeTimespan started", !0);
3731
- let s = await r.completeBuild(i);
3732
- if (t.finish("screenshot, completeTimespan finished"), s) {
3733
- const t = e.logger.createTimeSpan("screenshot, publishBuild started", !0);
3734
- if (s = await r.publishBuild(s), t.finish("screenshot, publishBuild finished"),
3735
- e.flags.updateScreenshot) s.currentBuild && "string" == typeof s.currentBuild.previewUrl && e.logger.info(e.logger.magenta(s.currentBuild.previewUrl)); else if (s.compare) {
3736
- try {
3737
- await r.updateScreenshotCache(a, s);
3738
- } catch (t) {
3739
- e.logger.error(t);
3740
- }
3741
- e.logger.info(`screenshots compared: ${s.compare.diffs.length}`), "string" == typeof s.compare.url && e.logger.info(e.logger.magenta(s.compare.url));
3742
- }
3743
- }
3744
- } catch (t) {
3745
- t instanceof Error ? e.logger.error(t, t.stack) : e.logger.error(t);
3746
- }
3747
- return c;
3748
- }(e, r) : await runJest(e, r), e.logger.info(""), c && await c.close();
3749
- } catch (t) {
3750
- e.logger.error(t);
3751
- }
3752
- return l;
3753
- }
3754
- };
3755
- }, exports.jestPreprocessor = jestPreprocessor, exports.jestSetupTestFramework = function jestSetupTestFramework() {
3756
- global.Context = {}, global.resourcesUrl = "/build", expect.extend(expectExtend),
3757
- expect.addSnapshotSerializer(HtmlSerializer), index_cjs.setupGlobal(global), function e(t) {
3758
- const r = t.window;
3759
- "fetch" in r || (r.fetch = function(e) {
3760
- return globalMockFetch(e);
3761
- }), "fetch" in t || (t.fetch = function(e) {
3762
- return globalMockFetch(e);
3763
- });
3764
- }(global), beforeEach((() => {
3765
- testing.resetPlatform(), testing.setErrorHandler(void 0), resetBuildConditionals(appData.BUILD),
3766
- testing.modeResolutionChain.length = 0;
3767
- })), afterEach((async () => {
3768
- global.__CLOSE_OPEN_PAGES__ && await global.__CLOSE_OPEN_PAGES__(), testing.stopAutoApplyChanges(),
3769
- index_cjs.teardownGlobal(global), global.Context = {}, global.resourcesUrl = "/build";
3770
- }));
3771
- const t = jasmine.getEnv();
3772
- null != t && t.addReporter({
3773
- specStarted: e => {
3774
- global.currentSpec = e;
3775
- }
3776
- }), global.screenshotDescriptions = new Set;
3777
- const r = process.env;
3778
- if ("string" == typeof r.__STENCIL_DEFAULT_TIMEOUT__) {
3779
- const e = parseInt(r.__STENCIL_DEFAULT_TIMEOUT__, 10);
3780
- jest.setTimeout(1.5 * e), jasmine.DEFAULT_TIMEOUT_INTERVAL = e;
3781
- }
3782
- if ("string" == typeof r.__STENCIL_ENV__) {
3783
- const e = JSON.parse(r.__STENCIL_ENV__);
3784
- Object.assign(appData.Env, e);
3785
- }
3786
- }, exports.mockBuildCtx = function mockBuildCtx(e, t) {
3787
- return e || (e = mockConfig()), t || (t = mockCompilerCtx(e)), new BuildContext(e, t);
3788
- }, exports.mockCompilerCtx = mockCompilerCtx, exports.mockCompilerSystem = function mockCompilerSystem() {
3789
- return createTestingSystem();
3790
- }, exports.mockConfig = mockConfig, exports.mockDocument = function mockDocument(e = null) {
3791
- return new index_cjs.MockWindow(e).document;
3792
- }, exports.mockFetch = mockFetch, exports.mockLoadConfigInit = e => ({
3793
- config: {},
3794
- configPath: void 0,
3795
- initTsConfig: !0,
3796
- logger: void 0,
3797
- sys: void 0,
3798
- ...e
3799
- }), exports.mockLogger = mockLogger, exports.mockModule = (e = {}) => ({
3800
- cmps: [],
3801
- coreRuntimeApis: [],
3802
- collectionName: "",
3803
- dtsFilePath: "",
3804
- excludeFromCollection: !1,
3805
- externalImports: [],
3806
- htmlAttrNames: [],
3807
- htmlTagNames: [],
3808
- htmlParts: [],
3809
- isCollectionDependency: !1,
3810
- isLegacy: !1,
3811
- jsFilePath: "",
3812
- localImports: [],
3813
- originalImports: [],
3814
- originalCollectionComponentPath: "",
3815
- potentialCmpRefs: [],
3816
- sourceFilePath: "",
3817
- staticSourceFile: "",
3818
- staticSourceFileText: "",
3819
- sourceMapPath: "",
3820
- sourceMapFileText: "",
3821
- hasVdomAttribute: !1,
3822
- hasVdomClass: !1,
3823
- hasVdomFunctional: !1,
3824
- hasVdomKey: !1,
3825
- hasVdomListener: !1,
3826
- hasVdomPropOrAttr: !1,
3827
- hasVdomRef: !1,
3828
- hasVdomRender: !1,
3829
- hasVdomStyle: !1,
3830
- hasVdomText: !1,
3831
- hasVdomXlink: !1,
3832
- ...e
3833
- }), exports.mockValidatedConfig = function mockValidatedConfig(e) {
3834
- return {
3835
- ...mockConfig(e),
3836
- flags: {},
3837
- logger: mockLogger()
3838
- };
3839
- }, exports.mockWindow = function mockWindow(e = null) {
3840
- return new index_cjs.MockWindow(e);
3841
- }, exports.newE2EPage = async function newE2EPage(e = {}) {
3842
- if (!global.__NEW_TEST_PAGE__) throw new Error("newE2EPage() is only available from E2E tests, and ran with the --e2e cmd line flag.");
3843
- const t = await global.__NEW_TEST_PAGE__(), r = [];
3844
- try {
3845
- t._e2eElements = [], t._e2eGoto = t.goto, t._e2eClose = t.close, await async function s(e) {
3846
- if (e.isClosed()) return;
3847
- const t = env.__STENCIL_EMULATE__;
3848
- if (!t) return;
3849
- const r = JSON.parse(t), s = {
3850
- viewport: r.viewport,
3851
- userAgent: r.userAgent
3852
- };
3853
- await e.emulate(s);
3854
- }(t), await t.setCacheEnabled(!1), await initPageEvents(t), function n(e) {
3855
- const t = process.env;
3856
- "true" === t.__STENCIL_SCREENSHOT__ ? e.compareScreenshot = (r, s) => {
3857
- const n = global;
3858
- let o, i = "", a = "";
3859
- if (n.currentSpec && ("string" == typeof n.currentSpec.fullName && (i = n.currentSpec.fullName),
3860
- "string" == typeof n.currentSpec.testPath && (a = n.currentSpec.testPath)), "string" == typeof r ? (i.length > 0 ? i += ", " + r : i = r,
3861
- "object" == typeof s && (o = s)) : "object" == typeof r && (o = r), i = i.trim(),
3862
- o = o || {}, !i) throw new Error(`Invalid screenshot description in "${a}"`);
3863
- if (n.screenshotDescriptions.has(i)) throw new Error(`Screenshot description "${i}" found in "${a}" cannot be used for multiple screenshots and must be unique. To make screenshot descriptions unique within the same test, use the first argument to "compareScreenshot", such as "compareScreenshot('more to the description')".`);
3864
- return n.screenshotDescriptions.add(i), async function l(e, t, r, s, n) {
3865
- if ("string" != typeof t.__STENCIL_EMULATE__) throw new Error("compareScreenshot, missing screenshot emulate env var");
3866
- if ("string" != typeof t.__STENCIL_SCREENSHOT_BUILD__) throw new Error("compareScreenshot, missing screen build env var");
3867
- const o = JSON.parse(t.__STENCIL_EMULATE__), i = JSON.parse(t.__STENCIL_SCREENSHOT_BUILD__);
3868
- await function a(e) {
3869
- return new Promise((t => setTimeout(t, e)));
3870
- }(i.timeoutBeforeScreenshot), await e.evaluate((() => new Promise((e => {
3871
- window.requestAnimationFrame((() => {
3872
- e();
3873
- }));
3874
- }))));
3875
- const l = function c(e) {
3876
- const t = {
3877
- type: "png",
3878
- fullPage: e.fullPage,
3879
- omitBackground: e.omitBackground,
3880
- encoding: "binary"
3881
- };
3882
- return e.clip && (t.clip = {
3883
- x: e.clip.x,
3884
- y: e.clip.y,
3885
- width: e.clip.width,
3886
- height: e.clip.height
3887
- }), t;
3888
- }(n), u = await e.screenshot(l), d = "number" == typeof n.pixelmatchThreshold ? n.pixelmatchThreshold : i.pixelmatchThreshold;
3889
- let h = o.viewport.width, p = o.viewport.height;
3890
- return n && n.clip && ("number" == typeof n.clip.width && (h = n.clip.width), "number" == typeof n.clip.height && (p = n.clip.height)),
3891
- await compareScreenshot(o, i, u, r, h, p, s, d);
3892
- }(e, t, i, a, o);
3893
- } : e.compareScreenshot = async () => ({
3894
- mismatchedPixels: 0,
3895
- allowableMismatchedPixels: 1,
3896
- allowableMismatchedRatio: 1,
3897
- desc: "",
3898
- width: 1,
3899
- height: 1,
3900
- deviceScaleFactor: 1
3901
- });
3902
- }(t);
3903
- let s = null;
3904
- t.close = async e => {
3905
- try {
3906
- if (Array.isArray(t._e2eElements)) {
3907
- const e = t._e2eElements.map((async e => {
3908
- "function" == typeof e.e2eDispose && await e.e2eDispose();
3909
- }));
3910
- await Promise.all(e);
3911
- }
3912
- } catch (e) {}
3913
- const r = () => {
3914
- throw new Error("The page was already closed");
3915
- };
3916
- t._e2eElements = r, t._e2eEvents = r, t._e2eGoto = r, t.find = r, t.debugger = r,
3917
- t.findAll = r, t.compareScreenshot = r, t.setContent = r, t.spyOnEvent = r, t.waitForChanges = r,
3918
- t.waitForEvent = r;
3919
- try {
3920
- t.isClosed() || await t._e2eClose(e);
3921
- } catch (e) {}
3922
- };
3923
- const n = async () => (s || (s = t.evaluateHandle((() => document))), (await s).asElement());
3924
- t.find = async e => {
3925
- const r = await n();
3926
- return find(t, r, e);
3927
- }, t.findAll = async e => {
3928
- const r = await n();
3929
- return findAll(t, r, e);
3930
- }, t.waitForEvent = async e => {
3931
- const r = await n();
3932
- return waitForEvent(t, e, r);
3933
- }, t.getDiagnostics = () => r, t.waitForChanges = waitForChanges.bind(null, t),
3934
- t.debugger = () => {
3935
- if ("true" !== env.__STENCIL_E2E_DEVTOOLS__) throw new Error("Set the --devtools flag in order to use E2EPage.debugger()");
3936
- return t.evaluate((() => new Promise((e => {
3937
- e();
3938
- }))));
3939
- };
3940
- const o = !0 === e.failOnConsoleError, i = !0 === e.failOnNetworkError;
3941
- t.on("console", (e => {
3942
- if ("error" === e.type() && (r.push({
3943
- type: "error",
3944
- message: e.text(),
3945
- location: e.location().url
3946
- }), o)) throw new Error(serializeConsoleMessage(e));
3947
- !function t(e) {
3948
- const t = serializeConsoleMessage(e), r = e.type(), s = "warning" === r ? "warn" : r;
3949
- "debug" !== s && ("function" == typeof console[s] ? console[s](t) : console.log(r, t));
3950
- }(e);
3951
- })), t.on("pageerror", (e => {
3952
- throw r.push({
3953
- type: "pageerror",
3954
- message: e.message,
3955
- location: e.stack
3956
- }), e;
3957
- })), t.on("requestfailed", (e => {
3958
- if (r.push({
3959
- type: "requestfailed",
3960
- message: e.failure().errorText,
3961
- location: e.url()
3962
- }), i) throw new Error(e.failure().errorText);
3963
- console.error("requestfailed", e.url());
3964
- })), "string" == typeof e.html ? await e2eSetContent(t, e.html, {
3965
- waitUntil: e.waitUntil
3966
- }) : "string" == typeof e.url ? await e2eGoTo(t, e.url, {
3967
- waitUntil: e.waitUntil
3968
- }) : (t.goto = e2eGoTo.bind(null, t), t.setContent = e2eSetContent.bind(null, t));
3969
- } catch (e) {
3970
- throw t && (t.isClosed() || await t.close()), e;
3971
- }
3972
- return t;
3973
- }, exports.newSpecPage = async function newSpecPage(e) {
3974
- if (null == e) throw new Error("NewSpecPageOptions required");
3975
- testing.resetPlatform(), resetBuildConditionals(appData.BUILD), Array.isArray(e.components) && testing.registerComponents(e.components),
3976
- e.hydrateClientSide && (e.includeAnnotations = !0), e.hydrateServerSide ? (e.includeAnnotations = !0,
3977
- testing.setSupportsShadowDom(!1)) : (e.includeAnnotations = !!e.includeAnnotations,
3978
- !1 === e.supportsShadowDom ? testing.setSupportsShadowDom(!1) : testing.setSupportsShadowDom(!0)),
3979
- appData.BUILD.cssAnnotations = e.includeAnnotations;
3980
- const t = new Set;
3981
- testing.win.__stencil_spec_options = e;
3982
- const r = testing.win.document, s = {
3983
- win: testing.win,
3984
- doc: r,
3985
- body: r.body,
3986
- build: appData.BUILD,
3987
- styles: testing.styles,
3988
- setContent: e => (r.body.innerHTML = e, testing.flushAll()),
3989
- waitForChanges: testing.flushAll,
3990
- flushLoadModule: testing.flushLoadModule,
3991
- flushQueue: testing.flushQueue
3992
- }, n = e.components.map((e => {
3993
- if (null == e.COMPILER_META) throw new Error('Invalid component class: Missing static "COMPILER_META" property.');
3994
- t.add(e.COMPILER_META.tagName), e.isProxied = !1, function r(e) {
3995
- "function" == typeof e.prototype.__componentWillLoad && (e.prototype.componentWillLoad = e.prototype.__componentWillLoad,
3996
- e.prototype.__componentWillLoad = null), "function" == typeof e.prototype.__componentWillUpdate && (e.prototype.componentWillUpdate = e.prototype.__componentWillUpdate,
3997
- e.prototype.__componentWillUpdate = null), "function" == typeof e.prototype.__componentWillRender && (e.prototype.componentWillRender = e.prototype.__componentWillRender,
3998
- e.prototype.__componentWillRender = null), "function" == typeof e.prototype.componentWillLoad && (e.prototype.__componentWillLoad = e.prototype.componentWillLoad,
3999
- e.prototype.componentWillLoad = function() {
4000
- const e = this.__componentWillLoad();
4001
- return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
4002
- e;
4003
- }), "function" == typeof e.prototype.componentWillUpdate && (e.prototype.__componentWillUpdate = e.prototype.componentWillUpdate,
4004
- e.prototype.componentWillUpdate = function() {
4005
- const e = this.__componentWillUpdate();
4006
- return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
4007
- e;
4008
- }), "function" == typeof e.prototype.componentWillRender && (e.prototype.__componentWillRender = e.prototype.componentWillRender,
4009
- e.prototype.componentWillRender = function() {
4010
- const e = this.__componentWillRender();
4011
- return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
4012
- e;
4013
- });
4014
- }(e);
4015
- const s = `${e.COMPILER_META.tagName}.${Math.round(899999 * Math.random()) + 1e5}`, n = e.COMPILER_META.styles;
4016
- if (Array.isArray(n)) if (n.length > 1) {
4017
- const t = {};
4018
- n.forEach((e => {
4019
- t[e.modeName] = e.styleStr;
4020
- })), e.style = t;
4021
- } else 1 === n.length && (e.style = n[0].styleStr);
4022
- return testing.registerModule(s, e), ((e, t) => [ e, t.map((e => ((e, t) => {
4023
- let r = 0;
4024
- "shadow" === e.encapsulation ? (r |= 1, e.shadowDelegatesFocus && (r |= 16)) : "scoped" === e.encapsulation && (r |= 2),
4025
- "shadow" !== e.encapsulation && e.htmlTagNames.includes("slot") && (r |= 4), e.hasMode && (r |= 32);
4026
- const s = formatComponentRuntimeMembers(e, t), n = formatHostListeners(e);
4027
- return trimFalsy([ r, e.tagName, Object.keys(s).length > 0 ? s : void 0, n.length > 0 ? n : void 0 ]);
4028
- })(e, !0))) ])(s, [ e.COMPILER_META ]);
4029
- })), o = (e => {
4030
- const t = e.some((e => e.htmlTagNames.includes("slot"))), r = e.some((e => "shadow" === e.encapsulation)), s = e.some((e => "shadow" !== e.encapsulation && e.htmlTagNames.includes("slot"))), n = {
4031
- allRenderFn: e.every((e => e.hasRenderFn)),
4032
- cmpDidLoad: e.some((e => e.hasComponentDidLoadFn)),
4033
- cmpShouldUpdate: e.some((e => e.hasComponentShouldUpdateFn)),
4034
- cmpDidUnload: e.some((e => e.hasComponentDidUnloadFn)),
4035
- cmpDidUpdate: e.some((e => e.hasComponentDidUpdateFn)),
4036
- cmpDidRender: e.some((e => e.hasComponentDidRenderFn)),
4037
- cmpWillLoad: e.some((e => e.hasComponentWillLoadFn)),
4038
- cmpWillUpdate: e.some((e => e.hasComponentWillUpdateFn)),
4039
- cmpWillRender: e.some((e => e.hasComponentWillRenderFn)),
4040
- connectedCallback: e.some((e => e.hasConnectedCallbackFn)),
4041
- disconnectedCallback: e.some((e => e.hasDisconnectedCallbackFn)),
4042
- element: e.some((e => e.hasElement)),
4043
- event: e.some((e => e.hasEvent)),
4044
- hasRenderFn: e.some((e => e.hasRenderFn)),
4045
- lifecycle: e.some((e => e.hasLifecycle)),
4046
- asyncLoading: !1,
4047
- hostListener: e.some((e => e.hasListener)),
4048
- hostListenerTargetWindow: e.some((e => e.hasListenerTargetWindow)),
4049
- hostListenerTargetDocument: e.some((e => e.hasListenerTargetDocument)),
4050
- hostListenerTargetBody: e.some((e => e.hasListenerTargetBody)),
4051
- hostListenerTargetParent: e.some((e => e.hasListenerTargetParent)),
4052
- hostListenerTarget: e.some((e => e.hasListenerTarget)),
4053
- member: e.some((e => e.hasMember)),
4054
- method: e.some((e => e.hasMethod)),
4055
- mode: e.some((e => e.hasMode)),
4056
- observeAttribute: e.some((e => e.hasAttribute)),
4057
- prop: e.some((e => e.hasProp)),
4058
- propBoolean: e.some((e => e.hasPropBoolean)),
4059
- propNumber: e.some((e => e.hasPropNumber)),
4060
- propString: e.some((e => e.hasPropString)),
4061
- propMutable: e.some((e => e.hasPropMutable)),
4062
- reflect: e.some((e => e.hasReflect)),
4063
- scoped: e.some((e => "scoped" === e.encapsulation)),
4064
- shadowDom: r,
4065
- shadowDelegatesFocus: r && e.some((e => e.shadowDelegatesFocus)),
4066
- slot: t,
4067
- slotRelocation: s,
4068
- state: e.some((e => e.hasState)),
4069
- style: e.some((e => e.hasStyle)),
4070
- svg: e.some((e => e.htmlTagNames.includes("svg"))),
4071
- updatable: e.some((e => e.isUpdateable)),
4072
- vdomAttribute: e.some((e => e.hasVdomAttribute)),
4073
- vdomXlink: e.some((e => e.hasVdomXlink)),
4074
- vdomClass: e.some((e => e.hasVdomClass)),
4075
- vdomFunctional: e.some((e => e.hasVdomFunctional)),
4076
- vdomKey: e.some((e => e.hasVdomKey)),
4077
- vdomListener: e.some((e => e.hasVdomListener)),
4078
- vdomPropOrAttr: e.some((e => e.hasVdomPropOrAttr)),
4079
- vdomRef: e.some((e => e.hasVdomRef)),
4080
- vdomRender: e.some((e => e.hasVdomRender)),
4081
- vdomStyle: e.some((e => e.hasVdomStyle)),
4082
- vdomText: e.some((e => e.hasVdomText)),
4083
- watchCallback: e.some((e => e.hasWatchCallback)),
4084
- taskQueue: !0
4085
- };
4086
- return n.asyncLoading = n.cmpWillUpdate || n.cmpWillLoad || n.cmpWillRender, n.vdomAttribute = n.vdomAttribute || n.reflect,
4087
- n.vdomPropOrAttr = n.vdomPropOrAttr || n.reflect, n;
4088
- })(e.components.map((e => e.COMPILER_META)));
4089
- if (e.strictBuild ? Object.assign(appData.BUILD, o) : Object.keys(o).forEach((e => {
4090
- !0 === o[e] && (appData.BUILD[e] = !0);
4091
- })), appData.BUILD.asyncLoading = !0, e.hydrateClientSide ? (appData.BUILD.hydrateClientSide = !0,
4092
- appData.BUILD.hydrateServerSide = !1) : e.hydrateServerSide && (appData.BUILD.hydrateServerSide = !0,
4093
- appData.BUILD.hydrateClientSide = !1), appData.BUILD.cloneNodeFix = !1, appData.BUILD.shadowDomShim = !1,
4094
- appData.BUILD.safari10 = !1, appData.BUILD.attachStyles = !!e.attachStyles, "string" == typeof e.url && (s.win.location.href = e.url),
4095
- "string" == typeof e.direction && s.doc.documentElement.setAttribute("dir", e.direction),
4096
- "string" == typeof e.language && s.doc.documentElement.setAttribute("lang", e.language),
4097
- "string" == typeof e.cookie) try {
4098
- s.doc.cookie = e.cookie;
4099
- } catch (e) {}
4100
- if ("string" == typeof e.referrer) try {
4101
- s.doc.referrer = e.referrer;
4102
- } catch (e) {}
4103
- if ("string" == typeof e.userAgent) try {
4104
- s.win.navigator.userAgent = e.userAgent;
4105
- } catch (e) {}
4106
- if (testing.bootstrapLazy(n), "function" == typeof e.template) {
4107
- const t = {
4108
- $ancestorComponent$: void 0,
4109
- $flags$: 0,
4110
- $modeName$: void 0,
4111
- $cmpMeta$: {
4112
- $flags$: 0,
4113
- $tagName$: "body"
4114
- },
4115
- $hostElement$: s.body
4116
- };
4117
- testing.renderVdom(t, e.template());
4118
- } else "string" == typeof e.html && (s.body.innerHTML = e.html);
4119
- !1 !== e.flushQueue && await s.waitForChanges();
4120
- let i = null;
4121
- return Object.defineProperty(s, "root", {
4122
- get() {
4123
- if (null == i && (i = findRootComponent(t, s.body)), null != i) return i;
4124
- const e = s.body.firstElementChild;
4125
- return null != e ? e : null;
4126
- }
4127
- }), Object.defineProperty(s, "rootInstance", {
4128
- get() {
4129
- const e = testing.getHostRef(s.root);
4130
- return null != e ? e.$lazyInstance$ : null;
4131
- }
4132
- }), e.hydrateServerSide && testing.insertVdomAnnotations(r, []), e.autoApplyChanges && (testing.startAutoApplyChanges(),
4133
- s.waitForChanges = () => (console.error('waitForChanges() cannot be used manually if the "startAutoApplyChanges" option is enabled'),
4134
- Promise.resolve())), s;
4135
- }, exports.shuffleArray = function shuffleArray(e) {
4136
- let t, r, s = e.length;
4137
- for (;0 !== s; ) r = Math.floor(Math.random() * s), s -= 1, t = e[s], e[s] = e[r],
4138
- e[r] = t;
4139
- return e;
4140
- }, exports.transpile = transpile;