ranui 0.2.1-alpha.1 → 0.2.1-alpha.3

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 (310) 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-BkM0LLof.js} +83 -76
  16. package/dist/button-D0zcnKnG.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-CygMndQS.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-D5om9aJO.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-qWnaTlYX.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-Rry-U6ir.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-DzdAR1nI.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-BkvRcCOx.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-CUJpeQ7Q.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-Bj1Zf8Hy.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-CtlZJISZ.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 +1 -1
  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/{image-B7MBI5n_.js → image-ILZNlaGc.js} +4 -4
  170. package/dist/image.js +1 -1
  171. package/dist/index.cjs +38 -37
  172. package/dist/index.d.ts +8 -0
  173. package/dist/index.iife.js +3623 -88
  174. package/dist/index.js +88 -84
  175. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  176. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  177. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  178. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  179. package/dist/init-1VpIn1S3.js +16 -0
  180. package/dist/init-CbDwVtpO.cjs +1 -0
  181. package/dist/{input-RNqdEHPf.js → input-CDH6zY9I.js} +6 -6
  182. package/dist/input.js +1 -1
  183. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  184. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  185. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  186. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  187. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  188. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  189. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  190. package/dist/katex-Pg2EqTH0.js +23485 -0
  191. package/dist/line-BIPmUVxO.js +33 -0
  192. package/dist/line-CAB5QHC6.cjs +1 -0
  193. package/dist/linear-B2AM4ZBe.js +259 -0
  194. package/dist/linear-CSAfNEpl.cjs +1 -0
  195. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  196. package/dist/link.js +1 -1
  197. package/dist/{loading-B9MFI03l.js → loading-DJWGih1g.js} +4 -4
  198. package/dist/loading.js +1 -1
  199. package/dist/map-BC2bk_rV.cjs +1 -0
  200. package/dist/map-DMSWkcq6.js +208 -0
  201. package/dist/{math-CudIwEXZ.js → math-DRmkEDSQ.js} +4 -4
  202. package/dist/math.js +1 -1
  203. package/dist/mermaid-CMhm7npE.js +261 -0
  204. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  205. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  206. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  207. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  208. package/dist/mermaid.js +5 -0
  209. package/dist/{message-DW7qWpEm.js → message-BpYJBvYn.js} +6 -6
  210. package/dist/message.js +1 -1
  211. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  212. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  213. package/dist/{modal-CrvGKL2B.js → modal-BeQlDYDP.js} +40 -24
  214. package/dist/modal.js +1 -1
  215. package/dist/ordinal-BMN81JG2.js +64 -0
  216. package/dist/ordinal-BplLHIij.cjs +1 -0
  217. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  218. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  219. package/dist/path-Bja5PoYn.js +82 -0
  220. package/dist/path-DmfWsuKi.cjs +1 -0
  221. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  222. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  223. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  224. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  225. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  226. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  227. package/dist/{player-BKQaaT7o.js → player-CQ4e3Yeo.js} +196 -195
  228. package/dist/player.js +1 -1
  229. package/dist/{popover-CvYIVgUS.js → popover-eZMnL1F3.js} +22 -54
  230. package/dist/popover.js +1 -1
  231. package/dist/{progress-C6jctsFH.js → progress-DyHgW4Ep.js} +5 -5
  232. package/dist/progress.js +1 -1
  233. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  234. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  235. package/dist/{radar-BUb4EzmG.js → radar-D21Rccap.js} +5 -5
  236. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  237. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  238. package/dist/radar.js +1 -1
  239. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  240. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  241. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  242. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  243. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  244. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  245. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  246. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  247. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  248. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  249. package/dist/ranui.css +1 -1
  250. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  251. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  252. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  253. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  254. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  255. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  256. package/dist/{route-Djrf9UR_.js → route-pR5P4ann.js} +10 -10
  257. package/dist/route.js +1 -1
  258. package/dist/{router-BU2KhtxV.js → router-CewzSH7O.js} +5 -5
  259. package/dist/router.js +1 -1
  260. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  261. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  262. package/dist/{scratch-CO4I2dIa.js → scratch-BFVsgl-7.js} +2 -2
  263. package/dist/scratch.js +1 -1
  264. package/dist/{section-CsUkp8bv.js → section-DSPCsIxv.js} +2 -2
  265. package/dist/section.js +1 -1
  266. package/dist/{select-Dn26ajJZ.js → select-B58nMfB1.js} +13 -13
  267. package/dist/select.js +1 -1
  268. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  269. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  270. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  271. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  272. package/dist/{skeleton-BuMLhvzQ.js → skeleton-DoHYMsTn.js} +5 -5
  273. package/dist/skeleton.js +1 -1
  274. package/dist/src-C9EhKhbk.cjs +1 -0
  275. package/dist/src-DtRLxcYO.js +2104 -0
  276. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  277. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  278. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  279. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  280. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  281. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  282. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  283. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  284. package/dist/{tab-40fDkuox.js → tab-BRPdZ9Ws.js} +5 -5
  285. package/dist/tab.js +1 -1
  286. package/dist/{tabpane-F4Pd7JtC.js → tabpane-Owf72hw_.js} +5 -5
  287. package/dist/tabpane.js +1 -1
  288. package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
  289. package/dist/theme-switch.js +1 -1
  290. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  291. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  292. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  293. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  294. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  295. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  296. package/dist/utils/builder/core.d.ts +133 -3
  297. package/dist/utils/builder/index.d.ts +1 -1
  298. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  299. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  300. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  301. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  302. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  303. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  304. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  305. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  306. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  307. package/docs/BUILDER.md +155 -2
  308. package/package.json +7 -1
  309. package/dist/button-BfYw0fes.js +0 -117
  310. package/dist/factory-DCrO37si.js +0 -334
@@ -1 +1 @@
1
- var ranui_message=(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([type=toast]) .ran-message-notice{text-align:center;word-break:break-all;max-width:90%;margin:0 auto;padding:8px}:host([type=toast]) .ran-message-notice-content{pointer-events:all;background:#000000b3;border-radius:7px;padding:10px 16px;display:inline-block}:host([type=toast]) .ran-message-notice-content-info{align-items:center;display:flex}:host([type=toast]) .ran-message-notice-content-info span{font-variant:tabular-nums;font-feature-settings:"tnum";z-index:1010;pointer-events:none;color:#fff;width:100%;margin:0;padding:0;font-size:14px;list-style:none}.ran-message-notice{padding:var(--ran-message-notice-padding,8px);text-align:var(--ran-message-notice-text-align,center);max-width:var(--ran-message-notice-max-width,90%);margin:var(--ran-message-notice-margin,0 auto);word-break:var(--ran-message-notice-word-break,break-all)}.ran-message-notice-content{display:var(--ran-message-notice-content-display,inline-block);padding:var(--ran-message-notice-content-padding,10px 16px);background:var(--ran-message-notice-content-background,var(--ran-color-bg-elevated,#fff));border-image-source:var(--ran-message-notice-content-border-image-source,none);border-image-slice:var(--ran-message-notice-content-border-image-slice,8);border-image-width:var(--ran-message-notice-content-border-image-width,4px);border-radius:var(--ran-message-notice-content-border-radius,var(--ran-radius-md,12px));box-shadow:var(--ran-message-notice-content-box-shadow,var(--ran-shadow-menu,0 2px 4px #0000000d, 0 8px 24px -6px #00000024));pointer-events:var(--ran-message-notice-content-pointer-events,all);border-image-outset:0;border-image-repeat:stretch}.ran-message-notice-content-info{align-items:var(--ran-message-notice-content-info-align-items,center);display:var(--ran-message-notice-content-info-display,flex)}.ran-message-notice-content-info span{margin:var(--ran-message-notice-content-info-span-margin,0);padding:var(--ran-message-notice-content-info-span-padding,0);color:var(--ran-message-notice-content-info-span-color,var(--ran-color-text,#000000d9));font-size:var(--ran-message-notice-content-info-span-font-size,14px);font-variant:var(--ran-message-notice-content-info-span-font-variant,tabular-nums);list-style:var(--ran-message-notice-content-info-span-list-style,none);font-feature-settings:var(--ran-message-notice-content-info-span-font-feature-settings,"tnum");z-index:var(--ran-message-notice-content-info-span-z-index,1010);width:var(--ran-message-notice-content-info-span-width,100%);pointer-events:var(--ran-message-notice-content-info-span-pointer-events,none)}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes MessageMoveIn{0%{opacity:0;padding:0;transform:translateY(-100%)}to{opacity:1;padding:8px;transform:translateY(0)}}@keyframes MessageMoveOut{0%{opacity:1;max-height:150px;padding:8px}to{opacity:0;max-height:0;padding:0}}.ranui-message{box-sizing:var(--ran-message-box-sizing,border-box);margin:var(--ran-message-margin,0);padding:var(--ran-message-padding,0);color:var(--ran-message-color,var(--ran-color-text,#000000d9));font-size:var(--ran-message-font-size,14px);font-variant:var(--ran-message-font-variant,tabular-nums);line-height:var(--ran-message-line-height,1.5715);list-style:var(--ran-message-ist-style,none);font-feature-settings:var(--ran-message-font-feature-settings,"tnum");position:var(--ran-message-position,fixed);top:var(--ran-message-top,8px);left:var(--ran-message-left,0);z-index:var(--ran-message-z-index,var(--ran-z-message,1200));width:var(--ran-message-width,100%);pointer-events:var(--ran-message-pointer-events,none)}.ranui-message .message-in{animation-name:var(--ran-message-in-animation-name,MessageMoveIn);animation-duration:var(--ran-message-in-animation-duration,.3s);animation-timing-function:var(--ran-message-in-animation-timing-function,cubic-bezier(.78, .14, .15, .86))}.ranui-message .message-leave{animation-name:var(--ran-message-leave-animation-name,MessageMoveOut);animation-duration:var(--ran-message-leave-animation-duration,.3s);animation-timing-function:var(--ran-message-leave-animation-timing-function,cubic-bezier(.78, .14, .15, .86))}`,n={success:!0,_identification:!0,data:`<svg t="1667965185400" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8572" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m193.5 301.7l-210.6 292c-12.7 17.7-39 17.7-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" p-id="8573"></path></svg>`},r={success:!0,_identification:!0,data:`<svg t="1667965220951" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8711" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359c-1.2-1.5-1.9-3.3-1.9-5.2 0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" p-id="8712"></path></svg>`},i={success:!0,_identification:!0,data:`<svg t="1667965239916" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8850" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272z m-32-344c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z" p-id="8851"></path></svg>`},a={success:!0,_identification:!0,data:`<svg t="1667965273540" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8989" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296z m32 440c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z" p-id="8990"></path></svg>`},o=`.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))}}`,s=typeof document>`u`,c=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}},l=0,ee=1,u=2,d=null,f=null,te=new Set;function ne(e){let t=re(e,!0);return ie(t),m(t),()=>g(t)}function re(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:u,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:f}}function ie(e){f&&f.owned.push(e)}function p(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)te.add(e);else if(n)for(let t of e.observers)p(t,ee)}function m(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);h(e);let t=d,n=f;d=e,f=e,e.running=!0,e.state=l;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)p(t,u)}}finally{e.running=!1,d=t,f=n}}function h(e){for(let t of e.owned)g(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 g(e){e.disposed||(e.disposed=!0,h(e),e.observers.clear())}function _(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function v(e){return _(e)}var y=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,b=(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()},x=(e,t,n)=>{for(let r of e)y(r)&&(b(r,t)&&n.push(r),x(r.childrenList,t,n))},S=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?_(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return x(this.childrenList,e,t),t}},C=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 S)}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 w(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return x(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}="${v(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${v(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 instanceof S,e.serialize())).join(``):a+=_(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}>`}},w=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 x(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${_(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?_(e):(e instanceof S,e.serialize())).join(``)}</template>`}},T=class e{el;constructor(e){this.el=s?new C(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?ne(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{s?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`?s?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(s){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 ae(this.el,t,e)}build(){return this.el}serialize(){if(s)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ae=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 T?this.root.appendChild(e.build()):typeof e==`string`?s?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(s)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 s?this.root.serialize():this.root.innerHTML}},E=e=>new T(e),D=()=>E(`div`),oe=()=>E(`span`),se=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}},O=(e=8)=>Math.random().toString(36).substring(2,e+2),k=e=>typeof e==`function`,ce=12e4,le=`__ranuts_bridge__`,ue=`default`,A=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)}},de=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=ue){this.targetOrigin=t,this.channel=n,this.senderId=O(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,A.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:le,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(k(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=O(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},ce),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=()=>{A.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 de(n,t,r);if(e||=O(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 se;var j=[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],M=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new M(j[0],3609767458),new M(j[1],602891725),new M(j[2],3964484399),new M(j[3],2173295548),new M(j[4],4081628472),new M(j[5],3053834265),new M(j[6],2937671579),new M(j[7],3664609560),new M(j[8],2734883394),new M(j[9],1164996542),new M(j[10],1323610764),new M(j[11],3590304994),new M(j[12],4068182383),new M(j[13],991336113),new M(j[14],633803317),new M(j[15],3479774868),new M(j[16],2666613458),new M(j[17],944711139),new M(j[18],2341262773),new M(j[19],2007800933),new M(j[20],1495990901),new M(j[21],1856431235),new M(j[22],3175218132),new M(j[23],2198950837),new M(j[24],3999719339),new M(j[25],766784016),new M(j[26],2566594879),new M(j[27],3203337956),new M(j[28],1034457026),new M(j[29],2466948901),new M(j[30],3758326383),new M(j[31],168717936),new M(j[32],1188179964),new M(j[33],1546045734),new M(j[34],1522805485),new M(j[35],2643833823),new M(j[36],2343527390),new M(j[37],1014477480),new M(j[38],1206759142),new M(j[39],344077627),new M(j[40],1290863460),new M(j[41],3158454273),new M(j[42],3505952657),new M(j[43],106217008),new M(j[44],3606008344),new M(j[45],1432725776),new M(j[46],1467031594),new M(j[47],851169720),new M(j[48],3100823752),new M(j[49],1363258195),new M(j[50],3750685593),new M(j[51],3785050280),new M(j[52],3318307427),new M(j[53],3812723403),new M(j[54],2003034995),new M(j[55],3602036899),new M(j[56],1575990012),new M(j[57],1125592928),new M(j[58],2716904306),new M(j[59],442776044),new M(j[60],593698344),new M(j[61],3733110249),new M(j[62],2999351573),new M(j[63],3815920427),new M(3391569614,3928383900),new M(3515267271,566280711),new M(3940187606,3454069534),new M(4118630271,4000239992),new M(116418474,1914138554),new M(174292421,2731055270),new M(289380356,3203993006),new M(460393269,320620315),new M(685471733,587496836),new M(852142971,1086792851),new M(1017036298,365543100),new M(1126000580,2618297676),new M(1288033470,3409855158),new M(1501505948,4234509866),new M(1607167915,987167468),new M(1816402316,1246189591),new M(0,1),new M(0,32898),new M(2147483648,32906),new M(2147483648,2147516416),new M(0,32907),new M(0,2147483649),new M(2147483648,2147516545),new M(2147483648,32777),new M(0,138),new M(0,136),new M(0,2147516425),new M(0,2147483658),new M(0,2147516555),new M(2147483648,139),new M(2147483648,32905),new M(2147483648,32771),new M(2147483648,32770),new M(2147483648,128),new M(0,32778),new M(2147483648,2147483658),new M(2147483648,2147516545),new M(2147483648,32896),new M(0,2147483649),new M(2147483648,2147516424);var N=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})(N),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(N);var fe=new Map;function P(e,t){s?(fe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var F=typeof document<`u`?HTMLElement:C,I=new Map,L=new Map,R=(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)}}},z=(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)}}},B=new WeakMap,V=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,H=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||B.get(e)||e.attachShadow(n);return B.set(e,r),R(r,t?`${t}\n${V}`:V),r},U=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},W=(e,t,n=``)=>e.getAttribute(t)??n,G=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},K=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&z(t,a)},pe=!1,q=new Map,J=!1,Y=e=>/<svg[\s>]/i.test(e),me=e=>{if(typeof e==`string`)return Y(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Y(n))return n;let r=t.default;if(typeof r==`string`&&Y(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Y(e.data))return e.data}},he=(e,t)=>{J=!0;let n=me(t);n&&(q.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},ge=e=>{J=!0,Object.entries(e).forEach(([e,t])=>{he(e,t)})};P(`r-icon`,class extends F{isDev=pe;_events=new c;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=H(this,o);let e=U(this._shadowDom,`.ran-icon`,()=>D().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return W(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return W(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return W(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 W(this,`aria-label`)}set ariaLabel(e){G(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return W(this,`sheet`)}set sheet(e){G(this,`sheet`,e)}handlerExternalCss=()=>{K(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=q.get(t);if(!n){this.isDev&&J&&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=>Y(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=E(`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 X=`data-ranui-message-host`,_e=()=>`[${X}="true"]`,ve=(e,t)=>{let n=t?.top??8,r=t?.zIndex??1200;e.style.setProperty(`position`,`fixed`),e.style.setProperty(`top`,typeof n==`number`?`${n}px`:String(n)),e.style.setProperty(`left`,`0`),e.style.setProperty(`width`,`100%`),e.style.setProperty(`z-index`,String(r)),e.style.setProperty(`pointer-events`,`none`)},ye=e=>typeof document>`u`?null:e?.getContainer?.()||document.body,be=e=>{if(typeof document>`u`)return null;let t=ye(e)||document.body,n=t.querySelector(_e());return n||(n=D().attr(X,`true`).children(D().class(`ranui-message`).attr(`aria-live`,`polite`).attr(`aria-atomic`,`false`)).build(),t.appendChild(n)),ve(n,e),n.querySelector(`.ranui-message`)},Z=300,Q=3e3;ge({"check-circle-fill":n,"close-circle-fill":r,"info-circle-fill":i,"warning-circle-fill":a});var xe=new Map([[`success`,`check-circle-fill`],[`warning`,`warning-circle-fill`],[`error`,`close-circle-fill`],[`info`,`info-circle-fill`],[`toast`,null]]),Se=new Map([[`success`,`#52c41a`],[`warning`,`#faad14`],[`error`,`#ff4d4f`],[`info`,`#006bff`],[`toast`,`rgba(0, 0, 0, 0.7)`]]),$=class extends F{_info;_notice;_content;_icon;_span;_shadowDom;timeId;close;static get observedAttributes(){return[`type`,`content`,`sheet`]}constructor(){super(),this._shadowDom=H(this,t);let e=U(this._shadowDom,`.ran-message-notice`,()=>D().class(`ran-message-notice`).children(D().class(`ran-message-notice-content`).children(D().class(`ran-message-notice-content-info`).children(E(`r-icon`),oe()))).build());this._notice=e,this._content=e.querySelector(`.ran-message-notice-content`),this._info=e.querySelector(`.ran-message-notice-content-info`),this._icon=e.querySelector(`r-icon`),this._span=e.querySelector(`span`),this.handlerExternalCss()}connectedCallback(){F.prototype.connectedCallback?.call(this),this.hasAttribute(`aria-atomic`)||this.setAttribute(`aria-atomic`,`true`)}get type(){return this.getAttribute(`type`)}set type(e){e&&this.setAttribute(`type`,e)}get content(){return this.getAttribute(`content`)}set content(e){e&&this.setAttribute(`content`,e)}get sheet(){return W(this,`sheet`)}set sheet(e){G(this,`sheet`,e)}handlerExternalCss=()=>{K(this,this._shadowDom,`sheet`,null,this.sheet)};setA11yRole=e=>{let t=e===`error`||e===`warning`;this.setAttribute(`role`,t?`alert`:`status`)};setIcon=e=>{let t=xe.get(e),n=Se.get(e);t&&(this._icon?.setAttribute(`name`,t),this._icon?.style.setProperty(`margin-right`,`8px`),this._icon?.setAttribute(`size`,`18`),n&&this._icon?.setAttribute(`color`,n))};attributeChangedCallback(e,t,n){t!==n&&(e===`content`&&(this._span.textContent=n),e===`type`&&(this.setIcon(n),this.setA11yRole(n)),e===`sheet`&&this.handlerExternalCss())}};P(`r-message`,$);function Ce(){if(typeof window>`u`)return null;let e=e=>t=>{let n={},r=E(`r-message`).class(`message`).build();r.timeId&&clearTimeout(r.timeId),r.setAttribute(`type`,e);let i=Q,a;if(!t)return;typeof t==`string`?r.setAttribute(`content`,t):(r.setAttribute(`content`,t.content),a=t.close,i=t.duration||Q,n.top=t.top,n.zIndex=t.zIndex,n.getContainer=t.getContainer);let o=be(n);if(!o)return;let s=setTimeout(()=>{r.classList.remove(`message-in`),r.classList.add(`message-leave`),clearTimeout(s)},i-Z);r.timeId=setTimeout(()=>{r.classList.remove(`message-leave`),o.removeChild(r),a&&a()},i),o.appendChild(r),r.classList.add(`message-in`),setTimeout(()=>{r.classList.remove(`message-in`)},Z)},t={info:e(`info`),success:e(`success`),error:e(`error`),warning:e(`warning`),toast:e(`toast`)};return window.message=t,window.ranui||(window.ranui={}),window.ranui.message=t,t}var we=Ce();return e.CustomMessage=$,e.default=we,e})({});
1
+ var ranui_message=(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([type=toast]) .ran-message-notice{text-align:center;word-break:break-all;max-width:90%;margin:0 auto;padding:8px}:host([type=toast]) .ran-message-notice-content{pointer-events:all;background:#000000b3;border-radius:7px;padding:10px 16px;display:inline-block}:host([type=toast]) .ran-message-notice-content-info{align-items:center;display:flex}:host([type=toast]) .ran-message-notice-content-info span{font-variant:tabular-nums;font-feature-settings:"tnum";z-index:1010;pointer-events:none;color:#fff;width:100%;margin:0;padding:0;font-size:14px;list-style:none}.ran-message-notice{padding:var(--ran-message-notice-padding,8px);text-align:var(--ran-message-notice-text-align,center);max-width:var(--ran-message-notice-max-width,90%);margin:var(--ran-message-notice-margin,0 auto);word-break:var(--ran-message-notice-word-break,break-all)}.ran-message-notice-content{display:var(--ran-message-notice-content-display,inline-block);padding:var(--ran-message-notice-content-padding,10px 16px);background:var(--ran-message-notice-content-background,var(--ran-color-bg-elevated,#fff));border-image-source:var(--ran-message-notice-content-border-image-source,none);border-image-slice:var(--ran-message-notice-content-border-image-slice,8);border-image-width:var(--ran-message-notice-content-border-image-width,4px);border-radius:var(--ran-message-notice-content-border-radius,var(--ran-radius-md,12px));box-shadow:var(--ran-message-notice-content-box-shadow,var(--ran-shadow-menu,0 2px 4px #0000000d, 0 8px 24px -6px #00000024));pointer-events:var(--ran-message-notice-content-pointer-events,all);border-image-outset:0;border-image-repeat:stretch}.ran-message-notice-content-info{align-items:var(--ran-message-notice-content-info-align-items,center);display:var(--ran-message-notice-content-info-display,flex)}.ran-message-notice-content-info span{margin:var(--ran-message-notice-content-info-span-margin,0);padding:var(--ran-message-notice-content-info-span-padding,0);color:var(--ran-message-notice-content-info-span-color,var(--ran-color-text,#000000d9));font-size:var(--ran-message-notice-content-info-span-font-size,14px);font-variant:var(--ran-message-notice-content-info-span-font-variant,tabular-nums);list-style:var(--ran-message-notice-content-info-span-list-style,none);font-feature-settings:var(--ran-message-notice-content-info-span-font-feature-settings,"tnum");z-index:var(--ran-message-notice-content-info-span-z-index,1010);width:var(--ran-message-notice-content-info-span-width,100%);pointer-events:var(--ran-message-notice-content-info-span-pointer-events,none)}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes MessageMoveIn{0%{opacity:0;padding:0;transform:translateY(-100%)}to{opacity:1;padding:8px;transform:translateY(0)}}@keyframes MessageMoveOut{0%{opacity:1;max-height:150px;padding:8px}to{opacity:0;max-height:0;padding:0}}.ranui-message{box-sizing:var(--ran-message-box-sizing,border-box);margin:var(--ran-message-margin,0);padding:var(--ran-message-padding,0);color:var(--ran-message-color,var(--ran-color-text,#000000d9));font-size:var(--ran-message-font-size,14px);font-variant:var(--ran-message-font-variant,tabular-nums);line-height:var(--ran-message-line-height,1.5715);list-style:var(--ran-message-ist-style,none);font-feature-settings:var(--ran-message-font-feature-settings,"tnum");position:var(--ran-message-position,fixed);top:var(--ran-message-top,8px);left:var(--ran-message-left,0);z-index:var(--ran-message-z-index,var(--ran-z-message,1200));width:var(--ran-message-width,100%);pointer-events:var(--ran-message-pointer-events,none)}.ranui-message .message-in{animation-name:var(--ran-message-in-animation-name,MessageMoveIn);animation-duration:var(--ran-message-in-animation-duration,.3s);animation-timing-function:var(--ran-message-in-animation-timing-function,cubic-bezier(.78, .14, .15, .86))}.ranui-message .message-leave{animation-name:var(--ran-message-leave-animation-name,MessageMoveOut);animation-duration:var(--ran-message-leave-animation-duration,.3s);animation-timing-function:var(--ran-message-leave-animation-timing-function,cubic-bezier(.78, .14, .15, .86))}`,n={success:!0,_identification:!0,data:`<svg t="1667965185400" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8572" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m193.5 301.7l-210.6 292c-12.7 17.7-39 17.7-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" p-id="8573"></path></svg>`},r={success:!0,_identification:!0,data:`<svg t="1667965220951" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8711" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359c-1.2-1.5-1.9-3.3-1.9-5.2 0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" p-id="8712"></path></svg>`},i={success:!0,_identification:!0,data:`<svg t="1667965239916" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8850" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272z m-32-344c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z" p-id="8851"></path></svg>`},a={success:!0,_identification:!0,data:`<svg t="1667965273540" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8989" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296z m32 440c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z" p-id="8990"></path></svg>`},o=`.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))}}`,s=typeof document>`u`,c=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}},l=0,ee=1,u=2,d=null,f=null,p=0,m=new Set,h=!1;function g(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ie(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)y(e,u);p===0&&ae()}}]}function _(e){let t=ne(e,!0);return re(t),x(t),()=>C(t)}function te(e){let t={owned:[],cleanups:[],owner:f},n=f,r=d;f=t,d=null;try{return e(()=>oe(t))}finally{f=n,d=r}}function v(e){f&&f.cleanups.push(e)}function ne(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:u,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:f}}function re(e){f&&f.owned.push(e)}function ie(e){d&&(d.sources.add(e),e.observers.add(d))}function y(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)m.add(e);else if(n)for(let t of e.observers)y(t,ee)}function ae(){if(!(p>0||h)){h=!0;try{for(;m.size>0;){let e=[...m];m.clear();for(let t of e)t.disposed||b(t)}}finally{h=!1}}}function b(e){if(!(e.disposed||e.state===l)){if(e.state===ee)for(let t of e.sources)`fn`in t&&b(t);e.state===u&&x(e),e.state=l}}function x(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);S(e);let t=d,n=f;d=e,f=e,e.running=!0,e.state=l;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)y(t,u)}}finally{e.running=!1,d=t,f=n}}function S(e){for(let t of e.owned)C(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 C(e){e.disposed||(e.disposed=!0,S(e),e.observers.clear())}function oe(e){for(let t of e.owned)C(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function w(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function T(e){return w(e)}var se=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ce=(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)se(r)&&(ce(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`?w(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 le(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}="${T(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${T(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`?w(e):(e instanceof D,e.serialize())).join(``):a+=w(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}>`}},le=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>${w(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?w(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 N?e.build():typeof e==`string`?s?e:document.createTextNode(e):e,ue=(e,t)=>{if(s){k([t()]).forEach(t=>{let n=A(t);n!=null&&e.appendChild(n)});return}let n=document.createComment(``);e.appendChild(n);let r=[];_(()=>{let e=k([t()]);for(let e of r)e.parentNode?.removeChild(e);let i=[],a=n;for(let t of e){let e=A(t);e!=null&&(a.after(e),a=e,i.push(e))}r=i})},de=`__ranFor`,fe=e=>typeof e==`object`&&!!e&&e[de]===!0,pe=(e,t,n)=>{let[r,i]=g(t),a=null,o=te(t=>{let i=A(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},j=(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},me=(e,t)=>{if(s){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;v(()=>{for(let e of r.values())e.dispose();r.clear()}),_(()=>{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=pe(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();j(n,a),r=i})},he=`__ranIndex`,ge=e=>typeof e==`object`&&!!e&&e[he]===!0,_e=(e,t,n)=>{let[r,i]=g(e),a=null,o=te(e=>{let i=A(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ve=(e,t)=>{if(s){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];v(()=>{for(let e of r)e.dispose();r=[]}),_(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(_e(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()}j(n,r.map(e=>e.node).filter(e=>e!=null))})},M=(e,t)=>{k(t).forEach(t=>{if(fe(t)){me(e,t);return}if(ge(t)){ve(e,t);return}if(typeof t==`function`){ue(e,t);return}let n=A(t);n!=null&&e.appendChild(n)})},N=class{el;constructor(e){this.el=s?new O(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?_(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{s?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(s){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 ye(this.el,t,e)}build(){return this.el}serialize(){if(s)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ye=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(s)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 s?this.root.serialize():this.root.innerHTML}},P=e=>new N(e),F=()=>P(`div`),be=()=>P(`span`),xe=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}},I=(e=8)=>Math.random().toString(36).substring(2,e+2),Se=e=>typeof e==`function`,Ce=12e4,we=`__ranuts_bridge__`,Te=`default`,L=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)}},Ee=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=Te){this.targetOrigin=t,this.channel=n,this.senderId=I(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,L.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:we,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(Se(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=I(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},Ce),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=()=>{L.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 Ee(n,t,r);if(e||=I(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 xe;var R=[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],z=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new z(R[0],3609767458),new z(R[1],602891725),new z(R[2],3964484399),new z(R[3],2173295548),new z(R[4],4081628472),new z(R[5],3053834265),new z(R[6],2937671579),new z(R[7],3664609560),new z(R[8],2734883394),new z(R[9],1164996542),new z(R[10],1323610764),new z(R[11],3590304994),new z(R[12],4068182383),new z(R[13],991336113),new z(R[14],633803317),new z(R[15],3479774868),new z(R[16],2666613458),new z(R[17],944711139),new z(R[18],2341262773),new z(R[19],2007800933),new z(R[20],1495990901),new z(R[21],1856431235),new z(R[22],3175218132),new z(R[23],2198950837),new z(R[24],3999719339),new z(R[25],766784016),new z(R[26],2566594879),new z(R[27],3203337956),new z(R[28],1034457026),new z(R[29],2466948901),new z(R[30],3758326383),new z(R[31],168717936),new z(R[32],1188179964),new z(R[33],1546045734),new z(R[34],1522805485),new z(R[35],2643833823),new z(R[36],2343527390),new z(R[37],1014477480),new z(R[38],1206759142),new z(R[39],344077627),new z(R[40],1290863460),new z(R[41],3158454273),new z(R[42],3505952657),new z(R[43],106217008),new z(R[44],3606008344),new z(R[45],1432725776),new z(R[46],1467031594),new z(R[47],851169720),new z(R[48],3100823752),new z(R[49],1363258195),new z(R[50],3750685593),new z(R[51],3785050280),new z(R[52],3318307427),new z(R[53],3812723403),new z(R[54],2003034995),new z(R[55],3602036899),new z(R[56],1575990012),new z(R[57],1125592928),new z(R[58],2716904306),new z(R[59],442776044),new z(R[60],593698344),new z(R[61],3733110249),new z(R[62],2999351573),new z(R[63],3815920427),new z(3391569614,3928383900),new z(3515267271,566280711),new z(3940187606,3454069534),new z(4118630271,4000239992),new z(116418474,1914138554),new z(174292421,2731055270),new z(289380356,3203993006),new z(460393269,320620315),new z(685471733,587496836),new z(852142971,1086792851),new z(1017036298,365543100),new z(1126000580,2618297676),new z(1288033470,3409855158),new z(1501505948,4234509866),new z(1607167915,987167468),new z(1816402316,1246189591),new z(0,1),new z(0,32898),new z(2147483648,32906),new z(2147483648,2147516416),new z(0,32907),new z(0,2147483649),new z(2147483648,2147516545),new z(2147483648,32777),new z(0,138),new z(0,136),new z(0,2147516425),new z(0,2147483658),new z(0,2147516555),new z(2147483648,139),new z(2147483648,32905),new z(2147483648,32771),new z(2147483648,32770),new z(2147483648,128),new z(0,32778),new z(2147483648,2147483658),new z(2147483648,2147516545),new z(2147483648,32896),new z(0,2147483649),new z(2147483648,2147516424);var B=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})(B),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(B);var De=new Map;function V(e,t){s?(De.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var H=typeof document<`u`?HTMLElement:O,U=new Map,W=new Map,Oe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!U.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),U.set(t,e)}let n=U.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)}}},ke=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!W.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),W.set(t,e)}let n=W.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)}}},G=new WeakMap,K=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,q=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||G.get(e)||e.attachShadow(n);return G.set(e,r),Oe(r,t?`${t}\n${K}`:K),r},J=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Y=(e,t,n=``)=>e.getAttribute(t)??n,X=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Z=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&ke(t,a)},Ae={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>`}},je=!1,Me=new Map,Q=!1,$=e=>/<svg[\s>]/i.test(e),Ne=e=>{if(typeof e==`string`)return $(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&$(n))return n;let r=t.default;if(typeof r==`string`&&$(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&$(e.data))return e.data}},Pe=(e,t)=>{Q=!0;let n=Ne(t);n&&(Me.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},Fe=e=>{Q=!0,Object.entries(e).forEach(([e,t])=>{Pe(e,t)})};Fe(Ae),V(`r-icon`,class extends H{isDev=je;_events=new c;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=q(this,o);let e=J(this._shadowDom,`.ran-icon`,()=>F().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return Y(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return Y(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return Y(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 Y(this,`aria-label`)}set ariaLabel(e){X(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}handlerExternalCss=()=>{Z(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=Me.get(t);if(!n){this.isDev&&Q&&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=>$(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=P(`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 Ie=`data-ranui-message-host`,Le=()=>`[${Ie}="true"]`,Re=(e,t)=>{let n=t?.top??8,r=t?.zIndex??1200;e.style.setProperty(`position`,`fixed`),e.style.setProperty(`top`,typeof n==`number`?`${n}px`:String(n)),e.style.setProperty(`left`,`0`),e.style.setProperty(`width`,`100%`),e.style.setProperty(`z-index`,String(r)),e.style.setProperty(`pointer-events`,`none`)},ze=e=>typeof document>`u`?null:e?.getContainer?.()||document.body,Be=e=>{if(typeof document>`u`)return null;let t=ze(e)||document.body,n=t.querySelector(Le());return n||(n=F().attr(Ie,`true`).children(F().class(`ranui-message`).attr(`aria-live`,`polite`).attr(`aria-atomic`,`false`)).build(),t.appendChild(n)),Re(n,e),n.querySelector(`.ranui-message`)},Ve=300,He=3e3;Fe({"check-circle-fill":n,"close-circle-fill":r,"info-circle-fill":i,"warning-circle-fill":a});var Ue=new Map([[`success`,`check-circle-fill`],[`warning`,`warning-circle-fill`],[`error`,`close-circle-fill`],[`info`,`info-circle-fill`],[`toast`,null]]),We=new Map([[`success`,`#52c41a`],[`warning`,`#faad14`],[`error`,`#ff4d4f`],[`info`,`#006bff`],[`toast`,`rgba(0, 0, 0, 0.7)`]]),Ge=class extends H{_info;_notice;_content;_icon;_span;_shadowDom;timeId;close;static get observedAttributes(){return[`type`,`content`,`sheet`]}constructor(){super(),this._shadowDom=q(this,t);let e=J(this._shadowDom,`.ran-message-notice`,()=>F().class(`ran-message-notice`).children(F().class(`ran-message-notice-content`).children(F().class(`ran-message-notice-content-info`).children(P(`r-icon`),be()))).build());this._notice=e,this._content=e.querySelector(`.ran-message-notice-content`),this._info=e.querySelector(`.ran-message-notice-content-info`),this._icon=e.querySelector(`r-icon`),this._span=e.querySelector(`span`),this.handlerExternalCss()}connectedCallback(){H.prototype.connectedCallback?.call(this),this.hasAttribute(`aria-atomic`)||this.setAttribute(`aria-atomic`,`true`)}get type(){return this.getAttribute(`type`)}set type(e){e&&this.setAttribute(`type`,e)}get content(){return this.getAttribute(`content`)}set content(e){e&&this.setAttribute(`content`,e)}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}handlerExternalCss=()=>{Z(this,this._shadowDom,`sheet`,null,this.sheet)};setA11yRole=e=>{let t=e===`error`||e===`warning`;this.setAttribute(`role`,t?`alert`:`status`)};setIcon=e=>{let t=Ue.get(e),n=We.get(e);t&&(this._icon?.setAttribute(`name`,t),this._icon?.style.setProperty(`margin-right`,`8px`),this._icon?.setAttribute(`size`,`18`),n&&this._icon?.setAttribute(`color`,n))};attributeChangedCallback(e,t,n){t!==n&&(e===`content`&&(this._span.textContent=n),e===`type`&&(this.setIcon(n),this.setA11yRole(n)),e===`sheet`&&this.handlerExternalCss())}};V(`r-message`,Ge);function Ke(){if(typeof window>`u`)return null;let e=e=>t=>{let n={},r=P(`r-message`).class(`message`).build();r.timeId&&clearTimeout(r.timeId),r.setAttribute(`type`,e);let i=He,a;if(!t)return;typeof t==`string`?r.setAttribute(`content`,t):(r.setAttribute(`content`,t.content),a=t.close,i=t.duration||He,n.top=t.top,n.zIndex=t.zIndex,n.getContainer=t.getContainer);let o=Be(n);if(!o)return;let s=setTimeout(()=>{r.classList.remove(`message-in`),r.classList.add(`message-leave`),clearTimeout(s)},i-Ve);r.timeId=setTimeout(()=>{r.classList.remove(`message-leave`),o.removeChild(r),a&&a()},i),o.appendChild(r),r.classList.add(`message-in`),setTimeout(()=>{r.classList.remove(`message-in`)},Ve)},t={info:e(`info`),success:e(`success`),error:e(`error`),warning:e(`warning`),toast:e(`toast`)};return window.message=t,window.ranui||(window.ranui={}),window.ranui.message=t,t}var qe=Ke();return e.CustomMessage=Ge,e.default=qe,e})({});
@@ -1 +1 @@
1
- var ranui_modal=(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{position:var(--ran-modal-host-position,static)}.ran-modal-root{position:var(--ran-modal-root-position,fixed);inset:var(--ran-modal-root-inset,0);z-index:var(--ran-modal-root-z-index,var(--ran-z-modal,1000));opacity:0;visibility:hidden;justify-content:center;align-items:center;transition:opacity .3s,visibility .3s;display:flex}.ran-modal-root[open]{opacity:1;visibility:visible}.ran-modal-mask{position:var(--ran-modal-mask-position,absolute);inset:var(--ran-modal-mask-inset,0);background:var(--ran-modal-mask-background,#00000073)}.ran-modal-dialog{position:var(--ran-modal-dialog-position,relative);width:var(--ran-modal-dialog-width,min(560px, calc(100vw - 32px)));margin:var(--ran-modal-dialog-margin,0 auto);background:var(--ran-modal-dialog-background,var(--ran-color-bg-elevated,#fff));border-image-source:var(--ran-modal-dialog-border-image-source,none);border-image-slice:var(--ran-modal-dialog-border-image-slice,8);border-image-width:var(--ran-modal-dialog-border-image-width,4px);border-radius:var(--ran-modal-dialog-border-radius,var(--ran-radius-md,12px));box-shadow:var(--ran-modal-dialog-box-shadow,var(--ran-shadow-modal,var(--ran-shadow-elevated,0 10px 32px #0003)));outline:var(--ran-modal-dialog-outline,none);max-height:var(--ran-modal-dialog-max-height,calc(100vh - 20vh));overflow:var(--ran-modal-dialog-overflow,hidden);transform:translateY(var(--ran-modal-dialog-offset-y,clamp(-56px, -6vh, -24px))) scale(.9);border-image-outset:0;border-image-repeat:stretch;transition:transform .3s cubic-bezier(.075,.82,.165,1)}.ran-modal-root[open] .ran-modal-dialog{transform:translateY(var(--ran-modal-dialog-offset-y,clamp(-56px, -6vh, -24px))) scale(1)}.ran-modal-header{display:var(--ran-modal-header-display,flex);align-items:var(--ran-modal-header-align-items,center);justify-content:var(--ran-modal-header-justify-content,space-between);padding:var(--ran-modal-header-padding,16px 18px);border-bottom:var(--ran-modal-header-border-bottom,1px solid var(--ran-color-border-secondary,#f0f0f0))}.ran-modal-title{margin:var(--ran-modal-title-margin,0);font-size:var(--ran-modal-title-font-size,16px);line-height:var(--ran-modal-title-line-height,1.5);color:var(--ran-modal-title-color,var(--ran-color-text,#111827))}.ran-modal-close{border:var(--ran-modal-close-border,none);background:var(--ran-modal-close-background,transparent);color:var(--ran-modal-close-color,var(--ran-color-text-secondary,#667085));font-size:var(--ran-modal-close-font-size,18px);cursor:var(--ran-modal-close-cursor,pointer);padding:var(--ran-modal-close-padding,0 4px)}.ran-modal-body{padding:var(--ran-modal-body-padding,18px);max-height:var(--ran-modal-body-max-height,calc(100vh - 32vh));overflow:var(--ran-modal-body-overflow,auto);color:var(--ran-modal-body-color,var(--ran-color-text-secondary,#344054))}.ran-modal-footer{align-items:var(--ran-modal-footer-align-items,center);justify-content:var(--ran-modal-footer-justify-content,flex-end);gap:var(--ran-modal-footer-gap,10px);padding:var(--ran-modal-footer-padding,12px 18px 18px);border-top:var(--ran-modal-footer-border-top,1px solid var(--ran-color-border-secondary,#f0f0f0));display:none}.ran-modal-root.has-footer .ran-modal-footer{display:flex}.ran-modal-footer::slotted(.ran-modal-actions){justify-content:flex-end;align-items:center;gap:10px;display:inline-flex}.ran-modal-footer::slotted(.ran-modal-action){border:1px solid var(--ran-color-border,#d0d5dd);background:var(--ran-color-bg-elevated,#fff);border-radius:var(--ran-radius-sm,6px);cursor:pointer;height:34px;color:var(--ran-color-text-secondary,#344054);padding:0 14px;font-size:14px;line-height:32px}.ran-modal-footer::slotted(.ran-modal-action-confirm){border-color:var(--ran-color-primary,#155eef);background:var(--ran-color-primary,#155eef);color:#fff}.ran-modal-footer::slotted(.ran-modal-action:disabled){opacity:.6;cursor:not-allowed}`,n=typeof document>`u`,r=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}},i=0,a=1,o=2,s=null,c=null,l=new Set;function u(e){let t=d(e,!0);return f(t),m(t),()=>g(t)}function d(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function f(e){c&&c.owned.push(e)}function p(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)p(t,a)}function m(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);h(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;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)p(t,o)}}finally{e.running=!1,s=t,c=n}}function h(e){for(let t of e.owned)g(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 g(e){e.disposed||(e.disposed=!0,h(e),e.observers.clear())}function _(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function v(e){return _(e)}var y=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ee=(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()},b=(e,t,n)=>{for(let r of e)y(r)&&(ee(r,t)&&n.push(r),b(r.childrenList,t,n))},x=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?_(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return b(this.childrenList,e,t),t}},S=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 x)}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 C(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return b(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}="${v(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${v(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 instanceof x,e.serialize())).join(``):a+=_(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}>`}},C=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 b(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${_(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?_(e):(e instanceof x,e.serialize())).join(``)}</template>`}},w=class e{el;constructor(e){this.el=n?new S(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?u(()=>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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),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 T(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}},T=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 w?this.root.appendChild(e.build()):typeof e==`string`?n?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(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}},E=e=>new w(e),D=()=>E(`div`),O=()=>E(`slot`),k=()=>E(`button`),A=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}},j=(e=8)=>Math.random().toString(36).substring(2,e+2),M=e=>typeof e==`function`,N=12e4,P=`__ranuts_bridge__`,F=`default`,I=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=`*`,n=F){this.targetOrigin=t,this.channel=n,this.senderId=j(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,I.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:P,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(M(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=j(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},N),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=()=>{I.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 te(n,t,r);if(e||=j(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 A;var L=[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],R=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new R(L[0],3609767458),new R(L[1],602891725),new R(L[2],3964484399),new R(L[3],2173295548),new R(L[4],4081628472),new R(L[5],3053834265),new R(L[6],2937671579),new R(L[7],3664609560),new R(L[8],2734883394),new R(L[9],1164996542),new R(L[10],1323610764),new R(L[11],3590304994),new R(L[12],4068182383),new R(L[13],991336113),new R(L[14],633803317),new R(L[15],3479774868),new R(L[16],2666613458),new R(L[17],944711139),new R(L[18],2341262773),new R(L[19],2007800933),new R(L[20],1495990901),new R(L[21],1856431235),new R(L[22],3175218132),new R(L[23],2198950837),new R(L[24],3999719339),new R(L[25],766784016),new R(L[26],2566594879),new R(L[27],3203337956),new R(L[28],1034457026),new R(L[29],2466948901),new R(L[30],3758326383),new R(L[31],168717936),new R(L[32],1188179964),new R(L[33],1546045734),new R(L[34],1522805485),new R(L[35],2643833823),new R(L[36],2343527390),new R(L[37],1014477480),new R(L[38],1206759142),new R(L[39],344077627),new R(L[40],1290863460),new R(L[41],3158454273),new R(L[42],3505952657),new R(L[43],106217008),new R(L[44],3606008344),new R(L[45],1432725776),new R(L[46],1467031594),new R(L[47],851169720),new R(L[48],3100823752),new R(L[49],1363258195),new R(L[50],3750685593),new R(L[51],3785050280),new R(L[52],3318307427),new R(L[53],3812723403),new R(L[54],2003034995),new R(L[55],3602036899),new R(L[56],1575990012),new R(L[57],1125592928),new R(L[58],2716904306),new R(L[59],442776044),new R(L[60],593698344),new R(L[61],3733110249),new R(L[62],2999351573),new R(L[63],3815920427),new R(3391569614,3928383900),new R(3515267271,566280711),new R(3940187606,3454069534),new R(4118630271,4000239992),new R(116418474,1914138554),new R(174292421,2731055270),new R(289380356,3203993006),new R(460393269,320620315),new R(685471733,587496836),new R(852142971,1086792851),new R(1017036298,365543100),new R(1126000580,2618297676),new R(1288033470,3409855158),new R(1501505948,4234509866),new R(1607167915,987167468),new R(1816402316,1246189591),new R(0,1),new R(0,32898),new R(2147483648,32906),new R(2147483648,2147516416),new R(0,32907),new R(0,2147483649),new R(2147483648,2147516545),new R(2147483648,32777),new R(0,138),new R(0,136),new R(0,2147516425),new R(0,2147483658),new R(0,2147516555),new R(2147483648,139),new R(2147483648,32905),new R(2147483648,32771),new R(2147483648,32770),new R(2147483648,128),new R(0,32778),new R(2147483648,2147483658),new R(2147483648,2147516545),new R(2147483648,32896),new R(0,2147483649),new R(2147483648,2147516424);var z=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})(z),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(z);var B=[!1,`false`,null,void 0],V=new Map;function H(e,t){n?(V.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var U=typeof document<`u`?HTMLElement:S,W=new Map,G=new Map,K=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!W.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),W.set(t,e)}let n=W.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)}}},q=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!G.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),G.set(t,e)}let n=G.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)}}},J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,X=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),K(r,t?`${t}\n${Y}`:Y),r},Z=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},ne=(e,t,n=``)=>e.getAttribute(t)??n,re=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},ie=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&q(t,a)},Q=`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,$=class e extends U{static _openStack=[];static _bodyScrollLockCount=0;static _bodyOverflow=``;static _bodyPaddingRight=``;static _inertSnapshot=new Map;_events=new r;_shadowDom;_root;_mask;_dialog;_title;_closeBtn;_slot;_footer;_footerSlot;_labelId;_previousActiveElement;_isDialogOpen;_scrollLocked;_afterOpenTimer;_afterCloseTimer;static get observedAttributes(){return[`open`,`title`,`maskClosable`,`closeOnEsc`,`lockScroll`,`autoFocus`,`closable`,`sheet`]}constructor(){super(),this._labelId=`ran-modal-title-${Math.random().toString(36).slice(2,9)}`,this._previousActiveElement=null,this._isDialogOpen=!1,this._scrollLocked=!1,this._afterOpenTimer=null,this._afterCloseTimer=null,this._shadowDom=X(this,t);let e=Z(this._shadowDom,`.ran-modal-root`,()=>D().class(`ran-modal-root`).part(`root`).children(D().class(`ran-modal-mask`).part(`mask`),D().class(`ran-modal-dialog`).part(`dialog`).role(`dialog`).attr(`aria-modal`,`true`).tabIndex(-1).labelledBy(this._labelId).children(E(`header`).class(`ran-modal-header`).part(`header`).children(E(`h3`).class(`ran-modal-title`).part(`title`).id(this._labelId),E(`button`).class(`ran-modal-close`).part(`close`).attr(`type`,`button`).label(`Close dialog`).text(`x`)),D().class(`ran-modal-body`).part(`body`).children(O()),E(`footer`).class(`ran-modal-footer`).part(`footer`).children(O().attr(`name`,`footer`)))).build());this._root=e,this._mask=this._root.querySelector(`.ran-modal-mask`),this._dialog=this._root.querySelector(`.ran-modal-dialog`),this._title=this._root.querySelector(`.ran-modal-title`),this._closeBtn=this._root.querySelector(`.ran-modal-close`),this._slot=this._root.querySelector(`slot`),this._footer=this._root.querySelector(`.ran-modal-footer`),this._footerSlot=this._root.querySelector(`slot[name="footer"]`),this.syncTitle(),this.syncClosable(),this.syncFooter()}get open(){return this.hasAttribute(`open`)&&!B.includes(this.getAttribute(`open`))}set open(e){!e||e===`false`?this.removeAttribute(`open`):this.setAttribute(`open`,``)}get title(){return this.getAttribute(`title`)||``}set title(e){this.setAttribute(`title`,e||``)}get maskClosable(){let e=this.getAttribute(`maskClosable`);return!(e===`false`||e===`0`)}set maskClosable(e){!e||e===`false`||e===`0`?this.setAttribute(`maskClosable`,`false`):this.setAttribute(`maskClosable`,`true`)}get sheet(){return ne(this,`sheet`)}set sheet(e){re(this,`sheet`,e)}get closeOnEsc(){let e=this.getAttribute(`closeOnEsc`);return!(e===`false`||e===`0`)}set closeOnEsc(e){!e||e===`false`||e===`0`?this.setAttribute(`closeOnEsc`,`false`):this.setAttribute(`closeOnEsc`,`true`)}get lockScroll(){let e=this.getAttribute(`lockScroll`);return!(e===`false`||e===`0`)}set lockScroll(e){!e||e===`false`||e===`0`?this.setAttribute(`lockScroll`,`false`):this.setAttribute(`lockScroll`,`true`)}get autoFocus(){let e=this.getAttribute(`autoFocus`);return!(e===`false`||e===`0`)}set autoFocus(e){!e||e===`false`||e===`0`?this.setAttribute(`autoFocus`,`false`):this.setAttribute(`autoFocus`,`true`)}get closable(){let e=this.getAttribute(`closable`);return!(e===`false`||e===`0`)}set closable(e){!e||e===`false`||e===`0`?this.setAttribute(`closable`,`false`):this.setAttribute(`closable`,`true`)}handlerExternalCss=()=>{ie(this,this._shadowDom,`sheet`,null,this.sheet)};syncTitle=()=>{this._title.textContent=this.title||`Modal`};syncClosable=()=>{let e=this.closable;this._closeBtn.hidden=!e,this._closeBtn.setAttribute(`aria-hidden`,e?`false`:`true`),this._closeBtn.tabIndex=e?0:-1};syncFooter=()=>{let e=(this._footerSlot?.assignedNodes({flatten:!0})||[]).some(e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(e.textContent||``).trim().length>0);this._root.classList.toggle(`has-footer`,e)};getFocusableElements=()=>{let e=Array.from(this._dialog.querySelectorAll(Q)),t=Array.from(this.querySelectorAll(Q));return[...e,...t].filter(e=>{if(e.hasAttribute(`disabled`))return!1;let t=e;return t.offsetParent!==null||t.getClientRects().length>0})};static getTopModal=()=>e._openStack.length===0?null:e._openStack[e._openStack.length-1]||null;static pushOpenModal=t=>{e._openStack.includes(t)||e._openStack.push(t)};static removeOpenModal=t=>{e._openStack=e._openStack.filter(e=>e!==t)};static syncBackgroundInert=()=>{if(typeof document>`u`)return;let t=document.body;if(!t)return;for(let[t,n]of e._inertSnapshot.entries())t.inert=n.inert,n.ariaHidden===null?t.removeAttribute(`aria-hidden`):t.setAttribute(`aria-hidden`,n.ariaHidden);if(e._inertSnapshot.clear(),e._openStack.length===0)return;let n=e._openStack.map(e=>e);Array.from(t.children).forEach(t=>{n.some(e=>t===e||t.contains(e))||(e._inertSnapshot.set(t,{inert:t.inert,ariaHidden:t.getAttribute(`aria-hidden`)}),t.inert=!0,t.setAttribute(`aria-hidden`,`true`))})};static lockBodyScroll=()=>{if(typeof document>`u`)return;let t=document.body;if(t){if(e._bodyScrollLockCount===0){e._bodyOverflow=t.style.overflow,e._bodyPaddingRight=t.style.paddingRight;let n=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(n>0){let e=Number.parseFloat(window.getComputedStyle(t).paddingRight)||0;t.style.paddingRight=`${e+n}px`}t.style.overflow=`hidden`}e._bodyScrollLockCount+=1}};static unlockBodyScroll=()=>{if(typeof document>`u`)return;let t=document.body;!t||e._bodyScrollLockCount===0||(--e._bodyScrollLockCount,e._bodyScrollLockCount===0&&(t.style.overflow=e._bodyOverflow,t.style.paddingRight=e._bodyPaddingRight))};clearAfterTimers=()=>{this._afterOpenTimer!==null&&(window.clearTimeout(this._afterOpenTimer),this._afterOpenTimer=null),this._afterCloseTimer!==null&&(window.clearTimeout(this._afterCloseTimer),this._afterCloseTimer=null)};getTransitionTimeout=()=>{let e=window.getComputedStyle(this._dialog),t=e=>{let t=e.split(`,`)[0]?.trim()||`0s`;return t.endsWith(`ms`)?Number.parseFloat(t):t.endsWith(`s`)?Number.parseFloat(t)*1e3:Number.parseFloat(t)||0},n=t(e.transitionDelay),r=t(e.transitionDuration);return Math.max(0,n+r)};emitAfterOpen=()=>{let e=this.getTransitionTimeout();this._afterOpenTimer=window.setTimeout(()=>{this._afterOpenTimer=null,this.dispatchEvent(new CustomEvent(`afteropen`))},e)};emitAfterClose=e=>{let t=this.getTransitionTimeout();this._afterCloseTimer=window.setTimeout(()=>{this._afterCloseTimer=null,this.dispatchEvent(new CustomEvent(`afterclose`,{detail:{trigger:e}}))},t)};trapFocus=e=>{if(e.key!==`Tab`)return;let t=this.getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus();return}let n=t[0],r=t[t.length-1],i=this._shadowDom.activeElement||document.activeElement;if(e.shiftKey&&i===n){e.preventDefault(),r.focus();return}!e.shiftKey&&i===r&&(e.preventDefault(),n.focus())};close=(e=`program`)=>{if(!this.open)return;let t=new CustomEvent(`beforeclose`,{cancelable:!0,detail:{trigger:e}});this.dispatchEvent(t)&&(this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`close`,{detail:{trigger:e}})),this.emitAfterClose(e))};openDialog=()=>{if(this._isDialogOpen||this._root.hasAttribute(`open`))return;let t=new CustomEvent(`beforeopen`,{cancelable:!0});if(!this.dispatchEvent(t)){this.removeAttribute(`open`);return}this._previousActiveElement=document.activeElement,e.pushOpenModal(this),e.syncBackgroundInert(),this.lockScroll&&(e.lockBodyScroll(),this._scrollLocked=!0),this._isDialogOpen=!0,this._root.setAttribute(`open`,``),this._dialog.setAttribute(`aria-hidden`,`false`),this.dispatchEvent(new CustomEvent(`open`)),this.clearAfterTimers(),this.emitAfterOpen(),requestAnimationFrame(()=>{this.autoFocus&&(this.getFocusableElements()[0]||this._dialog).focus()})};closeDialog=()=>{if(!this._isDialogOpen){this._root.removeAttribute(`open`),this._dialog.setAttribute(`aria-hidden`,`true`);return}this._isDialogOpen=!1,e.removeOpenModal(this),e.syncBackgroundInert(),this._scrollLocked&&=(e.unlockBodyScroll(),!1),this._root.removeAttribute(`open`),this._dialog.setAttribute(`aria-hidden`,`true`),this._previousActiveElement instanceof HTMLElement&&this._previousActiveElement.focus()};onMaskClick=e=>{this.maskClosable&&(e.composedPath().includes(this._dialog)||this.close(`mask`))};onCloseButtonClick=()=>{this.close(`button`)};onKeydown=t=>{if(this.open&&e.getTopModal()===this){if(t.key===`Escape`&&this.closeOnEsc){t.preventDefault(),this.close(`escape`);return}this.trapFocus(t)}};onDocumentFocusIn=t=>{if(!this.open||e.getTopModal()!==this)return;let n=t.composedPath();n.includes(this)||n.includes(this._dialog)||(this.getFocusableElements()[0]||this._dialog).focus()};connectedCallback(){this.handlerExternalCss(),this._events.on(this._mask,`click`,this.onMaskClick).on(this._closeBtn,`click`,this.onCloseButtonClick).on(document,`keydown`,this.onKeydown).on(document,`focusin`,this.onDocumentFocusIn).on(this._footerSlot,`slotchange`,this.syncFooter),this.syncTitle(),this.syncClosable(),this.syncFooter(),this.open?this.openDialog():this.closeDialog()}disconnectedCallback(){this._root.hasAttribute(`open`)&&this.closeDialog(),this._events.abort(),this.clearAfterTimers()}attributeChangedCallback(e,t,n){if(t!==n){if(e===`title`){this.syncTitle();return}if(e===`closable`){this.syncClosable();return}if(e===`open`){this.open?this.openDialog():this.closeDialog();return}e===`sheet`&&this.handlerExternalCss()}}static normalizeProgrammaticOptions=e=>typeof e==`string`?{content:e}:e||{};static open=t=>{if(typeof document>`u`)return Promise.resolve({action:`dismiss`,trigger:`program`});let{title:n=`Confirm`,content:r=``,okText:i=`OK`,cancelText:a=`Cancel`,showCancel:o=!1,maskClosable:s=!1,closeOnEsc:c=!0,lockScroll:l=!0,autoFocus:u=!0,closable:d=!0,onConfirm:f,onCancel:p}=e.normalizeProgrammaticOptions(t);return new Promise(e=>{let t=E(`r-modal`).build();t.title=n,t.maskClosable=s,t.closeOnEsc=c,t.lockScroll=l,t.autoFocus=u,t.closable=d;let m=D().build();typeof r==`string`?m.textContent=r:r instanceof Node&&m.appendChild(r),t.appendChild(m);let h=`dismiss`,g=D().attr(`slot`,`footer`).class(`ran-modal-actions`);if(o){let e=k().attr(`type`,`button`).class(`ran-modal-action ran-modal-action-cancel`).text(a).build();e.addEventListener(`click`,async()=>{await p?.()!==!1&&(h=`cancel`,t.close(`program`))}),g.children(e)}let _=k().attr(`type`,`button`).class(`ran-modal-action ran-modal-action-confirm`).text(i).build();_.addEventListener(`click`,async()=>{_.disabled=!0;try{if(await f?.()===!1)return;h=`confirm`,t.close(`program`)}finally{_.disabled=!1}}),g.children(_),t.appendChild(g.build());let v=n=>{let r=n.detail?.trigger||`program`;t.removeEventListener(`afterclose`,v),t.parentElement&&t.parentElement.removeChild(t),e({action:h,trigger:r})};t.addEventListener(`afterclose`,v),document.body.appendChild(t),t.open=!0})};static confirm=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!0})};static info=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Info`})};static success=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Success`})};static warning=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Warning`})};static error=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Error`})}};return H(`r-modal`,$),e.Modal=$,e.default=$,e})({});
1
+ var ranui_modal=(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{position:var(--ran-modal-host-position,static)}.ran-modal-root{position:var(--ran-modal-root-position,fixed);inset:var(--ran-modal-root-inset,0);z-index:var(--ran-modal-root-z-index,var(--ran-z-modal,1000));opacity:0;visibility:hidden;justify-content:center;align-items:center;transition:opacity .3s,visibility .3s;display:flex}.ran-modal-root[open]{opacity:1;visibility:visible}.ran-modal-mask{position:var(--ran-modal-mask-position,absolute);inset:var(--ran-modal-mask-inset,0);background:var(--ran-modal-mask-background,#00000073)}.ran-modal-dialog{position:var(--ran-modal-dialog-position,relative);width:var(--ran-modal-dialog-width,min(560px, calc(100vw - 32px)));margin:var(--ran-modal-dialog-margin,0 auto);background:var(--ran-modal-dialog-background,var(--ran-color-bg-elevated,#fff));border-image-source:var(--ran-modal-dialog-border-image-source,none);border-image-slice:var(--ran-modal-dialog-border-image-slice,8);border-image-width:var(--ran-modal-dialog-border-image-width,4px);border-radius:var(--ran-modal-dialog-border-radius,var(--ran-radius-md,12px));box-shadow:var(--ran-modal-dialog-box-shadow,var(--ran-shadow-modal,var(--ran-shadow-elevated,0 10px 32px #0003)));outline:var(--ran-modal-dialog-outline,none);max-height:var(--ran-modal-dialog-max-height,calc(100vh - 20vh));overflow:var(--ran-modal-dialog-overflow,hidden);transform:translateY(var(--ran-modal-dialog-offset-y,clamp(-56px, -6vh, -24px))) scale(.9);border-image-outset:0;border-image-repeat:stretch;transition:transform .3s cubic-bezier(.075,.82,.165,1)}.ran-modal-root[open] .ran-modal-dialog{transform:translateY(var(--ran-modal-dialog-offset-y,clamp(-56px, -6vh, -24px))) scale(1)}.ran-modal-header{display:var(--ran-modal-header-display,flex);align-items:var(--ran-modal-header-align-items,center);justify-content:var(--ran-modal-header-justify-content,space-between);padding:var(--ran-modal-header-padding,16px 18px);border-bottom:var(--ran-modal-header-border-bottom,1px solid var(--ran-color-border-secondary,#f0f0f0))}.ran-modal-root.hide-header .ran-modal-header{z-index:1;padding:var(--ran-modal-hide-header-padding,10px);background:0 0;border-bottom:none;position:absolute;top:0;right:0}.ran-modal-root.hide-header .ran-modal-title{display:none}.ran-modal-title{margin:var(--ran-modal-title-margin,0);font-size:var(--ran-modal-title-font-size,16px);line-height:var(--ran-modal-title-line-height,1.5);color:var(--ran-modal-title-color,var(--ran-color-text,#111827))}.ran-modal-close{border:var(--ran-modal-close-border,none);background:var(--ran-modal-close-background,transparent);color:var(--ran-modal-close-color,var(--ran-color-text-secondary,#667085));font-size:var(--ran-modal-close-font-size,18px);cursor:var(--ran-modal-close-cursor,pointer);padding:var(--ran-modal-close-padding,0 4px)}.ran-modal-body{padding:var(--ran-modal-body-padding,18px);max-height:var(--ran-modal-body-max-height,calc(100vh - 32vh));overflow:var(--ran-modal-body-overflow,auto);color:var(--ran-modal-body-color,var(--ran-color-text-secondary,#344054))}.ran-modal-footer{align-items:var(--ran-modal-footer-align-items,center);justify-content:var(--ran-modal-footer-justify-content,flex-end);gap:var(--ran-modal-footer-gap,10px);padding:var(--ran-modal-footer-padding,12px 18px 18px);border-top:var(--ran-modal-footer-border-top,1px solid var(--ran-color-border-secondary,#f0f0f0));display:none}.ran-modal-root.has-footer .ran-modal-footer{display:flex}.ran-modal-footer::slotted(.ran-modal-actions){justify-content:flex-end;align-items:center;gap:10px;display:inline-flex}.ran-modal-footer::slotted(.ran-modal-action){border:1px solid var(--ran-color-border,#d0d5dd);background:var(--ran-color-bg-elevated,#fff);border-radius:var(--ran-radius-sm,6px);cursor:pointer;height:34px;color:var(--ran-color-text-secondary,#344054);padding:0 14px;font-size:14px;line-height:32px}.ran-modal-footer::slotted(.ran-modal-action-confirm){border-color:var(--ran-color-primary,#155eef);background:var(--ran-color-primary,#155eef);color:#fff}.ran-modal-footer::slotted(.ran-modal-action:disabled){opacity:.6;cursor:not-allowed}`,n=typeof document>`u`,r=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}},i=0,a=1,o=2,s=null,c=null,l=0,u=new Set,d=!1;function f(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(v(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)y(e,o);l===0&&ee()}}]}function p(e){let t=g(e,!0);return _(t),x(t),()=>C(t)}function m(e){let t={owned:[],cleanups:[],owner:c},n=c,r=s;c=t,s=null;try{return e(()=>te(t))}finally{c=n,s=r}}function h(e){c&&c.cleanups.push(e)}function g(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function _(e){c&&c.owned.push(e)}function v(e){s&&(s.sources.add(e),e.observers.add(s))}function y(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)u.add(e);else if(n)for(let t of e.observers)y(t,a)}function ee(){if(!(l>0||d)){d=!0;try{for(;u.size>0;){let e=[...u];u.clear();for(let t of e)t.disposed||b(t)}}finally{d=!1}}}function b(e){if(!(e.disposed||e.state===i)){if(e.state===a)for(let t of e.sources)`fn`in t&&b(t);e.state===o&&x(e),e.state=i}}function x(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);S(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;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)y(t,o)}}finally{e.running=!1,s=t,c=n}}function S(e){for(let t of e.owned)C(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 C(e){e.disposed||(e.disposed=!0,S(e),e.observers.clear())}function te(e){for(let t of e.owned)C(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function w(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function T(e){return w(e)}var ne=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,re=(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)ne(r)&&(re(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`?w(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 ie(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}="${T(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${T(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`?w(e):(e instanceof D,e.serialize())).join(``):a+=w(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}>`}},ie=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>${w(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?w(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 I?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,j=(e,t)=>{if(n){k([t()]).forEach(t=>{let n=A(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];p(()=>{let e=k([t()]);for(let e of i)e.parentNode?.removeChild(e);let n=[],a=r;for(let t of e){let e=A(t);e!=null&&(a.after(e),a=e,n.push(e))}i=n})},ae=`__ranFor`,oe=e=>typeof e==`object`&&!!e&&e[ae]===!0,se=(e,t,n)=>{let[r,i]=f(t),a=null,o=m(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},N=(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;h(()=>{for(let e of i.values())e.dispose();i.clear()}),p(()=>{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=se(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})},P=`__ranIndex`,ce=e=>typeof e==`object`&&!!e&&e[P]===!0,le=(e,t,n)=>{let[r,i]=f(e),a=null,o=m(e=>{let i=A(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ue=(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=[];h(()=>{for(let e of i)e.dispose();i=[]}),p(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(le(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))})},F=(e,t)=>{k(t).forEach(t=>{if(oe(t)){N(e,t);return}if(ce(t)){ue(e,t);return}if(typeof t==`function`){j(e,t);return}let n=A(t);n!=null&&e.appendChild(n)})},I=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`?p(()=>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 F(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 de(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}},de=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return F(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}},L=e=>new I(e),R=()=>L(`div`),z=()=>L(`slot`),B=()=>L(`button`),V=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}},H=(e=8)=>Math.random().toString(36).substring(2,e+2),U=e=>typeof e==`function`,fe=12e4,pe=`__ranuts_bridge__`,me=`default`,W=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)}},he=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=me){this.targetOrigin=t,this.channel=n,this.senderId=H(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,W.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:pe,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(U(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=H(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},fe),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=()=>{W.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 he(n,t,r);if(e||=H(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 V;var G=[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],K=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new K(G[0],3609767458),new K(G[1],602891725),new K(G[2],3964484399),new K(G[3],2173295548),new K(G[4],4081628472),new K(G[5],3053834265),new K(G[6],2937671579),new K(G[7],3664609560),new K(G[8],2734883394),new K(G[9],1164996542),new K(G[10],1323610764),new K(G[11],3590304994),new K(G[12],4068182383),new K(G[13],991336113),new K(G[14],633803317),new K(G[15],3479774868),new K(G[16],2666613458),new K(G[17],944711139),new K(G[18],2341262773),new K(G[19],2007800933),new K(G[20],1495990901),new K(G[21],1856431235),new K(G[22],3175218132),new K(G[23],2198950837),new K(G[24],3999719339),new K(G[25],766784016),new K(G[26],2566594879),new K(G[27],3203337956),new K(G[28],1034457026),new K(G[29],2466948901),new K(G[30],3758326383),new K(G[31],168717936),new K(G[32],1188179964),new K(G[33],1546045734),new K(G[34],1522805485),new K(G[35],2643833823),new K(G[36],2343527390),new K(G[37],1014477480),new K(G[38],1206759142),new K(G[39],344077627),new K(G[40],1290863460),new K(G[41],3158454273),new K(G[42],3505952657),new K(G[43],106217008),new K(G[44],3606008344),new K(G[45],1432725776),new K(G[46],1467031594),new K(G[47],851169720),new K(G[48],3100823752),new K(G[49],1363258195),new K(G[50],3750685593),new K(G[51],3785050280),new K(G[52],3318307427),new K(G[53],3812723403),new K(G[54],2003034995),new K(G[55],3602036899),new K(G[56],1575990012),new K(G[57],1125592928),new K(G[58],2716904306),new K(G[59],442776044),new K(G[60],593698344),new K(G[61],3733110249),new K(G[62],2999351573),new K(G[63],3815920427),new K(3391569614,3928383900),new K(3515267271,566280711),new K(3940187606,3454069534),new K(4118630271,4000239992),new K(116418474,1914138554),new K(174292421,2731055270),new K(289380356,3203993006),new K(460393269,320620315),new K(685471733,587496836),new K(852142971,1086792851),new K(1017036298,365543100),new K(1126000580,2618297676),new K(1288033470,3409855158),new K(1501505948,4234509866),new K(1607167915,987167468),new K(1816402316,1246189591),new K(0,1),new K(0,32898),new K(2147483648,32906),new K(2147483648,2147516416),new K(0,32907),new K(0,2147483649),new K(2147483648,2147516545),new K(2147483648,32777),new K(0,138),new K(0,136),new K(0,2147516425),new K(0,2147483658),new K(0,2147516555),new K(2147483648,139),new K(2147483648,32905),new K(2147483648,32771),new K(2147483648,32770),new K(2147483648,128),new K(0,32778),new K(2147483648,2147483658),new K(2147483648,2147516545),new K(2147483648,32896),new K(0,2147483649),new K(2147483648,2147516424);var q=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})(q),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(q);var ge=[!1,`false`,null,void 0],_e=new Map;function ve(e,t){n?(_e.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var ye=typeof document<`u`?HTMLElement:O,J=new Map,Y=new Map,be=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!J.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),J.set(t,e)}let n=J.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)}}},xe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!Y.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),Y.set(t,e)}let n=Y.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)}}},X=new WeakMap,Z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Se=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),be(r,t?`${t}\n${Z}`:Z),r},Ce=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},we=(e,t,n=``)=>e.getAttribute(t)??n,Te=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Ee=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&xe(t,a)},Q=`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,$=class e extends ye{static _openStack=[];static _bodyScrollLockCount=0;static _bodyOverflow=``;static _bodyPaddingRight=``;static _inertSnapshot=new Map;_events=new r;_shadowDom;_root;_mask;_dialog;_title;_closeBtn;_slot;_footer;_footerSlot;_labelId;_previousActiveElement;_isDialogOpen;_scrollLocked;_afterOpenTimer;_afterCloseTimer;static get observedAttributes(){return[`open`,`title`,`maskClosable`,`closeOnEsc`,`lockScroll`,`autoFocus`,`closable`,`hide-header`,`sheet`]}constructor(){super(),this._labelId=`ran-modal-title-${Math.random().toString(36).slice(2,9)}`,this._previousActiveElement=null,this._isDialogOpen=!1,this._scrollLocked=!1,this._afterOpenTimer=null,this._afterCloseTimer=null,this._shadowDom=Se(this,t);let e=Ce(this._shadowDom,`.ran-modal-root`,()=>R().class(`ran-modal-root`).part(`root`).children(R().class(`ran-modal-mask`).part(`mask`),R().class(`ran-modal-dialog`).part(`dialog`).role(`dialog`).attr(`aria-modal`,`true`).tabIndex(-1).labelledBy(this._labelId).children(L(`header`).class(`ran-modal-header`).part(`header`).children(L(`h3`).class(`ran-modal-title`).part(`title`).id(this._labelId),L(`button`).class(`ran-modal-close`).part(`close`).attr(`type`,`button`).label(`Close dialog`).text(`x`)),R().class(`ran-modal-body`).part(`body`).children(z()),L(`footer`).class(`ran-modal-footer`).part(`footer`).children(z().attr(`name`,`footer`)))).build());this._root=e,this._mask=this._root.querySelector(`.ran-modal-mask`),this._dialog=this._root.querySelector(`.ran-modal-dialog`),this._title=this._root.querySelector(`.ran-modal-title`),this._closeBtn=this._root.querySelector(`.ran-modal-close`),this._slot=this._root.querySelector(`slot`),this._footer=this._root.querySelector(`.ran-modal-footer`),this._footerSlot=this._root.querySelector(`slot[name="footer"]`),this.syncTitle(),this.syncClosable(),this.syncFooter(),this.syncHeader()}get open(){return this.hasAttribute(`open`)&&!ge.includes(this.getAttribute(`open`))}set open(e){!e||e===`false`?this.removeAttribute(`open`):this.setAttribute(`open`,``)}get title(){return this.getAttribute(`title`)||``}set title(e){this.setAttribute(`title`,e||``)}get maskClosable(){let e=this.getAttribute(`maskClosable`);return!(e===`false`||e===`0`)}set maskClosable(e){!e||e===`false`||e===`0`?this.setAttribute(`maskClosable`,`false`):this.setAttribute(`maskClosable`,`true`)}get sheet(){return we(this,`sheet`)}set sheet(e){Te(this,`sheet`,e)}get closeOnEsc(){let e=this.getAttribute(`closeOnEsc`);return!(e===`false`||e===`0`)}set closeOnEsc(e){!e||e===`false`||e===`0`?this.setAttribute(`closeOnEsc`,`false`):this.setAttribute(`closeOnEsc`,`true`)}get lockScroll(){let e=this.getAttribute(`lockScroll`);return!(e===`false`||e===`0`)}set lockScroll(e){!e||e===`false`||e===`0`?this.setAttribute(`lockScroll`,`false`):this.setAttribute(`lockScroll`,`true`)}get autoFocus(){let e=this.getAttribute(`autoFocus`);return!(e===`false`||e===`0`)}set autoFocus(e){!e||e===`false`||e===`0`?this.setAttribute(`autoFocus`,`false`):this.setAttribute(`autoFocus`,`true`)}get closable(){let e=this.getAttribute(`closable`);return!(e===`false`||e===`0`)}set closable(e){!e||e===`false`||e===`0`?this.setAttribute(`closable`,`false`):this.setAttribute(`closable`,`true`)}get hideHeader(){let e=this.getAttribute(`hide-header`);return e!==null&&e!==`false`&&e!==`0`}set hideHeader(e){!e||e===`false`||e===`0`?this.removeAttribute(`hide-header`):this.setAttribute(`hide-header`,``)}handlerExternalCss=()=>{Ee(this,this._shadowDom,`sheet`,null,this.sheet)};syncTitle=()=>{this._title.textContent=this.title||`Modal`,this.hideHeader&&this._dialog.setAttribute(`aria-label`,this.title||`Modal`)};syncClosable=()=>{let e=this.closable;this._closeBtn.hidden=!e,this._closeBtn.setAttribute(`aria-hidden`,e?`false`:`true`),this._closeBtn.tabIndex=e?0:-1};syncHeader=()=>{let e=this.hideHeader;this._root.classList.toggle(`hide-header`,e),e?(this._dialog.setAttribute(`aria-label`,this.title||`Modal`),this._dialog.removeAttribute(`aria-labelledby`)):(this._dialog.setAttribute(`aria-labelledby`,this._labelId),this._dialog.removeAttribute(`aria-label`))};syncFooter=()=>{let e=(this._footerSlot?.assignedNodes({flatten:!0})||[]).some(e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(e.textContent||``).trim().length>0);this._root.classList.toggle(`has-footer`,e)};getFocusableElements=()=>{let e=Array.from(this._dialog.querySelectorAll(Q)),t=Array.from(this.querySelectorAll(Q));return[...e,...t].filter(e=>{if(e.hasAttribute(`disabled`))return!1;let t=e;return t.offsetParent!==null||t.getClientRects().length>0})};static getTopModal=()=>e._openStack.length===0?null:e._openStack[e._openStack.length-1]||null;static pushOpenModal=t=>{e._openStack.includes(t)||e._openStack.push(t)};static removeOpenModal=t=>{e._openStack=e._openStack.filter(e=>e!==t)};static syncBackgroundInert=()=>{if(typeof document>`u`)return;let t=document.body;if(!t)return;for(let[t,n]of e._inertSnapshot.entries())t.inert=n.inert,n.ariaHidden===null?t.removeAttribute(`aria-hidden`):t.setAttribute(`aria-hidden`,n.ariaHidden);if(e._inertSnapshot.clear(),e._openStack.length===0)return;let n=e._openStack.map(e=>e);Array.from(t.children).forEach(t=>{n.some(e=>t===e||t.contains(e))||(e._inertSnapshot.set(t,{inert:t.inert,ariaHidden:t.getAttribute(`aria-hidden`)}),t.inert=!0,t.setAttribute(`aria-hidden`,`true`))})};static lockBodyScroll=()=>{if(typeof document>`u`)return;let t=document.body;if(t){if(e._bodyScrollLockCount===0){e._bodyOverflow=t.style.overflow,e._bodyPaddingRight=t.style.paddingRight;let n=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(n>0){let e=Number.parseFloat(window.getComputedStyle(t).paddingRight)||0;t.style.paddingRight=`${e+n}px`}t.style.overflow=`hidden`}e._bodyScrollLockCount+=1}};static unlockBodyScroll=()=>{if(typeof document>`u`)return;let t=document.body;!t||e._bodyScrollLockCount===0||(--e._bodyScrollLockCount,e._bodyScrollLockCount===0&&(t.style.overflow=e._bodyOverflow,t.style.paddingRight=e._bodyPaddingRight))};clearAfterTimers=()=>{this._afterOpenTimer!==null&&(window.clearTimeout(this._afterOpenTimer),this._afterOpenTimer=null),this._afterCloseTimer!==null&&(window.clearTimeout(this._afterCloseTimer),this._afterCloseTimer=null)};getTransitionTimeout=()=>{let e=window.getComputedStyle(this._dialog),t=e=>{let t=e.split(`,`)[0]?.trim()||`0s`;return t.endsWith(`ms`)?Number.parseFloat(t):t.endsWith(`s`)?Number.parseFloat(t)*1e3:Number.parseFloat(t)||0},n=t(e.transitionDelay),r=t(e.transitionDuration);return Math.max(0,n+r)};emitAfterOpen=()=>{let e=this.getTransitionTimeout();this._afterOpenTimer=window.setTimeout(()=>{this._afterOpenTimer=null,this.dispatchEvent(new CustomEvent(`afteropen`))},e)};emitAfterClose=e=>{let t=this.getTransitionTimeout();this._afterCloseTimer=window.setTimeout(()=>{this._afterCloseTimer=null,this.dispatchEvent(new CustomEvent(`afterclose`,{detail:{trigger:e}}))},t)};trapFocus=e=>{if(e.key!==`Tab`)return;let t=this.getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus();return}let n=t[0],r=t[t.length-1],i=this._shadowDom.activeElement||document.activeElement;if(e.shiftKey&&i===n){e.preventDefault(),r.focus();return}!e.shiftKey&&i===r&&(e.preventDefault(),n.focus())};close=(e=`program`)=>{if(!this.open)return;let t=new CustomEvent(`beforeclose`,{cancelable:!0,detail:{trigger:e}});this.dispatchEvent(t)&&(this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`close`,{detail:{trigger:e}})),this.emitAfterClose(e))};openDialog=()=>{if(this._isDialogOpen||this._root.hasAttribute(`open`))return;let t=new CustomEvent(`beforeopen`,{cancelable:!0});if(!this.dispatchEvent(t)){this.removeAttribute(`open`);return}this._previousActiveElement=document.activeElement,e.pushOpenModal(this),e.syncBackgroundInert(),this.lockScroll&&(e.lockBodyScroll(),this._scrollLocked=!0),this._isDialogOpen=!0,this._root.setAttribute(`open`,``),this._dialog.setAttribute(`aria-hidden`,`false`),this.dispatchEvent(new CustomEvent(`open`)),this.clearAfterTimers(),this.emitAfterOpen(),requestAnimationFrame(()=>{this.autoFocus&&(this.getFocusableElements()[0]||this._dialog).focus()})};closeDialog=()=>{if(!this._isDialogOpen){this._root.removeAttribute(`open`),this._dialog.setAttribute(`aria-hidden`,`true`);return}this._isDialogOpen=!1,e.removeOpenModal(this),e.syncBackgroundInert(),this._scrollLocked&&=(e.unlockBodyScroll(),!1),this._root.removeAttribute(`open`),this._dialog.setAttribute(`aria-hidden`,`true`),this._previousActiveElement instanceof HTMLElement&&this._previousActiveElement.focus()};onMaskClick=e=>{this.maskClosable&&(e.composedPath().includes(this._dialog)||this.close(`mask`))};onCloseButtonClick=()=>{this.close(`button`)};onKeydown=t=>{if(this.open&&e.getTopModal()===this){if(t.key===`Escape`&&this.closeOnEsc){t.preventDefault(),this.close(`escape`);return}this.trapFocus(t)}};onDocumentFocusIn=t=>{if(!this.open||e.getTopModal()!==this)return;let n=t.composedPath();n.includes(this)||n.includes(this._dialog)||(this.getFocusableElements()[0]||this._dialog).focus()};connectedCallback(){this.handlerExternalCss(),this._events.on(this._mask,`click`,this.onMaskClick).on(this._closeBtn,`click`,this.onCloseButtonClick).on(document,`keydown`,this.onKeydown).on(document,`focusin`,this.onDocumentFocusIn).on(this._footerSlot,`slotchange`,this.syncFooter),this.syncTitle(),this.syncClosable(),this.syncFooter(),this.syncHeader(),this.open?this.openDialog():this.closeDialog()}disconnectedCallback(){this._root.hasAttribute(`open`)&&this.closeDialog(),this._events.abort(),this.clearAfterTimers()}attributeChangedCallback(e,t,n){if(t!==n){if(e===`title`){this.syncTitle();return}if(e===`closable`){this.syncClosable();return}if(e===`hide-header`){this.syncHeader();return}if(e===`open`){this.open?this.openDialog():this.closeDialog();return}e===`sheet`&&this.handlerExternalCss()}}static normalizeProgrammaticOptions=e=>typeof e==`string`?{content:e}:e||{};static open=t=>{if(typeof document>`u`)return Promise.resolve({action:`dismiss`,trigger:`program`});let{title:n=`Confirm`,content:r=``,okText:i=`OK`,cancelText:a=`Cancel`,showCancel:o=!1,maskClosable:s=!1,closeOnEsc:c=!0,lockScroll:l=!0,autoFocus:u=!0,closable:d=!0,onConfirm:f,onCancel:p}=e.normalizeProgrammaticOptions(t);return new Promise(e=>{let t=L(`r-modal`).build();t.title=n,t.maskClosable=s,t.closeOnEsc=c,t.lockScroll=l,t.autoFocus=u,t.closable=d;let m=R().build();typeof r==`string`?m.textContent=r:r instanceof Node&&m.appendChild(r),t.appendChild(m);let h=`dismiss`,g=R().attr(`slot`,`footer`).class(`ran-modal-actions`);if(o){let e=B().attr(`type`,`button`).class(`ran-modal-action ran-modal-action-cancel`).text(a).build();e.addEventListener(`click`,async()=>{await p?.()!==!1&&(h=`cancel`,t.close(`program`))}),g.children(e)}let _=B().attr(`type`,`button`).class(`ran-modal-action ran-modal-action-confirm`).text(i).build();_.addEventListener(`click`,async()=>{_.disabled=!0;try{if(await f?.()===!1)return;h=`confirm`,t.close(`program`)}finally{_.disabled=!1}}),g.children(_),t.appendChild(g.build());let v=n=>{let r=n.detail?.trigger||`program`;t.removeEventListener(`afterclose`,v),t.parentElement&&t.parentElement.removeChild(t),e({action:h,trigger:r})};t.addEventListener(`afterclose`,v),document.body.appendChild(t),t.open=!0})};static confirm=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!0})};static info=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Info`})};static success=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Success`})};static warning=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Warning`})};static error=t=>{let n=e.normalizeProgrammaticOptions(t);return e.open({...n,showCancel:!1,title:n.title||`Error`})}};return ve(`r-modal`,$),e.Modal=$,e.default=$,e})({});