@webquark/core 0.0.1

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 (343) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/dom-CTqgGpWA.js +238 -0
  3. package/dist/cjs/index-CLlvFbDw.js +1774 -0
  4. package/dist/cjs/index-DGQOjEwT.js +33 -0
  5. package/dist/cjs/index.cjs.js +7 -0
  6. package/dist/cjs/loader.cjs.js +12 -0
  7. package/dist/cjs/q-button_3.cjs.entry.js +603 -0
  8. package/dist/cjs/q-card.cjs.entry.js +55 -0
  9. package/dist/cjs/q-carousel.cjs.entry.js +288 -0
  10. package/dist/cjs/q-circular-progress_2.cjs.entry.js +255 -0
  11. package/dist/cjs/q-data-table.cjs.entry.js +197 -0
  12. package/dist/cjs/q-dialog.cjs.entry.js +143 -0
  13. package/dist/cjs/q-dropdown.cjs.entry.js +348 -0
  14. package/dist/cjs/q-icon.cjs.entry.js +184 -0
  15. package/dist/cjs/q-quantity-selector.cjs.entry.js +178 -0
  16. package/dist/cjs/q-reel.cjs.entry.js +117 -0
  17. package/dist/cjs/q-sidepanel.cjs.entry.js +215 -0
  18. package/dist/cjs/q-step-diagram-item.cjs.entry.js +48 -0
  19. package/dist/cjs/q-step-diagram.cjs.entry.js +47 -0
  20. package/dist/cjs/q-syntax-box.cjs.entry.js +457 -0
  21. package/dist/cjs/q-textarea.cjs.entry.js +136 -0
  22. package/dist/cjs/q-thumbnail.cjs.entry.js +44 -0
  23. package/dist/cjs/q-toggle.cjs.entry.js +148 -0
  24. package/dist/cjs/webquark.cjs.js +24 -0
  25. package/dist/collection/assets/icons/braces.svg +14 -0
  26. package/dist/collection/assets/icons/check.svg +1 -0
  27. package/dist/collection/assets/icons/chevron-down.svg +1 -0
  28. package/dist/collection/assets/icons/chevron-left.svg +1 -0
  29. package/dist/collection/assets/icons/chevron-right.svg +1 -0
  30. package/dist/collection/assets/icons/chevron-up.svg +1 -0
  31. package/dist/collection/assets/icons/copy.svg +4 -0
  32. package/dist/collection/assets/icons/eye-off.svg +1 -0
  33. package/dist/collection/assets/icons/eye.svg +1 -0
  34. package/dist/collection/assets/icons/minus.svg +1 -0
  35. package/dist/collection/assets/icons/play.svg +1 -0
  36. package/dist/collection/assets/icons/plus.svg +1 -0
  37. package/dist/collection/assets/icons/search.svg +1 -0
  38. package/dist/collection/assets/icons/spinner.svg +1 -0
  39. package/dist/collection/assets/icons/trash-2.svg +1 -0
  40. package/dist/collection/assets/icons/x.svg +1 -0
  41. package/dist/collection/collection-manifest.json +32 -0
  42. package/dist/collection/components/button/button.css +174 -0
  43. package/dist/collection/components/button/button.js +358 -0
  44. package/dist/collection/components/card/card.css +96 -0
  45. package/dist/collection/components/card/card.js +147 -0
  46. package/dist/collection/components/carousel/carousel.css +177 -0
  47. package/dist/collection/components/carousel/carousel.js +467 -0
  48. package/dist/collection/components/circular-progress/circular-progress.css +85 -0
  49. package/dist/collection/components/circular-progress/circular-progress.js +122 -0
  50. package/dist/collection/components/data-table/data-table.css +219 -0
  51. package/dist/collection/components/data-table/data-table.js +481 -0
  52. package/dist/collection/components/dialog/dialog.css +240 -0
  53. package/dist/collection/components/dialog/dialog.js +481 -0
  54. package/dist/collection/components/dropdown/dropdown.css +292 -0
  55. package/dist/collection/components/dropdown/dropdown.js +606 -0
  56. package/dist/collection/components/icon/icon.css +39 -0
  57. package/dist/collection/components/icon/icon.js +297 -0
  58. package/dist/collection/components/input/input.css +276 -0
  59. package/dist/collection/components/input/input.js +609 -0
  60. package/dist/collection/components/quantity-selector/quantity-selector.css +131 -0
  61. package/dist/collection/components/quantity-selector/quantity-selector.js +361 -0
  62. package/dist/collection/components/reel/reel.css +185 -0
  63. package/dist/collection/components/reel/reel.js +214 -0
  64. package/dist/collection/components/scrollable/scrollable.css +122 -0
  65. package/dist/collection/components/scrollable/scrollable.js +536 -0
  66. package/dist/collection/components/sidepanel/sidepanel.css +371 -0
  67. package/dist/collection/components/sidepanel/sidepanel.js +460 -0
  68. package/dist/collection/components/step-diagram/step-diagram.css +21 -0
  69. package/dist/collection/components/step-diagram/step-diagram.js +74 -0
  70. package/dist/collection/components/step-diagram-item/step-diagram-item.css +253 -0
  71. package/dist/collection/components/step-diagram-item/step-diagram-item.js +131 -0
  72. package/dist/collection/components/syntax-box/syntax-box.css +206 -0
  73. package/dist/collection/components/syntax-box/syntax-box.js +534 -0
  74. package/dist/collection/components/textarea/textarea.css +83 -0
  75. package/dist/collection/components/textarea/textarea.js +461 -0
  76. package/dist/collection/components/thumbnail/thumbnail.css +109 -0
  77. package/dist/collection/components/thumbnail/thumbnail.js +171 -0
  78. package/dist/collection/components/toggle/toggle.css +212 -0
  79. package/dist/collection/components/toggle/toggle.js +390 -0
  80. package/dist/collection/components/tooltip/tooltip.css +65 -0
  81. package/dist/collection/components/tooltip/tooltip.js +249 -0
  82. package/dist/collection/index.js +10 -0
  83. package/dist/collection/playground/components/playground-code-preview/playground-code-preview.js +48 -0
  84. package/dist/collection/playground/components/playground-event-log/playground-event-log.js +63 -0
  85. package/dist/collection/playground/components/playground-header/playground-header.js +65 -0
  86. package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +74 -0
  87. package/dist/collection/playground/components/properties-panel/properties-panel.js +146 -0
  88. package/dist/collection/playground/components/properties-panel/property-row.js +31 -0
  89. package/dist/collection/playground/components/properties-panel/slot-row.js +27 -0
  90. package/dist/collection/playground/components/sandbox-viewport/sandbox-panel.js +334 -0
  91. package/dist/collection/playground/components/sandbox-viewport/sandbox-viewport.js +155 -0
  92. package/dist/collection/playground/components/sandbox-viewport/variant-card.js +86 -0
  93. package/dist/collection/playground/components/sandbox-viewport/viewport-tabs.js +39 -0
  94. package/dist/collection/playground/components/theme-designer/theme-designer.js +89 -0
  95. package/dist/collection/playground/components/theme-designer/token-row.js +70 -0
  96. package/dist/collection/playground/components/theme-designer/token-section.js +19 -0
  97. package/dist/collection/playground/dom-factory.js +76 -0
  98. package/dist/collection/playground/events.js +37 -0
  99. package/dist/collection/playground/logo.svg +8 -0
  100. package/dist/collection/playground/playground.bundled.js +2831 -0
  101. package/dist/collection/playground/playground.js +10 -0
  102. package/dist/collection/playground/state.js +158 -0
  103. package/dist/collection/playground/utils/color.js +26 -0
  104. package/dist/collection/playground/utils/dom.js +38 -0
  105. package/dist/collection/playground/utils/index.js +2 -0
  106. package/dist/collection/playground/views/q-button-view/q-button-view.js +6 -0
  107. package/dist/collection/playground/views/q-input-view/q-input-view.js +6 -0
  108. package/dist/collection/utils/dom.js +228 -0
  109. package/dist/collection/utils/formatter.js +177 -0
  110. package/dist/collection/utils/formatter.unit.test.js +53 -0
  111. package/dist/collection/utils/math.js +19 -0
  112. package/dist/collection/utils/syntax.js +110 -0
  113. package/dist/collection/utils/utils.js +28 -0
  114. package/dist/collection/utils/utils.unit.test.js +16 -0
  115. package/dist/components/index.d.ts +35 -0
  116. package/dist/components/index.js +1 -0
  117. package/dist/components/p-91lJS0-v.js +1 -0
  118. package/dist/components/p-B7e76DLW.js +1 -0
  119. package/dist/components/p-BCSpNDGG.js +1 -0
  120. package/dist/components/p-BRNv11Jn.js +1 -0
  121. package/dist/components/p-CYfD9z8O.js +1 -0
  122. package/dist/components/p-DfTW9B7V.js +1 -0
  123. package/dist/components/p-DgaKWrjd.js +1 -0
  124. package/dist/components/p-DoQvrOHk.js +1 -0
  125. package/dist/components/q-button.d.ts +11 -0
  126. package/dist/components/q-button.js +1 -0
  127. package/dist/components/q-card.d.ts +11 -0
  128. package/dist/components/q-card.js +1 -0
  129. package/dist/components/q-carousel.d.ts +11 -0
  130. package/dist/components/q-carousel.js +1 -0
  131. package/dist/components/q-circular-progress.d.ts +11 -0
  132. package/dist/components/q-circular-progress.js +1 -0
  133. package/dist/components/q-data-table.d.ts +11 -0
  134. package/dist/components/q-data-table.js +1 -0
  135. package/dist/components/q-dialog.d.ts +11 -0
  136. package/dist/components/q-dialog.js +1 -0
  137. package/dist/components/q-dropdown.d.ts +11 -0
  138. package/dist/components/q-dropdown.js +1 -0
  139. package/dist/components/q-icon.d.ts +11 -0
  140. package/dist/components/q-icon.js +1 -0
  141. package/dist/components/q-input.d.ts +11 -0
  142. package/dist/components/q-input.js +1 -0
  143. package/dist/components/q-quantity-selector.d.ts +11 -0
  144. package/dist/components/q-quantity-selector.js +1 -0
  145. package/dist/components/q-reel.d.ts +11 -0
  146. package/dist/components/q-reel.js +1 -0
  147. package/dist/components/q-scrollable.d.ts +11 -0
  148. package/dist/components/q-scrollable.js +1 -0
  149. package/dist/components/q-sidepanel.d.ts +11 -0
  150. package/dist/components/q-sidepanel.js +1 -0
  151. package/dist/components/q-step-diagram-item.d.ts +11 -0
  152. package/dist/components/q-step-diagram-item.js +1 -0
  153. package/dist/components/q-step-diagram.d.ts +11 -0
  154. package/dist/components/q-step-diagram.js +1 -0
  155. package/dist/components/q-syntax-box.d.ts +11 -0
  156. package/dist/components/q-syntax-box.js +1 -0
  157. package/dist/components/q-textarea.d.ts +11 -0
  158. package/dist/components/q-textarea.js +1 -0
  159. package/dist/components/q-thumbnail.d.ts +11 -0
  160. package/dist/components/q-thumbnail.js +1 -0
  161. package/dist/components/q-toggle.d.ts +11 -0
  162. package/dist/components/q-toggle.js +1 -0
  163. package/dist/components/q-tooltip.d.ts +11 -0
  164. package/dist/components/q-tooltip.js +1 -0
  165. package/dist/esm/dom-DoQvrOHk.js +230 -0
  166. package/dist/esm/index-BJiYCN3i.js +30 -0
  167. package/dist/esm/index-CYoQ4Zv3.js +1764 -0
  168. package/dist/esm/index.js +1 -0
  169. package/dist/esm/loader.js +10 -0
  170. package/dist/esm/q-button_3.entry.js +599 -0
  171. package/dist/esm/q-card.entry.js +53 -0
  172. package/dist/esm/q-carousel.entry.js +286 -0
  173. package/dist/esm/q-circular-progress_2.entry.js +252 -0
  174. package/dist/esm/q-data-table.entry.js +195 -0
  175. package/dist/esm/q-dialog.entry.js +141 -0
  176. package/dist/esm/q-dropdown.entry.js +346 -0
  177. package/dist/esm/q-icon.entry.js +182 -0
  178. package/dist/esm/q-quantity-selector.entry.js +176 -0
  179. package/dist/esm/q-reel.entry.js +115 -0
  180. package/dist/esm/q-sidepanel.entry.js +213 -0
  181. package/dist/esm/q-step-diagram-item.entry.js +46 -0
  182. package/dist/esm/q-step-diagram.entry.js +45 -0
  183. package/dist/esm/q-syntax-box.entry.js +455 -0
  184. package/dist/esm/q-textarea.entry.js +134 -0
  185. package/dist/esm/q-thumbnail.entry.js +42 -0
  186. package/dist/esm/q-toggle.entry.js +146 -0
  187. package/dist/esm/webquark.js +20 -0
  188. package/dist/index.cjs.js +1 -0
  189. package/dist/index.js +1 -0
  190. package/dist/loader/cdn.js +1 -0
  191. package/dist/loader/index.cjs.js +1 -0
  192. package/dist/loader/index.d.ts +24 -0
  193. package/dist/loader/index.es2017.js +1 -0
  194. package/dist/loader/index.js +2 -0
  195. package/dist/playground/assets/icons/braces.svg +14 -0
  196. package/dist/playground/assets/icons/check.svg +1 -0
  197. package/dist/playground/assets/icons/chevron-down.svg +1 -0
  198. package/dist/playground/assets/icons/chevron-left.svg +1 -0
  199. package/dist/playground/assets/icons/chevron-right.svg +1 -0
  200. package/dist/playground/assets/icons/chevron-up.svg +1 -0
  201. package/dist/playground/assets/icons/copy.svg +4 -0
  202. package/dist/playground/assets/icons/eye-off.svg +1 -0
  203. package/dist/playground/assets/icons/eye.svg +1 -0
  204. package/dist/playground/assets/icons/minus.svg +1 -0
  205. package/dist/playground/assets/icons/play.svg +1 -0
  206. package/dist/playground/assets/icons/plus.svg +1 -0
  207. package/dist/playground/assets/icons/search.svg +1 -0
  208. package/dist/playground/assets/icons/spinner.svg +1 -0
  209. package/dist/playground/assets/icons/trash-2.svg +1 -0
  210. package/dist/playground/assets/icons/x.svg +1 -0
  211. package/dist/playground/build/index.esm.js +1 -0
  212. package/dist/playground/build/p-095635d3.entry.js +1 -0
  213. package/dist/playground/build/p-1238a2cc.entry.js +1 -0
  214. package/dist/playground/build/p-389e2cd3.entry.js +1 -0
  215. package/dist/playground/build/p-4f133a25.entry.js +1 -0
  216. package/dist/playground/build/p-5c67a28e.entry.js +1 -0
  217. package/dist/playground/build/p-679fa494.entry.js +1 -0
  218. package/dist/playground/build/p-6dc7b987.entry.js +1 -0
  219. package/dist/playground/build/p-7083c5ff.entry.js +1 -0
  220. package/dist/playground/build/p-7f47861b.entry.js +1 -0
  221. package/dist/playground/build/p-8a94a0a2.entry.js +1 -0
  222. package/dist/playground/build/p-9afa3fe8.entry.js +1 -0
  223. package/dist/playground/build/p-9bb8ed97.entry.js +1 -0
  224. package/dist/playground/build/p-BJiYCN3i.js +1 -0
  225. package/dist/playground/build/p-CYoQ4Zv3.js +2 -0
  226. package/dist/playground/build/p-DoQvrOHk.js +1 -0
  227. package/dist/playground/build/p-aa9be919.entry.js +1 -0
  228. package/dist/playground/build/p-b1e68119.entry.js +1 -0
  229. package/dist/playground/build/p-c8d6af8e.entry.js +1 -0
  230. package/dist/playground/build/p-f48dd3dd.entry.js +1 -0
  231. package/dist/playground/build/p-f7b5b155.entry.js +1 -0
  232. package/dist/playground/build/webquark.css +1 -0
  233. package/dist/playground/build/webquark.esm.js +1 -0
  234. package/dist/playground/build/webquark.js +33 -0
  235. package/dist/playground/css/base.css +145 -0
  236. package/dist/playground/host.config.json +15 -0
  237. package/dist/playground/index.html +29 -0
  238. package/dist/playground/logo.svg +8 -0
  239. package/dist/playground/playground/components.manifest.json +20 -0
  240. package/dist/playground/playground/specs/q-button.sandbox.json +198 -0
  241. package/dist/playground/playground/specs/q-card.sandbox.json +144 -0
  242. package/dist/playground/playground/specs/q-carousel.sandbox.json +120 -0
  243. package/dist/playground/playground/specs/q-circular-progress.sandbox.json +91 -0
  244. package/dist/playground/playground/specs/q-data-table.sandbox.json +108 -0
  245. package/dist/playground/playground/specs/q-dialog.sandbox.json +108 -0
  246. package/dist/playground/playground/specs/q-dropdown.sandbox.json +116 -0
  247. package/dist/playground/playground/specs/q-icon.sandbox.json +138 -0
  248. package/dist/playground/playground/specs/q-input.sandbox.json +192 -0
  249. package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +99 -0
  250. package/dist/playground/playground/specs/q-reel.sandbox.json +70 -0
  251. package/dist/playground/playground/specs/q-scrollable.sandbox.json +102 -0
  252. package/dist/playground/playground/specs/q-sidepanel.sandbox.json +147 -0
  253. package/dist/playground/playground/specs/q-step-diagram.sandbox.json +56 -0
  254. package/dist/playground/playground/specs/q-syntax-box.sandbox.json +160 -0
  255. package/dist/playground/playground/specs/q-textarea.sandbox.json +133 -0
  256. package/dist/playground/playground/specs/q-toggle.sandbox.json +196 -0
  257. package/dist/playground/playground/specs/q-tooltip.sandbox.json +65 -0
  258. package/dist/playground/playground.css +1 -0
  259. package/dist/playground/playground.js +2831 -0
  260. package/dist/playground/views/q-button-view/q-button-view.css +1 -0
  261. package/dist/playground/views/q-button-view/q-button-view.html +1 -0
  262. package/dist/playground/views/q-button-view/q-button-view.js +6 -0
  263. package/dist/playground/views/q-input-view/q-input-view.css +1 -0
  264. package/dist/playground/views/q-input-view/q-input-view.html +1 -0
  265. package/dist/playground/views/q-input-view/q-input-view.js +6 -0
  266. package/dist/types/components/button/button.d.ts +26 -0
  267. package/dist/types/components/card/card.d.ts +12 -0
  268. package/dist/types/components/carousel/carousel.d.ts +44 -0
  269. package/dist/types/components/circular-progress/circular-progress.d.ts +7 -0
  270. package/dist/types/components/data-table/data-table.d.ts +45 -0
  271. package/dist/types/components/dialog/dialog.d.ts +35 -0
  272. package/dist/types/components/dropdown/dropdown.d.ts +49 -0
  273. package/dist/types/components/icon/icon.d.ts +33 -0
  274. package/dist/types/components/input/input.d.ts +43 -0
  275. package/dist/types/components/quantity-selector/quantity-selector.d.ts +31 -0
  276. package/dist/types/components/reel/reel.d.ts +23 -0
  277. package/dist/types/components/scrollable/scrollable.d.ts +47 -0
  278. package/dist/types/components/sidepanel/sidepanel.d.ts +58 -0
  279. package/dist/types/components/step-diagram/step-diagram.d.ts +10 -0
  280. package/dist/types/components/step-diagram-item/step-diagram-item.d.ts +12 -0
  281. package/dist/types/components/syntax-box/syntax-box.d.ts +37 -0
  282. package/dist/types/components/textarea/textarea.d.ts +36 -0
  283. package/dist/types/components/thumbnail/thumbnail.d.ts +18 -0
  284. package/dist/types/components/toggle/toggle.d.ts +36 -0
  285. package/dist/types/components/tooltip/tooltip.d.ts +29 -0
  286. package/dist/types/components.d.ts +1752 -0
  287. package/dist/types/declarations.d.ts +9 -0
  288. package/dist/types/index.d.ts +11 -0
  289. package/dist/types/playground/components/playground-code-preview/playground-code-preview.d.ts +9 -0
  290. package/dist/types/playground/components/playground-event-log/playground-event-log.d.ts +11 -0
  291. package/dist/types/playground/components/playground-header/playground-header.d.ts +10 -0
  292. package/dist/types/playground/components/playground-sidebar/playground-sidebar.d.ts +11 -0
  293. package/dist/types/playground/components/properties-panel/properties-panel.d.ts +15 -0
  294. package/dist/types/playground/components/properties-panel/property-row.d.ts +6 -0
  295. package/dist/types/playground/components/properties-panel/slot-row.d.ts +7 -0
  296. package/dist/types/playground/components/sandbox-viewport/sandbox-panel.d.ts +15 -0
  297. package/dist/types/playground/components/sandbox-viewport/sandbox-viewport.d.ts +14 -0
  298. package/dist/types/playground/components/sandbox-viewport/variant-card.d.ts +7 -0
  299. package/dist/types/playground/components/sandbox-viewport/viewport-tabs.d.ts +5 -0
  300. package/dist/types/playground/components/theme-designer/theme-designer.d.ts +15 -0
  301. package/dist/types/playground/components/theme-designer/token-row.d.ts +13 -0
  302. package/dist/types/playground/components/theme-designer/token-section.d.ts +7 -0
  303. package/dist/types/playground/dom-factory.d.ts +12 -0
  304. package/dist/types/playground/events.d.ts +24 -0
  305. package/dist/types/playground/playground.d.ts +7 -0
  306. package/dist/types/playground/state.d.ts +44 -0
  307. package/dist/types/playground/utils/color.d.ts +8 -0
  308. package/dist/types/playground/utils/dom.d.ts +15 -0
  309. package/dist/types/playground/utils/index.d.ts +2 -0
  310. package/dist/types/stencil-public-runtime.d.ts +1861 -0
  311. package/dist/types/utils/dom.d.ts +68 -0
  312. package/dist/types/utils/formatter.d.ts +24 -0
  313. package/dist/types/utils/formatter.unit.test.d.ts +1 -0
  314. package/dist/types/utils/math.d.ts +10 -0
  315. package/dist/types/utils/syntax.d.ts +9 -0
  316. package/dist/types/utils/utils.d.ts +11 -0
  317. package/dist/types/utils/utils.unit.test.d.ts +1 -0
  318. package/dist/webquark/index.esm.js +1 -0
  319. package/dist/webquark/p-095635d3.entry.js +1 -0
  320. package/dist/webquark/p-1238a2cc.entry.js +1 -0
  321. package/dist/webquark/p-389e2cd3.entry.js +1 -0
  322. package/dist/webquark/p-4f133a25.entry.js +1 -0
  323. package/dist/webquark/p-5c67a28e.entry.js +1 -0
  324. package/dist/webquark/p-679fa494.entry.js +1 -0
  325. package/dist/webquark/p-6dc7b987.entry.js +1 -0
  326. package/dist/webquark/p-7083c5ff.entry.js +1 -0
  327. package/dist/webquark/p-7f47861b.entry.js +1 -0
  328. package/dist/webquark/p-8a94a0a2.entry.js +1 -0
  329. package/dist/webquark/p-9afa3fe8.entry.js +1 -0
  330. package/dist/webquark/p-9bb8ed97.entry.js +1 -0
  331. package/dist/webquark/p-BJiYCN3i.js +1 -0
  332. package/dist/webquark/p-CYoQ4Zv3.js +2 -0
  333. package/dist/webquark/p-DoQvrOHk.js +1 -0
  334. package/dist/webquark/p-aa9be919.entry.js +1 -0
  335. package/dist/webquark/p-b1e68119.entry.js +1 -0
  336. package/dist/webquark/p-c8d6af8e.entry.js +1 -0
  337. package/dist/webquark/p-f48dd3dd.entry.js +1 -0
  338. package/dist/webquark/p-f7b5b155.entry.js +1 -0
  339. package/dist/webquark/webquark.css +1 -0
  340. package/dist/webquark/webquark.esm.js +1 -0
  341. package/package.json +84 -0
  342. package/readme.md +79 -0
  343. package/scripts/webquark-serve.js +79 -0
@@ -0,0 +1,1774 @@
1
+ 'use strict';
2
+
3
+ const NAMESPACE = 'webquark';
4
+ const BUILD = /* webquark */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
5
+
6
+ const globalScripts = () => {};
7
+ const globalStyles = ":root{--q-color-primary:#60a5fa;--q-color-primary-hover:#93c5fd;--q-color-secondary:#9777ea;--q-color-success:#34d399;--q-color-warning:#fbbf24;--q-color-danger:#f87171;--q-bg-base:#111827;--q-bg-surface-1:#1f2937;--q-bg-surface-2:#374151;--q-bg-surface-3:#4b5563;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(31, 41, 55, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.85);--q-fg-base:#f9fafb;--q-fg-muted:#9ca3af;--q-border-color:#374151;--q-glass-blur:12px;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.2);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.3);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.45);--q-glow-interactive:0 0 20px rgba(96, 165, 250, 0.3);--q-border-width:1px;--q-border:var(--q-border-width) solid var(--q-border-color);--q-focus-ring:2px solid var(--q-color-primary);--q-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;--q-font-size-sm:0.7rem;--q-font-size-base:0.9rem;--q-font-size-lg:1rem;--q-font-weight-normal:400;--q-font-weight-bold:600;--q-radius-sm:4px;--q-radius-md:7px;--q-radius-lg:11px;--q-padding-sm:4px;--q-padding-md:9px;--q-padding-lg:16px;--q-transition-fast:150ms ease;--q-transition-normal:250ms cubic-bezier(0.4, 0, 0.2, 1);--q-transition-slow:400ms cubic-bezier(0.4, 0, 0.2, 1);--q-hover-transform:translateY(-4px) scale(1.02);--q-btn-hover-overlay:color-mix(in srgb, var(--q-fg-base) 8%, transparent);--q-card-min-width:280px;--q-card-border:var(--q-border);--q-card-hover-transform:var(--q-hover-transform);--q-card-transition-duration:var(--q-transition-normal);--q-step-diag-line:2px solid var(--q-border-color);--q-step-diag-border:var(--q-border);--q-step-diag-icon-size:32px;--q-step-diag-item-gap:24px;--q-thumb-aspect-ratio:16 / 9;--q-thumb-border:var(--q-border);--q-thumb-hover-transform:var(--q-hover-transform);--q-thumb-overlay-bg:rgba(0, 0, 0, 0.4);--q-thumb-radius:var(--q-radius-md);--q-thumb-border-color:transparent;--q-thumb-glow:var(--q-glow-interactive);--q-reel-gap:12px;--q-reel-columns-desktop:repeat(auto-fill, minmax(200px, 1fr));--q-reel-columns-mobile:1fr;--q-lightbox-max-size:90vh;--q-carousel-gap:16px;--q-carousel-padding:24px 20px;--q-carousel-arrow-bg:var(--q-bg-overlay);--q-carousel-arrow-border:var(--q-border);--q-carousel-arrow-color:#ffffff;--q-carousel-arrow-size:40px;--q-carousel-indicator-gap:8px;--q-carousel-indicator-size:6px;--q-progress-size:120px;--q-progress-stroke-width:8px;--q-progress-linecap:round;--q-progress-track-color:var(--q-border-color);--q-progress-fill-color:var(--q-color-primary);--q-progress-font-size:var(--q-font-size-lg);--q-progress-font-weight:var(--q-font-weight-bold);--q-progress-animation-duration:1s;--q-btn-radius:var(--q-radius-md);--q-btn-font-size:var(--q-font-size-base);--q-btn-font-weight:var(--q-font-weight-bold);--q-btn-active-transform:scale(0.97);--q-btn-transition:all 150ms cubic-bezier(0.4, 0, 0.2, 1);--q-btn-padding-sm:6px 10px;--q-btn-padding-md:5px 8px;--q-btn-padding-lg:9px 16px;--q-field-bg:var(--q-bg-surface-2);--q-field-border:var(--q-border);--q-field-radius:var(--q-radius-md);--q-field-padding:10px 14px;--q-field-border-color-focus:var(--q-color-primary);--q-input-bg:var(--q-field-bg);--q-input-border:var(--q-field-border);--q-input-radius:var(--q-field-radius);--q-input-padding:var(--q-field-padding);--q-dropdown-bg:var(--q-field-bg);--q-dropdown-menu-bg:var(--q-bg-surface-3);--q-dropdown-border:var(--q-field-border);--q-dropdown-radius:var(--q-field-radius);--q-panel-bg:var(--q-bg-surface-1);--q-panel-border:var(--q-border);--q-panel-shadow:var(--q-shadow-high);--q-scrollbar-width:6px;--q-scrollbar-width-thin:thin;--q-scrollbar-track-color:transparent;--q-scrollbar-thumb-color:var(--q-border-color, #374151);--q-scrollbar-thumb-color-hover:var(--q-color-primary, #60a5fa);--q-scrollbar-radius:var(--q-radius-sm, 4px)}@media (prefers-color-scheme: light){:root{--q-color-primary:#3b82f6;--q-color-primary-hover:#2563eb;--q-color-secondary:#7c3aed;--q-color-success:#10b981;--q-color-warning:#f59e0b;--q-color-danger:#ef4444;--q-bg-base:#ffffff;--q-bg-surface-1:#f3f4f6;--q-bg-surface-2:#e5e7eb;--q-bg-surface-3:#d1d5db;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(255, 255, 255, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.6);--q-fg-base:#1f2937;--q-fg-muted:#4b5563;--q-border-color:#e5e7eb;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.05);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.08);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.12);--q-glow-interactive:0 0 20px rgba(59, 130, 246, 0.3)}}[data-theme='light']{--q-color-primary:#3b82f6;--q-color-primary-hover:#2563eb;--q-color-secondary:#7c3aed;--q-color-success:#10b981;--q-color-warning:#f59e0b;--q-color-danger:#ef4444;--q-bg-base:#ffffff;--q-bg-surface-1:#f3f4f6;--q-bg-surface-2:#e5e7eb;--q-bg-surface-3:#d1d5db;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(255, 255, 255, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.6);--q-fg-base:#1f2937;--q-fg-muted:#4b5563;--q-border-color:#e5e7eb;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.05);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.08);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.12);--q-glow-interactive:0 0 20px rgba(59, 130, 246, 0.3)}[data-theme='dark']{--q-color-primary:#60a5fa;--q-color-primary-hover:#93c5fd;--q-color-secondary:#9777ea;--q-color-success:#34d399;--q-color-warning:#fbbf24;--q-color-danger:#f87171;--q-bg-base:#111827;--q-bg-surface-1:#1f2937;--q-bg-surface-2:#374151;--q-bg-surface-3:#4b5563;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(31, 41, 55, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.85);--q-fg-base:#f9fafb;--q-fg-muted:#9ca3af;--q-border-color:#374151;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.2);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.3);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.45);--q-glow-interactive:0 0 20px rgba(96, 165, 250, 0.3)}";
8
+
9
+ /*
10
+ Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
11
+ */
12
+
13
+
14
+ // src/utils/constants.ts
15
+ var SVG_NS = "http://www.w3.org/2000/svg";
16
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
17
+
18
+ // src/utils/get-prop-descriptor.ts
19
+ function getPropertyDescriptor(obj, memberName, getOnly) {
20
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
21
+ while (obj && obj !== stopAt) {
22
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
23
+ if (desc && (!getOnly || desc.get)) return desc;
24
+ obj = Object.getPrototypeOf(obj);
25
+ }
26
+ return void 0;
27
+ }
28
+
29
+ // src/utils/es2022-rewire-class-members.ts
30
+ var reWireGetterSetter = (instance, hostRef) => {
31
+ var _a;
32
+ const cmpMeta = hostRef.$cmpMeta$;
33
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
34
+ members.map(([memberName, [memberFlags]]) => {
35
+ if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
36
+ const ogValue = instance[memberName];
37
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
38
+ if (ogDescriptor) {
39
+ Object.defineProperty(instance, memberName, {
40
+ get() {
41
+ return ogDescriptor.get.call(this);
42
+ },
43
+ set(newValue) {
44
+ ogDescriptor.set.call(this, newValue);
45
+ },
46
+ configurable: true,
47
+ enumerable: true
48
+ });
49
+ }
50
+ if (hostRef.$instanceValues$.has(memberName)) {
51
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
52
+ } else if (ogValue !== void 0) {
53
+ instance[memberName] = ogValue;
54
+ }
55
+ }
56
+ });
57
+ };
58
+
59
+ // src/client/client-host-ref.ts
60
+ var getHostRef = (ref) => {
61
+ if (ref.__stencil__getHostRef) {
62
+ return ref.__stencil__getHostRef();
63
+ }
64
+ return void 0;
65
+ };
66
+ var registerInstance = (lazyInstance, hostRef) => {
67
+ if (!hostRef) return;
68
+ lazyInstance.__stencil__getHostRef = () => hostRef;
69
+ hostRef.$lazyInstance$ = lazyInstance;
70
+ if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
71
+ reWireGetterSetter(lazyInstance, hostRef);
72
+ }
73
+ };
74
+ var registerHost = (hostElement, cmpMeta) => {
75
+ const hostRef = {
76
+ $flags$: 0,
77
+ $hostElement$: hostElement,
78
+ $cmpMeta$: cmpMeta,
79
+ $instanceValues$: /* @__PURE__ */ new Map(),
80
+ $serializerValues$: /* @__PURE__ */ new Map()
81
+ };
82
+ {
83
+ hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
84
+ }
85
+ {
86
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
87
+ hostElement["s-p"] = [];
88
+ hostElement["s-rc"] = [];
89
+ }
90
+ {
91
+ hostRef.$fetchedCbList$ = [];
92
+ }
93
+ const ref = hostRef;
94
+ hostElement.__stencil__getHostRef = () => ref;
95
+ return ref;
96
+ };
97
+ var isMemberInElement = (elm, memberName) => memberName in elm;
98
+ var consoleError = (e, el) => (0, console.error)(e, el);
99
+
100
+ // src/client/client-load-module.ts
101
+ var cmpModules = /* @__PURE__ */ new Map();
102
+ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
103
+ const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
104
+ const bundleId = cmpMeta.$lazyBundleId$;
105
+ if (!bundleId) {
106
+ return void 0;
107
+ }
108
+ const module = cmpModules.get(bundleId) ;
109
+ if (module) {
110
+ return module[exportName];
111
+ }
112
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
113
+ return import(
114
+ /* @vite-ignore */
115
+ /* webpackInclude: /\.entry\.js$/ */
116
+ /* webpackExclude: /\.system\.entry\.js$/ */
117
+ /* webpackMode: "lazy" */
118
+ `./${bundleId}.entry.js${""}`
119
+ ).then(
120
+ (importedModule) => {
121
+ {
122
+ cmpModules.set(bundleId, importedModule);
123
+ }
124
+ return importedModule[exportName];
125
+ },
126
+ (e) => {
127
+ consoleError(e, hostRef.$hostElement$);
128
+ }
129
+ );
130
+ };
131
+
132
+ // src/client/client-style.ts
133
+ var styles = /* @__PURE__ */ new Map();
134
+ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
135
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
136
+ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
137
+ "formAssociatedCallback",
138
+ "formResetCallback",
139
+ "formDisabledCallback",
140
+ "formStateRestoreCallback"
141
+ ];
142
+ var win = typeof window !== "undefined" ? window : {};
143
+ var plt = {
144
+ $flags$: 0,
145
+ $resourcesUrl$: "",
146
+ jmp: (h2) => h2(),
147
+ raf: (h2) => requestAnimationFrame(h2),
148
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
149
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
150
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
151
+ };
152
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
153
+ var _a;
154
+ let supportsListenerOptions2 = false;
155
+ try {
156
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
157
+ "e",
158
+ null,
159
+ Object.defineProperty({}, "passive", {
160
+ get() {
161
+ supportsListenerOptions2 = true;
162
+ }
163
+ })
164
+ );
165
+ } catch (e) {
166
+ }
167
+ return supportsListenerOptions2;
168
+ })();
169
+ var promiseResolve = (v) => Promise.resolve(v);
170
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
171
+ try {
172
+ if (!win.document.adoptedStyleSheets) {
173
+ return false;
174
+ }
175
+ new CSSStyleSheet();
176
+ return typeof new CSSStyleSheet().replaceSync === "function";
177
+ } catch (e) {
178
+ }
179
+ return false;
180
+ })() ;
181
+ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
182
+ var queuePending = false;
183
+ var queueDomReads = [];
184
+ var queueDomWrites = [];
185
+ var queueTask = (queue, write) => (cb) => {
186
+ queue.push(cb);
187
+ if (!queuePending) {
188
+ queuePending = true;
189
+ if (write && plt.$flags$ & 4 /* queueSync */) {
190
+ nextTick(flush);
191
+ } else {
192
+ plt.raf(flush);
193
+ }
194
+ }
195
+ };
196
+ var consume = (queue) => {
197
+ for (let i2 = 0; i2 < queue.length; i2++) {
198
+ try {
199
+ queue[i2](performance.now());
200
+ } catch (e) {
201
+ consoleError(e);
202
+ }
203
+ }
204
+ queue.length = 0;
205
+ };
206
+ var flush = () => {
207
+ consume(queueDomReads);
208
+ {
209
+ consume(queueDomWrites);
210
+ if (queuePending = queueDomReads.length > 0) {
211
+ plt.raf(flush);
212
+ }
213
+ }
214
+ };
215
+ var nextTick = (cb) => promiseResolve().then(cb);
216
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
217
+
218
+ // src/utils/style.ts
219
+ function createStyleSheetIfNeededAndSupported(styles2) {
220
+ if (!supportsConstructableStylesheets) return void 0;
221
+ const sheet = new CSSStyleSheet();
222
+ sheet.replaceSync(styles2);
223
+ return sheet;
224
+ }
225
+
226
+ // src/utils/shadow-root.ts
227
+ var globalStyleSheet;
228
+ function createShadowRoot(cmpMeta) {
229
+ var _a;
230
+ const opts = { mode: "open" };
231
+ {
232
+ opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
233
+ }
234
+ const shadowRoot = this.attachShadow(opts);
235
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
236
+ if (globalStyleSheet) {
237
+ if (supportsMutableAdoptedStyleSheets) {
238
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
239
+ } else {
240
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
241
+ }
242
+ } else if (!supportsConstructableStylesheets) {
243
+ const styleElm = document.createElement("style");
244
+ styleElm.innerHTML = globalStyles;
245
+ shadowRoot.prepend(styleElm);
246
+ }
247
+ }
248
+ var createTime = (fnName, tagName = "") => {
249
+ {
250
+ return () => {
251
+ return;
252
+ };
253
+ }
254
+ };
255
+ var uniqueTime = (key, measureText) => {
256
+ {
257
+ return () => {
258
+ return;
259
+ };
260
+ }
261
+ };
262
+
263
+ // src/utils/query-nonce-meta-tag-content.ts
264
+ function queryNonceMetaTagContent(doc) {
265
+ var _a, _b, _c;
266
+ 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;
267
+ }
268
+
269
+ // src/runtime/styles.ts
270
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
271
+ var registerStyle = (scopeId2, cssText, allowCS) => {
272
+ let style = styles.get(scopeId2);
273
+ if (supportsConstructableStylesheets && allowCS) {
274
+ style = style || new CSSStyleSheet();
275
+ if (typeof style === "string") {
276
+ style = cssText;
277
+ } else {
278
+ style.replaceSync(cssText);
279
+ }
280
+ } else {
281
+ style = cssText;
282
+ }
283
+ styles.set(scopeId2, style);
284
+ };
285
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
286
+ var _a, _b, _c;
287
+ const scopeId2 = getScopeId(cmpMeta);
288
+ const style = styles.get(scopeId2);
289
+ if (!win.document) {
290
+ return scopeId2;
291
+ }
292
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
293
+ if (style) {
294
+ if (typeof style === "string") {
295
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
296
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
297
+ let styleElm;
298
+ if (!appliedStyles) {
299
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
300
+ }
301
+ if (!appliedStyles.has(scopeId2)) {
302
+ styleElm = win.document.createElement("style");
303
+ styleElm.textContent = style;
304
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
305
+ if (nonce != null) {
306
+ styleElm.setAttribute("nonce", nonce);
307
+ }
308
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
309
+ if (styleContainerNode.nodeName === "HEAD") {
310
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
311
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
312
+ styleContainerNode.insertBefore(
313
+ styleElm,
314
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
315
+ );
316
+ } else if ("host" in styleContainerNode) {
317
+ if (supportsConstructableStylesheets) {
318
+ const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
319
+ const stylesheet = new currentWindow.CSSStyleSheet();
320
+ stylesheet.replaceSync(style);
321
+ if (supportsMutableAdoptedStyleSheets) {
322
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
323
+ } else {
324
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
325
+ }
326
+ } else {
327
+ const existingStyleContainer = styleContainerNode.querySelector("style");
328
+ if (existingStyleContainer && true) {
329
+ existingStyleContainer.textContent = style + existingStyleContainer.textContent;
330
+ } else {
331
+ styleContainerNode.prepend(styleElm);
332
+ }
333
+ }
334
+ } else {
335
+ styleContainerNode.append(styleElm);
336
+ }
337
+ }
338
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
339
+ styleContainerNode.insertBefore(styleElm, null);
340
+ }
341
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
342
+ styleElm.textContent += SLOT_FB_CSS;
343
+ }
344
+ if (appliedStyles) {
345
+ appliedStyles.add(scopeId2);
346
+ }
347
+ }
348
+ } else {
349
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
350
+ if (!appliedStyles) {
351
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
352
+ }
353
+ if (!appliedStyles.has(scopeId2)) {
354
+ const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
355
+ let stylesheet;
356
+ if (style.constructor === currentWindow.CSSStyleSheet) {
357
+ stylesheet = style;
358
+ } else {
359
+ stylesheet = new currentWindow.CSSStyleSheet();
360
+ for (let i2 = 0; i2 < style.cssRules.length; i2++) {
361
+ stylesheet.insertRule(style.cssRules[i2].cssText, i2);
362
+ }
363
+ }
364
+ if (supportsMutableAdoptedStyleSheets) {
365
+ styleContainerNode.adoptedStyleSheets.push(stylesheet);
366
+ } else {
367
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
368
+ }
369
+ appliedStyles.add(scopeId2);
370
+ }
371
+ }
372
+ }
373
+ return scopeId2;
374
+ };
375
+ var attachStyles = (hostRef) => {
376
+ const cmpMeta = hostRef.$cmpMeta$;
377
+ const elm = hostRef.$hostElement$;
378
+ const flags = cmpMeta.$flags$;
379
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
380
+ const scopeId2 = addStyle(
381
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
382
+ cmpMeta);
383
+ if (flags & 10 /* needsScopedEncapsulation */) {
384
+ elm["s-sc"] = scopeId2;
385
+ elm.classList.add(scopeId2 + "-h");
386
+ }
387
+ endAttachStyles();
388
+ };
389
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
390
+ var isComplexType = (o) => {
391
+ o = typeof o;
392
+ return o === "object" || o === "function";
393
+ };
394
+
395
+ // src/runtime/vdom/h.ts
396
+ var h = (nodeName, vnodeData, ...children) => {
397
+ if (typeof nodeName === "string") {
398
+ nodeName = transformTag(nodeName);
399
+ }
400
+ let child = null;
401
+ let key = null;
402
+ let simple = false;
403
+ let lastSimple = false;
404
+ const vNodeChildren = [];
405
+ const walk = (c) => {
406
+ for (let i2 = 0; i2 < c.length; i2++) {
407
+ child = c[i2];
408
+ if (Array.isArray(child)) {
409
+ walk(child);
410
+ } else if (child != null && typeof child !== "boolean") {
411
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
412
+ child = String(child);
413
+ }
414
+ if (simple && lastSimple) {
415
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
416
+ } else {
417
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
418
+ }
419
+ lastSimple = simple;
420
+ }
421
+ }
422
+ };
423
+ walk(children);
424
+ if (vnodeData) {
425
+ if (vnodeData.key) {
426
+ key = vnodeData.key;
427
+ }
428
+ {
429
+ const classData = vnodeData.className || vnodeData.class;
430
+ if (classData) {
431
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
432
+ }
433
+ }
434
+ }
435
+ const vnode = newVNode(nodeName, null);
436
+ vnode.$attrs$ = vnodeData;
437
+ if (vNodeChildren.length > 0) {
438
+ vnode.$children$ = vNodeChildren;
439
+ }
440
+ {
441
+ vnode.$key$ = key;
442
+ }
443
+ return vnode;
444
+ };
445
+ var newVNode = (tag, text) => {
446
+ const vnode = {
447
+ $flags$: 0,
448
+ $tag$: tag,
449
+ // Normalize undefined to null to prevent rendering "undefined" as text
450
+ $text$: text != null ? text : null,
451
+ $elm$: null,
452
+ $children$: null
453
+ };
454
+ {
455
+ vnode.$attrs$ = null;
456
+ }
457
+ {
458
+ vnode.$key$ = null;
459
+ }
460
+ return vnode;
461
+ };
462
+ var Host = {};
463
+ var isHost = (node) => node && node.$tag$ === Host;
464
+
465
+ // src/runtime/normalize-watchers.ts
466
+ var normalizeWatchers = (raw) => {
467
+ if (!raw) return void 0;
468
+ const keys = Object.keys(raw);
469
+ if (keys.length === 0) return void 0;
470
+ let hasLegacy = false;
471
+ for (const propName of keys) {
472
+ if (hasLegacy) break;
473
+ for (const h2 of raw[propName]) {
474
+ if (typeof h2 === "string") {
475
+ hasLegacy = true;
476
+ break;
477
+ }
478
+ }
479
+ }
480
+ if (!hasLegacy) return raw;
481
+ const out = {};
482
+ for (const propName of keys) {
483
+ out[propName] = raw[propName].map(
484
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
485
+ );
486
+ }
487
+ return out;
488
+ };
489
+
490
+ // src/runtime/parse-property-value.ts
491
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
492
+ if (propValue != null && !isComplexType(propValue)) {
493
+ if (propType & 4 /* Boolean */) {
494
+ if (isFormAssociated && typeof propValue === "string") {
495
+ return propValue === "" || !!propValue;
496
+ } else {
497
+ return propValue === "false" ? false : propValue === "" || !!propValue;
498
+ }
499
+ }
500
+ if (propType & 2 /* Number */) {
501
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
502
+ }
503
+ if (propType & 1 /* String */) {
504
+ return String(propValue);
505
+ }
506
+ return propValue;
507
+ }
508
+ return propValue;
509
+ };
510
+ var getElement = (ref) => {
511
+ var _a;
512
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
513
+ };
514
+
515
+ // src/runtime/event-emitter.ts
516
+ var createEvent = (ref, name, flags) => {
517
+ const elm = getElement(ref);
518
+ return {
519
+ emit: (detail) => {
520
+ return emitEvent(elm, name, {
521
+ bubbles: true,
522
+ composed: true,
523
+ cancelable: true,
524
+ detail
525
+ });
526
+ }
527
+ };
528
+ };
529
+ var emitEvent = (elm, name, opts) => {
530
+ const ev = plt.ce(name, opts);
531
+ elm.dispatchEvent(ev);
532
+ return ev;
533
+ };
534
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
535
+ if (oldValue === newValue) {
536
+ return;
537
+ }
538
+ let isProp = isMemberInElement(elm, memberName);
539
+ let ln = memberName.toLowerCase();
540
+ if (memberName === "class") {
541
+ const classList = elm.classList;
542
+ const oldClasses = parseClassList(oldValue);
543
+ let newClasses = parseClassList(newValue);
544
+ {
545
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
546
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
547
+ }
548
+ } else if (memberName === "style") {
549
+ {
550
+ for (const prop in oldValue) {
551
+ if (!newValue || newValue[prop] == null) {
552
+ if (prop.includes("-")) {
553
+ elm.style.removeProperty(prop);
554
+ } else {
555
+ elm.style[prop] = "";
556
+ }
557
+ }
558
+ }
559
+ }
560
+ for (const prop in newValue) {
561
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
562
+ if (prop.includes("-")) {
563
+ elm.style.setProperty(prop, newValue[prop]);
564
+ } else {
565
+ elm.style[prop] = newValue[prop];
566
+ }
567
+ }
568
+ }
569
+ } else if (memberName === "key") ; else if (memberName === "ref") {
570
+ if (newValue) {
571
+ queueRefAttachment(newValue, elm);
572
+ }
573
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
574
+ if (memberName[2] === "-") {
575
+ memberName = memberName.slice(3);
576
+ } else if (isMemberInElement(win, ln)) {
577
+ memberName = ln.slice(2);
578
+ } else {
579
+ memberName = ln[2] + memberName.slice(3);
580
+ }
581
+ if (oldValue || newValue) {
582
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
583
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
584
+ if (oldValue) {
585
+ plt.rel(elm, memberName, oldValue, capture);
586
+ }
587
+ if (newValue) {
588
+ plt.ael(elm, memberName, newValue, capture);
589
+ }
590
+ }
591
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
592
+ const propName = memberName.slice(5);
593
+ let attrName;
594
+ {
595
+ const hostRef = getHostRef(elm);
596
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
597
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
598
+ if (memberMeta && memberMeta[1]) {
599
+ attrName = memberMeta[1];
600
+ }
601
+ }
602
+ }
603
+ if (!attrName) {
604
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
605
+ }
606
+ if (newValue == null || newValue === false) {
607
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
608
+ elm.removeAttribute(attrName);
609
+ }
610
+ } else {
611
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
612
+ }
613
+ return;
614
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
615
+ const propName = memberName.slice(5);
616
+ try {
617
+ elm[propName] = newValue;
618
+ } catch (e) {
619
+ }
620
+ return;
621
+ } else {
622
+ const isComplex = isComplexType(newValue);
623
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
624
+ try {
625
+ if (!elm.tagName.includes("-")) {
626
+ const n = newValue == null ? "" : newValue;
627
+ if (memberName === "list") {
628
+ isProp = false;
629
+ } else if (oldValue == null || elm[memberName] !== n) {
630
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
631
+ elm[memberName] = n;
632
+ } else {
633
+ elm.setAttribute(memberName, n);
634
+ }
635
+ }
636
+ } else if (elm[memberName] !== newValue) {
637
+ elm[memberName] = newValue;
638
+ }
639
+ } catch (e) {
640
+ }
641
+ }
642
+ if (newValue == null || newValue === false) {
643
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
644
+ {
645
+ elm.removeAttribute(memberName);
646
+ }
647
+ }
648
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
649
+ newValue = newValue === true ? "" : newValue;
650
+ {
651
+ elm.setAttribute(memberName, newValue);
652
+ }
653
+ }
654
+ }
655
+ };
656
+ var parseClassListRegex = /\s/;
657
+ var parseClassList = (value) => {
658
+ if (typeof value === "object" && value && "baseVal" in value) {
659
+ value = value.baseVal;
660
+ }
661
+ if (!value || typeof value !== "string") {
662
+ return [];
663
+ }
664
+ return value.split(parseClassListRegex);
665
+ };
666
+ var CAPTURE_EVENT_SUFFIX = "Capture";
667
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
668
+
669
+ // src/runtime/vdom/update-element.ts
670
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
671
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
672
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
673
+ const newVnodeAttrs = newVnode.$attrs$ || {};
674
+ {
675
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
676
+ if (!(memberName in newVnodeAttrs)) {
677
+ setAccessor(
678
+ elm,
679
+ memberName,
680
+ oldVnodeAttrs[memberName],
681
+ void 0,
682
+ isSvgMode2,
683
+ newVnode.$flags$);
684
+ }
685
+ }
686
+ }
687
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
688
+ setAccessor(
689
+ elm,
690
+ memberName,
691
+ oldVnodeAttrs[memberName],
692
+ newVnodeAttrs[memberName],
693
+ isSvgMode2,
694
+ newVnode.$flags$);
695
+ }
696
+ };
697
+ function sortedAttrNames(attrNames) {
698
+ return attrNames.includes("ref") ? (
699
+ // we need to sort these to ensure that `'ref'` is the last attr
700
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
701
+ ) : (
702
+ // no need to sort, return the original array
703
+ attrNames
704
+ );
705
+ }
706
+ var hostTagName;
707
+ var useNativeShadowDom = false;
708
+ var isSvgMode = false;
709
+ var refCallbacksToRemove = [];
710
+ var refCallbacksToAttach = [];
711
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
712
+ const newVNode2 = newParentVNode.$children$[childIndex];
713
+ let i2 = 0;
714
+ let elm;
715
+ let childNode;
716
+ if (newVNode2.$text$ != null) {
717
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
718
+ } else {
719
+ if (!isSvgMode) {
720
+ isSvgMode = newVNode2.$tag$ === "svg";
721
+ }
722
+ if (!win.document) {
723
+ throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
724
+ }
725
+ elm = newVNode2.$elm$ = win.document.createElementNS(
726
+ isSvgMode ? SVG_NS : HTML_NS,
727
+ newVNode2.$tag$
728
+ ) ;
729
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
730
+ isSvgMode = false;
731
+ }
732
+ {
733
+ updateElement(null, newVNode2, isSvgMode);
734
+ }
735
+ if (newVNode2.$children$) {
736
+ const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
737
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
738
+ childNode = createElm(oldParentVNode, newVNode2, i2);
739
+ if (childNode) {
740
+ appendTarget.appendChild(childNode);
741
+ }
742
+ }
743
+ }
744
+ {
745
+ if (newVNode2.$tag$ === "svg") {
746
+ isSvgMode = false;
747
+ } else if (elm.tagName === "foreignObject") {
748
+ isSvgMode = true;
749
+ }
750
+ }
751
+ }
752
+ elm["s-hn"] = hostTagName;
753
+ return elm;
754
+ };
755
+ var relocateToHostRoot = (parentElm) => {
756
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
757
+ const host = parentElm.closest(hostTagName.toLowerCase());
758
+ if (host != null) {
759
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
760
+ (ref) => ref["s-cr"]
761
+ );
762
+ const childNodeArray = Array.from(
763
+ parentElm.__childNodes || parentElm.childNodes
764
+ );
765
+ for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
766
+ if (childNode["s-sh"] != null) {
767
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
768
+ childNode["s-sh"] = void 0;
769
+ }
770
+ }
771
+ }
772
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
773
+ };
774
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
775
+ let containerElm = parentElm;
776
+ let childNode;
777
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
778
+ containerElm = containerElm.shadowRoot;
779
+ }
780
+ if (parentVNode.$tag$ === "template") {
781
+ containerElm = containerElm.content;
782
+ }
783
+ for (; startIdx <= endIdx; ++startIdx) {
784
+ if (vnodes[startIdx]) {
785
+ childNode = createElm(null, parentVNode, startIdx);
786
+ if (childNode) {
787
+ vnodes[startIdx].$elm$ = childNode;
788
+ insertBefore(containerElm, childNode, before);
789
+ }
790
+ }
791
+ }
792
+ };
793
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
794
+ for (let index = startIdx; index <= endIdx; ++index) {
795
+ const vnode = vnodes[index];
796
+ if (vnode) {
797
+ const elm = vnode.$elm$;
798
+ nullifyVNodeRefs(vnode);
799
+ if (elm) {
800
+ elm.remove();
801
+ }
802
+ }
803
+ }
804
+ };
805
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
806
+ let oldStartIdx = 0;
807
+ let newStartIdx = 0;
808
+ let idxInOld = 0;
809
+ let i2 = 0;
810
+ let oldEndIdx = oldCh.length - 1;
811
+ let oldStartVnode = oldCh[0];
812
+ let oldEndVnode = oldCh[oldEndIdx];
813
+ let newEndIdx = newCh.length - 1;
814
+ let newStartVnode = newCh[0];
815
+ let newEndVnode = newCh[newEndIdx];
816
+ let node;
817
+ let elmToMove;
818
+ const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
819
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
820
+ if (oldStartVnode == null) {
821
+ oldStartVnode = oldCh[++oldStartIdx];
822
+ } else if (oldEndVnode == null) {
823
+ oldEndVnode = oldCh[--oldEndIdx];
824
+ } else if (newStartVnode == null) {
825
+ newStartVnode = newCh[++newStartIdx];
826
+ } else if (newEndVnode == null) {
827
+ newEndVnode = newCh[--newEndIdx];
828
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
829
+ patch(oldStartVnode, newStartVnode, isInitialRender);
830
+ oldStartVnode = oldCh[++oldStartIdx];
831
+ newStartVnode = newCh[++newStartIdx];
832
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
833
+ patch(oldEndVnode, newEndVnode, isInitialRender);
834
+ oldEndVnode = oldCh[--oldEndIdx];
835
+ newEndVnode = newCh[--newEndIdx];
836
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
837
+ patch(oldStartVnode, newEndVnode, isInitialRender);
838
+ insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
839
+ oldStartVnode = oldCh[++oldStartIdx];
840
+ newEndVnode = newCh[--newEndIdx];
841
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
842
+ patch(oldEndVnode, newStartVnode, isInitialRender);
843
+ insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
844
+ oldEndVnode = oldCh[--oldEndIdx];
845
+ newStartVnode = newCh[++newStartIdx];
846
+ } else {
847
+ idxInOld = -1;
848
+ {
849
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
850
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
851
+ idxInOld = i2;
852
+ break;
853
+ }
854
+ }
855
+ }
856
+ if (idxInOld >= 0) {
857
+ elmToMove = oldCh[idxInOld];
858
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
859
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
860
+ } else {
861
+ patch(elmToMove, newStartVnode, isInitialRender);
862
+ oldCh[idxInOld] = void 0;
863
+ node = elmToMove.$elm$;
864
+ }
865
+ newStartVnode = newCh[++newStartIdx];
866
+ } else {
867
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
868
+ newStartVnode = newCh[++newStartIdx];
869
+ }
870
+ if (node) {
871
+ {
872
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
873
+ }
874
+ }
875
+ }
876
+ }
877
+ if (oldStartIdx > oldEndIdx) {
878
+ addVnodes(
879
+ parentElm,
880
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
881
+ newVNode2,
882
+ newCh,
883
+ newStartIdx,
884
+ newEndIdx
885
+ );
886
+ } else if (newStartIdx > newEndIdx) {
887
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
888
+ }
889
+ };
890
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
891
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
892
+ if (!isInitialRender) {
893
+ return leftVNode.$key$ === rightVNode.$key$;
894
+ }
895
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
896
+ leftVNode.$key$ = rightVNode.$key$;
897
+ }
898
+ return true;
899
+ }
900
+ return false;
901
+ };
902
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
903
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
904
+ const oldChildren = oldVNode.$children$;
905
+ const newChildren = newVNode2.$children$;
906
+ const tag = newVNode2.$tag$;
907
+ const text = newVNode2.$text$;
908
+ if (text == null) {
909
+ {
910
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
911
+ }
912
+ {
913
+ if (tag === "slot" && !useNativeShadowDom) {
914
+ if (oldVNode.$name$ !== newVNode2.$name$) {
915
+ newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
916
+ relocateToHostRoot(newVNode2.$elm$.parentElement);
917
+ }
918
+ }
919
+ updateElement(oldVNode, newVNode2, isSvgMode);
920
+ }
921
+ if (oldChildren !== null && newChildren !== null) {
922
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
923
+ } else if (newChildren !== null) {
924
+ if (oldVNode.$text$ !== null) {
925
+ elm.textContent = "";
926
+ }
927
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
928
+ } else if (
929
+ // don't do this on initial render as it can cause non-hydrated content to be removed
930
+ !isInitialRender && BUILD.updatable && oldChildren !== null
931
+ ) {
932
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
933
+ } else ;
934
+ if (isSvgMode && tag === "svg") {
935
+ isSvgMode = false;
936
+ }
937
+ } else if (oldVNode.$text$ !== text) {
938
+ elm.data = text;
939
+ }
940
+ };
941
+ var nullifyVNodeRefs = (vNode) => {
942
+ {
943
+ if (vNode.$attrs$ && vNode.$attrs$.ref) {
944
+ refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
945
+ }
946
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
947
+ }
948
+ };
949
+ var queueRefAttachment = (refCallback, elm) => {
950
+ {
951
+ refCallbacksToAttach.push(() => refCallback(elm));
952
+ }
953
+ };
954
+ var flushQueuedRefCallbacks = () => {
955
+ {
956
+ refCallbacksToRemove.forEach((cb) => cb());
957
+ refCallbacksToRemove.length = 0;
958
+ refCallbacksToAttach.forEach((cb) => cb());
959
+ refCallbacksToAttach.length = 0;
960
+ }
961
+ };
962
+ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
963
+ if (parent.__insertBefore) {
964
+ return parent.__insertBefore(newNode, reference);
965
+ } else {
966
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
967
+ }
968
+ };
969
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
970
+ const hostElm = hostRef.$hostElement$;
971
+ const cmpMeta = hostRef.$cmpMeta$;
972
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
973
+ const isHostElement = isHost(renderFnResults);
974
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
975
+ hostTagName = hostElm.tagName;
976
+ if (cmpMeta.$attrsToReflect$) {
977
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
978
+ cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
979
+ {
980
+ rootVnode.$attrs$[attribute] = hostElm[propName];
981
+ }
982
+ });
983
+ }
984
+ if (isInitialLoad && rootVnode.$attrs$) {
985
+ for (const key of Object.keys(rootVnode.$attrs$)) {
986
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
987
+ rootVnode.$attrs$[key] = hostElm[key];
988
+ }
989
+ }
990
+ }
991
+ rootVnode.$tag$ = null;
992
+ rootVnode.$flags$ |= 4 /* isHost */;
993
+ hostRef.$vnode$ = rootVnode;
994
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
995
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
996
+ patch(oldVNode, rootVnode, isInitialLoad);
997
+ flushQueuedRefCallbacks();
998
+ };
999
+
1000
+ // src/runtime/update-component.ts
1001
+ var attachToAncestor = (hostRef, ancestorComponent) => {
1002
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1003
+ const index = ancestorComponent["s-p"].push(
1004
+ new Promise(
1005
+ (r) => hostRef.$onRenderResolve$ = () => {
1006
+ ancestorComponent["s-p"].splice(index - 1, 1);
1007
+ r();
1008
+ }
1009
+ )
1010
+ );
1011
+ }
1012
+ };
1013
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
1014
+ {
1015
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1016
+ }
1017
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1018
+ hostRef.$flags$ |= 512 /* needsRerender */;
1019
+ return;
1020
+ }
1021
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1022
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1023
+ if (isInitialLoad) {
1024
+ queueMicrotask(() => {
1025
+ dispatch();
1026
+ });
1027
+ return;
1028
+ }
1029
+ return writeTask(dispatch) ;
1030
+ };
1031
+ var dispatchHooks = (hostRef, isInitialLoad) => {
1032
+ const elm = hostRef.$hostElement$;
1033
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1034
+ const instance = hostRef.$lazyInstance$ ;
1035
+ if (!instance) {
1036
+ throw new Error(
1037
+ `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
1038
+ );
1039
+ }
1040
+ let maybePromise;
1041
+ if (isInitialLoad) {
1042
+ {
1043
+ {
1044
+ hostRef.$flags$ |= 256 /* isListenReady */;
1045
+ if (hostRef.$queuedListeners$) {
1046
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1047
+ hostRef.$queuedListeners$ = void 0;
1048
+ }
1049
+ }
1050
+ if (hostRef.$fetchedCbList$.length) {
1051
+ hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1052
+ }
1053
+ }
1054
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1055
+ } else {
1056
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1057
+ }
1058
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1059
+ endSchedule();
1060
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1061
+ };
1062
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
1063
+ console.error(err);
1064
+ fn();
1065
+ }) : fn();
1066
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1067
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
1068
+ var _a;
1069
+ const elm = hostRef.$hostElement$;
1070
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1071
+ const rc = elm["s-rc"];
1072
+ if (isInitialLoad) {
1073
+ attachStyles(hostRef);
1074
+ }
1075
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1076
+ {
1077
+ callRender(hostRef, instance, elm, isInitialLoad);
1078
+ }
1079
+ if (rc) {
1080
+ rc.map((cb) => cb());
1081
+ elm["s-rc"] = void 0;
1082
+ }
1083
+ endRender();
1084
+ endUpdate();
1085
+ {
1086
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1087
+ const postUpdate = () => postUpdateComponent(hostRef);
1088
+ if (childrenPromises.length === 0) {
1089
+ postUpdate();
1090
+ } else {
1091
+ Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
1092
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1093
+ childrenPromises.length = 0;
1094
+ }
1095
+ }
1096
+ };
1097
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1098
+ try {
1099
+ instance = instance.render() ;
1100
+ {
1101
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1102
+ }
1103
+ {
1104
+ hostRef.$flags$ |= 2 /* hasRendered */;
1105
+ }
1106
+ {
1107
+ {
1108
+ {
1109
+ renderVdom(hostRef, instance, isInitialLoad);
1110
+ }
1111
+ }
1112
+ }
1113
+ } catch (e) {
1114
+ consoleError(e, hostRef.$hostElement$);
1115
+ }
1116
+ return null;
1117
+ };
1118
+ var postUpdateComponent = (hostRef) => {
1119
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1120
+ const elm = hostRef.$hostElement$;
1121
+ const endPostUpdate = createTime("postUpdate", tagName);
1122
+ const instance = hostRef.$lazyInstance$ ;
1123
+ const ancestorComponent = hostRef.$ancestorComponent$;
1124
+ safeCall(instance, "componentDidRender", void 0, elm);
1125
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1126
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1127
+ {
1128
+ addHydratedFlag(elm);
1129
+ }
1130
+ safeCall(instance, "componentDidLoad", void 0, elm);
1131
+ endPostUpdate();
1132
+ {
1133
+ hostRef.$onReadyResolve$(elm);
1134
+ if (!ancestorComponent) {
1135
+ appDidLoad();
1136
+ }
1137
+ }
1138
+ } else {
1139
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1140
+ endPostUpdate();
1141
+ }
1142
+ {
1143
+ hostRef.$onInstanceResolve$(elm);
1144
+ }
1145
+ {
1146
+ if (hostRef.$onRenderResolve$) {
1147
+ hostRef.$onRenderResolve$();
1148
+ hostRef.$onRenderResolve$ = void 0;
1149
+ }
1150
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
1151
+ nextTick(() => scheduleUpdate(hostRef, false));
1152
+ }
1153
+ hostRef.$flags$ &= -517;
1154
+ }
1155
+ };
1156
+ var appDidLoad = (who) => {
1157
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1158
+ };
1159
+ var safeCall = (instance, method, arg, elm) => {
1160
+ if (instance && instance[method]) {
1161
+ try {
1162
+ return instance[method](arg);
1163
+ } catch (e) {
1164
+ consoleError(e, elm);
1165
+ }
1166
+ }
1167
+ return void 0;
1168
+ };
1169
+ var addHydratedFlag = (elm) => {
1170
+ var _a;
1171
+ return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1172
+ };
1173
+
1174
+ // src/runtime/set-value.ts
1175
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1176
+ var setValue = (ref, propName, newVal, cmpMeta) => {
1177
+ const hostRef = getHostRef(ref);
1178
+ if (!hostRef) {
1179
+ return;
1180
+ }
1181
+ if (!hostRef) {
1182
+ throw new Error(
1183
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1184
+ );
1185
+ }
1186
+ const elm = hostRef.$hostElement$ ;
1187
+ const oldVal = hostRef.$instanceValues$.get(propName);
1188
+ const flags = hostRef.$flags$;
1189
+ const instance = hostRef.$lazyInstance$ ;
1190
+ newVal = parsePropertyValue(
1191
+ newVal,
1192
+ cmpMeta.$members$[propName][0],
1193
+ !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1194
+ );
1195
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1196
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1197
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1198
+ hostRef.$instanceValues$.set(propName, newVal);
1199
+ if (cmpMeta.$watchers$) {
1200
+ const watchMethods = cmpMeta.$watchers$[propName];
1201
+ if (watchMethods) {
1202
+ watchMethods.map((watcher) => {
1203
+ try {
1204
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1205
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
1206
+ if (!instance) {
1207
+ hostRef.$fetchedCbList$.push(() => {
1208
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1209
+ });
1210
+ } else {
1211
+ instance[watchMethodName](newVal, oldVal, propName);
1212
+ }
1213
+ }
1214
+ } catch (e) {
1215
+ consoleError(e, elm);
1216
+ }
1217
+ });
1218
+ }
1219
+ }
1220
+ if (flags & 2 /* hasRendered */) {
1221
+ if (instance.componentShouldUpdate) {
1222
+ const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
1223
+ if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
1224
+ return;
1225
+ }
1226
+ }
1227
+ if (!(flags & 16 /* isQueuedForUpdate */)) {
1228
+ scheduleUpdate(hostRef, false);
1229
+ }
1230
+ }
1231
+ }
1232
+ };
1233
+
1234
+ // src/runtime/proxy-component.ts
1235
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
1236
+ var _a, _b;
1237
+ const prototype = Cstr.prototype;
1238
+ if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1239
+ FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
1240
+ Object.defineProperty(prototype, cbName, {
1241
+ value(...args) {
1242
+ var _a2;
1243
+ const hostRef = getHostRef(this);
1244
+ const instance = hostRef == null ? void 0 : hostRef.$lazyInstance$ ;
1245
+ if (!instance) {
1246
+ (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
1247
+ const cb = asyncInstance[cbName];
1248
+ typeof cb === "function" && cb.call(asyncInstance, ...args);
1249
+ });
1250
+ } else {
1251
+ const cb = instance[cbName] ;
1252
+ typeof cb === "function" && cb.call(instance, ...args);
1253
+ }
1254
+ }
1255
+ });
1256
+ });
1257
+ }
1258
+ if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1259
+ {
1260
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1261
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1262
+ }
1263
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1264
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1265
+ }
1266
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
1267
+ cmpMeta.$serializers$ = Cstr.serializers;
1268
+ }
1269
+ }
1270
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1271
+ members.map(([memberName, [memberFlags]]) => {
1272
+ if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1273
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
1274
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1275
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1276
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1277
+ Object.defineProperty(prototype, memberName, {
1278
+ get() {
1279
+ {
1280
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1281
+ return getValue(this, memberName);
1282
+ }
1283
+ const ref = getHostRef(this);
1284
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1285
+ if (!instance) return;
1286
+ return instance[memberName];
1287
+ }
1288
+ },
1289
+ configurable: true,
1290
+ enumerable: true
1291
+ });
1292
+ }
1293
+ Object.defineProperty(prototype, memberName, {
1294
+ set(newValue) {
1295
+ const ref = getHostRef(this);
1296
+ if (!ref) {
1297
+ return;
1298
+ }
1299
+ if (origSetter) {
1300
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1301
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1302
+ newValue = ref.$instanceValues$.get(memberName);
1303
+ }
1304
+ origSetter.apply(this, [
1305
+ parsePropertyValue(
1306
+ newValue,
1307
+ memberFlags,
1308
+ !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1309
+ )
1310
+ ]);
1311
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1312
+ setValue(this, memberName, newValue, cmpMeta);
1313
+ return;
1314
+ }
1315
+ {
1316
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1317
+ setValue(this, memberName, newValue, cmpMeta);
1318
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1319
+ ref.$fetchedCbList$.push(() => {
1320
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1321
+ ref.$lazyInstance$[memberName] = newValue;
1322
+ }
1323
+ });
1324
+ }
1325
+ return;
1326
+ }
1327
+ const setterSetVal = () => {
1328
+ const currentValue = ref.$lazyInstance$[memberName];
1329
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1330
+ ref.$instanceValues$.set(memberName, currentValue);
1331
+ }
1332
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
1333
+ newValue,
1334
+ memberFlags,
1335
+ !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1336
+ );
1337
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1338
+ };
1339
+ if (ref.$lazyInstance$) {
1340
+ setterSetVal();
1341
+ } else {
1342
+ ref.$fetchedCbList$.push(() => {
1343
+ setterSetVal();
1344
+ });
1345
+ }
1346
+ }
1347
+ }
1348
+ });
1349
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1350
+ Object.defineProperty(prototype, memberName, {
1351
+ value(...args) {
1352
+ var _a2;
1353
+ const ref = getHostRef(this);
1354
+ return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1355
+ var _a3;
1356
+ return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1357
+ });
1358
+ }
1359
+ });
1360
+ }
1361
+ });
1362
+ if ((flags & 1 /* isElementConstructor */)) {
1363
+ const attrNameToPropName = /* @__PURE__ */ new Map();
1364
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1365
+ plt.jmp(() => {
1366
+ var _a2;
1367
+ const propName = attrNameToPropName.get(attrName);
1368
+ const hostRef = getHostRef(this);
1369
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1370
+ newValue = this[propName];
1371
+ delete this[propName];
1372
+ }
1373
+ if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1374
+ this[propName] == newValue) {
1375
+ return;
1376
+ } else if (propName == null) {
1377
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1378
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
1379
+ const instance = hostRef.$lazyInstance$ ;
1380
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1381
+ entry == null ? void 0 : entry.forEach((watcher) => {
1382
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1383
+ if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
1384
+ instance[watchMethodName].call(instance, newValue, oldValue, attrName);
1385
+ }
1386
+ });
1387
+ }
1388
+ return;
1389
+ }
1390
+ const propFlags = members.find(([m]) => m === propName);
1391
+ const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
1392
+ const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
1393
+ if (isBooleanTarget) {
1394
+ newValue = newValue === null || newValue === "false" ? false : true;
1395
+ }
1396
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1397
+ if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1398
+ this[propName] = newValue;
1399
+ }
1400
+ });
1401
+ };
1402
+ Cstr.observedAttributes = Array.from(
1403
+ /* @__PURE__ */ new Set([
1404
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1405
+ ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1406
+ var _a2;
1407
+ const attrName = m[1] || propName;
1408
+ attrNameToPropName.set(attrName, propName);
1409
+ if (m[0] & 512 /* ReflectAttr */) {
1410
+ (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1411
+ }
1412
+ return attrName;
1413
+ })
1414
+ ])
1415
+ );
1416
+ }
1417
+ }
1418
+ return Cstr;
1419
+ };
1420
+
1421
+ // src/runtime/initialize-component.ts
1422
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1423
+ let Cstr;
1424
+ try {
1425
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1426
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1427
+ const bundleId = cmpMeta.$lazyBundleId$;
1428
+ if (bundleId) {
1429
+ const CstrImport = loadModule(cmpMeta, hostRef);
1430
+ if (CstrImport && "then" in CstrImport) {
1431
+ const endLoad = uniqueTime();
1432
+ Cstr = await CstrImport;
1433
+ endLoad();
1434
+ } else {
1435
+ Cstr = CstrImport;
1436
+ }
1437
+ if (!Cstr) {
1438
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1439
+ }
1440
+ if (!Cstr.isProxied) {
1441
+ {
1442
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1443
+ cmpMeta.$serializers$ = Cstr.serializers;
1444
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1445
+ }
1446
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1447
+ Cstr.isProxied = true;
1448
+ }
1449
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1450
+ {
1451
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
1452
+ }
1453
+ try {
1454
+ new Cstr(hostRef);
1455
+ } catch (e) {
1456
+ consoleError(e, elm);
1457
+ }
1458
+ {
1459
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1460
+ }
1461
+ {
1462
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1463
+ }
1464
+ endNewInstance();
1465
+ {
1466
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1467
+ }
1468
+ } else {
1469
+ Cstr = elm.constructor;
1470
+ const cmpTag = elm.localName;
1471
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1472
+ }
1473
+ if (Cstr && Cstr.style) {
1474
+ let style;
1475
+ if (typeof Cstr.style === "string") {
1476
+ style = Cstr.style;
1477
+ }
1478
+ const scopeId2 = getScopeId(cmpMeta);
1479
+ if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
1480
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1481
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1482
+ endRegisterStyles();
1483
+ }
1484
+ }
1485
+ }
1486
+ const ancestorComponent = hostRef.$ancestorComponent$;
1487
+ const schedule = () => scheduleUpdate(hostRef, true);
1488
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
1489
+ ancestorComponent["s-rc"].push(schedule);
1490
+ } else {
1491
+ schedule();
1492
+ }
1493
+ } catch (e) {
1494
+ consoleError(e, elm);
1495
+ if (hostRef.$onRenderResolve$) {
1496
+ hostRef.$onRenderResolve$();
1497
+ hostRef.$onRenderResolve$ = void 0;
1498
+ }
1499
+ if (hostRef.$onReadyResolve$) {
1500
+ hostRef.$onReadyResolve$(elm);
1501
+ }
1502
+ }
1503
+ };
1504
+ var fireConnectedCallback = (instance, elm) => {
1505
+ {
1506
+ safeCall(instance, "connectedCallback", void 0, elm);
1507
+ }
1508
+ };
1509
+
1510
+ // src/runtime/connected-callback.ts
1511
+ var connectedCallback = (elm) => {
1512
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1513
+ const hostRef = getHostRef(elm);
1514
+ if (!hostRef) {
1515
+ return;
1516
+ }
1517
+ const cmpMeta = hostRef.$cmpMeta$;
1518
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1519
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1520
+ hostRef.$flags$ |= 1 /* hasConnected */;
1521
+ {
1522
+ let ancestorComponent = elm;
1523
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1524
+ if (ancestorComponent["s-p"]) {
1525
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1526
+ break;
1527
+ }
1528
+ }
1529
+ }
1530
+ if (cmpMeta.$members$) {
1531
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1532
+ if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
1533
+ const value = elm[memberName];
1534
+ delete elm[memberName];
1535
+ elm[memberName] = value;
1536
+ }
1537
+ });
1538
+ }
1539
+ {
1540
+ initializeComponent(elm, hostRef, cmpMeta);
1541
+ }
1542
+ } else {
1543
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1544
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1545
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1546
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1547
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1548
+ }
1549
+ }
1550
+ endConnected();
1551
+ }
1552
+ };
1553
+ var disconnectInstance = (instance, elm) => {
1554
+ {
1555
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1556
+ }
1557
+ };
1558
+ var disconnectedCallback = async (elm) => {
1559
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1560
+ const hostRef = getHostRef(elm);
1561
+ {
1562
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
1563
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1564
+ hostRef.$rmListeners$ = void 0;
1565
+ }
1566
+ }
1567
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1568
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1569
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1570
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1571
+ }
1572
+ }
1573
+ if (rootAppliedStyles.has(elm)) {
1574
+ rootAppliedStyles.delete(elm);
1575
+ }
1576
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1577
+ rootAppliedStyles.delete(elm.shadowRoot);
1578
+ }
1579
+ };
1580
+
1581
+ // src/runtime/bootstrap-lazy.ts
1582
+ var bootstrapLazy = (lazyBundles, options = {}) => {
1583
+ var _a;
1584
+ if (!win.document) {
1585
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1586
+ return;
1587
+ }
1588
+ const endBootstrap = createTime();
1589
+ const cmpTags = [];
1590
+ const exclude = options.exclude || [];
1591
+ const customElements2 = win.customElements;
1592
+ const head = win.document.head;
1593
+ const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1594
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1595
+ const deferredConnectedCallbacks = [];
1596
+ let appLoadFallback;
1597
+ let isBootstrapping = true;
1598
+ Object.assign(plt, options);
1599
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1600
+ lazyBundles.map((lazyBundle) => {
1601
+ lazyBundle[1].map((compactMeta) => {
1602
+ var _a2, _b;
1603
+ const cmpMeta = {
1604
+ $flags$: compactMeta[0],
1605
+ $tagName$: compactMeta[1],
1606
+ $members$: compactMeta[2],
1607
+ $listeners$: compactMeta[3]
1608
+ };
1609
+ {
1610
+ cmpMeta.$members$ = compactMeta[2];
1611
+ }
1612
+ {
1613
+ cmpMeta.$listeners$ = compactMeta[3];
1614
+ }
1615
+ {
1616
+ cmpMeta.$attrsToReflect$ = [];
1617
+ }
1618
+ {
1619
+ cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
1620
+ cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
1621
+ cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
1622
+ }
1623
+ const tagName = transformTag(cmpMeta.$tagName$);
1624
+ const HostElement = class extends HTMLElement {
1625
+ ["s-p"];
1626
+ ["s-rc"];
1627
+ hasRegisteredEventListeners = false;
1628
+ // StencilLazyHost
1629
+ constructor(self) {
1630
+ super(self);
1631
+ self = this;
1632
+ registerHost(self, cmpMeta);
1633
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1634
+ {
1635
+ if (!self.shadowRoot) {
1636
+ createShadowRoot.call(self, cmpMeta);
1637
+ } else {
1638
+ if (self.shadowRoot.mode !== "open") {
1639
+ throw new Error(
1640
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1641
+ );
1642
+ }
1643
+ }
1644
+ }
1645
+ }
1646
+ }
1647
+ connectedCallback() {
1648
+ const hostRef = getHostRef(this);
1649
+ if (!hostRef) {
1650
+ return;
1651
+ }
1652
+ if (!this.hasRegisteredEventListeners) {
1653
+ this.hasRegisteredEventListeners = true;
1654
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1655
+ }
1656
+ if (appLoadFallback) {
1657
+ clearTimeout(appLoadFallback);
1658
+ appLoadFallback = null;
1659
+ }
1660
+ if (isBootstrapping) {
1661
+ deferredConnectedCallbacks.push(this);
1662
+ } else {
1663
+ plt.jmp(() => connectedCallback(this));
1664
+ }
1665
+ }
1666
+ disconnectedCallback() {
1667
+ plt.jmp(() => disconnectedCallback(this));
1668
+ plt.raf(() => {
1669
+ var _a3;
1670
+ const hostRef = getHostRef(this);
1671
+ if (!hostRef) {
1672
+ return;
1673
+ }
1674
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1675
+ if (i2 > -1) {
1676
+ deferredConnectedCallbacks.splice(i2, 1);
1677
+ }
1678
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1679
+ delete hostRef.$vnode$.$elm$;
1680
+ }
1681
+ });
1682
+ }
1683
+ componentOnReady() {
1684
+ var _a3;
1685
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1686
+ }
1687
+ };
1688
+ if (cmpMeta.$flags$ & 64 /* formAssociated */) {
1689
+ HostElement.formAssociated = true;
1690
+ }
1691
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1692
+ if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1693
+ cmpTags.push(tagName);
1694
+ customElements2.define(
1695
+ tagName,
1696
+ proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1697
+ );
1698
+ }
1699
+ });
1700
+ });
1701
+ if (cmpTags.length > 0) {
1702
+ {
1703
+ dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1704
+ }
1705
+ if (dataStyles.innerHTML.length) {
1706
+ dataStyles.setAttribute("data-styles", "");
1707
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1708
+ if (nonce != null) {
1709
+ dataStyles.setAttribute("nonce", nonce);
1710
+ }
1711
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1712
+ }
1713
+ }
1714
+ isBootstrapping = false;
1715
+ if (deferredConnectedCallbacks.length) {
1716
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1717
+ } else {
1718
+ {
1719
+ plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1720
+ }
1721
+ }
1722
+ endBootstrap();
1723
+ };
1724
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1725
+ if (listeners && win.document) {
1726
+ listeners.map(([flags, name, method]) => {
1727
+ const target = getHostListenerTarget(win.document, elm, flags) ;
1728
+ const handler = hostListenerProxy(hostRef, method);
1729
+ const opts = hostListenerOpts(flags);
1730
+ plt.ael(target, name, handler, opts);
1731
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1732
+ });
1733
+ }
1734
+ };
1735
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1736
+ var _a;
1737
+ try {
1738
+ {
1739
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1740
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1741
+ } else {
1742
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1743
+ }
1744
+ }
1745
+ } catch (e) {
1746
+ consoleError(e, hostRef.$hostElement$);
1747
+ }
1748
+ };
1749
+ var getHostListenerTarget = (doc, elm, flags) => {
1750
+ if (flags & 8 /* TargetWindow */) {
1751
+ return win;
1752
+ }
1753
+ return elm;
1754
+ };
1755
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1756
+ passive: (flags & 1 /* Passive */) !== 0,
1757
+ capture: (flags & 2 /* Capture */) !== 0
1758
+ } : (flags & 2 /* Capture */) !== 0;
1759
+
1760
+ // src/runtime/nonce.ts
1761
+ var setNonce = (nonce) => plt.$nonce$ = nonce;
1762
+ function transformTag(tag) {
1763
+ return tag;
1764
+ }
1765
+
1766
+ exports.Host = Host;
1767
+ exports.bootstrapLazy = bootstrapLazy;
1768
+ exports.createEvent = createEvent;
1769
+ exports.getElement = getElement;
1770
+ exports.globalScripts = globalScripts;
1771
+ exports.h = h;
1772
+ exports.promiseResolve = promiseResolve;
1773
+ exports.registerInstance = registerInstance;
1774
+ exports.setNonce = setNonce;