@swisspost/design-system-components 10.0.0-next.67 → 10.0.0-next.69

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 (490) hide show
  1. package/dist/.config/rollup-plugin.air-datepicker-locale.js +30 -0
  2. package/dist/cjs/_air-datepicker-locale_ar-CWOSiErt.js +5 -0
  3. package/dist/cjs/_air-datepicker-locale_bg-JFWSZzWm.js +5 -0
  4. package/dist/cjs/_air-datepicker-locale_ca-D4TAa7rI.js +5 -0
  5. package/dist/cjs/_air-datepicker-locale_cs-DosuWhKM.js +5 -0
  6. package/dist/cjs/_air-datepicker-locale_da-B5NHFJuC.js +5 -0
  7. package/dist/cjs/_air-datepicker-locale_de-pCyAfzJ2.js +5 -0
  8. package/dist/cjs/_air-datepicker-locale_el-Cpwc-DA1.js +5 -0
  9. package/dist/cjs/_air-datepicker-locale_en-Be7ImjN_.js +5 -0
  10. package/dist/cjs/_air-datepicker-locale_es-Cv0KAzTX.js +5 -0
  11. package/dist/cjs/_air-datepicker-locale_eu-DIWyMMth.js +5 -0
  12. package/dist/cjs/_air-datepicker-locale_fi-D0NlYCfL.js +5 -0
  13. package/dist/cjs/_air-datepicker-locale_fr-SkEOXj1I.js +5 -0
  14. package/dist/cjs/_air-datepicker-locale_hr-BrTsx2iQ.js +5 -0
  15. package/dist/cjs/_air-datepicker-locale_hu-a5Toa3rt.js +5 -0
  16. package/dist/cjs/_air-datepicker-locale_id-h0ieLcJv.js +5 -0
  17. package/dist/cjs/_air-datepicker-locale_it-DQeeF5n7.js +5 -0
  18. package/dist/cjs/_air-datepicker-locale_ja-C78DHDAv.js +5 -0
  19. package/dist/cjs/_air-datepicker-locale_ko-BGSYNW_t.js +5 -0
  20. package/dist/cjs/_air-datepicker-locale_nb-BQkZ_Pvp.js +5 -0
  21. package/dist/cjs/_air-datepicker-locale_nl-DG6dvxj-.js +5 -0
  22. package/dist/cjs/_air-datepicker-locale_pl-mZxBq8TF.js +5 -0
  23. package/dist/cjs/_air-datepicker-locale_pt-sCO-c8dQ.js +5 -0
  24. package/dist/cjs/_air-datepicker-locale_ro-Cf2HyYTE.js +5 -0
  25. package/dist/cjs/_air-datepicker-locale_ru-BS-yHOKw.js +5 -0
  26. package/dist/cjs/_air-datepicker-locale_si-C-vceOjt.js +5 -0
  27. package/dist/cjs/_air-datepicker-locale_sk-D6Sexd7V.js +5 -0
  28. package/dist/cjs/_air-datepicker-locale_sl-C769P2Cr.js +5 -0
  29. package/dist/cjs/_air-datepicker-locale_sv-DV21M0v9.js +5 -0
  30. package/dist/cjs/_air-datepicker-locale_th-HFoj3y5r.js +5 -0
  31. package/dist/cjs/_air-datepicker-locale_tr-C4soRqRo.js +5 -0
  32. package/dist/cjs/_air-datepicker-locale_uk-BM5nVNZS.js +5 -0
  33. package/dist/cjs/_air-datepicker-locale_zh-B4bR_9wv.js +5 -0
  34. package/dist/cjs/{get-focusable-children-CL2gimr1.js → get-focusable-children-BGVgg7Te.js} +1 -1
  35. package/dist/cjs/{get-root-BIh00Adr.js → get-root-B1FnQ50K.js} +1 -3
  36. package/dist/cjs/{index-Byyrsgop.js → index-DPdHkdGf.js} +357 -1933
  37. package/dist/cjs/index-YBj3gUJp.js +114540 -0
  38. package/dist/cjs/{index.browser-Doj636JV.js → index.browser-BVb9l9T_.js} +1 -1
  39. package/dist/cjs/loader.cjs.js +2 -2
  40. package/dist/{esm/long-press-event-C_2k3G1c.js → cjs/long-press-event-Dx21Ojod.js} +13 -1
  41. package/dist/cjs/{package-BMq-R5Xi.js → package-CzSn3NmD.js} +1 -1
  42. package/dist/cjs/post-accordion_2.cjs.entry.js +4 -4
  43. package/dist/cjs/post-autocomplete.cjs.entry.js +36 -10
  44. package/dist/cjs/post-avatar.cjs.entry.js +4 -4
  45. package/dist/cjs/post-back-to-top.cjs.entry.js +4 -4
  46. package/dist/cjs/post-banner.cjs.entry.js +4 -4
  47. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +4 -5
  48. package/dist/cjs/post-breadcrumbs.cjs.entry.js +11 -9
  49. package/dist/cjs/post-closebutton_14.cjs.entry.js +64 -55
  50. package/dist/cjs/post-collapsible_2.cjs.entry.js +16 -9
  51. package/dist/cjs/post-components.cjs.js +3 -3
  52. package/dist/cjs/post-date-picker.cjs.entry.js +368 -268
  53. package/dist/cjs/post-footer.cjs.entry.js +5 -5
  54. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  55. package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
  56. package/dist/cjs/post-listbox.cjs.entry.js +4 -4
  57. package/dist/cjs/post-login-widget.cjs.entry.js +60 -0
  58. package/dist/cjs/post-number-input.cjs.entry.js +5 -5
  59. package/dist/cjs/post-pagination.cjs.entry.js +5 -5
  60. package/dist/cjs/post-popover-trigger.cjs.entry.js +3 -3
  61. package/dist/cjs/post-popover.cjs.entry.js +5 -5
  62. package/dist/cjs/post-rating.cjs.entry.js +4 -4
  63. package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
  64. package/dist/cjs/post-stepper.cjs.entry.js +6 -6
  65. package/dist/cjs/post-tab-item.cjs.entry.js +5 -5
  66. package/dist/cjs/post-tab-panel.cjs.entry.js +5 -5
  67. package/dist/cjs/post-tabs.cjs.entry.js +5 -5
  68. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +5 -5
  69. package/dist/cjs/post-tooltip.cjs.entry.js +5 -5
  70. package/dist/collection/animations/collapse.js +8 -2
  71. package/dist/collection/collection-manifest.json +3 -1
  72. package/dist/collection/components/post-autocomplete/post-autocomplete.css +1 -1
  73. package/dist/collection/components/post-autocomplete/post-autocomplete.js +52 -7
  74. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  75. package/dist/collection/components/post-back-to-top/post-back-to-top.js +1 -1
  76. package/dist/collection/components/post-banner/post-banner.js +1 -1
  77. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +40 -3
  78. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +8 -6
  79. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  80. package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
  81. package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
  82. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
  83. package/dist/collection/components/post-date-picker/air-locales.js +34 -0
  84. package/dist/collection/components/post-date-picker/constants.js +42 -0
  85. package/dist/collection/components/post-date-picker/post-date-picker.css +6 -2
  86. package/dist/collection/components/post-date-picker/post-date-picker.js +295 -135
  87. package/dist/collection/components/post-footer/post-footer.js +1 -1
  88. package/dist/collection/components/post-header/post-header.css +1 -1
  89. package/dist/collection/components/post-header/post-header.js +5 -5
  90. package/dist/collection/components/post-icon/post-icon.js +2 -2
  91. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
  92. package/dist/collection/components/post-language-menu/post-language-menu.js +11 -1
  93. package/dist/collection/components/post-language-menu-item/post-language-menu-item.js +27 -1
  94. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  95. package/dist/collection/components/post-listbox/post-listbox.js +1 -1
  96. package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
  97. package/dist/collection/components/post-login-widget/post-login-widget.js +120 -0
  98. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  99. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  100. package/dist/collection/components/post-menu/post-menu.js +3 -2
  101. package/dist/collection/components/post-number-input/post-number-input.css +1 -1
  102. package/dist/collection/components/post-pagination/post-pagination.css +1 -1
  103. package/dist/collection/components/post-popover/post-popover.js +1 -1
  104. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  105. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +4 -11
  106. package/dist/collection/components/post-rating/post-rating.js +1 -1
  107. package/dist/collection/components/post-stepper/post-stepper.js +4 -4
  108. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  109. package/dist/collection/components/post-tab-item/post-tab-item.js +1 -1
  110. package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
  111. package/dist/collection/components/post-tabs/post-tabs.js +2 -2
  112. package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
  113. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  114. package/dist/collection/components/post-tooltip/post-tooltip.js +2 -2
  115. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
  116. package/dist/collection/utils/attribute-observer.js +1 -2
  117. package/dist/collection/utils/breakpoints.js +7 -8
  118. package/dist/collection/utils/get-root.js +1 -2
  119. package/dist/collection/utils/index.js +1 -0
  120. package/dist/collection/utils/is-iso-date.js +7 -6
  121. package/dist/collection/utils/is-motion-reduced.js +3 -2
  122. package/dist/collection/utils/locales.js +17 -0
  123. package/dist/component-names.json +1 -0
  124. package/dist/components/_air-datepicker-locale_ar.js +1 -0
  125. package/dist/components/_air-datepicker-locale_bg.js +1 -0
  126. package/dist/components/_air-datepicker-locale_ca.js +1 -0
  127. package/dist/components/_air-datepicker-locale_cs.js +1 -0
  128. package/dist/components/_air-datepicker-locale_da.js +1 -0
  129. package/dist/components/_air-datepicker-locale_de.js +1 -0
  130. package/dist/components/_air-datepicker-locale_el.js +1 -0
  131. package/dist/components/_air-datepicker-locale_en.js +1 -0
  132. package/dist/components/_air-datepicker-locale_es.js +1 -0
  133. package/dist/components/_air-datepicker-locale_eu.js +1 -0
  134. package/dist/components/_air-datepicker-locale_fi.js +1 -0
  135. package/dist/components/_air-datepicker-locale_fr.js +1 -0
  136. package/dist/components/_air-datepicker-locale_hr.js +1 -0
  137. package/dist/components/_air-datepicker-locale_hu.js +1 -0
  138. package/dist/components/_air-datepicker-locale_id.js +1 -0
  139. package/dist/components/_air-datepicker-locale_it.js +1 -0
  140. package/dist/components/_air-datepicker-locale_ja.js +1 -0
  141. package/dist/components/_air-datepicker-locale_ko.js +1 -0
  142. package/dist/components/_air-datepicker-locale_nb.js +1 -0
  143. package/dist/components/_air-datepicker-locale_nl.js +1 -0
  144. package/dist/components/_air-datepicker-locale_pl.js +1 -0
  145. package/dist/components/_air-datepicker-locale_pt.js +1 -0
  146. package/dist/components/_air-datepicker-locale_ro.js +1 -0
  147. package/dist/components/_air-datepicker-locale_ru.js +1 -0
  148. package/dist/components/_air-datepicker-locale_si.js +1 -0
  149. package/dist/components/_air-datepicker-locale_sk.js +1 -0
  150. package/dist/components/_air-datepicker-locale_sl.js +1 -0
  151. package/dist/components/_air-datepicker-locale_sv.js +1 -0
  152. package/dist/components/_air-datepicker-locale_th.js +1 -0
  153. package/dist/components/_air-datepicker-locale_tr.js +1 -0
  154. package/dist/components/_air-datepicker-locale_uk.js +1 -0
  155. package/dist/components/_air-datepicker-locale_zh.js +1 -0
  156. package/dist/components/get-root.js +1 -1
  157. package/dist/components/index.d.ts +2 -0
  158. package/dist/components/index.js +1 -1
  159. package/dist/components/index2.js +1 -0
  160. package/dist/components/index3.js +6 -0
  161. package/dist/components/long-press-event.js +1 -1
  162. package/dist/components/package.js +1 -1
  163. package/dist/components/post-accordion-item2.js +1 -1
  164. package/dist/components/post-accordion2.js +1 -1
  165. package/dist/components/post-autocomplete.js +1 -1
  166. package/dist/components/post-avatar.js +1 -1
  167. package/dist/components/post-back-to-top.js +1 -1
  168. package/dist/components/post-banner.js +1 -1
  169. package/dist/components/post-breadcrumb-item2.js +1 -1
  170. package/dist/components/post-breadcrumbs.js +1 -1
  171. package/dist/components/post-closebutton2.js +1 -1
  172. package/dist/components/post-collapsible-trigger2.js +1 -1
  173. package/dist/components/post-collapsible2.js +1 -1
  174. package/dist/components/post-date-picker.js +1 -1
  175. package/dist/components/post-footer.js +1 -1
  176. package/dist/components/post-header.js +1 -1
  177. package/dist/components/post-icon2.js +1 -1
  178. package/dist/components/post-language-menu-item.js +1 -1
  179. package/dist/components/post-language-menu.js +1 -1
  180. package/dist/components/post-linkarea.js +1 -1
  181. package/dist/components/post-listbox-option.js +1 -1
  182. package/dist/components/post-listbox.js +1 -1
  183. package/dist/components/post-login-widget.d.ts +11 -0
  184. package/dist/components/post-login-widget.js +1 -0
  185. package/dist/components/post-logo.js +1 -1
  186. package/dist/components/post-mainnavigation.js +1 -1
  187. package/dist/components/post-megadropdown-trigger.js +1 -1
  188. package/dist/components/post-megadropdown.js +1 -1
  189. package/dist/components/post-menu-trigger2.js +1 -1
  190. package/dist/components/post-menu2.js +1 -1
  191. package/dist/components/post-number-input.js +1 -1
  192. package/dist/components/post-pagination.js +1 -1
  193. package/dist/components/post-popover-trigger.js +1 -1
  194. package/dist/components/post-popover.js +1 -1
  195. package/dist/components/post-popovercontainer2.js +1 -1
  196. package/dist/components/post-rating.js +1 -1
  197. package/dist/components/post-stepper-item.js +1 -1
  198. package/dist/components/post-stepper.js +1 -1
  199. package/dist/components/post-tab-item.js +1 -1
  200. package/dist/components/post-tab-panel.js +1 -1
  201. package/dist/components/post-tabs.js +1 -1
  202. package/dist/components/post-togglebutton2.js +1 -1
  203. package/dist/components/post-tooltip-trigger.js +1 -1
  204. package/dist/components/post-tooltip.js +1 -1
  205. package/dist/components/react/index.js +1 -1
  206. package/dist/components/react/p-08F-DB-d.js +1 -0
  207. package/dist/components/react/p-B0UL6WWC.js +1 -0
  208. package/dist/components/react/p-B2BDAeHI.js +1 -0
  209. package/dist/components/react/p-B4l5EAoq.js +1 -0
  210. package/dist/components/react/{p-Bq6Ye6Uc.js → p-B4tq6hiA.js} +1 -1
  211. package/dist/components/react/p-B5zHEJHg.js +1 -0
  212. package/dist/components/react/p-BI8IDv3x.js +1 -0
  213. package/dist/components/react/p-BL8Kkhue.js +1 -0
  214. package/dist/components/react/{p-C_2k3G1c.js → p-BNgqqRsB.js} +1 -1
  215. package/dist/components/react/p-BYfHrHCb.js +1 -0
  216. package/dist/components/react/p-B_mxRlWV.js +1 -0
  217. package/dist/components/react/p-BaE0RQYu.js +1 -0
  218. package/dist/components/react/p-BbOp03Tv.js +1 -0
  219. package/dist/components/react/p-BfPjPzPS.js +1 -0
  220. package/dist/components/react/p-BhrWATcv.js +1 -0
  221. package/dist/components/react/p-Bj33xnuq.js +1 -0
  222. package/dist/components/react/p-Blr-q_ib.js +1 -0
  223. package/dist/components/react/p-ByHlofKQ.js +1 -0
  224. package/dist/components/react/p-BzFuQlXL.js +1 -0
  225. package/dist/components/react/p-C820VY6h.js +1 -0
  226. package/dist/components/react/p-CHD6fZJe.js +1 -0
  227. package/dist/components/react/p-CJcRbvrI.js +6 -0
  228. package/dist/components/react/p-CKeMJgsB.js +1 -0
  229. package/dist/components/react/p-CKmlbvS5.js +1 -0
  230. package/dist/components/react/p-CLO4Gc79.js +1 -0
  231. package/dist/components/react/p-COcQTTvB.js +1 -0
  232. package/dist/components/react/p-CY0xDY7T.js +1 -0
  233. package/dist/components/react/p-CaXZrKGy.js +1 -0
  234. package/dist/components/react/p-CfQqdIV2.js +1 -0
  235. package/dist/components/react/p-Cp9RABzO.js +1 -0
  236. package/dist/components/react/{p-BvY9Yl0A.js → p-D1KBbwmi.js} +1 -1
  237. package/dist/components/react/p-D74-8pcb.js +1 -0
  238. package/dist/components/react/p-D7MKQ7S-.js +1 -0
  239. package/dist/components/react/p-DAIxJysJ.js +1 -0
  240. package/dist/components/react/p-DLWEDodU.js +1 -0
  241. package/dist/components/react/p-DQq5Bnk2.js +1 -0
  242. package/dist/components/react/p-DRtzK3cr.js +1 -0
  243. package/dist/components/react/p-DYpJ3j2A.js +1 -0
  244. package/dist/components/react/p-De_QjSNJ.js +1 -0
  245. package/dist/components/react/p-DiNZLG90.js +1 -0
  246. package/dist/components/react/p-Dp41Pg4o.js +1 -0
  247. package/dist/components/react/{p-BlBcIJe_.js → p-DsaGKkkf.js} +1 -1
  248. package/dist/components/react/p-DwJ5SwpN.js +1 -0
  249. package/dist/components/react/{p-D3Tx-0vM.js → p-HNUXY1z7.js} +1 -1
  250. package/dist/components/react/p-TmutBiUy.js +1 -0
  251. package/dist/components/react/{p-CKkmf4_w.js → p-UY924tHr.js} +1 -1
  252. package/dist/components/react/p-bl3gSRgH.js +1 -0
  253. package/dist/components/react/p-jZZU8-Dx.js +1 -0
  254. package/dist/components/react/p-r5tpdxcW.js +1 -0
  255. package/dist/components/react/p-tHlklq2F.js +1 -0
  256. package/dist/components/react/post-accordion-item.js +1 -1
  257. package/dist/components/react/post-accordion.js +1 -1
  258. package/dist/components/react/post-autocomplete.js +1 -1
  259. package/dist/components/react/post-avatar.js +1 -1
  260. package/dist/components/react/post-back-to-top.js +1 -1
  261. package/dist/components/react/post-banner.js +1 -1
  262. package/dist/components/react/post-breadcrumb-item.js +1 -1
  263. package/dist/components/react/post-breadcrumbs.js +1 -1
  264. package/dist/components/react/post-closebutton.js +1 -1
  265. package/dist/components/react/post-collapsible-trigger.js +1 -1
  266. package/dist/components/react/post-collapsible.js +1 -1
  267. package/dist/components/react/post-date-picker.js +1 -1
  268. package/dist/components/react/post-footer.js +1 -1
  269. package/dist/components/react/post-header.js +1 -1
  270. package/dist/components/react/post-icon.js +1 -1
  271. package/dist/components/react/post-language-menu-item.js +1 -1
  272. package/dist/components/react/post-language-menu.js +1 -1
  273. package/dist/components/react/post-linkarea.js +1 -1
  274. package/dist/components/react/post-listbox-option.js +1 -1
  275. package/dist/components/react/post-listbox.js +1 -1
  276. package/dist/components/react/post-login-widget.d.ts +11 -0
  277. package/dist/components/react/post-login-widget.js +1 -0
  278. package/dist/components/react/post-logo.js +1 -1
  279. package/dist/components/react/post-mainnavigation.js +1 -1
  280. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  281. package/dist/components/react/post-megadropdown.js +1 -1
  282. package/dist/components/react/post-menu-item.js +1 -1
  283. package/dist/components/react/post-menu-trigger.js +1 -1
  284. package/dist/components/react/post-menu.js +1 -1
  285. package/dist/components/react/post-number-input.js +1 -1
  286. package/dist/components/react/post-pagination.js +1 -1
  287. package/dist/components/react/post-popover-trigger.js +1 -1
  288. package/dist/components/react/post-popover.js +1 -1
  289. package/dist/components/react/post-popovercontainer.js +1 -1
  290. package/dist/components/react/post-rating.js +1 -1
  291. package/dist/components/react/post-stepper-item.js +1 -1
  292. package/dist/components/react/post-stepper.js +1 -1
  293. package/dist/components/react/post-tab-item.js +1 -1
  294. package/dist/components/react/post-tab-panel.js +1 -1
  295. package/dist/components/react/post-tabs.js +1 -1
  296. package/dist/components/react/post-togglebutton.js +1 -1
  297. package/dist/components/react/post-tooltip-trigger.js +1 -1
  298. package/dist/components/react/post-tooltip.js +1 -1
  299. package/dist/docs.d.ts +26 -0
  300. package/dist/docs.json +280 -10
  301. package/dist/esm/_air-datepicker-locale_ar-DQq5Bnk2.js +3 -0
  302. package/dist/esm/_air-datepicker-locale_bg-bl3gSRgH.js +3 -0
  303. package/dist/esm/_air-datepicker-locale_ca-BI8IDv3x.js +3 -0
  304. package/dist/esm/_air-datepicker-locale_cs-COcQTTvB.js +3 -0
  305. package/dist/esm/_air-datepicker-locale_da-jZZU8-Dx.js +3 -0
  306. package/dist/esm/_air-datepicker-locale_de-DiNZLG90.js +3 -0
  307. package/dist/esm/_air-datepicker-locale_el-CY0xDY7T.js +3 -0
  308. package/dist/esm/_air-datepicker-locale_en-D74-8pcb.js +3 -0
  309. package/dist/esm/_air-datepicker-locale_es-TmutBiUy.js +3 -0
  310. package/dist/esm/_air-datepicker-locale_eu-Blr-q_ib.js +3 -0
  311. package/dist/esm/_air-datepicker-locale_fi-B5zHEJHg.js +3 -0
  312. package/dist/esm/_air-datepicker-locale_fr-CLO4Gc79.js +3 -0
  313. package/dist/esm/_air-datepicker-locale_hr-CKeMJgsB.js +3 -0
  314. package/dist/esm/_air-datepicker-locale_hu-B_mxRlWV.js +3 -0
  315. package/dist/esm/_air-datepicker-locale_id-BhrWATcv.js +3 -0
  316. package/dist/esm/_air-datepicker-locale_it-B0UL6WWC.js +3 -0
  317. package/dist/esm/_air-datepicker-locale_ja-DLWEDodU.js +3 -0
  318. package/dist/esm/_air-datepicker-locale_ko-BL8Kkhue.js +3 -0
  319. package/dist/esm/_air-datepicker-locale_nb-BzFuQlXL.js +3 -0
  320. package/dist/esm/_air-datepicker-locale_nl-ByHlofKQ.js +3 -0
  321. package/dist/esm/_air-datepicker-locale_pl-CaXZrKGy.js +3 -0
  322. package/dist/esm/_air-datepicker-locale_pt-CKmlbvS5.js +3 -0
  323. package/dist/esm/_air-datepicker-locale_ro-r5tpdxcW.js +3 -0
  324. package/dist/esm/_air-datepicker-locale_ru-BfPjPzPS.js +3 -0
  325. package/dist/esm/_air-datepicker-locale_si-Dp41Pg4o.js +3 -0
  326. package/dist/esm/_air-datepicker-locale_sk-BaE0RQYu.js +3 -0
  327. package/dist/esm/_air-datepicker-locale_sl-tHlklq2F.js +3 -0
  328. package/dist/esm/_air-datepicker-locale_sv-DYpJ3j2A.js +3 -0
  329. package/dist/esm/_air-datepicker-locale_th-D7MKQ7S-.js +3 -0
  330. package/dist/esm/_air-datepicker-locale_tr-CHD6fZJe.js +3 -0
  331. package/dist/esm/_air-datepicker-locale_uk-Cp9RABzO.js +3 -0
  332. package/dist/esm/_air-datepicker-locale_zh-C820VY6h.js +3 -0
  333. package/dist/esm/{get-focusable-children-CckqSLu_.js → get-focusable-children-DxYnH2ye.js} +1 -1
  334. package/dist/esm/{get-root-gmtbd8C-.js → get-root-08F-DB-d.js} +1 -3
  335. package/dist/esm/index-CJcRbvrI.js +114535 -0
  336. package/dist/esm/{index-8Vx4ywJ4.js → index-DmAi35UF.js} +357 -1933
  337. package/dist/esm/{index.browser-BLchVpF6.js → index.browser-nA1BKco0.js} +1 -1
  338. package/dist/esm/loader.js +3 -3
  339. package/dist/{cjs/long-press-event-Q8jMUNXD.js → esm/long-press-event-BNgqqRsB.js} +11 -3
  340. package/dist/esm/package-B4l5EAoq.js +3 -0
  341. package/dist/esm/post-accordion_2.entry.js +4 -4
  342. package/dist/esm/post-autocomplete.entry.js +36 -10
  343. package/dist/esm/post-avatar.entry.js +4 -4
  344. package/dist/esm/post-back-to-top.entry.js +4 -4
  345. package/dist/esm/post-banner.entry.js +4 -4
  346. package/dist/esm/post-breadcrumb-item.entry.js +4 -5
  347. package/dist/esm/post-breadcrumbs.entry.js +11 -9
  348. package/dist/esm/post-closebutton_14.entry.js +61 -52
  349. package/dist/esm/post-collapsible_2.entry.js +16 -9
  350. package/dist/esm/post-components.js +4 -4
  351. package/dist/esm/post-date-picker.entry.js +352 -252
  352. package/dist/esm/post-footer.entry.js +4 -4
  353. package/dist/esm/post-linkarea.entry.js +3 -3
  354. package/dist/esm/post-listbox-option.entry.js +4 -4
  355. package/dist/esm/post-listbox.entry.js +4 -4
  356. package/dist/esm/post-login-widget.entry.js +58 -0
  357. package/dist/esm/post-number-input.entry.js +4 -4
  358. package/dist/esm/post-pagination.entry.js +5 -5
  359. package/dist/esm/post-popover-trigger.entry.js +3 -3
  360. package/dist/esm/post-popover.entry.js +5 -5
  361. package/dist/esm/post-rating.entry.js +4 -4
  362. package/dist/esm/post-stepper-item.entry.js +3 -3
  363. package/dist/esm/post-stepper.entry.js +6 -6
  364. package/dist/esm/post-tab-item.entry.js +5 -5
  365. package/dist/esm/post-tab-panel.entry.js +5 -5
  366. package/dist/esm/post-tabs.entry.js +5 -5
  367. package/dist/esm/post-tooltip-trigger.entry.js +5 -5
  368. package/dist/esm/post-tooltip.entry.js +5 -5
  369. package/dist/post-components/p-08F-DB-d.js +1 -0
  370. package/dist/post-components/{p-16573e00.entry.js → p-0992cba9.entry.js} +1 -1
  371. package/dist/post-components/{p-11dfed23.entry.js → p-0c249c71.entry.js} +1 -1
  372. package/dist/post-components/p-1e28d279.entry.js +1 -0
  373. package/dist/post-components/{p-ce7bfb11.entry.js → p-220d0eab.entry.js} +1 -1
  374. package/dist/post-components/{p-15d519e6.entry.js → p-272de102.entry.js} +1 -1
  375. package/dist/post-components/p-30e5bc99.entry.js +1 -0
  376. package/dist/post-components/p-500a3fc7.entry.js +1 -0
  377. package/dist/post-components/{p-29859921.entry.js → p-52f85cba.entry.js} +1 -1
  378. package/dist/post-components/{p-9a3d4f38.entry.js → p-5664d5b5.entry.js} +1 -1
  379. package/dist/post-components/{p-0c22b6cb.entry.js → p-5ade4255.entry.js} +1 -1
  380. package/dist/post-components/p-6644e626.entry.js +1 -0
  381. package/dist/post-components/{p-3a294f1a.entry.js → p-694e76be.entry.js} +1 -1
  382. package/dist/post-components/p-8b68164f.entry.js +1 -0
  383. package/dist/post-components/{p-b13742e1.entry.js → p-906b669b.entry.js} +1 -1
  384. package/dist/post-components/p-92e4a7f7.entry.js +1 -0
  385. package/dist/post-components/p-95df4d4e.entry.js +1 -0
  386. package/dist/post-components/{p-6badcfb3.entry.js → p-9fab1847.entry.js} +1 -1
  387. package/dist/post-components/p-B0UL6WWC.js +1 -0
  388. package/dist/post-components/p-B4l5EAoq.js +1 -0
  389. package/dist/post-components/p-B5zHEJHg.js +1 -0
  390. package/dist/post-components/p-BI8IDv3x.js +1 -0
  391. package/dist/post-components/p-BL8Kkhue.js +1 -0
  392. package/dist/post-components/{p-C_2k3G1c.js → p-BNgqqRsB.js} +1 -1
  393. package/dist/post-components/p-B_mxRlWV.js +1 -0
  394. package/dist/post-components/p-BaE0RQYu.js +1 -0
  395. package/dist/post-components/p-BfPjPzPS.js +1 -0
  396. package/dist/post-components/p-BhrWATcv.js +1 -0
  397. package/dist/post-components/p-Blr-q_ib.js +1 -0
  398. package/dist/post-components/p-ByHlofKQ.js +1 -0
  399. package/dist/post-components/p-BzFuQlXL.js +1 -0
  400. package/dist/post-components/p-C820VY6h.js +1 -0
  401. package/dist/post-components/p-CHD6fZJe.js +1 -0
  402. package/dist/post-components/p-CJcRbvrI.js +6 -0
  403. package/dist/post-components/p-CKeMJgsB.js +1 -0
  404. package/dist/post-components/p-CKmlbvS5.js +1 -0
  405. package/dist/post-components/p-CLO4Gc79.js +1 -0
  406. package/dist/post-components/p-COcQTTvB.js +1 -0
  407. package/dist/post-components/p-CY0xDY7T.js +1 -0
  408. package/dist/post-components/p-CaXZrKGy.js +1 -0
  409. package/dist/post-components/p-Cp9RABzO.js +1 -0
  410. package/dist/post-components/p-D74-8pcb.js +1 -0
  411. package/dist/post-components/p-D7MKQ7S-.js +1 -0
  412. package/dist/post-components/p-DLWEDodU.js +1 -0
  413. package/dist/post-components/p-DQq5Bnk2.js +1 -0
  414. package/dist/post-components/{p-DkA4Ai8j.js → p-DYYpZAAV.js} +1 -1
  415. package/dist/post-components/p-DYpJ3j2A.js +1 -0
  416. package/dist/post-components/p-DiNZLG90.js +1 -0
  417. package/dist/post-components/p-DmAi35UF.js +2 -0
  418. package/dist/post-components/p-Dp41Pg4o.js +1 -0
  419. package/dist/post-components/p-TmutBiUy.js +1 -0
  420. package/dist/post-components/p-bl3gSRgH.js +1 -0
  421. package/dist/post-components/p-c70cad6e.entry.js +1 -0
  422. package/dist/post-components/{p-0962f02e.entry.js → p-c95fcb40.entry.js} +1 -1
  423. package/dist/post-components/{p-e5a2d0c3.entry.js → p-cca0cf23.entry.js} +1 -1
  424. package/dist/post-components/{p-68196501.entry.js → p-cd6684e1.entry.js} +1 -1
  425. package/dist/post-components/p-d57462a3.entry.js +1 -0
  426. package/dist/post-components/p-d99bdef2.entry.js +1 -0
  427. package/dist/post-components/{p-6debd1d3.entry.js → p-dfe811cc.entry.js} +1 -1
  428. package/dist/post-components/p-f14ca918.entry.js +1 -0
  429. package/dist/post-components/{p-136052d8.entry.js → p-f88a161a.entry.js} +1 -1
  430. package/dist/post-components/p-fc2882a8.entry.js +1 -0
  431. package/dist/post-components/p-jZZU8-Dx.js +1 -0
  432. package/dist/post-components/p-r5tpdxcW.js +1 -0
  433. package/dist/post-components/p-tHlklq2F.js +1 -0
  434. package/dist/post-components/post-components.css +2 -2
  435. package/dist/post-components/post-components.esm.js +1 -1
  436. package/dist/prebuild.js +4 -1
  437. package/dist/types/components/post-autocomplete/post-autocomplete.d.ts +10 -0
  438. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +8 -0
  439. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +8 -5
  440. package/dist/types/components/post-date-picker/air-locales.d.ts +5 -0
  441. package/dist/types/components/post-date-picker/constants.d.ts +37 -0
  442. package/dist/types/components/post-date-picker/post-date-picker.d.ts +74 -18
  443. package/dist/types/components/post-language-menu/post-language-menu.d.ts +2 -0
  444. package/dist/types/components/post-language-menu-item/post-language-menu-item.d.ts +5 -0
  445. package/dist/types/components/post-login-widget/post-login-widget.d.ts +30 -0
  446. package/dist/types/components/post-stepper/post-stepper.d.ts +2 -2
  447. package/dist/types/components.d.ts +349 -79
  448. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/rollup-plugin.air-datepicker-locale.d.ts +12 -0
  449. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/language-tags.d.ts +1 -0
  450. package/dist/types/language-tags.js +0 -0
  451. package/dist/types/stencil-public-runtime.d.ts +23 -2
  452. package/dist/types/utils/index.d.ts +1 -0
  453. package/dist/types/utils/locales.d.ts +11 -0
  454. package/hydrate/index.js +120060 -4788
  455. package/hydrate/index.mjs +120060 -4788
  456. package/package.json +15 -14
  457. package/dist/cjs/breakpoints-BTxzC_Qv.js +0 -204
  458. package/dist/collection/components/post-date-picker/locales.js +0 -10
  459. package/dist/components/breakpoints.js +0 -1
  460. package/dist/components/react/p-6dWji_Xt.js +0 -1
  461. package/dist/components/react/p-BIQP_u-p.js +0 -1
  462. package/dist/components/react/p-ByHBwvly.js +0 -1
  463. package/dist/components/react/p-C7drBbGl.js +0 -1
  464. package/dist/components/react/p-CS77r1AS.js +0 -1
  465. package/dist/components/react/p-CY-_ZlW3.js +0 -1
  466. package/dist/components/react/p-DVY9jsO7.js +0 -1
  467. package/dist/components/react/p-Djnfi-_S.js +0 -1
  468. package/dist/components/react/p-DlHbGhvD.js +0 -1
  469. package/dist/components/react/p-DxJ0OgPJ.js +0 -1
  470. package/dist/components/react/p-RpVuZS9R.js +0 -1
  471. package/dist/esm/breakpoints-CZuqK5QS.js +0 -200
  472. package/dist/esm/package-DVY9jsO7.js +0 -3
  473. package/dist/post-components/p-44481053.entry.js +0 -1
  474. package/dist/post-components/p-61d99723.entry.js +0 -1
  475. package/dist/post-components/p-6c2558a3.entry.js +0 -1
  476. package/dist/post-components/p-7b44e7e5.entry.js +0 -1
  477. package/dist/post-components/p-81aca7ec.entry.js +0 -1
  478. package/dist/post-components/p-85af10b8.entry.js +0 -1
  479. package/dist/post-components/p-8Vx4ywJ4.js +0 -2
  480. package/dist/post-components/p-951b3be6.entry.js +0 -1
  481. package/dist/post-components/p-D81ozKs6.js +0 -1
  482. package/dist/post-components/p-DVY9jsO7.js +0 -1
  483. package/dist/post-components/p-a4dd6a67.entry.js +0 -1
  484. package/dist/post-components/p-aFKnsRj1.js +0 -1
  485. package/dist/post-components/p-c5717005.entry.js +0 -1
  486. package/dist/post-components/p-ca7796c7.entry.js +0 -1
  487. package/dist/post-components/p-e14f0dd1.entry.js +0 -1
  488. package/dist/types/components/post-date-picker/locales.d.ts +0 -6
  489. /package/dist/components/react/{p-BLchVpF6.js → p-nA1BKco0.js} +0 -0
  490. /package/dist/post-components/{p-BLchVpF6.js → p-nA1BKco0.js} +0 -0
@@ -22,257 +22,12 @@ const NAMESPACE = 'post-components';
22
22
  const BUILD = /* post-components */ { hotModuleReplacement: false, hydratedSelectorName: "data-hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
23
23
 
24
24
  const globalScripts = () => {};
25
- const globalStyles = ":where(post-accordion,post-accordion-item,post-autocomplete,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-closebutton,post-collapsible,post-collapsible-trigger,post-date-picker,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-listbox,post-listbox-option,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-number-input,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not(:defined):not(.hydrated,[data-hydrated]){visibility:hidden}@media (scripting: none){:where(post-accordion,post-accordion-item,post-autocomplete,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-closebutton,post-collapsible,post-collapsible-trigger,post-date-picker,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-listbox,post-listbox-option,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-number-input,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not(:defined):not(.hydrated,[data-hydrated]){visibility:visible}}post-accordion:not([multiple]):not(:has([collapsed]))>post-accordion-item~post-accordion-item{--post-collapsible-initial-height:0;--post-collapsible-initial-overflow:hidden;--post-accordion-icon-initial-transform:rotate(-180deg)}.form-label:has(+post-number-input){display:block}.form-label:has(+post-number-input.number-input-sm){padding-inline:var(--post-device-spacing-padding-2);padding-block:var(--post-device-spacing-padding-30);font-weight:var(--post-device-font-weight-bold);font-size:var(--post-device-font-size-7)}.form-label:has(+post-number-input.disabled){color:var(--post-scheme-color-interactive-input-disabled-fg)}post-number-input.form-floating>input.form-control{padding:var(--post-device-spacing-padding-block-29) var(--post-device-spacing-padding-inline-1) var(--post-device-spacing-padding-block-3)}post-number-input.form-floating>input.form-control:focus~label,post-number-input.form-floating>input.form-control:not(:placeholder-shown)~label{padding-block-start:var(--post-device-spacing-padding-block-3);padding-inline:var(--post-device-spacing-padding-inline-1) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-10)}post-number-input.form-floating::after{width:var(--post-device-sizing-notification-1);height:var(--post-device-sizing-notification-1)}post-number-input.form-floating:has(>input.form-control.is-valid:not(:disabled))::after,post-number-input.form-floating:has(>input.form-control:-webkit-autofill.is-valid)::after,post-number-input.form-floating:has(>input.form-control.is-invalid:not(:disabled))::after,post-number-input.form-floating:has(>input.form-control:-webkit-autofill.is-invalid)::after{top:calc(var(--post-device-sizing-interactive-button-height-6) / 2);right:calc(\n var(--post-device-spacing-padding-inline-1) +\n (var(--post-device-spacing-padding-23)* 2) +\n var(--post-device-sizing-interactive-icon-size6) +\n (var(--post-device-border-width-default) * 2)\n )}post-number-input input[type=number]{appearance:textfield}post-number-input input[type=number]::-webkit-inner-spin-button,post-number-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}";
25
+ const globalStyles = ":where(post-accordion,post-accordion-item,post-autocomplete,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-closebutton,post-collapsible,post-collapsible-trigger,post-date-picker,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-listbox,post-listbox-option,post-login-widget,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-number-input,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not(:defined):not(.hydrated,[data-hydrated]){visibility:hidden}@media (scripting: none){:where(post-accordion,post-accordion-item,post-autocomplete,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-closebutton,post-collapsible,post-collapsible-trigger,post-date-picker,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-listbox,post-listbox-option,post-login-widget,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-number-input,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not(:defined):not(.hydrated,[data-hydrated]){visibility:visible}}post-accordion:not([multiple]):not(:has([collapsed]))>post-accordion-item~post-accordion-item{--post-collapsible-initial-height:0;--post-collapsible-initial-overflow:hidden;--post-accordion-icon-initial-transform:rotate(-180deg)}.form-label:has(+post-number-input){display:block}.form-label:has(+post-number-input.number-input-sm){padding-inline:var(--post-device-spacing-padding-2);padding-block:var(--post-device-spacing-padding-30);font-weight:var(--post-device-font-weight-bold);font-size:var(--post-device-font-size-7)}.form-label:has(+post-number-input.disabled){color:var(--post-scheme-color-interactive-input-disabled-fg)}post-number-input.form-floating>input.form-control{padding:var(--post-device-spacing-padding-block-29) var(--post-device-spacing-padding-inline-1) var(--post-device-spacing-padding-block-3)}post-number-input.form-floating>input.form-control:focus~label,post-number-input.form-floating>input.form-control:not(:placeholder-shown)~label{padding-block-start:var(--post-device-spacing-padding-block-3);padding-inline:var(--post-device-spacing-padding-inline-1) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-10)}post-number-input.form-floating::after{width:var(--post-device-sizing-notification-1);height:var(--post-device-sizing-notification-1)}post-number-input.form-floating:has(>input.form-control.is-valid:not(:disabled))::after,post-number-input.form-floating:has(>input.form-control:-webkit-autofill.is-valid)::after,post-number-input.form-floating:has(>input.form-control.is-invalid:not(:disabled))::after,post-number-input.form-floating:has(>input.form-control:-webkit-autofill.is-invalid)::after{top:calc(var(--post-device-sizing-interactive-button-height-6) / 2);right:calc(\n var(--post-device-spacing-padding-inline-1) +\n (var(--post-device-spacing-padding-23)* 2) +\n var(--post-device-sizing-interactive-icon-size6) +\n (var(--post-device-border-width-default) * 2)\n )}post-number-input input[type=number]{appearance:textfield}post-number-input input[type=number]::-webkit-inner-spin-button,post-number-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}post-login-widget>[slot=unauthenticated]{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;border:unset;font-weight:unset;display:flex;padding:.25rem .625rem;gap:.375rem;font-size:1rem;border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}post-login-widget>[slot=unauthenticated]:hover{text-decoration:none}post-login-widget>[slot=unauthenticated]:disabled{border-style:var(--post-core-border-style-dash)}post-login-widget>[slot=unauthenticated]{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-login-widget>[slot=unauthenticated]:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-login-widget>[slot=unauthenticated]:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-login-widget>[slot=unauthenticated]:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-login-widget>[slot=unauthenticated]:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-login-widget>[slot=unauthenticated]:is(a){color:LinkText;border:unset}post-login-widget>[slot=unauthenticated]:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}post-login-widget>[slot=unauthenticated]:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}post-login-widget>[slot=unauthenticated]:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}post-login-widget>[slot=unauthenticated]:hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}post-login-widget>[slot=unauthenticated]:is([aria-current],[aria-pressed=true],[aria-expanded=true],.active){box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-primary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg);color:var(--post-scheme-color-interactive-button-primary-enabled-fg)}post-login-widget>[slot=unauthenticated]:is([aria-current],[aria-pressed=true],[aria-expanded=true],.active):hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg);color:var(--post-scheme-color-interactive-button-primary-hover-fg)}post-login-widget>[slot=unauthenticated]{width:fit-content}@media screen and (min-width: 0)and (max-width: 599.98px){post-login-widget>[slot=unauthenticated]>:not(post-icon){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-login-widget>[slot=unauthenticated]>post-icon{font-size:1.5rem}}post-login-widget>[slot=authenticated]>post-menu-trigger>button{border-radius:var(--post-device-border-radius-round) !important}";
26
26
 
27
27
  /*
28
- Stencil Client Platform v4.41.1 | MIT Licensed | https://stenciljs.com
28
+ Stencil Client Platform v4.43.3 | MIT Licensed | https://stenciljs.com
29
29
  */
30
- var __create = Object.create;
31
- var __defProp = Object.defineProperty;
32
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
33
- var __getOwnPropNames = Object.getOwnPropertyNames;
34
- var __getProtoOf = Object.getPrototypeOf;
35
- var __hasOwnProp = Object.prototype.hasOwnProperty;
36
- var __typeError = (msg) => {
37
- throw TypeError(msg);
38
- };
39
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
40
- var __commonJS = (cb, mod) => function __require() {
41
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
42
- };
43
- var __export = (target, all) => {
44
- for (var name in all)
45
- __defProp(target, name, { get: all[name], enumerable: true });
46
- };
47
- var __copyProps = (to, from, except, desc) => {
48
- if (from && typeof from === "object" || typeof from === "function") {
49
- for (let key of __getOwnPropNames(from))
50
- if (!__hasOwnProp.call(to, key) && key !== except)
51
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
52
- }
53
- return to;
54
- };
55
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
56
- // If the importer is in node compatibility mode or this is not an ESM
57
- // file that has been converted to a CommonJS file using a Babel-
58
- // compatible transform (i.e. "__esModule" has not been set), then set
59
- // "default" to the CommonJS "module.exports" for node compatibility.
60
- __defProp(target, "default", { value: mod, enumerable: true }) ,
61
- mod
62
- ));
63
- var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
64
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
65
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
66
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
67
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
68
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
69
30
 
70
- // node_modules/balanced-match/index.js
71
- var require_balanced_match = __commonJS({
72
- "node_modules/balanced-match/index.js"(exports, module) {
73
- module.exports = balanced;
74
- function balanced(a, b, str) {
75
- if (a instanceof RegExp) a = maybeMatch(a, str);
76
- if (b instanceof RegExp) b = maybeMatch(b, str);
77
- var r = range(a, b, str);
78
- return r && {
79
- start: r[0],
80
- end: r[1],
81
- pre: str.slice(0, r[0]),
82
- body: str.slice(r[0] + a.length, r[1]),
83
- post: str.slice(r[1] + b.length)
84
- };
85
- }
86
- function maybeMatch(reg, str) {
87
- var m = str.match(reg);
88
- return m ? m[0] : null;
89
- }
90
- balanced.range = range;
91
- function range(a, b, str) {
92
- var begs, beg, left, right, result;
93
- var ai = str.indexOf(a);
94
- var bi = str.indexOf(b, ai + 1);
95
- var i2 = ai;
96
- if (ai >= 0 && bi > 0) {
97
- if (a === b) {
98
- return [ai, bi];
99
- }
100
- begs = [];
101
- left = str.length;
102
- while (i2 >= 0 && !result) {
103
- if (i2 == ai) {
104
- begs.push(i2);
105
- ai = str.indexOf(a, i2 + 1);
106
- } else if (begs.length == 1) {
107
- result = [begs.pop(), bi];
108
- } else {
109
- beg = begs.pop();
110
- if (beg < left) {
111
- left = beg;
112
- right = bi;
113
- }
114
- bi = str.indexOf(b, i2 + 1);
115
- }
116
- i2 = ai < bi && ai >= 0 ? ai : bi;
117
- }
118
- if (begs.length) {
119
- result = [left, right];
120
- }
121
- }
122
- return result;
123
- }
124
- }
125
- });
126
-
127
- // node_modules/brace-expansion/index.js
128
- var require_brace_expansion = __commonJS({
129
- "node_modules/brace-expansion/index.js"(exports, module) {
130
- var balanced = require_balanced_match();
131
- module.exports = expandTop;
132
- var escSlash = "\0SLASH" + Math.random() + "\0";
133
- var escOpen = "\0OPEN" + Math.random() + "\0";
134
- var escClose = "\0CLOSE" + Math.random() + "\0";
135
- var escComma = "\0COMMA" + Math.random() + "\0";
136
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
137
- function numeric(str) {
138
- return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
139
- }
140
- function escapeBraces(str) {
141
- return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
142
- }
143
- function unescapeBraces(str) {
144
- return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
145
- }
146
- function parseCommaParts(str) {
147
- if (!str)
148
- return [""];
149
- var parts = [];
150
- var m = balanced("{", "}", str);
151
- if (!m)
152
- return str.split(",");
153
- var pre = m.pre;
154
- var body = m.body;
155
- var post = m.post;
156
- var p = pre.split(",");
157
- p[p.length - 1] += "{" + body + "}";
158
- var postParts = parseCommaParts(post);
159
- if (post.length) {
160
- p[p.length - 1] += postParts.shift();
161
- p.push.apply(p, postParts);
162
- }
163
- parts.push.apply(parts, p);
164
- return parts;
165
- }
166
- function expandTop(str) {
167
- if (!str)
168
- return [];
169
- if (str.substr(0, 2) === "{}") {
170
- str = "\\{\\}" + str.substr(2);
171
- }
172
- return expand2(escapeBraces(str), true).map(unescapeBraces);
173
- }
174
- function embrace(str) {
175
- return "{" + str + "}";
176
- }
177
- function isPadded(el) {
178
- return /^-?0\d/.test(el);
179
- }
180
- function lte(i2, y) {
181
- return i2 <= y;
182
- }
183
- function gte(i2, y) {
184
- return i2 >= y;
185
- }
186
- function expand2(str, isTop) {
187
- var expansions = [];
188
- var m = balanced("{", "}", str);
189
- if (!m) return [str];
190
- var pre = m.pre;
191
- var post = m.post.length ? expand2(m.post, false) : [""];
192
- if (/\$$/.test(m.pre)) {
193
- for (var k = 0; k < post.length; k++) {
194
- var expansion = pre + "{" + m.body + "}" + post[k];
195
- expansions.push(expansion);
196
- }
197
- } else {
198
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
199
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
200
- var isSequence = isNumericSequence || isAlphaSequence;
201
- var isOptions = m.body.indexOf(",") >= 0;
202
- if (!isSequence && !isOptions) {
203
- if (m.post.match(/,(?!,).*\}/)) {
204
- str = m.pre + "{" + m.body + escClose + m.post;
205
- return expand2(str);
206
- }
207
- return [str];
208
- }
209
- var n;
210
- if (isSequence) {
211
- n = m.body.split(/\.\./);
212
- } else {
213
- n = parseCommaParts(m.body);
214
- if (n.length === 1) {
215
- n = expand2(n[0], false).map(embrace);
216
- if (n.length === 1) {
217
- return post.map(function(p) {
218
- return m.pre + n[0] + p;
219
- });
220
- }
221
- }
222
- }
223
- var N;
224
- if (isSequence) {
225
- var x = numeric(n[0]);
226
- var y = numeric(n[1]);
227
- var width = Math.max(n[0].length, n[1].length);
228
- var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
229
- var test = lte;
230
- var reverse = y < x;
231
- if (reverse) {
232
- incr *= -1;
233
- test = gte;
234
- }
235
- var pad = n.some(isPadded);
236
- N = [];
237
- for (var i2 = x; test(i2, y); i2 += incr) {
238
- var c;
239
- if (isAlphaSequence) {
240
- c = String.fromCharCode(i2);
241
- if (c === "\\")
242
- c = "";
243
- } else {
244
- c = String(i2);
245
- if (pad) {
246
- var need = width - c.length;
247
- if (need > 0) {
248
- var z = new Array(need + 1).join("0");
249
- if (i2 < 0)
250
- c = "-" + z + c.slice(1);
251
- else
252
- c = z + c;
253
- }
254
- }
255
- }
256
- N.push(c);
257
- }
258
- } else {
259
- N = [];
260
- for (var j = 0; j < n.length; j++) {
261
- N.push.apply(N, expand2(n[j], false));
262
- }
263
- }
264
- for (var j = 0; j < N.length; j++) {
265
- for (var k = 0; k < post.length; k++) {
266
- var expansion = pre + N[j] + post[k];
267
- if (!isTop || isSequence || expansion)
268
- expansions.push(expansion);
269
- }
270
- }
271
- }
272
- return expansions;
273
- }
274
- }
275
- });
276
31
 
277
32
  // src/utils/constants.ts
278
33
  var SVG_NS = "http://www.w3.org/2000/svg";
@@ -301,6 +56,19 @@ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
301
56
  var TYPE_CONSTANT = "type";
302
57
  var VALUE_CONSTANT = "value";
303
58
  var SERIALIZED_PREFIX = "serialized:";
59
+
60
+ // src/utils/get-prop-descriptor.ts
61
+ function getPropertyDescriptor(obj, memberName, getOnly) {
62
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
63
+ while (obj && obj !== stopAt) {
64
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
65
+ if (desc && (!getOnly || desc.get)) return desc;
66
+ obj = Object.getPrototypeOf(obj);
67
+ }
68
+ return void 0;
69
+ }
70
+
71
+ // src/utils/es2022-rewire-class-members.ts
304
72
  var reWireGetterSetter = (instance, hostRef) => {
305
73
  var _a;
306
74
  const cmpMeta = hostRef.$cmpMeta$;
@@ -308,7 +76,7 @@ var reWireGetterSetter = (instance, hostRef) => {
308
76
  members.map(([memberName, [memberFlags]]) => {
309
77
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
310
78
  const ogValue = instance[memberName];
311
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
79
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
312
80
  if (ogDescriptor) {
313
81
  Object.defineProperty(instance, memberName, {
314
82
  get() {
@@ -321,18 +89,14 @@ var reWireGetterSetter = (instance, hostRef) => {
321
89
  enumerable: true
322
90
  });
323
91
  }
324
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
92
+ if (hostRef.$instanceValues$.has(memberName)) {
93
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
94
+ } else if (ogValue !== void 0) {
95
+ instance[memberName] = ogValue;
96
+ }
325
97
  }
326
98
  });
327
99
  };
328
- function getPropertyDescriptor(obj, memberName) {
329
- while (obj) {
330
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
331
- if (desc == null ? void 0 : desc.get) return desc;
332
- obj = Object.getPrototypeOf(obj);
333
- }
334
- return void 0;
335
- }
336
100
 
337
101
  // src/client/client-host-ref.ts
338
102
  var getHostRef = (ref) => {
@@ -395,6 +159,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
395
159
  }
396
160
  switch(bundleId) {
397
161
 
162
+ case 'post-login-widget.cjs':
163
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
164
+ /* webpackMode: "lazy" */
165
+ './post-login-widget.cjs.entry.js')); }).then(processMod, consoleError);
398
166
  case 'post-autocomplete.cjs':
399
167
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
400
168
  /* webpackMode: "lazy" */
@@ -546,1589 +314,69 @@ var plt = {
546
314
  };
547
315
  var supportsListenerOptions = /* @__PURE__ */ (() => {
548
316
  var _a;
549
- let supportsListenerOptions2 = false;
550
- try {
551
- (_a = win.document) == null ? void 0 : _a.addEventListener(
552
- "e",
553
- null,
554
- Object.defineProperty({}, "passive", {
555
- get() {
556
- supportsListenerOptions2 = true;
557
- }
558
- })
559
- );
560
- } catch (e) {
561
- }
562
- return supportsListenerOptions2;
563
- })();
564
- var promiseResolve = (v) => Promise.resolve(v);
565
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
566
- try {
567
- if (!win.document.adoptedStyleSheets) {
568
- return false;
569
- }
570
- new CSSStyleSheet();
571
- return typeof new CSSStyleSheet().replaceSync === "function";
572
- } catch (e) {
573
- }
574
- return false;
575
- })() ;
576
- var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
577
- var queuePending = false;
578
- var queueDomReads = [];
579
- var queueDomWrites = [];
580
- var queueTask = (queue, write) => (cb) => {
581
- queue.push(cb);
582
- if (!queuePending) {
583
- queuePending = true;
584
- if (write && plt.$flags$ & 4 /* queueSync */) {
585
- nextTick(flush);
586
- } else {
587
- plt.raf(flush);
588
- }
589
- }
590
- };
591
- var consume = (queue) => {
592
- for (let i2 = 0; i2 < queue.length; i2++) {
593
- try {
594
- queue[i2](performance.now());
595
- } catch (e) {
596
- consoleError(e);
597
- }
598
- }
599
- queue.length = 0;
600
- };
601
- var flush = () => {
602
- consume(queueDomReads);
603
- {
604
- consume(queueDomWrites);
605
- if (queuePending = queueDomReads.length > 0) {
606
- plt.raf(flush);
607
- }
608
- }
609
- };
610
- var nextTick = (cb) => promiseResolve().then(cb);
611
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
612
- var isComplexType = (o) => {
613
- o = typeof o;
614
- return o === "object" || o === "function";
615
- };
616
-
617
- // node_modules/minimatch/dist/esm/index.js
618
- var import_brace_expansion = __toESM(require_brace_expansion());
619
-
620
- // node_modules/minimatch/dist/esm/assert-valid-pattern.js
621
- var MAX_PATTERN_LENGTH = 1024 * 64;
622
- var assertValidPattern = (pattern) => {
623
- if (typeof pattern !== "string") {
624
- throw new TypeError("invalid pattern");
625
- }
626
- if (pattern.length > MAX_PATTERN_LENGTH) {
627
- throw new TypeError("pattern is too long");
628
- }
629
- };
630
-
631
- // node_modules/minimatch/dist/esm/brace-expressions.js
632
- var posixClasses = {
633
- "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
634
- "[:alpha:]": ["\\p{L}\\p{Nl}", true],
635
- "[:ascii:]": ["\\x00-\\x7f", false],
636
- "[:blank:]": ["\\p{Zs}\\t", true],
637
- "[:cntrl:]": ["\\p{Cc}", true],
638
- "[:digit:]": ["\\p{Nd}", true],
639
- "[:graph:]": ["\\p{Z}\\p{C}", true, true],
640
- "[:lower:]": ["\\p{Ll}", true],
641
- "[:print:]": ["\\p{C}", true],
642
- "[:punct:]": ["\\p{P}", true],
643
- "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
644
- "[:upper:]": ["\\p{Lu}", true],
645
- "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
646
- "[:xdigit:]": ["A-Fa-f0-9", false]
647
- };
648
- var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
649
- var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
650
- var rangesToString = (ranges) => ranges.join("");
651
- var parseClass = (glob, position) => {
652
- const pos = position;
653
- if (glob.charAt(pos) !== "[") {
654
- throw new Error("not in a brace expression");
655
- }
656
- const ranges = [];
657
- const negs = [];
658
- let i2 = pos + 1;
659
- let sawStart = false;
660
- let uflag = false;
661
- let escaping = false;
662
- let negate = false;
663
- let endPos = pos;
664
- let rangeStart = "";
665
- WHILE: while (i2 < glob.length) {
666
- const c = glob.charAt(i2);
667
- if ((c === "!" || c === "^") && i2 === pos + 1) {
668
- negate = true;
669
- i2++;
670
- continue;
671
- }
672
- if (c === "]" && sawStart && !escaping) {
673
- endPos = i2 + 1;
674
- break;
675
- }
676
- sawStart = true;
677
- if (c === "\\") {
678
- if (!escaping) {
679
- escaping = true;
680
- i2++;
681
- continue;
682
- }
683
- }
684
- if (c === "[" && !escaping) {
685
- for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
686
- if (glob.startsWith(cls, i2)) {
687
- if (rangeStart) {
688
- return ["$.", false, glob.length - pos, true];
689
- }
690
- i2 += cls.length;
691
- if (neg)
692
- negs.push(unip);
693
- else
694
- ranges.push(unip);
695
- uflag = uflag || u;
696
- continue WHILE;
697
- }
698
- }
699
- }
700
- escaping = false;
701
- if (rangeStart) {
702
- if (c > rangeStart) {
703
- ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
704
- } else if (c === rangeStart) {
705
- ranges.push(braceEscape(c));
706
- }
707
- rangeStart = "";
708
- i2++;
709
- continue;
710
- }
711
- if (glob.startsWith("-]", i2 + 1)) {
712
- ranges.push(braceEscape(c + "-"));
713
- i2 += 2;
714
- continue;
715
- }
716
- if (glob.startsWith("-", i2 + 1)) {
717
- rangeStart = c;
718
- i2 += 2;
719
- continue;
720
- }
721
- ranges.push(braceEscape(c));
722
- i2++;
723
- }
724
- if (endPos < i2) {
725
- return ["", false, 0, false];
726
- }
727
- if (!ranges.length && !negs.length) {
728
- return ["$.", false, glob.length - pos, true];
729
- }
730
- if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
731
- const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
732
- return [regexpEscape(r), false, endPos - pos, false];
733
- }
734
- const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
735
- const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
736
- const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
737
- return [comb, uflag, endPos - pos, true];
738
- };
739
-
740
- // node_modules/minimatch/dist/esm/unescape.js
741
- var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
742
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
743
- };
744
-
745
- // node_modules/minimatch/dist/esm/ast.js
746
- var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
747
- var isExtglobType = (c) => types.has(c);
748
- var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
749
- var startNoDot = "(?!\\.)";
750
- var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
751
- var justDots = /* @__PURE__ */ new Set(["..", "."]);
752
- var reSpecials = new Set("().*{}+?[]^$\\!");
753
- var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
754
- var qmark = "[^/]";
755
- var star = qmark + "*?";
756
- var starNoEmpty = qmark + "+?";
757
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
758
- var _AST = class _AST {
759
- constructor(type, parent, options = {}) {
760
- __privateAdd(this, _AST_instances);
761
- __publicField(this, "type");
762
- __privateAdd(this, _root);
763
- __privateAdd(this, _hasMagic);
764
- __privateAdd(this, _uflag, false);
765
- __privateAdd(this, _parts, []);
766
- __privateAdd(this, _parent);
767
- __privateAdd(this, _parentIndex);
768
- __privateAdd(this, _negs);
769
- __privateAdd(this, _filledNegs, false);
770
- __privateAdd(this, _options);
771
- __privateAdd(this, _toString);
772
- // set to true if it's an extglob with no children
773
- // (which really means one child of '')
774
- __privateAdd(this, _emptyExt, false);
775
- this.type = type;
776
- if (type)
777
- __privateSet(this, _hasMagic, true);
778
- __privateSet(this, _parent, parent);
779
- __privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
780
- __privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
781
- __privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
782
- if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
783
- __privateGet(this, _negs).push(this);
784
- __privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
785
- }
786
- get hasMagic() {
787
- if (__privateGet(this, _hasMagic) !== void 0)
788
- return __privateGet(this, _hasMagic);
789
- for (const p of __privateGet(this, _parts)) {
790
- if (typeof p === "string")
791
- continue;
792
- if (p.type || p.hasMagic)
793
- return __privateSet(this, _hasMagic, true);
794
- }
795
- return __privateGet(this, _hasMagic);
796
- }
797
- // reconstructs the pattern
798
- toString() {
799
- if (__privateGet(this, _toString) !== void 0)
800
- return __privateGet(this, _toString);
801
- if (!this.type) {
802
- return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
803
- } else {
804
- return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
805
- }
806
- }
807
- push(...parts) {
808
- for (const p of parts) {
809
- if (p === "")
810
- continue;
811
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
812
- throw new Error("invalid part: " + p);
813
- }
814
- __privateGet(this, _parts).push(p);
815
- }
816
- }
817
- toJSON() {
818
- var _a;
819
- const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
820
- if (this.isStart() && !this.type)
821
- ret.unshift([]);
822
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
823
- ret.push({});
824
- }
825
- return ret;
826
- }
827
- isStart() {
828
- var _a;
829
- if (__privateGet(this, _root) === this)
830
- return true;
831
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
832
- return false;
833
- if (__privateGet(this, _parentIndex) === 0)
834
- return true;
835
- const p = __privateGet(this, _parent);
836
- for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
837
- const pp = __privateGet(p, _parts)[i2];
838
- if (!(pp instanceof _AST && pp.type === "!")) {
839
- return false;
840
- }
841
- }
842
- return true;
843
- }
844
- isEnd() {
845
- var _a, _b, _c;
846
- if (__privateGet(this, _root) === this)
847
- return true;
848
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
849
- return true;
850
- if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
851
- return false;
852
- if (!this.type)
853
- return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
854
- const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
855
- return __privateGet(this, _parentIndex) === pl - 1;
856
- }
857
- copyIn(part) {
858
- if (typeof part === "string")
859
- this.push(part);
860
- else
861
- this.push(part.clone(this));
862
- }
863
- clone(parent) {
864
- const c = new _AST(this.type, parent);
865
- for (const p of __privateGet(this, _parts)) {
866
- c.copyIn(p);
867
- }
868
- return c;
869
- }
870
- static fromGlob(pattern, options = {}) {
871
- var _a;
872
- const ast = new _AST(null, void 0, options);
873
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
874
- return ast;
875
- }
876
- // returns the regular expression if there's magic, or the unescaped
877
- // string if not.
878
- toMMPattern() {
879
- if (this !== __privateGet(this, _root))
880
- return __privateGet(this, _root).toMMPattern();
881
- const glob = this.toString();
882
- const [re, body, hasMagic, uflag] = this.toRegExpSource();
883
- const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
884
- if (!anyMagic) {
885
- return body;
886
- }
887
- const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
888
- return Object.assign(new RegExp(`^${re}$`, flags), {
889
- _src: re,
890
- _glob: glob
891
- });
892
- }
893
- get options() {
894
- return __privateGet(this, _options);
895
- }
896
- // returns the string match, the regexp source, whether there's magic
897
- // in the regexp (so a regular expression is required) and whether or
898
- // not the uflag is needed for the regular expression (for posix classes)
899
- // TODO: instead of injecting the start/end at this point, just return
900
- // the BODY of the regexp, along with the start/end portions suitable
901
- // for binding the start/end in either a joined full-path makeRe context
902
- // (where we bind to (^|/), or a standalone matchPart context (where
903
- // we bind to ^, and not /). Otherwise slashes get duped!
904
- //
905
- // In part-matching mode, the start is:
906
- // - if not isStart: nothing
907
- // - if traversal possible, but not allowed: ^(?!\.\.?$)
908
- // - if dots allowed or not possible: ^
909
- // - if dots possible and not allowed: ^(?!\.)
910
- // end is:
911
- // - if not isEnd(): nothing
912
- // - else: $
913
- //
914
- // In full-path matching mode, we put the slash at the START of the
915
- // pattern, so start is:
916
- // - if first pattern: same as part-matching mode
917
- // - if not isStart(): nothing
918
- // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
919
- // - if dots allowed or not possible: /
920
- // - if dots possible and not allowed: /(?!\.)
921
- // end is:
922
- // - if last pattern, same as part-matching mode
923
- // - else nothing
924
- //
925
- // Always put the (?:$|/) on negated tails, though, because that has to be
926
- // there to bind the end of the negated pattern portion, and it's easier to
927
- // just stick it in now rather than try to inject it later in the middle of
928
- // the pattern.
929
- //
930
- // We can just always return the same end, and leave it up to the caller
931
- // to know whether it's going to be used joined or in parts.
932
- // And, if the start is adjusted slightly, can do the same there:
933
- // - if not isStart: nothing
934
- // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
935
- // - if dots allowed or not possible: (?:/|^)
936
- // - if dots possible and not allowed: (?:/|^)(?!\.)
937
- //
938
- // But it's better to have a simpler binding without a conditional, for
939
- // performance, so probably better to return both start options.
940
- //
941
- // Then the caller just ignores the end if it's not the first pattern,
942
- // and the start always gets applied.
943
- //
944
- // But that's always going to be $ if it's the ending pattern, or nothing,
945
- // so the caller can just attach $ at the end of the pattern when building.
946
- //
947
- // So the todo is:
948
- // - better detect what kind of start is needed
949
- // - return both flavors of starting pattern
950
- // - attach $ at the end of the pattern when creating the actual RegExp
951
- //
952
- // Ah, but wait, no, that all only applies to the root when the first pattern
953
- // is not an extglob. If the first pattern IS an extglob, then we need all
954
- // that dot prevention biz to live in the extglob portions, because eg
955
- // +(*|.x*) can match .xy but not .yx.
956
- //
957
- // So, return the two flavors if it's #root and the first child is not an
958
- // AST, otherwise leave it to the child AST to handle it, and there,
959
- // use the (?:^|/) style of start binding.
960
- //
961
- // Even simplified further:
962
- // - Since the start for a join is eg /(?!\.) and the start for a part
963
- // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
964
- // or start or whatever) and prepend ^ or / at the Regexp construction.
965
- toRegExpSource(allowDot) {
966
- var _a;
967
- const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
968
- if (__privateGet(this, _root) === this)
969
- __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
970
- if (!this.type) {
971
- const noEmpty = this.isStart() && this.isEnd();
972
- const src = __privateGet(this, _parts).map((p) => {
973
- var _a2;
974
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
975
- __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
976
- __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
977
- return re;
978
- }).join("");
979
- let start2 = "";
980
- if (this.isStart()) {
981
- if (typeof __privateGet(this, _parts)[0] === "string") {
982
- const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
983
- if (!dotTravAllowed) {
984
- const aps = addPatternStart;
985
- const needNoTrav = (
986
- // dots are allowed, and the pattern starts with [ or .
987
- dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
988
- src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
989
- src.startsWith("\\.\\.") && aps.has(src.charAt(4))
990
- );
991
- const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
992
- start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
993
- }
994
- }
995
- }
996
- let end = "";
997
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
998
- end = "(?:$|\\/)";
999
- }
1000
- const final2 = start2 + src + end;
1001
- return [
1002
- final2,
1003
- unescape(src),
1004
- __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
1005
- __privateGet(this, _uflag)
1006
- ];
1007
- }
1008
- const repeated = this.type === "*" || this.type === "+";
1009
- const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
1010
- let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
1011
- if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
1012
- const s = this.toString();
1013
- __privateSet(this, _parts, [s]);
1014
- this.type = null;
1015
- __privateSet(this, _hasMagic, void 0);
1016
- return [s, unescape(this.toString()), false, false];
1017
- }
1018
- let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
1019
- if (bodyDotAllowed === body) {
1020
- bodyDotAllowed = "";
1021
- }
1022
- if (bodyDotAllowed) {
1023
- body = `(?:${body})(?:${bodyDotAllowed})*?`;
1024
- }
1025
- let final = "";
1026
- if (this.type === "!" && __privateGet(this, _emptyExt)) {
1027
- final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
1028
- } else {
1029
- const close = this.type === "!" ? (
1030
- // !() must match something,but !(x) can match ''
1031
- "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
1032
- ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
1033
- final = start + body + close;
1034
- }
1035
- return [
1036
- final,
1037
- unescape(body),
1038
- __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
1039
- __privateGet(this, _uflag)
1040
- ];
1041
- }
1042
- };
1043
- _root = new WeakMap();
1044
- _hasMagic = new WeakMap();
1045
- _uflag = new WeakMap();
1046
- _parts = new WeakMap();
1047
- _parent = new WeakMap();
1048
- _parentIndex = new WeakMap();
1049
- _negs = new WeakMap();
1050
- _filledNegs = new WeakMap();
1051
- _options = new WeakMap();
1052
- _toString = new WeakMap();
1053
- _emptyExt = new WeakMap();
1054
- _AST_instances = new WeakSet();
1055
- fillNegs_fn = function() {
1056
- if (this !== __privateGet(this, _root))
1057
- throw new Error("should only call on root");
1058
- if (__privateGet(this, _filledNegs))
1059
- return this;
1060
- this.toString();
1061
- __privateSet(this, _filledNegs, true);
1062
- let n;
1063
- while (n = __privateGet(this, _negs).pop()) {
1064
- if (n.type !== "!")
1065
- continue;
1066
- let p = n;
1067
- let pp = __privateGet(p, _parent);
1068
- while (pp) {
1069
- for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
1070
- for (const part of __privateGet(n, _parts)) {
1071
- if (typeof part === "string") {
1072
- throw new Error("string part in extglob AST??");
1073
- }
1074
- part.copyIn(__privateGet(pp, _parts)[i2]);
1075
- }
1076
- }
1077
- p = pp;
1078
- pp = __privateGet(p, _parent);
1079
- }
1080
- }
1081
- return this;
1082
- };
1083
- _AST_static = new WeakSet();
1084
- parseAST_fn = function(str, ast, pos, opt) {
1085
- var _a, _b;
1086
- let escaping = false;
1087
- let inBrace = false;
1088
- let braceStart = -1;
1089
- let braceNeg = false;
1090
- if (ast.type === null) {
1091
- let i3 = pos;
1092
- let acc2 = "";
1093
- while (i3 < str.length) {
1094
- const c = str.charAt(i3++);
1095
- if (escaping || c === "\\") {
1096
- escaping = !escaping;
1097
- acc2 += c;
1098
- continue;
1099
- }
1100
- if (inBrace) {
1101
- if (i3 === braceStart + 1) {
1102
- if (c === "^" || c === "!") {
1103
- braceNeg = true;
1104
- }
1105
- } else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
1106
- inBrace = false;
1107
- }
1108
- acc2 += c;
1109
- continue;
1110
- } else if (c === "[") {
1111
- inBrace = true;
1112
- braceStart = i3;
1113
- braceNeg = false;
1114
- acc2 += c;
1115
- continue;
1116
- }
1117
- if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
1118
- ast.push(acc2);
1119
- acc2 = "";
1120
- const ext2 = new _AST(c, ast);
1121
- i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
1122
- ast.push(ext2);
1123
- continue;
1124
- }
1125
- acc2 += c;
1126
- }
1127
- ast.push(acc2);
1128
- return i3;
1129
- }
1130
- let i2 = pos + 1;
1131
- let part = new _AST(null, ast);
1132
- const parts = [];
1133
- let acc = "";
1134
- while (i2 < str.length) {
1135
- const c = str.charAt(i2++);
1136
- if (escaping || c === "\\") {
1137
- escaping = !escaping;
1138
- acc += c;
1139
- continue;
1140
- }
1141
- if (inBrace) {
1142
- if (i2 === braceStart + 1) {
1143
- if (c === "^" || c === "!") {
1144
- braceNeg = true;
1145
- }
1146
- } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
1147
- inBrace = false;
1148
- }
1149
- acc += c;
1150
- continue;
1151
- } else if (c === "[") {
1152
- inBrace = true;
1153
- braceStart = i2;
1154
- braceNeg = false;
1155
- acc += c;
1156
- continue;
1157
- }
1158
- if (isExtglobType(c) && str.charAt(i2) === "(") {
1159
- part.push(acc);
1160
- acc = "";
1161
- const ext2 = new _AST(c, part);
1162
- part.push(ext2);
1163
- i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
1164
- continue;
1165
- }
1166
- if (c === "|") {
1167
- part.push(acc);
1168
- acc = "";
1169
- parts.push(part);
1170
- part = new _AST(null, ast);
1171
- continue;
1172
- }
1173
- if (c === ")") {
1174
- if (acc === "" && __privateGet(ast, _parts).length === 0) {
1175
- __privateSet(ast, _emptyExt, true);
1176
- }
1177
- part.push(acc);
1178
- acc = "";
1179
- ast.push(...parts, part);
1180
- return i2;
1181
- }
1182
- acc += c;
1183
- }
1184
- ast.type = null;
1185
- __privateSet(ast, _hasMagic, void 0);
1186
- __privateSet(ast, _parts, [str.substring(pos - 1)]);
1187
- return i2;
1188
- };
1189
- partsToRegExp_fn = function(dot) {
1190
- return __privateGet(this, _parts).map((p) => {
1191
- if (typeof p === "string") {
1192
- throw new Error("string type in extglob ast??");
1193
- }
1194
- const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
1195
- __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
1196
- return re;
1197
- }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
1198
- };
1199
- parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
1200
- let escaping = false;
1201
- let re = "";
1202
- let uflag = false;
1203
- for (let i2 = 0; i2 < glob.length; i2++) {
1204
- const c = glob.charAt(i2);
1205
- if (escaping) {
1206
- escaping = false;
1207
- re += (reSpecials.has(c) ? "\\" : "") + c;
1208
- continue;
1209
- }
1210
- if (c === "\\") {
1211
- if (i2 === glob.length - 1) {
1212
- re += "\\\\";
1213
- } else {
1214
- escaping = true;
1215
- }
1216
- continue;
1217
- }
1218
- if (c === "[") {
1219
- const [src, needUflag, consumed, magic] = parseClass(glob, i2);
1220
- if (consumed) {
1221
- re += src;
1222
- uflag = uflag || needUflag;
1223
- i2 += consumed - 1;
1224
- hasMagic = hasMagic || magic;
1225
- continue;
1226
- }
1227
- }
1228
- if (c === "*") {
1229
- if (noEmpty && glob === "*")
1230
- re += starNoEmpty;
1231
- else
1232
- re += star;
1233
- hasMagic = true;
1234
- continue;
1235
- }
1236
- if (c === "?") {
1237
- re += qmark;
1238
- hasMagic = true;
1239
- continue;
1240
- }
1241
- re += regExpEscape(c);
1242
- }
1243
- return [re, unescape(glob), !!hasMagic, uflag];
1244
- };
1245
- __privateAdd(_AST, _AST_static);
1246
- var AST = _AST;
1247
-
1248
- // node_modules/minimatch/dist/esm/escape.js
1249
- var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1250
- return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1251
- };
1252
-
1253
- // node_modules/minimatch/dist/esm/index.js
1254
- var minimatch = (p, pattern, options = {}) => {
1255
- assertValidPattern(pattern);
1256
- if (!options.nocomment && pattern.charAt(0) === "#") {
1257
- return false;
1258
- }
1259
- return new Minimatch(pattern, options).match(p);
1260
- };
1261
- var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
1262
- var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
1263
- var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
1264
- var starDotExtTestNocase = (ext2) => {
1265
- ext2 = ext2.toLowerCase();
1266
- return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
1267
- };
1268
- var starDotExtTestNocaseDot = (ext2) => {
1269
- ext2 = ext2.toLowerCase();
1270
- return (f) => f.toLowerCase().endsWith(ext2);
1271
- };
1272
- var starDotStarRE = /^\*+\.\*+$/;
1273
- var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
1274
- var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
1275
- var dotStarRE = /^\.\*+$/;
1276
- var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
1277
- var starRE = /^\*+$/;
1278
- var starTest = (f) => f.length !== 0 && !f.startsWith(".");
1279
- var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
1280
- var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
1281
- var qmarksTestNocase = ([$0, ext2 = ""]) => {
1282
- const noext = qmarksTestNoExt([$0]);
1283
- if (!ext2)
1284
- return noext;
1285
- ext2 = ext2.toLowerCase();
1286
- return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1287
- };
1288
- var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
1289
- const noext = qmarksTestNoExtDot([$0]);
1290
- if (!ext2)
1291
- return noext;
1292
- ext2 = ext2.toLowerCase();
1293
- return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1294
- };
1295
- var qmarksTestDot = ([$0, ext2 = ""]) => {
1296
- const noext = qmarksTestNoExtDot([$0]);
1297
- return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1298
- };
1299
- var qmarksTest = ([$0, ext2 = ""]) => {
1300
- const noext = qmarksTestNoExt([$0]);
1301
- return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1302
- };
1303
- var qmarksTestNoExt = ([$0]) => {
1304
- const len = $0.length;
1305
- return (f) => f.length === len && !f.startsWith(".");
1306
- };
1307
- var qmarksTestNoExtDot = ([$0]) => {
1308
- const len = $0.length;
1309
- return (f) => f.length === len && f !== "." && f !== "..";
1310
- };
1311
- var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
1312
- var path = {
1313
- win32: { sep: "\\" },
1314
- posix: { sep: "/" }
1315
- };
1316
- var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
1317
- minimatch.sep = sep;
1318
- var GLOBSTAR = Symbol("globstar **");
1319
- minimatch.GLOBSTAR = GLOBSTAR;
1320
- var qmark2 = "[^/]";
1321
- var star2 = qmark2 + "*?";
1322
- var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1323
- var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
1324
- var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
1325
- minimatch.filter = filter;
1326
- var ext = (a, b = {}) => Object.assign({}, a, b);
1327
- var defaults = (def) => {
1328
- if (!def || typeof def !== "object" || !Object.keys(def).length) {
1329
- return minimatch;
1330
- }
1331
- const orig = minimatch;
1332
- const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
1333
- return Object.assign(m, {
1334
- Minimatch: class Minimatch extends orig.Minimatch {
1335
- constructor(pattern, options = {}) {
1336
- super(pattern, ext(def, options));
1337
- }
1338
- static defaults(options) {
1339
- return orig.defaults(ext(def, options)).Minimatch;
1340
- }
1341
- },
1342
- AST: class AST extends orig.AST {
1343
- /* c8 ignore start */
1344
- constructor(type, parent, options = {}) {
1345
- super(type, parent, ext(def, options));
1346
- }
1347
- /* c8 ignore stop */
1348
- static fromGlob(pattern, options = {}) {
1349
- return orig.AST.fromGlob(pattern, ext(def, options));
1350
- }
1351
- },
1352
- unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
1353
- escape: (s, options = {}) => orig.escape(s, ext(def, options)),
1354
- filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
1355
- defaults: (options) => orig.defaults(ext(def, options)),
1356
- makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
1357
- braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
1358
- match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
1359
- sep: orig.sep,
1360
- GLOBSTAR
1361
- });
1362
- };
1363
- minimatch.defaults = defaults;
1364
- var braceExpand = (pattern, options = {}) => {
1365
- assertValidPattern(pattern);
1366
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
1367
- return [pattern];
1368
- }
1369
- return (0, import_brace_expansion.default)(pattern);
1370
- };
1371
- minimatch.braceExpand = braceExpand;
1372
- var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
1373
- minimatch.makeRe = makeRe;
1374
- var match = (list, pattern, options = {}) => {
1375
- const mm = new Minimatch(pattern, options);
1376
- list = list.filter((f) => mm.match(f));
1377
- if (mm.options.nonull && !list.length) {
1378
- list.push(pattern);
1379
- }
1380
- return list;
1381
- };
1382
- minimatch.match = match;
1383
- var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
1384
- var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1385
- var Minimatch = class {
1386
- options;
1387
- set;
1388
- pattern;
1389
- windowsPathsNoEscape;
1390
- nonegate;
1391
- negate;
1392
- comment;
1393
- empty;
1394
- preserveMultipleSlashes;
1395
- partial;
1396
- globSet;
1397
- globParts;
1398
- nocase;
1399
- isWindows;
1400
- platform;
1401
- windowsNoMagicRoot;
1402
- regexp;
1403
- constructor(pattern, options = {}) {
1404
- assertValidPattern(pattern);
1405
- options = options || {};
1406
- this.options = options;
1407
- this.pattern = pattern;
1408
- this.platform = options.platform || defaultPlatform;
1409
- this.isWindows = this.platform === "win32";
1410
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
1411
- if (this.windowsPathsNoEscape) {
1412
- this.pattern = this.pattern.replace(/\\/g, "/");
1413
- }
1414
- this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
1415
- this.regexp = null;
1416
- this.negate = false;
1417
- this.nonegate = !!options.nonegate;
1418
- this.comment = false;
1419
- this.empty = false;
1420
- this.partial = !!options.partial;
1421
- this.nocase = !!this.options.nocase;
1422
- this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
1423
- this.globSet = [];
1424
- this.globParts = [];
1425
- this.set = [];
1426
- this.make();
1427
- }
1428
- hasMagic() {
1429
- if (this.options.magicalBraces && this.set.length > 1) {
1430
- return true;
1431
- }
1432
- for (const pattern of this.set) {
1433
- for (const part of pattern) {
1434
- if (typeof part !== "string")
1435
- return true;
1436
- }
1437
- }
1438
- return false;
1439
- }
1440
- debug(..._) {
1441
- }
1442
- make() {
1443
- const pattern = this.pattern;
1444
- const options = this.options;
1445
- if (!options.nocomment && pattern.charAt(0) === "#") {
1446
- this.comment = true;
1447
- return;
1448
- }
1449
- if (!pattern) {
1450
- this.empty = true;
1451
- return;
1452
- }
1453
- this.parseNegate();
1454
- this.globSet = [...new Set(this.braceExpand())];
1455
- if (options.debug) {
1456
- this.debug = (...args) => console.error(...args);
1457
- }
1458
- this.debug(this.pattern, this.globSet);
1459
- const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
1460
- this.globParts = this.preprocess(rawGlobParts);
1461
- this.debug(this.pattern, this.globParts);
1462
- let set = this.globParts.map((s, _, __) => {
1463
- if (this.isWindows && this.windowsNoMagicRoot) {
1464
- const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
1465
- const isDrive = /^[a-z]:/i.test(s[0]);
1466
- if (isUNC) {
1467
- return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
1468
- } else if (isDrive) {
1469
- return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
1470
- }
1471
- }
1472
- return s.map((ss) => this.parse(ss));
1473
- });
1474
- this.debug(this.pattern, set);
1475
- this.set = set.filter((s) => s.indexOf(false) === -1);
1476
- if (this.isWindows) {
1477
- for (let i2 = 0; i2 < this.set.length; i2++) {
1478
- const p = this.set[i2];
1479
- if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
1480
- p[2] = "?";
1481
- }
1482
- }
1483
- }
1484
- this.debug(this.pattern, this.set);
1485
- }
1486
- // various transforms to equivalent pattern sets that are
1487
- // faster to process in a filesystem walk. The goal is to
1488
- // eliminate what we can, and push all ** patterns as far
1489
- // to the right as possible, even if it increases the number
1490
- // of patterns that we have to process.
1491
- preprocess(globParts) {
1492
- if (this.options.noglobstar) {
1493
- for (let i2 = 0; i2 < globParts.length; i2++) {
1494
- for (let j = 0; j < globParts[i2].length; j++) {
1495
- if (globParts[i2][j] === "**") {
1496
- globParts[i2][j] = "*";
1497
- }
1498
- }
1499
- }
1500
- }
1501
- const { optimizationLevel = 1 } = this.options;
1502
- if (optimizationLevel >= 2) {
1503
- globParts = this.firstPhasePreProcess(globParts);
1504
- globParts = this.secondPhasePreProcess(globParts);
1505
- } else if (optimizationLevel >= 1) {
1506
- globParts = this.levelOneOptimize(globParts);
1507
- } else {
1508
- globParts = this.adjascentGlobstarOptimize(globParts);
1509
- }
1510
- return globParts;
1511
- }
1512
- // just get rid of adjascent ** portions
1513
- adjascentGlobstarOptimize(globParts) {
1514
- return globParts.map((parts) => {
1515
- let gs = -1;
1516
- while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1517
- let i2 = gs;
1518
- while (parts[i2 + 1] === "**") {
1519
- i2++;
1520
- }
1521
- if (i2 !== gs) {
1522
- parts.splice(gs, i2 - gs);
1523
- }
1524
- }
1525
- return parts;
1526
- });
1527
- }
1528
- // get rid of adjascent ** and resolve .. portions
1529
- levelOneOptimize(globParts) {
1530
- return globParts.map((parts) => {
1531
- parts = parts.reduce((set, part) => {
1532
- const prev = set[set.length - 1];
1533
- if (part === "**" && prev === "**") {
1534
- return set;
1535
- }
1536
- if (part === "..") {
1537
- if (prev && prev !== ".." && prev !== "." && prev !== "**") {
1538
- set.pop();
1539
- return set;
1540
- }
1541
- }
1542
- set.push(part);
1543
- return set;
1544
- }, []);
1545
- return parts.length === 0 ? [""] : parts;
1546
- });
1547
- }
1548
- levelTwoFileOptimize(parts) {
1549
- if (!Array.isArray(parts)) {
1550
- parts = this.slashSplit(parts);
1551
- }
1552
- let didSomething = false;
1553
- do {
1554
- didSomething = false;
1555
- if (!this.preserveMultipleSlashes) {
1556
- for (let i2 = 1; i2 < parts.length - 1; i2++) {
1557
- const p = parts[i2];
1558
- if (i2 === 1 && p === "" && parts[0] === "")
1559
- continue;
1560
- if (p === "." || p === "") {
1561
- didSomething = true;
1562
- parts.splice(i2, 1);
1563
- i2--;
1564
- }
1565
- }
1566
- if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1567
- didSomething = true;
1568
- parts.pop();
1569
- }
1570
- }
1571
- let dd = 0;
1572
- while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1573
- const p = parts[dd - 1];
1574
- if (p && p !== "." && p !== ".." && p !== "**") {
1575
- didSomething = true;
1576
- parts.splice(dd - 1, 2);
1577
- dd -= 2;
1578
- }
1579
- }
1580
- } while (didSomething);
1581
- return parts.length === 0 ? [""] : parts;
1582
- }
1583
- // First phase: single-pattern processing
1584
- // <pre> is 1 or more portions
1585
- // <rest> is 1 or more portions
1586
- // <p> is any portion other than ., .., '', or **
1587
- // <e> is . or ''
1588
- //
1589
- // **/.. is *brutal* for filesystem walking performance, because
1590
- // it effectively resets the recursive walk each time it occurs,
1591
- // and ** cannot be reduced out by a .. pattern part like a regexp
1592
- // or most strings (other than .., ., and '') can be.
1593
- //
1594
- // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
1595
- // <pre>/<e>/<rest> -> <pre>/<rest>
1596
- // <pre>/<p>/../<rest> -> <pre>/<rest>
1597
- // **/**/<rest> -> **/<rest>
1598
- //
1599
- // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
1600
- // this WOULD be allowed if ** did follow symlinks, or * didn't
1601
- firstPhasePreProcess(globParts) {
1602
- let didSomething = false;
1603
- do {
1604
- didSomething = false;
1605
- for (let parts of globParts) {
1606
- let gs = -1;
1607
- while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1608
- let gss = gs;
1609
- while (parts[gss + 1] === "**") {
1610
- gss++;
1611
- }
1612
- if (gss > gs) {
1613
- parts.splice(gs + 1, gss - gs);
1614
- }
1615
- let next = parts[gs + 1];
1616
- const p = parts[gs + 2];
1617
- const p2 = parts[gs + 3];
1618
- if (next !== "..")
1619
- continue;
1620
- if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
1621
- continue;
1622
- }
1623
- didSomething = true;
1624
- parts.splice(gs, 1);
1625
- const other = parts.slice(0);
1626
- other[gs] = "**";
1627
- globParts.push(other);
1628
- gs--;
1629
- }
1630
- if (!this.preserveMultipleSlashes) {
1631
- for (let i2 = 1; i2 < parts.length - 1; i2++) {
1632
- const p = parts[i2];
1633
- if (i2 === 1 && p === "" && parts[0] === "")
1634
- continue;
1635
- if (p === "." || p === "") {
1636
- didSomething = true;
1637
- parts.splice(i2, 1);
1638
- i2--;
1639
- }
1640
- }
1641
- if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1642
- didSomething = true;
1643
- parts.pop();
1644
- }
1645
- }
1646
- let dd = 0;
1647
- while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1648
- const p = parts[dd - 1];
1649
- if (p && p !== "." && p !== ".." && p !== "**") {
1650
- didSomething = true;
1651
- const needDot = dd === 1 && parts[dd + 1] === "**";
1652
- const splin = needDot ? ["."] : [];
1653
- parts.splice(dd - 1, 2, ...splin);
1654
- if (parts.length === 0)
1655
- parts.push("");
1656
- dd -= 2;
1657
- }
1658
- }
1659
- }
1660
- } while (didSomething);
1661
- return globParts;
1662
- }
1663
- // second phase: multi-pattern dedupes
1664
- // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
1665
- // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
1666
- // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
1667
- //
1668
- // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
1669
- // ^-- not valid because ** doens't follow symlinks
1670
- secondPhasePreProcess(globParts) {
1671
- for (let i2 = 0; i2 < globParts.length - 1; i2++) {
1672
- for (let j = i2 + 1; j < globParts.length; j++) {
1673
- const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
1674
- if (!matched)
1675
- continue;
1676
- globParts[i2] = matched;
1677
- globParts[j] = [];
1678
- }
1679
- }
1680
- return globParts.filter((gs) => gs.length);
1681
- }
1682
- partsMatch(a, b, emptyGSMatch = false) {
1683
- let ai = 0;
1684
- let bi = 0;
1685
- let result = [];
1686
- let which = "";
1687
- while (ai < a.length && bi < b.length) {
1688
- if (a[ai] === b[bi]) {
1689
- result.push(which === "b" ? b[bi] : a[ai]);
1690
- ai++;
1691
- bi++;
1692
- } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
1693
- result.push(a[ai]);
1694
- ai++;
1695
- } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
1696
- result.push(b[bi]);
1697
- bi++;
1698
- } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
1699
- if (which === "b")
1700
- return false;
1701
- which = "a";
1702
- result.push(a[ai]);
1703
- ai++;
1704
- bi++;
1705
- } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
1706
- if (which === "a")
1707
- return false;
1708
- which = "b";
1709
- result.push(b[bi]);
1710
- ai++;
1711
- bi++;
1712
- } else {
1713
- return false;
1714
- }
1715
- }
1716
- return a.length === b.length && result;
1717
- }
1718
- parseNegate() {
1719
- if (this.nonegate)
1720
- return;
1721
- const pattern = this.pattern;
1722
- let negate = false;
1723
- let negateOffset = 0;
1724
- for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
1725
- negate = !negate;
1726
- negateOffset++;
1727
- }
1728
- if (negateOffset)
1729
- this.pattern = pattern.slice(negateOffset);
1730
- this.negate = negate;
1731
- }
1732
- // set partial to true to test if, for example,
1733
- // "/a/b" matches the start of "/*/b/*/d"
1734
- // Partial means, if you run out of file before you run
1735
- // out of pattern, then that's fine, as long as all
1736
- // the parts match.
1737
- matchOne(file, pattern, partial = false) {
1738
- const options = this.options;
1739
- if (this.isWindows) {
1740
- const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1741
- const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1742
- const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1743
- const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1744
- const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1745
- const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1746
- if (typeof fdi === "number" && typeof pdi === "number") {
1747
- const [fd, pd] = [file[fdi], pattern[pdi]];
1748
- if (fd.toLowerCase() === pd.toLowerCase()) {
1749
- pattern[pdi] = fd;
1750
- if (pdi > fdi) {
1751
- pattern = pattern.slice(pdi);
1752
- } else if (fdi > pdi) {
1753
- file = file.slice(fdi);
1754
- }
1755
- }
1756
- }
1757
- }
1758
- const { optimizationLevel = 1 } = this.options;
1759
- if (optimizationLevel >= 2) {
1760
- file = this.levelTwoFileOptimize(file);
1761
- }
1762
- this.debug("matchOne", this, { file, pattern });
1763
- this.debug("matchOne", file.length, pattern.length);
1764
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1765
- this.debug("matchOne loop");
1766
- var p = pattern[pi];
1767
- var f = file[fi];
1768
- this.debug(pattern, p, f);
1769
- if (p === false) {
1770
- return false;
1771
- }
1772
- if (p === GLOBSTAR) {
1773
- this.debug("GLOBSTAR", [pattern, p, f]);
1774
- var fr = fi;
1775
- var pr = pi + 1;
1776
- if (pr === pl) {
1777
- this.debug("** at the end");
1778
- for (; fi < fl; fi++) {
1779
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
1780
- return false;
1781
- }
1782
- return true;
1783
- }
1784
- while (fr < fl) {
1785
- var swallowee = file[fr];
1786
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
1787
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
1788
- this.debug("globstar found match!", fr, fl, swallowee);
1789
- return true;
1790
- } else {
1791
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
1792
- this.debug("dot detected!", file, fr, pattern, pr);
1793
- break;
1794
- }
1795
- this.debug("globstar swallow a segment, and continue");
1796
- fr++;
1797
- }
1798
- }
1799
- if (partial) {
1800
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
1801
- if (fr === fl) {
1802
- return true;
1803
- }
1804
- }
1805
- return false;
1806
- }
1807
- let hit;
1808
- if (typeof p === "string") {
1809
- hit = f === p;
1810
- this.debug("string match", p, f, hit);
1811
- } else {
1812
- hit = p.test(f);
1813
- this.debug("pattern match", p, f, hit);
1814
- }
1815
- if (!hit)
1816
- return false;
1817
- }
1818
- if (fi === fl && pi === pl) {
1819
- return true;
1820
- } else if (fi === fl) {
1821
- return partial;
1822
- } else if (pi === pl) {
1823
- return fi === fl - 1 && file[fi] === "";
1824
- } else {
1825
- throw new Error("wtf?");
1826
- }
1827
- }
1828
- braceExpand() {
1829
- return braceExpand(this.pattern, this.options);
1830
- }
1831
- parse(pattern) {
1832
- assertValidPattern(pattern);
1833
- const options = this.options;
1834
- if (pattern === "**")
1835
- return GLOBSTAR;
1836
- if (pattern === "")
1837
- return "";
1838
- let m;
1839
- let fastTest = null;
1840
- if (m = pattern.match(starRE)) {
1841
- fastTest = options.dot ? starTestDot : starTest;
1842
- } else if (m = pattern.match(starDotExtRE)) {
1843
- fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
1844
- } else if (m = pattern.match(qmarksRE)) {
1845
- fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
1846
- } else if (m = pattern.match(starDotStarRE)) {
1847
- fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
1848
- } else if (m = pattern.match(dotStarRE)) {
1849
- fastTest = dotStarTest;
1850
- }
1851
- const re = AST.fromGlob(pattern, this.options).toMMPattern();
1852
- if (fastTest && typeof re === "object") {
1853
- Reflect.defineProperty(re, "test", { value: fastTest });
1854
- }
1855
- return re;
1856
- }
1857
- makeRe() {
1858
- if (this.regexp || this.regexp === false)
1859
- return this.regexp;
1860
- const set = this.set;
1861
- if (!set.length) {
1862
- this.regexp = false;
1863
- return this.regexp;
1864
- }
1865
- const options = this.options;
1866
- const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
1867
- const flags = new Set(options.nocase ? ["i"] : []);
1868
- let re = set.map((pattern) => {
1869
- const pp = pattern.map((p) => {
1870
- if (p instanceof RegExp) {
1871
- for (const f of p.flags.split(""))
1872
- flags.add(f);
1873
- }
1874
- return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
1875
- });
1876
- pp.forEach((p, i2) => {
1877
- const next = pp[i2 + 1];
1878
- const prev = pp[i2 - 1];
1879
- if (p !== GLOBSTAR || prev === GLOBSTAR) {
1880
- return;
1881
- }
1882
- if (prev === void 0) {
1883
- if (next !== void 0 && next !== GLOBSTAR) {
1884
- pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
1885
- } else {
1886
- pp[i2] = twoStar;
1887
- }
1888
- } else if (next === void 0) {
1889
- pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
1890
- } else if (next !== GLOBSTAR) {
1891
- pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
1892
- pp[i2 + 1] = GLOBSTAR;
1893
- }
1894
- });
1895
- return pp.filter((p) => p !== GLOBSTAR).join("/");
1896
- }).join("|");
1897
- const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
1898
- re = "^" + open + re + close + "$";
1899
- if (this.negate)
1900
- re = "^(?!" + re + ").+$";
1901
- try {
1902
- this.regexp = new RegExp(re, [...flags].join(""));
1903
- } catch (ex) {
1904
- this.regexp = false;
1905
- }
1906
- return this.regexp;
1907
- }
1908
- slashSplit(p) {
1909
- if (this.preserveMultipleSlashes) {
1910
- return p.split("/");
1911
- } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
1912
- return ["", ...p.split(/\/+/)];
1913
- } else {
1914
- return p.split(/\/+/);
1915
- }
1916
- }
1917
- match(f, partial = this.partial) {
1918
- this.debug("match", f, this.pattern);
1919
- if (this.comment) {
1920
- return false;
1921
- }
1922
- if (this.empty) {
1923
- return f === "";
1924
- }
1925
- if (f === "/" && partial) {
1926
- return true;
1927
- }
1928
- const options = this.options;
1929
- if (this.isWindows) {
1930
- f = f.split("\\").join("/");
1931
- }
1932
- const ff = this.slashSplit(f);
1933
- this.debug(this.pattern, "split", ff);
1934
- const set = this.set;
1935
- this.debug(this.pattern, "set", set);
1936
- let filename = ff[ff.length - 1];
1937
- if (!filename) {
1938
- for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
1939
- filename = ff[i2];
1940
- }
1941
- }
1942
- for (let i2 = 0; i2 < set.length; i2++) {
1943
- const pattern = set[i2];
1944
- let file = ff;
1945
- if (options.matchBase && pattern.length === 1) {
1946
- file = [filename];
1947
- }
1948
- const hit = this.matchOne(file, pattern, partial);
1949
- if (hit) {
1950
- if (options.flipNegate) {
1951
- return true;
1952
- }
1953
- return !this.negate;
1954
- }
1955
- }
1956
- if (options.flipNegate) {
1957
- return false;
1958
- }
1959
- return this.negate;
1960
- }
1961
- static defaults(def) {
1962
- return minimatch.defaults(def).Minimatch;
1963
- }
1964
- };
1965
- minimatch.AST = AST;
1966
- minimatch.Minimatch = Minimatch;
1967
- minimatch.escape = escape;
1968
- minimatch.unescape = unescape;
1969
-
1970
- // src/utils/query-nonce-meta-tag-content.ts
1971
- function queryNonceMetaTagContent(doc) {
1972
- var _a, _b, _c;
1973
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
1974
- }
1975
-
1976
- // src/utils/regular-expression.ts
1977
- var escapeRegExpSpecialCharacters = (text) => {
1978
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1979
- };
1980
-
1981
- // src/utils/remote-value.ts
1982
- var RemoteValue = class _RemoteValue {
1983
- /**
1984
- * Deserializes a LocalValue serialized object back to its original JavaScript representation
1985
- *
1986
- * @param serialized The serialized LocalValue object
1987
- * @returns The original JavaScript value/object
1988
- */
1989
- static fromLocalValue(serialized) {
1990
- const type = serialized[TYPE_CONSTANT];
1991
- const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
1992
- switch (type) {
1993
- case "string" /* String */:
1994
- return value;
1995
- case "boolean" /* Boolean */:
1996
- return value;
1997
- case "bigint" /* BigInt */:
1998
- return BigInt(value);
1999
- case "undefined" /* Undefined */:
2000
- return void 0;
2001
- case "null" /* Null */:
2002
- return null;
2003
- case "number" /* Number */:
2004
- if (value === "NaN") return NaN;
2005
- if (value === "-0") return -0;
2006
- if (value === "Infinity") return Infinity;
2007
- if (value === "-Infinity") return -Infinity;
2008
- return value;
2009
- case "array" /* Array */:
2010
- return value.map((item) => _RemoteValue.fromLocalValue(item));
2011
- case "date" /* Date */:
2012
- return new Date(value);
2013
- case "map" /* Map */:
2014
- const map2 = /* @__PURE__ */ new Map();
2015
- for (const [key, val] of value) {
2016
- const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
2017
- const deserializedValue = _RemoteValue.fromLocalValue(val);
2018
- map2.set(deserializedKey, deserializedValue);
2019
- }
2020
- return map2;
2021
- case "object" /* Object */:
2022
- const obj = {};
2023
- for (const [key, val] of value) {
2024
- obj[key] = _RemoteValue.fromLocalValue(val);
2025
- }
2026
- return obj;
2027
- case "regexp" /* RegularExpression */:
2028
- const { pattern, flags } = value;
2029
- return new RegExp(pattern, flags);
2030
- case "set" /* Set */:
2031
- const set = /* @__PURE__ */ new Set();
2032
- for (const item of value) {
2033
- set.add(_RemoteValue.fromLocalValue(item));
2034
- }
2035
- return set;
2036
- case "symbol" /* Symbol */:
2037
- return Symbol(value);
2038
- default:
2039
- throw new Error(`Unsupported type: ${type}`);
2040
- }
2041
- }
2042
- /**
2043
- * Utility method to deserialize multiple LocalValues at once
2044
- *
2045
- * @param serializedValues Array of serialized LocalValue objects
2046
- * @returns Array of deserialized JavaScript values
2047
- */
2048
- static fromLocalValueArray(serializedValues) {
2049
- return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
2050
- }
2051
- /**
2052
- * Verifies if the given object matches the structure of a serialized LocalValue
2053
- *
2054
- * @param obj Object to verify
2055
- * @returns boolean indicating if the object has LocalValue structure
2056
- */
2057
- static isLocalValueObject(obj) {
2058
- if (typeof obj !== "object" || obj === null) {
2059
- return false;
2060
- }
2061
- if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
2062
- return false;
2063
- }
2064
- const type = obj[TYPE_CONSTANT];
2065
- const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
2066
- if (!hasTypeProperty) {
317
+ let supportsListenerOptions2 = false;
318
+ try {
319
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
320
+ "e",
321
+ null,
322
+ Object.defineProperty({}, "passive", {
323
+ get() {
324
+ supportsListenerOptions2 = true;
325
+ }
326
+ })
327
+ );
328
+ } catch (e) {
329
+ }
330
+ return supportsListenerOptions2;
331
+ })();
332
+ var promiseResolve = (v) => Promise.resolve(v);
333
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
334
+ try {
335
+ if (!win.document.adoptedStyleSheets) {
2067
336
  return false;
2068
337
  }
2069
- if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
2070
- return obj.hasOwnProperty(VALUE_CONSTANT);
2071
- }
2072
- return true;
338
+ new CSSStyleSheet();
339
+ return typeof new CSSStyleSheet().replaceSync === "function";
340
+ } catch (e) {
2073
341
  }
2074
- };
2075
-
2076
- // src/utils/result.ts
2077
- var result_exports = {};
2078
- __export(result_exports, {
2079
- err: () => err,
2080
- map: () => map,
2081
- ok: () => ok,
2082
- unwrap: () => unwrap,
2083
- unwrapErr: () => unwrapErr
2084
- });
2085
- var ok = (value) => ({
2086
- isOk: true,
2087
- isErr: false,
2088
- value
2089
- });
2090
- var err = (value) => ({
2091
- isOk: false,
2092
- isErr: true,
2093
- value
2094
- });
2095
- function map(result, fn) {
2096
- if (result.isOk) {
2097
- const val = fn(result.value);
2098
- if (val instanceof Promise) {
2099
- return val.then((newVal) => ok(newVal));
342
+ return false;
343
+ })() ;
344
+ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
345
+ var queuePending = false;
346
+ var queueDomReads = [];
347
+ var queueDomWrites = [];
348
+ var queueTask = (queue, write) => (cb) => {
349
+ queue.push(cb);
350
+ if (!queuePending) {
351
+ queuePending = true;
352
+ if (write && plt.$flags$ & 4 /* queueSync */) {
353
+ nextTick(flush);
2100
354
  } else {
2101
- return ok(val);
355
+ plt.raf(flush);
2102
356
  }
2103
357
  }
2104
- if (result.isErr) {
2105
- const value = result.value;
2106
- return err(value);
2107
- }
2108
- throw "should never get here";
2109
- }
2110
- var unwrap = (result) => {
2111
- if (result.isOk) {
2112
- return result.value;
2113
- } else {
2114
- throw result.value;
2115
- }
2116
358
  };
2117
- var unwrapErr = (result) => {
2118
- if (result.isErr) {
2119
- return result.value;
2120
- } else {
2121
- throw result.value;
359
+ var consume = (queue) => {
360
+ for (let i2 = 0; i2 < queue.length; i2++) {
361
+ try {
362
+ queue[i2](performance.now());
363
+ } catch (e) {
364
+ consoleError(e);
365
+ }
2122
366
  }
367
+ queue.length = 0;
2123
368
  };
2124
-
2125
- // src/utils/serialize.ts
2126
- function deserializeProperty(value) {
2127
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
2128
- return value;
369
+ var flush = () => {
370
+ consume(queueDomReads);
371
+ {
372
+ consume(queueDomWrites);
373
+ if (queuePending = queueDomReads.length > 0) {
374
+ plt.raf(flush);
375
+ }
2129
376
  }
2130
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
2131
- }
377
+ };
378
+ var nextTick = (cb) => promiseResolve().then(cb);
379
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
2132
380
 
2133
381
  // src/utils/style.ts
2134
382
  function createStyleSheetIfNeededAndSupported(styles2) {
@@ -2318,6 +566,14 @@ var uniqueTime = (key, measureText) => {
2318
566
  };
2319
567
  }
2320
568
  };
569
+
570
+ // src/utils/query-nonce-meta-tag-content.ts
571
+ function queryNonceMetaTagContent(doc) {
572
+ var _a, _b, _c;
573
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
574
+ }
575
+
576
+ // src/runtime/styles.ts
2321
577
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2322
578
  var registerStyle = (scopeId2, cssText, allowCS) => {
2323
579
  let style = styles.get(scopeId2);
@@ -2351,10 +607,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2351
607
  }
2352
608
  const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
2353
609
  if (existingStyleElm) {
2354
- existingStyleElm.innerHTML = style;
610
+ existingStyleElm.textContent = style;
2355
611
  } else if (!appliedStyles.has(scopeId2)) {
2356
612
  styleElm = win.document.createElement("style");
2357
- styleElm.innerHTML = style;
613
+ styleElm.textContent = style;
2358
614
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2359
615
  if (nonce != null) {
2360
616
  styleElm.setAttribute("nonce", nonce);
@@ -2379,8 +635,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2379
635
  }
2380
636
  } else {
2381
637
  const existingStyleContainer = styleContainerNode.querySelector("style");
2382
- if (existingStyleContainer) {
2383
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
638
+ if (existingStyleContainer && true) {
639
+ existingStyleContainer.textContent = style + existingStyleContainer.textContent;
2384
640
  } else {
2385
641
  styleContainerNode.prepend(styleElm);
2386
642
  }
@@ -2393,7 +649,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2393
649
  styleContainerNode.insertBefore(styleElm, null);
2394
650
  }
2395
651
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2396
- styleElm.innerHTML += SLOT_FB_CSS;
652
+ styleElm.textContent += SLOT_FB_CSS;
2397
653
  }
2398
654
  if (appliedStyles) {
2399
655
  appliedStyles.add(scopeId2);
@@ -2421,6 +677,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2421
677
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
2422
678
  }
2423
679
  appliedStyles.add(scopeId2);
680
+ if ("host" in styleContainerNode) {
681
+ const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
682
+ if (ssrStyleElm) {
683
+ writeTask(() => ssrStyleElm.remove());
684
+ }
685
+ }
2424
686
  }
2425
687
  }
2426
688
  }
@@ -2452,6 +714,12 @@ var hydrateScopedToShadow = () => {
2452
714
  registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2453
715
  }
2454
716
  };
717
+ var isComplexType = (o) => {
718
+ o = typeof o;
719
+ return o === "object" || o === "function";
720
+ };
721
+
722
+ // src/runtime/vdom/h.ts
2455
723
  var h = (nodeName, vnodeData, ...children) => {
2456
724
  if (typeof nodeName === "string") {
2457
725
  nodeName = transformTag(nodeName);
@@ -2519,7 +787,8 @@ var newVNode = (tag, text) => {
2519
787
  const vnode = {
2520
788
  $flags$: 0,
2521
789
  $tag$: tag,
2522
- $text$: text,
790
+ // Normalize undefined to null to prevent rendering "undefined" as text
791
+ $text$: text != null ? text : null,
2523
792
  $elm$: null,
2524
793
  $children$: null
2525
794
  };
@@ -2613,7 +882,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
2613
882
  cmpMeta.$cmpMeta$);
2614
883
  const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
2615
884
  if (styleSheet) {
2616
- hostElm.shadowRoot.append(styleSheet.cloneNode(true));
885
+ shadowRootNodes.unshift(styleSheet.cloneNode(true));
2617
886
  }
2618
887
  }
2619
888
  }
@@ -2683,7 +952,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
2683
952
  currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
2684
953
  }
2685
954
  }
2686
- if (shadowRoot) {
955
+ if (shadowRoot && !shadowRoot.childNodes.length) {
2687
956
  let rnIdex = 0;
2688
957
  const rnLen = shadowRootNodes.length;
2689
958
  if (rnLen) {
@@ -2957,18 +1226,111 @@ var findCorrespondingNode = (node, type) => {
2957
1226
  } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
2958
1227
  return sibling;
2959
1228
  };
2960
- var createSupportsRuleRe = (selector) => {
2961
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
2962
- return new RegExp(
2963
- // First capture group: match any context before the selector that's not inside @supports selector()
2964
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
2965
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
2966
- "g"
2967
- );
1229
+
1230
+ // src/utils/remote-value.ts
1231
+ var RemoteValue = class _RemoteValue {
1232
+ /**
1233
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
1234
+ *
1235
+ * @param serialized The serialized LocalValue object
1236
+ * @returns The original JavaScript value/object
1237
+ */
1238
+ static fromLocalValue(serialized) {
1239
+ const type = serialized[TYPE_CONSTANT];
1240
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
1241
+ switch (type) {
1242
+ case "string" /* String */:
1243
+ return value;
1244
+ case "boolean" /* Boolean */:
1245
+ return value;
1246
+ case "bigint" /* BigInt */:
1247
+ return BigInt(value);
1248
+ case "undefined" /* Undefined */:
1249
+ return void 0;
1250
+ case "null" /* Null */:
1251
+ return null;
1252
+ case "number" /* Number */:
1253
+ if (value === "NaN") return NaN;
1254
+ if (value === "-0") return -0;
1255
+ if (value === "Infinity") return Infinity;
1256
+ if (value === "-Infinity") return -Infinity;
1257
+ return value;
1258
+ case "array" /* Array */:
1259
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
1260
+ case "date" /* Date */:
1261
+ return new Date(value);
1262
+ case "map" /* Map */:
1263
+ const map = /* @__PURE__ */ new Map();
1264
+ for (const [key, val] of value) {
1265
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
1266
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
1267
+ map.set(deserializedKey, deserializedValue);
1268
+ }
1269
+ return map;
1270
+ case "object" /* Object */:
1271
+ const obj = {};
1272
+ for (const [key, val] of value) {
1273
+ obj[key] = _RemoteValue.fromLocalValue(val);
1274
+ }
1275
+ return obj;
1276
+ case "regexp" /* RegularExpression */:
1277
+ const { pattern, flags } = value;
1278
+ return new RegExp(pattern, flags);
1279
+ case "set" /* Set */:
1280
+ const set = /* @__PURE__ */ new Set();
1281
+ for (const item of value) {
1282
+ set.add(_RemoteValue.fromLocalValue(item));
1283
+ }
1284
+ return set;
1285
+ case "symbol" /* Symbol */:
1286
+ return Symbol(value);
1287
+ default:
1288
+ throw new Error(`Unsupported type: ${type}`);
1289
+ }
1290
+ }
1291
+ /**
1292
+ * Utility method to deserialize multiple LocalValues at once
1293
+ *
1294
+ * @param serializedValues Array of serialized LocalValue objects
1295
+ * @returns Array of deserialized JavaScript values
1296
+ */
1297
+ static fromLocalValueArray(serializedValues) {
1298
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
1299
+ }
1300
+ /**
1301
+ * Verifies if the given object matches the structure of a serialized LocalValue
1302
+ *
1303
+ * @param obj Object to verify
1304
+ * @returns boolean indicating if the object has LocalValue structure
1305
+ */
1306
+ static isLocalValueObject(obj) {
1307
+ if (typeof obj !== "object" || obj === null) {
1308
+ return false;
1309
+ }
1310
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
1311
+ return false;
1312
+ }
1313
+ const type = obj[TYPE_CONSTANT];
1314
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
1315
+ if (!hasTypeProperty) {
1316
+ return false;
1317
+ }
1318
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
1319
+ return obj.hasOwnProperty(VALUE_CONSTANT);
1320
+ }
1321
+ return true;
1322
+ }
2968
1323
  };
2969
- createSupportsRuleRe("::slotted");
2970
- createSupportsRuleRe(":host");
2971
- createSupportsRuleRe(":host-context");
1324
+
1325
+ // src/utils/serialize.ts
1326
+ function deserializeProperty(value) {
1327
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
1328
+ return value;
1329
+ }
1330
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
1331
+ }
1332
+
1333
+ // src/runtime/parse-property-value.ts
2972
1334
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2973
1335
  if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2974
1336
  propValue = deserializeProperty(propValue);
@@ -3059,7 +1421,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
3059
1421
  }
3060
1422
  } else if (memberName === "key") ; else if (memberName === "ref") {
3061
1423
  if (newValue) {
3062
- newValue(elm);
1424
+ queueRefAttachment(newValue, elm);
3063
1425
  }
3064
1426
  } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
3065
1427
  if (memberName[2] === "-") {
@@ -3079,6 +1441,36 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
3079
1441
  plt.ael(elm, memberName, newValue, capture);
3080
1442
  }
3081
1443
  }
1444
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
1445
+ const propName = memberName.slice(5);
1446
+ let attrName;
1447
+ {
1448
+ const hostRef = getHostRef(elm);
1449
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
1450
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
1451
+ if (memberMeta && memberMeta[1]) {
1452
+ attrName = memberMeta[1];
1453
+ }
1454
+ }
1455
+ }
1456
+ if (!attrName) {
1457
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1458
+ }
1459
+ if (newValue == null || newValue === false) {
1460
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
1461
+ elm.removeAttribute(attrName);
1462
+ }
1463
+ } else {
1464
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
1465
+ }
1466
+ return;
1467
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
1468
+ const propName = memberName.slice(5);
1469
+ try {
1470
+ elm[propName] = newValue;
1471
+ } catch (e) {
1472
+ }
1473
+ return;
3082
1474
  } else {
3083
1475
  const isComplex = isComplexType(newValue);
3084
1476
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
@@ -3087,7 +1479,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
3087
1479
  const n = newValue == null ? "" : newValue;
3088
1480
  if (memberName === "list") {
3089
1481
  isProp = false;
3090
- } else if (oldValue == null || elm[memberName] != n) {
1482
+ } else if (oldValue == null || elm[memberName] !== n) {
3091
1483
  if (typeof elm.__lookupSetter__(memberName) === "function") {
3092
1484
  elm[memberName] = n;
3093
1485
  } else {
@@ -3185,6 +1577,8 @@ var useNativeShadowDom = false;
3185
1577
  var checkSlotFallbackVisibility = false;
3186
1578
  var checkSlotRelocate = false;
3187
1579
  var isSvgMode = false;
1580
+ var refCallbacksToRemove = [];
1581
+ var refCallbacksToAttach = [];
3188
1582
  var createElm = (oldParentVNode, newParentVNode, childIndex) => {
3189
1583
  var _a;
3190
1584
  const newVNode2 = newParentVNode.$children$[childIndex];
@@ -3207,7 +1601,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
3207
1601
  );
3208
1602
  }
3209
1603
  }
3210
- if (newVNode2.$text$ !== null) {
1604
+ if (newVNode2.$text$ != null) {
3211
1605
  elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
3212
1606
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
3213
1607
  elm = newVNode2.$elm$ = win.document.createTextNode("");
@@ -3219,9 +1613,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
3219
1613
  isSvgMode = newVNode2.$tag$ === "svg";
3220
1614
  }
3221
1615
  if (!win.document) {
3222
- throw new Error(
3223
- "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
3224
- );
1616
+ throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
3225
1617
  }
3226
1618
  elm = newVNode2.$elm$ = win.document.createElementNS(
3227
1619
  isSvgMode ? SVG_NS : HTML_NS,
@@ -3469,7 +1861,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
3469
1861
  const tag = newVNode2.$tag$;
3470
1862
  const text = newVNode2.$text$;
3471
1863
  let defaultHolder;
3472
- if (text === null) {
1864
+ if (text == null) {
3473
1865
  {
3474
1866
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
3475
1867
  }
@@ -3558,16 +1950,33 @@ var markSlotContentForRelocation = (elm) => {
3558
1950
  };
3559
1951
  var nullifyVNodeRefs = (vNode) => {
3560
1952
  {
3561
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1953
+ if (vNode.$attrs$ && vNode.$attrs$.ref) {
1954
+ refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
1955
+ }
3562
1956
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
3563
1957
  }
3564
1958
  };
1959
+ var queueRefAttachment = (refCallback, elm) => {
1960
+ {
1961
+ refCallbacksToAttach.push(() => refCallback(elm));
1962
+ }
1963
+ };
1964
+ var flushQueuedRefCallbacks = () => {
1965
+ {
1966
+ refCallbacksToRemove.forEach((cb) => cb());
1967
+ refCallbacksToRemove.length = 0;
1968
+ refCallbacksToAttach.forEach((cb) => cb());
1969
+ refCallbacksToAttach.length = 0;
1970
+ }
1971
+ };
3565
1972
  var insertBefore = (parent, newNode, reference, isInitialLoad) => {
3566
- if (typeof newNode["s-sn"] === "string") {
3567
- parent.insertBefore(newNode, reference);
3568
- const { slotNode } = findSlotFromSlottedNode(newNode);
3569
- if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
3570
- return newNode;
1973
+ {
1974
+ if (typeof newNode["s-sn"] === "string") {
1975
+ parent.insertBefore(newNode, reference);
1976
+ const { slotNode } = findSlotFromSlottedNode(newNode);
1977
+ if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
1978
+ return newNode;
1979
+ }
3571
1980
  }
3572
1981
  if (parent.__insertBefore) {
3573
1982
  return parent.__insertBefore(newNode, reference);
@@ -3703,6 +2112,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
3703
2112
  }
3704
2113
  }
3705
2114
  contentRef = void 0;
2115
+ flushQueuedRefCallbacks();
3706
2116
  };
3707
2117
 
3708
2118
  // src/runtime/update-component.ts
@@ -3771,8 +2181,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
3771
2181
  endSchedule();
3772
2182
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
3773
2183
  };
3774
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
3775
- console.error(err2);
2184
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
2185
+ console.error(err);
3776
2186
  fn();
3777
2187
  }) : fn();
3778
2188
  var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
@@ -3800,7 +2210,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
3800
2210
  if (childrenPromises.length === 0) {
3801
2211
  postUpdate();
3802
2212
  } else {
3803
- Promise.all(childrenPromises).then(postUpdate);
2213
+ Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
3804
2214
  hostRef.$flags$ |= 4 /* isWaitingForChildren */;
3805
2215
  childrenPromises.length = 0;
3806
2216
  }
@@ -3933,13 +2343,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
3933
2343
  });
3934
2344
  }
3935
2345
  }
3936
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2346
+ if (flags & 2 /* hasRendered */) {
3937
2347
  if (instance.componentShouldUpdate) {
3938
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2348
+ const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
2349
+ if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
3939
2350
  return;
3940
2351
  }
3941
2352
  }
3942
- scheduleUpdate(hostRef, false);
2353
+ if (!(flags & 16 /* isQueuedForUpdate */)) {
2354
+ scheduleUpdate(hostRef, false);
2355
+ }
3943
2356
  }
3944
2357
  }
3945
2358
  };
@@ -3963,7 +2376,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3963
2376
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
3964
2377
  members.map(([memberName, [memberFlags]]) => {
3965
2378
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
3966
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
2379
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
3967
2380
  if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
3968
2381
  if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
3969
2382
  if (flags & 1 /* isElementConstructor */ || !origGetter) {
@@ -4108,76 +2521,87 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
4108
2521
  // src/runtime/initialize-component.ts
4109
2522
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
4110
2523
  let Cstr;
4111
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
4112
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
4113
- const bundleId = cmpMeta.$lazyBundleId$;
4114
- if (bundleId) {
4115
- const CstrImport = loadModule(cmpMeta, hostRef);
4116
- if (CstrImport && "then" in CstrImport) {
4117
- const endLoad = uniqueTime();
4118
- Cstr = await CstrImport;
4119
- endLoad();
4120
- } else {
4121
- Cstr = CstrImport;
4122
- }
4123
- if (!Cstr) {
4124
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
4125
- }
4126
- if (!Cstr.isProxied) {
2524
+ try {
2525
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2526
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2527
+ const bundleId = cmpMeta.$lazyBundleId$;
2528
+ if (bundleId) {
2529
+ const CstrImport = loadModule(cmpMeta, hostRef);
2530
+ if (CstrImport && "then" in CstrImport) {
2531
+ const endLoad = uniqueTime();
2532
+ Cstr = await CstrImport;
2533
+ endLoad();
2534
+ } else {
2535
+ Cstr = CstrImport;
2536
+ }
2537
+ if (!Cstr) {
2538
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2539
+ }
2540
+ if (!Cstr.isProxied) {
2541
+ {
2542
+ cmpMeta.$watchers$ = Cstr.watchers;
2543
+ cmpMeta.$serializers$ = Cstr.serializers;
2544
+ cmpMeta.$deserializers$ = Cstr.deserializers;
2545
+ }
2546
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2547
+ Cstr.isProxied = true;
2548
+ }
2549
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
4127
2550
  {
4128
- cmpMeta.$watchers$ = Cstr.watchers;
4129
- cmpMeta.$serializers$ = Cstr.serializers;
4130
- cmpMeta.$deserializers$ = Cstr.deserializers;
2551
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
2552
+ }
2553
+ try {
2554
+ new Cstr(hostRef);
2555
+ } catch (e) {
2556
+ consoleError(e, elm);
2557
+ }
2558
+ {
2559
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
2560
+ }
2561
+ {
2562
+ hostRef.$flags$ |= 128 /* isWatchReady */;
2563
+ }
2564
+ endNewInstance();
2565
+ const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
2566
+ if (!needsDeferredCallback) {
2567
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
2568
+ } else {
2569
+ hostRef.$deferredConnectedCallback$ = true;
4131
2570
  }
4132
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
4133
- Cstr.isProxied = true;
4134
- }
4135
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
4136
- {
4137
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
4138
- }
4139
- try {
4140
- new Cstr(hostRef);
4141
- } catch (e) {
4142
- consoleError(e, elm);
4143
- }
4144
- {
4145
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
4146
- }
4147
- {
4148
- hostRef.$flags$ |= 128 /* isWatchReady */;
4149
- }
4150
- endNewInstance();
4151
- const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
4152
- if (!needsDeferredCallback) {
4153
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
4154
2571
  } else {
4155
- hostRef.$deferredConnectedCallback$ = true;
2572
+ Cstr = elm.constructor;
2573
+ const cmpTag = elm.localName;
2574
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2575
+ }
2576
+ if (Cstr && Cstr.style) {
2577
+ let style;
2578
+ if (typeof Cstr.style === "string") {
2579
+ style = Cstr.style;
2580
+ }
2581
+ const scopeId2 = getScopeId(cmpMeta);
2582
+ if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
2583
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2584
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2585
+ endRegisterStyles();
2586
+ }
4156
2587
  }
2588
+ }
2589
+ const ancestorComponent = hostRef.$ancestorComponent$;
2590
+ const schedule = () => scheduleUpdate(hostRef, true);
2591
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
2592
+ ancestorComponent["s-rc"].push(schedule);
4157
2593
  } else {
4158
- Cstr = elm.constructor;
4159
- const cmpTag = elm.localName;
4160
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2594
+ schedule();
4161
2595
  }
4162
- if (Cstr && Cstr.style) {
4163
- let style;
4164
- if (typeof Cstr.style === "string") {
4165
- style = Cstr.style;
4166
- }
4167
- const scopeId2 = getScopeId(cmpMeta);
4168
- if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
4169
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
4170
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
4171
- endRegisterStyles();
4172
- }
2596
+ } catch (e) {
2597
+ consoleError(e, elm);
2598
+ if (hostRef.$onRenderResolve$) {
2599
+ hostRef.$onRenderResolve$();
2600
+ hostRef.$onRenderResolve$ = void 0;
2601
+ }
2602
+ if (hostRef.$onReadyResolve$) {
2603
+ hostRef.$onReadyResolve$(elm);
4173
2604
  }
4174
- }
4175
- const ancestorComponent = hostRef.$ancestorComponent$;
4176
- const schedule = () => scheduleUpdate(hostRef, true);
4177
- if (ancestorComponent && ancestorComponent["s-rc"]) {
4178
- ancestorComponent["s-rc"].push(schedule);
4179
- } else {
4180
- schedule();
4181
2605
  }
4182
2606
  };
4183
2607
  var fireConnectedCallback = (instance, elm) => {
@@ -4225,7 +2649,7 @@ var connectedCallback = (elm) => {
4225
2649
  }
4226
2650
  if (cmpMeta.$members$) {
4227
2651
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
4228
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
2652
+ if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
4229
2653
  const value = elm[memberName];
4230
2654
  delete elm[memberName];
4231
2655
  elm[memberName] = value;