le-kit 0.1.12 → 0.1.14

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 (313) hide show
  1. package/dist/components/index.d.ts +33 -0
  2. package/dist/components/le-box.d.ts +11 -0
  3. package/dist/components/le-button.d.ts +11 -0
  4. package/dist/components/le-card.d.ts +11 -0
  5. package/dist/components/le-checkbox.d.ts +11 -0
  6. package/dist/components/le-component.d.ts +11 -0
  7. package/dist/components/le-number-input.d.ts +11 -0
  8. package/dist/components/le-popover.d.ts +11 -0
  9. package/dist/components/le-popup.d.ts +11 -0
  10. package/dist/components/le-round-progress.d.ts +11 -0
  11. package/dist/components/le-slot.d.ts +11 -0
  12. package/dist/components/le-stack.d.ts +11 -0
  13. package/dist/components/le-string-input.d.ts +11 -0
  14. package/dist/components/le-text.d.ts +11 -0
  15. package/dist/components/le-turntable.d.ts +11 -0
  16. package/dist/core/cjs/{index-BsRb_UTe.js → index-B0mg71He.js} +6 -6
  17. package/dist/core/cjs/index-B0mg71He.js.map +1 -0
  18. package/dist/core/cjs/index.cjs.js +2 -2
  19. package/dist/core/cjs/le-box.cjs.entry.js +2 -2
  20. package/dist/core/cjs/le-button.cjs.entry.js +2 -2
  21. package/dist/core/cjs/le-card.cjs.entry.js +2 -2
  22. package/dist/core/cjs/le-checkbox.cjs.entry.js +2 -2
  23. package/dist/core/cjs/le-kit.cjs.js +1 -1
  24. package/dist/core/cjs/le-number-input.cjs.entry.js +2 -2
  25. package/dist/core/cjs/le-popover.cjs.entry.js +1 -1
  26. package/dist/core/cjs/le-popup.cjs.entry.js +1 -1
  27. package/dist/core/cjs/le-round-progress.cjs.entry.js +1 -1
  28. package/dist/core/cjs/le-stack.cjs.entry.js +2 -2
  29. package/dist/core/cjs/le-string-input.cjs.entry.js +2 -2
  30. package/dist/core/cjs/le-text.cjs.entry.js +2 -2
  31. package/dist/core/cjs/le-turntable.cjs.entry.js +1 -1
  32. package/dist/core/cjs/loader.cjs.js +1 -1
  33. package/dist/{cjs/utils-DqhadIxH.js → core/cjs/utils-jdqP71LP.js} +3 -3
  34. package/dist/core/cjs/{utils-nsP8_w8_.js.map → utils-jdqP71LP.js.map} +1 -1
  35. package/dist/core/collection/global/app.js +4 -4
  36. package/dist/core/collection/global/app.js.map +1 -1
  37. package/dist/core/components/index.d.ts +33 -0
  38. package/dist/{esm → core/components}/index.js +9 -2
  39. package/dist/core/components/index.js.map +1 -0
  40. package/dist/core/components/le-box.d.ts +11 -0
  41. package/dist/{cjs/le-box.cjs.entry.js → core/components/le-box.js} +87 -14
  42. package/dist/core/components/le-box.js.map +1 -0
  43. package/dist/core/components/le-button.d.ts +11 -0
  44. package/dist/core/components/le-button.js +9 -0
  45. package/dist/core/components/le-button.js.map +1 -0
  46. package/dist/{esm/le-button_6.entry.js → core/components/le-button2.js} +919 -972
  47. package/dist/core/components/le-button2.js.map +1 -0
  48. package/dist/core/components/le-card.d.ts +11 -0
  49. package/dist/core/components/le-card.js +84 -0
  50. package/dist/core/components/le-card.js.map +1 -0
  51. package/dist/core/components/le-checkbox.d.ts +11 -0
  52. package/dist/core/components/le-checkbox.js +9 -0
  53. package/dist/core/components/le-checkbox.js.map +1 -0
  54. package/dist/core/components/le-component.d.ts +11 -0
  55. package/dist/core/components/le-component.js +9 -0
  56. package/dist/core/components/le-component.js.map +1 -0
  57. package/dist/core/components/le-number-input.d.ts +11 -0
  58. package/dist/{cjs/le-number-input.cjs.entry.js → core/components/le-number-input.js} +85 -15
  59. package/dist/core/components/le-number-input.js.map +1 -0
  60. package/dist/core/components/le-popover.d.ts +11 -0
  61. package/dist/core/components/le-popover.js +9 -0
  62. package/dist/core/components/le-popover.js.map +1 -0
  63. package/dist/{collection/components/le-popover/le-popover.js → core/components/le-popover2.js} +49 -360
  64. package/dist/core/components/le-popover2.js.map +1 -0
  65. package/dist/core/components/le-popup.d.ts +11 -0
  66. package/dist/{cjs/le-popup.cjs.entry.js → core/components/le-popup.js} +88 -21
  67. package/dist/core/components/le-popup.js.map +1 -0
  68. package/dist/core/components/le-round-progress.d.ts +11 -0
  69. package/dist/{cjs/le-round-progress.cjs.entry.js → core/components/le-round-progress.js} +43 -14
  70. package/dist/core/components/le-round-progress.js.map +1 -0
  71. package/dist/core/components/le-slot.d.ts +11 -0
  72. package/dist/core/components/le-slot.js +9 -0
  73. package/dist/core/components/le-slot.js.map +1 -0
  74. package/dist/core/components/le-stack.d.ts +11 -0
  75. package/dist/{cjs/le-stack.cjs.entry.js → core/components/le-stack.js} +78 -14
  76. package/dist/core/components/le-stack.js.map +1 -0
  77. package/dist/core/components/le-string-input.d.ts +11 -0
  78. package/dist/core/components/le-string-input.js +9 -0
  79. package/dist/core/components/le-string-input.js.map +1 -0
  80. package/dist/core/components/le-text.d.ts +11 -0
  81. package/dist/{cjs/le-text.cjs.entry.js → core/components/le-text.js} +80 -16
  82. package/dist/core/components/le-text.js.map +1 -0
  83. package/dist/core/components/le-turntable.d.ts +11 -0
  84. package/dist/{cjs/le-turntable.cjs.entry.js → core/components/le-turntable.js} +37 -12
  85. package/dist/core/components/le-turntable.js.map +1 -0
  86. package/dist/core/components/utils.js +310 -0
  87. package/dist/core/components/utils.js.map +1 -0
  88. package/dist/core/esm/{index-CJ-z5Zj1.js → index-SKsXnjWI.js} +6 -6
  89. package/dist/core/{le-kit/p-CJ-z5Zj1.js.map → esm/index-SKsXnjWI.js.map} +1 -1
  90. package/dist/core/esm/index.js +2 -2
  91. package/dist/core/esm/le-box.entry.js +2 -2
  92. package/dist/core/esm/le-button.entry.js +2 -2
  93. package/dist/core/esm/le-card.entry.js +2 -2
  94. package/dist/core/esm/le-checkbox.entry.js +2 -2
  95. package/dist/core/esm/le-kit.js +2 -2
  96. package/dist/core/esm/le-number-input.entry.js +2 -2
  97. package/dist/core/esm/le-popover.entry.js +1 -1
  98. package/dist/core/esm/le-popup.entry.js +1 -1
  99. package/dist/core/esm/le-round-progress.entry.js +1 -1
  100. package/dist/core/esm/le-stack.entry.js +2 -2
  101. package/dist/core/esm/le-string-input.entry.js +2 -2
  102. package/dist/core/esm/le-text.entry.js +2 -2
  103. package/dist/core/esm/le-turntable.entry.js +1 -1
  104. package/dist/core/esm/loader.js +2 -2
  105. package/dist/{esm/utils-Cf7fMI0j.js → core/esm/utils-DZdP1JiG.js} +3 -3
  106. package/dist/core/esm/{utils-Bxmld82M.js.map → utils-DZdP1JiG.js.map} +1 -1
  107. package/dist/core/le-kit/index.esm.js +1 -1
  108. package/dist/core/le-kit/le-kit.esm.js +1 -1
  109. package/dist/core/le-kit/p--VxUdzYV.js +2 -0
  110. package/dist/core/le-kit/{p-Drz36PDp.js.map → p--VxUdzYV.js.map} +1 -1
  111. package/dist/core/le-kit/{p-2ac4789a.entry.js → p-189cb775.entry.js} +2 -2
  112. package/dist/core/le-kit/{p-556086ca.entry.js → p-35c1d413.entry.js} +2 -2
  113. package/dist/core/le-kit/{p-aa6e906f.entry.js → p-4f133e72.entry.js} +2 -2
  114. package/dist/core/le-kit/{p-df552906.entry.js → p-55f70091.entry.js} +2 -2
  115. package/dist/core/le-kit/{p-e0861e82.entry.js → p-5fd7b23a.entry.js} +2 -2
  116. package/dist/core/le-kit/{p-5ef81068.entry.js → p-6e414a5c.entry.js} +2 -2
  117. package/dist/core/le-kit/{p-d75214f9.entry.js → p-7b121ca7.entry.js} +2 -2
  118. package/dist/core/le-kit/{p-45eace7c.entry.js → p-8c81fa95.entry.js} +2 -2
  119. package/dist/core/le-kit/{p-257495cc.entry.js → p-9aa81442.entry.js} +2 -2
  120. package/dist/core/le-kit/p-SKsXnjWI.js +3 -0
  121. package/dist/core/le-kit/p-SKsXnjWI.js.map +1 -0
  122. package/dist/core/le-kit/{p-66d35f48.entry.js → p-a9d05ef6.entry.js} +2 -2
  123. package/dist/core/le-kit/{p-73682c5e.entry.js → p-b2bd2a80.entry.js} +2 -2
  124. package/dist/core/le-kit/{p-0308bd1f.entry.js → p-ccac9611.entry.js} +2 -2
  125. package/dist/core/types/global/app.d.ts +4 -4
  126. package/dist/le-kit/assets/custom-elements.json +1230 -1230
  127. package/dist/le-kit/index-CAY3Hk_i.js +4559 -0
  128. package/dist/le-kit/index-CAY3Hk_i.js.map +1 -0
  129. package/dist/le-kit/index.esm.js +116 -2
  130. package/dist/le-kit/index.esm.js.map +1 -1
  131. package/dist/{esm → le-kit}/le-box.entry.js +3 -3
  132. package/dist/le-kit/le-button.entry.esm.js.map +1 -0
  133. package/dist/le-kit/le-button.entry.js +90 -0
  134. package/dist/{esm → le-kit}/le-card.entry.js +3 -3
  135. package/dist/le-kit/le-checkbox.entry.esm.js.map +1 -0
  136. package/dist/le-kit/le-checkbox.entry.js +59 -0
  137. package/dist/le-kit/le-component.entry.esm.js.map +1 -0
  138. package/dist/{collection/components/le-component/le-component.js → le-kit/le-component.entry.js} +19 -138
  139. package/dist/le-kit/le-kit.css +1010 -1
  140. package/dist/le-kit/le-kit.esm.js +48 -2
  141. package/dist/le-kit/le-kit.esm.js.map +1 -1
  142. package/dist/{esm → le-kit}/le-number-input.entry.js +5 -5
  143. package/dist/le-kit/le-popover.entry.esm.js.map +1 -0
  144. package/dist/le-kit/le-popover.entry.js +346 -0
  145. package/dist/{esm → le-kit}/le-popup.entry.js +6 -6
  146. package/dist/{esm → le-kit}/le-round-progress.entry.js +2 -2
  147. package/dist/le-kit/le-slot.entry.esm.js.map +1 -0
  148. package/dist/{collection/components/le-slot/le-slot.js → le-kit/le-slot.entry.js} +20 -273
  149. package/dist/{esm → le-kit}/le-stack.entry.js +3 -3
  150. package/dist/le-kit/le-string-input.entry.esm.js.map +1 -0
  151. package/dist/le-kit/le-string-input.entry.js +93 -0
  152. package/dist/{esm → le-kit}/le-text.entry.js +3 -3
  153. package/dist/{esm → le-kit}/le-turntable.entry.js +2 -2
  154. package/dist/{core/esm/utils-Bxmld82M.js → le-kit/utils-cwSNy7ZS.js} +3 -3
  155. package/dist/{esm/utils-Cf7fMI0j.js.map → le-kit/utils-cwSNy7ZS.js.map} +1 -1
  156. package/dist/types/global/app.d.ts +4 -4
  157. package/package.json +4 -5
  158. package/readme.md +2 -2
  159. package/custom-elements.json +0 -4305
  160. package/dist/cjs/index-o1DRKw1g.js +0 -1842
  161. package/dist/cjs/index-o1DRKw1g.js.map +0 -1
  162. package/dist/cjs/index.cjs.js +0 -119
  163. package/dist/cjs/index.cjs.js.map +0 -1
  164. package/dist/cjs/le-box.entry.cjs.js.map +0 -1
  165. package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +0 -1
  166. package/dist/cjs/le-button_6.cjs.entry.js +0 -1206
  167. package/dist/cjs/le-card.cjs.entry.js +0 -29
  168. package/dist/cjs/le-card.entry.cjs.js.map +0 -1
  169. package/dist/cjs/le-kit.cjs.js +0 -25
  170. package/dist/cjs/le-kit.cjs.js.map +0 -1
  171. package/dist/cjs/le-number-input.entry.cjs.js.map +0 -1
  172. package/dist/cjs/le-popup.entry.cjs.js.map +0 -1
  173. package/dist/cjs/le-round-progress.entry.cjs.js.map +0 -1
  174. package/dist/cjs/le-stack.entry.cjs.js.map +0 -1
  175. package/dist/cjs/le-text.entry.cjs.js.map +0 -1
  176. package/dist/cjs/le-turntable.entry.cjs.js.map +0 -1
  177. package/dist/cjs/loader.cjs.js +0 -13
  178. package/dist/cjs/loader.cjs.js.map +0 -1
  179. package/dist/cjs/utils-DqhadIxH.js.map +0 -1
  180. package/dist/collection/assets/custom-elements.json +0 -4305
  181. package/dist/collection/collection-manifest.json +0 -26
  182. package/dist/collection/components/le-box/le-box.default.css +0 -37
  183. package/dist/collection/components/le-box/le-box.js +0 -614
  184. package/dist/collection/components/le-box/le-box.js.map +0 -1
  185. package/dist/collection/components/le-button/le-button.default.css +0 -263
  186. package/dist/collection/components/le-button/le-button.js +0 -368
  187. package/dist/collection/components/le-button/le-button.js.map +0 -1
  188. package/dist/collection/components/le-card/le-card.default.css +0 -74
  189. package/dist/collection/components/le-card/le-card.js +0 -102
  190. package/dist/collection/components/le-card/le-card.js.map +0 -1
  191. package/dist/collection/components/le-checkbox/le-checkbox.css +0 -93
  192. package/dist/collection/components/le-checkbox/le-checkbox.js +0 -192
  193. package/dist/collection/components/le-checkbox/le-checkbox.js.map +0 -1
  194. package/dist/collection/components/le-component/le-component.css +0 -189
  195. package/dist/collection/components/le-component/le-component.js.map +0 -1
  196. package/dist/collection/components/le-number-input/le-number-input.css +0 -135
  197. package/dist/collection/components/le-number-input/le-number-input.js +0 -515
  198. package/dist/collection/components/le-number-input/le-number-input.js.map +0 -1
  199. package/dist/collection/components/le-popover/le-popover.css +0 -143
  200. package/dist/collection/components/le-popover/le-popover.js.map +0 -1
  201. package/dist/collection/components/le-popup/le-popup.api.js +0 -101
  202. package/dist/collection/components/le-popup/le-popup.api.js.map +0 -1
  203. package/dist/collection/components/le-popup/le-popup.css +0 -222
  204. package/dist/collection/components/le-popup/le-popup.js +0 -596
  205. package/dist/collection/components/le-popup/le-popup.js.map +0 -1
  206. package/dist/collection/components/le-round-progress/le-round-progress.css +0 -34
  207. package/dist/collection/components/le-round-progress/le-round-progress.js +0 -184
  208. package/dist/collection/components/le-round-progress/le-round-progress.js.map +0 -1
  209. package/dist/collection/components/le-slot/le-slot.default.css +0 -222
  210. package/dist/collection/components/le-slot/le-slot.js.map +0 -1
  211. package/dist/collection/components/le-stack/le-stack.default.css +0 -37
  212. package/dist/collection/components/le-stack/le-stack.js +0 -389
  213. package/dist/collection/components/le-stack/le-stack.js.map +0 -1
  214. package/dist/collection/components/le-string-input/le-string-input.css +0 -83
  215. package/dist/collection/components/le-string-input/le-string-input.js +0 -359
  216. package/dist/collection/components/le-string-input/le-string-input.js.map +0 -1
  217. package/dist/collection/components/le-text/le-text.default.css +0 -169
  218. package/dist/collection/components/le-text/le-text.js +0 -475
  219. package/dist/collection/components/le-text/le-text.js.map +0 -1
  220. package/dist/collection/components/le-turntable/le-turntable.css +0 -10
  221. package/dist/collection/components/le-turntable/le-turntable.js +0 -210
  222. package/dist/collection/components/le-turntable/le-turntable.js.map +0 -1
  223. package/dist/collection/global/app.js +0 -167
  224. package/dist/collection/global/app.js.map +0 -1
  225. package/dist/collection/index.js +0 -15
  226. package/dist/collection/index.js.map +0 -1
  227. package/dist/collection/types/blocks.js +0 -115
  228. package/dist/collection/types/blocks.js.map +0 -1
  229. package/dist/collection/types/options.js +0 -2
  230. package/dist/collection/types/options.js.map +0 -1
  231. package/dist/collection/utils/utils.js +0 -141
  232. package/dist/collection/utils/utils.js.map +0 -1
  233. package/dist/core/cjs/index-BsRb_UTe.js.map +0 -1
  234. package/dist/core/cjs/utils-nsP8_w8_.js +0 -152
  235. package/dist/core/esm/index-CJ-z5Zj1.js.map +0 -1
  236. package/dist/core/le-kit/p-CJ-z5Zj1.js +0 -3
  237. package/dist/core/le-kit/p-Drz36PDp.js +0 -2
  238. package/dist/docs.d.ts +0 -443
  239. package/dist/docs.json +0 -5185
  240. package/dist/esm/index-CwNQ1GTa.js +0 -1824
  241. package/dist/esm/index-CwNQ1GTa.js.map +0 -1
  242. package/dist/esm/index.js.map +0 -1
  243. package/dist/esm/le-box.entry.js.map +0 -1
  244. package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +0 -1
  245. package/dist/esm/le-card.entry.js.map +0 -1
  246. package/dist/esm/le-kit.js +0 -21
  247. package/dist/esm/le-kit.js.map +0 -1
  248. package/dist/esm/le-number-input.entry.js.map +0 -1
  249. package/dist/esm/le-popup.entry.js.map +0 -1
  250. package/dist/esm/le-round-progress.entry.js.map +0 -1
  251. package/dist/esm/le-stack.entry.js.map +0 -1
  252. package/dist/esm/le-text.entry.js.map +0 -1
  253. package/dist/esm/le-turntable.entry.js.map +0 -1
  254. package/dist/esm/loader.js +0 -11
  255. package/dist/esm/loader.js.map +0 -1
  256. package/dist/index.cjs.js +0 -1
  257. package/dist/index.js +0 -1
  258. package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +0 -1
  259. package/dist/le-kit/p-08dbcc25.entry.js +0 -2
  260. package/dist/le-kit/p-08dbcc25.entry.js.map +0 -1
  261. package/dist/le-kit/p-5dc35729.entry.js +0 -2
  262. package/dist/le-kit/p-5dc35729.entry.js.map +0 -1
  263. package/dist/le-kit/p-64374730.entry.js +0 -2
  264. package/dist/le-kit/p-64374730.entry.js.map +0 -1
  265. package/dist/le-kit/p-79ec6f7c.entry.js +0 -2
  266. package/dist/le-kit/p-79ec6f7c.entry.js.map +0 -1
  267. package/dist/le-kit/p-8daf3c7f.entry.js +0 -2
  268. package/dist/le-kit/p-8daf3c7f.entry.js.map +0 -1
  269. package/dist/le-kit/p-9c69235d.entry.js +0 -2
  270. package/dist/le-kit/p-9c69235d.entry.js.map +0 -1
  271. package/dist/le-kit/p-CwNQ1GTa.js +0 -3
  272. package/dist/le-kit/p-CwNQ1GTa.js.map +0 -1
  273. package/dist/le-kit/p-ad398acd.entry.js +0 -2
  274. package/dist/le-kit/p-ad398acd.entry.js.map +0 -1
  275. package/dist/le-kit/p-b8122ad6.entry.js +0 -2
  276. package/dist/le-kit/p-b8122ad6.entry.js.map +0 -1
  277. package/dist/le-kit/p-f9008505.entry.js +0 -2
  278. package/dist/le-kit/p-f9008505.entry.js.map +0 -1
  279. package/dist/le-kit/p-y3FECAx9.js +0 -2
  280. package/dist/le-kit/p-y3FECAx9.js.map +0 -1
  281. package/dist/themes/base.css +0 -89
  282. package/dist/themes/dark.css +0 -100
  283. package/dist/themes/default.css +0 -108
  284. package/dist/themes/gradient.css +0 -100
  285. package/dist/themes/index.css +0 -413
  286. package/dist/themes/minimal.css +0 -100
  287. package/dist/themes/warm.css +0 -100
  288. /package/dist/{collection → components}/themes/base.css +0 -0
  289. /package/dist/{collection → components}/themes/dark.css +0 -0
  290. /package/dist/{collection → components}/themes/default.css +0 -0
  291. /package/dist/{collection → components}/themes/gradient.css +0 -0
  292. /package/dist/{collection → components}/themes/index.css +0 -0
  293. /package/dist/{collection → components}/themes/minimal.css +0 -0
  294. /package/dist/{collection → components}/themes/warm.css +0 -0
  295. /package/dist/core/le-kit/{p-2ac4789a.entry.js.map → p-189cb775.entry.js.map} +0 -0
  296. /package/dist/core/le-kit/{p-556086ca.entry.js.map → p-35c1d413.entry.js.map} +0 -0
  297. /package/dist/core/le-kit/{p-aa6e906f.entry.js.map → p-4f133e72.entry.js.map} +0 -0
  298. /package/dist/core/le-kit/{p-df552906.entry.js.map → p-55f70091.entry.js.map} +0 -0
  299. /package/dist/core/le-kit/{p-e0861e82.entry.js.map → p-5fd7b23a.entry.js.map} +0 -0
  300. /package/dist/core/le-kit/{p-5ef81068.entry.js.map → p-6e414a5c.entry.js.map} +0 -0
  301. /package/dist/core/le-kit/{p-d75214f9.entry.js.map → p-7b121ca7.entry.js.map} +0 -0
  302. /package/dist/core/le-kit/{p-45eace7c.entry.js.map → p-8c81fa95.entry.js.map} +0 -0
  303. /package/dist/core/le-kit/{p-257495cc.entry.js.map → p-9aa81442.entry.js.map} +0 -0
  304. /package/dist/core/le-kit/{p-66d35f48.entry.js.map → p-a9d05ef6.entry.js.map} +0 -0
  305. /package/dist/core/le-kit/{p-73682c5e.entry.js.map → p-b2bd2a80.entry.js.map} +0 -0
  306. /package/dist/core/le-kit/{p-0308bd1f.entry.js.map → p-ccac9611.entry.js.map} +0 -0
  307. /package/dist/le-kit/{themes → dist/components/themes}/base.css +0 -0
  308. /package/dist/le-kit/{themes → dist/components/themes}/dark.css +0 -0
  309. /package/dist/le-kit/{themes → dist/components/themes}/default.css +0 -0
  310. /package/dist/le-kit/{themes → dist/components/themes}/gradient.css +0 -0
  311. /package/dist/le-kit/{themes → dist/components/themes}/index.css +0 -0
  312. /package/dist/le-kit/{themes → dist/components/themes}/minimal.css +0 -0
  313. /package/dist/le-kit/{themes → dist/components/themes}/warm.css +0 -0
@@ -1,1824 +0,0 @@
1
- const NAMESPACE = 'le-kit';
2
- const BUILD = /* le-kit */ { hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
3
-
4
- /**
5
- * Global mode initialization for le-kit components.
6
- *
7
- * Mode inheritance works as follows:
8
- * 1. Check the element's own `mode` attribute
9
- * 2. Traverse up the DOM to find a parent with `mode` attribute
10
- * 3. Check the document root element (html) for `mode` attribute
11
- * 4. Fall back to 'default'
12
- *
13
- * This allows setting mode at any level:
14
- * - `<html mode="admin">` - all components in admin mode
15
- * - `<le-card mode="admin">` - this card and its children in admin mode
16
- */
17
- function initializeMode() {
18
- }
19
- /**
20
- * Helper function to get the current mode for an element.
21
- * Can be used programmatically in components.
22
- *
23
- * This function traverses both regular DOM and shadow DOM boundaries
24
- * to find the nearest mode attribute.
25
- */
26
- function getMode(el) {
27
- // Check element's own mode
28
- const ownMode = el.getAttribute('mode');
29
- if (ownMode) {
30
- return ownMode;
31
- }
32
- // Traverse up DOM, crossing shadow boundaries
33
- let current = el;
34
- while (current) {
35
- // Try parent element first
36
- if (current instanceof Element && current.parentElement) {
37
- current = current.parentElement;
38
- const mode = current.getAttribute?.('mode');
39
- if (mode) {
40
- return mode;
41
- }
42
- }
43
- else {
44
- // No parent element - check if we're in a shadow root
45
- const root = current.getRootNode();
46
- if (root instanceof ShadowRoot) {
47
- // Cross the shadow boundary to the host element
48
- current = root.host;
49
- const mode = current.getAttribute?.('mode');
50
- if (mode) {
51
- return mode;
52
- }
53
- }
54
- else {
55
- // We've reached the document root
56
- break;
57
- }
58
- }
59
- }
60
- // Check document root
61
- const rootMode = document.documentElement.getAttribute('mode');
62
- if (rootMode) {
63
- return rootMode;
64
- }
65
- return 'default';
66
- }
67
- /**
68
- * Helper function to get the current theme for an element.
69
- * Theme inheritance works the same as mode - cascades through DOM.
70
- */
71
- function getTheme(el) {
72
- // Check element's own theme
73
- const ownTheme = el.getAttribute('theme');
74
- if (ownTheme) {
75
- return ownTheme;
76
- }
77
- // Traverse up DOM
78
- let parent = el.parentElement;
79
- while (parent) {
80
- const parentTheme = parent.getAttribute('theme');
81
- if (parentTheme) {
82
- return parentTheme;
83
- }
84
- parent = parent.parentElement;
85
- }
86
- // Check root
87
- const rootTheme = document.documentElement.getAttribute('theme');
88
- if (rootTheme) {
89
- return rootTheme;
90
- }
91
- return 'default';
92
- }
93
- /**
94
- * Helper function to set mode on the document root.
95
- * Useful for switching all components to admin mode.
96
- */
97
- function setGlobalMode(mode) {
98
- document.documentElement.setAttribute('mode', mode);
99
- }
100
- /**
101
- * Helper function to set theme on the document root.
102
- * Useful for switching all components to a different theme.
103
- */
104
- function setGlobalTheme(theme) {
105
- document.documentElement.setAttribute('theme', theme);
106
- }
107
- /**
108
- * Global configuration for le-kit
109
- */
110
- let leKitConfig = {
111
- /**
112
- * URL to the custom-elements.json manifest.
113
- * Used by admin components (le-component, le-slot) to load component metadata.
114
- *
115
- * Default: '/custom-elements.json' (served from app root)
116
- *
117
- * For apps using le-kit, you may need to:
118
- * 1. Copy the manifest from node_modules/le-kit/custom-elements.json to your public folder
119
- * 2. Or set this to point to where the manifest is served
120
- */
121
- manifestUrl: '/custom-elements.json',
122
- };
123
- /**
124
- * Configure le-kit global settings.
125
- *
126
- * @example
127
- * ```ts
128
- * import { configureLeki } from 'le-kit';
129
- *
130
- * configureLeki({
131
- * manifestUrl: '/assets/custom-elements.json'
132
- * });
133
- * ```
134
- */
135
- function configureLeKit(config) {
136
- leKitConfig = { ...leKitConfig, ...config };
137
- }
138
- /**
139
- * Get the current le-kit configuration.
140
- */
141
- function getLeKitConfig() {
142
- return leKitConfig;
143
- }
144
-
145
- const globalScripts = initializeMode;
146
- const globalStyles = ":root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--le-spacing-0:0;--le-spacing-1:0.25rem;--le-spacing-2:0.5rem;--le-spacing-3:0.75rem;--le-spacing-4:1rem;--le-spacing-5:1.25rem;--le-spacing-6:1.5rem;--le-spacing-8:2rem;--le-spacing-10:2.5rem;--le-spacing-12:3rem;--le-spacing-16:4rem;--le-font-family-base:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--le-font-family-mono:'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;--le-font-size-xs:0.75rem;--le-font-size-sm:0.875rem;--le-font-size-md:1rem;--le-font-size-lg:1.125rem;--le-font-size-xl:1.25rem;--le-font-size-2xl:1.5rem;--le-font-size-3xl:1.875rem;--le-font-size-4xl:2.25rem;--le-font-weight-normal:400;--le-font-weight-medium:500;--le-font-weight-semibold:600;--le-font-weight-bold:700;--le-line-height-tight:1.25;--le-line-height-normal:1.5;--le-line-height-relaxed:1.75;--le-radius-none:0;--le-radius-xs:0.066rem;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-transition-fast:100ms;--le-transition-normal:200ms;--le-transition-slow:300ms;--le-transition-easing:cubic-bezier(0.4, 0, 0.2, 1);--le-z-dropdown:1000;--le-z-sticky:1020;--le-z-fixed:1030;--le-z-modal-backdrop:1040;--le-z-modal:1050;--le-z-popover:1060;--le-z-tooltip:1070}:root,[theme=\"default\"]{--le-color-primary:#0088ff;--le-color-primary-light:#4da6ff;--le-color-primary-dark:#0066cc;--le-color-primary-contrast:#ffffff;--le-color-secondary:#6c757d;--le-color-secondary-light:#868e96;--le-color-secondary-dark:#545b62;--le-color-secondary-contrast:#ffffff;--le-color-success:#28a745;--le-color-success-light:#48c764;--le-color-success-dark:#1e7e34;--le-color-success-contrast:#ffffff;--le-color-warning:#ffc107;--le-color-warning-light:#ffcd39;--le-color-warning-dark:#d39e00;--le-color-warning-contrast:#212529;--le-color-danger:#dc3545;--le-color-danger-light:#e4606d;--le-color-danger-dark:#bd2130;--le-color-danger-contrast:#ffffff;--le-color-info:#17a2b8;--le-color-info-light:#3ab0c3;--le-color-info-dark:#117a8b;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#fafafa;--le-color-gray-100:#f5f5f5;--le-color-gray-200:#eeeeee;--le-color-gray-300:#e0e0e0;--le-color-gray-400:#bdbdbd;--le-color-gray-500:#9e9e9e;--le-color-gray-600:#757575;--le-color-gray-700:#616161;--le-color-gray-800:#424242;--le-color-gray-900:#212121;--le-color-background:#ffffff;--le-color-background-secondary:#f5f5f5;--le-color-background-tertiary:#eeeeee;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#212121;--le-color-text-secondary:#757575;--le-color-text-disabled:#9e9e9e;--le-color-text-inverse:#ffffff;--le-color-border:#e0e0e0;--le-color-border-light:#eeeeee;--le-color-border-dark:#bdbdbd;--le-border-width:2px;--le-color-border-input:#c4d6e6;--le-color-focus:rgba(0, 136, 255, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.05);--le-shadow-md:0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);--le-shadow-lg:0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);--le-shadow-xl:0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);--le-shadow-2xl:0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)}[theme=\"dark\"]{--le-color-primary:#4da6ff;--le-color-primary-light:#80c1ff;--le-color-primary-dark:#0088ff;--le-color-primary-contrast:#000000;--le-color-secondary:#868e96;--le-color-secondary-light:#adb5bd;--le-color-secondary-dark:#6c757d;--le-color-secondary-contrast:#000000;--le-color-success:#48c764;--le-color-success-light:#6dd587;--le-color-success-dark:#28a745;--le-color-success-contrast:#000000;--le-color-warning:#ffcd39;--le-color-warning-light:#ffda6a;--le-color-warning-dark:#ffc107;--le-color-warning-contrast:#000000;--le-color-danger:#e4606d;--le-color-danger-light:#ea868f;--le-color-danger-dark:#dc3545;--le-color-danger-contrast:#000000;--le-color-info:#3ab0c3;--le-color-info-light:#6dc4d3;--le-color-info-dark:#17a2b8;--le-color-info-contrast:#000000;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#212121;--le-color-gray-100:#424242;--le-color-gray-200:#616161;--le-color-gray-300:#757575;--le-color-gray-400:#9e9e9e;--le-color-gray-500:#bdbdbd;--le-color-gray-600:#e0e0e0;--le-color-gray-700:#eeeeee;--le-color-gray-800:#f5f5f5;--le-color-gray-900:#fafafa;--le-color-background:#121212;--le-color-background-secondary:#1e1e1e;--le-color-background-tertiary:#2d2d2d;--le-color-surface:#1e1e1e;--le-color-surface-elevated:#2d2d2d;--le-color-text-primary:#ffffff;--le-color-text-secondary:#b3b3b3;--le-color-text-disabled:#666666;--le-color-text-inverse:#121212;--le-color-border:#333333;--le-color-border-light:#2d2d2d;--le-color-border-dark:#444444;--le-border-width:2px;--le-color-border-input:#515c6b;--le-color-focus:rgba(77, 166, 255, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.3);--le-shadow-md:0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);--le-shadow-lg:0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);--le-shadow-xl:0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);--le-shadow-2xl:0 20px 25px rgba(0, 0, 0, 0.4), 0 10px 10px rgba(0, 0, 0, 0.3)}[theme=\"gradient\"]{--le-color-primary:#8b5cf6;--le-color-primary-light:#a78bfa;--le-color-primary-dark:#7c3aed;--le-color-primary-contrast:#ffffff;--le-color-secondary:#ec4899;--le-color-secondary-light:#f472b6;--le-color-secondary-dark:#db2777;--le-color-secondary-contrast:#ffffff;--le-color-success:#10b981;--le-color-success-light:#34d399;--le-color-success-dark:#059669;--le-color-success-contrast:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-light:#fbbf24;--le-color-warning-dark:#d97706;--le-color-warning-contrast:#000000;--le-color-danger:#ef4444;--le-color-danger-light:#f87171;--le-color-danger-dark:#dc2626;--le-color-danger-contrast:#ffffff;--le-color-info:#06b6d4;--le-color-info-light:#22d3ee;--le-color-info-dark:#0891b2;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#faf5ff;--le-color-gray-100:#f3e8ff;--le-color-gray-200:#e9d5ff;--le-color-gray-300:#d8b4fe;--le-color-gray-400:#c084fc;--le-color-gray-500:#a855f7;--le-color-gray-600:#9333ea;--le-color-gray-700:#7e22ce;--le-color-gray-800:#6b21a8;--le-color-gray-900:#581c87;--le-color-background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);--le-color-background-secondary:rgba(255, 255, 255, 0.1);--le-color-background-tertiary:rgba(255, 255, 255, 0.05);--le-color-surface:rgba(255, 255, 255, 0.95);--le-color-surface-elevated:#ffffff;--le-color-text-primary:#1f2937;--le-color-text-secondary:#6b7280;--le-color-text-disabled:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:rgba(139, 92, 246, 0.3);--le-color-border-light:rgba(139, 92, 246, 0.1);--le-color-border-dark:rgba(139, 92, 246, 0.5);--le-border-width:2px;--le-color-border-input:#eccddd;--le-color-focus:rgba(139, 92, 246, 0.5);--le-radius-none:0;--le-radius-sm:0.25rem;--le-radius-md:0.5rem;--le-radius-lg:1rem;--le-radius-xl:1.5rem;--le-radius-2xl:2rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(139, 92, 246, 0.1);--le-shadow-md:0 4px 6px rgba(139, 92, 246, 0.15), 0 2px 4px rgba(139, 92, 246, 0.1);--le-shadow-lg:0 10px 20px rgba(139, 92, 246, 0.2), 0 4px 8px rgba(139, 92, 246, 0.1);--le-shadow-xl:0 20px 40px rgba(139, 92, 246, 0.25), 0 8px 16px rgba(139, 92, 246, 0.15);--le-shadow-2xl:0 30px 60px rgba(139, 92, 246, 0.3), 0 15px 30px rgba(139, 92, 246, 0.2)}[theme=\"minimal\"]{--le-color-primary:#111827;--le-color-primary-light:#374151;--le-color-primary-dark:#030712;--le-color-primary-contrast:#ffffff;--le-color-secondary:#6b7280;--le-color-secondary-light:#9ca3af;--le-color-secondary-dark:#4b5563;--le-color-secondary-contrast:#ffffff;--le-color-success:#059669;--le-color-success-light:#10b981;--le-color-success-dark:#047857;--le-color-success-contrast:#ffffff;--le-color-warning:#d97706;--le-color-warning-light:#f59e0b;--le-color-warning-dark:#b45309;--le-color-warning-contrast:#ffffff;--le-color-danger:#dc2626;--le-color-danger-light:#ef4444;--le-color-danger-dark:#b91c1c;--le-color-danger-contrast:#ffffff;--le-color-info:#0284c7;--le-color-info-light:#0ea5e9;--le-color-info-dark:#0369a1;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#f9fafb;--le-color-gray-100:#f3f4f6;--le-color-gray-200:#e5e7eb;--le-color-gray-300:#d1d5db;--le-color-gray-400:#9ca3af;--le-color-gray-500:#6b7280;--le-color-gray-600:#4b5563;--le-color-gray-700:#374151;--le-color-gray-800:#1f2937;--le-color-gray-900:#111827;--le-color-background:#ffffff;--le-color-background-secondary:#fafafa;--le-color-background-tertiary:#f5f5f5;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#111827;--le-color-text-secondary:#6b7280;--le-color-text-disabled:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:#e5e7eb;--le-color-border-light:#f3f4f6;--le-color-border-dark:#d1d5db;--le-border-width:1px;--le-color-border-input:#c8cfdd;--le-color-focus:rgba(17, 24, 39, 0.3);--le-radius-none:0;--le-radius-sm:0;--le-radius-md:2px;--le-radius-lg:4px;--le-radius-xl:6px;--le-radius-2xl:8px;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:none;--le-shadow-md:0 1px 2px rgba(0, 0, 0, 0.05);--le-shadow-lg:0 1px 3px rgba(0, 0, 0, 0.08);--le-shadow-xl:0 2px 4px rgba(0, 0, 0, 0.1);--le-shadow-2xl:0 4px 8px rgba(0, 0, 0, 0.1)}[theme=\"warm\"]{--le-color-primary:#ea580c;--le-color-primary-light:#fb923c;--le-color-primary-dark:#c2410c;--le-color-primary-contrast:#ffffff;--le-color-secondary:#b45309;--le-color-secondary-light:#d97706;--le-color-secondary-dark:#92400e;--le-color-secondary-contrast:#ffffff;--le-color-success:#16a34a;--le-color-success-light:#22c55e;--le-color-success-dark:#15803d;--le-color-success-contrast:#ffffff;--le-color-warning:#ca8a04;--le-color-warning-light:#eab308;--le-color-warning-dark:#a16207;--le-color-warning-contrast:#000000;--le-color-danger:#dc2626;--le-color-danger-light:#ef4444;--le-color-danger-dark:#b91c1c;--le-color-danger-contrast:#ffffff;--le-color-info:#0891b2;--le-color-info-light:#06b6d4;--le-color-info-dark:#0e7490;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#fffbeb;--le-color-gray-100:#fef3c7;--le-color-gray-200:#fde68a;--le-color-gray-300:#fcd34d;--le-color-gray-400:#fbbf24;--le-color-gray-500:#f59e0b;--le-color-gray-600:#d97706;--le-color-gray-700:#b45309;--le-color-gray-800:#92400e;--le-color-gray-900:#78350f;--le-color-background:#fffbeb;--le-color-background-secondary:#fef3c7;--le-color-background-tertiary:#fde68a;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#78350f;--le-color-text-secondary:#92400e;--le-color-text-disabled:#d97706;--le-color-text-inverse:#ffffff;--le-color-border:#fcd34d;--le-color-border-light:#fde68a;--le-color-border-dark:#fbbf24;--le-border-width:2px;--le-color-border-input:#e7d4c4;--le-color-focus:rgba(234, 88, 12, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.375rem;--le-radius-lg:0.625rem;--le-radius-xl:0.875rem;--le-radius-2xl:1.125rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(234, 88, 12, 0.05);--le-shadow-md:0 4px 6px rgba(234, 88, 12, 0.1), 0 2px 4px rgba(234, 88, 12, 0.06);--le-shadow-lg:0 10px 15px rgba(234, 88, 12, 0.15), 0 4px 6px rgba(234, 88, 12, 0.08);--le-shadow-xl:0 20px 25px rgba(234, 88, 12, 0.15), 0 10px 10px rgba(234, 88, 12, 0.1);--le-shadow-2xl:0 25px 50px rgba(234, 88, 12, 0.2), 0 12px 24px rgba(234, 88, 12, 0.12)}:root{--le-space-xs:4px;--le-space-sm:8px;--le-space-md:16px;--le-space-lg:24px;--le-space-xl:32px;--le-space-2xl:48px;--le-space-3xl:64px;--le-font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--le-font-family-mono:'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;--le-font-size-xs:0.75rem;--le-font-size-sm:0.875rem;--le-font-size-md:1rem;--le-font-size-lg:1.125rem;--le-font-size-xl:1.25rem;--le-font-size-2xl:1.5rem;--le-font-size-3xl:2rem;--le-font-size-4xl:2.5rem;--le-font-weight-normal:400;--le-font-weight-medium:500;--le-font-weight-semibold:600;--le-font-weight-bold:700;--le-line-height-tight:1.25;--le-line-height-normal:1.5;--le-line-height-relaxed:1.75;--le-transition-fast:150ms ease;--le-transition-normal:250ms ease;--le-transition-slow:400ms ease;--le-transition-bounce:400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);--le-z-dropdown:1000;--le-z-sticky:1020;--le-z-fixed:1030;--le-z-modal-backdrop:1040;--le-z-modal:1050;--le-z-popover:1060;--le-z-tooltip:1070}:root,[theme=\"default\"]{--le-color-primary:#3b82f6;--le-color-primary-hover:#2563eb;--le-color-primary-active:#1d4ed8;--le-color-primary-subtle:#eff6ff;--le-color-on-primary:#ffffff;--le-color-secondary:#64748b;--le-color-secondary-hover:#475569;--le-color-secondary-active:#334155;--le-color-secondary-subtle:#f1f5f9;--le-color-on-secondary:#ffffff;--le-color-success:#22c55e;--le-color-success-subtle:#f0fdf4;--le-color-on-success:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#ef4444;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#06b6d4;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#ffffff;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(0, 0, 0, 0.5);--le-color-text:#1e293b;--le-color-text-secondary:#64748b;--le-color-text-muted:#94a3b8;--le-color-text-inverse:#ffffff;--le-color-border:#e2e8f0;--le-color-border-strong:#cbd5e1;--le-color-border-focus:var(--le-color-primary);--le-radius-none:0;--le-radius-sm:4px;--le-radius-md:7px;--le-radius-lg:12px;--le-radius-xl:16px;--le-radius-2xl:24px;--le-radius-full:9999px;--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.05);--le-shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);--le-shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);--le-shadow-xl:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);--le-shadow-focus:0 0 0 3px rgba(59, 130, 246, 0.3)}[theme=\"dark\"]{--le-color-primary:#60a5fa;--le-color-primary-hover:#93c5fd;--le-color-primary-active:#3b82f6;--le-color-primary-subtle:#1e3a5f;--le-color-on-primary:#0f172a;--le-color-secondary:#94a3b8;--le-color-secondary-hover:#cbd5e1;--le-color-secondary-active:#64748b;--le-color-secondary-subtle:#1e293b;--le-color-on-secondary:#0f172a;--le-color-success:#4ade80;--le-color-success-subtle:#14532d;--le-color-on-success:#0f172a;--le-color-warning:#fbbf24;--le-color-warning-subtle:#422006;--le-color-on-warning:#0f172a;--le-color-error:#f87171;--le-color-error-subtle:#450a0a;--le-color-on-error:#0f172a;--le-color-info:#22d3ee;--le-color-info-subtle:#164e63;--le-color-on-info:#0f172a;--le-color-background:#0f172a;--le-color-surface:#1e293b;--le-color-surface-raised:#334155;--le-color-surface-overlay:rgba(0, 0, 0, 0.7);--le-color-text:#f1f5f9;--le-color-text-secondary:#94a3b8;--le-color-text-muted:#64748b;--le-color-text-inverse:#0f172a;--le-color-border:#334155;--le-color-border-strong:#475569;--le-color-border-focus:var(--le-color-primary);--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.3);--le-shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);--le-shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);--le-shadow-xl:0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);--le-shadow-focus:0 0 0 3px rgba(96, 165, 250, 0.4)}[theme=\"gradient\"]{--le-color-primary:#8b5cf6;--le-color-primary-hover:#a78bfa;--le-color-primary-active:#7c3aed;--le-color-primary-subtle:#f5f3ff;--le-color-on-primary:#ffffff;--le-color-secondary:#ec4899;--le-color-secondary-hover:#f472b6;--le-color-secondary-active:#db2777;--le-color-secondary-subtle:#fdf2f8;--le-color-on-secondary:#ffffff;--le-color-success:#10b981;--le-color-success-subtle:#ecfdf5;--le-color-on-success:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#f43f5e;--le-color-error-subtle:#fff1f2;--le-color-on-error:#ffffff;--le-color-info:#06b6d4;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #fff7ed 100%);--le-color-surface:rgba(255, 255, 255, 0.9);--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(139, 92, 246, 0.3);--le-color-text:#1f2937;--le-color-text-secondary:#6b7280;--le-color-text-muted:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:rgba(139, 92, 246, 0.2);--le-color-border-strong:rgba(139, 92, 246, 0.4);--le-color-border-focus:var(--le-color-primary);--le-radius-sm:6px;--le-radius-md:12px;--le-radius-lg:16px;--le-radius-xl:20px;--le-radius-2xl:28px;--le-shadow-sm:0 1px 3px 0 rgba(139, 92, 246, 0.1);--le-shadow-md:0 4px 6px -1px rgba(139, 92, 246, 0.15), 0 2px 4px -2px rgba(236, 72, 153, 0.1);--le-shadow-lg:0 10px 15px -3px rgba(139, 92, 246, 0.2), 0 4px 6px -4px rgba(236, 72, 153, 0.15);--le-shadow-xl:0 20px 25px -5px rgba(139, 92, 246, 0.25), 0 8px 10px -6px rgba(236, 72, 153, 0.2);--le-shadow-focus:0 0 0 3px rgba(139, 92, 246, 0.4)}[theme=\"minimal\"]{--le-color-primary:#374151;--le-color-primary-hover:#1f2937;--le-color-primary-active:#111827;--le-color-primary-subtle:#f3f4f6;--le-color-on-primary:#ffffff;--le-color-secondary:#9ca3af;--le-color-secondary-hover:#6b7280;--le-color-secondary-active:#4b5563;--le-color-secondary-subtle:#f9fafb;--le-color-on-secondary:#ffffff;--le-color-success:#059669;--le-color-success-subtle:#f0fdf4;--le-color-on-success:#ffffff;--le-color-warning:#d97706;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#ffffff;--le-color-error:#dc2626;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#0891b2;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#fafafa;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(0, 0, 0, 0.4);--le-color-text:#111827;--le-color-text-secondary:#6b7280;--le-color-text-muted:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:#e5e7eb;--le-color-border-strong:#d1d5db;--le-color-border-focus:var(--le-color-primary);--le-radius-none:0;--le-radius-sm:2px;--le-radius-md:4px;--le-radius-lg:6px;--le-radius-xl:8px;--le-radius-2xl:12px;--le-radius-full:9999px;--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.03);--le-shadow-md:0 2px 4px -1px rgba(0, 0, 0, 0.06);--le-shadow-lg:0 4px 8px -2px rgba(0, 0, 0, 0.08);--le-shadow-xl:0 8px 16px -4px rgba(0, 0, 0, 0.1);--le-shadow-focus:0 0 0 2px rgba(55, 65, 81, 0.2)}[theme=\"warm\"]{--le-color-primary:#ea580c;--le-color-primary-hover:#f97316;--le-color-primary-active:#c2410c;--le-color-primary-subtle:#fff7ed;--le-color-on-primary:#ffffff;--le-color-secondary:#78716c;--le-color-secondary-hover:#57534e;--le-color-secondary-active:#44403c;--le-color-secondary-subtle:#fafaf9;--le-color-on-secondary:#ffffff;--le-color-success:#65a30d;--le-color-success-subtle:#f7fee7;--le-color-on-success:#ffffff;--le-color-warning:#d97706;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#dc2626;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#0891b2;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#fffbf5;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(120, 53, 15, 0.4);--le-color-text:#292524;--le-color-text-secondary:#78716c;--le-color-text-muted:#a8a29e;--le-color-text-inverse:#ffffff;--le-color-border:#e7e5e4;--le-color-border-strong:#d6d3d1;--le-color-border-focus:var(--le-color-primary);--le-radius-sm:4px;--le-radius-md:8px;--le-radius-lg:12px;--le-radius-xl:16px;--le-radius-2xl:24px;--le-shadow-sm:0 1px 2px 0 rgba(120, 53, 15, 0.05);--le-shadow-md:0 4px 6px -1px rgba(120, 53, 15, 0.1), 0 2px 4px -2px rgba(120, 53, 15, 0.08);--le-shadow-lg:0 10px 15px -3px rgba(120, 53, 15, 0.12), 0 4px 6px -4px rgba(120, 53, 15, 0.1);--le-shadow-xl:0 20px 25px -5px rgba(120, 53, 15, 0.15), 0 8px 10px -6px rgba(120, 53, 15, 0.12);--le-shadow-focus:0 0 0 3px rgba(234, 88, 12, 0.3)}";
147
-
148
- /*
149
- Stencil Client Platform v4.38.3 | MIT Licensed | https://stenciljs.com
150
- */
151
- var __defProp = Object.defineProperty;
152
- var __export = (target, all) => {
153
- for (var name in all)
154
- __defProp(target, name, { get: all[name], enumerable: true });
155
- };
156
-
157
- // src/utils/constants.ts
158
- var SVG_NS = "http://www.w3.org/2000/svg";
159
- var HTML_NS = "http://www.w3.org/1999/xhtml";
160
- var reWireGetterSetter = (instance, hostRef) => {
161
- var _a;
162
- const cmpMeta = hostRef.$cmpMeta$;
163
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
164
- members.map(([memberName, [memberFlags]]) => {
165
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
166
- const ogValue = instance[memberName];
167
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
168
- if (ogDescriptor) {
169
- Object.defineProperty(instance, memberName, {
170
- get() {
171
- return ogDescriptor.get.call(this);
172
- },
173
- set(newValue) {
174
- ogDescriptor.set.call(this, newValue);
175
- },
176
- configurable: true,
177
- enumerable: true
178
- });
179
- }
180
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
181
- }
182
- });
183
- };
184
- function getPropertyDescriptor(obj, memberName) {
185
- while (obj) {
186
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
187
- if (desc == null ? void 0 : desc.get) return desc;
188
- obj = Object.getPrototypeOf(obj);
189
- }
190
- return void 0;
191
- }
192
-
193
- // src/client/client-host-ref.ts
194
- var getHostRef = (ref) => {
195
- if (ref.__stencil__getHostRef) {
196
- return ref.__stencil__getHostRef();
197
- }
198
- return void 0;
199
- };
200
- var registerInstance = (lazyInstance, hostRef) => {
201
- if (!hostRef) return;
202
- lazyInstance.__stencil__getHostRef = () => hostRef;
203
- hostRef.$lazyInstance$ = lazyInstance;
204
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
205
- reWireGetterSetter(lazyInstance, hostRef);
206
- }
207
- };
208
- var registerHost = (hostElement, cmpMeta) => {
209
- const hostRef = {
210
- $flags$: 0,
211
- $hostElement$: hostElement,
212
- $cmpMeta$: cmpMeta,
213
- $instanceValues$: /* @__PURE__ */ new Map(),
214
- $serializerValues$: /* @__PURE__ */ new Map()
215
- };
216
- {
217
- hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
218
- }
219
- {
220
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
221
- hostElement["s-p"] = [];
222
- hostElement["s-rc"] = [];
223
- }
224
- {
225
- hostRef.$fetchedCbList$ = [];
226
- }
227
- const ref = hostRef;
228
- hostElement.__stencil__getHostRef = () => ref;
229
- return ref;
230
- };
231
- var isMemberInElement = (elm, memberName) => memberName in elm;
232
- var consoleError = (e, el) => (0, console.error)(e, el);
233
-
234
- // src/client/client-load-module.ts
235
- var cmpModules = /* @__PURE__ */ new Map();
236
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
237
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
238
- const bundleId = cmpMeta.$lazyBundleId$;
239
- if (!bundleId) {
240
- return void 0;
241
- }
242
- const module = cmpModules.get(bundleId) ;
243
- if (module) {
244
- return module[exportName];
245
- }
246
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
247
- return import(
248
- /* @vite-ignore */
249
- /* webpackInclude: /\.entry\.js$/ */
250
- /* webpackExclude: /\.system\.entry\.js$/ */
251
- /* webpackMode: "lazy" */
252
- `./${bundleId}.entry.js${""}`
253
- ).then(
254
- (importedModule) => {
255
- {
256
- cmpModules.set(bundleId, importedModule);
257
- }
258
- return importedModule[exportName];
259
- },
260
- (e) => {
261
- consoleError(e, hostRef.$hostElement$);
262
- }
263
- );
264
- };
265
-
266
- // src/client/client-style.ts
267
- var styles = /* @__PURE__ */ new Map();
268
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
269
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
270
- var XLINK_NS = "http://www.w3.org/1999/xlink";
271
- var win = typeof window !== "undefined" ? window : {};
272
- var plt = {
273
- $flags$: 0,
274
- $resourcesUrl$: "",
275
- jmp: (h2) => h2(),
276
- raf: (h2) => requestAnimationFrame(h2),
277
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
278
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
279
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
280
- };
281
- var supportsListenerOptions = /* @__PURE__ */ (() => {
282
- var _a;
283
- let supportsListenerOptions2 = false;
284
- try {
285
- (_a = win.document) == null ? void 0 : _a.addEventListener(
286
- "e",
287
- null,
288
- Object.defineProperty({}, "passive", {
289
- get() {
290
- supportsListenerOptions2 = true;
291
- }
292
- })
293
- );
294
- } catch (e) {
295
- }
296
- return supportsListenerOptions2;
297
- })();
298
- var promiseResolve = (v) => Promise.resolve(v);
299
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
300
- try {
301
- new CSSStyleSheet();
302
- return typeof new CSSStyleSheet().replaceSync === "function";
303
- } catch (e) {
304
- }
305
- return false;
306
- })() ;
307
- var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
308
- var queuePending = false;
309
- var queueDomReads = [];
310
- var queueDomWrites = [];
311
- var queueTask = (queue, write) => (cb) => {
312
- queue.push(cb);
313
- if (!queuePending) {
314
- queuePending = true;
315
- if (write && plt.$flags$ & 4 /* queueSync */) {
316
- nextTick(flush);
317
- } else {
318
- plt.raf(flush);
319
- }
320
- }
321
- };
322
- var consume = (queue) => {
323
- for (let i2 = 0; i2 < queue.length; i2++) {
324
- try {
325
- queue[i2](performance.now());
326
- } catch (e) {
327
- consoleError(e);
328
- }
329
- }
330
- queue.length = 0;
331
- };
332
- var flush = () => {
333
- consume(queueDomReads);
334
- {
335
- consume(queueDomWrites);
336
- if (queuePending = queueDomReads.length > 0) {
337
- plt.raf(flush);
338
- }
339
- }
340
- };
341
- var nextTick = (cb) => promiseResolve().then(cb);
342
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
343
-
344
- // src/runtime/asset-path.ts
345
- var getAssetPath = (path) => {
346
- const assetUrl = new URL(path, plt.$resourcesUrl$);
347
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
348
- };
349
- var isComplexType = (o) => {
350
- o = typeof o;
351
- return o === "object" || o === "function";
352
- };
353
-
354
- // src/utils/query-nonce-meta-tag-content.ts
355
- function queryNonceMetaTagContent(doc) {
356
- var _a, _b, _c;
357
- 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;
358
- }
359
-
360
- // src/utils/regular-expression.ts
361
- var escapeRegExpSpecialCharacters = (text) => {
362
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
363
- };
364
-
365
- // src/utils/result.ts
366
- var result_exports = {};
367
- __export(result_exports, {
368
- err: () => err,
369
- map: () => map,
370
- ok: () => ok,
371
- unwrap: () => unwrap,
372
- unwrapErr: () => unwrapErr
373
- });
374
- var ok = (value) => ({
375
- isOk: true,
376
- isErr: false,
377
- value
378
- });
379
- var err = (value) => ({
380
- isOk: false,
381
- isErr: true,
382
- value
383
- });
384
- function map(result, fn) {
385
- if (result.isOk) {
386
- const val = fn(result.value);
387
- if (val instanceof Promise) {
388
- return val.then((newVal) => ok(newVal));
389
- } else {
390
- return ok(val);
391
- }
392
- }
393
- if (result.isErr) {
394
- const value = result.value;
395
- return err(value);
396
- }
397
- throw "should never get here";
398
- }
399
- var unwrap = (result) => {
400
- if (result.isOk) {
401
- return result.value;
402
- } else {
403
- throw result.value;
404
- }
405
- };
406
- var unwrapErr = (result) => {
407
- if (result.isErr) {
408
- return result.value;
409
- } else {
410
- throw result.value;
411
- }
412
- };
413
-
414
- // src/utils/style.ts
415
- function createStyleSheetIfNeededAndSupported(styles2) {
416
- if (!supportsConstructableStylesheets) return void 0;
417
- const sheet = new CSSStyleSheet();
418
- sheet.replaceSync(styles2);
419
- return sheet;
420
- }
421
-
422
- // src/utils/shadow-root.ts
423
- var globalStyleSheet;
424
- function createShadowRoot(cmpMeta) {
425
- var _a;
426
- const shadowRoot = this.attachShadow({ mode: "open" });
427
- if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
428
- if (globalStyleSheet) {
429
- if (supportsMutableAdoptedStyleSheets) {
430
- shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
431
- } else {
432
- shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
433
- }
434
- }
435
- }
436
- var createTime = (fnName, tagName = "") => {
437
- {
438
- return () => {
439
- return;
440
- };
441
- }
442
- };
443
- var uniqueTime = (key, measureText) => {
444
- {
445
- return () => {
446
- return;
447
- };
448
- }
449
- };
450
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
451
- var registerStyle = (scopeId2, cssText, allowCS) => {
452
- let style = styles.get(scopeId2);
453
- if (supportsConstructableStylesheets && allowCS) {
454
- style = style || new CSSStyleSheet();
455
- if (typeof style === "string") {
456
- style = cssText;
457
- } else {
458
- style.replaceSync(cssText);
459
- }
460
- } else {
461
- style = cssText;
462
- }
463
- styles.set(scopeId2, style);
464
- };
465
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
466
- var _a;
467
- const scopeId2 = getScopeId(cmpMeta);
468
- const style = styles.get(scopeId2);
469
- if (!win.document) {
470
- return scopeId2;
471
- }
472
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
473
- if (style) {
474
- if (typeof style === "string") {
475
- styleContainerNode = styleContainerNode.head || styleContainerNode;
476
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
477
- let styleElm;
478
- if (!appliedStyles) {
479
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
480
- }
481
- if (!appliedStyles.has(scopeId2)) {
482
- {
483
- styleElm = win.document.createElement("style");
484
- styleElm.innerHTML = style;
485
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
486
- if (nonce != null) {
487
- styleElm.setAttribute("nonce", nonce);
488
- }
489
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
490
- if (styleContainerNode.nodeName === "HEAD") {
491
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
492
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
493
- styleContainerNode.insertBefore(
494
- styleElm,
495
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
496
- );
497
- } else if ("host" in styleContainerNode) {
498
- if (supportsConstructableStylesheets) {
499
- const stylesheet = new CSSStyleSheet();
500
- stylesheet.replaceSync(style);
501
- if (supportsMutableAdoptedStyleSheets) {
502
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
503
- } else {
504
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
505
- }
506
- } else {
507
- const existingStyleContainer = styleContainerNode.querySelector("style");
508
- if (existingStyleContainer) {
509
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
510
- } else {
511
- styleContainerNode.prepend(styleElm);
512
- }
513
- }
514
- } else {
515
- styleContainerNode.append(styleElm);
516
- }
517
- }
518
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
519
- styleContainerNode.insertBefore(styleElm, null);
520
- }
521
- }
522
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
523
- styleElm.innerHTML += SLOT_FB_CSS;
524
- }
525
- if (appliedStyles) {
526
- appliedStyles.add(scopeId2);
527
- }
528
- }
529
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
530
- if (supportsMutableAdoptedStyleSheets) {
531
- styleContainerNode.adoptedStyleSheets.push(style);
532
- } else {
533
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
534
- }
535
- }
536
- }
537
- return scopeId2;
538
- };
539
- var attachStyles = (hostRef) => {
540
- const cmpMeta = hostRef.$cmpMeta$;
541
- const elm = hostRef.$hostElement$;
542
- const flags = cmpMeta.$flags$;
543
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
544
- const scopeId2 = addStyle(
545
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
546
- cmpMeta);
547
- if (flags & 10 /* needsScopedEncapsulation */) {
548
- elm["s-sc"] = scopeId2;
549
- elm.classList.add(scopeId2 + "-h");
550
- }
551
- endAttachStyles();
552
- };
553
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
554
- var h = (nodeName, vnodeData, ...children) => {
555
- let child = null;
556
- let key = null;
557
- let simple = false;
558
- let lastSimple = false;
559
- const vNodeChildren = [];
560
- const walk = (c) => {
561
- for (let i2 = 0; i2 < c.length; i2++) {
562
- child = c[i2];
563
- if (Array.isArray(child)) {
564
- walk(child);
565
- } else if (child != null && typeof child !== "boolean") {
566
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
567
- child = String(child);
568
- }
569
- if (simple && lastSimple) {
570
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
571
- } else {
572
- vNodeChildren.push(simple ? newVNode(null, child) : child);
573
- }
574
- lastSimple = simple;
575
- }
576
- }
577
- };
578
- walk(children);
579
- if (vnodeData) {
580
- if (vnodeData.key) {
581
- key = vnodeData.key;
582
- }
583
- {
584
- const classData = vnodeData.className || vnodeData.class;
585
- if (classData) {
586
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
587
- }
588
- }
589
- }
590
- if (typeof nodeName === "function") {
591
- return nodeName(
592
- vnodeData === null ? {} : vnodeData,
593
- vNodeChildren,
594
- vdomFnUtils
595
- );
596
- }
597
- const vnode = newVNode(nodeName, null);
598
- vnode.$attrs$ = vnodeData;
599
- if (vNodeChildren.length > 0) {
600
- vnode.$children$ = vNodeChildren;
601
- }
602
- {
603
- vnode.$key$ = key;
604
- }
605
- return vnode;
606
- };
607
- var newVNode = (tag, text) => {
608
- const vnode = {
609
- $flags$: 0,
610
- $tag$: tag,
611
- $text$: text,
612
- $elm$: null,
613
- $children$: null
614
- };
615
- {
616
- vnode.$attrs$ = null;
617
- }
618
- {
619
- vnode.$key$ = null;
620
- }
621
- return vnode;
622
- };
623
- var Host = {};
624
- var isHost = (node) => node && node.$tag$ === Host;
625
- var vdomFnUtils = {
626
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
627
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
628
- };
629
- var convertToPublic = (node) => ({
630
- vattrs: node.$attrs$,
631
- vchildren: node.$children$,
632
- vkey: node.$key$,
633
- vname: node.$name$,
634
- vtag: node.$tag$,
635
- vtext: node.$text$
636
- });
637
- var convertToPrivate = (node) => {
638
- if (typeof node.vtag === "function") {
639
- const vnodeData = { ...node.vattrs };
640
- if (node.vkey) {
641
- vnodeData.key = node.vkey;
642
- }
643
- if (node.vname) {
644
- vnodeData.name = node.vname;
645
- }
646
- return h(node.vtag, vnodeData, ...node.vchildren || []);
647
- }
648
- const vnode = newVNode(node.vtag, node.vtext);
649
- vnode.$attrs$ = node.vattrs;
650
- vnode.$children$ = node.vchildren;
651
- vnode.$key$ = node.vkey;
652
- vnode.$name$ = node.vname;
653
- return vnode;
654
- };
655
- var createSupportsRuleRe = (selector) => {
656
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
657
- return new RegExp(
658
- // First capture group: match any context before the selector that's not inside @supports selector()
659
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
660
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
661
- "g"
662
- );
663
- };
664
- createSupportsRuleRe("::slotted");
665
- createSupportsRuleRe(":host");
666
- createSupportsRuleRe(":host-context");
667
- var parsePropertyValue = (propValue, propType, isFormAssociated) => {
668
- if (propValue != null && !isComplexType(propValue)) {
669
- if (propType & 4 /* Boolean */) {
670
- {
671
- return propValue === "false" ? false : propValue === "" || !!propValue;
672
- }
673
- }
674
- if (propType & 2 /* Number */) {
675
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
676
- }
677
- if (propType & 1 /* String */) {
678
- return String(propValue);
679
- }
680
- return propValue;
681
- }
682
- return propValue;
683
- };
684
- var getElement = (ref) => {
685
- var _a;
686
- return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
687
- };
688
-
689
- // src/runtime/event-emitter.ts
690
- var createEvent = (ref, name, flags) => {
691
- const elm = getElement(ref);
692
- return {
693
- emit: (detail) => {
694
- return emitEvent(elm, name, {
695
- bubbles: true,
696
- composed: true,
697
- cancelable: true,
698
- detail
699
- });
700
- }
701
- };
702
- };
703
- var emitEvent = (elm, name, opts) => {
704
- const ev = plt.ce(name, opts);
705
- elm.dispatchEvent(ev);
706
- return ev;
707
- };
708
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
709
- if (oldValue === newValue) {
710
- return;
711
- }
712
- let isProp = isMemberInElement(elm, memberName);
713
- let ln = memberName.toLowerCase();
714
- if (memberName === "class") {
715
- const classList = elm.classList;
716
- const oldClasses = parseClassList(oldValue);
717
- let newClasses = parseClassList(newValue);
718
- {
719
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
720
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
721
- }
722
- } else if (memberName === "style") {
723
- {
724
- for (const prop in oldValue) {
725
- if (!newValue || newValue[prop] == null) {
726
- if (prop.includes("-")) {
727
- elm.style.removeProperty(prop);
728
- } else {
729
- elm.style[prop] = "";
730
- }
731
- }
732
- }
733
- }
734
- for (const prop in newValue) {
735
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
736
- if (prop.includes("-")) {
737
- elm.style.setProperty(prop, newValue[prop]);
738
- } else {
739
- elm.style[prop] = newValue[prop];
740
- }
741
- }
742
- }
743
- } else if (memberName === "key") ; else if (memberName === "ref") {
744
- if (newValue) {
745
- newValue(elm);
746
- }
747
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
748
- if (memberName[2] === "-") {
749
- memberName = memberName.slice(3);
750
- } else if (isMemberInElement(win, ln)) {
751
- memberName = ln.slice(2);
752
- } else {
753
- memberName = ln[2] + memberName.slice(3);
754
- }
755
- if (oldValue || newValue) {
756
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
757
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
758
- if (oldValue) {
759
- plt.rel(elm, memberName, oldValue, capture);
760
- }
761
- if (newValue) {
762
- plt.ael(elm, memberName, newValue, capture);
763
- }
764
- }
765
- } else {
766
- const isComplex = isComplexType(newValue);
767
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
768
- try {
769
- if (!elm.tagName.includes("-")) {
770
- const n = newValue == null ? "" : newValue;
771
- if (memberName === "list") {
772
- isProp = false;
773
- } else if (oldValue == null || elm[memberName] != n) {
774
- if (typeof elm.__lookupSetter__(memberName) === "function") {
775
- elm[memberName] = n;
776
- } else {
777
- elm.setAttribute(memberName, n);
778
- }
779
- }
780
- } else if (elm[memberName] !== newValue) {
781
- elm[memberName] = newValue;
782
- }
783
- } catch (e) {
784
- }
785
- }
786
- let xlink = false;
787
- {
788
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
789
- memberName = ln;
790
- xlink = true;
791
- }
792
- }
793
- if (newValue == null || newValue === false) {
794
- if (newValue !== false || elm.getAttribute(memberName) === "") {
795
- if (xlink) {
796
- elm.removeAttributeNS(XLINK_NS, memberName);
797
- } else {
798
- elm.removeAttribute(memberName);
799
- }
800
- }
801
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
802
- newValue = newValue === true ? "" : newValue;
803
- if (xlink) {
804
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
805
- } else {
806
- elm.setAttribute(memberName, newValue);
807
- }
808
- }
809
- }
810
- };
811
- var parseClassListRegex = /\s/;
812
- var parseClassList = (value) => {
813
- if (typeof value === "object" && value && "baseVal" in value) {
814
- value = value.baseVal;
815
- }
816
- if (!value || typeof value !== "string") {
817
- return [];
818
- }
819
- return value.split(parseClassListRegex);
820
- };
821
- var CAPTURE_EVENT_SUFFIX = "Capture";
822
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
823
-
824
- // src/runtime/vdom/update-element.ts
825
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
826
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
827
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
828
- const newVnodeAttrs = newVnode.$attrs$ || {};
829
- {
830
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
831
- if (!(memberName in newVnodeAttrs)) {
832
- setAccessor(
833
- elm,
834
- memberName,
835
- oldVnodeAttrs[memberName],
836
- void 0,
837
- isSvgMode2,
838
- newVnode.$flags$);
839
- }
840
- }
841
- }
842
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
843
- setAccessor(
844
- elm,
845
- memberName,
846
- oldVnodeAttrs[memberName],
847
- newVnodeAttrs[memberName],
848
- isSvgMode2,
849
- newVnode.$flags$);
850
- }
851
- };
852
- function sortedAttrNames(attrNames) {
853
- return attrNames.includes("ref") ? (
854
- // we need to sort these to ensure that `'ref'` is the last attr
855
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
856
- ) : (
857
- // no need to sort, return the original array
858
- attrNames
859
- );
860
- }
861
- var hostTagName;
862
- var isSvgMode = false;
863
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
864
- const newVNode2 = newParentVNode.$children$[childIndex];
865
- let i2 = 0;
866
- let elm;
867
- let childNode;
868
- if (newVNode2.$text$ !== null) {
869
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
870
- } else {
871
- if (!isSvgMode) {
872
- isSvgMode = newVNode2.$tag$ === "svg";
873
- }
874
- if (!win.document) {
875
- throw new Error(
876
- "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."
877
- );
878
- }
879
- elm = newVNode2.$elm$ = win.document.createElementNS(
880
- isSvgMode ? SVG_NS : HTML_NS,
881
- newVNode2.$tag$
882
- ) ;
883
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
884
- isSvgMode = false;
885
- }
886
- {
887
- updateElement(null, newVNode2, isSvgMode);
888
- }
889
- if (newVNode2.$children$) {
890
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
891
- childNode = createElm(oldParentVNode, newVNode2, i2);
892
- if (childNode) {
893
- elm.appendChild(childNode);
894
- }
895
- }
896
- }
897
- {
898
- if (newVNode2.$tag$ === "svg") {
899
- isSvgMode = false;
900
- } else if (elm.tagName === "foreignObject") {
901
- isSvgMode = true;
902
- }
903
- }
904
- }
905
- elm["s-hn"] = hostTagName;
906
- return elm;
907
- };
908
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
909
- let containerElm = parentElm;
910
- let childNode;
911
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
912
- containerElm = containerElm.shadowRoot;
913
- }
914
- for (; startIdx <= endIdx; ++startIdx) {
915
- if (vnodes[startIdx]) {
916
- childNode = createElm(null, parentVNode, startIdx);
917
- if (childNode) {
918
- vnodes[startIdx].$elm$ = childNode;
919
- insertBefore(containerElm, childNode, before);
920
- }
921
- }
922
- }
923
- };
924
- var removeVnodes = (vnodes, startIdx, endIdx) => {
925
- for (let index = startIdx; index <= endIdx; ++index) {
926
- const vnode = vnodes[index];
927
- if (vnode) {
928
- const elm = vnode.$elm$;
929
- nullifyVNodeRefs(vnode);
930
- if (elm) {
931
- elm.remove();
932
- }
933
- }
934
- }
935
- };
936
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
937
- let oldStartIdx = 0;
938
- let newStartIdx = 0;
939
- let idxInOld = 0;
940
- let i2 = 0;
941
- let oldEndIdx = oldCh.length - 1;
942
- let oldStartVnode = oldCh[0];
943
- let oldEndVnode = oldCh[oldEndIdx];
944
- let newEndIdx = newCh.length - 1;
945
- let newStartVnode = newCh[0];
946
- let newEndVnode = newCh[newEndIdx];
947
- let node;
948
- let elmToMove;
949
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
950
- if (oldStartVnode == null) {
951
- oldStartVnode = oldCh[++oldStartIdx];
952
- } else if (oldEndVnode == null) {
953
- oldEndVnode = oldCh[--oldEndIdx];
954
- } else if (newStartVnode == null) {
955
- newStartVnode = newCh[++newStartIdx];
956
- } else if (newEndVnode == null) {
957
- newEndVnode = newCh[--newEndIdx];
958
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
959
- patch(oldStartVnode, newStartVnode, isInitialRender);
960
- oldStartVnode = oldCh[++oldStartIdx];
961
- newStartVnode = newCh[++newStartIdx];
962
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
963
- patch(oldEndVnode, newEndVnode, isInitialRender);
964
- oldEndVnode = oldCh[--oldEndIdx];
965
- newEndVnode = newCh[--newEndIdx];
966
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
967
- patch(oldStartVnode, newEndVnode, isInitialRender);
968
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
969
- oldStartVnode = oldCh[++oldStartIdx];
970
- newEndVnode = newCh[--newEndIdx];
971
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
972
- patch(oldEndVnode, newStartVnode, isInitialRender);
973
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
974
- oldEndVnode = oldCh[--oldEndIdx];
975
- newStartVnode = newCh[++newStartIdx];
976
- } else {
977
- idxInOld = -1;
978
- {
979
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
980
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
981
- idxInOld = i2;
982
- break;
983
- }
984
- }
985
- }
986
- if (idxInOld >= 0) {
987
- elmToMove = oldCh[idxInOld];
988
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
989
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
990
- } else {
991
- patch(elmToMove, newStartVnode, isInitialRender);
992
- oldCh[idxInOld] = void 0;
993
- node = elmToMove.$elm$;
994
- }
995
- newStartVnode = newCh[++newStartIdx];
996
- } else {
997
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
998
- newStartVnode = newCh[++newStartIdx];
999
- }
1000
- if (node) {
1001
- {
1002
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1003
- }
1004
- }
1005
- }
1006
- }
1007
- if (oldStartIdx > oldEndIdx) {
1008
- addVnodes(
1009
- parentElm,
1010
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
1011
- newVNode2,
1012
- newCh,
1013
- newStartIdx,
1014
- newEndIdx
1015
- );
1016
- } else if (newStartIdx > newEndIdx) {
1017
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1018
- }
1019
- };
1020
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1021
- if (leftVNode.$tag$ === rightVNode.$tag$) {
1022
- if (!isInitialRender) {
1023
- return leftVNode.$key$ === rightVNode.$key$;
1024
- }
1025
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1026
- leftVNode.$key$ = rightVNode.$key$;
1027
- }
1028
- return true;
1029
- }
1030
- return false;
1031
- };
1032
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1033
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
1034
- const oldChildren = oldVNode.$children$;
1035
- const newChildren = newVNode2.$children$;
1036
- const tag = newVNode2.$tag$;
1037
- const text = newVNode2.$text$;
1038
- if (text === null) {
1039
- {
1040
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1041
- }
1042
- {
1043
- updateElement(oldVNode, newVNode2, isSvgMode);
1044
- }
1045
- if (oldChildren !== null && newChildren !== null) {
1046
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
1047
- } else if (newChildren !== null) {
1048
- if (oldVNode.$text$ !== null) {
1049
- elm.textContent = "";
1050
- }
1051
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
1052
- } else if (
1053
- // don't do this on initial render as it can cause non-hydrated content to be removed
1054
- !isInitialRender && BUILD.updatable && oldChildren !== null
1055
- ) {
1056
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1057
- } else ;
1058
- if (isSvgMode && tag === "svg") {
1059
- isSvgMode = false;
1060
- }
1061
- } else if (oldVNode.$text$ !== text) {
1062
- elm.data = text;
1063
- }
1064
- };
1065
- var nullifyVNodeRefs = (vNode) => {
1066
- {
1067
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1068
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1069
- }
1070
- };
1071
- var insertBefore = (parent, newNode, reference) => {
1072
- {
1073
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1074
- }
1075
- };
1076
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1077
- const hostElm = hostRef.$hostElement$;
1078
- const cmpMeta = hostRef.$cmpMeta$;
1079
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1080
- const isHostElement = isHost(renderFnResults);
1081
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1082
- hostTagName = hostElm.tagName;
1083
- if (cmpMeta.$attrsToReflect$) {
1084
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1085
- cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
1086
- {
1087
- rootVnode.$attrs$[attribute] = hostElm[propName];
1088
- }
1089
- });
1090
- }
1091
- if (isInitialLoad && rootVnode.$attrs$) {
1092
- for (const key of Object.keys(rootVnode.$attrs$)) {
1093
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
1094
- rootVnode.$attrs$[key] = hostElm[key];
1095
- }
1096
- }
1097
- }
1098
- rootVnode.$tag$ = null;
1099
- rootVnode.$flags$ |= 4 /* isHost */;
1100
- hostRef.$vnode$ = rootVnode;
1101
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1102
- patch(oldVNode, rootVnode, isInitialLoad);
1103
- };
1104
-
1105
- // src/runtime/update-component.ts
1106
- var attachToAncestor = (hostRef, ancestorComponent) => {
1107
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1108
- const index = ancestorComponent["s-p"].push(
1109
- new Promise(
1110
- (r) => hostRef.$onRenderResolve$ = () => {
1111
- ancestorComponent["s-p"].splice(index - 1, 1);
1112
- r();
1113
- }
1114
- )
1115
- );
1116
- }
1117
- };
1118
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1119
- {
1120
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1121
- }
1122
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1123
- hostRef.$flags$ |= 512 /* needsRerender */;
1124
- return;
1125
- }
1126
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1127
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1128
- if (isInitialLoad) {
1129
- queueMicrotask(() => {
1130
- dispatch();
1131
- });
1132
- return;
1133
- }
1134
- return writeTask(dispatch) ;
1135
- };
1136
- var dispatchHooks = (hostRef, isInitialLoad) => {
1137
- const elm = hostRef.$hostElement$;
1138
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1139
- const instance = hostRef.$lazyInstance$ ;
1140
- if (!instance) {
1141
- throw new Error(
1142
- `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`
1143
- );
1144
- }
1145
- let maybePromise;
1146
- if (isInitialLoad) {
1147
- {
1148
- {
1149
- hostRef.$flags$ |= 256 /* isListenReady */;
1150
- if (hostRef.$queuedListeners$) {
1151
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1152
- hostRef.$queuedListeners$ = void 0;
1153
- }
1154
- }
1155
- if (hostRef.$fetchedCbList$.length) {
1156
- hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1157
- }
1158
- }
1159
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1160
- } else {
1161
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1162
- }
1163
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1164
- endSchedule();
1165
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1166
- };
1167
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1168
- console.error(err2);
1169
- fn();
1170
- }) : fn();
1171
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1172
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1173
- var _a;
1174
- const elm = hostRef.$hostElement$;
1175
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1176
- const rc = elm["s-rc"];
1177
- if (isInitialLoad) {
1178
- attachStyles(hostRef);
1179
- }
1180
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1181
- {
1182
- callRender(hostRef, instance, elm, isInitialLoad);
1183
- }
1184
- if (rc) {
1185
- rc.map((cb) => cb());
1186
- elm["s-rc"] = void 0;
1187
- }
1188
- endRender();
1189
- endUpdate();
1190
- {
1191
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1192
- const postUpdate = () => postUpdateComponent(hostRef);
1193
- if (childrenPromises.length === 0) {
1194
- postUpdate();
1195
- } else {
1196
- Promise.all(childrenPromises).then(postUpdate);
1197
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1198
- childrenPromises.length = 0;
1199
- }
1200
- }
1201
- };
1202
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1203
- try {
1204
- instance = instance.render() ;
1205
- {
1206
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1207
- }
1208
- {
1209
- hostRef.$flags$ |= 2 /* hasRendered */;
1210
- }
1211
- {
1212
- {
1213
- {
1214
- renderVdom(hostRef, instance, isInitialLoad);
1215
- }
1216
- }
1217
- }
1218
- } catch (e) {
1219
- consoleError(e, hostRef.$hostElement$);
1220
- }
1221
- return null;
1222
- };
1223
- var postUpdateComponent = (hostRef) => {
1224
- const tagName = hostRef.$cmpMeta$.$tagName$;
1225
- const elm = hostRef.$hostElement$;
1226
- const endPostUpdate = createTime("postUpdate", tagName);
1227
- const instance = hostRef.$lazyInstance$ ;
1228
- const ancestorComponent = hostRef.$ancestorComponent$;
1229
- safeCall(instance, "componentDidRender", void 0, elm);
1230
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1231
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1232
- {
1233
- addHydratedFlag(elm);
1234
- }
1235
- safeCall(instance, "componentDidLoad", void 0, elm);
1236
- endPostUpdate();
1237
- {
1238
- hostRef.$onReadyResolve$(elm);
1239
- if (!ancestorComponent) {
1240
- appDidLoad();
1241
- }
1242
- }
1243
- } else {
1244
- safeCall(instance, "componentDidUpdate", void 0, elm);
1245
- endPostUpdate();
1246
- }
1247
- {
1248
- hostRef.$onInstanceResolve$(elm);
1249
- }
1250
- {
1251
- if (hostRef.$onRenderResolve$) {
1252
- hostRef.$onRenderResolve$();
1253
- hostRef.$onRenderResolve$ = void 0;
1254
- }
1255
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1256
- nextTick(() => scheduleUpdate(hostRef, false));
1257
- }
1258
- hostRef.$flags$ &= -517;
1259
- }
1260
- };
1261
- var appDidLoad = (who) => {
1262
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1263
- };
1264
- var safeCall = (instance, method, arg, elm) => {
1265
- if (instance && instance[method]) {
1266
- try {
1267
- return instance[method](arg);
1268
- } catch (e) {
1269
- consoleError(e, elm);
1270
- }
1271
- }
1272
- return void 0;
1273
- };
1274
- var addHydratedFlag = (elm) => {
1275
- var _a;
1276
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1277
- };
1278
-
1279
- // src/runtime/set-value.ts
1280
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1281
- var setValue = (ref, propName, newVal, cmpMeta) => {
1282
- const hostRef = getHostRef(ref);
1283
- if (!hostRef) {
1284
- return;
1285
- }
1286
- if (!hostRef) {
1287
- throw new Error(
1288
- `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).`
1289
- );
1290
- }
1291
- const elm = hostRef.$hostElement$ ;
1292
- const oldVal = hostRef.$instanceValues$.get(propName);
1293
- const flags = hostRef.$flags$;
1294
- const instance = hostRef.$lazyInstance$ ;
1295
- newVal = parsePropertyValue(
1296
- newVal,
1297
- cmpMeta.$members$[propName][0]);
1298
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1299
- const didValueChange = newVal !== oldVal && !areBothNaN;
1300
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1301
- hostRef.$instanceValues$.set(propName, newVal);
1302
- if (instance) {
1303
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1304
- const watchMethods = cmpMeta.$watchers$[propName];
1305
- if (watchMethods) {
1306
- watchMethods.map((watchMethodName) => {
1307
- try {
1308
- instance[watchMethodName](newVal, oldVal, propName);
1309
- } catch (e) {
1310
- consoleError(e, elm);
1311
- }
1312
- });
1313
- }
1314
- }
1315
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1316
- if (instance.componentShouldUpdate) {
1317
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1318
- return;
1319
- }
1320
- }
1321
- scheduleUpdate(hostRef, false);
1322
- }
1323
- }
1324
- }
1325
- };
1326
-
1327
- // src/runtime/proxy-component.ts
1328
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1329
- var _a, _b;
1330
- const prototype = Cstr.prototype;
1331
- if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1332
- {
1333
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1334
- cmpMeta.$watchers$ = Cstr.watchers;
1335
- }
1336
- if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1337
- cmpMeta.$deserializers$ = Cstr.deserializers;
1338
- }
1339
- if (Cstr.serializers && !cmpMeta.$serializers$) {
1340
- cmpMeta.$serializers$ = Cstr.serializers;
1341
- }
1342
- }
1343
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1344
- members.map(([memberName, [memberFlags]]) => {
1345
- if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1346
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1347
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1348
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1349
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1350
- Object.defineProperty(prototype, memberName, {
1351
- get() {
1352
- {
1353
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1354
- return getValue(this, memberName);
1355
- }
1356
- const ref = getHostRef(this);
1357
- const instance = ref ? ref.$lazyInstance$ : prototype;
1358
- if (!instance) return;
1359
- return instance[memberName];
1360
- }
1361
- },
1362
- configurable: true,
1363
- enumerable: true
1364
- });
1365
- }
1366
- Object.defineProperty(prototype, memberName, {
1367
- set(newValue) {
1368
- const ref = getHostRef(this);
1369
- if (!ref) {
1370
- return;
1371
- }
1372
- if (origSetter) {
1373
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1374
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1375
- newValue = ref.$instanceValues$.get(memberName);
1376
- }
1377
- origSetter.apply(this, [
1378
- parsePropertyValue(
1379
- newValue,
1380
- memberFlags)
1381
- ]);
1382
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1383
- setValue(this, memberName, newValue, cmpMeta);
1384
- return;
1385
- }
1386
- {
1387
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1388
- setValue(this, memberName, newValue, cmpMeta);
1389
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1390
- ref.$fetchedCbList$.push(() => {
1391
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1392
- ref.$lazyInstance$[memberName] = newValue;
1393
- }
1394
- });
1395
- }
1396
- return;
1397
- }
1398
- const setterSetVal = () => {
1399
- const currentValue = ref.$lazyInstance$[memberName];
1400
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1401
- ref.$instanceValues$.set(memberName, currentValue);
1402
- }
1403
- ref.$lazyInstance$[memberName] = parsePropertyValue(
1404
- newValue,
1405
- memberFlags);
1406
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1407
- };
1408
- if (ref.$lazyInstance$) {
1409
- setterSetVal();
1410
- } else {
1411
- ref.$fetchedCbList$.push(() => {
1412
- setterSetVal();
1413
- });
1414
- }
1415
- }
1416
- }
1417
- });
1418
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1419
- Object.defineProperty(prototype, memberName, {
1420
- value(...args) {
1421
- var _a2;
1422
- const ref = getHostRef(this);
1423
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1424
- var _a3;
1425
- return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1426
- });
1427
- }
1428
- });
1429
- }
1430
- });
1431
- if ((flags & 1 /* isElementConstructor */)) {
1432
- const attrNameToPropName = /* @__PURE__ */ new Map();
1433
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1434
- plt.jmp(() => {
1435
- var _a2;
1436
- const propName = attrNameToPropName.get(attrName);
1437
- const hostRef = getHostRef(this);
1438
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1439
- newValue = this[propName];
1440
- delete this[propName];
1441
- }
1442
- if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1443
- this[propName] == newValue) {
1444
- return;
1445
- } else if (propName == null) {
1446
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1447
- if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1448
- const instance = hostRef.$lazyInstance$ ;
1449
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1450
- entry == null ? void 0 : entry.forEach((callbackName) => {
1451
- if (instance[callbackName] != null) {
1452
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1453
- }
1454
- });
1455
- }
1456
- return;
1457
- }
1458
- const propFlags = members.find(([m]) => m === propName);
1459
- if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
1460
- newValue = newValue === null || newValue === "false" ? false : true;
1461
- }
1462
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1463
- if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1464
- this[propName] = newValue;
1465
- }
1466
- });
1467
- };
1468
- Cstr.observedAttributes = Array.from(
1469
- /* @__PURE__ */ new Set([
1470
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1471
- ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1472
- var _a2;
1473
- const attrName = m[1] || propName;
1474
- attrNameToPropName.set(attrName, propName);
1475
- if (m[0] & 512 /* ReflectAttr */) {
1476
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1477
- }
1478
- return attrName;
1479
- })
1480
- ])
1481
- );
1482
- }
1483
- }
1484
- return Cstr;
1485
- };
1486
-
1487
- // src/runtime/initialize-component.ts
1488
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1489
- let Cstr;
1490
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1491
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1492
- const bundleId = cmpMeta.$lazyBundleId$;
1493
- if (bundleId) {
1494
- const CstrImport = loadModule(cmpMeta, hostRef);
1495
- if (CstrImport && "then" in CstrImport) {
1496
- const endLoad = uniqueTime();
1497
- Cstr = await CstrImport;
1498
- endLoad();
1499
- } else {
1500
- Cstr = CstrImport;
1501
- }
1502
- if (!Cstr) {
1503
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1504
- }
1505
- if (!Cstr.isProxied) {
1506
- {
1507
- cmpMeta.$watchers$ = Cstr.watchers;
1508
- cmpMeta.$serializers$ = Cstr.serializers;
1509
- cmpMeta.$deserializers$ = Cstr.deserializers;
1510
- }
1511
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1512
- Cstr.isProxied = true;
1513
- }
1514
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1515
- {
1516
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1517
- }
1518
- try {
1519
- new Cstr(hostRef);
1520
- } catch (e) {
1521
- consoleError(e, elm);
1522
- }
1523
- {
1524
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1525
- }
1526
- {
1527
- hostRef.$flags$ |= 128 /* isWatchReady */;
1528
- }
1529
- endNewInstance();
1530
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1531
- } else {
1532
- Cstr = elm.constructor;
1533
- const cmpTag = elm.localName;
1534
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1535
- }
1536
- if (Cstr && Cstr.style) {
1537
- let style;
1538
- if (typeof Cstr.style === "string") {
1539
- style = Cstr.style;
1540
- }
1541
- const scopeId2 = getScopeId(cmpMeta);
1542
- if (!styles.has(scopeId2)) {
1543
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1544
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1545
- endRegisterStyles();
1546
- }
1547
- }
1548
- }
1549
- const ancestorComponent = hostRef.$ancestorComponent$;
1550
- const schedule = () => scheduleUpdate(hostRef, true);
1551
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1552
- ancestorComponent["s-rc"].push(schedule);
1553
- } else {
1554
- schedule();
1555
- }
1556
- };
1557
- var fireConnectedCallback = (instance, elm) => {
1558
- {
1559
- safeCall(instance, "connectedCallback", void 0, elm);
1560
- }
1561
- };
1562
-
1563
- // src/runtime/connected-callback.ts
1564
- var connectedCallback = (elm) => {
1565
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1566
- const hostRef = getHostRef(elm);
1567
- if (!hostRef) {
1568
- return;
1569
- }
1570
- const cmpMeta = hostRef.$cmpMeta$;
1571
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1572
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1573
- hostRef.$flags$ |= 1 /* hasConnected */;
1574
- {
1575
- let ancestorComponent = elm;
1576
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1577
- if (ancestorComponent["s-p"]) {
1578
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1579
- break;
1580
- }
1581
- }
1582
- }
1583
- if (cmpMeta.$members$) {
1584
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1585
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
1586
- const value = elm[memberName];
1587
- delete elm[memberName];
1588
- elm[memberName] = value;
1589
- }
1590
- });
1591
- }
1592
- {
1593
- initializeComponent(elm, hostRef, cmpMeta);
1594
- }
1595
- } else {
1596
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1597
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1598
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1599
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1600
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1601
- }
1602
- }
1603
- endConnected();
1604
- }
1605
- };
1606
- var disconnectInstance = (instance, elm) => {
1607
- {
1608
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1609
- }
1610
- };
1611
- var disconnectedCallback = async (elm) => {
1612
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1613
- const hostRef = getHostRef(elm);
1614
- {
1615
- if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
1616
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1617
- hostRef.$rmListeners$ = void 0;
1618
- }
1619
- }
1620
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1621
- disconnectInstance(hostRef.$lazyInstance$, elm);
1622
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1623
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1624
- }
1625
- }
1626
- if (rootAppliedStyles.has(elm)) {
1627
- rootAppliedStyles.delete(elm);
1628
- }
1629
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1630
- rootAppliedStyles.delete(elm.shadowRoot);
1631
- }
1632
- };
1633
-
1634
- // src/runtime/bootstrap-lazy.ts
1635
- var bootstrapLazy = (lazyBundles, options = {}) => {
1636
- var _a;
1637
- if (!win.document) {
1638
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1639
- return;
1640
- }
1641
- const endBootstrap = createTime();
1642
- const cmpTags = [];
1643
- const exclude = options.exclude || [];
1644
- const customElements2 = win.customElements;
1645
- const head = win.document.head;
1646
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1647
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1648
- const deferredConnectedCallbacks = [];
1649
- let appLoadFallback;
1650
- let isBootstrapping = true;
1651
- Object.assign(plt, options);
1652
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1653
- let hasSlotRelocation = false;
1654
- lazyBundles.map((lazyBundle) => {
1655
- lazyBundle[1].map((compactMeta) => {
1656
- var _a2, _b, _c;
1657
- const cmpMeta = {
1658
- $flags$: compactMeta[0],
1659
- $tagName$: compactMeta[1],
1660
- $members$: compactMeta[2],
1661
- $listeners$: compactMeta[3]
1662
- };
1663
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1664
- hasSlotRelocation = true;
1665
- }
1666
- {
1667
- cmpMeta.$members$ = compactMeta[2];
1668
- }
1669
- {
1670
- cmpMeta.$listeners$ = compactMeta[3];
1671
- }
1672
- {
1673
- cmpMeta.$attrsToReflect$ = [];
1674
- }
1675
- {
1676
- cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1677
- cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
1678
- cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
1679
- }
1680
- const tagName = cmpMeta.$tagName$;
1681
- const HostElement = class extends HTMLElement {
1682
- // StencilLazyHost
1683
- constructor(self) {
1684
- super(self);
1685
- this.hasRegisteredEventListeners = false;
1686
- self = this;
1687
- registerHost(self, cmpMeta);
1688
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1689
- {
1690
- if (!self.shadowRoot) {
1691
- createShadowRoot.call(self, cmpMeta);
1692
- } else {
1693
- if (self.shadowRoot.mode !== "open") {
1694
- throw new Error(
1695
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1696
- );
1697
- }
1698
- }
1699
- }
1700
- }
1701
- }
1702
- connectedCallback() {
1703
- const hostRef = getHostRef(this);
1704
- if (!hostRef) {
1705
- return;
1706
- }
1707
- if (!this.hasRegisteredEventListeners) {
1708
- this.hasRegisteredEventListeners = true;
1709
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1710
- }
1711
- if (appLoadFallback) {
1712
- clearTimeout(appLoadFallback);
1713
- appLoadFallback = null;
1714
- }
1715
- if (isBootstrapping) {
1716
- deferredConnectedCallbacks.push(this);
1717
- } else {
1718
- plt.jmp(() => connectedCallback(this));
1719
- }
1720
- }
1721
- disconnectedCallback() {
1722
- plt.jmp(() => disconnectedCallback(this));
1723
- plt.raf(() => {
1724
- var _a3;
1725
- const hostRef = getHostRef(this);
1726
- if (!hostRef) {
1727
- return;
1728
- }
1729
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1730
- if (i2 > -1) {
1731
- deferredConnectedCallbacks.splice(i2, 1);
1732
- }
1733
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1734
- delete hostRef.$vnode$.$elm$;
1735
- }
1736
- });
1737
- }
1738
- componentOnReady() {
1739
- var _a3;
1740
- return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1741
- }
1742
- };
1743
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1744
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1745
- cmpTags.push(tagName);
1746
- customElements2.define(
1747
- tagName,
1748
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1749
- );
1750
- }
1751
- });
1752
- });
1753
- if (cmpTags.length > 0) {
1754
- if (hasSlotRelocation) {
1755
- dataStyles.textContent += SLOT_FB_CSS;
1756
- }
1757
- {
1758
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1759
- }
1760
- if (dataStyles.innerHTML.length) {
1761
- dataStyles.setAttribute("data-styles", "");
1762
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1763
- if (nonce != null) {
1764
- dataStyles.setAttribute("nonce", nonce);
1765
- }
1766
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1767
- }
1768
- }
1769
- isBootstrapping = false;
1770
- if (deferredConnectedCallbacks.length) {
1771
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1772
- } else {
1773
- {
1774
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1775
- }
1776
- }
1777
- endBootstrap();
1778
- };
1779
-
1780
- // src/runtime/fragment.ts
1781
- var Fragment = (_, children) => children;
1782
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1783
- if (listeners && win.document) {
1784
- listeners.map(([flags, name, method]) => {
1785
- const target = getHostListenerTarget(win.document, elm, flags) ;
1786
- const handler = hostListenerProxy(hostRef, method);
1787
- const opts = hostListenerOpts(flags);
1788
- plt.ael(target, name, handler, opts);
1789
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1790
- });
1791
- }
1792
- };
1793
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1794
- var _a;
1795
- try {
1796
- {
1797
- if (hostRef.$flags$ & 256 /* isListenReady */) {
1798
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1799
- } else {
1800
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1801
- }
1802
- }
1803
- } catch (e) {
1804
- consoleError(e, hostRef.$hostElement$);
1805
- }
1806
- };
1807
- var getHostListenerTarget = (doc, elm, flags) => {
1808
- if (flags & 8 /* TargetWindow */) {
1809
- return win;
1810
- }
1811
- return elm;
1812
- };
1813
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1814
- passive: (flags & 1 /* Passive */) !== 0,
1815
- capture: (flags & 2 /* Capture */) !== 0
1816
- } : (flags & 2 /* Capture */) !== 0;
1817
-
1818
- // src/runtime/nonce.ts
1819
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1820
-
1821
- export { Fragment as F, Host as H, getMode as a, bootstrapLazy as b, setGlobalMode as c, getTheme as d, setGlobalTheme as e, configureLeKit as f, globalScripts as g, getLeKitConfig as h, createEvent as i, getElement as j, h as k, getAssetPath as l, promiseResolve as p, registerInstance as r, setNonce as s };
1822
- //# sourceMappingURL=index-CwNQ1GTa.js.map
1823
-
1824
- //# sourceMappingURL=index-CwNQ1GTa.js.map