@abtnode/webapp 1.17.8-beta-20260116-080047-9fdd00d3 → 1.17.8-beta-20260119-102944-6ba93a16

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 (208) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CHVRCEwB.js → AdapterDayjs-QPUTgQRV.js} +6 -6
  4. package/dist/assets/{Add-IxR__ozX.js → Add-vvp5juzF.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CZ9_k8VG.js +1 -0
  6. package/dist/assets/{Autocomplete-OhxbbTq9.js → Autocomplete-BqPV4fCq.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-CfkRwQNu.js → Breadcrumbs-DEV3jkdC.js} +1 -1
  8. package/dist/assets/{ButtonGroup--8rwLvQ8.js → ButtonGroup-BDg4XqiR.js} +1 -1
  9. package/dist/assets/{CSSTransition-D4fabzL2.js → CSSTransition-CoGzojVI.js} +1 -1
  10. package/dist/assets/{CallMerge-Di3dNXj5.js → CallMerge-C5DyJ6fm.js} +1 -1
  11. package/dist/assets/{CardContent-CPUlyd-R.js → CardContent-rjL6kB_r.js} +1 -1
  12. package/dist/assets/{ChevronLeft-lzYf4tao.js → ChevronLeft-DqSG9UHo.js} +1 -1
  13. package/dist/assets/{ChevronRight-CO-Fv8kP.js → ChevronRight-DxsEcvUg.js} +1 -1
  14. package/dist/assets/{Clear-DriUx9_Q.js → Clear-Bq2o3otF.js} +1 -1
  15. package/dist/assets/{Delete-DkHujAB7.js → Delete-RCnwfW1g.js} +1 -1
  16. package/dist/assets/{DeleteOutline-DUcJA7eO.js → DeleteOutline-BXoQnWFj.js} +1 -1
  17. package/dist/assets/{Done-B_L7rkHk.js → Done-DVQ_2sA2.js} +1 -1
  18. package/dist/assets/{Edit-DgzPfnB_.js → Edit-DVXYin_T.js} +1 -1
  19. package/dist/assets/{EditOutlined-yXcT-6A0.js → EditOutlined-CHgCULNs.js} +1 -1
  20. package/dist/assets/{ErrorOutline-B7jRfGmR.js → ErrorOutline-qdJUw5q6.js} +1 -1
  21. package/dist/assets/{FilterList-DMbHmf0X.js → FilterList-Dfj9GsZN.js} +1 -1
  22. package/dist/assets/{Google-DMfPhzx4.js → Google-BtG0IwAt.js} +1 -1
  23. package/dist/assets/{HelpOutline-Be59cdK1.js → HelpOutline-DaGemEcX.js} +1 -1
  24. package/dist/assets/{Launch-B8FfXmf_.js → Launch-BsxqWG7C.js} +1 -1
  25. package/dist/assets/{Link-wdDqdiCm.js → Link-BRsXeoEC.js} +1 -1
  26. package/dist/assets/{ListItemButton-BHNRxd8I.js → ListItemButton-kpGgMj08.js} +1 -1
  27. package/dist/assets/{ListSubheader-UFJcQfY_.js → ListSubheader-BTZwmxdp.js} +1 -1
  28. package/dist/assets/{LoadingButton-CUdpFc0p.js → LoadingButton-DZ6V6Qhe.js} +1 -1
  29. package/dist/assets/{LottiePlayer.modern-Jxnonfmi.js → LottiePlayer.modern-H3Pn2YNu.js} +1 -1
  30. package/dist/assets/{MoreVert-BVgcfW7V.js → MoreVert-DxM-B8xa.js} +1 -1
  31. package/dist/assets/{OpenInNew-CEBJXmxa.js → OpenInNew-BUUx7OSU.js} +1 -1
  32. package/dist/assets/{Refresh-DrflkqFW.js → Refresh-BV0ShuHj.js} +1 -1
  33. package/dist/assets/{Replay-qvum4SpI.js → Replay-DyvF6A5F.js} +1 -1
  34. package/dist/assets/{Search-CtujvL0H.js → Search-m3CMNGDm.js} +1 -1
  35. package/dist/assets/{Stepper-CJfsKFpi.js → Stepper-DR0cCC-q.js} +1 -1
  36. package/dist/assets/{TableSearch-CdKaHbVQ.js → TableSearch-okRl0dqT.js} +1 -1
  37. package/dist/assets/{ToggleButtonGroup-BP4C4KFu.js → ToggleButtonGroup-DxIvj50j.js} +1 -1
  38. package/dist/assets/{UnfoldMore-BvZuyACH.js → UnfoldMore-CZT-4-ZR.js} +1 -1
  39. package/dist/assets/Verified-C1aYOY3u.js +1 -0
  40. package/dist/assets/{VerifiedUser-D0ltmMtV.js → VerifiedUser-CS3FW2sd.js} +1 -1
  41. package/dist/assets/{ViewList--urcCqVt.js → ViewList-CXrUBR0t.js} +1 -1
  42. package/dist/assets/{_createAggregator-G6HCftPW.js → _createAggregator-BunO9xPF.js} +1 -1
  43. package/dist/assets/{actions-5RspfWE_.js → actions-CoszoXjw.js} +1 -1
  44. package/dist/assets/{actions-DjLoksgL.js → actions-DE2r6nPV.js} +1 -1
  45. package/dist/assets/{actions-CQAb6_Rz.js → actions-MiEliG9R.js} +1 -1
  46. package/dist/assets/{agreement-b4V3Z14P.js → agreement-CiVQRYD2.js} +1 -1
  47. package/dist/assets/api-CKaiYijO.js +1 -0
  48. package/dist/assets/{appearance-AiyB_V1W.js → appearance-DtyCmGdO.js} +1 -1
  49. package/dist/assets/{ar-BHqjWgUQ.js → ar-DOhYGTlW.js} +1 -1
  50. package/dist/assets/{audit-logs-C4Hps2ag.js → audit-logs-DQ3aFS2x.js} +2 -2
  51. package/dist/assets/{babel-sNEik07f.js → babel-yl1c6pTl.js} +1 -1
  52. package/dist/assets/{base-chart-BE2BHY3Y.js → base-chart-G_tNYsY8.js} +1 -1
  53. package/dist/assets/{blocklet-lDvdqhrX.js → blocklet-CzBGFesP.js} +1 -1
  54. package/dist/assets/{chain-BQMbjNUU.js → chain-z8CuvP-V.js} +1 -1
  55. package/dist/assets/{click-to-copy-C6h97nXy.js → click-to-copy-DXIfZNln.js} +1 -1
  56. package/dist/assets/cloneDeep-BDiWjxRu.js +1 -0
  57. package/dist/assets/config-navigation-BYqsSWyl.js +472 -0
  58. package/dist/assets/{connect-B1msLBDb.js → connect-64-QZQcE.js} +3 -3
  59. package/dist/assets/{connect-to-DeMt1m5c.js → connect-to-CeGdVeiX.js} +3 -3
  60. package/dist/assets/{de-QUGQFv2K.js → de-CtKPdGk6.js} +1 -1
  61. package/dist/assets/{delete-confirm-DyLbGAy5.js → delete-confirm-Dh3X0iXU.js} +1 -1
  62. package/dist/assets/{depsEqual-CM0PEscV.js → depsEqual-Bfsv3kHf.js} +1 -1
  63. package/dist/assets/{detail-C3fs8uRl.js → detail-C4nQbO7d.js} +2 -2
  64. package/dist/assets/{domains-CVE_fz_I.js → domains-7n5twKTf.js} +2 -2
  65. package/dist/assets/{download-f9_CnIWg.js → download-CFyTq_FK.js} +1 -1
  66. package/dist/assets/{edit.svg-Bdq-FCGM.js → edit.svg-DBlxe-2U.js} +1 -1
  67. package/dist/assets/emotion-cache.browser.esm-Cu824RS4.js +1 -0
  68. package/dist/assets/engine-Bbh7Mw-7.js +1 -0
  69. package/dist/assets/{es-C4w6cL07.js → es-BSYtSZPg.js} +1 -1
  70. package/dist/assets/{fr-Bq3UipEu.js → fr-C35fi7h9.js} +1 -1
  71. package/dist/assets/{get-safe-url-RPQVYlWr.js → get-safe-url-BTJDduf6.js} +1 -1
  72. package/dist/assets/getValidReactChildren-T3CvLHYr.js +1 -0
  73. package/dist/assets/{graphql-5mE8kB37.js → graphql-Cnx2YXBE.js} +1 -1
  74. package/dist/assets/{graphqlMode-BHMSwqwV.js → graphqlMode-7KCJGlgj.js} +2 -2
  75. package/dist/assets/{hi-DGZy0DLh.js → hi-5fpYJkiW.js} +1 -1
  76. package/dist/assets/{html-title-DE0TrRVC.js → html-title-CQe12Cut.js} +1 -1
  77. package/dist/assets/{id-DOzDilAf.js → id-DoVb0JYr.js} +1 -1
  78. package/dist/assets/{iframe-B7aYePTd.js → iframe-BWle7w_S.js} +1 -1
  79. package/dist/assets/{index-r58wskKh.js → index-AaVex2Te.js} +1 -1
  80. package/dist/assets/{index-B4azxfc8.js → index-B8JpxHJE.js} +1 -1
  81. package/dist/assets/{index-hG-7kift.js → index-BCrgfevn.js} +2 -2
  82. package/dist/assets/index-BHLEff7q.js +369 -0
  83. package/dist/assets/{index-DbRhfp5G.js → index-BMGgZI9D.js} +1 -1
  84. package/dist/assets/{index-CaLjm3Sr.js → index-BXpvvqAs.js} +1 -1
  85. package/dist/assets/{index-D7yowN9E.js → index-BcZYQGNY.js} +8 -8
  86. package/dist/assets/{index-CEn1Olzp.js → index-Bg6faJyI.js} +1 -1
  87. package/dist/assets/{index-B2xyyyAv.js → index-Bv6Ryg7V.js} +1 -1
  88. package/dist/assets/index-BzFgWQ5w.js +1 -0
  89. package/dist/assets/{index-DaEqVg3j.js → index-C73PGWD5.js} +1 -1
  90. package/dist/assets/{index-B29Pha71.js → index-C97bSDg2.js} +3 -3
  91. package/dist/assets/index-CBCPHvf_.js +102 -0
  92. package/dist/assets/{index-B1mmOd5b.js → index-CJ_aJ5dR.js} +1 -1
  93. package/dist/assets/{index-DmCKwIHx.js → index-CQob6fmR.js} +4 -4
  94. package/dist/assets/{index-BqqU8gwj.js → index-CTjBZAn9.js} +1 -1
  95. package/dist/assets/{index-2l_1Jppv.js → index-CUGajpSS.js} +3 -3
  96. package/dist/assets/{index-CWB_ryH-.js → index-CXEKSKL7.js} +1 -1
  97. package/dist/assets/{index-BgYMQ-SO.js → index-ChmYDkPv.js} +2 -2
  98. package/dist/assets/{index-QndNtIi-.js → index-CoHxWTi-.js} +1 -1
  99. package/dist/assets/{index-9co-KaYp.js → index-D42m9V9f.js} +9 -9
  100. package/dist/assets/{index-EzJJEvjR.js → index-D4yrNQ5O.js} +3 -3
  101. package/dist/assets/{index-CPZ5M8hw.js → index-DBtWMsht.js} +1 -1
  102. package/dist/assets/{index-DaVz8byr.js → index-DHLFobHl.js} +3 -3
  103. package/dist/assets/{index-nVFW1KOC.js → index-DJt6Q1WW.js} +1 -1
  104. package/dist/assets/{index-BtOLGXbe.js → index-DSG25x4F.js} +1 -1
  105. package/dist/assets/{index-BfetuCUm.js → index-DTVaw2Hc.js} +4 -4
  106. package/dist/assets/{index-BfQLSa8k.js → index-DUEj1V-j.js} +1 -1
  107. package/dist/assets/{index-Cmj8zxd_.js → index-DVR29wYi.js} +14 -14
  108. package/dist/assets/index-Denq1UAZ.js +20 -0
  109. package/dist/assets/{index-BcjR7La5.js → index-DfCxzzye.js} +1 -1
  110. package/dist/assets/{index-Beek8Qoq.js → index-DftYcsPB.js} +6 -6
  111. package/dist/assets/{index-B0oOTjeC.js → index-DqCVCPmC.js} +1 -1
  112. package/dist/assets/{index-BIgX2N1A.js → index-DrI_kbUr.js} +6 -6
  113. package/dist/assets/{index-ByymZrPq.js → index-DtIwM7gL.js} +2 -2
  114. package/dist/assets/{index-BBu-RTSN.js → index-DyNVa2Lx.js} +1 -1
  115. package/dist/assets/{index-DYd4YT_K.js → index-G-jrPGsm.js} +1 -1
  116. package/dist/assets/{index-BX6YpiBs.js → index-Ii4Xi_du.js} +2 -2
  117. package/dist/assets/{index-BZ5rC2Lk.js → index-P2FBSyZf.js} +1 -1
  118. package/dist/assets/{index-Ca61GFb8.js → index-dCiAdDNg.js} +1 -1
  119. package/dist/assets/{index-Bm8Rp86x.js → index-kSplQjj2.js} +1 -1
  120. package/dist/assets/{index-82LLl9rh.js → index-nmsk2vjw.js} +2 -2
  121. package/dist/assets/{index-CVpBdzTr.js → index-nsujgMc_.js} +1 -1
  122. package/dist/assets/{index-D3SOJZGy.js → index-u76kHZTc.js} +3 -3
  123. package/dist/assets/{index-gwhKA5OT.js → index-xtzr7R_I.js} +1 -1
  124. package/dist/assets/{index.esm-C5mhDUsD.js → index.esm-iaB2Jgy_.js} +1 -1
  125. package/dist/assets/{install-from-url-DPdbO0Jq.js → install-from-url-CzhDO2C0.js} +1 -1
  126. package/dist/assets/{invitation-3RtS1iUK.js → invitation-C3HrxXln.js} +2 -2
  127. package/dist/assets/is-path-prefix-equal-dPdZJpAg.js +1 -0
  128. package/dist/assets/{isEmail-apFH2MvD.js → isEmail-CmCW4Fgq.js} +1 -1
  129. package/dist/assets/item-C6yFM2Os.js +163 -0
  130. package/dist/assets/{ja-DMq-YXDX.js → ja-DZPUwZ9l.js} +1 -1
  131. package/dist/assets/{jsonMode-RjxYywbi.js → jsonMode-BRueWwe6.js} +1 -1
  132. package/dist/assets/{ko-BrYbXurh.js → ko-q4i4r9g6.js} +1 -1
  133. package/dist/assets/{list-header-BNS6BF2P.js → list-header-s21LDuvb.js} +1 -1
  134. package/dist/assets/{lite-C-Ikw2GQ.js → lite-BBz66z5Z.js} +2 -2
  135. package/dist/assets/{lock.svg-BFdqOrkF.js → lock.svg-DK1hXFWn.js} +1 -1
  136. package/dist/assets/{log-DZlkZyGX.js → log-DRaCmTGd.js} +1 -1
  137. package/dist/assets/{login-method-item-ZVrK6tB1.js → login-method-item-DwSmGt8t.js} +1 -1
  138. package/dist/assets/{lottie-react.esm-A7yQ3Nfv.js → lottie-react.esm-DqwAKW0L.js} +1 -1
  139. package/dist/assets/{memory-CoCFCBkX.js → memory-VAHG3fjG.js} +1 -1
  140. package/dist/assets/{metric-B3S53u3H.js → metric-B6TET6QI.js} +1 -1
  141. package/dist/assets/{monaco-editor-CQ6Pm7Hi.js → monaco-editor-BH4xSgKB.js} +3 -3
  142. package/dist/assets/{mouseTarget-DxlEpFaz.js → mouseTarget-txK7mk_L.js} +1 -1
  143. package/dist/assets/omit-B-qG4p98.js +1 -0
  144. package/dist/assets/{overview-z9AW_vcO.js → overview-D3hqR9Yg.js} +1 -1
  145. package/dist/assets/{permission-C_g43OOf.js → permission-DET008IY.js} +1 -1
  146. package/dist/assets/{preference-1qTmAvHN.js → preference-pxwdMSFg.js} +8 -8
  147. package/dist/assets/{provider-icon-CoJ5ERXe.js → provider-icon-CCZmjsDZ.js} +1 -1
  148. package/dist/assets/{pt-Dl6732JN.js → pt-BFCHl6F1.js} +1 -1
  149. package/dist/assets/{raf-schd.esm-CU1FaTjd.js → raf-schd.esm-BuSKwIfR.js} +1 -1
  150. package/dist/assets/{rotate-session-key-CQOBWeRr.js → rotate-session-key-DE58Q8ag.js} +1 -1
  151. package/dist/assets/{ru-CVUeN9AX.js → ru-CSTl62kK.js} +1 -1
  152. package/dist/assets/runtime-b4EXN3II.js +1 -0
  153. package/dist/assets/schema-DE6tzaXQ.js +1 -0
  154. package/dist/assets/sdk-CxXstbZm.js +1 -0
  155. package/dist/assets/{service-iJdsq1ul.js → service-BpzqSJv4.js} +1 -1
  156. package/dist/assets/{shorten-label-CCnq_MUQ.js → shorten-label-PYNmzpP_.js} +1 -1
  157. package/dist/assets/{simple-select-0S1qRvRS.js → simple-select-BiJQdJOQ.js} +1 -1
  158. package/dist/assets/{spaces-BbUa6G9F.js → spaces-MVFShLV4.js} +1 -1
  159. package/dist/assets/{status-g0Lvwqad.js → status-LmBdrnlB.js} +1 -1
  160. package/dist/assets/{status-B4gHBixJ.js → status-UZAIOWNB.js} +1 -1
  161. package/dist/assets/{switch-control-CwXplLu0.js → switch-control-CE57fLeM.js} +1 -1
  162. package/dist/assets/{table-icons-BwS2Y2wV.js → table-icons-BG66cxZv.js} +1 -1
  163. package/dist/assets/{team-DETQHkho.js → team-DgQYntrc.js} +1 -1
  164. package/dist/assets/{th-32eBNQes.js → th-D75Dlluo.js} +1 -1
  165. package/dist/assets/{toLower-oQZ3J7Wi.js → toLower-DBVF4v1M.js} +1 -1
  166. package/dist/assets/toUpper-RYfZ9dsZ.js +1 -0
  167. package/dist/assets/{traffic-Cqk5X-Ty.js → traffic-7oEMp-9f.js} +1 -1
  168. package/dist/assets/trim-Dm26Hw3f.js +1 -0
  169. package/dist/assets/{url-evaluation-DyzOKILN.js → url-evaluation-CTsNt3ve.js} +1 -1
  170. package/dist/assets/{url-join-BM9fQWnd.js → url-join-oxVMh_nl.js} +1 -1
  171. package/dist/assets/{use-mobile-23djKzeO.js → use-mobile-BS_f_Fn7.js} +1 -1
  172. package/dist/assets/{use-mobile-BmaqHxmL.js → use-mobile-Czu8FCYf.js} +1 -1
  173. package/dist/assets/{useAsync-DtsKmLYR.js → useAsync-sbHIoH6-.js} +1 -1
  174. package/dist/assets/{useAsyncRetry-bd8YRPLB.js → useAsyncRetry-CCLyjAGj.js} +1 -1
  175. package/dist/assets/{useLocalStorage-Cf0vlWCe.js → useLocalStorage-CnqCtMp_.js} +1 -1
  176. package/dist/assets/{useThemeProps-CSqQ3Rdj.js → useThemeProps-DrXM-hmA.js} +1 -1
  177. package/dist/assets/{util-w8OtW6iJ.js → util-odWrmhcv.js} +1 -1
  178. package/dist/assets/{vi-DF8IinAc.js → vi-D1mKYrmb.js} +1 -1
  179. package/dist/assets/{wait-container-CoMsFqPE.js → wait-container-D_OCwH7P.js} +1 -1
  180. package/dist/assets/{without-wallet-U-jwKDa8.js → without-wallet-suCG1vjR.js} +1 -1
  181. package/dist/assets/wrap-locale-C0daq2dx.js +1 -0
  182. package/dist/assets/{zh-ByJkLAV1.js → zh-G2I44gfs.js} +1 -1
  183. package/dist/assets/{zh-tw-34G9tsUP.js → zh-tw-C4Juvs-i.js} +1 -1
  184. package/dist/index.html +1 -1
  185. package/package.json +1 -1
  186. package/dist/assets/ArrowDropDown-BLLloj8o.js +0 -1
  187. package/dist/assets/KeyboardArrowDown-Dlq5aN05.js +0 -1
  188. package/dist/assets/Verified-BAR-FN7O.js +0 -1
  189. package/dist/assets/api-Bv3RStR2.js +0 -1
  190. package/dist/assets/cloneDeep-CheRvpcx.js +0 -1
  191. package/dist/assets/config-navigation-D55MBXAB.js +0 -472
  192. package/dist/assets/emotion-cache.browser.esm-DxLNiXj3.js +0 -1
  193. package/dist/assets/engine-DGEfu7n8.js +0 -1
  194. package/dist/assets/getValidReactChildren-CVyZy5bG.js +0 -1
  195. package/dist/assets/index-CckoDRE8.js +0 -1
  196. package/dist/assets/index-DciiOEW2.js +0 -20
  197. package/dist/assets/index-Duu5UY8_.js +0 -1
  198. package/dist/assets/index-DxkMGrHs.js +0 -358
  199. package/dist/assets/index-K5eCanEK.js +0 -102
  200. package/dist/assets/is-path-prefix-equal-Cc6vYZ8N.js +0 -1
  201. package/dist/assets/item-BinI3jhy.js +0 -163
  202. package/dist/assets/omit-Bk5eP-SH.js +0 -1
  203. package/dist/assets/runtime-CVva7EgW.js +0 -1
  204. package/dist/assets/schema-7NDYbay9.js +0 -1
  205. package/dist/assets/sdk-Dvt1785F.js +0 -1
  206. package/dist/assets/toUpper-lxerpjTR.js +0 -1
  207. package/dist/assets/trim-D7km596D.js +0 -1
  208. package/dist/assets/wrap-locale-DxhU5ODE.js +0 -1
@@ -0,0 +1,163 @@
1
+ import{c as et,j as l,W as se,c0 as Le,r as T,gm as wi,ab as fe,gn as Si,dt as ki,ep as ji,go as pr,i as tt,cQ as Ti,cR as Yt,B as R,aD as H,aT as Oi,fY as ot,aH as pn,K as M,gp as Ci,es as mr,C as ee,aB as Y,ge as gr,ck as Ei,aQ as yr,bd as br,gq as st,au as vr,M as Ke,y as ve,dh as Ue,gr as Ii,al as ye,cd as xr,ct as wr,ao as Jt,Q as ae,bt as mn,b5 as Ri,aP as gn,dT as Pi,gs as Mi,gt as _i,gu as Li,dS as Di,bs as zi,be as Fi,gv as Wi,bb as Ni,bc as Ai,em as Bi,gw as $i,fn as yn,P as he,V as pe,ad as Zt,fh as bn,o as C,ac as Vi,gx as Sr,U as Ki,X as De,bx as He,cU as Ui,cV as kr,az as Hi,e_ as vn,aA as qi,aS as en,cq as Gi,cr as Qi,at as Xi,e0 as Yi,bz as je,f6 as Ji,H as ue,am as Zi,d as eo,ax as to,as as no,k as ro,l as jr,cy as io,a3 as oo,c4 as so}from"./index-DrI_kbUr.js";import{u as ao,V as lo}from"./Verified-C1aYOY3u.js";import{P as co}from"./ChevronLeft-DqSG9UHo.js";import{N as uo}from"./ChevronRight-DxsEcvUg.js";import{S as fo}from"./Search-m3CMNGDm.js";import{y as ho}from"./index-DUEj1V-j.js";import{o as po,u as mo}from"./blocklet-CzBGFesP.js";import{A as go}from"./Autocomplete-BqPV4fCq.js";import{S as yo,V as bo}from"./VerifiedUser-CS3FW2sd.js";import{A as vo}from"./Add-vvp5juzF.js";import{L as Tr}from"./Launch-BsxqWG7C.js";import{D as xo}from"./Done-DVQ_2sA2.js";import{D as Or}from"./DeleteOutline-BXoQnWFj.js";import{D as wo}from"./delete-confirm-Dh3X0iXU.js";import{I as So}from"./MoreVert-DxM-B8xa.js";import{g as Re}from"./get-safe-url-BTJDduf6.js";import{B as xn}from"./ButtonGroup-BDg4XqiR.js";const ko=et(l.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"})),jo=et(l.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"})),To=et(l.jsx("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z"})),Oo=et(l.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"})),nc="blocklet-add-component-registry",rc="server-add-registry",Co={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 16l2-6l6-2l-2 6l-6 2"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-9v2m0 14v2m-9-9h2m14 0h2"/></g>'},Te=/^[a-z0-9]+(-[a-z0-9]+)*$/,nt=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),c=i.pop(),u={provider:i.length>0?i[0]:r,prefix:c,name:a};return e&&!Be(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!Be(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:o};return e&&!Be(a,n)?null:a}return null},Be=(t,e)=>t?!!((t.provider===""||t.provider.match(Te))&&(e&&t.prefix===""||t.prefix.match(Te))&&t.name.match(Te)):!1,Cr=Object.freeze({left:0,top:0,width:16,height:16}),qe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Cr,...qe}),Ot=Object.freeze({...tn,body:"",hidden:!1});function Eo(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function wn(t,e){const n=Eo(t,e);for(const r in Ot)r in qe?r in t&&!(r in n)&&(n[r]=qe[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function Io(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const a=r[s]&&r[s].parent,c=a&&o(a);c&&(i[s]=[a].concat(c))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function Ro(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function s(a){o=wn(r[a]||i[a],o)}return s(e),n.forEach(s),wn(t,o)}function Er(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=Io(t);for(const i in r){const o=r[i];o&&(e(i,Ro(t,i,o)),n.push(i))}return n}const Po={provider:"",aliases:{},not_found:{},...Cr};function at(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Ir(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!at(t,Po))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i.match(Te)||typeof o.body!="string"||!at(o,Ot))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i.match(Te)||typeof s!="string"||!n[s]&&!r[s]||!at(o,Ot))return null}return e}const Sn=Object.create(null);function Mo(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function de(t,e){const n=Sn[t]||(Sn[t]=Object.create(null));return n[e]||(n[e]=Mo(t,e))}function nn(t,e){return Ir(e)?Er(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function _o(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Pe=!1;function Rr(t){return typeof t=="boolean"&&(Pe=t),Pe}function Lo(t){const e=typeof t=="string"?nt(t,!0,Pe):t;if(e){const n=de(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Do(t,e){const n=nt(t,!0,Pe);if(!n)return!1;const r=de(n.provider,n.prefix);return _o(r,n.name,e)}function zo(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Pe&&!e&&!t.prefix){let i=!1;return Ir(t)&&(t.prefix="",Er(t,(o,s)=>{s&&Do(o,s)&&(i=!0)})),i}const n=t.prefix;if(!Be({provider:e,prefix:n,name:"a"}))return!1;const r=de(e,n);return!!nn(r,t)}const Pr=Object.freeze({width:null,height:null}),Mr=Object.freeze({...Pr,...qe}),Fo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Wo=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kn(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Fo);if(r===null||!r.length)return t;const i=[];let o=r.shift(),s=Wo.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?i.push(o):i.push(Math.ceil(a*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}const No=t=>t==="unset"||t==="undefined"||t==="none";function Ao(t,e){const n={...tn,...t},r={...Mr,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const h=[],g=v.hFlip,b=v.vFlip;let p=v.rotate;g?b?p+=2:(h.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),h.push("scale(-1 1)"),i.top=i.left=0):b&&(h.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),h.push("scale(1 -1)"),i.top=i.left=0);let w;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:w=i.height/2+i.top,h.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:h.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,h.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}p%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),h.length&&(o='<g transform="'+h.join(" ")+'">'+o+"</g>")});const s=r.width,a=r.height,c=i.width,u=i.height;let f,d;s===null?(d=a===null?"1em":a==="auto"?u:a,f=kn(d,c/u)):(f=s==="auto"?c:s,d=a===null?kn(f,u/c):a==="auto"?u:a);const m={},x=(v,h)=>{No(h)||(m[v]=h.toString())};return x("width",f),x("height",d),m.viewBox=i.left.toString()+" "+i.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:m,body:o}}const Bo=/\sid="(\S+)"/g,$o="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Vo=0;function Ko(t,e=$o){const n=[];let r;for(;r=Bo.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof e=="function"?e(o):e+(Vo++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const Ct=Object.create(null);function Uo(t,e){Ct[t]=e}function Et(t){return Ct[t]||Ct[""]}function rn(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const on=Object.create(null),Se=["https://api.simplesvg.com","https://api.unisvg.com"],$e=[];for(;Se.length>0;)Se.length===1||Math.random()>.5?$e.push(Se.shift()):$e.push(Se.pop());on[""]=rn({resources:["https://api.iconify.design"].concat($e)});function Ho(t,e){const n=rn(e);return n===null?!1:(on[t]=n,!0)}function sn(t){return on[t]}const qo=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let jn=qo();function Go(t,e){const n=sn(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function Qo(t){return t===404}const Xo=(t,e,n)=>{const r=[],i=Go(t,e),o="icons";let s={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,u)=>{a+=c.length+1,a>=i&&u>0&&(r.push(s),s={type:o,provider:t,prefix:e,icons:[]},a=c.length),s.icons.push(c)}),r.push(s),r};function Yo(t){if(typeof t=="string"){const e=sn(t);if(e)return e.path}return"/"}const Jo=(t,e,n)=>{if(!jn){n("abort",424);return}let r=Yo(e.provider);switch(e.type){case"icons":{const o=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=o+".json?"+c.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;jn(t+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(Qo(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Zo={prepare:Xo,send:Jo};function es(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,a=i.name,c=n[o]||(n[o]=Object.create(null)),u=c[s]||(c[s]=de(o,s));let f;a in u.icons?f=e.loaded:s===""||u.missing.has(a)?f=e.missing:f=e.pending;const d={provider:o,prefix:s,name:a};f.push(d)}),e}function _r(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function ts(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const s=o.icons,a=s.pending.length;s.pending=s.pending.filter(c=>{if(c.prefix!==i)return!0;const u=c.name;if(t.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||_r([t],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let ns=0;function rs(t,e,n){const r=ns++,i=_r.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function is(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?nt(i,e,n):i;o&&r.push(o)}),r}var os={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ss(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let O=t.resources.slice(0);for(s=[];O.length>1;){const P=Math.floor(Math.random()*O.length);s.push(O[P]),O=O.slice(0,P).concat(O.slice(P+1))}s=s.concat(O)}else s=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let c="pending",u=0,f,d=null,m=[],x=[];typeof r=="function"&&x.push(r);function v(){d&&(clearTimeout(d),d=null)}function h(){c==="pending"&&(c="aborted"),v(),m.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),m=[]}function g(O,P){P&&(x=[]),typeof O=="function"&&x.push(O)}function b(){return{startTime:a,payload:e,status:c,queriesSent:u,queriesPending:m.length,subscribe:g,abort:h}}function p(){c="failed",x.forEach(O=>{O(void 0,f)})}function w(){m.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),m=[]}function j(O,P,_){const L=P!=="success";switch(m=m.filter(E=>E!==O),c){case"pending":break;case"failed":if(L||!t.dataAfterTimeout)return;break;default:return}if(P==="abort"){f=_,p();return}if(L){f=_,m.length||(s.length?I():p());return}if(v(),w(),!t.random){const E=t.resources.indexOf(O.resource);E!==-1&&E!==t.index&&(t.index=E)}c="completed",x.forEach(E=>{E(_)})}function I(){if(c!=="pending")return;v();const O=s.shift();if(O===void 0){if(m.length){d=setTimeout(()=>{v(),c==="pending"&&(w(),p())},t.timeout);return}p();return}const P={status:"pending",resource:O,callback:(_,L)=>{j(P,_,L)}};m.push(P),u++,d=setTimeout(I,t.rotate),n(O,e,P.callback)}return setTimeout(I),b}function Lr(t){const e={...os,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function i(a,c,u){const f=ss(e,a,c,(d,m)=>{r(),u&&u(d,m)});return n.push(f),f}function o(a){return n.find(c=>a(c))||null}return{query:i,find:o,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function Tn(){}const lt=Object.create(null);function as(t){if(!lt[t]){const e=sn(t);if(!e)return;const n=Lr(e),r={config:e,redundancy:n};lt[t]=r}return lt[t]}function ls(t,e,n){let r,i;if(typeof t=="string"){const o=Et(t);if(!o)return n(void 0,424),Tn;i=o.send;const s=as(t);s&&(r=s.redundancy)}else{const o=rn(t);if(o){r=Lr(o);const s=t.resources?t.resources[0]:"",a=Et(s);a&&(i=a.send)}}return!r||!i?(n(void 0,424),Tn):r.query(e,i,n)().abort}const On="iconify2",Me="iconify",Dr=Me+"-count",Cn=Me+"-version",zr=36e5,cs=168;function It(t,e){try{return t.getItem(e)}catch{}}function an(t,e,n){try{return t.setItem(e,n),!0}catch{}}function En(t,e){try{t.removeItem(e)}catch{}}function Rt(t,e){return an(t,Dr,e.toString())}function Pt(t){return parseInt(It(t,Dr))||0}const rt={local:!0,session:!0},Fr={local:new Set,session:new Set};let ln=!1;function us(t){ln=t}let ze=typeof window>"u"?{}:window;function Wr(t){const e=t+"Storage";try{if(ze&&ze[e]&&typeof ze[e].length=="number")return ze[e]}catch{}rt[t]=!1}function Nr(t,e){const n=Wr(t);if(!n)return;const r=It(n,Cn);if(r!==On){if(r){const a=Pt(n);for(let c=0;c<a;c++)En(n,Me+c.toString())}an(n,Cn,On),Rt(n,0);return}const i=Math.floor(Date.now()/zr)-cs,o=a=>{const c=Me+a.toString(),u=It(n,c);if(typeof u=="string"){try{const f=JSON.parse(u);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>i&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&e(f,a))return!0}catch{}En(n,c)}};let s=Pt(n);for(let a=s-1;a>=0;a--)o(a)||(a===s-1?(s--,Rt(n,s)):Fr[t].add(a))}function Ar(){if(!ln){us(!0);for(const t in rt)Nr(t,e=>{const n=e.data,r=e.provider,i=n.prefix,o=de(r,i);if(!nn(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function ds(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in rt)Nr(r,i=>{const o=i.data;return i.provider!==t.provider||o.prefix!==t.prefix||o.lastModified===e});return!0}function fs(t,e){ln||Ar();function n(r){let i;if(!rt[r]||!(i=Wr(r)))return;const o=Fr[r];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=Pt(i),!Rt(i,s+1))return;const a={cached:Math.floor(Date.now()/zr),provider:t.provider,data:e};return an(i,Me+s.toString(),JSON.stringify(a))}e.lastModified&&!ds(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function In(){}function hs(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,ts(t)}))}function ps(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;delete t.iconsToLoad;let o;if(!i||!(o=Et(n)))return;o.prepare(n,r,i).forEach(a=>{ls(n,a,c=>{if(typeof c!="object")a.icons.forEach(u=>{t.missing.add(u)});else try{const u=nn(t,c);if(!u.length)return;const f=t.pendingIcons;f&&u.forEach(d=>{f.delete(d)}),fs(t,c)}catch(u){console.error(u)}hs(t)})})}))}const ms=(t,e)=>{const n=is(t,!0,Rr()),r=es(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,In)}),()=>{c=!1}}const i=Object.create(null),o=[];let s,a;return r.pending.forEach(c=>{const{provider:u,prefix:f}=c;if(f===a&&u===s)return;s=u,a=f,o.push(de(u,f));const d=i[u]||(i[u]=Object.create(null));d[f]||(d[f]=[])}),r.pending.forEach(c=>{const{provider:u,prefix:f,name:d}=c,m=de(u,f),x=m.pendingIcons||(m.pendingIcons=new Set);x.has(d)||(x.add(d),i[u][f].push(d))}),o.forEach(c=>{const{provider:u,prefix:f}=c;i[u][f].length&&ps(c,i[u][f])}),e?rs(e,r,o):In};function gs(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in Pr?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const ys=/[\s,]+/;function bs(t,e){e.split(ys).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function vs(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function xs(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function ws(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ss(t){return"data:image/svg+xml,"+ws(t)}function ks(t){return'url("'+Ss(t)+'")'}let Oe;function js(){try{Oe=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Oe=null}}function Ts(t){return Oe===void 0&&js(),Oe?Oe.createHTML(t):t}const Br={...Mr,inline:!1},Os={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Cs={display:"inline-block"},Mt={backgroundColor:"currentColor"},$r={backgroundColor:"transparent"},Rn={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Pn={WebkitMask:Mt,mask:Mt,background:$r};for(const t in Pn){const e=Pn[t];for(const n in Rn)e[t+n]=Rn[n]}const Es={...Br,inline:!0};function Mn(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Is=(t,e,n,r)=>{const i=n?Es:Br,o=gs(i,e),s=e.mode||"svg",a={},c=e.style||{},u={...s==="svg"?Os:{},ref:r};for(let b in e){const p=e[b];if(p!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":o[b]=p===!0||p==="true"||p===1;break;case"flip":typeof p=="string"&&bs(o,p);break;case"color":a.color=p;break;case"rotate":typeof p=="string"?o[b]=vs(p):typeof p=="number"&&(o[b]=p);break;case"ariaHidden":case"aria-hidden":p!==!0&&p!=="true"&&delete u["aria-hidden"];break;default:i[b]===void 0&&(u[b]=p)}}const f=Ao(t,o),d=f.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){u.style={...a,...c},Object.assign(u,d);let b=0,p=e.id;return typeof p=="string"&&(p=p.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:Ts(Ko(f.body,p?()=>p+"ID"+b++:"iconifyReact"))},se.createElement("svg",u)}const{body:m,width:x,height:v}=t,h=s==="mask"||(s==="bg"?!1:m.indexOf("currentColor")!==-1),g=xs(m,{...d,width:x+"",height:v+""});return u.style={...a,"--svg":ks(g),width:Mn(d.width),height:Mn(d.height),...Cs,...h?Mt:$r,...c},se.createElement("span",u)};Rr(!0);Uo("",Zo);if(typeof document<"u"&&typeof window<"u"){Ar();const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!zo(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;Ho(n,i)||console.error(r)}catch{console.error(r)}}}}class Vr extends se.Component{constructor(e){super(e),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(e){this.state.icon!==e&&this.setState({icon:e})}_checkIcon(e){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(e||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=nt(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const o=Lo(i);if(!o){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),o!==null&&(this._loading={name:r,abort:ms([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const s=["iconify"];i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),this._setData({data:o,classes:s}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(e){e.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const e=this.props,n=this.state.icon;if(n===null)return e.children?e.children:se.createElement("span",{});let r=e;return n.classes&&(r={...e,className:(typeof e.className=="string"?e.className+" ":"")+n.classes.join(" ")}),Is({...tn,...n.data},r,e._inline,e._ref)}}const oe=se.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!1};return se.createElement(Vr,r)});se.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!0};return se.createElement(Vr,r)});const Kr={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/>'};var Rs={694:(t,e,n)=>{var r=n(925);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function s(u,f,d,m,x,v){if(v!==r){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function a(){return s}s.isRequired=s;var c={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:a,element:s,elementType:s,instanceOf:a,node:s,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:i};return c.PropTypes=c,c}},556:(t,e,n)=>{t.exports=n(694)()},925:t=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115:t=>{var e=typeof Element<"u",n=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,a){if(s===a)return!0;if(s&&a&&typeof s=="object"&&typeof a=="object"){if(s.constructor!==a.constructor)return!1;var c,u,f,d;if(Array.isArray(s)){if((c=s.length)!=a.length)return!1;for(u=c;u--!=0;)if(!o(s[u],a[u]))return!1;return!0}if(n&&s instanceof Map&&a instanceof Map){if(s.size!==a.size)return!1;for(d=s.entries();!(u=d.next()).done;)if(!a.has(u.value[0]))return!1;for(d=s.entries();!(u=d.next()).done;)if(!o(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&s instanceof Set&&a instanceof Set){if(s.size!==a.size)return!1;for(d=s.entries();!(u=d.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(a)){if((c=s.length)!=a.length)return!1;for(u=c;u--!=0;)if(s[u]!==a[u])return!1;return!0}if(s.constructor===RegExp)return s.source===a.source&&s.flags===a.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof a.valueOf=="function")return s.valueOf()===a.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof a.toString=="function")return s.toString()===a.toString();if((c=(f=Object.keys(s)).length)!==Object.keys(a).length)return!1;for(u=c;u--!=0;)if(!Object.prototype.hasOwnProperty.call(a,f[u]))return!1;if(e&&s instanceof Element)return!1;for(u=c;u--!=0;)if((f[u]!=="_owner"&&f[u]!=="__v"&&f[u]!=="__o"||!s.$$typeof)&&!o(s[f[u]],a[f[u]]))return!1;return!0}return s!=s&&a!=a}t.exports=function(s,a){try{return o(s,a)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}}}},_n={};function K(t){var e=_n[t];if(e!==void 0)return e.exports;var n=_n[t]={exports:{}};return Rs[t](n,n.exports,K),n.exports}K.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return K.d(e,{a:e}),e},K.d=(t,e)=>{for(var n in e)K.o(e,n)&&!K.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},K.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),K.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Ur={};function Hr(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Hr(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}K.d(Ur,{A:()=>xa});const ce=function(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Hr(t))&&(r&&(r+=" "),r+=e);return r},k=(Ln={default:()=>se,useMemo:()=>T.useMemo,useRef:()=>T.useRef},ct={},K.d(ct,Ln),ct);var Ln,ct;const Ge=function(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")},Ps=typeof Le=="object"&&Le&&Le.Object===Object&&Le;var Ms=typeof self=="object"&&self&&self.Object===Object&&self;const qr=Ps||Ms||Function("return this")(),ut=function(){return qr.Date.now()};var _s=/\s/,Ls=/^\s+/;const Ds=function(t){return t&&t.slice(0,(function(e){for(var n=e.length;n--&&_s.test(e.charAt(n)););return n})(t)+1).replace(Ls,"")},Qe=qr.Symbol;var Gr=Object.prototype,zs=Gr.hasOwnProperty,Fs=Gr.toString,ke=Qe?Qe.toStringTag:void 0,Ws=Object.prototype.toString,Dn=Qe?Qe.toStringTag:void 0;const Ns=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Dn&&Dn in Object(t)?(function(e){var n=zs.call(e,ke),r=e[ke];try{e[ke]=void 0;var i=!0}catch{}var o=Fs.call(e);return i&&(n?e[ke]=r:delete e[ke]),o})(t):(function(e){return Ws.call(e)})(t)};var As=/^[-+]0x[0-9a-f]+$/i,Bs=/^0b[01]+$/i,$s=/^0o[0-7]+$/i,Vs=parseInt;const zn=function(t){if(typeof t=="number")return t;if((function(r){return typeof r=="symbol"||(function(i){return i!=null&&typeof i=="object"})(r)&&Ns(r)=="[object Symbol]"})(t))return NaN;if(Ge(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ge(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ds(t);var n=Bs.test(t);return n||$s.test(t)?Vs(t.slice(2),n?2:8):As.test(t)?NaN:+t};var Ks=Math.max,Us=Math.min;const _t=function(t,e,n){var r,i,o,s,a,c,u=0,f=!1,d=!1,m=!0;if(typeof t!="function")throw new TypeError("Expected a function");function x(p){var w=r,j=i;return r=i=void 0,u=p,s=t.apply(j,w)}function v(p){var w=p-c;return c===void 0||w>=e||w<0||d&&p-u>=o}function h(){var p=ut();if(v(p))return g(p);a=setTimeout(h,(function(w){var j=e-(w-c);return d?Us(j,o-(w-u)):j})(p))}function g(p){return a=void 0,m&&r?x(p):(r=i=void 0,s)}function b(){var p=ut(),w=v(p);if(r=arguments,i=this,c=p,w){if(a===void 0)return(function(j){return u=j,a=setTimeout(h,e),f?x(j):s})(c);if(d)return clearTimeout(a),a=setTimeout(h,e),x(c)}return a===void 0&&(a=setTimeout(h,e)),s}return e=zn(e)||0,Ge(n)&&(f=!!n.leading,o=(d="maxWait"in n)?Ks(zn(n.maxWait)||0,e):o,m="trailing"in n?!!n.trailing:m),b.cancel=function(){a!==void 0&&clearTimeout(a),u=0,r=c=i=a=void 0},b.flush=function(){return a===void 0?s:g(ut())},b},Fn=function(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError("Expected a function");return Ge(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_t(t,e,{leading:r,maxWait:e,trailing:i})};var Hs=K(115),qs=K.n(Hs),Qr=(function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some((function(i,o){return i[0]===n&&(r=o,!0)})),r}return(function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];n.call(r,s[1],s[0])}},e})()})(),Lt=typeof window<"u"&&typeof document<"u"&&window.document===document,Xe=K.g!==void 0&&K.g.Math===Math?K.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Gs=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Xe):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Qs=["top","right","bottom","left","width","height","size","weight"],Xs=typeof MutationObserver<"u",Ys=(function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(function(e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&a()}function s(){Gs(o)}function a(){var c=Date.now();if(n){if(c-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,20);i=c}return a})(this.refresh.bind(this))}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter((function(n){return n.gatherActive(),n.hasActive()}));return e.forEach((function(n){return n.broadcastActive()})),e.length>0},t.prototype.connect_=function(){Lt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Xs?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Lt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n;Qs.some((function(i){return!!~r.indexOf(i)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t})(),Wn=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},xe=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Xe},Nn=Ye(0,0,0,0);function Ve(t){return parseFloat(t)||0}function An(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(r,i){return r+Ve(t["border-"+i+"-width"])}),0)}var Js=typeof SVGGraphicsElement<"u"?function(t){return t instanceof xe(t).SVGGraphicsElement}:function(t){return t instanceof xe(t).SVGElement&&typeof t.getBBox=="function"};function Zs(t){return Lt?Js(t)?(function(e){var n=e.getBBox();return Ye(0,0,n.width,n.height)})(t):(function(e){var n=e.clientWidth,r=e.clientHeight;if(!n&&!r)return Nn;var i=xe(e).getComputedStyle(e),o=(function(m){for(var x={},v=0,h=["top","right","bottom","left"];v<h.length;v++){var g=h[v],b=m["padding-"+g];x[g]=Ve(b)}return x})(i),s=o.left+o.right,a=o.top+o.bottom,c=Ve(i.width),u=Ve(i.height);if(i.boxSizing==="border-box"&&(Math.round(c+s)!==n&&(c-=An(i,"left","right")+s),Math.round(u+a)!==r&&(u-=An(i,"top","bottom")+a)),!(function(m){return m===xe(m).document.documentElement})(e)){var f=Math.round(c+s)-n,d=Math.round(u+a)-r;Math.abs(f)!==1&&(c-=f),Math.abs(d)!==1&&(u-=d)}return Ye(o.left,o.top,c,u)})(t):Nn}function Ye(t,e,n,r){return{x:t,y:e,width:n,height:r}}var ea=(function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ye(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Zs(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t})(),ta=function(t,e){var n=(function(r){var i=r.x,o=r.y,s=r.width,a=r.height,c=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,u=Object.create(c.prototype);return Wn(u,{x:i,y:o,width:s,height:a,top:o,right:i+s,bottom:a+o,left:i}),u})(e);Wn(this,{target:t,contentRect:n})},na=(function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new Qr,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(e instanceof xe(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new ea(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(e instanceof xe(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(n){n.isActive()&&e.activeObservations_.push(n)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map((function(r){return new ta(r.target,r.broadcastRect())}));this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t})(),Xr=typeof WeakMap<"u"?new WeakMap:new Qr,Yr=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Ys.getInstance(),r=new na(e,n,this);Xr.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){Yr.prototype[t]=function(){var e;return(e=Xr.get(this))[t].apply(e,arguments)}}));const Bn=Xe.ResizeObserver!==void 0?Xe.ResizeObserver:Yr,te="Left",ne="Right",re="Up",ie="Down",me={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},dt={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},$n="mousemove",Vn="mouseup";function Kn(t,e){if(e===0)return t;const n=Math.PI/180*e;return[t[0]*Math.cos(n)+t[1]*Math.sin(n),t[1]*Math.cos(n)-t[0]*Math.sin(n)]}function ra(t){const{trackMouse:e}=t,n=k.useRef(Object.assign({},dt)),r=k.useRef(Object.assign({},me)),i=k.useRef(Object.assign({},r.current));let o;for(o in i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},me),t),me)r.current[o]===void 0&&(r.current[o]=me[o]);const[s,a]=k.useMemo((()=>(function(c,u){const f=g=>{const b="touches"in g;b&&g.touches.length>1||c(((p,w)=>{w.trackMouse&&!b&&(document.addEventListener($n,d),document.addEventListener(Vn,x));const{clientX:j,clientY:I}=b?g.touches[0]:g,O=Kn([j,I],w.rotationAngle);return w.onTouchStartOrOnMouseDown&&w.onTouchStartOrOnMouseDown({event:g}),Object.assign(Object.assign(Object.assign({},p),dt),{initial:O.slice(),xy:O,start:g.timeStamp||0})}))},d=g=>{c(((b,p)=>{const w="touches"in g;if(w&&g.touches.length>1)return b;if(g.timeStamp-b.start>p.swipeDuration)return b.swiping?Object.assign(Object.assign({},b),{swiping:!1}):b;const{clientX:j,clientY:I}=w?g.touches[0]:g,[O,P]=Kn([j,I],p.rotationAngle),_=O-b.xy[0],L=P-b.xy[1],E=Math.abs(_),A=Math.abs(L),W=(g.timeStamp||0)-b.start,U=Math.sqrt(E*E+A*A)/(W||1),N=[_/(W||1),L/(W||1)],V=(function(B,X,Z,xi){return B>X?Z>0?ne:te:xi>0?ie:re})(E,A,_,L),S=typeof p.delta=="number"?p.delta:p.delta[V.toLowerCase()]||me.delta;if(E<S&&A<S&&!b.swiping)return b;const D={absX:E,absY:A,deltaX:_,deltaY:L,dir:V,event:g,first:b.first,initial:b.initial,velocity:U,vxvy:N};D.first&&p.onSwipeStart&&p.onSwipeStart(D),p.onSwiping&&p.onSwiping(D);let Q=!1;return(p.onSwiping||p.onSwiped||p[`onSwiped${V}`])&&(Q=!0),Q&&p.preventScrollOnSwipe&&p.trackTouch&&g.cancelable&&g.preventDefault(),Object.assign(Object.assign({},b),{first:!1,eventData:D,swiping:!0})}))},m=g=>{c(((b,p)=>{let w;if(b.swiping&&b.eventData){if(g.timeStamp-b.start<p.swipeDuration){w=Object.assign(Object.assign({},b.eventData),{event:g}),p.onSwiped&&p.onSwiped(w);const j=p[`onSwiped${w.dir}`];j&&j(w)}}else p.onTap&&p.onTap({event:g});return p.onTouchEndOrOnMouseUp&&p.onTouchEndOrOnMouseUp({event:g}),Object.assign(Object.assign(Object.assign({},b),dt),{eventData:w})}))},x=g=>{document.removeEventListener($n,d),document.removeEventListener(Vn,x),m(g)},v=(g,b)=>{let p=()=>{};if(g&&g.addEventListener){const w=Object.assign(Object.assign({},me.touchEventOptions),b.touchEventOptions),j=[["touchstart",f,w],["touchmove",d,Object.assign(Object.assign({},w),b.preventScrollOnSwipe?{passive:!1}:{})],["touchend",m,w]];j.forEach((([I,O,P])=>g.addEventListener(I,O,P))),p=()=>j.forEach((([I,O])=>g.removeEventListener(I,O)))}return p},h={ref:g=>{g!==null&&c(((b,p)=>{if(b.el===g)return b;const w={};return b.el&&b.el!==g&&b.cleanUpTouch&&(b.cleanUpTouch(),w.cleanUpTouch=void 0),p.trackTouch&&g&&(w.cleanUpTouch=v(g,p)),Object.assign(Object.assign(Object.assign({},b),{el:g}),w)}))}};return u.trackMouse&&(h.onMouseDown=f),[h,v]})((c=>n.current=c(n.current,r.current)),{trackMouse:e})),[e]);return n.current=(function(c,u,f,d){return u.trackTouch&&c.el?c.cleanUpTouch?u.preventScrollOnSwipe!==f.preventScrollOnSwipe||u.touchEventOptions.passive!==f.touchEventOptions.passive?(c.cleanUpTouch(),Object.assign(Object.assign({},c),{cleanUpTouch:d(c.el,u)})):c:Object.assign(Object.assign({},c),{cleanUpTouch:d(c.el,u)}):(c.cleanUpTouch&&c.cleanUpTouch(),Object.assign(Object.assign({},c),{cleanUpTouch:void 0}))})(n.current,r.current,i.current,a),s}var y=K(556);function Ce(t){return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(t)}function Un(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Hn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Un(Object(n),!0).forEach((function(r){ia(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function ia(t,e,n){return(e=(function(r){var i=(function(o){if(Ce(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,"string");if(Ce(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(r);return Ce(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oa={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},Dt=k.default.memo((function(t){var e=Hn(Hn({},oa),t),n=e.description,r=e.fullscreen,i=e.handleImageLoaded,o=e.isFullscreen,s=e.onImageError,a=e.original,c=e.originalAlt,u=e.originalHeight,f=e.originalWidth,d=e.originalTitle,m=e.sizes,x=e.srcSet,v=e.loading,h=o&&r||a;return k.default.createElement(k.default.Fragment,null,k.default.createElement("img",{className:"image-gallery-image",src:h,alt:c,srcSet:x,height:u,width:f,sizes:m,title:d,onLoad:function(g){return i(g,a)},onError:s,loading:v}),n&&k.default.createElement("span",{className:"image-gallery-description"},n))}));Dt.displayName="Item",Dt.propTypes={description:y.string,fullscreen:y.string,handleImageLoaded:y.func.isRequired,isFullscreen:y.bool,onImageError:y.func.isRequired,original:y.string.isRequired,originalAlt:y.string,originalHeight:y.string,originalWidth:y.string,originalTitle:y.string,sizes:y.string,srcSet:y.string,loading:y.string};const sa=Dt;function Ee(t){return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(t)}function qn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Gn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qn(Object(n),!0).forEach((function(r){aa(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function aa(t,e,n){return(e=(function(r){var i=(function(o){if(Ee(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,"string");if(Ee(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(r);return Ee(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var la={left:k.default.createElement("polyline",{points:"15 18 9 12 15 6"}),right:k.default.createElement("polyline",{points:"9 18 15 12 9 6"}),top:k.default.createElement("polyline",{points:"6 15 12 9 18 15"}),bottom:k.default.createElement("polyline",{points:"6 9 12 15 18 9"}),maximize:k.default.createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:k.default.createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:k.default.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:k.default.createElement(k.default.Fragment,null,k.default.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),k.default.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},ca={strokeWidth:1,viewBox:"0 0 24 24"},Jr=function(t){var e=Gn(Gn({},ca),t),n=e.strokeWidth,r=e.viewBox,i=e.icon;return k.default.createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:r,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},la[i])};Jr.propTypes={strokeWidth:y.number,viewBox:y.string,icon:(0,y.oneOf)(["left","right","top","bottom","maximize","minimize","play","pause"]).isRequired};const we=Jr;var zt=k.default.memo((function(t){var e=t.isFullscreen,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:n,"aria-label":"Open Fullscreen"},k.default.createElement(we,{strokeWidth:2,icon:e?"minimize":"maximize"}))}));zt.displayName="Fullscreen",zt.propTypes={isFullscreen:y.bool.isRequired,onClick:y.func.isRequired};const ua=zt;var Ft=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:e,onClick:n,"aria-label":"Previous Slide"},k.default.createElement(we,{icon:"left",viewBox:"6 0 12 24"}))}));Ft.displayName="LeftNav",Ft.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const da=Ft;var Wt=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:e,onClick:n,"aria-label":"Next Slide"},k.default.createElement(we,{icon:"right",viewBox:"6 0 12 24"}))}));Wt.displayName="RightNav",Wt.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const fa=Wt;var Nt=k.default.memo((function(t){var e=t.isPlaying,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:n,"aria-label":"Play or Pause Slideshow"},k.default.createElement(we,{strokeWidth:2,icon:e?"pause":"play"}))}));Nt.displayName="PlayPause",Nt.propTypes={isPlaying:y.bool.isRequired,onClick:y.func.isRequired};const ha=Nt;function Ie(t){return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(t)}function At(){return At=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},At.apply(null,arguments)}function Qn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qn(Object(n),!0).forEach((function(r){pa(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function pa(t,e,n){return(e=(function(r){var i=(function(o){if(Ie(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,"string");if(Ie(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(r);return Ie(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ma={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},Zr=function(t){var e=Xn(Xn({},ma),t),n=e.children,r=e.className,i=ra({delta:e.delta,onSwiping:e.onSwiping,onSwiped:e.onSwiped});return k.default.createElement("div",At({},i,{className:r}),n)};Zr.propTypes={children:y.node.isRequired,className:y.string,delta:y.number,onSwiped:y.func,onSwiping:y.func};const Yn=Zr;var Bt=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-top-nav",disabled:e,onClick:n,"aria-label":"Previous Slide"},k.default.createElement(we,{icon:"top",viewBox:"6 0 12 24"}))}));Bt.displayName="TopNav",Bt.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const ga=Bt;var $t=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-bottom-nav",disabled:e,onClick:n,"aria-label":"Next Slide"},k.default.createElement(we,{icon:"bottom",viewBox:"6 0 12 24"}))}));$t.displayName="BottomNav",$t.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const ya=$t;function be(t){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(t)}function Jn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Zn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jn(Object(n),!0).forEach((function(r){ge(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function ba(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ti(r.key),r)}}function ei(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ei=function(){return!!t})()}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Je(t)}function Vt(t,e){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Vt(t,e)}function ge(t,e,n){return(e=ti(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ti(t){var e=(function(n){if(be(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,"string");if(be(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t);return be(e)=="symbol"?e:e+""}var er=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],va=(0,y.arrayOf)((0,y.shape)({srcSet:y.string,media:y.string}));function tr(t){var e=parseInt(t.keyCode||t.which||0,10);return e===66||e===62}var Kt=(function(){function t(e){var n,r,i,o;return(function(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")})(this,t),ge((r=this,o=[e],i=Je(i=t),n=(function(s,a){if(a&&(be(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c})(s)})(r,ei()?Reflect.construct(i,o||[],Je(r).constructor):i.apply(r,o))),"onBulletClick",(function(s,a){var c=n.props,u=c.onBulletClick,f=c.items,d=n.state.currentIndex;s.target.blur(),d!==a&&(f.length===2?n.slideToIndexWithStyleReset(a,s):n.slideToIndex(a,s)),u&&u(s,a)})),n.state={currentIndex:e.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,galleryHeight:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(e.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},n.loadedImages={},n.imageGallery=k.default.createRef(),n.thumbnailsWrapper=k.default.createRef(),n.thumbnails=k.default.createRef(),n.imageGallerySlideWrapper=k.default.createRef(),n.handleImageLoaded=n.handleImageLoaded.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n.handleResize=n.handleResize.bind(n),n.handleOnSwiped=n.handleOnSwiped.bind(n),n.handleScreenChange=n.handleScreenChange.bind(n),n.handleSwiping=n.handleSwiping.bind(n),n.handleThumbnailSwiping=n.handleThumbnailSwiping.bind(n),n.handleOnThumbnailSwiped=n.handleOnThumbnailSwiped.bind(n),n.onThumbnailMouseLeave=n.onThumbnailMouseLeave.bind(n),n.handleImageError=n.handleImageError.bind(n),n.pauseOrPlay=n.pauseOrPlay.bind(n),n.renderThumbInner=n.renderThumbInner.bind(n),n.renderItem=n.renderItem.bind(n),n.slideLeft=n.slideLeft.bind(n),n.slideRight=n.slideRight.bind(n),n.toggleFullScreen=n.toggleFullScreen.bind(n),n.togglePlay=n.togglePlay.bind(n),n.unthrottledSlideToIndex=n.slideToIndex,n.slideToIndex=Fn(n.unthrottledSlideToIndex,e.slideDuration,{trailing:!1}),e.lazyLoad&&(n.lazyLoaded=[]),n}return(function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Vt(e,n)})(t,k.default.Component),(function(e,n){return n&&ba(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e})(t,[{key:"componentDidMount",value:function(){var e=this.props,n=e.autoPlay,r=e.useWindowKeyDown;n&&this.play(),r?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(e,n){var r=this.props,i=r.items,o=r.lazyLoad,s=r.slideDuration,a=r.slideInterval,c=r.startIndex,u=r.thumbnailPosition,f=r.showThumbnails,d=r.useWindowKeyDown,m=this.state,x=m.currentIndex,v=m.isPlaying,h=e.items.length!==i.length,g=!qs()(e.items,i),b=e.startIndex!==c,p=e.thumbnailPosition!==u,w=e.showThumbnails!==f;a===e.slideInterval&&s===e.slideDuration||v&&(this.pause(),this.play()),p&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),w&&f&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),w&&!f&&this.removeThumbnailsResizeObserver(),(h||w)&&this.handleResize(),n.currentIndex!==x&&this.slideThumbnailBar(),e.slideDuration!==s&&(this.slideToIndex=Fn(this.unthrottledSlideToIndex,s,{trailing:!1})),!o||e.lazyLoad&&!g||(this.lazyLoaded=[]),d!==e.useWindowKeyDown&&(d?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(b||g)&&this.setState({currentIndex:c,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var e=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),e?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var e=this,n=this.state,r=n.currentIndex,i=n.isTransitioning,o=this.props,s=o.onSlide,a=o.slideDuration;this.transitionTimer=window.setTimeout((function(){i&&(e.setState({isTransitioning:!i,isSwipingThumbnail:!1}),s&&s(r))}),a+50)}},{key:"onThumbnailClick",value:function(e,n){var r=this.props,i=r.onThumbnailClick,o=r.items,s=this.state.currentIndex;e.target.parentNode.parentNode.blur(),s!==n&&(o.length===2?this.slideToIndexWithStyleReset(n,e):this.slideToIndex(n,e)),i&&i(e,n)}},{key:"onThumbnailMouseOver",value:function(e,n){var r=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout((function(){r.slideToIndex(n),r.pause()}),300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var e=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,e&&this.play()}}},{key:"setThumbsTranslate",value:function(e){this.setState({thumbsTranslate:e})}},{key:"setModalFullscreen",value:function(e){var n=this.props.onScreenChange;this.setState({modalFullscreen:e}),n&&n(e)}},{key:"getThumbsTranslate",value:function(e){var n,r=this.props,i=r.disableThumbnailScroll,o=r.items,s=this.state,a=s.thumbnailsWrapperWidth,c=s.thumbnailsWrapperHeight,u=this.thumbnails&&this.thumbnails.current;if(i)return 0;if(u){if(this.isThumbnailVertical()){if(u.scrollHeight<=c)return 0;n=u.scrollHeight-c}else{if(u.scrollWidth<=a||a<=0)return 0;n=u.scrollWidth-a}return e*(n/(o.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(e){switch(e){case"left":e=" ".concat("image-gallery-thumbnails-left");break;case"right":e=" ".concat("image-gallery-thumbnails-right");break;case"bottom":e=" ".concat("image-gallery-thumbnails-bottom");break;case"top":e=" ".concat("image-gallery-thumbnails-top")}return e}},{key:"getAlignmentClassName",value:function(e){var n=this.state.currentIndex,r=this.props,i=r.infinite,o=r.items,s="",a="image-gallery-left",c="image-gallery-right";switch(e){case n-1:s=" ".concat(a);break;case n:s=" ".concat("image-gallery-center");break;case n+1:s=" ".concat(c)}return o.length>=3&&i&&(e===0&&n===o.length-1?s=" ".concat(c):e===o.length-1&&n===0&&(s=" ".concat(a))),s}},{key:"getTranslateXForTwoSlide",value:function(e){var n=this.state,r=n.currentIndex,i=n.currentSlideOffset,o=n.previousIndex,s=r!==o,a=e===0&&o===0,c=e===1&&o===1,u=e===0&&r===1,f=e===1&&r===0,d=i===0,m=-100*r+100*e+i;return i>0?this.direction="left":i<0&&(this.direction="right"),f&&i>0&&(m=-100+i),u&&i<0&&(m=100+i),s?a&&d&&this.direction==="left"?m=100:c&&d&&this.direction==="right"&&(m=-100):(f&&d&&this.direction==="left"&&(m=-100),u&&d&&this.direction==="right"&&(m=100)),m}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(e){var n=this.state,r=n.currentIndex,i=n.currentSlideOffset,o=n.slideStyle,s=this.props,a=s.infinite,c=s.items,u=s.useTranslate3D,f=s.isRTL,d=s.slideVertically,m=-100*r,x=c.length-1,v=(m+100*e)*(f?-1:1)+i;a&&c.length>2&&(r===0&&e===x?v=-100*(f?-1:1)+i:r===x&&e===0&&(v=100*(f?-1:1)+i)),a&&c.length===2&&(v=this.getTranslateXForTwoSlide(e));var h=d?"translate(0, ".concat(v,"%)"):"translate(".concat(v,"%, 0)");return u&&(h=d?"translate3d(0, ".concat(v,"%, 0)"):"translate3d(".concat(v,"%, 0, 0)")),Zn({display:this.isSlideVisible(e)?"inherit":"none",WebkitTransform:h,MozTransform:h,msTransform:h,OTransform:h,transform:h},o)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var e,n=this.props,r=n.useTranslate3D,i=n.isRTL,o=this.state,s=o.thumbsTranslate,a=o.thumbsStyle,c=i?-1*s:s;return this.isThumbnailVertical()?(e="translate(0, ".concat(s,"px)"),r&&(e="translate3d(0, ".concat(s,"px, 0)"))):(e="translate(".concat(c,"px, 0)"),r&&(e="translate3d(".concat(c,"px, 0, 0)"))),Zn({WebkitTransform:e,MozTransform:e,msTransform:e,OTransform:e,transform:e},a)}},{key:"getSlideItems",value:function(){var e=this,n=this.state.currentIndex,r=this.props,i=r.items,o=r.slideOnThumbnailOver,s=r.onClick,a=r.lazyLoad,c=r.onTouchMove,u=r.onTouchEnd,f=r.onTouchStart,d=r.onMouseOver,m=r.onMouseLeave,x=r.renderItem,v=r.renderThumbInner,h=r.showThumbnails,g=r.showBullets,b=[],p=[],w=[];return i.forEach((function(j,I){var O=e.getAlignmentClassName(I),P=j.originalClass?" ".concat(j.originalClass):"",_=j.thumbnailClass?" ".concat(j.thumbnailClass):"",L=j.renderItem||x||e.renderItem,E=j.renderThumbInner||v||e.renderThumbInner,A=!a||O||e.lazyLoaded[I];A&&a&&!e.lazyLoaded[I]&&(e.lazyLoaded[I]=!0);var W=e.getSlideStyle(I),U=k.default.createElement("div",{"aria-label":"Go to Slide ".concat(I+1),key:"slide-".concat(I),tabIndex:"-1",className:"image-gallery-slide ".concat(O," ").concat(P),style:W,onClick:s,onKeyUp:e.handleSlideKeyUp,onTouchMove:c,onTouchEnd:u,onTouchStart:f,onMouseOver:d,onFocus:d,onMouseLeave:m,role:"button"},A?L(j):k.default.createElement("div",{style:{height:"100%"}}));if(b.push(U),h&&j.thumbnail){var N=ce("image-gallery-thumbnail",_,{active:n===I});p.push(k.default.createElement("button",{key:"thumbnail-".concat(I),type:"button",tabIndex:"0","aria-pressed":n===I?"true":"false","aria-label":"Go to Slide ".concat(I+1),className:N,onMouseLeave:o?e.onThumbnailMouseLeave:null,onMouseOver:function(S){return e.handleThumbnailMouseOver(S,I)},onFocus:function(S){return e.handleThumbnailMouseOver(S,I)},onKeyUp:function(S){return e.handleThumbnailKeyUp(S,I)},onClick:function(S){return e.onThumbnailClick(S,I)}},E(j)))}if(g){var V=ce("image-gallery-bullet",j.bulletClass,{active:n===I});w.push(k.default.createElement("button",{type:"button",key:"bullet-".concat(I),className:V,onClick:function(S){return e.onBulletClick(S,I)},"aria-pressed":n===I?"true":"false","aria-label":"Go to Slide ".concat(I+1)}))}})),{slides:b,thumbnails:p,bullets:w}}},{key:"ignoreIsTransitioning",value:function(){var e=this.props.items,n=this.state,r=n.previousIndex,i=n.currentIndex,o=e.length-1;return Math.abs(r-i)>1&&!(r===0&&i===o)&&!(r===o&&i===0)}},{key:"isFirstOrLastSlide",value:function(e){return e===this.props.items.length-1||e===0}},{key:"slideIsTransitioning",value:function(e){var n=this.state,r=n.isTransitioning,i=n.previousIndex,o=n.currentIndex;return r&&!(e===i||e===o)}},{key:"isSlideVisible",value:function(e){return!this.slideIsTransitioning(e)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(e)}},{key:"slideThumbnailBar",value:function(){var e=this.state,n=e.currentIndex,r=e.isSwipingThumbnail,i=-this.getThumbsTranslate(n);r||(n===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:i,thumbsSwipedTranslate:i}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){var e=this.props,n=e.infinite,r=e.isRTL;return n||(r?this.canSlideNext():this.canSlidePrevious())}},{key:"canSlideRight",value:function(){var e=this.props,n=e.infinite,r=e.isRTL;return n||(r?this.canSlidePrevious():this.canSlideNext())}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(e){var n=e.event,r=e.absX,i=e.absY,o=e.dir,s=this.props,a=s.disableSwipe,c=s.stopPropagation,u=s.swipingTransitionDuration,f=this.state,d=f.galleryWidth,m=f.galleryHeight,x=f.isTransitioning,v=f.swipingUpDown,h=f.swipingLeftRight,g=this.props.slideVertically;if((o!==re&&o!==ie&&!v||h||(v||this.setState({swipingUpDown:!0}),g))&&(o!==te&&o!==ne||h||this.setState({swipingLeftRight:!0}),!a))if(c&&n.preventDefault(),x)this.setState({currentSlideOffset:0});else{if((o===te||o===ne)&&g||(o===re||o===ie)&&!g)return;var b=ge(ge(ge(ge({},te,-1),ne,1),re,-1),ie,1)[o],p=r/d*100;g&&(p=i/m*100),Math.abs(p)>=100&&(p=100);var w={transition:"transform ".concat(u,"ms ease-out")};this.setState({currentSlideOffset:b*p,slideStyle:w})}}},{key:"handleThumbnailSwiping",value:function(e){var n=e.event,r=e.absX,i=e.absY,o=e.dir,s=this.props,a=s.stopPropagation,c=s.swipingThumbnailTransitionDuration,u=this.state,f=u.thumbsSwipedTranslate,d=u.thumbnailsWrapperHeight,m=u.thumbnailsWrapperWidth,x=u.swipingUpDown,v=u.swipingLeftRight;if(this.isThumbnailVertical()){if((o===te||o===ne||v)&&!x)return void(v||this.setState({swipingLeftRight:!0}));o!==re&&o!==ie||x||this.setState({swipingUpDown:!0})}else{if((o===re||o===ie||x)&&!v)return void(x||this.setState({swipingUpDown:!0}));o!==te&&o!==ne||v||this.setState({swipingLeftRight:!0})}var h,g,b,p,w,j=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(h=f+(o===ie?i:-i),g=j.scrollHeight-d+20,b=Math.abs(h)>g,p=h>20,w=j.scrollHeight<=d):(h=f+(o===ne?r:-r),g=j.scrollWidth-m+20,b=Math.abs(h)>g,p=h>20,w=j.scrollWidth<=m),!w&&(o!==te&&o!==re||!b)&&(o!==ne&&o!==ie||!p)){a&&n.stopPropagation();var I={transition:"transform ".concat(c,"ms ease-out")};this.setState({thumbsTranslate:h,thumbsStyle:I})}}},{key:"handleOnThumbnailSwiped",value:function(){var e=this.state.thumbsTranslate,n=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:e,thumbsStyle:{transition:"all ".concat(n,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var e=this.state.currentSlideOffset,n=this.props.swipeThreshold;return Math.abs(e)>n}},{key:"resetSwipingDirection",value:function(){var e=this.state,n=e.swipingUpDown,r=e.swipingLeftRight;n&&this.setState({swipingUpDown:!1}),r&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(e){var n=e.event,r=e.dir,i=e.velocity,o=this.props,s=o.disableSwipe,a=o.stopPropagation,c=o.flickThreshold,u=this.props.slideVertically;if(!s){var f=this.props.isRTL;a&&n.stopPropagation(),this.resetSwipingDirection();var d=(r===te?1:-1)*(f?-1:1);u&&(d=r===re?1:-1);var m=u?i>c&&!(r===te||r===ne):i>c&&!(r===re||r===ie);this.handleOnSwipedTo(d,m)}}},{key:"handleOnSwipedTo",value:function(e,n){var r=this.state,i=r.currentIndex,o=r.isTransitioning,s=i;!this.sufficientSwipe()&&!n||o||(s+=e),(e===-1&&!this.canSlideLeft()||e===1&&!this.canSlideRight())&&(s=i),this.unthrottledSlideToIndex(s)}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(e){var n=this.props,r=n.disableKeyDown,i=n.useBrowserFullscreen,o=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!r)switch(parseInt(e.keyCode||e.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(e);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(e);break;case 27:o&&!i&&this.exitFullScreen()}}},{key:"handleImageError",value:function(e){var n=this.props.onErrorImageURL;n&&e.target.src.indexOf(n)===-1&&(e.target.src=n)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var e=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth,galleryHeight:this.imageGallery.current.offsetHeight}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(e)))}},{key:"initSlideWrapperResizeObserver",value:function(e){var n=this;e&&!e.current||(this.resizeSlideWrapperObserver=new Bn(_t((function(r){r&&r.forEach((function(i){n.setState({thumbnailsWrapperWidth:i.contentRect.width},n.handleResize)}))}),50)),this.resizeSlideWrapperObserver.observe(e.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(e){var n=this;e&&!e.current||(this.resizeThumbnailWrapperObserver=new Bn(_t((function(r){r&&r.forEach((function(i){n.setState({thumbnailsWrapperHeight:i.contentRect.height},n.handleResize)}))}),50)),this.resizeThumbnailWrapperObserver.observe(e.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var e=this.props,n=e.onScreenChange,r=e.useBrowserFullscreen,i=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,o=this.imageGallery.current===i;n&&n(o),r&&this.setState({isFullscreen:o})}},{key:"slideToIndex",value:function(e,n){var r=this.state,i=r.currentIndex,o=r.isTransitioning,s=this.props,a=s.items,c=s.slideDuration,u=s.onBeforeSlide;if(!o){n&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var f=a.length-1,d=e;e<0?d=f:e>f&&(d=0),u&&d!==i&&u(d),this.setState({previousIndex:i,currentIndex:d,isTransitioning:d!==i,currentSlideOffset:0,slideStyle:{transition:"all ".concat(c,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(e){var n=this.props.isRTL;this.slideTo(e,n?"right":"left")}},{key:"slideRight",value:function(e){var n=this.props.isRTL;this.slideTo(e,n?"left":"right")}},{key:"slideTo",value:function(e,n){var r=this.state,i=r.currentIndex,o=r.isTransitioning,s=this.props.items,a=i+(n==="left"?-1:1);o||(s.length===2?this.slideToIndexWithStyleReset(a,e):this.slideToIndex(a,e))}},{key:"slideToIndexWithStyleReset",value:function(e,n){var r=this,i=this.state,o=i.currentIndex,s=i.currentSlideOffset;this.setState({currentSlideOffset:s+(o>e?.001:-.001),slideStyle:{transition:"none"}},(function(){window.setTimeout((function(){return r.slideToIndex(e,n)}),25)}))}},{key:"handleThumbnailMouseOver",value:function(e,n){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(e,n)}},{key:"handleThumbnailKeyUp",value:function(e,n){tr(e)&&this.onThumbnailClick(e,n)}},{key:"handleSlideKeyUp",value:function(e){tr(e)&&(0,this.props.onClick)(e)}},{key:"isThumbnailVertical",value:function(){var e=this.props.thumbnailPosition;return e==="left"||e==="right"}},{key:"addScreenChangeEvent",value:function(){var e=this;er.forEach((function(n){document.addEventListener(n,e.handleScreenChange)}))}},{key:"removeScreenChangeEvent",value:function(){var e=this;er.forEach((function(n){document.removeEventListener(n,e.handleScreenChange)}))}},{key:"fullScreen",value:function(){var e=this.props.useBrowserFullscreen,n=this.imageGallery.current;e?n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var e=this.state.isFullscreen,n=this.props.useBrowserFullscreen;e&&(n?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var e=this.props.infinite,n=this.state.currentIndex;e||this.canSlideRight()?this.slideToIndex(n+1):this.pause()}},{key:"play",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.props,r=n.onPlay,i=n.slideInterval,o=n.slideDuration,s=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(i,o)),r&&e&&r(s))}},{key:"pause",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.props.onPause,r=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),n&&e&&n(r))}},{key:"isImageLoaded",value:function(e){return!!this.loadedImages[e.original]||(this.loadedImages[e.original]=!0,!1)}},{key:"handleImageLoaded",value:function(e,n){var r=this.props.onImageLoad;!this.loadedImages[n]&&r&&(this.loadedImages[n]=!0,r(e))}},{key:"renderItem",value:function(e){var n=this.state.isFullscreen,r=this.props.onImageError||this.handleImageError;return k.default.createElement(sa,{description:e.description,fullscreen:e.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:n,onImageError:r,original:e.original,originalAlt:e.originalAlt,originalHeight:e.originalHeight,originalWidth:e.originalWidth,originalTitle:e.originalTitle,sizes:e.sizes,loading:e.loading,srcSet:e.srcSet})}},{key:"renderThumbInner",value:function(e){var n=this.props.onThumbnailError||this.handleImageError;return k.default.createElement("span",{className:"image-gallery-thumbnail-inner"},k.default.createElement("img",{className:"image-gallery-thumbnail-image",src:e.thumbnail,height:e.thumbnailHeight,width:e.thumbnailWidth,alt:e.thumbnailAlt,title:e.thumbnailTitle,loading:e.thumbnailLoading,onError:n}),e.thumbnailLabel&&k.default.createElement("div",{className:"image-gallery-thumbnail-label"},e.thumbnailLabel))}},{key:"render",value:function(){var e=this.state,n=e.currentIndex,r=e.isFullscreen,i=e.modalFullscreen,o=e.isPlaying,s=this.props,a=s.additionalClass,c=s.disableThumbnailSwipe,u=s.indexSeparator,f=s.isRTL,d=s.items,m=s.thumbnailPosition,x=s.renderFullscreenButton,v=s.renderCustomControls,h=s.renderLeftNav,g=s.renderRightNav,b=s.renderTopNav,p=s.renderBottomNav,w=s.showBullets,j=s.showFullscreenButton,I=s.showIndex,O=s.showThumbnails,P=s.showNav,_=s.showPlayButton,L=s.slideVertically,E=s.renderPlayPauseButton,A=this.getThumbnailStyle(),W=this.getSlideItems(),U=W.slides,N=W.thumbnails,V=W.bullets,S=ce("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(m),{"image-gallery-rtl":f}),D=ce("image-gallery-bullets",{"image-gallery-bullets-vertical":L}),Q=k.default.createElement("div",{ref:this.imageGallerySlideWrapper,className:S},v&&v(),this.canSlide()?k.default.createElement(k.default.Fragment,null,P&&k.default.createElement(k.default.Fragment,null,L?b(this.slideLeft,!this.canSlideLeft()):h(this.slideLeft,!this.canSlideLeft()),L?p(this.slideRight,!this.canSlideRight()):g(this.slideRight,!this.canSlideRight())),k.default.createElement(Yn,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},k.default.createElement("div",{className:"image-gallery-slides"},U))):k.default.createElement("div",{className:"image-gallery-slides"},U),_&&E(this.togglePlay,o),w&&k.default.createElement("div",{className:D},k.default.createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},V)),j&&x(this.toggleFullScreen,r),I&&k.default.createElement("div",{className:"image-gallery-index"},k.default.createElement("span",{className:"image-gallery-index-current"},n+1),k.default.createElement("span",{className:"image-gallery-index-separator"},u),k.default.createElement("span",{className:"image-gallery-index-total"},d.length))),B=ce("image-gallery",a,{"fullscreen-modal":i}),X=ce("image-gallery-content",this.getThumbnailPositionClassName(m),{fullscreen:r}),Z=ce("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(m),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&f},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!c},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!c});return k.default.createElement("div",{ref:this.imageGallery,className:B,"aria-live":"polite"},k.default.createElement("div",{className:X},(m==="bottom"||m==="right")&&Q,O&&N.length>0?k.default.createElement(Yn,{className:Z,delta:0,onSwiping:!c&&this.handleThumbnailSwiping,onSwiped:!c&&this.handleOnThumbnailSwiped},k.default.createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},k.default.createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:A,"aria-label":"Thumbnail Navigation"},N))):null,(m==="top"||m==="left")&&Q))}}])})();Kt.propTypes={flickThreshold:y.number,items:(0,y.arrayOf)((0,y.shape)({bulletClass:y.string,bulletOnClick:y.func,description:y.string,original:y.string,originalHeight:y.number,originalWidth:y.number,loading:y.string,thumbnailHeight:y.number,thumbnailWidth:y.number,thumbnailLoading:y.string,fullscreen:y.string,originalAlt:y.string,originalTitle:y.string,thumbnail:y.string,thumbnailAlt:y.string,thumbnailLabel:y.string,thumbnailTitle:y.string,originalClass:y.string,thumbnailClass:y.string,renderItem:y.func,renderThumbInner:y.func,imageSet:va,srcSet:y.string,sizes:y.string})).isRequired,showNav:y.bool,autoPlay:y.bool,lazyLoad:y.bool,infinite:y.bool,showIndex:y.bool,showBullets:y.bool,showThumbnails:y.bool,showPlayButton:y.bool,showFullscreenButton:y.bool,disableThumbnailScroll:y.bool,disableKeyDown:y.bool,disableSwipe:y.bool,disableThumbnailSwipe:y.bool,useBrowserFullscreen:y.bool,onErrorImageURL:y.string,indexSeparator:y.string,thumbnailPosition:(0,y.oneOf)(["top","bottom","left","right"]),startIndex:y.number,slideDuration:y.number,slideInterval:y.number,slideOnThumbnailOver:y.bool,swipeThreshold:y.number,swipingTransitionDuration:y.number,swipingThumbnailTransitionDuration:y.number,onSlide:y.func,onBeforeSlide:y.func,onScreenChange:y.func,onPause:y.func,onPlay:y.func,onClick:y.func,onImageLoad:y.func,onImageError:y.func,onTouchMove:y.func,onTouchEnd:y.func,onTouchStart:y.func,onMouseOver:y.func,onMouseLeave:y.func,onBulletClick:y.func,onThumbnailError:y.func,onThumbnailClick:y.func,renderCustomControls:y.func,renderLeftNav:y.func,renderRightNav:y.func,renderTopNav:y.func,renderBottomNav:y.func,renderPlayPauseButton:y.func,renderFullscreenButton:y.func,renderItem:y.func,renderThumbInner:y.func,stopPropagation:y.bool,additionalClass:y.string,useTranslate3D:y.bool,isRTL:y.bool,useWindowKeyDown:y.bool,slideVertically:y.bool},Kt.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,slideVertically:!1,renderLeftNav:function(t,e){return k.default.createElement(da,{onClick:t,disabled:e})},renderRightNav:function(t,e){return k.default.createElement(fa,{onClick:t,disabled:e})},renderTopNav:function(t,e){return k.default.createElement(ga,{onClick:t,disabled:e})},renderBottomNav:function(t,e){return k.default.createElement(ya,{onClick:t,disabled:e})},renderPlayPauseButton:function(t,e){return k.default.createElement(ha,{onClick:t,isPlaying:e})},renderFullscreenButton:function(t,e){return k.default.createElement(ua,{onClick:t,isFullscreen:e})},useWindowKeyDown:!0};const xa=Kt;var wa=Ur.A;function Sa(){var t=new Map;function e(n){var r=n.root,i=n.rootMargin,o=n.threshold,s=t.get(r);s||(s=new Map,t.set(r,s));var a=JSON.stringify({rootMargin:i,threshold:o}),c=s.get(a);if(!c){var u=new Map,f=new IntersectionObserver(function(d){d.forEach(function(m){var x=u.get(m.target);x?.(m)})},{root:r,rootMargin:i,threshold:o});c={observer:f,entryCallbacks:u},s.set(a,c)}return{observe:function(m,x){var v,h;(v=c)==null||v.entryCallbacks.set(m,x),(h=c)==null||h.observer.observe(m)},unobserve:function(m){var x,v;(x=c)==null||x.entryCallbacks.delete(m),(v=c)==null||v.observer.unobserve(m)}}}return{getObserver:e}}var ka="0px",ja=[0],Ta=Sa();function Oa(t){var e,n,r=(e=t?.rootMargin)!=null?e:ka,i=(n=t?.threshold)!=null?n:ja,o=T.useRef(null),s=T.useRef(null),a=T.useRef(null),c=T.useState(),u=c[0],f=c[1],d=T.useCallback(function(){var h=o.current;if(!h){f(void 0);return}var g=Ta.getObserver({root:s.current,rootMargin:r,threshold:i});g.observe(h,function(b){f(b)}),a.current=g},[r,i]),m=T.useCallback(function(){var h=a.current,g=o.current;g&&h?.unobserve(g),a.current=null},[]),x=T.useCallback(function(h){m(),o.current=h,d()},[d,m]),v=T.useCallback(function(h){m(),s.current=h,d()},[d,m]);return[x,{entry:u,rootRef:v}]}function Ut(){return Ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ut.apply(this,arguments)}function Ca(t){var e,n=Oa(t),r=n[0],i=n[1],o=!!((e=i.entry)!=null&&e.isIntersecting),s=T.useState(o),a=s[0],c=s[1];return o&&!a&&c(!0),[r,Ut({},i,{isVisible:o,wasEverVisible:a})]}var Ea=100;function Ia(t){var e=t.loading,n=t.hasNextPage,r=t.onLoadMore,i=t.rootMargin,o=t.disabled,s=t.delayInMs,a=s===void 0?Ea:s,c=Ca({rootMargin:i}),u=c[0],f=c[1],d=f.rootRef,m=f.isVisible,x=!o&&!e&&m&&n;return T.useEffect(function(){if(x){var v=setTimeout(function(){r()},a);return function(){clearTimeout(v)}}},[r,x,a]),[u,{rootRef:d}]}const Ra={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'},Pa={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005.195v12.666c0 1.96-1.537 3.56-3.472 3.662l-.195.005H5.667a3.667 3.667 0 0 1-3.662-3.472L2 18.333V5.667c0-1.96 1.537-3.56 3.472-3.662L5.667 2h12.666zm-2.626 7.293a1 1 0 0 0-1.414 0L11 12.585l-1.293-1.292l-.094-.083a1 1 0 0 0-1.32 1.497l2 2l.094.083a1 1 0 0 0 1.32-.083l4-4l.083-.094a1 1 0 0 0-.083-1.32z"/></g>'},Ma={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>'};var ft=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function ht(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on".concat(e),function(){n(window.event)})}function ni(t,e){for(var n=e.slice(0,e.length-1),r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function ri(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");for(var e=t.split(","),n=e.lastIndexOf("");n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function _a(t,e){for(var n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,i=!0,o=0;o<n.length;o++)r.indexOf(n[o])===-1&&(i=!1);return i}var cn={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ft?173:189,"=":ft?61:187,";":ft?59:186,"'":222,"[":219,"]":221,"\\":220},le={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ht={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},$={16:!1,18:!1,17:!1,91:!1},F={};for(var Fe=1;Fe<20;Fe++)cn["f".concat(Fe)]=111+Fe;var z=[],nr=!1,ii="all",oi=[],it=function(e){return cn[e.toLowerCase()]||le[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function si(t){ii=t||"all"}function _e(){return ii||"all"}function La(){return z.slice(0)}function Da(t){var e=t.target||t.srcElement,n=e.tagName,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function za(t){return typeof t=="string"&&(t=it(t)),z.indexOf(t)!==-1}function Fa(t,e){var n,r;t||(t=_e());for(var i in F)if(Object.prototype.hasOwnProperty.call(F,i))for(n=F[i],r=0;r<n.length;)n[r].scope===t?n.splice(r,1):r++;_e()===t&&si(e||"all")}function Wa(t){var e=t.keyCode||t.which||t.charCode,n=z.indexOf(e);if(n>=0&&z.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&z.splice(0,z.length),(e===93||e===224)&&(e=91),e in $){$[e]=!1;for(var r in le)le[r]===e&&(G[r]=!1)}}function Na(t){if(typeof t>"u")Object.keys(F).forEach(function(s){return delete F[s]});else if(Array.isArray(t))t.forEach(function(s){s.key&&pt(s)});else if(typeof t=="object")t.key&&pt(t);else if(typeof t=="string"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n[0],o=n[1];typeof i=="function"&&(o=i,i=""),pt({key:t,scope:i,method:o,splitKey:"+"})}}var pt=function(e){var n=e.key,r=e.scope,i=e.method,o=e.splitKey,s=o===void 0?"+":o,a=ri(n);a.forEach(function(c){var u=c.split(s),f=u.length,d=u[f-1],m=d==="*"?"*":it(d);if(F[m]){r||(r=_e());var x=f>1?ni(le,u):[];F[m]=F[m].filter(function(v){var h=i?v.method===i:!0;return!(h&&v.scope===r&&_a(v.mods,x))})}})};function rr(t,e,n,r){if(e.element===r){var i;if(e.scope===n||e.scope==="all"){i=e.mods.length>0;for(var o in $)Object.prototype.hasOwnProperty.call($,o)&&(!$[o]&&e.mods.indexOf(+o)>-1||$[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!$[16]&&!$[18]&&!$[17]&&!$[91]||i||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}}function ir(t,e){var n=F["*"],r=t.keyCode||t.which||t.charCode;if(G.filter.call(this,t)){if((r===93||r===224)&&(r=91),z.indexOf(r)===-1&&r!==229&&z.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(v){var h=Ht[v];t[v]&&z.indexOf(h)===-1?z.push(h):!t[v]&&z.indexOf(h)>-1?z.splice(z.indexOf(h),1):v==="metaKey"&&t[v]&&z.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(z=z.slice(z.indexOf(h))))}),r in $){$[r]=!0;for(var i in le)le[i]===r&&(G[i]=!0);if(!n)return}for(var o in $)Object.prototype.hasOwnProperty.call($,o)&&($[o]=t[Ht[o]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(z.indexOf(17)===-1&&z.push(17),z.indexOf(18)===-1&&z.push(18),$[17]=!0,$[18]=!0);var s=_e();if(n)for(var a=0;a<n.length;a++)n[a].scope===s&&(t.type==="keydown"&&n[a].keydown||t.type==="keyup"&&n[a].keyup)&&rr(t,n[a],s,e);if(r in F){for(var c=0;c<F[r].length;c++)if((t.type==="keydown"&&F[r][c].keydown||t.type==="keyup"&&F[r][c].keyup)&&F[r][c].key){for(var u=F[r][c],f=u.splitKey,d=u.key.split(f),m=[],x=0;x<d.length;x++)m.push(it(d[x]));m.sort().join("")===z.sort().join("")&&rr(t,u,s,e)}}}}function Aa(t){return oi.indexOf(t)>-1}function G(t,e,n){z=[];var r=ri(t),i=[],o="all",s=document,a=0,c=!1,u=!0,f="+",d=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(s=e.element),e.keyup&&(c=e.keyup),e.keydown!==void 0&&(u=e.keydown),e.capture!==void 0&&(d=e.capture),typeof e.splitKey=="string"&&(f=e.splitKey)),typeof e=="string"&&(o=e);a<r.length;a++)t=r[a].split(f),i=[],t.length>1&&(i=ni(le,t)),t=t[t.length-1],t=t==="*"?"*":it(t),t in F||(F[t]=[]),F[t].push({keyup:c,keydown:u,scope:o,mods:i,shortcut:r[a],method:n,key:r[a],splitKey:f,element:s});typeof s<"u"&&!Aa(s)&&window&&(oi.push(s),ht(s,"keydown",function(m){ir(m,s)},d),nr||(nr=!0,ht(window,"focus",function(){z=[]},d)),ht(s,"keyup",function(m){ir(m,s),Wa(m)},d))}function Ba(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(F).forEach(function(n){var r=F[n].find(function(i){return i.scope===e&&i.shortcut===t});r&&r.method&&r.method()})}var mt={setScope:si,getScope:_e,deleteScope:Fa,getPressedKeyCodes:La,isPressed:za,filter:Da,trigger:Ba,unbind:Na,keyMap:cn,modifier:le,modifierMap:Ht};for(var gt in mt)Object.prototype.hasOwnProperty.call(mt,gt)&&(G[gt]=mt[gt]);if(typeof window<"u"){var $a=window.hotkeys;G.noConflict=function(t){return t&&window.hotkeys===G&&(window.hotkeys=$a),G},window.hotkeys=G}G.filter=function(){return!0};var ai=function(e,n){var r=e.target,i=r&&r.tagName;return!!(i&&n&&n.includes(i))},Va=function(e){return ai(e,["INPUT","TEXTAREA","SELECT"])};function Ka(t,e,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},o=i.enableOnTags,s=i.filter,a=i.keyup,c=i.keydown,u=i.filterPreventDefault,f=u===void 0?!0:u,d=i.enabled,m=d===void 0?!0:d,x=i.enableOnContentEditable,v=x===void 0?!1:x,h=T.useRef(null),g=T.useCallback(function(b,p){var w,j;return s&&!s(b)?!f:Va(b)&&!ai(b,o)||(w=b.target)!=null&&w.isContentEditable&&!v?!0:h.current===null||document.activeElement===h.current||(j=h.current)!=null&&j.contains(document.activeElement)?(e(b,p),!0):!1},r?[h,o,s].concat(r):[h,o,s]);return T.useEffect(function(){if(!m){G.unbind(t,g);return}return a&&c!==!0&&(n.keydown=!1),G(t,n||{},g),function(){return G.unbind(t,g)}},[g,t,m]),h}G.isPressed;const or="ABTWallet",yt="ArcSphere";function sr(t,e){return new RegExp(`${e}/(?<version>[0-9.]+)`,"g").exec(t)?.groups?.version}function Ua(){const t=window?.navigator?.userAgent,[e]=T.useState({wallet:t.indexOf(or)>-1||t.indexOf(yt)>-1,walletVersion:sr(t,or),arcSphere:t.indexOf(yt)>-1,arcSphereVersion:sr(t,yt),wechat:/MicroMessenger/i.test(t),mobile:{apple:{phone:!1,ipod:!1,tablet:!1,device:!1},amazon:{phone:!1,tablet:!1,device:!1},android:{phone:!1,tablet:!1,device:!1},windows:{phone:!1,tablet:!1,device:!1},other:{blackberry:!1,blackberry10:!1,opera:!1,firefox:!1,chrome:!1,device:!1},phone:!1,tablet:!1,any:!1,...wi(t)}});return e}const li=T.createContext({open:!1,toggleOpen:t=>{}});function Ha({children:t}){const[e,n]=T.useState(!1),r=o=>{n(o??!o)},i=T.useMemo(()=>({open:e,toggleOpen:r}),[e]);return l.jsx(li.Provider,{value:i,children:t})}function un(){return T.useContext(li)}const J={nameAsc:"title",nameDesc:"title",popularity:"stats.downloads",publishAt:"lastPublishedAt",mobilePageSize:10,pageSize:18,currentPage:1,defaultCurrentPage:1,blockletsPath:"/api/v2/blocklets.json",categoriesPath:"/api/blocklets/categories",explorePath:"/api/blocklets/explore",exploreDidsPath:"/api/blocklets/dids",cacheSize:100},qa=t=>tt(async()=>{const{data:e}=await t.get(J.categoriesPath);return Array.isArray(e)?e:[]},{manual:!0});function Ga(t,e){const n=t.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...Oi(t,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...t,menu:void 0},{onFilterChange:r,onSearchSelect:i=a=>{e.onFilterChange({...n,keyword:a.title})},emptyCategory:o}=e;!n.category&&!o&&(n.category="All");const s=a=>{const c={...n,...a};r(ot(c,u=>u===""||u===void 0))};return{filters:t,cleanFilter:a=>{const c=a?ot(n,(u,f)=>a.includes(f)):{};r(ot(c,u=>u===""||u===void 0))},handleActiveMenu:a=>{a!==t.menu&&r({menu:a})},handleSort:(a,c)=>{s({sortBy:a,sortDirection:c||a==="nameAsc"?"asc":"desc"})},handleKeyword:a=>{s({category:void 0,keyword:a||void 0})},handlePrice:a=>{s({price:a===t.price?void 0:a})},handleCategory:a=>{s({category:a===t.category?"":a})},handleDeveloper:a=>{s({owner:a||void 0})},handlePage:a=>{s({currentPage:a})},handleSwitchIsOfficial:a=>{s({isOfficial:a==="true"?"true":""})},handleSwitchShowResources:a=>{s({showResources:a})},handleSearchSelect:a=>{i(a)}}}const Qa=(t,e,n)=>t&&e||!n,ci=t=>[{name:t("sort.popularity"),value:"popularity"},{name:t("sort.lastPublished"),value:"publishAt"}],ui=(t,e,n)=>{const r=Pi(t),i=Mi(r.search);if(_i(t)?.endsWith(".gif"))return i.imageFilter?Li({...r,search:""}):t;if(i.imageFilter)return t;const o=n||window.blocklet?.version,{w:s,h:a}=typeof e=="object"?{w:e.w,h:e.h}:{w:e,h:e};return Jt(t,{...s||a?{imageFilter:"resize",w:s,h:a}:{},v:o})},Xa=t=>[{name:t("blocklet.free"),value:"free"},{name:t("blocklet.payment"),value:"payment"}],Ya=(t=[],e="en")=>t.map(n=>({name:n.locales[e]||n.locales.en,value:n._id})),Ja=t=>Array.isArray(t)?t.map(e=>e.message).join(`
2
+ `):t.response?.data?.error?t.response.data.error.message||t.response.data.error:t.message||t,Za=(t,e)=>t?.replace(/{(\w*)}/g,(n,r)=>e.hasOwnProperty(r)?e[r]:""),el=()=>window.innerWidth<=600,tl={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",official:"Official Blocklets",price:"Price",category:"Category",categories:"Categories",resourceType:"Resource Type",clear:"Clear",cancel:"Cancel",search:"Search",fetchError:"Failed to fetch data, please try again later",searchPlaceholder:"Search blocklet"},explore:{title:"Explore",trending:"Trending",topRated:"Top Rated",recentlyUpdated:"Recently Updated",viewDetail:"View Details"},sort:{sort:"Sort",rating:"Rating",popularity:"Most Popular",lastPublished:"Latest Published"},category:{all:"All",placeholder:"Category name",helperText:"Please select a category"},blocklet:{noResults:"No blocklet found.",free:"Free",search:'Results for "{keyword}"',authorTag:"Blocklet by {name}",resourceTag:"Extensions for {name}",resultCount:"{count} Blocklets",emptyTip:"Tips:",filterTip:"Appropriately reduce the filter conditions",keywordTip:"Try other keywords",owner:"Blocklets from {name}",noBlockletPart1:'No Blocklets associated with"',noBlockletPart2:'"were found',noCategoryResults1:'No "',noCategoryResults2:'" Blocklets'},autocomplete:{expandResult:'View all search results for "{name}"'}},nl={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",official:"官方 Blocklet",price:"价格",category:"类别",categories:"类别",resourceType:"资源类型",clear:"清除",cancel:"取消",search:"搜索",fetchError:"获取数据失败, 请稍后再试",searchPlaceholder:"搜索 Blocklet"},explore:{title:"探索",trending:"趋势",topRated:"评分最高",recentlyUpdated:"最近更新",viewDetail:"查看详情"},sort:{sort:"排序",rating:"评分",popularity:"最热门",lastPublished:"最新发布"},category:{all:"全部",placeholder:"分类名称",helperText:"请选择分类"},blocklet:{noResults:"未搜索到 Blocklet",free:"免费",search:'搜索 "{keyword}" 的结果',authorTag:"{name} 的 Blocklet",resourceTag:"{name} 的拓展",resultCount:"{count} 个 Blocklet",emptyTip:"建议:",filterTip:"适当减少筛选条件",keywordTip:"尝试其他关键字",owner:"来自 {name} 的 Blocklets",noBlockletPart1:'没有找到与"',noBlockletPart2:'"相关的 Blocklets',noCategoryResults1:'无 "',noCategoryResults2:'" 类别的 Blocklets'},autocomplete:{expandResult:"查看 “{name}” 的所有搜索结果"}},bt={en:pn(tl),zh:pn(nl)},di=(t,e)=>{const n={};return t&&(n["x-blocklet-server-version"]=t),e&&(n["x-blocklet-store-version"]=e),n},rl=t=>(e,n)=>{const r=bt[t]?bt[t][e]:bt.en[e];return Za(r,n)||e},fi={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},compact:!1,endpoint:"",wrapChildren:()=>null,t:t=>t,storeVersion:"",minItemWidth:350,serverVersion:"",layout:{},selectedCategory:void 0,categoryList:[],blockletRender:()=>null,locale:"en",categoryOptions:[],priceOptions:[],storeApi:null,baseSearch:!1,showResourcesSwitch:!1,showCategory:!1,tagFilters:[],developerName:"",onFilterChange:()=>{},updateDeveloperName:()=>{},getCategoryLocale:()=>null,search:{filters:{},cleanFilter:()=>{},handleActiveMenu:()=>{},handleSort:()=>{},handleKeyword:()=>{},handlePrice:()=>{},handleCategory:()=>{},handleDeveloper:()=>{},handleSwitchShowResources:()=>{},handleSwitchIsOfficial:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},hi=T.createContext(fi),{Provider:il,Consumer:ic}=hi;function ol(t){const{locale:e="zh",filters:n={},serverVersion:r="",onFilterChange:i=()=>{},minItemWidth:o=350,queryFilter:s=!0,layout:a={},wrapChildren:c=B=>B,extraFilter:u=B=>B,baseSearch:f=!1,fetchCategoryDelay:d=0,showResourcesSwitch:m=!1,showCategory:x=!0,tagFilters:v=[],children:h,storeVersion:g,onSearchSelect:b=()=>{},endpoint:p,blockletRender:w,compact:j=!1}=t,I=di(r,g),O=T.useMemo(()=>pr({baseURL:p,headers:I}),[p]),P=Ga(n,{onFilterChange:i,emptyCategory:!a.showExplore,onSearchSelect:b}),[_,L]=T.useState(""),{data:E=[],error:A,loading:W,run:U}=qa(O),N=T.useMemo(()=>{const B=po(E,[Z=>Z.name],["asc"]),X=B.findIndex(Z=>Z.name==="All"||Z.locales.en==="All");return X>-1?[{...B[X],_id:"All"},...B.slice(0,X),...B.slice(X+1)]:B},[E]),V=T.useCallback(rl(e),[e]),S=T.useMemo(()=>Ya(N,e),[N,e]),D=Xa(V),Q={search:P,compact:j,errors:{fetchCategoriesError:A},loadings:{fetchCategoriesLoading:W},extraFilter:u,endpoint:p,queryFilter:s,layout:{showExplore:a.showExplore??!1,showCategory:a.showCategory??!0,showTitle:a.showTitle??!0,showSearch:a.showSearch??!0},minItemWidth:o,wrapChildren:c,t:V,storeVersion:g,serverVersion:r,selectedCategory:P.filters.category||(a.showExplore?"":"All"),categoryList:N,blockletRender:w,locale:e,categoryOptions:S,priceOptions:D,storeApi:O,baseSearch:f,showResourcesSwitch:m,showCategory:x,tagFilters:v,onFilterChange:i,getCategoryLocale:B=>{if(!B)return null;const X=E.find(Z=>Z._id===B||Z.locales.en==="All");return X?X.locales[e]||X.locales.en:null},get developerName(){return _},updateDeveloperName:L};return T.useEffect(()=>{setTimeout(U,d||0)},[p,U,d]),l.jsx(il,{value:Q,children:h})}function q(){return T.useContext(hi)||fi}function pi({children:t,onClick:e,size:n=32,...r}){return l.jsx(Y,{...r,onClick:e,variant:"outlined",sx:[{minWidth:n,height:n,p:0,borderColor:"divider","&:hover":{borderColor:"divider"},borderRadius:2,color:"text.secondary"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:t})}function We(t,e){return t===void 0?e:t}function dn({xs:t=void 0,sm:e=void 0,md:n=void 0,lg:r=void 0,xl:i=void 0,exact:o=!1}){const s=fe(),a=ye(s.breakpoints.down("sm")),c=ye(s.breakpoints.between("sm","md")),u=ye(s.breakpoints.between("md","lg")),f=ye(s.breakpoints.between("lg","xl"));if(o)return a?t||null:c?e||null:u?n||null:f?r||null:i||null;let d=t;return a||(d=We(e,d),c)||(d=We(n,d),u)||(d=We(r,d),f)?d:We(i,d)}function sl({children:t}){const{open:e,toggleOpen:n}=un();return l.jsx(dn,{xs:l.jsx(Ii,{open:e,onClose:()=>n(!1),children:t}),md:l.jsx(R,{children:t})})}function al({loading:t=!1,disabled:e,...n}){return l.jsx(Y,{disableElevation:!0,disabled:e||t===!0,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:t&&l.jsx(ee,{size:"1em"})})}function qt({value:t,options:e,onChange:n,placeholder:r="",...i}){const o=T.useRef(null),s=fe(),[a,c]=T.useState(!1),[u,f]=T.useState(t!==null?t:""),d=ye(s.breakpoints.down("sm"));T.useEffect(()=>{f(t!==null?t:"")},[t]);const m=T.useCallback(()=>{c(!1)},[]),x=T.useCallback(()=>{c(!0)},[]);function v(g){f(g.value),n(g.value),d&&m()}function h(g){return g===u}return l.jsxs(l.Fragment,{children:[l.jsxs(ll,{ref:o,onClick:x,variant:"outlined",size:"medium",className:["my-select__selector",zi(u)?"":"my-select__selector--active"].join(" "),sx:{minWidth:{xs:"100px",md:"auto"},color:"text.primary",borderRadius:"8px"},...i,children:[e.find(g=>g.value===u)?.name||r,l.jsx(Di,{className:"my-select__arrowdown",component:jo,sx:{width:18,height:18}})]}),l.jsx(Fi,{open:a,anchorEl:o.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:g,placement:b})=>l.jsx(Wi,{...g,style:{transformOrigin:b==="bottom"?"center top":"center bottom"},children:l.jsx(Ni,{children:l.jsx(Ai,{onClickAway:m,children:l.jsx(cl,{autoFocusItem:a,onMouseEnter:x,onMouseLeave:m,children:e.map(p=>l.jsxs(Ke,{onClick:()=>v(p),sx:{fontSize:14},children:[l.jsx(Bi,{sx:{mr:1,fontSize:16,visibility:h(p.value)?"visible":"hidden"}}),p.name]},p.value))})})})})})]})}const ll=he(al)`
3
+ border: 1px solid ${t=>t.theme.palette.divider};
4
+ padding: 6px 8px 6px 12px;
5
+ font-weight: ${t=>t.theme.typography.fontWeightRegular};
6
+ font-size: 14px;
7
+ color: ${t=>t.theme.palette.text.secondary};
8
+ line-height: 1;
9
+ text-transform: none;
10
+ & + & {
11
+ margin-left: 10px;
12
+ }
13
+ .my-select__arrowdown {
14
+ color: ${t=>t.theme.palette.grey[400]};
15
+ font-size: 14px;
16
+ margin-left: 6px;
17
+ }
18
+ .my-select__icon {
19
+ font-size: 0;
20
+ svg {
21
+ color: ${t=>t.theme.palette.grey[400]};
22
+ font-size: 18px;
23
+ margin-right: 3px;
24
+ }
25
+ }
26
+ `,cl=he(br)`
27
+ .my-select__option__icon {
28
+ color: transparent;
29
+ font-size: 14px;
30
+ margin: 0 3px 0 -5px;
31
+ }
32
+ .my-select__option {
33
+ font-size: 14px;
34
+ color: #999;
35
+ }
36
+ .my-select__option--active {
37
+ &,
38
+ .my-select__option__icon {
39
+ color: ${t=>t.theme.palette.primary.main};
40
+ }
41
+ }
42
+ `;function mi(){const{search:t,t:e}=q(),{filters:n,handleSort:r,handlePrice:i}=t,o=ci(e);return l.jsxs(H,{direction:{xs:"row",md:"column"},sx:{alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between"},children:[l.jsx(xr,{control:l.jsx(wr,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.hint"}},onChange:s=>i(s.target.checked?"free":"")}),label:e("blocklet.free")}),l.jsx(qt,{value:n.sortBy||o[0].value,options:o,onChange:s=>r(s),placeholder:e("sort.sort")})]})}function ul({menus:t=[]}){const{selectedCategory:e,search:n,t:r,categoryOptions:i,loadings:o,layout:s,baseSearch:a,compact:c}=q(),{filters:u,handleActiveMenu:f,handleCategory:d,cleanFilter:m}=n,{toggleOpen:x}=un();T.useEffect(()=>{x(!1)},[Object.values(u).join("")]);const v=Qa(a,s.showSearch,u.keyword);return s.showCategory&&!c?l.jsxs(sl,{children:[l.jsx(dn,{xs:l.jsxs(H,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[l.jsx(pi,{onClick:()=>x(!1),children:l.jsx(mr,{})}),l.jsx(M,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),l.jsx(H,{visibility:o.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:v?l.jsxs(l.Fragment,{children:[s.showExplore&&l.jsxs(R,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[l.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[l.jsx(oe,{icon:Co,width:20,height:20}),l.jsx(M,{variant:"body1",color:!e&&!u.menu?"text.primary":"grey.400",fontWeight:!e&&!u.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),m()},children:r("explore.title")})]}),t.map(h=>l.jsxs(R,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof h.icon=="string"?l.jsx(oe,{icon:h.icon,width:20,height:20}):h.icon,l.jsx(M,{variant:"body1",color:u.menu===h.key?"text.primary":"grey.400",fontWeight:u.menu===h.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),f(h.key),h.onClick?.()},children:h.title})]},h.key))]}),!!i.length&&l.jsx(H,{gap:2,children:i.map(h=>l.jsx(M,{variant:"body1",title:h.name,sx:{cursor:"pointer"},"data-cy":"filter",color:e===h.value?"text.primary":"grey.400",textTransform:"capitalize",onClick:()=>{e===h.value?m():d(h.value),x(!1)},children:h.name},h.value))})]}):l.jsx(mi,{})})]}):null}function fn(){const{endpoint:t,serverVersion:e,storeVersion:n}=q(),r=di(e,n),i=T.useMemo(()=>pr({baseURL:t,headers:r}),[t]);return{get:async o=>{const{data:s}=await i.get(o);return s},post:async(o,s)=>{const{data:a}=await i.post(o,s);return a}}}const gi=T.memo(function(t){return l.jsx(R,{...t,sx:[{height:60,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(t.sx)?t.sx:[t.sx]],children:l.jsx(ee,{})})});function ar({icon:t=null,children:e=null,maxWidth:n=100,title:r=""}){return(e===0||e)&&l.jsxs(H,{direction:"row",sx:{alignItems:"center",gap:1,maxWidth:n,overflow:"hidden"},children:[t,l.jsx(M,{variant:"body2",title:r||(typeof e=="string"?e:void 0),sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})]})}const dl=16/9,vt=292,Gt=189,Ze=336;function fl(){const{t,search:e}=q(),{get:n}=fn(),r=fe(),i=ye(r.breakpoints.down("md")),o=window.blocklet?.preferences?.homeBanner||[],{data:s=[],error:a,loading:c}=tt(async()=>{const h=await n(Jt(J.blockletsPath,{didList:o.map(g=>g.did).join(",")}));return h?.dataList?o.map(g=>h.dataList.find(b=>b.did===g.did)):[]});a&&console.error("Get Banner Blocklets error:",a);const u={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.hint"};return!a&&o.length>0?l.jsxs(l.Fragment,{children:[l.jsx(M,{component:"h2",variant:"h2",sx:{mt:{xs:2,md:0},mb:3},children:t("explore.title")}),l.jsx(R,{sx:{height:{xs:"auto",md:vt},minHeight:vt,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden"},children:c?l.jsxs(R,{sx:{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center"},children:[l.jsx(ae,{variant:"rounded",height:Gt,width:Ze}),l.jsxs(R,{sx:{flex:1,height:"100%"},children:[l.jsx(ae,{variant:"text",height:50,width:100}),l.jsx(ae,{variant:"text",height:40,width:"100%"}),l.jsx(ae,{variant:"text",height:40,width:300}),l.jsxs(R,{sx:{display:"flex",gap:1,my:2},children:[l.jsx(ae,{variant:"circular",height:20,width:20}),l.jsx(ae,{variant:"text",height:20,width:50})]}),l.jsx(ae,{variant:"rounded",height:30,width:100})]})]}):l.jsx(wa,{showNav:!0,autoPlay:!0,slideDuration:i?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:h=>l.jsx(R,{onClick:h,sx:{display:{xs:"none",md:"block"}},children:l.jsx(co,{sx:{...u,left:5}})}),renderRightNav:h=>l.jsx(R,{onClick:h,sx:{display:{xs:"none",md:"block"}},children:l.jsx(uo,{sx:{...u,right:5}})}),items:o.map((h,g)=>({original:h.did,renderItem:()=>{const b=s[g]||{},p=h.cover||pl(h.did,b.screenshots?.[0]),w=ui(p,r.breakpoints.values.md*2);return l.jsxs(H,{direction:{xs:"column",md:"row"},onClick:()=>e.handleSearchSelect(b),sx:{height:{xs:"auto",md:vt},display:"flex",justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},gap:{xs:2,md:5},cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${w}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},children:[f(w),l.jsxs(H,{sx:{flex:1,height:"100%",gap:3},children:[l.jsxs(R,{sx:{flex:1},children:[d(h.name||b.title||h.name),m(h.desc||b.description)]}),b.did&&x(b,h.baseNum),v(b)]})]})}}))})})]}):null;function f(h){return l.jsx(R,{sx:{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:Ze}},children:l.jsx(ml,{url:h})})}function d(h){return l.jsx(M,{variant:"h2",sx:{width:"100%"},children:h})}function m(h){return l.jsx(M,{variant:"body2",sx:{color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:71,pt:1,display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:h})}function x(h,g=0){const{did:b,owner:p,stats:w}=h;return l.jsxs(R,{sx:{display:"flex",alignItems:"center",gap:2,color:"text.secondary"},children:[l.jsx(ar,{icon:l.jsx(Ue,{src:p.avatar,did:b,size:20,variant:"circle"}),children:p.fullName}),l.jsx(ar,{icon:l.jsx(oe,{icon:Kr}),title:`${w.downloads+g}`,children:hl(w.downloads+g)})]})}function v(h){return l.jsx(Y,{variant:"outlined",size:"small",onClick:()=>e.handleSearchSelect(h),sx:{width:"fit-content",textTransform:"none",borderRadius:1,borderColor:"grey.300","&:hover":{borderColor:"divider"}},children:t("explore.viewDetail")})}}const hl=t=>Number.isNaN(t)?0:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`,pl=(t,e)=>t&&e?`/assets/${t}/screenshots/${e}`:"";function ml({url:t}){const[e,n]=T.useState(!0);return l.jsxs(l.Fragment,{children:[e&&l.jsx(ae,{variant:"rectangular",sx:{width:{xs:"100%",md:Ze},height:{xs:"auto",md:Gt}}}),l.jsx(R,{component:"img",src:t,alt:"",onLoad:()=>n(!1),onError:()=>n(!1),sx:{display:e?"none":"block",width:{xs:"100%",md:Ze},height:{xs:"auto",md:Gt},borderRadius:2,border:1,borderColor:"divider",objectFit:"container",cursor:"pointer",aspectRatio:dl}})]})}function gl({title:t,blocklets:e}){const{blockletRender:n,serverVersion:r}=q();return l.jsxs(R,{sx:{mt:3},children:[l.jsx(M,{component:"h3",variant:"h3",sx:{mb:2},children:t}),l.jsx(mn,{container:!0,spacing:2,sx:{boxSizing:"border-box",maxWidth:"calc(100vw - 16px)"},children:e.map(i=>l.jsx(mn,{"data-blocklet-did":i.did,sx:{p:"2px"},size:{xs:12,md:6},children:l.jsx(R,{sx:{padding:"1px"},children:n({blocklet:i,blocklets:e,serverVersion:r})})},i.did))})]})}function yl(){const{get:t}=fn(),{t:e}=q(),{data:n=[],error:r,loading:i}=tt(async()=>{const o=await t(J.explorePath);return Array.isArray(o)?o:[]});return r?l.jsx(Yt,{error:new Error(`Failed to fetch blocklets from ${J.explorePath}`)}):i?l.jsx(gi,{mt:15}):l.jsxs(l.Fragment,{children:[l.jsx(fl,{}),n.map(o=>o.blocklets?.length>0?l.jsx(gl,{title:e(`explore.${o.type}`),blocklets:o.blocklets},o.type):null)]})}const xt="__FREE_TEXT__",lr="__NO_RESULT__",wt=40;function yi({endpoint:t,t:e,locale:n,filters:r,handleKeyword:i,handleSearchSelect:o,...s}){const a=T.useRef(null),c=T.useRef(!1),[u,f]=T.useState(!1),[d,m]=T.useState(""),[x,v]=T.useState(!1),h=fn(),[g,b]=T.useState(!1),p=s?.placeholder||e("common.searchStore"),w=async S=>{b(!0);const D=await h.get(ve(t,Jt(J.blockletsPath,S)));return b(!1),D.dataList||[]},{data:j,run:I}=tt(S=>S?w({sortBy:J.nameDesc,page:1,pageSize:10,keyword:S,showResources:"true"}):Promise.resolve([]),{manual:!0});T.useEffect(()=>{b(!0),I(r.keyword),m(r.keyword||"")},[r.keyword,I]),Ka("ctrl + k, command + k",S=>(S.stopPropagation(),S.preventDefault(),a.current?.querySelector("input")?.focus(),!1),{enableOnTags:["INPUT"]});const O=gr(S=>I(S),{wait:300}),P={name:xt,title:d,did:""};let _=[];return d&&(g?_=[P]:j?.length?_=[P,...j]:_=[{name:lr,title:e("blocklet.noResults"),did:""}]),l.jsxs(l.Fragment,{children:[l.jsxs(Ei,{fullScreen:!0,open:x,sx:{display:{md:"none"}},children:[l.jsxs(R,{sx:{p:2,pb:0,display:"flex",alignItems:"center",gap:2},children:[l.jsx(yr,{fullWidth:!0,sx:{bgcolor:"grey.50",px:1,py:.5,".MuiInputBase-input":{p:1},".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},autoFocus:!0,placeholder:p,className:"bl-autocomplete-input",value:d,onChange:S=>L(S.target.value),startAdornment:N(x),endAdornment:V()}),l.jsx(Y,{variant:"outlined",onClick:()=>{v(!1),m(r.keyword||"")},children:e("common.cancel")})]}),l.jsx(br,{sx:{p:.5},children:_.map(S=>W(S))})]}),l.jsx(R,{sx:{display:{sx:"block",md:"none"},paddingTop:1,opacity:.5},children:l.jsx(oe,{icon:st,style:{fontSize:22,color:"inherit"},onClick:()=>v(!0)})}),l.jsx(go,{ref:a,open:!!d&&u,size:"small",onOpen:()=>f(!0),onClose:(S,D)=>{f(!1),D==="selectOption"&&!c.current&&i(d)},onKeyDown:S=>{S.key==="Enter"&&!d&&E()},disableClearable:!0,inputValue:d,onInputChange:(S,D)=>L(D),isOptionEqualToValue:(S,D)=>S.name===D.name,getOptionLabel:S=>S.title,getOptionKey:S=>S.name,noOptionsText:e("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:S=>l.jsx(vr,{...S,InputProps:{...S.InputProps,autoFocus:!0,placeholder:p,className:"bl-autocomplete-input",value:d,startAdornment:N(u),endAdornment:V()}}),filterOptions:S=>S,...s,options:_,renderOption:(S,D)=>W(D),value:P,sx:[{bgcolor:"grey.50",borderRadius:"8px",overflow:"hidden",".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},...Array.isArray(s.sx)?s.sx:[s.sx]]})]});function L(S){b(!0),m(S),c.current=!1,O.run(S)}function E(){v(!1),m(""),L(""),i("")}function A(S){S?.did?(v(!1),c.current=!0,m(""),o(S)):S.name===xt&&(v(!1),i(d))}function W(S){return l.jsxs(Ke,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>A(S),children:[U(S),l.jsxs(M,{variant:"body1",children:[l.jsx(M,{sx:{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1},children:S.title}),l.jsx(M,{sx:{fontSize:"13px",color:"text.hint"},children:S.category?.locales?.[n||"en"]||""})]})]},S.did)}function U(S){if([xt,lr].includes(S.name))return l.jsx(R,{sx:{width:wt,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.hint",bgcolor:"grey.100",borderRadius:"8px"},children:l.jsx(oe,{icon:st,style:{fontSize:28}})});let D="";return S.logo&&(D=ve(t,"assets",S.did,ui(S.logo,wt,S.version))),l.jsx(Ue,{src:D,size:wt,style:{borderRadius:"8px",overflow:"hidden"}})}function N(S=!0){return l.jsx(R,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.hint"},children:S&&d&&g?l.jsx(ee,{color:"inherit",size:16}):l.jsx(oe,{icon:st,style:{fontSize:16,cursor:"default"}})})}function V(){return d?l.jsx(R,{sx:{display:"flex",alignItems:"center",color:"text.hint"},children:l.jsx(oe,{icon:Ma,style:{fontSize:20,cursor:"pointer",color:"inherit"},onClick:()=>E()})}):null}}function bl({placeholder:t,...e}){const{search:n,t:r}=q(),{filters:i,handleKeyword:o}=n,[s,a]=T.useState(i.keyword||""),c=gr(o,{wait:300}),u=m=>{const{value:x}=m.target;a(x),c.run(x)},f=()=>{a(""),o("")};T.useEffect(()=>{a(i.keyword||"")},[i.keyword]);const d=t||r("common.searchPlaceholder");return l.jsx(vl,{inputProps:{"data-cy":"search-blocklet"},startAdornment:l.jsx(yn,{position:"start",children:l.jsx(xl,{sx:{fontSize:18,ml:-.5}})}),onChange:u,placeholder:d,value:s,title:d,"data-cy":"search",endAdornment:s&&l.jsx(yn,{position:"end",children:l.jsx(wl,{"data-cy":"search-delete",onClick:f})}),...e})}const vl=he(yr)`
43
+ background-color: ${t=>t.theme.palette.grey[50]};
44
+ font-size: 14px;
45
+ border-radius: 6px;
46
+ width: 100%;
47
+ .MuiInputBase-input {
48
+ padding: 8px 0 8px 0px;
49
+ }
50
+ .MuiOutlinedInput-notchedOutline {
51
+ border: none;
52
+ }
53
+ .Mui-focused {
54
+ background-color: #f6f6f6;
55
+ .MuiInputBase-input::placeholder {
56
+ color: transparent;
57
+ }
58
+ }
59
+ `,xl=he(fo)`
60
+ color: ${t=>t.theme.palette.grey[500]};
61
+ `,wl=he(mr)`
62
+ color: ${t=>t.theme.palette.grey[500]};
63
+ font-size: 16px;
64
+ cursor: pointer;
65
+ `;function Sl(){const{search:t,t:e,endpoint:n,locale:r,getCategoryLocale:i,developerName:o,showResourcesSwitch:s,layout:a,baseSearch:c,categoryOptions:u,compact:f}=q(),{filters:d,handleSort:m,handlePrice:x,handleDeveloper:v,handleSwitchShowResources:h,cleanFilter:g,handleCategory:b,handleSwitchIsOfficial:p}=t,w=ci(e);return l.jsxs(H,{className:"filter-bar",direction:{xs:"column",md:"row"},spacing:{xs:1,md:0},sx:{position:"sticky",top:0,zIndex:1e3,alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,pt:{xs:2,md:0},px:0,pb:f?2:3,backgroundColor:"background.default"},children:[!f&&l.jsx(M,{variant:"h2",sx:{textTransform:"capitalize"},children:i(d.category)}),l.jsxs(H,{direction:"row",sx:{flex:1,alignItems:"center",flexWrap:{xs:"wrap",md:"nowrap"},width:"100%",justifyContent:{xs:"flex-start",md:"flex-end"},gap:2},children:[a.showSearch?l.jsx(R,{sx:{flex:1,flexBasis:{xs:"100%",md:"auto"}},children:c?l.jsx(bl,{}):l.jsx(yi,{locale:r,endpoint:n,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t:e,filters:t.filters,handleKeyword:t.handleKeyword,handleSearchSelect:t.handleSearchSelect})}):null,d.owner&&o&&l.jsx(gn,{label:e("blocklet.authorTag",{name:o}),size:"small",onDelete:()=>v("")}),d.resourceDid&&d.resourceBlocklet&&l.jsx(gn,{label:e("blocklet.resourceTag",{name:d.resourceBlocklet}),size:"small",onDelete:()=>g(["resourceDid","resourceBlocklet","showResources"])}),l.jsx(St,{checked:d.isOfficial==="true",onChange:j=>p(j?"true":"false"),label:e("common.official")}),s?l.jsx(St,{checked:d.showResources!=="false",onChange:j=>h(j?"true":"false"),label:e("common.showResources")}):null,l.jsx(St,{checked:d.price==="free",onChange:j=>x(j?"free":""),label:e("blocklet.free")}),f&&l.jsx(R,{children:l.jsx(qt,{value:d.category||u[0]?.value,options:u,placeholder:e("common.category"),onChange:j=>b(j)})}),l.jsx(qt,{value:d.sortBy||w[0].value,options:w,placeholder:e("sort.sort"),onChange:j=>m(j)})]})]})}function St({checked:t,onChange:e,label:n}){const r=fe();return l.jsx(xr,{sx:{m:0,p:0},className:"check-button",control:l.jsx(wr,{checked:t,icon:l.jsx(oe,{style:{padding:0,color:r.palette.text.secondary},icon:Ra}),checkedIcon:l.jsx(oe,{style:{padding:0,color:r.palette.primary.main},icon:Pa}),size:"large",sx:{p:0,mr:1},onChange:i=>e(i.target.checked)}),label:n})}function Ne({children:t}){return l.jsxs(R,{sx:{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.hint"},children:[l.jsx(ho,{}),t]})}function cr(){const{t}=q();return l.jsx(M,{style:{textAlign:"center"},variant:"subtitle2",children:t("blocklet.noResults")})}function kt({filterTip:t=!1,keywordTip:e=!1}){const{t:n,locale:r}=q(),i=()=>r==="zh"?"、":" , ";return l.jsxs(R,{sx:{mt:1,display:"flex"},children:[l.jsx(M,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),t&&l.jsx(M,{children:n("blocklet.filterTip")}),t&&e&&i(),e&&l.jsx(M,{children:n("blocklet.keywordTip")})]})}function jt({primaryStart:t,primaryEnd:e,filter:n}){return l.jsxs(M,{variant:"subtitle2",sx:{display:"flex",gap:.5,mx:.5},children:[l.jsx(M,{children:t}),l.jsx(M,{title:n,color:"primary",sx:{maxWidth:"30vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),l.jsxs(M,{children:[e," "]})]})}function kl(){const{t,search:e,getCategoryLocale:n,selectedCategory:r}=q(),{filters:i}=e,o=!!r||!!i.price;if(i.keyword&&o)return l.jsxs(Ne,{children:[l.jsx(jt,{primaryStart:t("blocklet.noBlockletPart1"),primaryEnd:t("blocklet.noBlockletPart2"),filter:i.keyword}),l.jsx(kt,{keywordTip:!0,filterTip:!0})]});if(i.keyword)return l.jsxs(Ne,{children:[l.jsx(jt,{primaryStart:t("blocklet.noBlockletPart1"),primaryEnd:t("blocklet.noBlockletPart2"),filter:i.keyword}),l.jsx(kt,{keywordTip:!0})]});if(o){const s=n(r);return l.jsxs(Ne,{children:[s?l.jsx(jt,{primaryStart:t("blocklet.noCategoryResults1"),primaryEnd:t("blocklet.noCategoryResults2"),filter:s}):l.jsx(cr,{}),l.jsx(kt,{filterTip:!0})]})}return l.jsx(Ne,{children:l.jsx(cr,{})})}const jl=(t,e,n,r)=>ao(async i=>{i||(n.currentPage=n.defaultCurrentPage);const{currentPage:o,pageSize:s}=n,a={...e,category:e.category==="All"?"":e.category,sortBy:J[e.sortBy],page:o,pageSize:s};r(null);const{data:c={}}=await t.get(J.blockletsPath,{params:a});return n.currentPage++,{page:o,pageSize:s,list:c?.dataList||[],total:c?.total||0}},{isNoMore:i=>i?i.page*i.pageSize>=i.total:!1,reloadDeps:[t,$i(e)],onError:r});function Tl(){const{storeApi:t,search:e,extraFilter:n,errors:r,updateDeveloperName:i}=q(),{filters:o}=e,s=Ri({currentPage:J.currentPage,pageSize:el()?J.mobilePageSize:J.pageSize,defaultCurrentPage:J.defaultCurrentPage}),[a,c]=T.useState(null),u=jl(t,o,s,c),f=T.useMemo(()=>n?n(u.data?.list||[]):u.data?.list||[],[u.data,n]);return T.useEffect(()=>{const d=f.find(m=>m.owner.did===o.owner);i(d?.owner.fullName||d?.author.name||"")},[o.owner,f,i]),{blocklets:f,fetchBlockletsError:a,loadMore:u.loadMore,hasNextPage:!u.noMore,total:u.data?.total||0,loadings:{fetchBlockletsLoading:u.loading,loadingMore:u.loadingMore},errors:{...r,fetchBlockletsError:a}}}function Ol(){const{t,search:e,endpoint:n,blockletRender:r,serverVersion:i,minItemWidth:o,layout:s,baseSearch:a,compact:c}=q(),{filters:u}=e,{blocklets:f,errors:d,loadMore:m,loadings:x,hasNextPage:v,total:h}=Tl(),[g]=Ia({loading:x.fetchBlockletsLoading||x.loadingMore,hasNextPage:v,onLoadMore:m});if(d.fetchBlockletsError){const j=new Error(`Failed to fetch blocklets from ${n}: ${Ja(d.fetchBlockletsError)}`);return l.jsx(Yt,{error:j})}const b=a&&s.showSearch||!u.keyword;return l.jsxs(l.Fragment,{children:[b?l.jsx(Sl,{}):l.jsxs(l.Fragment,{children:[l.jsx(dn,{xs:l.jsx(mi,{}),md:null}),w()]}),p(),!x.fetchBlockletsLoading&&v&&l.jsx(R,{ref:g,sx:{height:70,minHeight:70,display:"flex",justifyContent:"center",py:2,overflow:"hidden"},children:x.loadingMore?l.jsx(ee,{}):null})]});function p(){return x.fetchBlockletsLoading?l.jsx(gi,{mt:15}):f.length?l.jsx(R,{className:"blocklet-list",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${o}px, 1fr))`},p:"2px",rowGap:2,columnGap:c?0:2},children:f.map(j=>l.jsx(R,{"data-blocklet-did":j.did,sx:{minWidth:{xs:"100%",sm:o},maxWidth:"calc(100vw - 32px)"},children:r({blocklet:j,blocklets:f,serverVersion:i})},j.did))}):l.jsx(kl,{})}function w(){return l.jsxs(H,{direction:"row",className:"search-result-title",sx:{alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0}},children:[l.jsx(M,{variant:"h3",title:u.keyword,sx:{maxWidth:"50vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t("blocklet.search",{keyword:u.keyword})}),l.jsx(M,{variant:"body1",sx:{color:"text.hint",fontSize:13},children:t("blocklet.resultCount",{count:h})})]})}}function Cl(){const{t,selectedCategory:e,getCategoryLocale:n,locale:r,search:i}=q(),{toggleOpen:o}=un(),s=Ua().arcSphere,a=!!window.blocklet?.navigation?.some(c=>c.section==="bottomNavigation");return l.jsxs(R,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs(M,{variant:"body1",sx:{display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium"},children:[l.jsx(pi,{onClick:()=>o(!0),children:l.jsx(Ci,{})}),n(e)||t("common.category")]}),s&&a&&l.jsx(yi,{locale:r,endpoint:window.blocklet?.prefix||"/",sx:{display:{md:"block",xs:"none"},mr:1,width:"350px"},t,filters:i.filters,handleKeyword:i.handleKeyword,handleSearchSelect:i.handleSearchSelect})]})}function El({menus:t=[],children:e=void 0}){const{search:n,layout:r,compact:i}=q(),{filters:o}=n,s=T.useRef(null),a=o.category||o.keyword||o.price,c=t.find(u=>u.key===o.menu)?.key;return l.jsx(Ha,{children:l.jsxs(Ti,{FallbackComponent:Yt,children:[!i&&l.jsx(Cl,{}),l.jsxs(R,{ref:s,className:"list-container",sx:{display:"flex",height:"100%",pt:{xs:0,md:i?0:5}},children:[l.jsx(ul,{menus:t}),l.jsxs(H,{sx:[{height:"100%",position:"relative",flex:1},i?{overflowY:"auto",ml:-2,pr:1,pb:2}:{overflow:"visible"}],children:[c&&e?.(c),!c&&(r.showExplore&&!a?l.jsx(yl,{}):l.jsx(Ol,{}))]})]})]})})}function oc(t){const{menus:e,children:n,...r}=t,i=fe(),o=Si(ki({},i,{typography:{h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700}}));return l.jsx(ji,{theme:o,children:l.jsx(ol,{...r,children:l.jsx(El,{menus:e,children:n})})})}const sc={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"/><path d="M5 10h3v3H5zm3 0h3v3H8zm3 0h3v3h-3zM8 7h3v3H8zm3 0h3v3h-3zm0-3h3v3h-3zM4.571 18c1.5 0 2.047-.074 2.958-.78M10 16v.01"/></g>'},Il=(t,e)=>!e||!t?!0:bn.satisfies(bn.coerce(t),e);function Rl({children:t,serverVersion:e="",requirementVersion:n="",...r}){const{t:i}=pe();return Il(e,n)?t:l.jsx(Zt,{title:i("store.tooltip.upgradeServer",{serverVersion:e,version:n}),arrow:!0,children:l.jsx(M,{children:l.jsx(Y,{disabled:!0,variant:"outlined",...r,children:i("common.upgradeServer")})})})}Rl.propTypes={children:C.node.isRequired,serverVersion:C.string,requirementVersion:C.string};he("div")`
66
+ background-color: transparent !important;
67
+ & > :not(.Mui-disabled) {
68
+ position: relative;
69
+ z-index: 1;
70
+ &::before {
71
+ content: '';
72
+ position: absolute;
73
+ height: 100%;
74
+ width: 100%;
75
+ left: 0;
76
+ top: 0;
77
+ transition: opacity 0.3s;
78
+ }
79
+ &:hover::before {
80
+ opacity: 0;
81
+ }
82
+ &::after {
83
+ content: '';
84
+ position: absolute;
85
+ height: 100%;
86
+ width: 100%;
87
+ top: 0;
88
+ left: 0;
89
+ border-radius: 2px;
90
+ background-color: ${t=>t.theme.palette.primary.main};
91
+ transform: scale(0.1);
92
+ opacity: 0;
93
+ z-index: -1;
94
+ transition:
95
+ transform 0.3s,
96
+ opacity 0.3s,
97
+ background-color 0.3s;
98
+ }
99
+ &:hover::after {
100
+ opacity: 1;
101
+ transform-origin: center;
102
+ transform: scale(1);
103
+ }
104
+ }
105
+ & > :not(.Mui-disabled) {
106
+ background-color: transparent !important;
107
+ color: ${t=>t.theme.palette.primary.main}!important;
108
+ }
109
+ & > :not(.Mui-disabled) {
110
+ &:hover {
111
+ color: ${t=>t.theme.palette.common.white}!important;
112
+ }
113
+ }
114
+ `;const ur=(t="")=>t.replace(/(<([^>]+)>)/gi,"").trim(),Pl=(t="")=>{const e=parseInt(t,10);return Number.isNaN(e)?t:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`};function Qt({title:t,sx:e,children:n,slotProps:r,fontSize:i=12,fontWeight:o=500,color:s="text.contrast",...a}){return t?l.jsx(Zt,{title:t,placement:"top",...a,slotProps:{popper:{...r?.popper,sx:Vi({[`& .${Sr.tooltip}`]:{fontSize:i,fontWeight:o,boxShadow:2,marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:s,display:"flex",alignItems:"center"}},r?.popper?.sx)}},children:n}):n}function Ae({icon:t=null,children:e=null,maxWidth:n=100,title:r=void 0,sx:i={}}){return(e===0||e)&&l.jsxs(H,{direction:"row",sx:[{alignItems:"center",gap:.5},{maxWidth:n,overflow:"hidden"},...Array.isArray(i)?i:[i]],children:[t,l.jsx(Qt,{title:r||(typeof e=="string"?e:""),children:l.jsx(M,{variant:"body2",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:e})})]})}function ac({...t}){const{title:e,description:n="",cover:r="",avatar:i,author:o,download:s,did:a,official:c,buttonText:u="Install",buttonDisabled:f,buttonLoading:d,button:m,onButtonClick:x=()=>{},onMainClick:v,className:h,ref:g,icons:b,status:p,...w}=t,j=fe(),I=(E,A=()=>!1)=>(W,...U)=>{const N=E instanceof Function;(A()||N)&&(W.preventDefault(),W.stopPropagation(),N&&E(...U))},O=v&&I(v),P=I(x,()=>!!(m||f||d)),_=T.isValidElement(e)?{children:e}:{title:ur(e),dangerouslySetInnerHTML:{__html:e}},L=T.isValidElement(n)?{children:n}:{title:ur(n),dangerouslySetInnerHTML:{__html:n}};return l.jsxs(Ki,{variant:"outlined",onClick:O,...w,sx:{p:{xs:2,md:3},borderRadius:1,...w.sx},children:[l.jsxs(H,{direction:"row",sx:{flex:1,gap:1,alignItems:"center",overflow:"hidden","& > *":{flexShrink:0}},children:[l.jsx(Ue,{src:r,did:a,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),l.jsx(M,{className:"blocklet-title",..._,sx:[{fontWeight:"fontWeightMedium",fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...Array.isArray(_.sx)?_.sx:[_.sx]]}),l.jsxs(R,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[c&&l.jsx(Qt,{title:c.tooltip,children:l.jsx(lo,{sx:{color:c.color||"#D97706",fontSize:c.size||18}})}),b?.map(E=>l.jsx(Qt,{title:E.title,children:typeof E.icon=="string"?l.jsx(De,{icon:E.icon,style:{color:E.color}}):E.icon},E.key))]}),x&&l.jsxs(He,{variant:"outlined",size:"small",disabled:f||d,style:{color:j.palette.text.primary,borderColor:j.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:j.typography.fontWeightMedium},onClick:P,children:[d&&l.jsx(ee,{size:15,style:{marginRight:3,color:"inherit"}}),u]}),m]}),l.jsx(H,{sx:{py:2},children:l.jsx(M,{className:"blocklet-description",variant:"body2",...L,sx:[{color:"text.secondary",display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...Array.isArray(L.sx)?L.sx:[L.sx]]})}),l.jsxs(H,{direction:"row",sx:{alignItems:"center",gap:2,color:"text.secondary"},children:[l.jsx(Ae,{icon:l.jsx(Ue,{src:i,did:a,size:20,variant:"circle"}),maxWidth:200,children:o}),l.jsx(Ae,{icon:l.jsx(De,{icon:Kr}),title:s,children:Pl(s)}),p?.filter(E=>E.align!=="right").map(E=>l.jsx(Ae,{icon:typeof E.icon=="string"?l.jsx(De,{icon:E.icon}):E.icon,title:E.title,maxWidth:E.maxWidth,children:E.text},E.key)),l.jsx(R,{sx:{flex:1}}),p?.filter(E=>E.align==="right").map(E=>l.jsx(Ae,{icon:typeof E.icon=="string"?l.jsx(De,{icon:E.icon}):E.icon,title:E.title,maxWidth:E.maxWidth,sx:{color:E.color},children:E.text},E.key))]})]})}const lc=he("div")`
115
+ background-color: transparent !important;
116
+ & > :not(.Mui-disabled) {
117
+ position: relative;
118
+ z-index: 1;
119
+ &::before {
120
+ content: '';
121
+ position: absolute;
122
+ height: 100%;
123
+ width: 100%;
124
+ left: 0;
125
+ top: 0;
126
+ transition: opacity 0.3s;
127
+ }
128
+ &:hover::before {
129
+ opacity: 0;
130
+ }
131
+ &::after {
132
+ content: '';
133
+ position: absolute;
134
+ height: 100%;
135
+ width: 100%;
136
+ top: 0;
137
+ left: 0;
138
+ border-radius: 2px;
139
+ background-color: ${t=>t.theme.palette.primary.main};
140
+ transform: scale(0.1);
141
+ opacity: 0;
142
+ z-index: -1;
143
+ transition:
144
+ transform 0.3s,
145
+ opacity 0.3s,
146
+ background-color 0.3s;
147
+ }
148
+ &:hover::after {
149
+ opacity: 1;
150
+ transform-origin: center;
151
+ transform: scale(1);
152
+ }
153
+ }
154
+ & > :not(.Mui-disabled) {
155
+ background-color: transparent !important;
156
+ color: ${t=>t.theme.palette.primary.main}!important;
157
+ }
158
+ & > :not(.Mui-disabled) {
159
+ &:hover {
160
+ color: ${t=>t.theme.palette.common.white}!important;
161
+ }
162
+ }
163
+ `,cc={meta:C.object.isRequired,onCancel:C.func.isRequired};function Ml({action:t,onSelect:e,onNext:n}){const{t:r}=pe(),i=[{action:"purchase",title:r("store.purchase.purchase.title"),description:r("store.purchase.purchase.description")},{action:"verify",title:r("store.purchase.verify.title"),description:r("store.purchase.verify.description")}];return l.jsxs(l.Fragment,{children:[l.jsx(Ui,{children:i.map(o=>l.jsxs(kr,{button:!0,selected:t===o.action,onClick:()=>e(o.action),children:[l.jsx(Hi,{sx:{minWidth:48},children:o.action==="purchase"?l.jsx(yo,{style:{color:t==="purchase"?vn.primary.main:"#AAA",fontSize:32}}):l.jsx(bo,{style:{color:t==="verify"?vn.primary.main:"#AAA",fontSize:32}})}),l.jsx(qi,{primary:o.title,secondary:o.description})]},o.action))}),n&&l.jsx(He,{fullWidth:!0,disabled:!t,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:r("common.next")})]})}Ml.propTypes={action:C.oneOf(["both","purchase","verify"]).isRequired,onSelect:C.func.isRequired,onNext:C.func.isRequired};function _l({disabled:t=!1,storeList:e=[],teamDid:n,onAdd:r=()=>{},scope:i="",hiddenChildren:o=!1,open:s=!1,onClose:a=()=>{}}){const{api:c}=en(),[u,f]=T.useState(!1),[d,m]=T.useState(!0),[x,v]=T.useState(!1),[h,g]=T.useState(""),[b,p]=T.useState(""),{t:w}=pe(),j=async()=>{f(!0);try{const{decoded:O}=Yi(h,e);await c.addBlockletStore({input:{teamDid:n,url:O,scope:i}}),r(O),v(!1),a()}catch(O){const P=`${w("store.blockletRegistry.addFailed")} ${je(O)}`;p(P)}finally{f(!1)}},I=()=>{v(!1),a()};return l.jsxs(l.Fragment,{children:[!o&&l.jsxs(kr,{button:!0,disabled:t,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},onClick:()=>{v(!0)},children:[l.jsx(vo,{font:!0}),l.jsx(M,{variant:"inherit",children:w("store.blockletRegistry.addRegistry")})]}),l.jsxs(Gi,{title:w("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:s||x,onClose:I,PaperProps:{style:{minHeight:"auto"}},actions:l.jsxs(l.Fragment,{children:[l.jsx(He,{onClick:O=>{O.stopPropagation(),I()},color:"inherit",children:w("common.cancel")}),l.jsxs(He,{onClick:O=>{O.stopPropagation(),j()},color:"primary","data-cy":"install-blocklet-next-step",disabled:u||!h||d,variant:"contained",autoFocus:!0,children:[u&&l.jsx(ee,{size:16}),w("common.confirm")]})]}),children:[l.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:l.jsx(Qi,{component:"div",children:l.jsx(M,{component:"div",children:l.jsx(vr,{label:w("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:h,onChange:O=>{p(null);let P=!1;O.target.value.trim()||(P=!0),O.target.value.trim()||p(w("store.blockletRegistry.registryUrlEmpty")),g(O.target.value),m(P)},disabled:u,onKeyPress:O=>{O.key==="Enter"&&(O.preventDefault(),O.target.value.trim()?j():p(w("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!b&&l.jsx(Xi,{severity:"error",style:{width:"100%"},children:b})]})]})}_l.propTypes={teamDid:C.string.isRequired,disabled:C.bool,storeList:C.array,onAdd:C.func,scope:C.string,hiddenChildren:C.bool,open:C.bool,onClose:C.func};var Tt,dr;function Ll(){if(dr)return Tt;dr=1;var t={};const{NODE_MODES:e}=Ji();return Tt={isInServerlessMode:({mode:r,previousMode:i}={})=>r===e.SERVERLESS||i===e.SERVERLESS||t.ABT_NODE_DEBUG_AS_SERVERLESS==="true"},Tt}var Dl=Ll();function hn({store:t,teamDid:e,onDelete:n=()=>{},children:r=null,projectId:i="",scope:o=""}){const{api:s}=en(),{t:a}=pe(),c=mo(),[u,f]=T.useState(!1),[d,m]=T.useState(null),x=fe(),v=()=>{f(!1),m(null)},h=async()=>{try{f(!0),await s.deleteBlockletStore({input:{teamDid:e,url:t.url,projectId:i,scope:o}}),await c?.actions?.refreshBlocklet(),n&&typeof n=="function"&&n()}catch(p){ue.error(`Remove Blocklet Store Error: ${je(p)}`)}finally{f(!1),m(null)}},g={keyName:t.url,title:a("store.blockletRegistry.deleteRegistry"),description:a("store.blockletRegistry.deleteDesc",{name:`<b>${t.url}</b>`,color:x.palette.error.main}),confirmPlaceholder:a("store.blockletRegistry.confirmDesc",{name:t.url}),confirm:a("common.delConfirm"),cancel:a("common.cancel"),onConfirm:h,onCancel:v},b=p=>{t.protected||(p.stopPropagation(),m(g))};return l.jsxs(l.Fragment,{children:[r?l.jsx("span",{onClick:b,children:r}):l.jsx(Y,{"data-cy":"store-action-delete",color:"primary",disabled:u,onClick:b,size:"small",children:l.jsx(Or,{sx:{zoom:.95}})}),d&&l.jsx(wo,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}hn.propTypes={children:C.node,teamDid:C.string.isRequired,store:C.object.isRequired,onDelete:C.func,projectId:C.string,scope:C.string};const zl=({store:t,userDid:e})=>{const n=window.blocklet?.tenantMode!==Zi.BLOCKLET_TENANT_MODES.MULTIPLE;return t.protected?!1:t.scope&&t.scope===e?!0:n?t.scope==="studio":!1};function bi({connectedStore:t,onDisconnect:e=()=>{},onDelete:n=()=>{},store:r,teamDid:i,projectId:o=""}){const[s,a]=T.useState(null),c=!!s,{t:u}=pe(),{session:f}=eo(),[d,m]=T.useState(!1),x=p=>{p.stopPropagation(),window.open(Re(`${ve(r.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},v=p=>{a(p.currentTarget)},h=()=>{a(null)},g=()=>{m(!1),e()},b=[{label:u("common.visitStore"),action:x,icon:Tr},{label:u("common.disconnect"),action:()=>{h(),m(!0)},icon:To,hidden:!t}];return l.jsxs(l.Fragment,{children:[l.jsx(Y,{ref:s,color:"primary",onClick:v,size:"small",children:l.jsx(So,{sx:{zoom:.95}})}),l.jsxs(to,{anchorEl:s,open:c,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[b.map(p=>p.hidden?null:l.jsxs(Ke,{dense:!0,onClick:p.action,disabled:p.disabled,children:[p.icon&&l.jsx(p.icon,{color:"action",sx:{marginRight:1}}),l.jsx(R,{sx:{color:"action"},children:p.label})]},p.label)),zl({store:r,userDid:f?.user?.did})&&l.jsx(hn,{store:r,onDelete:n,teamDid:i,projectId:o,scope:r.scope||"studio",children:l.jsxs(Ke,{dense:!0,disabled:r.protected,children:[l.jsx(Or,{sx:{color:r.protected?"action":"error.main",marginRight:1}}),l.jsx(R,{sx:{color:r.protected?"action":"error.main"},children:u("common.delete")})]})})]}),d&&l.jsx(no,{displayError:!0,title:`${u("common.disconnect")} ${r.name}`,description:u("blocklet.publish.disconnectStoreTip"),confirm:u("common.confirm"),onConfirm:g,onCancel:()=>m(!1)})]})}bi.propTypes={connectedStore:C.object.isRequired,onDisconnect:C.func,onDelete:C.func,store:C.object.isRequired,teamDid:C.string.isRequired,projectId:C.string};function Fl({messageType:t,onOpen:e,onClose:n}){const r=T.useRef(null),i=T.useRef(null),o=async a=>{setTimeout(()=>{try{n?.()}catch{}},10*1e3),r.current&&(clearInterval(i.current),r.current.close());const c=Math.random().toString(36).slice(2);r.current=window.open(`${jr.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${c}`,"_blank"),e?.(r.current),i.current=setInterval(()=>{(!r.current||r.current.closed)&&(r.current=null,clearInterval(i.current),setTimeout(()=>{n?.()},1100))},200),await Promise.resolve(a(r.current,u=>{if(!r.current){localStorage.setItem(`open-window-url-${c}`,JSON.stringify({url:u,time:Date.now()}));return}r.current.location.href=Re(u,{allowDomains:null})}))},s=ro(a=>{const{type:c,error:u}=a.data;r.current&&c===t&&u&&(ue.error(u),n?.())});return T.useEffect(()=>(window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}),[s]),o}function Xt({connectedStore:t,sx:e={},...n}){return l.jsx(io,{sx:{width:24,height:24,...e},src:ve(t.storeUrl,jr.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${t.developerDid}?imageFilter=resize&w=120&h=120`),...n})}Xt.propTypes={connectedStore:C.object.isRequired,sx:C.object};function vi({storeUrl:t,storeName:e,published:n,did:r="",version:i=""}){const{t:o}=pe(),s=()=>{window.open(Re(`${ve(t,r&&i?`/blocklets/${r}/${i}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return l.jsxs(R,{children:[l.jsx(M,{variant:"subtitle2",children:o(n?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:e})}),l.jsx(Y,{size:"small",sx:{mt:1},onClick:s,variant:"contained",color:"success",children:o("common.visitTarget",{name:e})})]})}vi.propTypes={storeName:C.string.isRequired,storeUrl:C.string.isRequired,published:C.bool.isRequired,did:C.string,version:C.string};const fr={CONNECT:"connect",SELECT:"select"},hr=oo(({className:t,...e})=>l.jsx(Zt,{...e,classes:{popper:t}}))(({theme:t})=>({[`& .${Sr.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:t.spacing(2),fontSize:t.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Wl({teamDid:t,projectId:e="",releaseId:n="",store:r,warningList:i=[],onDelete:o=()=>{},kind:s="store",published:a=!1,connectedStore:c=null,releaseType:u="",onPublish:f=()=>{},onOpenConnectStore:d=()=>{},onSelectConnectStore:m=()=>{},behavior:x=fr.CONNECT,scope:v="",version:h=""}){const{t:g}=pe(),{api:b,info:p,inService:w}=en(),[j,I]=T.useState(!1),O=Fl({messageType:"connect-store-message",onOpen:()=>I(!0),onClose:()=>I(!1)}),P=s==="publish",_=!!c,L=S=>{if(S.stopPropagation(),P){window.open(Re(ve(r.url,"developer/blocklets"),{allowDomains:null}));return}window.open(Re(r.url,{allowDomains:null}))},E=()=>{if(x===fr.SELECT){m(r);return}O(async(S,D)=>{try{const Q=await b.connectToStore({input:{did:t,storeUrl:r.url,storeId:r.id,storeName:r.name,projectId:e}});if(!Q?.url){ue.error("failed to connect to store");return}D(Q.url),await d({did:t,projectId:e,storeId:r.id}),I(!1)}catch(Q){const B=je(Q);ue.error(B),I(!1)}})},A=async()=>{try{await b.disconnectFromStore({input:{did:t,storeId:r.id,projectId:e,storeScope:v}}),o()}catch(S){ue.error(je(S))}},W=()=>{I(!0),b.publishToStore({input:{did:t,storeId:r.id,storeName:r.name,projectId:e,releaseId:n,type:u}}).then(S=>{ue.success(l.jsx(vi,{storeName:c.storeName,storeUrl:c.storeUrl,did:e,version:h,published:S.url==="published"}),{duration:1e4}),f?.(null)}).catch(S=>{ue.error(je(S)),f?.(S)}).finally(()=>{I(!1)})};T.useEffect(()=>{_&&I(!1)},[_]);const U=T.useMemo(()=>!(w&&Dl.isInServerlessMode(p)),[w,p]),N=i.length>0,V=l.jsxs(Y,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:N,onClick:W,children:[j?l.jsx(ee,{sx:{marginRight:1},size:16}):l.jsx(ko,{sx:{marginRight:1,fontSize:20}}),g("common.upload")]});return l.jsxs(R,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},children:[!P&&j&&l.jsx(ee,{sx:{marginRight:2},size:16}),l.jsxs(R,{sx:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:[l.jsx(R,{sx:{display:"flex",flexDirection:"row"},children:l.jsx(M,{component:"span",sx:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"subtitle1",children:r.name})}),l.jsx(M,{sx:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},component:"span",variant:"inherit",children:`${r.url}`})]}),l.jsxs(R,{sx:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},children:[c&&l.jsx(hr,{placement:"top",title:l.jsxs(R,{children:[l.jsx(M,{component:"span",variant:"caption",sx:{opacity:.7},children:g("blocklet.publish.developerInfo")}),l.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[l.jsx(Xt,{connectedStore:c,sx:{width:42,height:42}}),l.jsxs(R,{sx:{flex:1},children:[l.jsx(M,{component:"span",variant:"subtitle1",children:c.developerName}),l.jsx(so,{size:14,copyable:!0,compact:!0,responsive:!1,did:c.developerDid})]})]})]}),children:l.jsx(R,{children:l.jsx(Xt,{connectedStore:c,sx:{marginRight:1,cursor:"help"}})})}),P&&l.jsxs(xn,{disabled:j,variant:"outlined",sx:{height:38},size:"small",children:[!_&&l.jsxs(Y,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:E,children:[j?l.jsx(ee,{sx:{marginRight:1},size:16}):l.jsx(Oo,{sx:{marginRight:1}}),g("common.connect")]}),_&&a&&l.jsxs(Y,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[j?l.jsx(ee,{sx:{marginRight:1},size:16}):l.jsx(xo,{sx:{marginRight:1}}),g("common.uploaded")]}),_&&!a&&(N?l.jsx(hr,{title:l.jsxs(R,{children:[l.jsx(R,{sx:{color:"error.main",mb:.5},children:g("blocklet.publish.storeRule.warning")}),i.map((S,D)=>l.jsxs(R,{sx:{color:"error.main"},children:[D+1,". ",S]},S))]}),children:l.jsx("div",{children:V})}):V),l.jsx(bi,{projectId:e,connectedStore:c,store:r,onDelete:o,teamDid:t,onDisconnect:A})]}),!P&&l.jsxs(xn,{disabled:j,variant:"outlined",sx:{height:36},size:"small",children:[l.jsx(Y,{"data-cy":"store-open-url",onClick:L,children:l.jsx(Tr,{sx:{zoom:.9}})}),!r.protected&&U&&l.jsx(hn,{store:r,onDelete:o,teamDid:t,scope:""})]})]})]})}Wl.propTypes={kind:C.string,teamDid:C.string.isRequired,published:C.bool,connectedStore:C.shape({storeName:C.string,storeId:C.string,storeUrl:C.string,developerDid:C.string,developerName:C.string}),warningList:C.array,projectId:C.string,releaseId:C.string,releaseType:C.string,store:C.shape({id:C.string.isRequired,name:C.string.isRequired,url:C.string.isRequired,protected:C.bool,connected:C.bool}).isRequired,scope:C.string,onDelete:C.func,onPublish:C.func,onOpenConnectStore:C.func,behavior:C.string,onSelectConnectStore:C.func,version:C.string};export{_l as A,Ml as C,To as L,rc as S,oc as _,Rl as a,Wl as b,cc as c,sc as d,lc as e,Dl as f,nc as g,ac as s,Fl as u};