ranui 0.2.1-alpha.1 → 0.2.1-alpha.4

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 (312) hide show
  1. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  2. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  3. package/dist/arc-D25LhgTs.cjs +1 -0
  4. package/dist/arc-DRPGof21.js +82 -0
  5. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  6. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  7. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  8. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  9. package/dist/array-By5736M5.js +7 -0
  10. package/dist/array-C3cbN3GY.cjs +1 -0
  11. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  12. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  13. package/dist/builder.d.ts +2 -2
  14. package/dist/builder.js +39 -34
  15. package/dist/{builtin-D9djWkCE.js → builtin-1lUEp_ro.js} +83 -76
  16. package/dist/button-Cj-XSCsd.js +117 -0
  17. package/dist/button.js +1 -1
  18. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  19. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  20. package/dist/{card-CqJa4Q_v.js → card-BHN9Xp4S.js} +2 -2
  21. package/dist/card.js +1 -1
  22. package/dist/channel-C9WSNwcS.cjs +1 -0
  23. package/dist/channel-k5-UxdcV.js +5 -0
  24. package/dist/{checkbox-CThC9-vy.js → checkbox-O_J_n1_W.js} +10 -10
  25. package/dist/checkbox.js +1 -1
  26. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  27. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  28. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  29. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  30. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  31. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  32. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  33. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  34. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  35. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  36. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  37. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  38. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  39. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  40. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  41. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  42. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  43. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  44. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  45. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  46. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  47. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  48. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  49. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  50. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  51. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  52. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  53. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  54. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  55. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  56. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  57. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  58. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  59. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  60. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  61. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  62. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  63. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  64. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  65. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  66. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  67. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  68. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  69. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  70. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  71. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  72. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  73. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  74. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  75. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  76. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  77. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  78. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  79. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  80. package/dist/{colorpicker-XNxDRcQ-.js → colorpicker-mebH0XLm.js} +8 -8
  81. package/dist/colorpicker.js +1 -1
  82. package/dist/components/glass/index.d.ts +52 -0
  83. package/dist/components/icon/core-icons.d.ts +13 -0
  84. package/dist/components/icon/index.d.ts +1 -1
  85. package/dist/components/mermaid/index.d.ts +52 -0
  86. package/dist/components/modal/index.d.ts +9 -0
  87. package/dist/content-YOKzMoc7.js +39 -0
  88. package/dist/content.js +5 -0
  89. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  90. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  91. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  92. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  93. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  94. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  95. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  96. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  97. package/dist/dagre-D1-W1tt6.cjs +1 -0
  98. package/dist/dagre-D8GLTwuf.js +1578 -0
  99. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  100. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  101. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  102. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  103. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  104. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  105. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  106. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  107. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  108. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  109. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  110. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  111. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  112. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  113. package/dist/dist-C0Fwsvsq.js +70 -0
  114. package/dist/dist-C20XxSsP.cjs +1 -0
  115. package/dist/{dropdown-CCvsambb.js → dropdown-CzGAVWYC.js} +4 -4
  116. package/dist/dropdown.js +1 -1
  117. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  118. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  119. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  120. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  121. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  122. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  123. package/dist/factory-ZNhcQ4tf.js +482 -0
  124. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  125. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  126. package/dist/{form-Ceq3uJzz.js → form-B8afuJlF.js} +5 -5
  127. package/dist/form.js +1 -1
  128. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  129. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  130. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  131. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  132. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  133. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  134. package/dist/glass-BniIptBE.js +115 -0
  135. package/dist/glass.js +5 -0
  136. package/dist/graphlib-CCKThIKP.js +1104 -0
  137. package/dist/graphlib-Du-578Js.cjs +1 -0
  138. package/dist/{icon-C_ENrJ3F.js → icon-GZrfSeon.js} +77 -25
  139. package/dist/icon.js +1 -1
  140. package/dist/icons.js +1 -1
  141. package/dist/iife/button.iife.js +1 -1
  142. package/dist/iife/card.iife.js +1 -1
  143. package/dist/iife/checkbox.iife.js +1 -1
  144. package/dist/iife/colorpicker.iife.js +2 -2
  145. package/dist/iife/content.iife.js +1 -0
  146. package/dist/iife/dropdown.iife.js +1 -1
  147. package/dist/iife/form.iife.js +1 -1
  148. package/dist/iife/glass.iife.js +1 -0
  149. package/dist/iife/icon.iife.js +1 -1
  150. package/dist/iife/image.iife.js +1 -1
  151. package/dist/iife/input.iife.js +1 -1
  152. package/dist/iife/loading.iife.js +1 -1
  153. package/dist/iife/math.iife.js +14 -14
  154. package/dist/iife/mermaid.iife.js +3535 -0
  155. package/dist/iife/message.iife.js +1 -1
  156. package/dist/iife/modal.iife.js +1 -1
  157. package/dist/iife/player.iife.js +8 -8
  158. package/dist/iife/popover.iife.js +1 -1
  159. package/dist/iife/progress.iife.js +1 -1
  160. package/dist/iife/radar.iife.js +1 -1
  161. package/dist/iife/route.iife.js +1 -1
  162. package/dist/iife/router.iife.js +1 -1
  163. package/dist/iife/scratch.iife.js +1 -1
  164. package/dist/iife/section.iife.js +1 -1
  165. package/dist/iife/select.iife.js +2 -2
  166. package/dist/iife/skeleton.iife.js +1 -1
  167. package/dist/iife/tab.iife.js +1 -1
  168. package/dist/iife/tabpane.iife.js +1 -1
  169. package/dist/iife/theme-switch.iife.js +1 -1
  170. package/dist/{image-B7MBI5n_.js → image-CqoQfJoV.js} +4 -4
  171. package/dist/image.js +1 -1
  172. package/dist/index.cjs +38 -37
  173. package/dist/index.d.ts +8 -0
  174. package/dist/index.iife.js +3623 -88
  175. package/dist/index.js +88 -84
  176. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  177. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  178. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  179. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  180. package/dist/init-1VpIn1S3.js +16 -0
  181. package/dist/init-CbDwVtpO.cjs +1 -0
  182. package/dist/{input-RNqdEHPf.js → input-BlwAXu7I.js} +6 -6
  183. package/dist/input.js +1 -1
  184. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  185. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  186. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  187. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  188. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  189. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  190. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  191. package/dist/katex-Pg2EqTH0.js +23485 -0
  192. package/dist/line-BIPmUVxO.js +33 -0
  193. package/dist/line-CAB5QHC6.cjs +1 -0
  194. package/dist/linear-B2AM4ZBe.js +259 -0
  195. package/dist/linear-CSAfNEpl.cjs +1 -0
  196. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  197. package/dist/link.js +1 -1
  198. package/dist/{loading-B9MFI03l.js → loading-M6gWxLbm.js} +4 -4
  199. package/dist/loading.js +1 -1
  200. package/dist/map-BC2bk_rV.cjs +1 -0
  201. package/dist/map-DMSWkcq6.js +208 -0
  202. package/dist/{math-CudIwEXZ.js → math-8E-45Y8e.js} +4 -4
  203. package/dist/math.js +1 -1
  204. package/dist/mermaid-C1oQyPE3.js +261 -0
  205. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  206. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  207. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  208. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  209. package/dist/mermaid.js +5 -0
  210. package/dist/{message-DW7qWpEm.js → message-CNdmbeLf.js} +6 -6
  211. package/dist/message.js +1 -1
  212. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  213. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  214. package/dist/{modal-CrvGKL2B.js → modal-gRagDkTb.js} +40 -24
  215. package/dist/modal.js +1 -1
  216. package/dist/ordinal-BMN81JG2.js +64 -0
  217. package/dist/ordinal-BplLHIij.cjs +1 -0
  218. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  219. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  220. package/dist/path-Bja5PoYn.js +82 -0
  221. package/dist/path-DmfWsuKi.cjs +1 -0
  222. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  223. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  224. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  225. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  226. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  227. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  228. package/dist/{player-BKQaaT7o.js → player-CAQ5Og2P.js} +196 -195
  229. package/dist/player.js +1 -1
  230. package/dist/{popover-CvYIVgUS.js → popover-BZKSLe3D.js} +22 -54
  231. package/dist/popover.js +1 -1
  232. package/dist/{progress-C6jctsFH.js → progress-vk40tuhm.js} +5 -5
  233. package/dist/progress.js +1 -1
  234. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  235. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  236. package/dist/{radar-BUb4EzmG.js → radar-Bg0cexzU.js} +5 -5
  237. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  238. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  239. package/dist/radar.js +1 -1
  240. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  241. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  242. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  243. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  244. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  245. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  246. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  247. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  248. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  249. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  250. package/dist/ranui.css +1 -1
  251. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  252. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  253. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  254. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  255. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  256. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  257. package/dist/{route-Djrf9UR_.js → route-CGwS0cd_.js} +10 -10
  258. package/dist/route.js +1 -1
  259. package/dist/{router-BU2KhtxV.js → router-BK6DEkcN.js} +5 -5
  260. package/dist/router.js +1 -1
  261. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  262. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  263. package/dist/{scratch-CO4I2dIa.js → scratch-ClF1awGi.js} +2 -2
  264. package/dist/scratch.js +1 -1
  265. package/dist/{section-CsUkp8bv.js → section-BL0V7Kjf.js} +2 -2
  266. package/dist/section.js +1 -1
  267. package/dist/{select-Dn26ajJZ.js → select-BIFVbQIj.js} +13 -13
  268. package/dist/select.js +1 -1
  269. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  270. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  271. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  272. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  273. package/dist/{skeleton-BuMLhvzQ.js → skeleton-D7JIbROq.js} +5 -5
  274. package/dist/skeleton.js +1 -1
  275. package/dist/src-C9EhKhbk.cjs +1 -0
  276. package/dist/src-DtRLxcYO.js +2104 -0
  277. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  278. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  279. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  280. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  281. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  282. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  283. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  284. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  285. package/dist/{tab-40fDkuox.js → tab-DFVtDJb2.js} +5 -5
  286. package/dist/tab.js +1 -1
  287. package/dist/{tabpane-F4Pd7JtC.js → tabpane-C3qZGN-D.js} +5 -5
  288. package/dist/tabpane.js +1 -1
  289. package/dist/test/ssr/stream.test.d.ts +1 -0
  290. package/dist/{theme-switch-B09egc6h.js → theme-switch-BXNH5uPD.js} +45 -45
  291. package/dist/theme-switch.js +1 -1
  292. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  293. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  294. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  295. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  296. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  297. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  298. package/dist/utils/builder/core.d.ts +135 -3
  299. package/dist/utils/builder/index.d.ts +1 -1
  300. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  301. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  302. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  303. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  304. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  305. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  306. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  307. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  308. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  309. package/docs/BUILDER.md +170 -2
  310. package/package.json +7 -1
  311. package/dist/button-BfYw0fes.js +0 -117
  312. package/dist/factory-DCrO37si.js +0 -334
@@ -1,5 +1,5 @@
1
- var ranui_colorpicker=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),i=e=>typeof e==`function`,a=typeof window<`u`,o=()=>{if(!a)return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},s=12e4,c=`__ranuts_bridge__`,l=`default`,ee=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},te=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=l){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,ee.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:c,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(i(l)){let t=e.source??this.targetWindow;Promise.resolve(l(r)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},s),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(a),n(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{ee.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new te(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new d(u[0],3609767458),new d(u[1],602891725),new d(u[2],3964484399),new d(u[3],2173295548),new d(u[4],4081628472),new d(u[5],3053834265),new d(u[6],2937671579),new d(u[7],3664609560),new d(u[8],2734883394),new d(u[9],1164996542),new d(u[10],1323610764),new d(u[11],3590304994),new d(u[12],4068182383),new d(u[13],991336113),new d(u[14],633803317),new d(u[15],3479774868),new d(u[16],2666613458),new d(u[17],944711139),new d(u[18],2341262773),new d(u[19],2007800933),new d(u[20],1495990901),new d(u[21],1856431235),new d(u[22],3175218132),new d(u[23],2198950837),new d(u[24],3999719339),new d(u[25],766784016),new d(u[26],2566594879),new d(u[27],3203337956),new d(u[28],1034457026),new d(u[29],2466948901),new d(u[30],3758326383),new d(u[31],168717936),new d(u[32],1188179964),new d(u[33],1546045734),new d(u[34],1522805485),new d(u[35],2643833823),new d(u[36],2343527390),new d(u[37],1014477480),new d(u[38],1206759142),new d(u[39],344077627),new d(u[40],1290863460),new d(u[41],3158454273),new d(u[42],3505952657),new d(u[43],106217008),new d(u[44],3606008344),new d(u[45],1432725776),new d(u[46],1467031594),new d(u[47],851169720),new d(u[48],3100823752),new d(u[49],1363258195),new d(u[50],3750685593),new d(u[51],3785050280),new d(u[52],3318307427),new d(u[53],3812723403),new d(u[54],2003034995),new d(u[55],3602036899),new d(u[56],1575990012),new d(u[57],1125592928),new d(u[58],2716904306),new d(u[59],442776044),new d(u[60],593698344),new d(u[61],3733110249),new d(u[62],2999351573),new d(u[63],3815920427),new d(3391569614,3928383900),new d(3515267271,566280711),new d(3940187606,3454069534),new d(4118630271,4000239992),new d(116418474,1914138554),new d(174292421,2731055270),new d(289380356,3203993006),new d(460393269,320620315),new d(685471733,587496836),new d(852142971,1086792851),new d(1017036298,365543100),new d(1126000580,2618297676),new d(1288033470,3409855158),new d(1501505948,4234509866),new d(1607167915,987167468),new d(1816402316,1246189591),new d(0,1),new d(0,32898),new d(2147483648,32906),new d(2147483648,2147516416),new d(0,32907),new d(0,2147483649),new d(2147483648,2147516545),new d(2147483648,32777),new d(0,138),new d(0,136),new d(0,2147516425),new d(0,2147483658),new d(0,2147516555),new d(2147483648,139),new d(2147483648,32905),new d(2147483648,32771),new d(2147483648,32770),new d(2147483648,128),new d(0,32778),new d(2147483648,2147483658),new d(2147483648,2147516545),new d(2147483648,32896),new d(0,2147483649),new d(2147483648,2147516424);var f=(e,t=500)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(void 0,r)},t)}},p=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},m=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},ne=()=>{let e=0,t=null;return function(n,r=300){return function(...i){let a=Date.now();a-e>=r?(t!=null&&(clearTimeout(t),t=null),e=a,n.apply(this,i)):t??=window.setTimeout(()=>{e=Date.now(),n.apply(this,i),t=null},r-(a-e))}}},re=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(re),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(re);var h=typeof document>`u`,g=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},_=0,ie=1,v=2,y=null,b=null,ae=0,x=new Set,S=!1;function oe(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(le(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)w(e,v);ae===0&&ue()}}]}function C(e){let t=se(e,!0);return ce(t),de(t),()=>pe(t)}function se(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:v,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:b}}function ce(e){b&&b.owned.push(e)}function le(e){y&&(y.sources.add(e),e.observers.add(y))}function w(e,t){if(e.disposed||e.state>=t)return;let n=e.state===_;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)w(t,ie)}function ue(){if(!(ae>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||T(t)}}finally{S=!1}}}function T(e){if(!(e.disposed||e.state===_)){if(e.state===ie)for(let t of e.sources)`fn`in t&&T(t);e.state===v&&de(e),e.state=_}}function de(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);fe(e);let t=y,n=b;y=e,b=e,e.running=!0,e.state=_;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)w(t,v)}}finally{e.running=!1,y=t,b=n}}function fe(e){for(let t of e.owned)pe(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function pe(e){e.disposed||(e.disposed=!0,fe(e),e.observers.clear())}function E(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function me(e){return E(e)}var he=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ge=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},D=(e,t,n)=>{for(let r of e)he(r)&&(ge(r,t)&&n.push(r),D(r.childrenList,t,n))},O=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?E(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}},_e=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new O)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ve(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${me(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${me(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?E(e):(e instanceof O,e.serialize())).join(``):a+=E(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ve=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${E(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?E(e):(e instanceof O,e.serialize())).join(``)}</template>`}},ye=class e{el;constructor(e){this.el=h?new _e(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?C(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{h?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...t){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?h?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(h){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new be(this.el,t,e)}build(){return this.el}serialize(){if(h)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},be=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof ye?this.root.appendChild(e.build()):typeof e==`string`?h?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(h)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return h?this.root.serialize():this.root.innerHTML}},k=e=>new ye(e),A=()=>k(`div`),xe=()=>k(`span`),j=()=>k(`slot`),Se=()=>k(`input`),Ce=()=>k(`style`),we=()=>k(`label`),M=[!1,`false`,null,void 0],N=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!M.includes(n))},Te=new Map;function P(e,t){h?(Te.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var F=typeof document<`u`?HTMLElement:_e,I=new Map,L=new Map,Ee=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!I.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),I.set(t,e)}let n=I.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},De=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!L.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),L.set(t,e)}let n=L.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Oe=new WeakMap,ke=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,R=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Oe.get(e)||e.attachShadow(n);return Oe.set(e,r),Ee(r,t?`${t}\n${ke}`:ke),r},z=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},B=(e,t,n=``)=>e.getAttribute(t)??n,V=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},H=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&De(t,a)},Ae=e=>{let{r:t,g:n,b:r}=je(e);return U(t,n,r)},je=e=>(e[0]===`#`&&(e=e.substr(1)),e.length===3?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16)}),U=(e,t,n)=>{let r,i=Math.max(e,t,n),a=i-Math.min(e,t,n);r=a===0?0:e===i?(t-n)/a%6:t===i?(n-e)/a+2:(e-t)/a+4,r=Math.round(r*60),r<0&&(r+=360);let o=Math.round((i===0?0:a/i)*100),s=Math.round(i/255*100);return{h:r,s:o,v:s}},W=(e,t,n)=>{t/=100,n/=100;let r=[],i=n*t,a=e/60,o=i*(1-Math.abs(a%2-1)),s=n-i;return r=a>=0&&a<1?[i,o,0]:a>=1&&a<2?[o,i,0]:a>=2&&a<3?[0,i,o]:e>=3&&a<4?[0,o,i]:e>=4&&a<5?[o,0,i]:e>=5&&a<=6?[i,0,o]:[0,0,0],{r:Math.round(255*(r[0]+s)),g:Math.round(255*(r[1]+s)),b:Math.round(255*(r[2]+s))}},G=e=>{let t=e.toString(16);return t.length===1?`0`+t:t},K=(e,t,n)=>`#`+[G(e),G(t),G(n)].join(``),Me=/^#([\da-f]{6}|[\da-f]{3})$/i,Ne=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/,Pe=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3}(\.\d+)?)\)$/,Fe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`;P(`r-content`,class extends F{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=R(this,Fe);let e=z(this._shadowDom,`.slot`,()=>j().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var Ie=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,Le=300;P(`r-dropdown`,class extends F{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=R(this,Ie);let e=z(this._shadowDom,`.ranui-dropdown-container`,()=>A().class(`ranui-dropdown-container`).children(A().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(j().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return B(this,`transit`)}set transit(e){V(this,`transit`,e,{removeEmpty:!0})}get arrow(){return B(this,`arrow`)}set arrow(e){V(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(p(this.dropdown,this.transit),setTimeout(()=>{m(this.dropdown,this.transit)},Le))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=A().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(p(this.dropdown,this.transit),setTimeout(()=>{m(this.dropdown,this.transit)},Le)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}});var Re=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-popover-host-display,block)}.ran-popover{box-sizing:var(--ran-popover-box-sizing,border-box);position:var(--ran-popover-position,relative);display:var(--ran-popover-display,block);margin:var(--ran-popover-margin,0);padding:var(--ran-popover-padding,0)}.ran-popover-block{display:var(--ran-popover-block-display,block)}`,q=8,J=300,Y=16,ze={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`},left:{add:`ran-dropdown-left-in`,remove:`ran-dropdown-left-out`},right:{add:`ran-dropdown-right-in`,remove:`ran-dropdown-right-out`}};P(`r-popover`,class extends F{_events=new g;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;dropDownInTimeId;dropDownOutTimeId;removeTimeId;static get observedAttributes(){return[`placement`,`trigger`,`sheet`]}closePopover=()=>{this.setDropdownDisplayNone()};constructor(){super(),this._shadowDom=R(this,Re);let e=z(this._shadowDom,`.ran-popover-block`,()=>A().class(`ran-popover-block`).role(`tooltip`).children(j().class(`slot`)).build());this.popoverBlock=e,this._slot=e.querySelector(`.slot`)}get placement(){return B(this,`placement`,`top`)}set placement(e){V(this,`placement`,e)}get trigger(){return B(this,`trigger`,`hover`)}set trigger(e){V(this,`trigger`,e)}get getPopupContainerId(){return B(this,`getPopupContainerId`)}set getPopupContainerId(e){V(this,`getPopupContainerId`,e)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`aria-haspopup`,`dialog`),this.setAttribute(`aria-expanded`,`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};stopPropagation=e=>{e.stopPropagation()};createContent=e=>{if(e){if(!this.popoverContent){this.popoverContent=k(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation);let e=A().children(this.popoverContent).build();this.trigger.includes(`hover`)&&!o()&&(this.popoverContent?.addEventListener(`mouseleave`,this.blur),this.popoverContent?.addEventListener(`mouseenter`,this.removeDropDownTimeId)),document.body.appendChild(e)}if(this.popoverContent&&e.length>0){this.popoverContent.innerHTML=``;let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);this.popoverContent.appendChild(t)}}};watchContent=e=>{let{value:t}=e.detail;this.createContent(t.content)};blur=f(()=>{this.removeTimeId&&this.removeDropDownTimeId(),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(),this.setDropdownDisplayNone()},J)},Y);removeDropDownTimeId=f(()=>{this.trigger.includes(`hover`)&&!o()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},Y);setDropdownDisplayBlock=f(()=>{this.dropDownInTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`block`&&(this.updateAriaExpanded(!0),this.popoverContent.setAttribute(`transit`,ze[this.placement].add),this.popoverContent?.style.setProperty(`display`,`block`),this.placementPosition(),this.dropDownInTimeId=setTimeout(()=>{this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0},J)))},Y);setDropdownDisplayNone=f(()=>{this.dropDownOutTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`none`&&(this.updateAriaExpanded(!1),this.popoverContent.setAttribute(`transit`,ze[this.placement].remove),this.dropDownOutTimeId=setTimeout(()=>{this.popoverContent?.style.setProperty(`display`,`none`),this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0},J)))},Y);placementPosition=()=>{if(!this.popoverContent)return;let{top:e,left:t,bottom:n,width:r,height:i}=this.getBoundingClientRect(),a=n+window.scrollY+q,o=t+window.scrollX,s=document.getElementById(this.getPopupContainerId),c=this.popoverContent.getBoundingClientRect();this.placement===`top`&&(a=e+window.scrollY-Math.max(c.height,i)-q,this.getPopupContainerId&&s&&(o=t-s.getBoundingClientRect().left,a=e-s.getBoundingClientRect().top-this.popoverContent.clientHeight-q,o=t-s.getBoundingClientRect().left)),this.placement===`left`&&(o=t-Math.max(c.width,r)-q,a=e+window.scrollY),this.placement===`right`&&(o=t+r+q,a=e+window.scrollY),this.popoverContent.style.setProperty(`inset`,`${a}px auto auto ${o}px`),this.popoverContent.style.setProperty(`--ran-x`,`${o}px`),this.popoverContent.style.setProperty(`--ran-y`,`${a}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-width`,`${r}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-height`,`${i}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-width`,`${c.width}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-height`,`${c.height}px`)};hoverPopover=e=>{this.clickPopover(e)};clickContent=e=>{e.stopPropagation()};clickPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock()};keydownPopover=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.setDropdownDisplayBlock()),e.key===`Escape`&&(e.preventDefault(),this.setDropdownDisplayNone())};clickRemovePopover=e=>{this.hoverRemovePopover(e)};popoverTrigger=()=>{this._events.abort();for(let e of this.children)e.tagName===`R-CONTENT`&&this._events.on(e,`change`,this.watchContent);this.trigger.includes(`hover`)&&(this._events.on(this,`mouseenter`,this.hoverPopover),this._events.on(this,`mouseleave`,this.blur)),this._events.on(this,`click`,this.clickPopover).on(this,`keydown`,this.keydownPopover).on(document,`click`,this.clickRemovePopover)};hoverRemovePopover=e=>{e.stopPropagation(),this.setDropdownDisplayNone()};changePlacement=f(()=>{this.placement===`top`&&this.popoverContent?.setAttribute(`arrow`,`bottom`),this.placement===`bottom`&&this.popoverContent?.setAttribute(`arrow`,`top`),this.placement===`left`&&this.popoverContent?.setAttribute(`arrow`,`right`),this.placement===`right`&&this.popoverContent?.setAttribute(`arrow`,`left`)},Y);connectedCallback(){this.initAria(),this.handlerExternalCss();for(let e of this.children)e.tagName===`R-CONTENT`&&this.createContent(e.children);this.popoverTrigger(),this.changePlacement()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`trigger`&&this.popoverTrigger(),e===`placement`&&this.changePlacement(),e===`sheet`&&this.handlerExternalCss())}});var Be=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,Ve=!1,He=new Map,X=!1,Z=e=>/<svg[\s>]/i.test(e),Ue=e=>{if(typeof e==`string`)return Z(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Z(n))return n;let r=t.default;if(typeof r==`string`&&Z(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Z(e.data))return e.data}},We=(e,t)=>{X=!0;let n=Ue(t);n&&(He.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))};P(`r-icon`,class extends F{isDev=Ve;_events=new g;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=R(this,Be);let e=z(this._shadowDom,`.ran-icon`,()=>A().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return B(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return B(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return B(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return B(this,`aria-label`)}set ariaLabel(e){V(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=He.get(t);if(!n){this.isDev&&X&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>Z(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=k(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}});var Ge=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}:host([placeholder]) .ran-input-label{transform:var(--ran-input-label-placeholder-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-label-placeholder-top,0)}:host .ran-input-label{transform:var(--ran-input-label-transform,translateY(-50%));top:var(--ran-input-label-top,50%)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);width:var(--ran-input-width,100%);height:var(--ran-input-height,auto);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,12px);font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,4px);border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,none);min-height:var(--ran-input-min-height,32px);border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:focus-within{border-color:var(--ran-input-active-border-color,var(--ran-color-primary,#006bff));box-shadow:var(--ran-input-active-box-shadow,0 0 0 2px var(--ran-blue-400,#cae7ff));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-primary,#006bff));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color,var(--ran-color-primary,#006bff))}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform,translateY(calc(-50% - .43em)) scale(.8));color:var(--ran-input-label-value-color,var(--ran-color-text-disabled,#00000040))}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,28px)}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";pointer-events:none;width:16px;height:16px;position:absolute;top:50%;right:10px;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-label-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5))}.ran-input[disabled]>.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));border-color:var(--ran-input-label-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-label-disabled-box-shadow,none);cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,30px);min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,14px);line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,none);outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 2px);font-weight:var(--ran-input-content-font-weight,400)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform,translateY(calc(-50% - .43em)) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-content-focus-label-top,0px)}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-label{box-sizing:var(--ran-input-label-box-sizing,border-box);pointer-events:var(--ran-input-label-pointer-events,none);position:var(--ran-input-label-position,absolute);font-size:var(--ran-input-label-font-size,14px);left:var(--ran-input-label-left,8px);transition:var(--ran-input-label-transition,transform .3s, top .3s, font-size .3s);transform-origin:var(--ran-input-label-transform-origin,left);padding:var(--ran-input-label-padding,0 0);color:var(--ran-input-label-color,var(--ran-color-text-disabled,#999));background:var(--ran-input-label-background,var(--ran-color-bg-elevated,#fff));opacity:var(--ran-input-label-opacity,.9)}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,12px);line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,Ke=0;P(`r-input`,class extends F{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new g;_shadowDom;_input;_label;_inputContent;_icon;_message;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=R(this,Ge);let e=z(this._shadowDom,`.ran-input`,()=>A().class(`ran-input`).part(`input`).children(Se().class(`ran-input-content`).part(`content`)).build());this._input=e,this._inputContent=e.querySelector(`.ran-input-content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++Ke}`)}get value(){return this.getAttribute(`value`)||``}set value(e){!N(this)&&e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``)}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){!e||e===`false`?this.removeAttribute(`required`):this.setAttribute(`required`,``)}get disabled(){return N(this)}set disabled(e){M.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._input.removeChild(this._label),void 0)):this._label?this._label.innerHTML=t:(this._label=we().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._input.appendChild(this._label)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=A().class(`ran-input-message`).part(`message`).build(),this._shadowDom.appendChild(this._message)),this._message.textContent=t):this._message&&=(this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``))};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(M.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)))};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=k(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),N(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}});var qe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);height:var(--ran-select-host-height,32px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent)}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,.6)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-selection-hover-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):hover) .selection-search{cursor:var(--ran-select-selection-hover-search-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection-item{cursor:var(--ran-select-selection-hover-item-cursor,pointer);color:var(--ran-select-selection-hover-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host([type=text]) .selection{border:var(--ran-select-selection-text-border,none);background:var(--ran-select-selection-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled],[type=text]):focus) .selection{border:var(--ran-select-selection-focus-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):focus) .selection-search{cursor:var(--ran-select-selection-focus-search-cursor,pointer)}:host(:not([disabled],[type=text]):focus) .selection-item{cursor:var(--ran-select-selection-focus-item-cursor,pointer);color:var(--ran-select-selection-focus-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host .selection-search{display:var(--ran-select-selection-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-selection-search-visible-cursor,text);display:var(--ran-select-selection-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-selection-search-visible-item-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-selection-search-visible-display,block);cursor:var(--ran-select-selection-search-visible-cursor,text);opacity:var(--ran-select-selection-search-visible-opacity,1)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,14px);box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,inline-block)}.ran-select .selection{position:var(--ran-select-selection-position,relative);background-color:var(--ran-select-selection-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-selection-background-image,none);border:var(--ran-select-selection-border,1px solid var(--ran-color-border,#eaeaea));transition:var(--ran-select-selection-transition,none);width:var(--ran-select-selection-width,100%);height:var(--ran-select-selection-height,100%);padding:var(--ran-select-selection-padding,0 11px);box-sizing:var(--ran-select-selection-box-sizing,border-box);margin:var(--ran-select-selection-margin,0);color:var(--ran-select-selection-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-selection-font-size,14px);line-height:var(--ran-select-selection-line-height,1.57143);list-style:var(--ran-select-selection-list-style,none);font-family:var(--ran-select-selection-font-family,inherit);display:var(--ran-select-selection-display,flex);border-radius:var(--ran-select-selection-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-selection-search-position,absolute);opacity:var(--ran-select-selection-search-opacity,0);top:var(--ran-select-selection-search-top,0);left:var(--ran-select-selection-search-left,0);height:var(--ran-select-selection-search-height,100%);margin:var(--ran-select-selection-search-margin,0);padding:var(--ran-select-selection-search-padding,0);background:var(--ran-select-selection-search-background,transparent);border:var(--ran-select-selection-search-border,none);outline:var(--ran-select-selection-search-outline,none);appearance:var(--ran-select-selection-search-appearance,none);font-family:var(--ran-select-selection-search-font-family,inherit);cursor:var(--ran-select-selection-search-cursor,not-allowed);inset-inline-start:var(--ran-select-selection-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-selection-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-selection-search-cancel-display,none);-webkit-appearance:var(--ran-select-selection-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-selection-search-input-border,none);padding:var(--ran-select-selection-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-selection-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-selection-search-input-active-border,none);padding:var(--ran-select-selection-search-input-active-padding,0);height:var(--ran-select-selection-search-input-active-height,100%);outline:var(--ran-select-selection-search-input-active-outline,none);border-color:var(--ran-select-selection-search-input-active-border-color,transparent);box-shadow:var(--ran-select-selection-search-input-active-box-shadow,none);border-right-width:var(--ran-select-selection-search-input-active-border-right-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-selection-search-input-content-min-height,0)}.ran-select .selection-item{position:var(--ran-select-selection-item-position,absolute);top:var(--ran-select-selection-item-top,0);left:var(--ran-select-selection-item-left,12px);right:var(--ran-select-selection-item-right,28px);margin:var(--ran-select-selection-item-margin,0);padding:var(--ran-select-selection-item-padding,0);background:var(--ran-select-selection-item-background,transparent);border:var(--ran-select-selection-item-border,none);outline:var(--ran-select-selection-item-outline,none);appearance:var(--ran-select-selection-item-appearance,none);font-family:var(--ran-select-selection-item-font-family,inherit);height:var(--ran-select-selection-item-height,100%);display:var(--ran-select-selection-item-display,flex);align-items:var(--ran-select-selection-item-align-items,center);user-select:var(--ran-select-selection-item-user-select,none);overflow:var(--ran-select-selection-item-overflow,hidden);white-space:var(--ran-select-selection-item-white-space,nowrap);text-overflow:var(--ran-select-selection-item-text-overflow,ellipsis);cursor:var(--ran-select-selection-item-cursor,pointer)}.ran-select .selection-select{color:var(--ran-select-selection-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-selection-icon-display,flex);align-items:var(--ran-select-selection-icon-align-items,center);color:var(--ran-select-selection-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-selection-icon-font-style,normal);text-align:var(--ran-select-selection-icon-text-align,center);text-transform:var(--ran-select-selection-icon-text-transform,none);text-rendering:var(--ran-select-selection-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-selection-icon-position,absolute);top:var(--ran-select-selection-icon-top,50%);height:var(--ran-select-selection-icon-height,16px);transform:var(--ran-select-selection-icon-transform,translateY(-50%));margin-top:var(--ran-select-selection-icon-margin-top,0);font-size:var(--ran-select-selection-icon-font-size,12px);pointer-events:var(--ran-select-selection-icon-pointer-events,none);inset-inline-start:var(--ran-select-selection-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-selection-icon-inset-inline-end,8px)}`,Je={success:!0,_identification:!0,data:`<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"
1
+ var ranui_colorpicker=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),i=e=>typeof e==`function`,a=typeof window<`u`,o=()=>{if(!a)return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},s=12e4,c=`__ranuts_bridge__`,l=`default`,ee=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},te=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=l){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,ee.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:c,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(i(l)){let t=e.source??this.targetWindow;Promise.resolve(l(r)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},s),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(a),n(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{ee.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new te(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new d(u[0],3609767458),new d(u[1],602891725),new d(u[2],3964484399),new d(u[3],2173295548),new d(u[4],4081628472),new d(u[5],3053834265),new d(u[6],2937671579),new d(u[7],3664609560),new d(u[8],2734883394),new d(u[9],1164996542),new d(u[10],1323610764),new d(u[11],3590304994),new d(u[12],4068182383),new d(u[13],991336113),new d(u[14],633803317),new d(u[15],3479774868),new d(u[16],2666613458),new d(u[17],944711139),new d(u[18],2341262773),new d(u[19],2007800933),new d(u[20],1495990901),new d(u[21],1856431235),new d(u[22],3175218132),new d(u[23],2198950837),new d(u[24],3999719339),new d(u[25],766784016),new d(u[26],2566594879),new d(u[27],3203337956),new d(u[28],1034457026),new d(u[29],2466948901),new d(u[30],3758326383),new d(u[31],168717936),new d(u[32],1188179964),new d(u[33],1546045734),new d(u[34],1522805485),new d(u[35],2643833823),new d(u[36],2343527390),new d(u[37],1014477480),new d(u[38],1206759142),new d(u[39],344077627),new d(u[40],1290863460),new d(u[41],3158454273),new d(u[42],3505952657),new d(u[43],106217008),new d(u[44],3606008344),new d(u[45],1432725776),new d(u[46],1467031594),new d(u[47],851169720),new d(u[48],3100823752),new d(u[49],1363258195),new d(u[50],3750685593),new d(u[51],3785050280),new d(u[52],3318307427),new d(u[53],3812723403),new d(u[54],2003034995),new d(u[55],3602036899),new d(u[56],1575990012),new d(u[57],1125592928),new d(u[58],2716904306),new d(u[59],442776044),new d(u[60],593698344),new d(u[61],3733110249),new d(u[62],2999351573),new d(u[63],3815920427),new d(3391569614,3928383900),new d(3515267271,566280711),new d(3940187606,3454069534),new d(4118630271,4000239992),new d(116418474,1914138554),new d(174292421,2731055270),new d(289380356,3203993006),new d(460393269,320620315),new d(685471733,587496836),new d(852142971,1086792851),new d(1017036298,365543100),new d(1126000580,2618297676),new d(1288033470,3409855158),new d(1501505948,4234509866),new d(1607167915,987167468),new d(1816402316,1246189591),new d(0,1),new d(0,32898),new d(2147483648,32906),new d(2147483648,2147516416),new d(0,32907),new d(0,2147483649),new d(2147483648,2147516545),new d(2147483648,32777),new d(0,138),new d(0,136),new d(0,2147516425),new d(0,2147483658),new d(0,2147516555),new d(2147483648,139),new d(2147483648,32905),new d(2147483648,32771),new d(2147483648,32770),new d(2147483648,128),new d(0,32778),new d(2147483648,2147483658),new d(2147483648,2147516545),new d(2147483648,32896),new d(0,2147483649),new d(2147483648,2147516424);var f=(e,t=500)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(void 0,r)},t)}},p=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},m=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},ne=()=>{let e=0,t=null;return function(n,r=300){return function(...i){let a=Date.now();a-e>=r?(t!=null&&(clearTimeout(t),t=null),e=a,n.apply(this,i)):t??=window.setTimeout(()=>{e=Date.now(),n.apply(this,i),t=null},r-(a-e))}}},re=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(re),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(re);var h=typeof document>`u`,g=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},_=0,ie=1,v=2,y=null,b=null,ae=0,x=new Set,S=!1;function C(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ce(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)le(e,v);ae===0&&ue()}}]}function w(e){let t=oe(e,!0);return se(t),fe(t),()=>D(t)}function T(e){let t={owned:[],cleanups:[],owner:b},n=b,r=y;b=t,y=null;try{return e(()=>me(t))}finally{b=n,y=r}}function E(e){b&&b.cleanups.push(e)}function oe(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:v,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:b}}function se(e){b&&b.owned.push(e)}function ce(e){y&&(y.sources.add(e),e.observers.add(y))}function le(e,t){if(e.disposed||e.state>=t)return;let n=e.state===_;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)le(t,ie)}function ue(){if(!(ae>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||de(t)}}finally{S=!1}}}function de(e){if(!(e.disposed||e.state===_)){if(e.state===ie)for(let t of e.sources)`fn`in t&&de(t);e.state===v&&fe(e),e.state=_}}function fe(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);pe(e);let t=y,n=b;y=e,b=e,e.running=!0,e.state=_;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)le(t,v)}}finally{e.running=!1,y=t,b=n}}function pe(e){for(let t of e.owned)D(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function D(e){e.disposed||(e.disposed=!0,pe(e),e.observers.clear())}function me(e){for(let t of e.owned)D(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function O(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function he(e){return O(e)}var ge=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,_e=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},k=(e,t,n)=>{for(let r of e)ge(r)&&(_e(r,t)&&n.push(r),k(r.childrenList,t,n))},A=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?O(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(this.childrenList,e,t),t}},ve=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new A)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ye(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${he(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${he(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?O(e):(e instanceof A,e.serialize())).join(``):a+=O(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ye=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${O(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?O(e):(e instanceof A,e.serialize())).join(``)}</template>`}},be=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(be(t)):e.concat(t),[]),j=e=>e==null?null:e instanceof je?e.build():typeof e==`string`?h?e:document.createTextNode(e):e,xe=(e,t)=>{if(h){M(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};w(()=>{let e=t();a();let n=document.createDocumentFragment();i=T(t=>(M(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),E(()=>i?.())},Se=`__ranFor`,Ce=e=>typeof e==`object`&&!!e&&e[Se]===!0,we=(e,t,n)=>{let[r,i]=C(t),a=null,o=T(t=>{let i=j(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Te=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Ee=(e,t)=>{if(h){(t.each()??[]).forEach((n,r)=>{let i=j(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;E(()=>{for(let e of r.values())e.dispose();r.clear()}),w(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=we(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();Te(n,a),r=i})},De=`__ranIndex`,Oe=e=>typeof e==`object`&&!!e&&e[De]===!0,ke=(e,t,n)=>{let[r,i]=C(e),a=null,o=T(e=>{let i=j(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ae=(e,t)=>{if(h){(t.each()??[]).forEach((n,r)=>{let i=j(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];E(()=>{for(let e of r)e.dispose();r=[]}),w(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(ke(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}Te(n,r.map(e=>e.node).filter(e=>e!=null))})},M=(e,t)=>{be(t).forEach(t=>{if(Ce(t)){Ee(e,t);return}if(Oe(t)){Ae(e,t);return}if(typeof t==`function`){xe(e,t);return}let n=j(t);n!=null&&e.appendChild(n)})},je=class{el;constructor(e){this.el=h?new ve(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?w(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{h?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return M(this.el,e),this}replaceChildren(...e){if(h){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new Me(this.el,t,e)}build(){return this.el}serialize(){if(h)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Me=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return M(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(h)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return h?this.root.serialize():this.root.innerHTML}},N=e=>new je(e),P=()=>N(`div`),Ne=()=>N(`span`),F=()=>N(`slot`),Pe=()=>N(`input`),Fe=()=>N(`style`),Ie=()=>N(`label`),I=[!1,`false`,null,void 0],L=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!I.includes(n))},Le=new Map;function R(e,t){h?(Le.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var z=typeof document<`u`?HTMLElement:ve,Re=new Map,ze=new Map,Be=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!Re.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),Re.set(t,e)}let n=Re.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Ve=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!ze.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),ze.set(t,e)}let n=ze.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},He=new WeakMap,Ue=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,B=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||He.get(e)||e.attachShadow(n);return He.set(e,r),Be(r,t?`${t}\n${Ue}`:Ue),r},V=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},H=(e,t,n=``)=>e.getAttribute(t)??n,U=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},W=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ve(t,a)},We=e=>{let{r:t,g:n,b:r}=Ge(e);return G(t,n,r)},Ge=e=>(e[0]===`#`&&(e=e.substr(1)),e.length===3?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16)}),G=(e,t,n)=>{let r,i=Math.max(e,t,n),a=i-Math.min(e,t,n);r=a===0?0:e===i?(t-n)/a%6:t===i?(n-e)/a+2:(e-t)/a+4,r=Math.round(r*60),r<0&&(r+=360);let o=Math.round((i===0?0:a/i)*100),s=Math.round(i/255*100);return{h:r,s:o,v:s}},K=(e,t,n)=>{t/=100,n/=100;let r=[],i=n*t,a=e/60,o=i*(1-Math.abs(a%2-1)),s=n-i;return r=a>=0&&a<1?[i,o,0]:a>=1&&a<2?[o,i,0]:a>=2&&a<3?[0,i,o]:e>=3&&a<4?[0,o,i]:e>=4&&a<5?[o,0,i]:e>=5&&a<=6?[i,0,o]:[0,0,0],{r:Math.round(255*(r[0]+s)),g:Math.round(255*(r[1]+s)),b:Math.round(255*(r[2]+s))}},q=e=>{let t=e.toString(16);return t.length===1?`0`+t:t},J=(e,t,n)=>`#`+[q(e),q(t),q(n)].join(``),Ke=/^#([\da-f]{6}|[\da-f]{3})$/i,qe=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/,Je=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3}(\.\d+)?)\)$/,Ye=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`;R(`r-content`,class extends z{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=B(this,Ye);let e=V(this._shadowDom,`.slot`,()=>F().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var Xe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,Ze=300;R(`r-dropdown`,class extends z{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=B(this,Xe);let e=V(this._shadowDom,`.ranui-dropdown-container`,()=>P().class(`ranui-dropdown-container`).children(P().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(F().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return H(this,`transit`)}set transit(e){U(this,`transit`,e,{removeEmpty:!0})}get arrow(){return H(this,`arrow`)}set arrow(e){U(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(p(this.dropdown,this.transit),setTimeout(()=>{m(this.dropdown,this.transit)},Ze))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=P().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(p(this.dropdown,this.transit),setTimeout(()=>{m(this.dropdown,this.transit)},Ze)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}});var Qe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-popover-host-display,block)}.ran-popover{box-sizing:var(--ran-popover-box-sizing,border-box);position:var(--ran-popover-position,relative);display:var(--ran-popover-display,block);margin:var(--ran-popover-margin,0);padding:var(--ran-popover-padding,0)}.ran-popover-block{display:var(--ran-popover-block-display,block)}`,Y=8,X=300,Z=16,$e={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`},left:{add:`ran-dropdown-left-in`,remove:`ran-dropdown-left-out`},right:{add:`ran-dropdown-right-in`,remove:`ran-dropdown-right-out`}};R(`r-popover`,class extends z{_events=new g;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;dropDownInTimeId;dropDownOutTimeId;removeTimeId;static get observedAttributes(){return[`placement`,`trigger`,`sheet`]}closePopover=()=>{this.setDropdownDisplayNone()};constructor(){super(),this._shadowDom=B(this,Qe);let e=V(this._shadowDom,`.ran-popover-block`,()=>P().class(`ran-popover-block`).role(`tooltip`).children(F().class(`slot`)).build());this.popoverBlock=e,this._slot=e.querySelector(`.slot`)}get placement(){return H(this,`placement`,`top`)}set placement(e){U(this,`placement`,e)}get trigger(){return H(this,`trigger`,`hover`)}set trigger(e){U(this,`trigger`,e)}get getPopupContainerId(){return H(this,`getPopupContainerId`)}set getPopupContainerId(e){U(this,`getPopupContainerId`,e)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`aria-haspopup`,`dialog`),this.setAttribute(`aria-expanded`,`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};stopPropagation=e=>{e.stopPropagation()};createContent=e=>{if(e){if(!this.popoverContent){this.popoverContent=N(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation);let e=P().children(this.popoverContent).build();this.trigger.includes(`hover`)&&!o()&&(this.popoverContent?.addEventListener(`mouseleave`,this.blur),this.popoverContent?.addEventListener(`mouseenter`,this.removeDropDownTimeId)),document.body.appendChild(e)}if(this.popoverContent&&e.length>0){this.popoverContent.innerHTML=``;let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);this.popoverContent.appendChild(t)}}};watchContent=e=>{let{value:t}=e.detail;this.createContent(t.content)};blur=f(()=>{this.removeTimeId&&this.removeDropDownTimeId(),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(),this.setDropdownDisplayNone()},X)},Z);removeDropDownTimeId=f(()=>{this.trigger.includes(`hover`)&&!o()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},Z);setDropdownDisplayBlock=f(()=>{this.dropDownInTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`block`&&(this.updateAriaExpanded(!0),this.popoverContent.setAttribute(`transit`,$e[this.placement].add),this.popoverContent?.style.setProperty(`display`,`block`),this.placementPosition(),this.dropDownInTimeId=setTimeout(()=>{this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0},X)))},Z);setDropdownDisplayNone=f(()=>{this.dropDownOutTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`none`&&(this.updateAriaExpanded(!1),this.popoverContent.setAttribute(`transit`,$e[this.placement].remove),this.dropDownOutTimeId=setTimeout(()=>{this.popoverContent?.style.setProperty(`display`,`none`),this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0},X)))},Z);placementPosition=()=>{if(!this.popoverContent)return;let{top:e,left:t,bottom:n,width:r,height:i}=this.getBoundingClientRect(),a=n+window.scrollY+Y,o=t+window.scrollX,s=document.getElementById(this.getPopupContainerId),c=this.popoverContent.getBoundingClientRect();this.placement===`top`&&(a=e+window.scrollY-Math.max(c.height,i)-Y,this.getPopupContainerId&&s&&(o=t-s.getBoundingClientRect().left,a=e-s.getBoundingClientRect().top-this.popoverContent.clientHeight-Y,o=t-s.getBoundingClientRect().left)),this.placement===`left`&&(o=t-Math.max(c.width,r)-Y,a=e+window.scrollY),this.placement===`right`&&(o=t+r+Y,a=e+window.scrollY),this.popoverContent.style.setProperty(`inset`,`${a}px auto auto ${o}px`),this.popoverContent.style.setProperty(`--ran-x`,`${o}px`),this.popoverContent.style.setProperty(`--ran-y`,`${a}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-width`,`${r}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-height`,`${i}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-width`,`${c.width}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-height`,`${c.height}px`)};hoverPopover=e=>{this.clickPopover(e)};clickContent=e=>{e.stopPropagation()};clickPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock()};keydownPopover=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.setDropdownDisplayBlock()),e.key===`Escape`&&(e.preventDefault(),this.setDropdownDisplayNone())};clickRemovePopover=e=>{this.hoverRemovePopover(e)};popoverTrigger=()=>{this._events.abort();for(let e of this.children)e.tagName===`R-CONTENT`&&this._events.on(e,`change`,this.watchContent);this.trigger.includes(`hover`)&&(this._events.on(this,`mouseenter`,this.hoverPopover),this._events.on(this,`mouseleave`,this.blur)),this._events.on(this,`click`,this.clickPopover).on(this,`keydown`,this.keydownPopover).on(document,`click`,this.clickRemovePopover)};hoverRemovePopover=e=>{e.stopPropagation(),this.setDropdownDisplayNone()};changePlacement=f(()=>{this.placement===`top`&&this.popoverContent?.setAttribute(`arrow`,`bottom`),this.placement===`bottom`&&this.popoverContent?.setAttribute(`arrow`,`top`),this.placement===`left`&&this.popoverContent?.setAttribute(`arrow`,`right`),this.placement===`right`&&this.popoverContent?.setAttribute(`arrow`,`left`)},Z);connectedCallback(){this.initAria(),this.handlerExternalCss();for(let e of this.children)e.tagName===`R-CONTENT`&&this.createContent(e.children);this.popoverTrigger(),this.changePlacement()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`trigger`&&this.popoverTrigger(),e===`placement`&&this.changePlacement(),e===`sheet`&&this.handlerExternalCss())}});var et=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,tt={copy:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`},check:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`},download:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`},fullscreen:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`},"zoom-in":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},"zoom-out":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},refresh:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}},nt=!1,rt=new Map,it=!1,Q=e=>/<svg[\s>]/i.test(e),at=e=>{if(typeof e==`string`)return Q(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Q(n))return n;let r=t.default;if(typeof r==`string`&&Q(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Q(e.data))return e.data}},ot=(e,t)=>{it=!0;let n=at(t);n&&(rt.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))};(e=>{it=!0,Object.entries(e).forEach(([e,t])=>{ot(e,t)})})(tt),R(`r-icon`,class extends z{isDev=nt;_events=new g;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=B(this,et);let e=V(this._shadowDom,`.ran-icon`,()=>P().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return H(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return H(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return H(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return H(this,`aria-label`)}set ariaLabel(e){U(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=rt.get(t);if(!n){this.isDev&&it&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>Q(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=N(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}});var st=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}:host([placeholder]) .ran-input-label{transform:var(--ran-input-label-placeholder-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-label-placeholder-top,0)}:host .ran-input-label{transform:var(--ran-input-label-transform,translateY(-50%));top:var(--ran-input-label-top,50%)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);width:var(--ran-input-width,100%);height:var(--ran-input-height,auto);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,12px);font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,4px);border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,none);min-height:var(--ran-input-min-height,32px);border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:focus-within{border-color:var(--ran-input-active-border-color,var(--ran-color-primary,#006bff));box-shadow:var(--ran-input-active-box-shadow,0 0 0 2px var(--ran-blue-400,#cae7ff));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-primary,#006bff));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color,var(--ran-color-primary,#006bff))}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform,translateY(calc(-50% - .43em)) scale(.8));color:var(--ran-input-label-value-color,var(--ran-color-text-disabled,#00000040))}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,28px)}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";pointer-events:none;width:16px;height:16px;position:absolute;top:50%;right:10px;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-label-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5))}.ran-input[disabled]>.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));border-color:var(--ran-input-label-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-label-disabled-box-shadow,none);cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,30px);min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,14px);line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,none);outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 2px);font-weight:var(--ran-input-content-font-weight,400)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform,translateY(calc(-50% - .43em)) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-content-focus-label-top,0px)}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-label{box-sizing:var(--ran-input-label-box-sizing,border-box);pointer-events:var(--ran-input-label-pointer-events,none);position:var(--ran-input-label-position,absolute);font-size:var(--ran-input-label-font-size,14px);left:var(--ran-input-label-left,8px);transition:var(--ran-input-label-transition,transform .3s, top .3s, font-size .3s);transform-origin:var(--ran-input-label-transform-origin,left);padding:var(--ran-input-label-padding,0 0);color:var(--ran-input-label-color,var(--ran-color-text-disabled,#999));background:var(--ran-input-label-background,var(--ran-color-bg-elevated,#fff));opacity:var(--ran-input-label-opacity,.9)}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,12px);line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,ct=0;R(`r-input`,class extends z{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new g;_shadowDom;_input;_label;_inputContent;_icon;_message;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=B(this,st);let e=V(this._shadowDom,`.ran-input`,()=>P().class(`ran-input`).part(`input`).children(Pe().class(`ran-input-content`).part(`content`)).build());this._input=e,this._inputContent=e.querySelector(`.ran-input-content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++ct}`)}get value(){return this.getAttribute(`value`)||``}set value(e){!L(this)&&e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``)}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){!e||e===`false`?this.removeAttribute(`required`):this.setAttribute(`required`,``)}get disabled(){return L(this)}set disabled(e){I.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._input.removeChild(this._label),void 0)):this._label?this._label.innerHTML=t:(this._label=Ie().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._input.appendChild(this._label)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=P().class(`ran-input-message`).part(`message`).build(),this._shadowDom.appendChild(this._message)),this._message.textContent=t):this._message&&=(this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``))};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(I.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)))};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=N(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),L(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}});var lt=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);height:var(--ran-select-host-height,32px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent)}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,.6)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-selection-hover-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):hover) .selection-search{cursor:var(--ran-select-selection-hover-search-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection-item{cursor:var(--ran-select-selection-hover-item-cursor,pointer);color:var(--ran-select-selection-hover-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host([type=text]) .selection{border:var(--ran-select-selection-text-border,none);background:var(--ran-select-selection-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled],[type=text]):focus) .selection{border:var(--ran-select-selection-focus-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):focus) .selection-search{cursor:var(--ran-select-selection-focus-search-cursor,pointer)}:host(:not([disabled],[type=text]):focus) .selection-item{cursor:var(--ran-select-selection-focus-item-cursor,pointer);color:var(--ran-select-selection-focus-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host .selection-search{display:var(--ran-select-selection-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-selection-search-visible-cursor,text);display:var(--ran-select-selection-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-selection-search-visible-item-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-selection-search-visible-display,block);cursor:var(--ran-select-selection-search-visible-cursor,text);opacity:var(--ran-select-selection-search-visible-opacity,1)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,14px);box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,inline-block)}.ran-select .selection{position:var(--ran-select-selection-position,relative);background-color:var(--ran-select-selection-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-selection-background-image,none);border:var(--ran-select-selection-border,1px solid var(--ran-color-border,#eaeaea));transition:var(--ran-select-selection-transition,none);width:var(--ran-select-selection-width,100%);height:var(--ran-select-selection-height,100%);padding:var(--ran-select-selection-padding,0 11px);box-sizing:var(--ran-select-selection-box-sizing,border-box);margin:var(--ran-select-selection-margin,0);color:var(--ran-select-selection-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-selection-font-size,14px);line-height:var(--ran-select-selection-line-height,1.57143);list-style:var(--ran-select-selection-list-style,none);font-family:var(--ran-select-selection-font-family,inherit);display:var(--ran-select-selection-display,flex);border-radius:var(--ran-select-selection-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-selection-search-position,absolute);opacity:var(--ran-select-selection-search-opacity,0);top:var(--ran-select-selection-search-top,0);left:var(--ran-select-selection-search-left,0);height:var(--ran-select-selection-search-height,100%);margin:var(--ran-select-selection-search-margin,0);padding:var(--ran-select-selection-search-padding,0);background:var(--ran-select-selection-search-background,transparent);border:var(--ran-select-selection-search-border,none);outline:var(--ran-select-selection-search-outline,none);appearance:var(--ran-select-selection-search-appearance,none);font-family:var(--ran-select-selection-search-font-family,inherit);cursor:var(--ran-select-selection-search-cursor,not-allowed);inset-inline-start:var(--ran-select-selection-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-selection-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-selection-search-cancel-display,none);-webkit-appearance:var(--ran-select-selection-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-selection-search-input-border,none);padding:var(--ran-select-selection-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-selection-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-selection-search-input-active-border,none);padding:var(--ran-select-selection-search-input-active-padding,0);height:var(--ran-select-selection-search-input-active-height,100%);outline:var(--ran-select-selection-search-input-active-outline,none);border-color:var(--ran-select-selection-search-input-active-border-color,transparent);box-shadow:var(--ran-select-selection-search-input-active-box-shadow,none);border-right-width:var(--ran-select-selection-search-input-active-border-right-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-selection-search-input-content-min-height,0)}.ran-select .selection-item{position:var(--ran-select-selection-item-position,absolute);top:var(--ran-select-selection-item-top,0);left:var(--ran-select-selection-item-left,12px);right:var(--ran-select-selection-item-right,28px);margin:var(--ran-select-selection-item-margin,0);padding:var(--ran-select-selection-item-padding,0);background:var(--ran-select-selection-item-background,transparent);border:var(--ran-select-selection-item-border,none);outline:var(--ran-select-selection-item-outline,none);appearance:var(--ran-select-selection-item-appearance,none);font-family:var(--ran-select-selection-item-font-family,inherit);height:var(--ran-select-selection-item-height,100%);display:var(--ran-select-selection-item-display,flex);align-items:var(--ran-select-selection-item-align-items,center);user-select:var(--ran-select-selection-item-user-select,none);overflow:var(--ran-select-selection-item-overflow,hidden);white-space:var(--ran-select-selection-item-white-space,nowrap);text-overflow:var(--ran-select-selection-item-text-overflow,ellipsis);cursor:var(--ran-select-selection-item-cursor,pointer)}.ran-select .selection-select{color:var(--ran-select-selection-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-selection-icon-display,flex);align-items:var(--ran-select-selection-icon-align-items,center);color:var(--ran-select-selection-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-selection-icon-font-style,normal);text-align:var(--ran-select-selection-icon-text-align,center);text-transform:var(--ran-select-selection-icon-text-transform,none);text-rendering:var(--ran-select-selection-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-selection-icon-position,absolute);top:var(--ran-select-selection-icon-top,50%);height:var(--ran-select-selection-icon-height,16px);transform:var(--ran-select-selection-icon-transform,translateY(-50%));margin-top:var(--ran-select-selection-icon-margin-top,0);font-size:var(--ran-select-selection-icon-font-size,12px);pointer-events:var(--ran-select-selection-icon-pointer-events,none);inset-inline-start:var(--ran-select-selection-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-selection-icon-inset-inline-end,8px)}`,ut={success:!0,_identification:!0,data:`<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"
2
2
  fill="currentColor" xmlns="http://www.w3.org/2000/svg">
3
3
  <path
4
4
  d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>
5
- </svg>`};P(`r-option`,class extends F{_option;_optionContent;_shadowDom;_slot;static get observedAttributes(){return[`disabled`,`sheet`,`value`]}constructor(){super(),this._shadowDom=R(this);let e=z(this._shadowDom,`.ran-select-dropdown-option`,()=>{let e=j().build(),t=A().class(`ran-select-dropdown-option-content`).children(e).build();return A().class(`ran-select-dropdown-option`).children(t).build()}),t=e.querySelector(`.ran-select-dropdown-option-content`),n=e.querySelector(`slot`);this._slot=n,this._optionContent=t,this._option=e}get value(){return this.getAttribute(`value`)}set value(e){V(this,`value`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){V(this,`sheet`,e)}get disabled(){return N(this)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss(){H(this,this._shadowDom,`sheet`,null,this.sheet)}connectedCallback(){this.classList.contains(`ran-option`)||this.classList.add(`ran-option`)}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._option&&(!n||n===`false`?this._option.setAttribute(`disabled`,``):this._option.removeAttribute(`disabled`)),e===`sheet`&&this._shadowDom&&this.handlerExternalCss())}});var Ye=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ranui-dropdown-option-item{position:var(--ran-dropdown-option-item-position,relative);display:var(--ran-dropdown-option-item-display,block);padding:var(--ran-dropdown-option-item-padding,5px 12px);color:var(--ran-dropdown-option-item-color,var(--ran-color-text,#000000e0));font-weight:var(--ran-dropdown-option-item-font-weight,normal);font-size:var(--ran-dropdown-option-item-font-size,14px);transition:var(--ran-dropdown-option-item-transition,none);border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,6px));cursor:var(--ran-dropdown-option-item-cursor,pointer)}.ranui-dropdown-option-item:hover{background-color:var(--ran-dropdown-option-item-hover-background-color,var(--ran-gray-alpha-100,#0000000a))}.ranui-dropdown-option-item-content{text-align:var(--ran-dropdown-option-item-content-text-align,left);overflow:var(--ran-dropdown-option-item-content-overflow,hidden);white-space:var(--ran-dropdown-option-item-content-white-space,nowrap);text-overflow:var(--ran-dropdown-option-item-content-text-overflow,ellipsis);color:var(--ran-dropdown-option-item-content-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-option-item-content-font-size,14px);line-height:var(--ran-dropdown-option-item-content-line-height,1.57143);box-sizing:var(--ran-dropdown-option-item-content-box-sizing,border-box);list-style:var(--ran-dropdown-option-item-content-list-style,none);font-family:var(--ran-dropdown-option-item-content-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-variant:var(--ran-dropdown-option-item-content-font-variant,initial)}.ranui-dropdown-option-active{background-color:var(--ran-dropdown-option-active-background-color,var(--ran-blue-100,#e6f7ff));font-weight:var(--ran-dropdown-option-active-font-weight,bold)}.ranui-dropdown-option-active:hover{background-color:var(--ran-dropdown-option-active-hover-background-color,var(--ran-blue-100,#e6f7ff))}`;P(`r-dropdown-item`,class extends F{ionDropdownItem;_slot;_shadowDom;ionDropdownItemContent;static get observedAttributes(){return[`active`,`value`,`title`,`sheet`]}constructor(){super(),this._shadowDom=R(this,Ye);let e=z(this._shadowDom,`.ranui-dropdown-option-item`,()=>{let e=j().class(`slot`).build(),t=A().class(`ranui-dropdown-option-item-content`).part(`content`).children(e).build();return A().class(`ranui-dropdown-option-item`).part(`item`).children(t).build()}),t=e.querySelector(`.ranui-dropdown-option-item-content`),n=e.querySelector(`slot`);this._slot=n,this.ionDropdownItemContent=t,this.ionDropdownItem=e}get value(){return B(this,`value`)}set value(e){!N(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}get active(){return B(this,`active`)}set active(e){e?this.setAttribute(`active`,e):this.removeAttribute(`active`)}get title(){return B(this,`title`)}set title(e){e?this.setAttribute(`title`,e):this.removeAttribute(`title`)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this.active&&p(this.ionDropdownItem,`ranui-dropdown-option-active`)}attributeChangedCallback(e,t,n){if(e===`sheet`){this.handlerExternalCss();return}e===`active`&&n?p(this.ionDropdownItem,`ranui-dropdown-option-active`):m(this.ionDropdownItem,`ranui-dropdown-option-active`)}});var Xe={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`}};We(`arrow-down`,Je);var Ze=ne(),Qe=300;P(`r-select`,class extends F{static formAssociated=!0;_internals;_events=new g;_searchEvents=new g;removeTimeId;_listboxId;_activeIndex;_slot;_shadowDom;_select;_selection;_search;_icon;_selectDropdown;_selectionDropdown;_selectDropDownInTimeId;_selectDropDownOutTimeId;_optionList;_optionLabelMapValue;_optionValueMapLabel;_activeOption;_text;_selector;onSearch;static get observedAttributes(){return[`disabled`,`sheet`,`type`,`value`,`defaultvalue`,`showsearch`,`placement`,`getPopupContainerId`,`dropdownclass`,`trigger`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._listboxId=`ran-select-listbox-${Math.random().toString(36).slice(2,9)}`,this._activeIndex=-1,this._optionList=[],this._optionLabelMapValue=new Map,this._optionValueMapLabel=new Map,this._shadowDom=R(this,qe);let e=z(this._shadowDom,`.ran-select`,()=>A().class(`ran-select`).part(`select`).children(A().class(`selection`).part(`selection`).children(k(`r-icon`).class(`icon`).part(`icon`).attr(`name`,`arrow-down`).attr(`color`,`var(--ran-color-text-secondary)`).attr(`size`,`16`),A().children(xe().class(`selection-item`).part(`selection-item`),Se().class(`selection-search`).part(`search`).attr(`type`,`search`).attr(`autocomplete`,`off`))),j().class(`slot`)).build());this._select=e,this._selection=e.querySelector(`.selection`),this._selector=this._selection.querySelector(`div`),this._icon=e.querySelector(`.icon`),this._text=e.querySelector(`.selection-item`),this._search=e.querySelector(`.selection-search`),this._slot=e.querySelector(`slot`)}get value(){return this.getAttribute(`value`)||``}set value(e){!N(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this.syncFormValue()}syncFormValue=()=>{this._internals?.setFormValue?.(this.value)};get defaultValue(){return this.getAttribute(`defaultValue`)||``}set defaultValue(e){this.setAttribute(`defaultValue`,e||``)}get showSearch(){return this.getAttribute(`showSearch`)||``}set showSearch(e){this.setAttribute(`showSearch`,e||``)}get type(){return this.getAttribute(`type`)||``}set type(e){this.setAttribute(`type`,e||``)}get placement(){return this.getAttribute(`placement`)||`bottom`}set placement(e){this.setAttribute(`placement`,e||``)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}get getPopupContainerId(){return this.getAttribute(`getPopupContainerId`)||``}set getPopupContainerId(e){this.setAttribute(`getPopupContainerId`,e||``)}get dropdownclass(){return this.getAttribute(`dropdownclass`)||``}set dropdownclass(e){this.setAttribute(`dropdownclass`,e||``)}get trigger(){return this.getAttribute(`trigger`)||`click`}set trigger(e){this.setAttribute(`trigger`,e||``)}get disabled(){return N(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this.tabIndex=0):(this.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)}initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`role`,`combobox`),this.setAttribute(`aria-haspopup`,`listbox`),this.setAttribute(`aria-controls`,this._listboxId),this.setAttribute(`aria-expanded`,`false`),this.setAttribute(`aria-disabled`,this.disabled?`true`:`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};getDropdownOptions=()=>this._selectionDropdown?Array.from(this._selectionDropdown.querySelectorAll(`r-dropdown-item`)):[];syncActiveState=()=>{this.getDropdownOptions().forEach((e,t)=>{e.setAttribute(`role`,`option`),e.setAttribute(`aria-selected`,e===this._activeOption?`true`:`false`),e.id||=`${this._listboxId}-option-${t}`}),this._activeOption?.id?this.setAttribute(`aria-activedescendant`,this._activeOption.id):this.removeAttribute(`aria-activedescendant`)};setActiveOptionByIndex=e=>{let t=this.getDropdownOptions();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1)),r=t[n];if(!r)return;this._activeOption&&this._activeOption!==r&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeIndex=n,this._activeOption=r;let i=r.getAttribute(`value`)||``;r.setAttribute(`active`,i),r.setAttribute(`aria-selected`,`true`),r.scrollIntoView({block:`nearest`}),this.syncActiveState()};selectOptionElement=(e,t=!0)=>{if(!e)return;let n=e.getAttribute(`title`)||e.textContent?.trim()||``,r=e.getAttribute(`value`)||this._optionLabelMapValue.get(n)||``;if(!r)return;this.setAttribute(`value`,r),this.syncFormValue(),this._text.textContent=n,this._text.setAttribute(`title`,n),this._search.setAttribute(`placeholder`,n);let{height:i}=this.getBoundingClientRect();this._text.style.setProperty(`line-height`,`${i}px`),this._activeOption&&this._activeOption!==e&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeOption=e,this._activeIndex=this.getDropdownOptions().findIndex(t=>t===e),e.setAttribute(`active`,r),e.setAttribute(`aria-selected`,`true`),this.syncActiveState(),this.setSelectDropdownDisplayNone(),t&&this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r,label:n}}))};isDropdownOpen=()=>this._selectionDropdown?this._selectionDropdown.style.display===`block`:!1;_nextEnabledIndex=(e,t)=>{let n=this.getDropdownOptions(),r=n.length;if(r===0)return-1;let i=Math.max(0,Math.min(e,r-1));for(let e=0;e<r;e++){if(!N(n[i]))return i;let e=i+t;if(e<0||e>r-1)return-1;i=e}return-1};keydownSelect=e=>{if(!this.disabled){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),this.isDropdownOpen()||this.selectMouseDown(e),this.getDropdownOptions().length===0)return;let t=e.key===`ArrowDown`?1:-1,n=this._activeIndex>=0?this._activeIndex:0,r=this._nextEnabledIndex(n+t,t);r>=0&&this.setActiveOptionByIndex(r);return}if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),!this.isDropdownOpen()){this.selectMouseDown(e);return}this._activeOption&&this.selectOptionElement(this._activeOption);return}e.key===`Escape`&&(e.preventDefault(),this.setSelectDropdownDisplayNone())}};handlerExternalCss(){H(this,this._shadowDom,`sheet`,null,this.sheet)}setSelectDropdownDisplayNone=()=>{this._selectDropDownOutTimeId||(this.updateAriaExpanded(!1),this._selectionDropdown&&this._selectionDropdown.style.display!==`none`&&(this._detachReposition(),this._selectionDropdown.setAttribute(`transit`,Xe[this.placement].remove),this._selectDropDownOutTimeId=setTimeout(()=>{this._selectionDropdown?.style.setProperty(`display`,`none`),this._selectionDropdown&&this._selectionDropdown.removeAttribute(`transit`),clearTimeout(this._selectDropDownOutTimeId),this._selectDropDownOutTimeId=void 0},Qe)))};setSelectDropdownDisplayBlock=()=>{this._selectDropDownInTimeId||(this.updateAriaExpanded(!0),this._selectionDropdown&&this._selectionDropdown.style.display!==`block`&&(this._selectionDropdown.setAttribute(`transit`,Xe[this.placement].add),this._selectionDropdown?.style.setProperty(`display`,`block`),this._attachReposition(),this._selectDropDownInTimeId=setTimeout(()=>{this._selectionDropdown&&this._selectionDropdown.removeAttribute(`transit`),clearTimeout(this._selectDropDownInTimeId),this._selectDropDownInTimeId=void 0},Qe)))};placementPosition=()=>{!this._selectionDropdown||!this._selectDropdown||requestAnimationFrame(()=>{if(!this._selectionDropdown||!this._selectDropdown)return;let{top:e,left:t,bottom:n,width:r}=this.getBoundingClientRect(),i=this.getRootNode(),a=(i.getElementById?i.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId);this._selectionDropdown.style.setProperty(`position`,`absolute`),this._selectionDropdown.style.setProperty(`--ran-x`,`${e+window.scrollX}`),this._selectionDropdown.style.setProperty(`--ran-y`,`${t+window.scrollY}`);let o=n+window.scrollY+4,s=t+window.scrollX;if(this._selectionDropdown.style.setProperty(`width`,`${r}px`),this.placement===`top`&&(o=e+window.scrollY-this._selectionDropdown.clientHeight-4),this.getPopupContainerId&&a){let r=a.getBoundingClientRect();s=t-r.left,o=this.placement===`top`?e-r.top-this._selectionDropdown.clientHeight-4:n-r.top+4}this._selectionDropdown.style.setProperty(`inset`,`${o}px auto auto ${s}px`)})};_repositionBound=!1;_repositionDropdown=()=>{this._selectionDropdown?.style.display===`block`&&this.placementPosition()};_attachReposition=()=>{this._repositionBound||typeof window>`u`||(window.addEventListener(`scroll`,this._repositionDropdown,!0),window.addEventListener(`resize`,this._repositionDropdown),this._repositionBound=!0)};_detachReposition=()=>{!this._repositionBound||typeof window>`u`||(window.removeEventListener(`scroll`,this._repositionDropdown,!0),window.removeEventListener(`resize`,this._repositionDropdown),this._repositionBound=!1)};selectMouseDown=e=>{e.stopPropagation(),!N(this)&&(this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone(),this.setSelectDropdownDisplayBlock(),this.placementPosition())};removeDropDownTimeId=e=>{e.stopPropagation(),this._search.setAttribute(`value`,``),this.trigger.includes(`hover`)&&!o()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)};selectBlur=e=>{e.stopPropagation(),this.removeTimeId&&this.removeDropDownTimeId(e),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone()},300)};clickOption=e=>{e.stopPropagation();let t=e.target.closest(`r-dropdown-item`);if(t&&N(t)){this.removeDropDownTimeId(e);return}this.selectOptionElement(t),this.removeDropDownTimeId(e)};createOption=()=>{if(!this._selectDropdown){let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;this._selectDropdown=A().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).on(`click`,this.clickOption).build(),this._selectionDropdown=k(`r-dropdown`).id(this._listboxId).attr(`role`,`listbox`).style(`position`,`absolute`).style(`display`,`none`).build(),this.dropdownclass&&this._selectionDropdown.setAttribute(`class`,this.dropdownclass),this.trigger.includes(`hover`)&&!o()&&(this._selectDropdown.addEventListener(`mouseleave`,this.selectBlur),this._selectDropdown.addEventListener(`mouseenter`,this.removeDropDownTimeId)),this._selectDropdown.appendChild(this._selectionDropdown),t.appendChild(this._selectDropdown)}};removeSelectDropdown=()=>{try{if(this._selectDropdown){let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;t&&this._selectDropdown.parentNode===t&&t.removeChild(this._selectDropdown)}}catch(e){console.error(`removeSelectDropdown error`,e)}};addOptionToSlot=()=>{this._optionList=[],this._optionLabelMapValue.clear(),this._optionValueMapLabel.clear(),this._slot.assignedElements().forEach(e=>{if(e.tagName!==`R-OPTION`)return;let t=e.innerHTML,n=e.getAttribute(`value`)||``,r=N(e);this._optionList?.push({label:t,value:n,disabled:r}),this._optionLabelMapValue.get(t)&&console.warn(`${t} is repeat option`),this._optionValueMapLabel.get(n)&&console.warn(`${n} is repeat option`),this._optionLabelMapValue.set(t,n),this._optionValueMapLabel.set(n,t)}),this.createSelectDropdownContent(this._optionList)};createSelectDropdownContent=(e=[])=>{e.length===0?this._selectDropdown?.style.setProperty(`display`,`none`):this._selectDropdown?.style.setProperty(`display`,`block`),this._selectionDropdown&&(this._selectionDropdown.innerHTML=``,this._activeOption=void 0,this._activeIndex=-1),e.forEach(e=>{if(this._selectionDropdown){let{label:t,value:n,disabled:r}=e,i=k(`r-dropdown-item`).attr(`role`,`option`).attr(`value`,`${n}`).attr(`title`,`${t}`).text(`${t}`).build();r&&(i.setAttribute(`disabled`,``),i.setAttribute(`aria-disabled`,`true`)),(this.getAttribute(`defaultValue`)||this.getAttribute(`value`))===n?(i.setAttribute(`active`,n),this._activeOption=i):i.removeAttribute(`active`),this._selectionDropdown.appendChild(i)}}),this._activeIndex=this.getDropdownOptions().findIndex(e=>e===this._activeOption),this.syncActiveState(),this.setDefaultValue()};setDefaultValue=()=>{let e=this.getAttribute(`defaultValue`)||this.getAttribute(`value`);if(!e)return;let t=this._optionValueMapLabel.get(e);if(!t)return;this.setAttribute(`value`,e);let{height:n}=this.getBoundingClientRect();this._text.style.setProperty(`line-height`,`${n}px`),this._text.textContent=t,this._text.setAttribute(`title`,t);let r=this.getDropdownOptions().find(t=>t.getAttribute(`value`)===e)||null;r&&this.selectOptionElement(r,!1)};changeSearch=e=>{let t=e.detail.value||``;if(this.dispatchEvent(new CustomEvent(`search`,{detail:{value:t}})),this._selectionDropdown&&(this._selectionDropdown.innerHTML=``),t.length>0){let e=this._optionList.map(e=>{let{label:n}=e;if(`${n}`.toLowerCase().includes(t))return{label:n,value:e.value,disabled:e.disabled}}).filter(e=>e);this.createSelectDropdownContent(e)}else this.createSelectDropdownContent(this._optionList)};clickRemoveSelect=e=>{e.stopPropagation(),this.setSelectDropdownDisplayNone()};connectedCallback(){this.handlerExternalCss(),this.createOption(),this.initAria(),this.syncFormValue(),this._events.on(this._slot,`slotchange`,this.addOptionToSlot).on(this,`keydown`,this.keydownSelect).on(document,`click`,this.clickRemoveSelect),this.trigger.includes(`hover`)&&!o()&&this._events.on(this,`mouseenter`,this.selectMouseDown).on(this,`mouseleave`,this.selectBlur),this.trigger.includes(`click`)&&this._events.on(this,`click`,this.selectMouseDown).on(this,`blur`,this.selectBlur),this._applyShowSearch()}_applyShowSearch=()=>{this._searchEvents.abort(),this.showSearch&&(this.onSearch=Ze(this.changeSearch),this.onSearch&&this._searchEvents.on(this._search,`change`,this.onSearch).on(this._search,`click`,this.onSearch))};disconnectedCallback(){this._events.abort(),this._searchEvents.abort(),this._detachReposition(),this.removeSelectDropdown()}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._select&&(!n||n===`false`?(this._select.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this.hasAttribute(`tabindex`)||(this.tabIndex=0)):(this._select.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)),e===`value`&&this.syncSelectedFromValue(n),e===`sheet`&&this._shadowDom&&this.handlerExternalCss(),e===`defaultvalue`&&this.setDefaultValue(),e===`showsearch`&&this._search&&this._applyShowSearch())}syncSelectedFromValue=e=>{if(!e||this._activeOption?.getAttribute(`value`)===e)return;let t=Array.from(this.querySelectorAll(`r-option`)).find(t=>t.getAttribute(`value`)===e);t&&this.selectOptionElement(t,!1)}});var $e=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-colorpicker{box-sizing:border-box;border-radius:var(--ran-colorpicker-border-radius,var(--ran-radius-md,8px));border:var(--ran-colorpicker-border,1px solid var(--ran-color-border,#eaeaea));cursor:pointer;min-width:32px;height:32px;transition:var(--ran-colorpicker-transition,none);background:var(--ran-colorpicker-background,var(--ran-color-bg-elevated,#fff));justify-content:center;align-items:center;padding:3px;display:inline-flex}.ran-colorpicker:hover{border-color:var(--ran-colorpicker-border-hover,var(--ran-color-border-hover,var(--ran-gray-500)))}.ran-colorpicker-block{border-radius:var(--ran-colorpicker-block-border-radius,var(--ran-radius-sm,4px));width:24px;height:24px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:50% 50%;position:relative}.ran-colorpicker-inner{border-radius:inherit;width:100%;height:100%}.ran-colorpicker-block[disabled]{cursor:var(--ran-colorpicker-disabled-cursor,not-allowed);opacity:var(--ran-colorpicker-disabled-opacity,.5)}`,et=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-color-picker-inner{box-sizing:border-box}.ran-color-picker-inner-content{box-sizing:border-box;width:224px;font-family:var(--ran-font-family,inherit);flex-direction:column;gap:12px;padding:12px;display:flex}.ran-color-picker-inner-content *,.ran-color-picker-inner-content :before,.ran-color-picker-inner-content :after{box-sizing:border-box}.ran-color-picker-palette{border-radius:var(--ran-radius-sm,6px);cursor:crosshair;width:100%;height:160px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);touch-action:none;position:relative;overflow:hidden}.ran-color-picker-saturation{border-radius:inherit;background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#fff0);position:absolute;inset:0}.ran-color-picker-palette-dot{z-index:2;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;position:absolute;top:0;left:0;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0003,0 1px 3px #00000059}.ran-color-picker-controls{align-items:center;gap:12px;display:flex}.ran-color-picker-preview{width:28px;height:28px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:12px 12px;border-radius:50%;flex:none;position:relative;overflow:hidden}.ran-color-picker-preview-inner{border-radius:inherit;position:absolute;inset:0}.ran-color-picker-sliders{flex-direction:column;flex:1;gap:12px;min-width:0;display:flex}.ran-color-picker-slider{cursor:pointer;height:10px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);touch-action:none;border-radius:999px;position:relative}.ran-color-picker-slider-hue{background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.ran-color-picker-slider-alpha{background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:8px 8px}.ran-color-picker-slider-alpha-track{border-radius:inherit;position:absolute;inset:0}.ran-color-picker-slider-thumb{z-index:1;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;position:absolute;top:50%;left:0;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0003,0 1px 3px #00000059}.ran-color-picker-input-container{align-items:center;gap:8px;display:flex}.ran-color-picker-format{flex:none;width:68px}.ran-color-picker-value{flex:1;min-width:0}`,Q=360,$=class extends F{colorpicker;colorpickerInner;context;_shadowDom;_events=new g;_effectDisposers=[];popoverBlock;popoverContent;colorPickerInner;colorPickerPalette;colorPickerSaturation;colorPickerPaletteDot;colorPickerHueSlider;colorPickerHueThumb;colorPickerAlphaSlider;colorPickerAlphaTrack;colorPickerAlphaThumb;colorPickerPreviewInner;colorPickerValueInput;colorPickerFormatSelect;colorPickerPaletteSelect;_activeSlider=null;_format=`HEX`;_editingInput=!1;static get observedAttributes(){return[`disabled`,`value`,`sheet`]}constructor(){super(),this._shadowDom=R(this,$e);let e=z(this._shadowDom,`r-popover`,()=>{let e=A().class(`ran-colorpicker-inner`).part(`swatch`).build(),t=A().class(`ran-colorpicker-block`).part(`block`).children(e).build(),n=k(`r-content`).class(`ran-content`).build();return k(`r-popover`).class(`ran-popover`).attr(`trigger`,`click`).children(t,n).build()});this.popoverBlock=e,this.popoverContent=e.querySelector(`r-content`),this.colorpicker=e.querySelector(`.ran-colorpicker-block`),this.colorpickerInner=e.querySelector(`.ran-colorpicker-inner`),this.colorpicker.setAttribute(`role`,`button`),this.colorpicker.setAttribute(`tabindex`,`0`),this.colorpicker.setAttribute(`aria-haspopup`,`dialog`),this.colorpicker.setAttribute(`aria-label`,`Choose color`),this.colorPickerPaletteSelect=!1,this.createContext()}get value(){return this.context?.value.getter()||``}set value(e){this.setAttribute(`value`,e)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}get disabled(){return N(this)}set disabled(e){e===!1||e==null?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};syncDisabledState=()=>{let e=N(this);this.context?.disabled.setter(e),e?(this.setAttribute(`aria-disabled`,`true`),this.colorpicker?.setAttribute(`disabled`,``)):(this.removeAttribute(`aria-disabled`),this.colorpicker?.removeAttribute(`disabled`)),this.colorpicker?.setAttribute(`aria-disabled`,e?`true`:`false`),this.colorpicker?.setAttribute(`tabindex`,e?`-1`:`0`)};blockWhenDisabled=e=>{N(this)&&(e.stopImmediatePropagation(),e.preventDefault())};createContext=()=>{let e=e=>{let[t,n]=oe(e);return{getter:t,setter:n}};this.context={value:e(``),disabled:e(!1),hue:e(0),saturation:e(0),lightness:e(100),transparency:e(100)}};currentRgba=()=>{let{hue:e,saturation:t,lightness:n,transparency:r}=this.context,{r:i,g:a,b:o}=W(e.getter(),t.getter(),n.getter());return{r:i,g:a,b:o,a:r.getter()/100}};currentValue=()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba();return r<1?`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(2))})`:K(e,t,n)};currentDisplay=()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba();return this._format===`RGB`?r<1?`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(2))})`:`rgb(${e}, ${t}, ${n})`:K(e,t,n)};updateColorValue=e=>{if(e===this.context?.value.getter())return;let t=e.replace(/\s+/g,``),n=Me.exec(e),r=Pe.exec(t),i=Ne.exec(t);if(n){let{h:e,s:t,v:r}=Ae(n[0]);this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(r),this.context.transparency.setter(100)}else if(r){let{h:e,s:t,v:n}=U(Number(r[1]),Number(r[2]),Number(r[3]));this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(n),this.context.transparency.setter(Number(r[4])*100)}else if(i){let{h:e,s:t,v:n}=U(Number(i[1]),Number(i[2]),Number(i[3]));this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(n),this.context.transparency.setter(100)}else return;this.setAttribute(`value`,e),this.context?.value.setter(e)};emitChange=()=>{let e=this.currentValue(),{r:t,g:n,b:r,a:i}=this.currentRgba();this.context?.value.setter(e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e,hex:K(t,n,r),rgb:`rgb(${t}, ${n}, ${r})`,rgba:`rgba(${t}, ${n}, ${r}, ${Number(i.toFixed(2))})`,alpha:Number(i.toFixed(2))},bubbles:!0,composed:!0}))};palettePointerDown=e=>{e.preventDefault(),this.colorPickerPaletteSelect=!0,this.updatePaletteFromEvent(e)};updatePaletteFromEvent=e=>{if(!this.colorPickerPalette)return;let{left:t,top:n,width:i,height:a}=this.colorPickerPalette.getBoundingClientRect();if(!i||!a)return;let o=r(e.clientX-t,0,i),s=r(e.clientY-n,0,a);this.context.saturation.setter(o/i*100),this.context.lightness.setter((1-s/a)*100),this.emitChange()};sliderPointerDown=e=>t=>{t.preventDefault(),this._activeSlider=e,this.updateSliderFromEvent(e,t)};updateSliderFromEvent=(e,t)=>{let n=e===`hue`?this.colorPickerHueSlider:this.colorPickerAlphaSlider;if(!n)return;let{left:i,width:a}=n.getBoundingClientRect();if(!a)return;let o=r(t.clientX-i,0,a)/a;e===`hue`?this.context.hue.setter(o*Q):this.context.transparency.setter(o*100),this.emitChange()};onPointerMove=e=>{let t=e;this.colorPickerPaletteSelect?this.updatePaletteFromEvent(t):this._activeSlider&&this.updateSliderFromEvent(this._activeSlider,t)};initSliderA11y=(e,t,n)=>{e.setAttribute(`role`,`slider`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`aria-label`,t),e.setAttribute(`aria-orientation`,`horizontal`),e.setAttribute(`aria-valuemin`,`0`),e.setAttribute(`aria-valuemax`,String(n))};sliderKeydown=e=>t=>{let n=e===`hue`?Q:100,i=e===`hue`?this.context.hue:this.context.transparency,a=t.shiftKey?10:1,o=i.getter(),s=o;switch(t.key){case`ArrowRight`:case`ArrowUp`:s=o+a;break;case`ArrowLeft`:case`ArrowDown`:s=o-a;break;case`Home`:s=0;break;case`End`:s=n;break;default:return}t.preventDefault(),i.setter(r(s,0,n)),this.emitChange()};onPointerUp=()=>{this.colorPickerPaletteSelect=!1,this._activeSlider=null};onSwatchKeydown=e=>{N(this)||(e.key===`Enter`||e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),this.colorpicker?.click())};onValueInput=e=>{let t=e.target,n=e.detail?.value??t?.value;typeof n==`string`&&(this._editingInput=!0,this.updateColorValue(n.trim()),this._editingInput=!1,this.emitChange())};onFormatChange=e=>{let t=e.detail?.value;this._format=t===`RGB`?`RGB`:`HEX`,this.syncValueInput()};syncValueInput=()=>{this._editingInput||!this.colorPickerValueInput||(this.colorPickerValueInput.value=this.currentDisplay())};setupEffects=()=>{this._effectDisposers.push(C(()=>{let{r:e,g:t,b:n}=W(this.context.hue.getter(),100,100);this.colorPickerSaturation?.style.setProperty(`background-color`,`rgb(${e}, ${t}, ${n})`)}),C(()=>{let e=r(this.context.saturation.getter(),0,100),t=r(this.context.lightness.getter(),0,100);this.colorPickerPaletteDot?.style.setProperty(`left`,`${e}%`),this.colorPickerPaletteDot?.style.setProperty(`top`,`${100-t}%`)}),C(()=>{let e=this.context.hue.getter(),{r:t,g:n,b:r}=W(e,100,100);this.colorPickerHueThumb?.style.setProperty(`left`,`${e/Q*100}%`),this.colorPickerHueThumb?.style.setProperty(`background`,`rgb(${t}, ${n}, ${r})`),this.colorPickerHueSlider?.setAttribute(`aria-valuenow`,String(Math.round(e)))}),C(()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba(),i=`rgb(${e}, ${t}, ${n})`,a=`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(3))})`;this.colorPickerAlphaTrack?.style.setProperty(`background`,`linear-gradient(to right, rgba(${e}, ${t}, ${n}, 0), ${i})`),this.colorPickerAlphaThumb?.style.setProperty(`left`,`${r*100}%`),this.colorPickerAlphaThumb?.style.setProperty(`background`,a),this.colorPickerPreviewInner?.style.setProperty(`background`,a),this.colorpickerInner?.style.setProperty(`background`,a),this.colorPickerAlphaSlider?.setAttribute(`aria-valuenow`,String(Math.round(r*100))),this.colorPickerAlphaSlider?.setAttribute(`aria-valuetext`,`${Math.round(r*100)}%`),this.syncValueInput()}))};disposeEffects=()=>{for(let e of this._effectDisposers)e();this._effectDisposers=[]};openColorPicker=()=>{if(N(this)||this.colorPickerInner)return;this.colorPickerSaturation=A().class(`ran-color-picker-saturation`).build(),this.colorPickerPaletteDot=A().class(`ran-color-picker-palette-dot`).build(),this.colorPickerPalette=A().class(`ran-color-picker-palette`).on(`mousedown`,this.palettePointerDown).children(this.colorPickerSaturation,this.colorPickerPaletteDot).build(),this.colorPickerPreviewInner=A().class(`ran-color-picker-preview-inner`).build();let e=A().class(`ran-color-picker-preview`).children(this.colorPickerPreviewInner).build();this.colorPickerHueThumb=A().class(`ran-color-picker-slider-thumb`).build(),this.colorPickerHueSlider=A().class(`ran-color-picker-slider ran-color-picker-slider-hue`).on(`mousedown`,this.sliderPointerDown(`hue`)).on(`keydown`,this.sliderKeydown(`hue`)).children(this.colorPickerHueThumb).build(),this.initSliderA11y(this.colorPickerHueSlider,`Hue`,Q),this.colorPickerAlphaTrack=A().class(`ran-color-picker-slider-alpha-track`).build(),this.colorPickerAlphaThumb=A().class(`ran-color-picker-slider-thumb`).build(),this.colorPickerAlphaSlider=A().class(`ran-color-picker-slider ran-color-picker-slider-alpha`).on(`mousedown`,this.sliderPointerDown(`alpha`)).on(`keydown`,this.sliderKeydown(`alpha`)).children(this.colorPickerAlphaTrack,this.colorPickerAlphaThumb).build(),this.initSliderA11y(this.colorPickerAlphaSlider,`Alpha opacity`,100);let t=A().class(`ran-color-picker-sliders`).children(this.colorPickerHueSlider,this.colorPickerAlphaSlider).build(),n=A().class(`ran-color-picker-controls`).children(e,t).build();this.colorPickerFormatSelect=k(`r-select`).class(`ran-color-picker-format`).attr(`value`,this._format).attr(`defaultValue`,this._format).attr(`trigger`,`click`).children(...[`HEX`,`RGB`].map(e=>k(`r-option`).attr(`value`,e).text(e).build())).on(`change`,this.onFormatChange).build(),this.colorPickerValueInput=k(`r-input`).class(`ran-color-picker-value`).on(`change`,this.onValueInput).build();let r=A().class(`ran-color-picker-input-container`).children(this.colorPickerFormatSelect,this.colorPickerValueInput).build(),i=A().class(`ran-color-picker-inner-content`).children(this.colorPickerPalette,n,r).build();this.colorPickerInner=A().class(`ran-color-picker-inner`).children(Ce().text(et).build(),i).build(),this.popoverContent.appendChild(this.colorPickerInner),this.setupEffects(),this.syncValueInput()};connectedCallback(){this.handlerExternalCss(),this.setAttribute(`class`,`ran-colorpicker`),this._events.on(this,`click`,this.blockWhenDisabled,{capture:!0}),this._events.on(this,`keydown`,this.blockWhenDisabled,{capture:!0}),this._events.on(this.popoverBlock,`click`,this.openColorPicker),this._events.on(this.colorpicker,`keydown`,this.onSwatchKeydown),this._events.on(document,`mousemove`,this.onPointerMove),this._events.on(document,`mouseup`,this.onPointerUp),this.syncDisabledState(),this.value&&this.updateColorValue(this.value),this.colorPickerInner&&this._effectDisposers.length===0&&this.setupEffects()}disconnectedCallback(){this._events.abort(),this.disposeEffects()}attributeChangedCallback(e,t,n){t!==n&&(e===`value`&&this.updateColorValue(n),e===`disabled`&&this.syncDisabledState(),e===`sheet`&&this.handlerExternalCss())}};return P(`r-colorpicker`,$),e.ColorPicker=$,e.default=$,e})({});
5
+ </svg>`};R(`r-option`,class extends z{_option;_optionContent;_shadowDom;_slot;static get observedAttributes(){return[`disabled`,`sheet`,`value`]}constructor(){super(),this._shadowDom=B(this);let e=V(this._shadowDom,`.ran-select-dropdown-option`,()=>{let e=F().build(),t=P().class(`ran-select-dropdown-option-content`).children(e).build();return P().class(`ran-select-dropdown-option`).children(t).build()}),t=e.querySelector(`.ran-select-dropdown-option-content`),n=e.querySelector(`slot`);this._slot=n,this._optionContent=t,this._option=e}get value(){return this.getAttribute(`value`)}set value(e){U(this,`value`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){U(this,`sheet`,e)}get disabled(){return L(this)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss(){W(this,this._shadowDom,`sheet`,null,this.sheet)}connectedCallback(){this.classList.contains(`ran-option`)||this.classList.add(`ran-option`)}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._option&&(!n||n===`false`?this._option.setAttribute(`disabled`,``):this._option.removeAttribute(`disabled`)),e===`sheet`&&this._shadowDom&&this.handlerExternalCss())}});var dt=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ranui-dropdown-option-item{position:var(--ran-dropdown-option-item-position,relative);display:var(--ran-dropdown-option-item-display,block);padding:var(--ran-dropdown-option-item-padding,5px 12px);color:var(--ran-dropdown-option-item-color,var(--ran-color-text,#000000e0));font-weight:var(--ran-dropdown-option-item-font-weight,normal);font-size:var(--ran-dropdown-option-item-font-size,14px);transition:var(--ran-dropdown-option-item-transition,none);border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,6px));cursor:var(--ran-dropdown-option-item-cursor,pointer)}.ranui-dropdown-option-item:hover{background-color:var(--ran-dropdown-option-item-hover-background-color,var(--ran-gray-alpha-100,#0000000a))}.ranui-dropdown-option-item-content{text-align:var(--ran-dropdown-option-item-content-text-align,left);overflow:var(--ran-dropdown-option-item-content-overflow,hidden);white-space:var(--ran-dropdown-option-item-content-white-space,nowrap);text-overflow:var(--ran-dropdown-option-item-content-text-overflow,ellipsis);color:var(--ran-dropdown-option-item-content-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-option-item-content-font-size,14px);line-height:var(--ran-dropdown-option-item-content-line-height,1.57143);box-sizing:var(--ran-dropdown-option-item-content-box-sizing,border-box);list-style:var(--ran-dropdown-option-item-content-list-style,none);font-family:var(--ran-dropdown-option-item-content-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-variant:var(--ran-dropdown-option-item-content-font-variant,initial)}.ranui-dropdown-option-active{background-color:var(--ran-dropdown-option-active-background-color,var(--ran-blue-100,#e6f7ff));font-weight:var(--ran-dropdown-option-active-font-weight,bold)}.ranui-dropdown-option-active:hover{background-color:var(--ran-dropdown-option-active-hover-background-color,var(--ran-blue-100,#e6f7ff))}`;R(`r-dropdown-item`,class extends z{ionDropdownItem;_slot;_shadowDom;ionDropdownItemContent;static get observedAttributes(){return[`active`,`value`,`title`,`sheet`]}constructor(){super(),this._shadowDom=B(this,dt);let e=V(this._shadowDom,`.ranui-dropdown-option-item`,()=>{let e=F().class(`slot`).build(),t=P().class(`ranui-dropdown-option-item-content`).part(`content`).children(e).build();return P().class(`ranui-dropdown-option-item`).part(`item`).children(t).build()}),t=e.querySelector(`.ranui-dropdown-option-item-content`),n=e.querySelector(`slot`);this._slot=n,this.ionDropdownItemContent=t,this.ionDropdownItem=e}get value(){return H(this,`value`)}set value(e){!L(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}get active(){return H(this,`active`)}set active(e){e?this.setAttribute(`active`,e):this.removeAttribute(`active`)}get title(){return H(this,`title`)}set title(e){e?this.setAttribute(`title`,e):this.removeAttribute(`title`)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this.active&&p(this.ionDropdownItem,`ranui-dropdown-option-active`)}attributeChangedCallback(e,t,n){if(e===`sheet`){this.handlerExternalCss();return}e===`active`&&n?p(this.ionDropdownItem,`ranui-dropdown-option-active`):m(this.ionDropdownItem,`ranui-dropdown-option-active`)}});var ft={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`}};ot(`arrow-down`,ut);var pt=ne(),mt=300;R(`r-select`,class extends z{static formAssociated=!0;_internals;_events=new g;_searchEvents=new g;removeTimeId;_listboxId;_activeIndex;_slot;_shadowDom;_select;_selection;_search;_icon;_selectDropdown;_selectionDropdown;_selectDropDownInTimeId;_selectDropDownOutTimeId;_optionList;_optionLabelMapValue;_optionValueMapLabel;_activeOption;_text;_selector;onSearch;static get observedAttributes(){return[`disabled`,`sheet`,`type`,`value`,`defaultvalue`,`showsearch`,`placement`,`getPopupContainerId`,`dropdownclass`,`trigger`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._listboxId=`ran-select-listbox-${Math.random().toString(36).slice(2,9)}`,this._activeIndex=-1,this._optionList=[],this._optionLabelMapValue=new Map,this._optionValueMapLabel=new Map,this._shadowDom=B(this,lt);let e=V(this._shadowDom,`.ran-select`,()=>P().class(`ran-select`).part(`select`).children(P().class(`selection`).part(`selection`).children(N(`r-icon`).class(`icon`).part(`icon`).attr(`name`,`arrow-down`).attr(`color`,`var(--ran-color-text-secondary)`).attr(`size`,`16`),P().children(Ne().class(`selection-item`).part(`selection-item`),Pe().class(`selection-search`).part(`search`).attr(`type`,`search`).attr(`autocomplete`,`off`))),F().class(`slot`)).build());this._select=e,this._selection=e.querySelector(`.selection`),this._selector=this._selection.querySelector(`div`),this._icon=e.querySelector(`.icon`),this._text=e.querySelector(`.selection-item`),this._search=e.querySelector(`.selection-search`),this._slot=e.querySelector(`slot`)}get value(){return this.getAttribute(`value`)||``}set value(e){!L(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this.syncFormValue()}syncFormValue=()=>{this._internals?.setFormValue?.(this.value)};get defaultValue(){return this.getAttribute(`defaultValue`)||``}set defaultValue(e){this.setAttribute(`defaultValue`,e||``)}get showSearch(){return this.getAttribute(`showSearch`)||``}set showSearch(e){this.setAttribute(`showSearch`,e||``)}get type(){return this.getAttribute(`type`)||``}set type(e){this.setAttribute(`type`,e||``)}get placement(){return this.getAttribute(`placement`)||`bottom`}set placement(e){this.setAttribute(`placement`,e||``)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}get getPopupContainerId(){return this.getAttribute(`getPopupContainerId`)||``}set getPopupContainerId(e){this.setAttribute(`getPopupContainerId`,e||``)}get dropdownclass(){return this.getAttribute(`dropdownclass`)||``}set dropdownclass(e){this.setAttribute(`dropdownclass`,e||``)}get trigger(){return this.getAttribute(`trigger`)||`click`}set trigger(e){this.setAttribute(`trigger`,e||``)}get disabled(){return L(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this.tabIndex=0):(this.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)}initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`role`,`combobox`),this.setAttribute(`aria-haspopup`,`listbox`),this.setAttribute(`aria-controls`,this._listboxId),this.setAttribute(`aria-expanded`,`false`),this.setAttribute(`aria-disabled`,this.disabled?`true`:`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};getDropdownOptions=()=>this._selectionDropdown?Array.from(this._selectionDropdown.querySelectorAll(`r-dropdown-item`)):[];syncActiveState=()=>{this.getDropdownOptions().forEach((e,t)=>{e.setAttribute(`role`,`option`),e.setAttribute(`aria-selected`,e===this._activeOption?`true`:`false`),e.id||=`${this._listboxId}-option-${t}`}),this._activeOption?.id?this.setAttribute(`aria-activedescendant`,this._activeOption.id):this.removeAttribute(`aria-activedescendant`)};setActiveOptionByIndex=e=>{let t=this.getDropdownOptions();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1)),r=t[n];if(!r)return;this._activeOption&&this._activeOption!==r&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeIndex=n,this._activeOption=r;let i=r.getAttribute(`value`)||``;r.setAttribute(`active`,i),r.setAttribute(`aria-selected`,`true`),r.scrollIntoView({block:`nearest`}),this.syncActiveState()};selectOptionElement=(e,t=!0)=>{if(!e)return;let n=e.getAttribute(`title`)||e.textContent?.trim()||``,r=e.getAttribute(`value`)||this._optionLabelMapValue.get(n)||``;if(!r)return;this.setAttribute(`value`,r),this.syncFormValue(),this._text.textContent=n,this._text.setAttribute(`title`,n),this._search.setAttribute(`placeholder`,n);let{height:i}=this.getBoundingClientRect();this._text.style.setProperty(`line-height`,`${i}px`),this._activeOption&&this._activeOption!==e&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeOption=e,this._activeIndex=this.getDropdownOptions().findIndex(t=>t===e),e.setAttribute(`active`,r),e.setAttribute(`aria-selected`,`true`),this.syncActiveState(),this.setSelectDropdownDisplayNone(),t&&this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r,label:n}}))};isDropdownOpen=()=>this._selectionDropdown?this._selectionDropdown.style.display===`block`:!1;_nextEnabledIndex=(e,t)=>{let n=this.getDropdownOptions(),r=n.length;if(r===0)return-1;let i=Math.max(0,Math.min(e,r-1));for(let e=0;e<r;e++){if(!L(n[i]))return i;let e=i+t;if(e<0||e>r-1)return-1;i=e}return-1};keydownSelect=e=>{if(!this.disabled){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),this.isDropdownOpen()||this.selectMouseDown(e),this.getDropdownOptions().length===0)return;let t=e.key===`ArrowDown`?1:-1,n=this._activeIndex>=0?this._activeIndex:0,r=this._nextEnabledIndex(n+t,t);r>=0&&this.setActiveOptionByIndex(r);return}if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),!this.isDropdownOpen()){this.selectMouseDown(e);return}this._activeOption&&this.selectOptionElement(this._activeOption);return}e.key===`Escape`&&(e.preventDefault(),this.setSelectDropdownDisplayNone())}};handlerExternalCss(){W(this,this._shadowDom,`sheet`,null,this.sheet)}setSelectDropdownDisplayNone=()=>{this._selectDropDownOutTimeId||(this.updateAriaExpanded(!1),this._selectionDropdown&&this._selectionDropdown.style.display!==`none`&&(this._detachReposition(),this._selectionDropdown.setAttribute(`transit`,ft[this.placement].remove),this._selectDropDownOutTimeId=setTimeout(()=>{this._selectionDropdown?.style.setProperty(`display`,`none`),this._selectionDropdown&&this._selectionDropdown.removeAttribute(`transit`),clearTimeout(this._selectDropDownOutTimeId),this._selectDropDownOutTimeId=void 0},mt)))};setSelectDropdownDisplayBlock=()=>{this._selectDropDownInTimeId||(this.updateAriaExpanded(!0),this._selectionDropdown&&this._selectionDropdown.style.display!==`block`&&(this._selectionDropdown.setAttribute(`transit`,ft[this.placement].add),this._selectionDropdown?.style.setProperty(`display`,`block`),this._attachReposition(),this._selectDropDownInTimeId=setTimeout(()=>{this._selectionDropdown&&this._selectionDropdown.removeAttribute(`transit`),clearTimeout(this._selectDropDownInTimeId),this._selectDropDownInTimeId=void 0},mt)))};placementPosition=()=>{!this._selectionDropdown||!this._selectDropdown||requestAnimationFrame(()=>{if(!this._selectionDropdown||!this._selectDropdown)return;let{top:e,left:t,bottom:n,width:r}=this.getBoundingClientRect(),i=this.getRootNode(),a=(i.getElementById?i.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId);this._selectionDropdown.style.setProperty(`position`,`absolute`),this._selectionDropdown.style.setProperty(`--ran-x`,`${e+window.scrollX}`),this._selectionDropdown.style.setProperty(`--ran-y`,`${t+window.scrollY}`);let o=n+window.scrollY+4,s=t+window.scrollX;if(this._selectionDropdown.style.setProperty(`width`,`${r}px`),this.placement===`top`&&(o=e+window.scrollY-this._selectionDropdown.clientHeight-4),this.getPopupContainerId&&a){let r=a.getBoundingClientRect();s=t-r.left,o=this.placement===`top`?e-r.top-this._selectionDropdown.clientHeight-4:n-r.top+4}this._selectionDropdown.style.setProperty(`inset`,`${o}px auto auto ${s}px`)})};_repositionBound=!1;_repositionDropdown=()=>{this._selectionDropdown?.style.display===`block`&&this.placementPosition()};_attachReposition=()=>{this._repositionBound||typeof window>`u`||(window.addEventListener(`scroll`,this._repositionDropdown,!0),window.addEventListener(`resize`,this._repositionDropdown),this._repositionBound=!0)};_detachReposition=()=>{!this._repositionBound||typeof window>`u`||(window.removeEventListener(`scroll`,this._repositionDropdown,!0),window.removeEventListener(`resize`,this._repositionDropdown),this._repositionBound=!1)};selectMouseDown=e=>{e.stopPropagation(),!L(this)&&(this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone(),this.setSelectDropdownDisplayBlock(),this.placementPosition())};removeDropDownTimeId=e=>{e.stopPropagation(),this._search.setAttribute(`value`,``),this.trigger.includes(`hover`)&&!o()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)};selectBlur=e=>{e.stopPropagation(),this.removeTimeId&&this.removeDropDownTimeId(e),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone()},300)};clickOption=e=>{e.stopPropagation();let t=e.target.closest(`r-dropdown-item`);if(t&&L(t)){this.removeDropDownTimeId(e);return}this.selectOptionElement(t),this.removeDropDownTimeId(e)};createOption=()=>{if(!this._selectDropdown){let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;this._selectDropdown=P().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).on(`click`,this.clickOption).build(),this._selectionDropdown=N(`r-dropdown`).id(this._listboxId).attr(`role`,`listbox`).style(`position`,`absolute`).style(`display`,`none`).build(),this.dropdownclass&&this._selectionDropdown.setAttribute(`class`,this.dropdownclass),this.trigger.includes(`hover`)&&!o()&&(this._selectDropdown.addEventListener(`mouseleave`,this.selectBlur),this._selectDropdown.addEventListener(`mouseenter`,this.removeDropDownTimeId)),this._selectDropdown.appendChild(this._selectionDropdown),t.appendChild(this._selectDropdown)}};removeSelectDropdown=()=>{try{if(this._selectDropdown){let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;t&&this._selectDropdown.parentNode===t&&t.removeChild(this._selectDropdown)}}catch(e){console.error(`removeSelectDropdown error`,e)}};addOptionToSlot=()=>{this._optionList=[],this._optionLabelMapValue.clear(),this._optionValueMapLabel.clear(),this._slot.assignedElements().forEach(e=>{if(e.tagName!==`R-OPTION`)return;let t=e.innerHTML,n=e.getAttribute(`value`)||``,r=L(e);this._optionList?.push({label:t,value:n,disabled:r}),this._optionLabelMapValue.get(t)&&console.warn(`${t} is repeat option`),this._optionValueMapLabel.get(n)&&console.warn(`${n} is repeat option`),this._optionLabelMapValue.set(t,n),this._optionValueMapLabel.set(n,t)}),this.createSelectDropdownContent(this._optionList)};createSelectDropdownContent=(e=[])=>{e.length===0?this._selectDropdown?.style.setProperty(`display`,`none`):this._selectDropdown?.style.setProperty(`display`,`block`),this._selectionDropdown&&(this._selectionDropdown.innerHTML=``,this._activeOption=void 0,this._activeIndex=-1),e.forEach(e=>{if(this._selectionDropdown){let{label:t,value:n,disabled:r}=e,i=N(`r-dropdown-item`).attr(`role`,`option`).attr(`value`,`${n}`).attr(`title`,`${t}`).text(`${t}`).build();r&&(i.setAttribute(`disabled`,``),i.setAttribute(`aria-disabled`,`true`)),(this.getAttribute(`defaultValue`)||this.getAttribute(`value`))===n?(i.setAttribute(`active`,n),this._activeOption=i):i.removeAttribute(`active`),this._selectionDropdown.appendChild(i)}}),this._activeIndex=this.getDropdownOptions().findIndex(e=>e===this._activeOption),this.syncActiveState(),this.setDefaultValue()};setDefaultValue=()=>{let e=this.getAttribute(`defaultValue`)||this.getAttribute(`value`);if(!e)return;let t=this._optionValueMapLabel.get(e);if(!t)return;this.setAttribute(`value`,e);let{height:n}=this.getBoundingClientRect();this._text.style.setProperty(`line-height`,`${n}px`),this._text.textContent=t,this._text.setAttribute(`title`,t);let r=this.getDropdownOptions().find(t=>t.getAttribute(`value`)===e)||null;r&&this.selectOptionElement(r,!1)};changeSearch=e=>{let t=e.detail.value||``;if(this.dispatchEvent(new CustomEvent(`search`,{detail:{value:t}})),this._selectionDropdown&&(this._selectionDropdown.innerHTML=``),t.length>0){let e=this._optionList.map(e=>{let{label:n}=e;if(`${n}`.toLowerCase().includes(t))return{label:n,value:e.value,disabled:e.disabled}}).filter(e=>e);this.createSelectDropdownContent(e)}else this.createSelectDropdownContent(this._optionList)};clickRemoveSelect=e=>{e.stopPropagation(),this.setSelectDropdownDisplayNone()};connectedCallback(){this.handlerExternalCss(),this.createOption(),this.initAria(),this.syncFormValue(),this._events.on(this._slot,`slotchange`,this.addOptionToSlot).on(this,`keydown`,this.keydownSelect).on(document,`click`,this.clickRemoveSelect),this.trigger.includes(`hover`)&&!o()&&this._events.on(this,`mouseenter`,this.selectMouseDown).on(this,`mouseleave`,this.selectBlur),this.trigger.includes(`click`)&&this._events.on(this,`click`,this.selectMouseDown).on(this,`blur`,this.selectBlur),this._applyShowSearch()}_applyShowSearch=()=>{this._searchEvents.abort(),this.showSearch&&(this.onSearch=pt(this.changeSearch),this.onSearch&&this._searchEvents.on(this._search,`change`,this.onSearch).on(this._search,`click`,this.onSearch))};disconnectedCallback(){this._events.abort(),this._searchEvents.abort(),this._detachReposition(),this.removeSelectDropdown()}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._select&&(!n||n===`false`?(this._select.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this.hasAttribute(`tabindex`)||(this.tabIndex=0)):(this._select.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)),e===`value`&&this.syncSelectedFromValue(n),e===`sheet`&&this._shadowDom&&this.handlerExternalCss(),e===`defaultvalue`&&this.setDefaultValue(),e===`showsearch`&&this._search&&this._applyShowSearch())}syncSelectedFromValue=e=>{if(!e||this._activeOption?.getAttribute(`value`)===e)return;let t=Array.from(this.querySelectorAll(`r-option`)).find(t=>t.getAttribute(`value`)===e);t&&this.selectOptionElement(t,!1)}});var ht=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-colorpicker{box-sizing:border-box;border-radius:var(--ran-colorpicker-border-radius,var(--ran-radius-md,8px));border:var(--ran-colorpicker-border,1px solid var(--ran-color-border,#eaeaea));cursor:pointer;min-width:32px;height:32px;transition:var(--ran-colorpicker-transition,none);background:var(--ran-colorpicker-background,var(--ran-color-bg-elevated,#fff));justify-content:center;align-items:center;padding:3px;display:inline-flex}.ran-colorpicker:hover{border-color:var(--ran-colorpicker-border-hover,var(--ran-color-border-hover,var(--ran-gray-500)))}.ran-colorpicker-block{border-radius:var(--ran-colorpicker-block-border-radius,var(--ran-radius-sm,4px));width:24px;height:24px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:50% 50%;position:relative}.ran-colorpicker-inner{border-radius:inherit;width:100%;height:100%}.ran-colorpicker-block[disabled]{cursor:var(--ran-colorpicker-disabled-cursor,not-allowed);opacity:var(--ran-colorpicker-disabled-opacity,.5)}`,gt=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-color-picker-inner{box-sizing:border-box}.ran-color-picker-inner-content{box-sizing:border-box;width:224px;font-family:var(--ran-font-family,inherit);flex-direction:column;gap:12px;padding:12px;display:flex}.ran-color-picker-inner-content *,.ran-color-picker-inner-content :before,.ran-color-picker-inner-content :after{box-sizing:border-box}.ran-color-picker-palette{border-radius:var(--ran-radius-sm,6px);cursor:crosshair;width:100%;height:160px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);touch-action:none;position:relative;overflow:hidden}.ran-color-picker-saturation{border-radius:inherit;background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#fff0);position:absolute;inset:0}.ran-color-picker-palette-dot{z-index:2;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;position:absolute;top:0;left:0;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0003,0 1px 3px #00000059}.ran-color-picker-controls{align-items:center;gap:12px;display:flex}.ran-color-picker-preview{width:28px;height:28px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:12px 12px;border-radius:50%;flex:none;position:relative;overflow:hidden}.ran-color-picker-preview-inner{border-radius:inherit;position:absolute;inset:0}.ran-color-picker-sliders{flex-direction:column;flex:1;gap:12px;min-width:0;display:flex}.ran-color-picker-slider{cursor:pointer;height:10px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);touch-action:none;border-radius:999px;position:relative}.ran-color-picker-slider-hue{background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.ran-color-picker-slider-alpha{background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:8px 8px}.ran-color-picker-slider-alpha-track{border-radius:inherit;position:absolute;inset:0}.ran-color-picker-slider-thumb{z-index:1;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;position:absolute;top:50%;left:0;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0003,0 1px 3px #00000059}.ran-color-picker-input-container{align-items:center;gap:8px;display:flex}.ran-color-picker-format{flex:none;width:68px}.ran-color-picker-value{flex:1;min-width:0}`,$=360,_t=class extends z{colorpicker;colorpickerInner;context;_shadowDom;_events=new g;_effectDisposers=[];popoverBlock;popoverContent;colorPickerInner;colorPickerPalette;colorPickerSaturation;colorPickerPaletteDot;colorPickerHueSlider;colorPickerHueThumb;colorPickerAlphaSlider;colorPickerAlphaTrack;colorPickerAlphaThumb;colorPickerPreviewInner;colorPickerValueInput;colorPickerFormatSelect;colorPickerPaletteSelect;_activeSlider=null;_format=`HEX`;_editingInput=!1;static get observedAttributes(){return[`disabled`,`value`,`sheet`]}constructor(){super(),this._shadowDom=B(this,ht);let e=V(this._shadowDom,`r-popover`,()=>{let e=P().class(`ran-colorpicker-inner`).part(`swatch`).build(),t=P().class(`ran-colorpicker-block`).part(`block`).children(e).build(),n=N(`r-content`).class(`ran-content`).build();return N(`r-popover`).class(`ran-popover`).attr(`trigger`,`click`).children(t,n).build()});this.popoverBlock=e,this.popoverContent=e.querySelector(`r-content`),this.colorpicker=e.querySelector(`.ran-colorpicker-block`),this.colorpickerInner=e.querySelector(`.ran-colorpicker-inner`),this.colorpicker.setAttribute(`role`,`button`),this.colorpicker.setAttribute(`tabindex`,`0`),this.colorpicker.setAttribute(`aria-haspopup`,`dialog`),this.colorpicker.setAttribute(`aria-label`,`Choose color`),this.colorPickerPaletteSelect=!1,this.createContext()}get value(){return this.context?.value.getter()||``}set value(e){this.setAttribute(`value`,e)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}get disabled(){return L(this)}set disabled(e){e===!1||e==null?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};syncDisabledState=()=>{let e=L(this);this.context?.disabled.setter(e),e?(this.setAttribute(`aria-disabled`,`true`),this.colorpicker?.setAttribute(`disabled`,``)):(this.removeAttribute(`aria-disabled`),this.colorpicker?.removeAttribute(`disabled`)),this.colorpicker?.setAttribute(`aria-disabled`,e?`true`:`false`),this.colorpicker?.setAttribute(`tabindex`,e?`-1`:`0`)};blockWhenDisabled=e=>{L(this)&&(e.stopImmediatePropagation(),e.preventDefault())};createContext=()=>{let e=e=>{let[t,n]=C(e);return{getter:t,setter:n}};this.context={value:e(``),disabled:e(!1),hue:e(0),saturation:e(0),lightness:e(100),transparency:e(100)}};currentRgba=()=>{let{hue:e,saturation:t,lightness:n,transparency:r}=this.context,{r:i,g:a,b:o}=K(e.getter(),t.getter(),n.getter());return{r:i,g:a,b:o,a:r.getter()/100}};currentValue=()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba();return r<1?`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(2))})`:J(e,t,n)};currentDisplay=()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba();return this._format===`RGB`?r<1?`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(2))})`:`rgb(${e}, ${t}, ${n})`:J(e,t,n)};updateColorValue=e=>{if(e===this.context?.value.getter())return;let t=e.replace(/\s+/g,``),n=Ke.exec(e),r=Je.exec(t),i=qe.exec(t);if(n){let{h:e,s:t,v:r}=We(n[0]);this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(r),this.context.transparency.setter(100)}else if(r){let{h:e,s:t,v:n}=G(Number(r[1]),Number(r[2]),Number(r[3]));this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(n),this.context.transparency.setter(Number(r[4])*100)}else if(i){let{h:e,s:t,v:n}=G(Number(i[1]),Number(i[2]),Number(i[3]));this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(n),this.context.transparency.setter(100)}else return;this.setAttribute(`value`,e),this.context?.value.setter(e)};emitChange=()=>{let e=this.currentValue(),{r:t,g:n,b:r,a:i}=this.currentRgba();this.context?.value.setter(e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e,hex:J(t,n,r),rgb:`rgb(${t}, ${n}, ${r})`,rgba:`rgba(${t}, ${n}, ${r}, ${Number(i.toFixed(2))})`,alpha:Number(i.toFixed(2))},bubbles:!0,composed:!0}))};palettePointerDown=e=>{e.preventDefault(),this.colorPickerPaletteSelect=!0,this.updatePaletteFromEvent(e)};updatePaletteFromEvent=e=>{if(!this.colorPickerPalette)return;let{left:t,top:n,width:i,height:a}=this.colorPickerPalette.getBoundingClientRect();if(!i||!a)return;let o=r(e.clientX-t,0,i),s=r(e.clientY-n,0,a);this.context.saturation.setter(o/i*100),this.context.lightness.setter((1-s/a)*100),this.emitChange()};sliderPointerDown=e=>t=>{t.preventDefault(),this._activeSlider=e,this.updateSliderFromEvent(e,t)};updateSliderFromEvent=(e,t)=>{let n=e===`hue`?this.colorPickerHueSlider:this.colorPickerAlphaSlider;if(!n)return;let{left:i,width:a}=n.getBoundingClientRect();if(!a)return;let o=r(t.clientX-i,0,a)/a;e===`hue`?this.context.hue.setter(o*$):this.context.transparency.setter(o*100),this.emitChange()};onPointerMove=e=>{let t=e;this.colorPickerPaletteSelect?this.updatePaletteFromEvent(t):this._activeSlider&&this.updateSliderFromEvent(this._activeSlider,t)};initSliderA11y=(e,t,n)=>{e.setAttribute(`role`,`slider`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`aria-label`,t),e.setAttribute(`aria-orientation`,`horizontal`),e.setAttribute(`aria-valuemin`,`0`),e.setAttribute(`aria-valuemax`,String(n))};sliderKeydown=e=>t=>{let n=e===`hue`?$:100,i=e===`hue`?this.context.hue:this.context.transparency,a=t.shiftKey?10:1,o=i.getter(),s=o;switch(t.key){case`ArrowRight`:case`ArrowUp`:s=o+a;break;case`ArrowLeft`:case`ArrowDown`:s=o-a;break;case`Home`:s=0;break;case`End`:s=n;break;default:return}t.preventDefault(),i.setter(r(s,0,n)),this.emitChange()};onPointerUp=()=>{this.colorPickerPaletteSelect=!1,this._activeSlider=null};onSwatchKeydown=e=>{L(this)||(e.key===`Enter`||e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),this.colorpicker?.click())};onValueInput=e=>{let t=e.target,n=e.detail?.value??t?.value;typeof n==`string`&&(this._editingInput=!0,this.updateColorValue(n.trim()),this._editingInput=!1,this.emitChange())};onFormatChange=e=>{let t=e.detail?.value;this._format=t===`RGB`?`RGB`:`HEX`,this.syncValueInput()};syncValueInput=()=>{this._editingInput||!this.colorPickerValueInput||(this.colorPickerValueInput.value=this.currentDisplay())};setupEffects=()=>{this._effectDisposers.push(w(()=>{let{r:e,g:t,b:n}=K(this.context.hue.getter(),100,100);this.colorPickerSaturation?.style.setProperty(`background-color`,`rgb(${e}, ${t}, ${n})`)}),w(()=>{let e=r(this.context.saturation.getter(),0,100),t=r(this.context.lightness.getter(),0,100);this.colorPickerPaletteDot?.style.setProperty(`left`,`${e}%`),this.colorPickerPaletteDot?.style.setProperty(`top`,`${100-t}%`)}),w(()=>{let e=this.context.hue.getter(),{r:t,g:n,b:r}=K(e,100,100);this.colorPickerHueThumb?.style.setProperty(`left`,`${e/$*100}%`),this.colorPickerHueThumb?.style.setProperty(`background`,`rgb(${t}, ${n}, ${r})`),this.colorPickerHueSlider?.setAttribute(`aria-valuenow`,String(Math.round(e)))}),w(()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba(),i=`rgb(${e}, ${t}, ${n})`,a=`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(3))})`;this.colorPickerAlphaTrack?.style.setProperty(`background`,`linear-gradient(to right, rgba(${e}, ${t}, ${n}, 0), ${i})`),this.colorPickerAlphaThumb?.style.setProperty(`left`,`${r*100}%`),this.colorPickerAlphaThumb?.style.setProperty(`background`,a),this.colorPickerPreviewInner?.style.setProperty(`background`,a),this.colorpickerInner?.style.setProperty(`background`,a),this.colorPickerAlphaSlider?.setAttribute(`aria-valuenow`,String(Math.round(r*100))),this.colorPickerAlphaSlider?.setAttribute(`aria-valuetext`,`${Math.round(r*100)}%`),this.syncValueInput()}))};disposeEffects=()=>{for(let e of this._effectDisposers)e();this._effectDisposers=[]};openColorPicker=()=>{if(L(this)||this.colorPickerInner)return;this.colorPickerSaturation=P().class(`ran-color-picker-saturation`).build(),this.colorPickerPaletteDot=P().class(`ran-color-picker-palette-dot`).build(),this.colorPickerPalette=P().class(`ran-color-picker-palette`).on(`mousedown`,this.palettePointerDown).children(this.colorPickerSaturation,this.colorPickerPaletteDot).build(),this.colorPickerPreviewInner=P().class(`ran-color-picker-preview-inner`).build();let e=P().class(`ran-color-picker-preview`).children(this.colorPickerPreviewInner).build();this.colorPickerHueThumb=P().class(`ran-color-picker-slider-thumb`).build(),this.colorPickerHueSlider=P().class(`ran-color-picker-slider ran-color-picker-slider-hue`).on(`mousedown`,this.sliderPointerDown(`hue`)).on(`keydown`,this.sliderKeydown(`hue`)).children(this.colorPickerHueThumb).build(),this.initSliderA11y(this.colorPickerHueSlider,`Hue`,$),this.colorPickerAlphaTrack=P().class(`ran-color-picker-slider-alpha-track`).build(),this.colorPickerAlphaThumb=P().class(`ran-color-picker-slider-thumb`).build(),this.colorPickerAlphaSlider=P().class(`ran-color-picker-slider ran-color-picker-slider-alpha`).on(`mousedown`,this.sliderPointerDown(`alpha`)).on(`keydown`,this.sliderKeydown(`alpha`)).children(this.colorPickerAlphaTrack,this.colorPickerAlphaThumb).build(),this.initSliderA11y(this.colorPickerAlphaSlider,`Alpha opacity`,100);let t=P().class(`ran-color-picker-sliders`).children(this.colorPickerHueSlider,this.colorPickerAlphaSlider).build(),n=P().class(`ran-color-picker-controls`).children(e,t).build();this.colorPickerFormatSelect=N(`r-select`).class(`ran-color-picker-format`).attr(`value`,this._format).attr(`defaultValue`,this._format).attr(`trigger`,`click`).children(...[`HEX`,`RGB`].map(e=>N(`r-option`).attr(`value`,e).text(e).build())).on(`change`,this.onFormatChange).build(),this.colorPickerValueInput=N(`r-input`).class(`ran-color-picker-value`).on(`change`,this.onValueInput).build();let r=P().class(`ran-color-picker-input-container`).children(this.colorPickerFormatSelect,this.colorPickerValueInput).build(),i=P().class(`ran-color-picker-inner-content`).children(this.colorPickerPalette,n,r).build();this.colorPickerInner=P().class(`ran-color-picker-inner`).children(Fe().text(gt).build(),i).build(),this.popoverContent.appendChild(this.colorPickerInner),this.setupEffects(),this.syncValueInput()};connectedCallback(){this.handlerExternalCss(),this.setAttribute(`class`,`ran-colorpicker`),this._events.on(this,`click`,this.blockWhenDisabled,{capture:!0}),this._events.on(this,`keydown`,this.blockWhenDisabled,{capture:!0}),this._events.on(this.popoverBlock,`click`,this.openColorPicker),this._events.on(this.colorpicker,`keydown`,this.onSwatchKeydown),this._events.on(document,`mousemove`,this.onPointerMove),this._events.on(document,`mouseup`,this.onPointerUp),this.syncDisabledState(),this.value&&this.updateColorValue(this.value),this.colorPickerInner&&this._effectDisposers.length===0&&this.setupEffects()}disconnectedCallback(){this._events.abort(),this.disposeEffects()}attributeChangedCallback(e,t,n){t!==n&&(e===`value`&&this.updateColorValue(n),e===`disabled`&&this.syncDisabledState(),e===`sheet`&&this.handlerExternalCss())}};return R(`r-colorpicker`,_t),e.ColorPicker=_t,e.default=_t,e})({});
@@ -0,0 +1 @@
1
+ var ranui_content=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(h(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=ee(e,!0);return te(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function te(e){s&&s.owned.push(e)}function h(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function S(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function C(e){return S(e)}var w=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,T=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},E=(e,t,n)=>{for(let r of e)w(r)&&(T(r,t)&&n.push(r),E(r.childrenList,t,n))},D=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}},O=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new D)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new re(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${C(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${C(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof D,e.serialize())).join(``):a+=S(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},re=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof D,e.serialize())).join(``)}</template>`}},k=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(k(t)):e.concat(t),[]),A=e=>e==null?null:e instanceof R?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,j=(e,t)=>{if(n){L(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(L(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ie=`__ranFor`,ae=e=>typeof e==`object`&&!!e&&e[ie]===!0,oe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=A(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},M=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=oe(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();M(r,a),i=n})},N=`__ranIndex`,P=e=>typeof e==`object`&&!!e&&e[N]===!0,F=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=A(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},I=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(F(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}M(r,i.map(e=>e.node).filter(e=>e!=null))})},L=(e,t)=>{k(t).forEach(t=>{if(ae(t)){se(e,t);return}if(P(t)){I(e,t);return}if(typeof t==`function`){j(e,t);return}let n=A(t);n!=null&&e.appendChild(n)})},R=class{el;constructor(e){this.el=n?new O(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return L(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new z(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},z=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return L(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},B=e=>new R(e),V=()=>B(`slot`),H=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},U=(e=8)=>Math.random().toString(36).substring(2,e+2),W=e=>typeof e==`function`,G=12e4,ce=`__ranuts_bridge__`,le=`default`,K=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},ue=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=le){this.targetOrigin=t,this.channel=n,this.senderId=U(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,K.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ce,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(W(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=U(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},G),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{K.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new ue(n,t,r);if(e||=U(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new H;var q=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],J=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new J(q[0],3609767458),new J(q[1],602891725),new J(q[2],3964484399),new J(q[3],2173295548),new J(q[4],4081628472),new J(q[5],3053834265),new J(q[6],2937671579),new J(q[7],3664609560),new J(q[8],2734883394),new J(q[9],1164996542),new J(q[10],1323610764),new J(q[11],3590304994),new J(q[12],4068182383),new J(q[13],991336113),new J(q[14],633803317),new J(q[15],3479774868),new J(q[16],2666613458),new J(q[17],944711139),new J(q[18],2341262773),new J(q[19],2007800933),new J(q[20],1495990901),new J(q[21],1856431235),new J(q[22],3175218132),new J(q[23],2198950837),new J(q[24],3999719339),new J(q[25],766784016),new J(q[26],2566594879),new J(q[27],3203337956),new J(q[28],1034457026),new J(q[29],2466948901),new J(q[30],3758326383),new J(q[31],168717936),new J(q[32],1188179964),new J(q[33],1546045734),new J(q[34],1522805485),new J(q[35],2643833823),new J(q[36],2343527390),new J(q[37],1014477480),new J(q[38],1206759142),new J(q[39],344077627),new J(q[40],1290863460),new J(q[41],3158454273),new J(q[42],3505952657),new J(q[43],106217008),new J(q[44],3606008344),new J(q[45],1432725776),new J(q[46],1467031594),new J(q[47],851169720),new J(q[48],3100823752),new J(q[49],1363258195),new J(q[50],3750685593),new J(q[51],3785050280),new J(q[52],3318307427),new J(q[53],3812723403),new J(q[54],2003034995),new J(q[55],3602036899),new J(q[56],1575990012),new J(q[57],1125592928),new J(q[58],2716904306),new J(q[59],442776044),new J(q[60],593698344),new J(q[61],3733110249),new J(q[62],2999351573),new J(q[63],3815920427),new J(3391569614,3928383900),new J(3515267271,566280711),new J(3940187606,3454069534),new J(4118630271,4000239992),new J(116418474,1914138554),new J(174292421,2731055270),new J(289380356,3203993006),new J(460393269,320620315),new J(685471733,587496836),new J(852142971,1086792851),new J(1017036298,365543100),new J(1126000580,2618297676),new J(1288033470,3409855158),new J(1501505948,4234509866),new J(1607167915,987167468),new J(1816402316,1246189591),new J(0,1),new J(0,32898),new J(2147483648,32906),new J(2147483648,2147516416),new J(0,32907),new J(0,2147483649),new J(2147483648,2147516545),new J(2147483648,32777),new J(0,138),new J(0,136),new J(0,2147516425),new J(0,2147483658),new J(0,2147516555),new J(2147483648,139),new J(2147483648,32905),new J(2147483648,32771),new J(2147483648,32770),new J(2147483648,128),new J(0,32778),new J(2147483648,2147483658),new J(2147483648,2147516545),new J(2147483648,32896),new J(0,2147483649),new J(2147483648,2147516424);var Y=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(Y),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(Y);var de=new Map;function fe(e,t){n?(de.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var pe=typeof document<`u`?HTMLElement:O,X=new Map,me=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!X.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),X.set(t,e)}let n=X.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,he=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),me(r,t?`${t}\n${Q}`:Q),r},ge=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},$=class extends pe{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=he(this,t);let e=ge(this._shadowDom,`.slot`,()=>V().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}};return fe(`r-content`,$),e.Content=$,e.default=$,e})({});