@abtnode/webapp 1.16.44-beta-20250529-004636-15e80e20 → 1.16.44-beta-20250529-223630-10e16ac8

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 (217) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-DinGLvP5.js → AdapterDayjs-B3lRsj9D.js} +6 -6
  4. package/dist/assets/{Add-CBhJFYQx.js → Add-B9VQn0vA.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-SdWg3cER.js → ArrowDropDown-DHVyJbX0.js} +1 -1
  6. package/dist/assets/{Autocomplete-C5_M8mFC.js → Autocomplete-CR1bdhJ8.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BCQlw5gT.js → Breadcrumbs-CSkUIV3c.js} +1 -1
  8. package/dist/assets/{ButtonGroup-Fs3wIcrc.js → ButtonGroup-wDVjf00e.js} +1 -1
  9. package/dist/assets/{CSSTransition-C8l9UTP4.js → CSSTransition-Di6Z29-P.js} +1 -1
  10. package/dist/assets/{CallMerge-Kk12a7ey.js → CallMerge-DYQ3WM24.js} +1 -1
  11. package/dist/assets/CardContent-35Oftqzk.js +1 -0
  12. package/dist/assets/{ChevronLeft-BMvNEdLF.js → ChevronLeft-CK0wXsqo.js} +1 -1
  13. package/dist/assets/{ChevronRight-DWmI9IJ9.js → ChevronRight-EV2u1ASi.js} +1 -1
  14. package/dist/assets/{Clear-CQoneWNV.js → Clear-DTRe7ee3.js} +1 -1
  15. package/dist/assets/{Close-BT3NLZ5O.js → Close-DDEQviVu.js} +1 -1
  16. package/dist/assets/{Community-x97jRM08.js → Community-BX7_DmQR.js} +1 -1
  17. package/dist/assets/{Delete-DM0QAMOh.js → Delete-55_a7QjD.js} +1 -1
  18. package/dist/assets/{Delete-hG59H-h1.js → Delete-DrNmL2-8.js} +1 -1
  19. package/dist/assets/{DeleteOutline-Cdq3gHRY.js → DeleteOutline-CtJvLUtz.js} +1 -1
  20. package/dist/assets/{Done-Drec891I.js → Done-DJvQ4tWu.js} +1 -1
  21. package/dist/assets/{Edit-CSYT7Sg_.js → Edit-Dgp8PeZV.js} +1 -1
  22. package/dist/assets/{ErrorOutline-QthS_95b.js → ErrorOutline-NyS0RRuz.js} +1 -1
  23. package/dist/assets/{HelpOutline-CjbuZpgD.js → HelpOutline-BUsU7j2B.js} +1 -1
  24. package/dist/assets/{Holiday-BNZQq9zo.js → Holiday-B2k-yrmX.js} +1 -1
  25. package/dist/assets/{Launch-Du5imLta.js → Launch-B2oUG1C0.js} +1 -1
  26. package/dist/assets/{Link-B5HDfMUJ.js → Link-BImZG8Rc.js} +1 -1
  27. package/dist/assets/{ListItemButton-CsAyFEiR.js → ListItemButton-BXWgHblj.js} +1 -1
  28. package/dist/assets/{ListSubheader-DimB9eF4.js → ListSubheader-BAZjpPdT.js} +1 -1
  29. package/dist/assets/{LoadingButton-fap88MWT.js → LoadingButton-Buam56YP.js} +1 -1
  30. package/dist/assets/{LockIcon-Cb0s99jc.js → LockIcon-C6Gaa2D7.js} +1 -1
  31. package/dist/assets/{Meeting-CQG1DdAB.js → Meeting-CfztF-1n.js} +1 -1
  32. package/dist/assets/{MoreHoriz-DWWN4Ng-.js → MoreHoriz-xQKbHBXk.js} +1 -1
  33. package/dist/assets/{MoreVert-DOgd-oDI.js → MoreVert-k56JiJFI.js} +1 -1
  34. package/dist/assets/{OffSick-DFTVKYj3.js → OffSick-CMNH_UXH.js} +1 -1
  35. package/dist/assets/{OpenInNew-Rr4vQPzz.js → OpenInNew-xYlKnl4T.js} +1 -1
  36. package/dist/assets/{Public-DsLLG2ue.js → Public-Dkc4c2uW.js} +1 -1
  37. package/dist/assets/{Refresh-DrCeQQ8P.js → Refresh-DSru7HGW.js} +1 -1
  38. package/dist/assets/{SchemaReference.es-UTDlBrmS.js → SchemaReference.es-C8psaih6.js} +1 -1
  39. package/dist/assets/{Search-TzEPZc4S.js → Search-C29PuVwY.js} +1 -1
  40. package/dist/assets/{Slider-DfNDVCZg.js → Slider-BFYC-ndf.js} +1 -1
  41. package/dist/assets/{Stepper-CMm5g8HX.js → Stepper-CZ3vmn4U.js} +1 -1
  42. package/dist/assets/{Switch-DufHzTUv.js → Switch-BPjqimd5.js} +1 -1
  43. package/dist/assets/{TableRow-DU9-K8kr.js → TableRow-8x6smyXO.js} +1 -1
  44. package/dist/assets/{TableSearch-D3ttUrMW.js → TableSearch-DuQJlkst.js} +2 -2
  45. package/dist/assets/{ToggleButtonGroup-CBb-R_aY.js → ToggleButtonGroup-DZr66Ds-.js} +1 -1
  46. package/dist/assets/{Verified-XfHOW1HP.js → Verified-BLKTzR1S.js} +1 -1
  47. package/dist/assets/{VerifiedUser-ANB0mvJb.js → VerifiedUser-B9UfFGjN.js} +1 -1
  48. package/dist/assets/{ViewColumn-CmVGkXxH.js → ViewColumn-BgIEd8qO.js} +1 -1
  49. package/dist/assets/{ViewList-Csk2o7Do.js → ViewList-DPtR3wEh.js} +1 -1
  50. package/dist/assets/{WorkingRemotely-V9Lqlnci.js → WorkingRemotely-DvsNzIyW.js} +1 -1
  51. package/dist/assets/{_createAggregator-DjkaDOaA.js → _createAggregator-CmKiiWsR.js} +1 -1
  52. package/dist/assets/{actions-C5bVdhKM.js → actions-DWRhFxc5.js} +1 -1
  53. package/dist/assets/{actions-dsd4OpkB.js → actions-pbI5M0vz.js} +1 -1
  54. package/dist/assets/{agreement-Dhm9rc3C.js → agreement-BQ93KLNO.js} +1 -1
  55. package/dist/assets/api-Biyey5qO.js +1 -0
  56. package/dist/assets/{appearance-DZ8Ks0H9.js → appearance-CzYZB9UW.js} +1 -1
  57. package/dist/assets/{audit-logs-Cxm3Ca_L.js → audit-logs-Dk3r3uT-.js} +2 -2
  58. package/dist/assets/{base-chart-De2I12la.js → base-chart-CIY0AC1H.js} +1 -1
  59. package/dist/assets/blocklet-CVPCTpAm.js +1 -0
  60. package/dist/assets/{brace-fold.es-jdDpI7V6.js → brace-fold.es-DqNZqlv9.js} +1 -1
  61. package/dist/assets/{chain-Cy7rzX10.js → chain-C9igIP4y.js} +1 -1
  62. package/dist/assets/{click-to-copy-B-Nf9c3z.js → click-to-copy-DaPVNRo5.js} +1 -1
  63. package/dist/assets/cloneDeep-BggEwLYZ.js +1 -0
  64. package/dist/assets/{closebrackets.es-DtaJEplX.js → closebrackets.es-BgG6qYM2.js} +1 -1
  65. package/dist/assets/{codemirror.es-BnuJWXxR.js → codemirror.es-CTXkiUOQ.js} +1 -1
  66. package/dist/assets/{collapse-DmbZuZio.js → collapse-CZFfzu8E.js} +1 -1
  67. package/dist/assets/{comment.es-DqMPUK6b.js → comment.es-C15Ov1_H.js} +1 -1
  68. package/dist/assets/config-navigation-BeBEz5Q9.js +86 -0
  69. package/dist/assets/{connect-to-B2aJ9foS.js → connect-to-vI-I0H9i.js} +1 -1
  70. package/dist/assets/{delete-confirm-C5hVBVBe.js → delete-confirm-DqkJQzdi.js} +1 -1
  71. package/dist/assets/{detail-CRV4IPZx.js → detail-CSw8Ql4D.js} +3 -3
  72. package/dist/assets/{dialog.es-CnZcQPlC.js → dialog.es-BU1CIq3h.js} +1 -1
  73. package/dist/assets/{domains-Naf0eUkZ.js → domains-oBbBjUEN.js} +2 -2
  74. package/dist/assets/{download-Dwwoh_tj.js → download-Cfz9oBDg.js} +1 -1
  75. package/dist/assets/emotion-react.browser.esm-CuV9bEZ-.js +1 -0
  76. package/dist/assets/{foldgutter.es-DXYPfETU.js → foldgutter.es-DgGC_LFa.js} +1 -1
  77. package/dist/assets/{get-safe-url-BwZ1_jGd.js → get-safe-url-B6JOJoE_.js} +1 -1
  78. package/dist/assets/{get-safe-url-DIlh-GlR.js → get-safe-url-BBt-uWG8.js} +1 -1
  79. package/dist/assets/getValidReactChildren-JswGrRpZ.js +1 -0
  80. package/dist/assets/{hint.es-BQZvRXLe.js → hint.es-CFiaIFxE.js} +1 -1
  81. package/dist/assets/{hint.es2-BKxfSzYX.js → hint.es2-CpA9Wth4.js} +1 -1
  82. package/dist/assets/{iframe-C420BXed.js → iframe-DliQzZxh.js} +1 -1
  83. package/dist/assets/{index-JuIygs6c.js → index-5IYDIOdG.js} +1 -1
  84. package/dist/assets/{index-0sbUWWmv.js → index-8FN_CRrc.js} +1 -1
  85. package/dist/assets/{index-Cr8wuQmm.js → index-B-OsCFX-.js} +1 -1
  86. package/dist/assets/{index-DLSynwxs.js → index-BAZsDody.js} +1 -1
  87. package/dist/assets/{index-DWz2Gdbw.js → index-BPpkUirs.js} +2 -2
  88. package/dist/assets/index-BkuoRakK.js +1 -0
  89. package/dist/assets/index-BqH5Ju1G.js +11 -0
  90. package/dist/assets/{index-CxZV605i.js → index-C-id8KDN.js} +10 -10
  91. package/dist/assets/{index-B0sbjakP.js → index-C3fgvCrl.js} +1 -1
  92. package/dist/assets/{index-BGjoqPnj.js → index-C4zyKV3D.js} +1 -1
  93. package/dist/assets/{index-C-XTKS0o.js → index-C63YydxY.js} +1 -1
  94. package/dist/assets/{index-CtmOgjIn.js → index-CBSRK8lI.js} +1 -1
  95. package/dist/assets/{index-ByXFqYXz.js → index-CIysKeBp.js} +4 -4
  96. package/dist/assets/{index-C-NqD-ZI.js → index-CMafy6eu.js} +1 -1
  97. package/dist/assets/{index-Bs6Krlqz.js → index-CPiBcx6c.js} +1 -1
  98. package/dist/assets/{index-C4otE4aQ.js → index-CUMmXS_l.js} +1 -1
  99. package/dist/assets/{index-Djf90FMv.js → index-CUYD3dGd.js} +1 -1
  100. package/dist/assets/index-CYfyYQl4.js +109 -0
  101. package/dist/assets/{index-CM0m5dNj.js → index-Cb2LNWks.js} +15 -15
  102. package/dist/assets/{index-C8N6MVBX.js → index-Cb_3XJu-.js} +1 -1
  103. package/dist/assets/{index-CQA6XGzA.js → index-CdOTV-kY.js} +1 -1
  104. package/dist/assets/index-ChiIuSx6.js +1 -0
  105. package/dist/assets/{index-BwwfPkpe.js → index-Csic3buZ.js} +1 -1
  106. package/dist/assets/{index-aI_WK3lC.js → index-CtrkOEvS.js} +1 -1
  107. package/dist/assets/{index-DiJp1f5_.js → index-D7unoW0b.js} +8 -8
  108. package/dist/assets/{index-BwjHW5Do.js → index-DAHv_Ku0.js} +1 -1
  109. package/dist/assets/{index-4XTo8IyO.js → index-DESgmXka.js} +1 -1
  110. package/dist/assets/{index-B0ejBM3x.js → index-DG_ac7dA.js} +1 -1
  111. package/dist/assets/{index-C14JLgyC.js → index-DH0IH7YX.js} +1 -1
  112. package/dist/assets/{index-BEoiZQ4v.js → index-DNPCQUrt.js} +5 -5
  113. package/dist/assets/{index-Bw3PNnBQ.js → index-DPvdLpsO.js} +1 -1
  114. package/dist/assets/{index-NirGJtdP.js → index-DR-LzDpz.js} +30 -30
  115. package/dist/assets/{index-DtB4YGQz.js → index-DVLGVAgs.js} +1 -1
  116. package/dist/assets/{index-CGdbhgNF.js → index-DfFTq7r9.js} +1 -1
  117. package/dist/assets/{index-BIZ2efmj.js → index-DhbJRUp_.js} +1 -1
  118. package/dist/assets/{index-BfU9MPi3.js → index-Doaw7xqe.js} +1 -1
  119. package/dist/assets/{index-BpBA0IvL.js → index-DsljBihW.js} +1 -1
  120. package/dist/assets/index-Du_hmbEG.js +1 -0
  121. package/dist/assets/{index-Y0H3xUv4.js → index-DvfHbz04.js} +1 -1
  122. package/dist/assets/index-DxTy0IeW.js +1 -0
  123. package/dist/assets/index-DzM8h-LB.js +1 -0
  124. package/dist/assets/{index-CkbAFRoz.js → index-EiX7FuXm.js} +1 -1
  125. package/dist/assets/{index-BICF6NMn.js → index-SUxPMT-v.js} +1 -1
  126. package/dist/assets/{index-BL7rMOsj.js → index-TroCKI1w.js} +3 -3
  127. package/dist/assets/{index-BXb5UNlN.js → index-Zy0t374Z.js} +1 -1
  128. package/dist/assets/{index-By8emAsh.js → index-e_43Wk9J.js} +1 -1
  129. package/dist/assets/{index-DyLYzd73.js → index-fvOlvRD2.js} +5 -5
  130. package/dist/assets/{index-DeX6HSBf.js → index-kmBuomRf.js} +1 -1
  131. package/dist/assets/{index-BEx36Fl3.js → index-ljLsN0wl.js} +4 -4
  132. package/dist/assets/{index.esm-B5H4KBkc.js → index.esm-t3Dt5R40.js} +1 -1
  133. package/dist/assets/{info-addon.es-DR8_v_3j.js → info-addon.es-aGFlpxMB.js} +1 -1
  134. package/dist/assets/{info.es-CljYnRqy.js → info.es-CyJU-4fQ.js} +1 -1
  135. package/dist/assets/{install-from-url-B-u9io6B.js → install-from-url-BZcbqkwi.js} +1 -1
  136. package/dist/assets/{invitation-CRLeDtB1.js → invitation-CdsSMcaa.js} +6 -6
  137. package/dist/assets/is-path-prefix-equal-BgJYQUJu.js +1 -0
  138. package/dist/assets/{item-5FSiJyPn.js → item-b_KxectM.js} +6 -6
  139. package/dist/assets/{javascript.es-DNOv6rgY.js → javascript.es-Cd2hXYh6.js} +1 -1
  140. package/dist/assets/{jump-to-line.es-BR7eFhcc.js → jump-to-line.es-Be4-wwrh.js} +1 -1
  141. package/dist/assets/{jump.es-CpyaZYdp.js → jump.es-Cw1u4Cod.js} +1 -1
  142. package/dist/assets/{lint.es-DiMcEbEh.js → lint.es-wtkMeboj.js} +1 -1
  143. package/dist/assets/{lint.es2-Pwyn6VKt.js → lint.es2-BLKz9qSb.js} +1 -1
  144. package/dist/assets/{lint.es3-BHdxA7m7.js → lint.es3-Dq363MBD.js} +1 -1
  145. package/dist/assets/{list-header-BDv92PyU.js → list-header-CLekLloJ.js} +1 -1
  146. package/dist/assets/{log-DZbCmIMA.js → log-CbUepvQq.js} +1 -1
  147. package/dist/assets/{lottie-react.esm-B6UfxeU-.js → lottie-react.esm-DwkBIzVd.js} +1 -1
  148. package/dist/assets/{matchbrackets.es-C7CmjDLq.js → matchbrackets.es-CV1dPOnN.js} +1 -1
  149. package/dist/assets/{memory-BIcGczzH.js → memory-DzP4paU3.js} +1 -1
  150. package/dist/assets/{metric-CHmNfLM5.js → metric-q8tPjLqf.js} +1 -1
  151. package/dist/assets/{mode.es-BgFzELso.js → mode.es-KfODvPi3.js} +1 -1
  152. package/dist/assets/{mode.es2-C_gzbT8B.js → mode.es2-C08AdJFw.js} +1 -1
  153. package/dist/assets/{mode.es3-B-g7PSZg.js → mode.es3-D2D9hLP2.js} +1 -1
  154. package/dist/assets/omit-CzN3pMi0.js +1 -0
  155. package/dist/assets/{onlineParser.es-DaklCAOB.js → onlineParser.es-BYFYiBb_.js} +1 -1
  156. package/dist/assets/{overview-DHlUfNDU.js → overview-CyoCdi1p.js} +1 -1
  157. package/dist/assets/{permission-D7WAH9pl.js → permission-CuRYZFJE.js} +1 -1
  158. package/dist/assets/{preference-C6RSsm_f.js → preference-C7q1tf5E.js} +4 -4
  159. package/dist/assets/{raf-schd.esm-cPMdpiJR.js → raf-schd.esm-UumrWtPx.js} +1 -1
  160. package/dist/assets/refType-CJ9l93jo.js +1 -0
  161. package/dist/assets/{resource-dialog-BfdWfPnu.js → resource-dialog-DQ6bEefA.js} +20 -20
  162. package/dist/assets/{runtime-Bdbyxdvk.js → runtime-bmXU67NX.js} +1 -1
  163. package/dist/assets/{schema-Cb35ZxuZ.js → schema-ajF7Icmt.js} +1 -1
  164. package/dist/assets/sdk-C9mSNzSG.js +1 -0
  165. package/dist/assets/{search.es-DQAw761H.js → search.es-Cdtg1E_a.js} +1 -1
  166. package/dist/assets/{searchcursor.es-B1RRwem_.js → searchcursor.es-C8NGpPzz.js} +1 -1
  167. package/dist/assets/{service-CelKCvsn.js → service-B0u9bhKQ.js} +1 -1
  168. package/dist/assets/{shorten-label-CpjjrZE4.js → shorten-label-DkggqcXr.js} +1 -1
  169. package/dist/assets/{show-hint.es-CNjurN-G.js → show-hint.es-BVbkXAkF.js} +1 -1
  170. package/dist/assets/{simple-select-BeDH_svN.js → simple-select-BERx0W6t.js} +1 -1
  171. package/dist/assets/{spaces-4QocNuUE.js → spaces-BxS4555U.js} +1 -1
  172. package/dist/assets/{status-CNkFoN9_.js → status-DGwv9PNu.js} +1 -1
  173. package/dist/assets/{status-DBEXHPFk.js → status-DxS42kJ4.js} +1 -1
  174. package/dist/assets/{sublime.es-6-EY00Rq.js → sublime.es-4xcH9g5s.js} +1 -1
  175. package/dist/assets/{switch-control-p6zVviIU.js → switch-control-BUQ6khCW.js} +1 -1
  176. package/dist/assets/{table-icons-CVc352jh.js → table-icons-DqNHQWYR.js} +1 -1
  177. package/dist/assets/{table-tips-_uB0WZhe.js → table-tips-CJF6FN7W.js} +1 -1
  178. package/dist/assets/{team-B10DbiWq.js → team-DBW6O8K7.js} +1 -1
  179. package/dist/assets/{toLower-DZdeJ630.js → toLower-KtsWbzF6.js} +1 -1
  180. package/dist/assets/toUpper-DH4cZccA.js +1 -0
  181. package/dist/assets/{traffic-9N1qpgfE.js → traffic-D1EL195Z.js} +1 -1
  182. package/dist/assets/url-evaluation-BXXYRG2X.js +1 -0
  183. package/dist/assets/{url-join-BTkrevwu.js → url-join-CUA866NM.js} +1 -1
  184. package/dist/assets/{use-mobile-nGuU-0s0.js → use-mobile-B1ZUasmg.js} +1 -1
  185. package/dist/assets/{use-mobile-BETyv0lm.js → use-mobile-Bv46kdF2.js} +1 -1
  186. package/dist/assets/{useAsync-qCIf3UK3.js → useAsync-B8VSOMJe.js} +1 -1
  187. package/dist/assets/{useAsyncRetry-Cnqg2dBD.js → useAsyncRetry-CEX3Ed2W.js} +1 -1
  188. package/dist/assets/{useLocalStorage-CUruJXEg.js → useLocalStorage-UQyPQgbL.js} +1 -1
  189. package/dist/assets/{useThemeProps-_M9Jxn4x.js → useThemeProps-6swD8rT0.js} +1 -1
  190. package/dist/assets/{util-BvuTWfbr.js → util-ysDoKxkj.js} +1 -1
  191. package/dist/assets/{wait-container-CTDxHMer.js → wait-container-BtmYhxs0.js} +1 -1
  192. package/dist/assets/withStyles-DwEbga_Y.js +1 -0
  193. package/dist/assets/{wrap-locale-i1hddZ5J.js → wrap-locale-7CaFuwKr.js} +1 -1
  194. package/dist/index.html +1 -1
  195. package/dist/service-worker.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/assets/CardContent-DZIT7Ui8.js +0 -1
  198. package/dist/assets/api-xWlJtS98.js +0 -1
  199. package/dist/assets/blocklet-CoVwmbdq.js +0 -1
  200. package/dist/assets/cloneDeep-Dx0IDKG5.js +0 -1
  201. package/dist/assets/config-navigation-DHLqjU5h.js +0 -86
  202. package/dist/assets/emotion-react.browser.esm-DtUYZL9V.js +0 -1
  203. package/dist/assets/getValidReactChildren-C6zzguzA.js +0 -1
  204. package/dist/assets/index-BJoLX8m_.js +0 -1
  205. package/dist/assets/index-BMk8KJYe.js +0 -1
  206. package/dist/assets/index-BP2uvtJN.js +0 -11
  207. package/dist/assets/index-C1VNZueQ.js +0 -109
  208. package/dist/assets/index-C6XfV9TG.js +0 -1
  209. package/dist/assets/index-DzuvY_7m.js +0 -1
  210. package/dist/assets/index-Ikc8Qhzz.js +0 -1
  211. package/dist/assets/is-path-prefix-equal-BWtvRrCf.js +0 -1
  212. package/dist/assets/omit-BGtDTHXW.js +0 -1
  213. package/dist/assets/refType-DW_L7yu5.js +0 -1
  214. package/dist/assets/sdk-yPMfNr2b.js +0 -1
  215. package/dist/assets/toUpper-C3j48noa.js +0 -1
  216. package/dist/assets/url-evaluation-CEYtfcX2.js +0 -1
  217. package/dist/assets/withStyles-Cn384WJb.js +0 -1
@@ -1,5 +1,5 @@
1
- import{b$ as xr,a6 as zt,bZ as ot,dg as To,r as z,c4 as wr,j as o,bh as Me,aP as Ft,aQ as Nt,d8 as st,bl as Oo,d0 as Sr,eo as we,C as Ce,dq as De,K as V,al as Be,dG as Co,a3 as Io,dT as Eo,fL as Xr,fk as Jr,fM as Zr,fN as Cn,aD as _o,aE as In,aZ as pe,bs as At,fO as Ro,fP as en,k as Z,fQ as Po,E as Qe,fR as Mo,aY as ei,U as ti,cH as En,fF as Pe,av as _t,G as kr,ei as jr,aT as Lo,cJ as Do,fS as zo,fT as Fo,fU as No,M as Ao,cI as Wo,fl as Bo,eB as $o,ea as Ko,fj as Uo,Q as Rt,$ as Ho,fV as ni,fW as qo,t as ri,a2 as Xe,fX as Tr,fY as Vo,P,m as $e,aB as _n,aS as Or,eU as ii,b6 as Go,aH as wt,B as Pt,a8 as Yo,a9 as oi,aI as Qo,fZ as Cr,aa as Xo,bq as Rn,D as Jo,s as Zo,V as es,cP as ts,X as lt,A as si,y as Ae,b as ns,o as rs,b3 as is,ae as os,cu as ss,cz as as,W as ls}from"./index-NirGJtdP.js";import{u as cs}from"./index-Ikc8Qhzz.js";import{d as us}from"./ChevronLeft-BMvNEdLF.js";import{d as ds}from"./ChevronRight-DWmI9IJ9.js";import{d as Ct}from"./Search-TzEPZc4S.js";import{E as hs}from"./index-DtB4YGQz.js";import{o as fs,u as ps}from"./blocklet-CoVwmbdq.js";import{A as ms}from"./Autocomplete-C5_M8mFC.js";import{d as gs}from"./Verified-XfHOW1HP.js";import{d as bs,a as ys}from"./VerifiedUser-ANB0mvJb.js";import{d as vs}from"./Add-CBhJFYQx.js";import{d as ai}from"./Launch-Du5imLta.js";import{d as xs}from"./Done-Drec891I.js";import{d as li}from"./DeleteOutline-Cdq3gHRY.js";import{D as ws}from"./delete-confirm-C5hVBVBe.js";import{d as Ss}from"./MoreVert-DOgd-oDI.js";import{g as dt}from"./get-safe-url-BwZ1_jGd.js";import{B as Ir}from"./ButtonGroup-Fs3wIcrc.js";const ks=["name"],js=["children","className","clone","component"];function Ts(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function Os(e){return(n,r={})=>{const{name:i}=r,s=xr(r,ks);let u=i;const m=zt(typeof n=="function"?v=>({root:w=>n(ot({theme:v},w))}):{root:n},ot({Component:e,name:i||e.displayName,classNamePrefix:u},s));let g;n.filterProps&&(g=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);const f=z.forwardRef(function(w,x){const{children:S,className:j,clone:R,component:T}=w,O=xr(w,js),M=m(w),$=wr(M.root,j);let Q=O;if(g&&(Q=Ts(Q,g)),R)return z.cloneElement(S,ot({className:wr(S.props.className,$)},Q));if(typeof S=="function")return S(ot({className:$},Q));const B=T||e;return o.jsx(B,ot({ref:x,className:$},Q,{children:S}))});return To(f,e),f}}const Tc="blocklet-add-component-registry",Oc="server-add-registry",Cs={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>'},ct=/^[a-z0-9]+(-[a-z0-9]+)*$/,Wt=(e,t,n,r="")=>{const i=e.split(":");if(e.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 h=i.pop(),m=i.pop(),g={provider:i.length>0?i[0]:r,prefix:m,name:h};return t&&!It(g)?null:g}const s=i[0],u=s.split("-");if(u.length>1){const h={provider:r,prefix:u.shift(),name:u.join("-")};return t&&!It(h)?null:h}if(n&&r===""){const h={provider:r,prefix:"",name:s};return t&&!It(h,n)?null:h}return null},It=(e,t)=>e?!!((e.provider===""||e.provider.match(ct))&&(t&&e.prefix===""||e.prefix.match(ct))&&e.name.match(ct)):!1,ci=Object.freeze({left:0,top:0,width:16,height:16}),Mt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Pn=Object.freeze({...ci,...Mt}),mn=Object.freeze({...Pn,body:"",hidden:!1});function Is(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Er(e,t){const n=Is(e,t);for(const r in mn)r in Mt?r in e&&!(r in n)&&(n[r]=Mt[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Es(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(u){if(n[u])return i[u]=[];if(!(u in i)){i[u]=null;const h=r[u]&&r[u].parent,m=h&&s(h);m&&(i[u]=[h].concat(m))}return i[u]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function _s(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function u(h){s=Er(r[h]||i[h],s)}return u(t),n.forEach(u),Er(e,s)}function ui(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Es(e);for(const i in r){const s=r[i];s&&(t(i,_s(e,i,s)),n.push(i))}return n}const Rs={provider:"",aliases:{},not_found:{},...ci};function tn(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function di(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!tn(e,Rs))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i.match(ct)||typeof s.body!="string"||!tn(s,mn))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],u=s.parent;if(!i.match(ct)||typeof u!="string"||!n[u]&&!r[u]||!tn(s,mn))return null}return t}const _r=Object.create(null);function Ps(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function We(e,t){const n=_r[e]||(_r[e]=Object.create(null));return n[t]||(n[t]=Ps(e,t))}function Mn(e,t){return di(t)?ui(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Ms(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let ht=!1;function hi(e){return typeof e=="boolean"&&(ht=e),ht}function Ls(e){const t=typeof e=="string"?Wt(e,!0,ht):e;if(t){const n=We(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Ds(e,t){const n=Wt(e,!0,ht);if(!n)return!1;const r=We(n.provider,n.prefix);return Ms(r,n.name,t)}function zs(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ht&&!t&&!e.prefix){let i=!1;return di(e)&&(e.prefix="",ui(e,(s,u)=>{u&&Ds(s,u)&&(i=!0)})),i}const n=e.prefix;if(!It({provider:t,prefix:n,name:"a"}))return!1;const r=We(t,n);return!!Mn(r,e)}const fi=Object.freeze({width:null,height:null}),pi=Object.freeze({...fi,...Mt}),Fs=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ns=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rr(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Fs);if(r===null||!r.length)return e;const i=[];let s=r.shift(),u=Ns.test(s);for(;;){if(u){const h=parseFloat(s);isNaN(h)?i.push(s):i.push(Math.ceil(h*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");u=!u}}const As=e=>e==="unset"||e==="undefined"||e==="none";function Ws(e,t){const n={...Pn,...e},r={...pi,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(S=>{const j=[],R=S.hFlip,T=S.vFlip;let O=S.rotate;R?T?O+=2:(j.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),j.push("scale(-1 1)"),i.top=i.left=0):T&&(j.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),j.push("scale(1 -1)"),i.top=i.left=0);let M;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:M=i.height/2+i.top,j.unshift("rotate(90 "+M.toString()+" "+M.toString()+")");break;case 2:j.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:M=i.width/2+i.left,j.unshift("rotate(-90 "+M.toString()+" "+M.toString()+")");break}O%2===1&&(i.left!==i.top&&(M=i.left,i.left=i.top,i.top=M),i.width!==i.height&&(M=i.width,i.width=i.height,i.height=M)),j.length&&(s='<g transform="'+j.join(" ")+'">'+s+"</g>")});const u=r.width,h=r.height,m=i.width,g=i.height;let f,v;u===null?(v=h===null?"1em":h==="auto"?g:h,f=Rr(v,m/g)):(f=u==="auto"?m:u,v=h===null?Rr(f,g/m):h==="auto"?g:h);const w={},x=(S,j)=>{As(j)||(w[S]=j.toString())};return x("width",f),x("height",v),w.viewBox=i.left.toString()+" "+i.top.toString()+" "+m.toString()+" "+g.toString(),{attributes:w,body:s}}const Bs=/\sid="(\S+)"/g,$s="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ks=0;function Us(e,t=$s){const n=[];let r;for(;r=Bs.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const u=typeof t=="function"?t(s):t+(Ks++).toString(),h=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+h+')([")]|\\.[a-z])',"g"),"$1"+u+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const gn=Object.create(null);function Hs(e,t){gn[e]=t}function bn(e){return gn[e]||gn[""]}function Ln(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Dn=Object.create(null),at=["https://api.simplesvg.com","https://api.unisvg.com"],Et=[];for(;at.length>0;)at.length===1||Math.random()>.5?Et.push(at.shift()):Et.push(at.pop());Dn[""]=Ln({resources:["https://api.iconify.design"].concat(Et)});function qs(e,t){const n=Ln(t);return n===null?!1:(Dn[e]=n,!0)}function zn(e){return Dn[e]}const Vs=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pr=Vs();function Gs(e,t){const n=zn(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(u=>{i=Math.max(i,u.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function Ys(e){return e===404}const Qs=(e,t,n)=>{const r=[],i=Gs(e,t),s="icons";let u={type:s,provider:e,prefix:t,icons:[]},h=0;return n.forEach((m,g)=>{h+=m.length+1,h>=i&&g>0&&(r.push(u),u={type:s,provider:e,prefix:t,icons:[]},h=m.length),u.icons.push(m)}),r.push(u),r};function Xs(e){if(typeof e=="string"){const t=zn(e);if(t)return t.path}return"/"}const Js=(e,t,n)=>{if(!Pr){n("abort",424);return}let r=Xs(t.provider);switch(t.type){case"icons":{const s=t.prefix,h=t.icons.join(","),m=new URLSearchParams({icons:h});r+=s+".json?"+m.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Pr(e+r).then(s=>{const u=s.status;if(u!==200){setTimeout(()=>{n(Ys(u)?"abort":"next",u)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},Zs={prepare:Qs,send:Js};function ea(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,u=i.prefix,h=i.name,m=n[s]||(n[s]=Object.create(null)),g=m[u]||(m[u]=We(s,u));let f;h in g.icons?f=t.loaded:u===""||g.missing.has(h)?f=t.missing:f=t.pending;const v={provider:s,prefix:u,name:h};f.push(v)}),t}function mi(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function ta(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const u=s.icons,h=u.pending.length;u.pending=u.pending.filter(m=>{if(m.prefix!==i)return!0;const g=m.name;if(e.icons[g])u.loaded.push({provider:r,prefix:i,name:g});else if(e.missing.has(g))u.missing.push({provider:r,prefix:i,name:g});else return n=!0,!0;return!1}),u.pending.length!==h&&(n||mi([e],s.id),s.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),s.abort))})}))}let na=0;function ra(e,t,n){const r=na++,i=mi.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(s)}),i}function ia(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?Wt(i,t,n):i;s&&r.push(s)}),r}var oa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sa(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let u;if(e.random){let B=e.resources.slice(0);for(u=[];B.length>1;){const q=Math.floor(Math.random()*B.length);u.push(B[q]),B=B.slice(0,q).concat(B.slice(q+1))}u=u.concat(B)}else u=e.resources.slice(s).concat(e.resources.slice(0,s));const h=Date.now();let m="pending",g=0,f,v=null,w=[],x=[];typeof r=="function"&&x.push(r);function S(){v&&(clearTimeout(v),v=null)}function j(){m==="pending"&&(m="aborted"),S(),w.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),w=[]}function R(B,q){q&&(x=[]),typeof B=="function"&&x.push(B)}function T(){return{startTime:h,payload:t,status:m,queriesSent:g,queriesPending:w.length,subscribe:R,abort:j}}function O(){m="failed",x.forEach(B=>{B(void 0,f)})}function M(){w.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),w=[]}function $(B,q,ne){const ae=q!=="success";switch(w=w.filter(K=>K!==B),m){case"pending":break;case"failed":if(ae||!e.dataAfterTimeout)return;break;default:return}if(q==="abort"){f=ne,O();return}if(ae){f=ne,w.length||(u.length?Q():O());return}if(S(),M(),!e.random){const K=e.resources.indexOf(B.resource);K!==-1&&K!==e.index&&(e.index=K)}m="completed",x.forEach(K=>{K(ne)})}function Q(){if(m!=="pending")return;S();const B=u.shift();if(B===void 0){if(w.length){v=setTimeout(()=>{S(),m==="pending"&&(M(),O())},e.timeout);return}O();return}const q={status:"pending",resource:B,callback:(ne,ae)=>{$(q,ne,ae)}};w.push(q),g++,v=setTimeout(Q,e.rotate),n(B,t,q.callback)}return setTimeout(Q),T}function gi(e){const t={...oa,...e};let n=[];function r(){n=n.filter(h=>h().status==="pending")}function i(h,m,g){const f=sa(t,h,m,(v,w)=>{r(),g&&g(v,w)});return n.push(f),f}function s(h){return n.find(m=>h(m))||null}return{query:i,find:s,setIndex:h=>{t.index=h},getIndex:()=>t.index,cleanup:r}}function Mr(){}const nn=Object.create(null);function aa(e){if(!nn[e]){const t=zn(e);if(!t)return;const n=gi(t),r={config:t,redundancy:n};nn[e]=r}return nn[e]}function la(e,t,n){let r,i;if(typeof e=="string"){const s=bn(e);if(!s)return n(void 0,424),Mr;i=s.send;const u=aa(e);u&&(r=u.redundancy)}else{const s=Ln(e);if(s){r=gi(s);const u=e.resources?e.resources[0]:"",h=bn(u);h&&(i=h.send)}}return!r||!i?(n(void 0,424),Mr):r.query(t,i,n)().abort}const Lr="iconify2",ft="iconify",bi=ft+"-count",Dr=ft+"-version",yi=36e5,ca=168;function yn(e,t){try{return e.getItem(t)}catch{}}function Fn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function zr(e,t){try{e.removeItem(t)}catch{}}function vn(e,t){return Fn(e,bi,t.toString())}function xn(e){return parseInt(yn(e,bi))||0}const Bt={local:!0,session:!0},vi={local:new Set,session:new Set};let Nn=!1;function ua(e){Nn=e}let St=typeof window>"u"?{}:window;function xi(e){const t=e+"Storage";try{if(St&&St[t]&&typeof St[t].length=="number")return St[t]}catch{}Bt[e]=!1}function wi(e,t){const n=xi(e);if(!n)return;const r=yn(n,Dr);if(r!==Lr){if(r){const h=xn(n);for(let m=0;m<h;m++)zr(n,ft+m.toString())}Fn(n,Dr,Lr),vn(n,0);return}const i=Math.floor(Date.now()/yi)-ca,s=h=>{const m=ft+h.toString(),g=yn(n,m);if(typeof g=="string"){try{const f=JSON.parse(g);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>i&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&t(f,h))return!0}catch{}zr(n,m)}};let u=xn(n);for(let h=u-1;h>=0;h--)s(h)||(h===u-1?(u--,vn(n,u)):vi[e].add(h))}function Si(){if(!Nn){ua(!0);for(const e in Bt)wi(e,t=>{const n=t.data,r=t.provider,i=n.prefix,s=We(r,i);if(!Mn(s,n).length)return!1;const u=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,u):u,!0})}}function da(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Bt)wi(r,i=>{const s=i.data;return i.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function ha(e,t){Nn||Si();function n(r){let i;if(!Bt[r]||!(i=xi(r)))return;const s=vi[r];let u;if(s.size)s.delete(u=Array.from(s).shift());else if(u=xn(i),!vn(i,u+1))return;const h={cached:Math.floor(Date.now()/yi),provider:e.provider,data:t};return Fn(i,ft+u.toString(),JSON.stringify(h))}t.lastModified&&!da(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fr(){}function fa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ta(e)}))}function pa(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad;let s;if(!i||!(s=bn(n)))return;s.prepare(n,r,i).forEach(h=>{la(n,h,m=>{if(typeof m!="object")h.icons.forEach(g=>{e.missing.add(g)});else try{const g=Mn(e,m);if(!g.length)return;const f=e.pendingIcons;f&&g.forEach(v=>{f.delete(v)}),ha(e,m)}catch(g){console.error(g)}fa(e)})})}))}const ma=(e,t)=>{const n=ia(e,!0,hi()),r=ea(n);if(!r.pending.length){let m=!0;return t&&setTimeout(()=>{m&&t(r.loaded,r.missing,r.pending,Fr)}),()=>{m=!1}}const i=Object.create(null),s=[];let u,h;return r.pending.forEach(m=>{const{provider:g,prefix:f}=m;if(f===h&&g===u)return;u=g,h=f,s.push(We(g,f));const v=i[g]||(i[g]=Object.create(null));v[f]||(v[f]=[])}),r.pending.forEach(m=>{const{provider:g,prefix:f,name:v}=m,w=We(g,f),x=w.pendingIcons||(w.pendingIcons=new Set);x.has(v)||(x.add(v),i[g][f].push(v))}),s.forEach(m=>{const{provider:g,prefix:f}=m;i[g][f].length&&pa(m,i[g][f])}),t?ra(t,r,s):Fr};function ga(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in fi?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const ba=/[\s,]+/;function ya(e,t){t.split(ba).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function va(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function xa(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function wa(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Sa(e){return"data:image/svg+xml,"+wa(e)}function ka(e){return'url("'+Sa(e)+'")'}let ut;function ja(){try{ut=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ut=null}}function Ta(e){return ut===void 0&&ja(),ut?ut.createHTML(e):e}const ki={...pi,inline:!1},Oa={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ca={display:"inline-block"},wn={backgroundColor:"currentColor"},ji={backgroundColor:"transparent"},Nr={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ar={WebkitMask:wn,mask:wn,background:ji};for(const e in Ar){const t=Ar[e];for(const n in Nr)t[e+n]=Nr[n]}const Ia={...ki,inline:!0};function Wr(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ea=(e,t,n,r)=>{const i=n?Ia:ki,s=ga(i,t),u=t.mode||"svg",h={},m=t.style||{},g={...u==="svg"?Oa:{},ref:r};for(let T in t){const O=t[T];if(O!==void 0)switch(T){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":s[T]=O===!0||O==="true"||O===1;break;case"flip":typeof O=="string"&&ya(s,O);break;case"color":h.color=O;break;case"rotate":typeof O=="string"?s[T]=va(O):typeof O=="number"&&(s[T]=O);break;case"ariaHidden":case"aria-hidden":O!==!0&&O!=="true"&&delete g["aria-hidden"];break;default:i[T]===void 0&&(g[T]=O)}}const f=Ws(e,s),v=f.attributes;if(s.inline&&(h.verticalAlign="-0.125em"),u==="svg"){g.style={...h,...m},Object.assign(g,v);let T=0,O=t.id;return typeof O=="string"&&(O=O.replace(/-/g,"_")),g.dangerouslySetInnerHTML={__html:Ta(Us(f.body,O?()=>O+"ID"+T++:"iconifyReact"))},Me.createElement("svg",g)}const{body:w,width:x,height:S}=e,j=u==="mask"||(u==="bg"?!1:w.indexOf("currentColor")!==-1),R=xa(w,{...v,width:x+"",height:S+""});return g.style={...h,"--svg":ka(R),width:Wr(v.width),height:Wr(v.height),...Ca,...j?wn:ji,...m},Me.createElement("span",g)};hi(!0);Hs("",Zs);if(typeof document<"u"&&typeof window<"u"){Si();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!zs(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;qs(n,i)||console.error(r)}catch{console.error(r)}}}}class Ti extends Me.Component{constructor(t){super(t),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(t){this.state.icon!==t&&this.setState({icon:t})}_checkIcon(t){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(t||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=Wt(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const s=Ls(i);if(!s){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),s!==null&&(this._loading={name:r,abort:ma([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const u=["iconify"];i.prefix!==""&&u.push("iconify--"+i.prefix),i.provider!==""&&u.push("iconify--"+i.provider),this._setData({data:s,classes:u}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(t){t.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const t=this.props,n=this.state.icon;if(n===null)return t.children?t.children:Me.createElement("span",{});let r=t;return n.classes&&(r={...t,className:(typeof t.className=="string"?t.className+" ":"")+n.classes.join(" ")}),Ea({...Pn,...n.data},r,t._inline,t._ref)}}const pt=Me.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!1};return Me.createElement(Ti,r)});Me.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!0};return Me.createElement(Ti,r)});var An={},_a=Nt;Object.defineProperty(An,"__esModule",{value:!0});var Oi=An.default=void 0,Ra=_a(Ft()),Pa=o;Oi=An.default=(0,Ra.default)((0,Pa.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");const Ci={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 Ii={exports:{}};(function(e,t){(function(n,r){e.exports=r(z)})(st,n=>(()=>{var r={703:(h,m,g)=>{var f=g(414);function v(){}function w(){}w.resetWarningCache=v,h.exports=function(){function x(R,T,O,M,$,Q){if(Q!==f){var B=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 B.name="Invariant Violation",B}}function S(){return x}x.isRequired=x;var j={array:x,bool:x,func:x,number:x,object:x,string:x,symbol:x,any:x,arrayOf:S,element:x,elementType:x,instanceOf:S,node:x,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:w,resetWarningCache:v};return j.PropTypes=j,j}},697:(h,m,g)=>{h.exports=g(703)()},414:h=>{h.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:h=>{var m=typeof Element<"u",g=typeof Map=="function",f=typeof Set=="function",v=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function w(x,S){if(x===S)return!0;if(x&&S&&typeof x=="object"&&typeof S=="object"){if(x.constructor!==S.constructor)return!1;var j,R,T,O;if(Array.isArray(x)){if((j=x.length)!=S.length)return!1;for(R=j;R--!=0;)if(!w(x[R],S[R]))return!1;return!0}if(g&&x instanceof Map&&S instanceof Map){if(x.size!==S.size)return!1;for(O=x.entries();!(R=O.next()).done;)if(!S.has(R.value[0]))return!1;for(O=x.entries();!(R=O.next()).done;)if(!w(R.value[1],S.get(R.value[0])))return!1;return!0}if(f&&x instanceof Set&&S instanceof Set){if(x.size!==S.size)return!1;for(O=x.entries();!(R=O.next()).done;)if(!S.has(R.value[0]))return!1;return!0}if(v&&ArrayBuffer.isView(x)&&ArrayBuffer.isView(S)){if((j=x.length)!=S.length)return!1;for(R=j;R--!=0;)if(x[R]!==S[R])return!1;return!0}if(x.constructor===RegExp)return x.source===S.source&&x.flags===S.flags;if(x.valueOf!==Object.prototype.valueOf)return x.valueOf()===S.valueOf();if(x.toString!==Object.prototype.toString)return x.toString()===S.toString();if((j=(T=Object.keys(x)).length)!==Object.keys(S).length)return!1;for(R=j;R--!=0;)if(!Object.prototype.hasOwnProperty.call(S,T[R]))return!1;if(m&&x instanceof Element)return!1;for(R=j;R--!=0;)if((T[R]!=="_owner"&&T[R]!=="__v"&&T[R]!=="__o"||!x.$$typeof)&&!w(x[T[R]],S[T[R]]))return!1;return!0}return x!=x&&S!=S}h.exports=function(x,S){try{return w(x,S)}catch(j){if((j.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw j}}},359:h=>{h.exports=n}},i={};function s(h){var m=i[h];if(m!==void 0)return m.exports;var g=i[h]={exports:{}};return r[h](g,g.exports,s),g.exports}s.n=h=>{var m=h&&h.__esModule?()=>h.default:()=>h;return s.d(m,{a:m}),m},s.d=(h,m)=>{for(var g in m)s.o(m,g)&&!s.o(h,g)&&Object.defineProperty(h,g,{enumerable:!0,get:m[g]})},s.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),s.o=(h,m)=>Object.prototype.hasOwnProperty.call(h,m),s.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var u={};return(()=>{function h(d){var a,p,b="";if(typeof d=="string"||typeof d=="number")b+=d;else if(typeof d=="object")if(Array.isArray(d))for(a=0;a<d.length;a++)d[a]&&(p=h(d[a]))&&(b&&(b+=" "),b+=p);else for(a in d)d[a]&&(b&&(b+=" "),b+=a);return b}function m(){for(var d,a,p=0,b="";p<arguments.length;)(d=arguments[p++])&&(a=h(d))&&(b&&(b+=" "),b+=a);return b}s.r(u),s.d(u,{default:()=>ko});var g=s(359),f=s.n(g);const v=function(d){var a=typeof d;return d!=null&&(a=="object"||a=="function")},w=typeof st=="object"&&st&&st.Object===Object&&st;var x=typeof self=="object"&&self&&self.Object===Object&&self;const S=w||x||Function("return this")(),j=function(){return S.Date.now()};var R=/\s/,T=/^\s+/;const O=function(d){return d&&d.slice(0,function(a){for(var p=a.length;p--&&R.test(a.charAt(p)););return p}(d)+1).replace(T,"")},M=S.Symbol;var $=Object.prototype,Q=$.hasOwnProperty,B=$.toString,q=M?M.toStringTag:void 0,ne=Object.prototype.toString,ae=M?M.toStringTag:void 0;const K=function(d){return d==null?d===void 0?"[object Undefined]":"[object Null]":ae&&ae in Object(d)?function(a){var p=Q.call(a,q),b=a[q];try{a[q]=void 0;var E=!0}catch{}var A=B.call(a);return E&&(p?a[q]=b:delete a[q]),A}(d):function(a){return ne.call(a)}(d)};var Ie=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Te=/^0o[0-7]+$/i,be=parseInt;const je=function(d){if(typeof d=="number")return d;if(function(b){return typeof b=="symbol"||function(E){return E!=null&&typeof E=="object"}(b)&&K(b)=="[object Symbol]"}(d))return NaN;if(v(d)){var a=typeof d.valueOf=="function"?d.valueOf():d;d=v(a)?a+"":a}if(typeof d!="string")return d===0?d:+d;d=O(d);var p=ke.test(d);return p||Te.test(d)?be(d.slice(2),p?2:8):Ie.test(d)?NaN:+d};var N=Math.max,X=Math.min;const he=function(d,a,p){var b,E,A,J,c,l,y=0,C=!1,_=!1,I=!0;if(typeof d!="function")throw new TypeError("Expected a function");function H(W){var Y=b,ee=E;return b=E=void 0,y=W,J=d.apply(ee,Y)}function U(W){return y=W,c=setTimeout(L,a),C?H(W):J}function G(W){var Y=W-l;return l===void 0||Y>=a||Y<0||_&&W-y>=A}function L(){var W=j();if(G(W))return D(W);c=setTimeout(L,function(Y){var ee=a-(Y-l);return _?X(ee,A-(Y-y)):ee}(W))}function D(W){return c=void 0,I&&b?H(W):(b=E=void 0,J)}function F(){var W=j(),Y=G(W);if(b=arguments,E=this,l=W,Y){if(c===void 0)return U(l);if(_)return clearTimeout(c),c=setTimeout(L,a),H(l)}return c===void 0&&(c=setTimeout(L,a)),J}return a=je(a)||0,v(p)&&(C=!!p.leading,A=(_="maxWait"in p)?N(je(p.maxWait)||0,a):A,I="trailing"in p?!!p.trailing:I),F.cancel=function(){c!==void 0&&clearTimeout(c),y=0,b=l=E=c=void 0},F.flush=function(){return c===void 0?J:D(j())},F},oe=function(d,a,p){var b=!0,E=!0;if(typeof d!="function")throw new TypeError("Expected a function");return v(p)&&(b="leading"in p?!!p.leading:b,E="trailing"in p?!!p.trailing:E),he(d,a,{leading:b,maxWait:a,trailing:E})};var xe=s(590),Ee=s.n(xe),Yn=function(){if(typeof Map<"u")return Map;function d(a,p){var b=-1;return a.some(function(E,A){return E[0]===p&&(b=A,!0)}),b}return function(){function a(){this.__entries__=[]}return Object.defineProperty(a.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),a.prototype.get=function(p){var b=d(this.__entries__,p),E=this.__entries__[b];return E&&E[1]},a.prototype.set=function(p,b){var E=d(this.__entries__,p);~E?this.__entries__[E][1]=b:this.__entries__.push([p,b])},a.prototype.delete=function(p){var b=this.__entries__,E=d(b,p);~E&&b.splice(E,1)},a.prototype.has=function(p){return!!~d(this.__entries__,p)},a.prototype.clear=function(){this.__entries__.splice(0)},a.prototype.forEach=function(p,b){b===void 0&&(b=null);for(var E=0,A=this.__entries__;E<A.length;E++){var J=A[E];p.call(b,J[1],J[0])}},a}()}(),Ut=typeof window<"u"&&typeof document<"u"&&window.document===document,gt=s.g!==void 0&&s.g.Math===Math?s.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Xi=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(gt):function(d){return setTimeout(function(){return d(Date.now())},1e3/60)},Ji=["top","right","bottom","left","width","height","size","weight"],Zi=typeof MutationObserver<"u",eo=function(){function d(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(a,p){var b=!1,E=!1,A=0;function J(){b&&(b=!1,a()),E&&l()}function c(){Xi(J)}function l(){var y=Date.now();if(b){if(y-A<2)return;E=!0}else b=!0,E=!1,setTimeout(c,20);A=y}return l}(this.refresh.bind(this))}return d.prototype.addObserver=function(a){~this.observers_.indexOf(a)||this.observers_.push(a),this.connected_||this.connect_()},d.prototype.removeObserver=function(a){var p=this.observers_,b=p.indexOf(a);~b&&p.splice(b,1),!p.length&&this.connected_&&this.disconnect_()},d.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},d.prototype.updateObservers_=function(){var a=this.observers_.filter(function(p){return p.gatherActive(),p.hasActive()});return a.forEach(function(p){return p.broadcastActive()}),a.length>0},d.prototype.connect_=function(){Ut&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Zi?(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)},d.prototype.disconnect_=function(){Ut&&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)},d.prototype.onTransitionEnd_=function(a){var p=a.propertyName,b=p===void 0?"":p;Ji.some(function(E){return!!~b.indexOf(E)})&&this.refresh()},d.getInstance=function(){return this.instance_||(this.instance_=new d),this.instance_},d.instance_=null,d}(),Qn=function(d,a){for(var p=0,b=Object.keys(a);p<b.length;p++){var E=b[p];Object.defineProperty(d,E,{value:a[E],enumerable:!1,writable:!1,configurable:!0})}return d},Ke=function(d){return d&&d.ownerDocument&&d.ownerDocument.defaultView||gt},Xn=yt(0,0,0,0);function bt(d){return parseFloat(d)||0}function Jn(d){for(var a=[],p=1;p<arguments.length;p++)a[p-1]=arguments[p];return a.reduce(function(b,E){return b+bt(d["border-"+E+"-width"])},0)}var to=typeof SVGGraphicsElement<"u"?function(d){return d instanceof Ke(d).SVGGraphicsElement}:function(d){return d instanceof Ke(d).SVGElement&&typeof d.getBBox=="function"};function no(d){return Ut?to(d)?function(a){var p=a.getBBox();return yt(0,0,p.width,p.height)}(d):function(a){var p=a.clientWidth,b=a.clientHeight;if(!p&&!b)return Xn;var E=Ke(a).getComputedStyle(a),A=function(I){for(var H={},U=0,G=["top","right","bottom","left"];U<G.length;U++){var L=G[U],D=I["padding-"+L];H[L]=bt(D)}return H}(E),J=A.left+A.right,c=A.top+A.bottom,l=bt(E.width),y=bt(E.height);if(E.boxSizing==="border-box"&&(Math.round(l+J)!==p&&(l-=Jn(E,"left","right")+J),Math.round(y+c)!==b&&(y-=Jn(E,"top","bottom")+c)),!function(I){return I===Ke(I).document.documentElement}(a)){var C=Math.round(l+J)-p,_=Math.round(y+c)-b;Math.abs(C)!==1&&(l-=C),Math.abs(_)!==1&&(y-=_)}return yt(A.left,A.top,l,y)}(d):Xn}function yt(d,a,p,b){return{x:d,y:a,width:p,height:b}}var ro=function(){function d(a){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=yt(0,0,0,0),this.target=a}return d.prototype.isActive=function(){var a=no(this.target);return this.contentRect_=a,a.width!==this.broadcastWidth||a.height!==this.broadcastHeight},d.prototype.broadcastRect=function(){var a=this.contentRect_;return this.broadcastWidth=a.width,this.broadcastHeight=a.height,a},d}(),io=function(d,a){var p,b,E,A,J,c,l,y=(b=(p=a).x,E=p.y,A=p.width,J=p.height,c=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,l=Object.create(c.prototype),Qn(l,{x:b,y:E,width:A,height:J,top:E,right:b+A,bottom:J+E,left:b}),l);Qn(this,{target:d,contentRect:y})},oo=function(){function d(a,p,b){if(this.activeObservations_=[],this.observations_=new Yn,typeof a!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=a,this.controller_=p,this.callbackCtx_=b}return d.prototype.observe=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(a instanceof Ke(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var p=this.observations_;p.has(a)||(p.set(a,new ro(a)),this.controller_.addObserver(this),this.controller_.refresh())}},d.prototype.unobserve=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(a instanceof Ke(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var p=this.observations_;p.has(a)&&(p.delete(a),p.size||this.controller_.removeObserver(this))}},d.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},d.prototype.gatherActive=function(){var a=this;this.clearActive(),this.observations_.forEach(function(p){p.isActive()&&a.activeObservations_.push(p)})},d.prototype.broadcastActive=function(){if(this.hasActive()){var a=this.callbackCtx_,p=this.activeObservations_.map(function(b){return new io(b.target,b.broadcastRect())});this.callback_.call(a,p,a),this.clearActive()}},d.prototype.clearActive=function(){this.activeObservations_.splice(0)},d.prototype.hasActive=function(){return this.activeObservations_.length>0},d}(),Zn=typeof WeakMap<"u"?new WeakMap:new Yn,er=function d(a){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var p=eo.getInstance(),b=new oo(a,p,this);Zn.set(this,b)};["observe","unobserve","disconnect"].forEach(function(d){er.prototype[d]=function(){var a;return(a=Zn.get(this))[d].apply(a,arguments)}});const tr=gt.ResizeObserver!==void 0?gt.ResizeObserver:er,Ue="Left",ze="Right",He="Up",Fe="Down",qe={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Ht={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},nr="mousemove",rr="mouseup";function ir(d,a){if(a===0)return d;const p=Math.PI/180*a;return[d[0]*Math.cos(p)+d[1]*Math.sin(p),d[1]*Math.cos(p)-d[0]*Math.sin(p)]}function so(d){const{trackMouse:a}=d,p=g.useRef(Object.assign({},Ht)),b=g.useRef(Object.assign({},qe)),E=g.useRef(Object.assign({},b.current));let A;for(A in E.current=Object.assign({},b.current),b.current=Object.assign(Object.assign({},qe),d),qe)b.current[A]===void 0&&(b.current[A]=qe[A]);const[J,c]=g.useMemo(()=>function(l,y){const C=L=>{const D="touches"in L;D&&L.touches.length>1||l((F,W)=>{W.trackMouse&&!D&&(document.addEventListener(nr,_),document.addEventListener(rr,H));const{clientX:Y,clientY:ee}=D?L.touches[0]:L,se=ir([Y,ee],W.rotationAngle);return W.onTouchStartOrOnMouseDown&&W.onTouchStartOrOnMouseDown({event:L}),Object.assign(Object.assign(Object.assign({},F),Ht),{initial:se.slice(),xy:se,start:L.timeStamp||0})})},_=L=>{l((D,F)=>{const W="touches"in L;if(W&&L.touches.length>1)return D;if(L.timeStamp-D.start>F.swipeDuration)return D.swiping?Object.assign(Object.assign({},D),{swiping:!1}):D;const{clientX:Y,clientY:ee}=W?L.touches[0]:L,[se,ge]=ir([Y,ee],F.rotationAngle),fe=se-D.xy[0],ue=ge-D.xy[1],ie=Math.abs(fe),te=Math.abs(ue),Re=(L.timeStamp||0)-D.start,tt=Math.sqrt(ie*ie+te*te)/(Re||1),nt=[fe/(Re||1),ue/(Re||1)],_e=function(rt,Ye,it,ye){return rt>Ye?it>0?ze:Ue:ye>0?Fe:He}(ie,te,fe,ue),Ne=typeof F.delta=="number"?F.delta:F.delta[_e.toLowerCase()]||qe.delta;if(ie<Ne&&te<Ne&&!D.swiping)return D;const Oe={absX:ie,absY:te,deltaX:fe,deltaY:ue,dir:_e,event:L,first:D.first,initial:D.initial,velocity:tt,vxvy:nt};Oe.first&&F.onSwipeStart&&F.onSwipeStart(Oe),F.onSwiping&&F.onSwiping(Oe);let Ge=!1;return(F.onSwiping||F.onSwiped||F[`onSwiped${_e}`])&&(Ge=!0),Ge&&F.preventScrollOnSwipe&&F.trackTouch&&L.cancelable&&L.preventDefault(),Object.assign(Object.assign({},D),{first:!1,eventData:Oe,swiping:!0})})},I=L=>{l((D,F)=>{let W;if(D.swiping&&D.eventData){if(L.timeStamp-D.start<F.swipeDuration){W=Object.assign(Object.assign({},D.eventData),{event:L}),F.onSwiped&&F.onSwiped(W);const Y=F[`onSwiped${W.dir}`];Y&&Y(W)}}else F.onTap&&F.onTap({event:L});return F.onTouchEndOrOnMouseUp&&F.onTouchEndOrOnMouseUp({event:L}),Object.assign(Object.assign(Object.assign({},D),Ht),{eventData:W})})},H=L=>{document.removeEventListener(nr,_),document.removeEventListener(rr,H),I(L)},U=(L,D)=>{let F=()=>{};if(L&&L.addEventListener){const W=Object.assign(Object.assign({},qe.touchEventOptions),D.touchEventOptions),Y=[["touchstart",C,W],["touchmove",_,Object.assign(Object.assign({},W),D.preventScrollOnSwipe?{passive:!1}:{})],["touchend",I,W]];Y.forEach(([ee,se,ge])=>L.addEventListener(ee,se,ge)),F=()=>Y.forEach(([ee,se])=>L.removeEventListener(ee,se))}return F},G={ref:L=>{L!==null&&l((D,F)=>{if(D.el===L)return D;const W={};return D.el&&D.el!==L&&D.cleanUpTouch&&(D.cleanUpTouch(),W.cleanUpTouch=void 0),F.trackTouch&&L&&(W.cleanUpTouch=U(L,F)),Object.assign(Object.assign(Object.assign({},D),{el:L}),W)})}};return y.trackMouse&&(G.onMouseDown=C),[G,U]}(l=>p.current=l(p.current,b.current),{trackMouse:a}),[a]);return p.current=function(l,y,C,_){return y.trackTouch&&l.el?l.cleanUpTouch?y.preventScrollOnSwipe!==C.preventScrollOnSwipe||y.touchEventOptions.passive!==C.touchEventOptions.passive?(l.cleanUpTouch(),Object.assign(Object.assign({},l),{cleanUpTouch:_(l.el,y)})):l:Object.assign(Object.assign({},l),{cleanUpTouch:_(l.el,y)}):(l.cleanUpTouch&&l.cleanUpTouch(),Object.assign(Object.assign({},l),{cleanUpTouch:void 0}))}(p.current,b.current,E.current,c),J}var k=s(697);function Je(d){return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Je(d)}function or(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),p.push.apply(p,b)}return p}function sr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?or(Object(p),!0).forEach(function(b){ao(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):or(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function ao(d,a,p){return(a=function(b){var E=function(A,J){if(Je(A)!=="object"||A===null)return A;var c=A[Symbol.toPrimitive];if(c!==void 0){var l=c.call(A,J);if(Je(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}(b,"string");return Je(E)==="symbol"?E:String(E)}(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}var lo={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},qt=f().memo(function(d){var a=sr(sr({},lo),d),p=a.description,b=a.fullscreen,E=a.handleImageLoaded,A=a.isFullscreen,J=a.onImageError,c=a.original,l=a.originalAlt,y=a.originalHeight,C=a.originalWidth,_=a.originalTitle,I=a.sizes,H=a.srcSet,U=a.loading,G=A&&b||c;return f().createElement(f().Fragment,null,f().createElement("img",{className:"image-gallery-image",src:G,alt:l,srcSet:H,height:y,width:C,sizes:I,title:_,onLoad:function(L){return E(L,c)},onError:J,loading:U}),p&&f().createElement("span",{className:"image-gallery-description"},p))});qt.displayName="Item",qt.propTypes={description:k.string,fullscreen:k.string,handleImageLoaded:k.func.isRequired,isFullscreen:k.bool,onImageError:k.func.isRequired,original:k.string.isRequired,originalAlt:k.string,originalHeight:k.string,originalWidth:k.string,originalTitle:k.string,sizes:k.string,srcSet:k.string,loading:k.string};const co=qt;function Ze(d){return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Ze(d)}function ar(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),p.push.apply(p,b)}return p}function lr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?ar(Object(p),!0).forEach(function(b){uo(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):ar(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function uo(d,a,p){return(a=function(b){var E=function(A,J){if(Ze(A)!=="object"||A===null)return A;var c=A[Symbol.toPrimitive];if(c!==void 0){var l=c.call(A,J);if(Ze(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}(b,"string");return Ze(E)==="symbol"?E:String(E)}(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}var ho={left:f().createElement("polyline",{points:"15 18 9 12 15 6"}),right:f().createElement("polyline",{points:"9 18 15 12 9 6"}),maximize:f().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:f().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:f().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:f().createElement(f().Fragment,null,f().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),f().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},fo={strokeWidth:1,viewBox:"0 0 24 24"},cr=function(d){var a=lr(lr({},fo),d),p=a.strokeWidth,b=a.viewBox,E=a.icon;return f().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:b,fill:"none",stroke:"currentColor",strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round"},ho[E])};cr.propTypes={strokeWidth:k.number,viewBox:k.string,icon:(0,k.oneOf)(["left","right","maximize","minimize","play","pause"]).isRequired};const vt=cr;var Vt=f().memo(function(d){var a=d.isFullscreen,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:p,"aria-label":"Open Fullscreen"},f().createElement(vt,{strokeWidth:2,icon:a?"minimize":"maximize"}))});Vt.displayName="Fullscreen",Vt.propTypes={isFullscreen:k.bool.isRequired,onClick:k.func.isRequired};const po=Vt;var Gt=f().memo(function(d){var a=d.disabled,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:a,onClick:p,"aria-label":"Previous Slide"},f().createElement(vt,{icon:"left",viewBox:"6 0 12 24"}))});Gt.displayName="LeftNav",Gt.propTypes={disabled:k.bool.isRequired,onClick:k.func.isRequired};const mo=Gt;var Yt=f().memo(function(d){var a=d.disabled,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:a,onClick:p,"aria-label":"Next Slide"},f().createElement(vt,{icon:"right",viewBox:"6 0 12 24"}))});Yt.displayName="RightNav",Yt.propTypes={disabled:k.bool.isRequired,onClick:k.func.isRequired};const go=Yt;var Qt=f().memo(function(d){var a=d.isPlaying,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:p,"aria-label":"Play or Pause Slideshow"},f().createElement(vt,{strokeWidth:2,icon:a?"pause":"play"}))});Qt.displayName="PlayPause",Qt.propTypes={isPlaying:k.bool.isRequired,onClick:k.func.isRequired};const bo=Qt;function et(d){return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},et(d)}function Xt(){return Xt=Object.assign?Object.assign.bind():function(d){for(var a=1;a<arguments.length;a++){var p=arguments[a];for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(d[b]=p[b])}return d},Xt.apply(this,arguments)}function ur(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),p.push.apply(p,b)}return p}function dr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?ur(Object(p),!0).forEach(function(b){yo(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):ur(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function yo(d,a,p){return(a=function(b){var E=function(A,J){if(et(A)!=="object"||A===null)return A;var c=A[Symbol.toPrimitive];if(c!==void 0){var l=c.call(A,J);if(et(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}(b,"string");return et(E)==="symbol"?E:String(E)}(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}var vo={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},hr=function(d){var a=dr(dr({},vo),d),p=a.children,b=a.className,E=so({delta:a.delta,onSwiping:a.onSwiping,onSwiped:a.onSwiped});return f().createElement("div",Xt({},E,{className:b}),p)};hr.propTypes={children:k.node.isRequired,className:k.string,delta:k.number,onSwiped:k.func,onSwiping:k.func};const fr=hr;function Ve(d){return Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Ve(d)}function pr(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),p.push.apply(p,b)}return p}function mr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?pr(Object(p),!0).forEach(function(b){gr(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):pr(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function xo(d,a){for(var p=0;p<a.length;p++){var b=a[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,br(b.key),b)}}function Jt(d,a){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,b){return p.__proto__=b,p},Jt(d,a)}function wo(d,a){if(a&&(Ve(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return le(d)}function le(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function xt(d){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},xt(d)}function gr(d,a,p){return(a=br(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}function br(d){var a=function(p,b){if(Ve(p)!=="object"||p===null)return p;var E=p[Symbol.toPrimitive];if(E!==void 0){var A=E.call(p,b);if(Ve(A)!=="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(d,"string");return Ve(a)==="symbol"?a:String(a)}var yr=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],So=(0,k.arrayOf)((0,k.shape)({srcSet:k.string,media:k.string}));function vr(d){var a=parseInt(d.keyCode||d.which||0,10);return a===66||a===62}var Zt=function(d){(function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&Jt(c,l)})(J,d);var a,p,b,E,A=(b=J,E=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var c,l=xt(b);if(E){var y=xt(this).constructor;c=Reflect.construct(l,arguments,y)}else c=l.apply(this,arguments);return wo(this,c)});function J(c){var l;return function(y,C){if(!(y instanceof C))throw new TypeError("Cannot call a class as a function")}(this,J),gr(le(l=A.call(this,c)),"onBulletClick",function(y,C){var _=l.props,I=_.onBulletClick,H=_.items,U=l.state.currentIndex;y.target.blur(),U!==C&&(H.length===2?l.slideToIndexWithStyleReset(C,y):l.slideToIndex(C,y)),I&&I(y,C)}),l.state={currentIndex:c.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(c.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},l.loadedImages={},l.imageGallery=f().createRef(),l.thumbnailsWrapper=f().createRef(),l.thumbnails=f().createRef(),l.imageGallerySlideWrapper=f().createRef(),l.handleImageLoaded=l.handleImageLoaded.bind(le(l)),l.handleKeyDown=l.handleKeyDown.bind(le(l)),l.handleMouseDown=l.handleMouseDown.bind(le(l)),l.handleResize=l.handleResize.bind(le(l)),l.handleTouchMove=l.handleTouchMove.bind(le(l)),l.handleOnSwiped=l.handleOnSwiped.bind(le(l)),l.handleScreenChange=l.handleScreenChange.bind(le(l)),l.handleSwiping=l.handleSwiping.bind(le(l)),l.handleThumbnailSwiping=l.handleThumbnailSwiping.bind(le(l)),l.handleOnThumbnailSwiped=l.handleOnThumbnailSwiped.bind(le(l)),l.onThumbnailMouseLeave=l.onThumbnailMouseLeave.bind(le(l)),l.handleImageError=l.handleImageError.bind(le(l)),l.pauseOrPlay=l.pauseOrPlay.bind(le(l)),l.renderThumbInner=l.renderThumbInner.bind(le(l)),l.renderItem=l.renderItem.bind(le(l)),l.slideLeft=l.slideLeft.bind(le(l)),l.slideRight=l.slideRight.bind(le(l)),l.toggleFullScreen=l.toggleFullScreen.bind(le(l)),l.togglePlay=l.togglePlay.bind(le(l)),l.unthrottledSlideToIndex=l.slideToIndex,l.slideToIndex=oe(l.unthrottledSlideToIndex,c.slideDuration,{trailing:!1}),c.lazyLoad&&(l.lazyLoaded=[]),l}return a=J,p=[{key:"componentDidMount",value:function(){var c=this.props,l=c.autoPlay,y=c.useWindowKeyDown;l&&this.play(),y?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(c,l){var y=this.props,C=y.items,_=y.lazyLoad,I=y.slideDuration,H=y.slideInterval,U=y.startIndex,G=y.thumbnailPosition,L=y.showThumbnails,D=y.useWindowKeyDown,F=this.state,W=F.currentIndex,Y=F.isPlaying,ee=c.items.length!==C.length,se=!Ee()(c.items,C),ge=c.startIndex!==U,fe=c.thumbnailPosition!==G,ue=c.showThumbnails!==L;H===c.slideInterval&&I===c.slideDuration||Y&&(this.pause(),this.play()),fe&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),ue&&L&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),ue&&!L&&this.removeThumbnailsResizeObserver(),(ee||ue)&&this.handleResize(),l.currentIndex!==W&&this.slideThumbnailBar(),c.slideDuration!==I&&(this.slideToIndex=oe(this.unthrottledSlideToIndex,I,{trailing:!1})),!_||c.lazyLoad&&!se||(this.lazyLoaded=[]),D!==c.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))),(ge||se)&&this.setState({currentIndex:U,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var c=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchmove",this.handleTouchMove),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),c?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var c=this,l=this.state,y=l.currentIndex,C=l.isTransitioning,_=this.props,I=_.onSlide,H=_.slideDuration;this.transitionTimer=window.setTimeout(function(){C&&(c.setState({isTransitioning:!C,isSwipingThumbnail:!1}),I&&I(y))},H+50)}},{key:"onThumbnailClick",value:function(c,l){var y=this.props,C=y.onThumbnailClick,_=y.items,I=this.state.currentIndex;c.target.parentNode.parentNode.blur(),I!==l&&(_.length===2?this.slideToIndexWithStyleReset(l,c):this.slideToIndex(l,c)),C&&C(c,l)}},{key:"onThumbnailMouseOver",value:function(c,l){var y=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout(function(){y.slideToIndex(l),y.pause()},300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var c=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,c&&this.play()}}},{key:"setThumbsTranslate",value:function(c){this.setState({thumbsTranslate:c})}},{key:"setModalFullscreen",value:function(c){var l=this.props.onScreenChange;this.setState({modalFullscreen:c}),l&&l(c)}},{key:"getThumbsTranslate",value:function(c){var l,y=this.props,C=y.disableThumbnailScroll,_=y.items,I=this.state,H=I.thumbnailsWrapperWidth,U=I.thumbnailsWrapperHeight,G=this.thumbnails&&this.thumbnails.current;if(C)return 0;if(G){if(this.isThumbnailVertical()){if(G.scrollHeight<=U)return 0;l=G.scrollHeight-U}else{if(G.scrollWidth<=H||H<=0)return 0;l=G.scrollWidth-H}return c*(l/(_.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(c){switch(c){case"left":c=" ".concat("image-gallery-thumbnails-left");break;case"right":c=" ".concat("image-gallery-thumbnails-right");break;case"bottom":c=" ".concat("image-gallery-thumbnails-bottom");break;case"top":c=" ".concat("image-gallery-thumbnails-top")}return c}},{key:"getAlignmentClassName",value:function(c){var l=this.state.currentIndex,y=this.props,C=y.infinite,_=y.items,I="",H="image-gallery-left",U="image-gallery-right";switch(c){case l-1:I=" ".concat(H);break;case l:I=" ".concat("image-gallery-center");break;case l+1:I=" ".concat(U)}return _.length>=3&&C&&(c===0&&l===_.length-1?I=" ".concat(U):c===_.length-1&&l===0&&(I=" ".concat(H))),I}},{key:"getTranslateXForTwoSlide",value:function(c){var l=this.state,y=l.currentIndex,C=l.currentSlideOffset,_=l.previousIndex,I=y!==_,H=c===0&&_===0,U=c===1&&_===1,G=c===0&&y===1,L=c===1&&y===0,D=C===0,F=-100*y+100*c+C;return C>0?this.direction="left":C<0&&(this.direction="right"),L&&C>0&&(F=-100+C),G&&C<0&&(F=100+C),I?H&&D&&this.direction==="left"?F=100:U&&D&&this.direction==="right"&&(F=-100):(L&&D&&this.direction==="left"&&(F=-100),G&&D&&this.direction==="right"&&(F=100)),F}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(c){var l=this.state,y=l.currentIndex,C=l.currentSlideOffset,_=l.slideStyle,I=this.props,H=I.infinite,U=I.items,G=I.useTranslate3D,L=I.isRTL,D=-100*y,F=U.length-1,W=(D+100*c)*(L?-1:1)+C;H&&U.length>2&&(y===0&&c===F?W=-100*(L?-1:1)+C:y===F&&c===0&&(W=100*(L?-1:1)+C)),H&&U.length===2&&(W=this.getTranslateXForTwoSlide(c));var Y="translate(".concat(W,"%, 0)");return G&&(Y="translate3d(".concat(W,"%, 0, 0)")),mr({display:this.isSlideVisible(c)?"inherit":"none",WebkitTransform:Y,MozTransform:Y,msTransform:Y,OTransform:Y,transform:Y},_)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var c,l=this.props,y=l.useTranslate3D,C=l.isRTL,_=this.state,I=_.thumbsTranslate,H=_.thumbsStyle,U=C?-1*I:I;return this.isThumbnailVertical()?(c="translate(0, ".concat(I,"px)"),y&&(c="translate3d(0, ".concat(I,"px, 0)"))):(c="translate(".concat(U,"px, 0)"),y&&(c="translate3d(".concat(U,"px, 0, 0)"))),mr({WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,transform:c},H)}},{key:"getSlideItems",value:function(){var c=this,l=this.state.currentIndex,y=this.props,C=y.items,_=y.slideOnThumbnailOver,I=y.onClick,H=y.lazyLoad,U=y.onTouchMove,G=y.onTouchEnd,L=y.onTouchStart,D=y.onMouseOver,F=y.onMouseLeave,W=y.renderItem,Y=y.renderThumbInner,ee=y.showThumbnails,se=y.showBullets,ge=[],fe=[],ue=[];return C.forEach(function(ie,te){var Re=c.getAlignmentClassName(te),tt=ie.originalClass?" ".concat(ie.originalClass):"",nt=ie.thumbnailClass?" ".concat(ie.thumbnailClass):"",_e=ie.renderItem||W||c.renderItem,Ne=ie.renderThumbInner||Y||c.renderThumbInner,Oe=!H||Re||c.lazyLoaded[te];Oe&&H&&!c.lazyLoaded[te]&&(c.lazyLoaded[te]=!0);var Ge=c.getSlideStyle(te),rt=f().createElement("div",{"aria-label":"Go to Slide ".concat(te+1),key:"slide-".concat(te),tabIndex:"-1",className:"image-gallery-slide ".concat(Re," ").concat(tt),style:Ge,onClick:I,onKeyUp:c.handleSlideKeyUp,onTouchMove:U,onTouchEnd:G,onTouchStart:L,onMouseOver:D,onFocus:D,onMouseLeave:F,role:"button"},Oe?_e(ie):f().createElement("div",{style:{height:"100%"}}));if(ge.push(rt),ee&&ie.thumbnail){var Ye=m("image-gallery-thumbnail",nt,{active:l===te});fe.push(f().createElement("button",{key:"thumbnail-".concat(te),type:"button",tabIndex:"0","aria-pressed":l===te?"true":"false","aria-label":"Go to Slide ".concat(te+1),className:Ye,onMouseLeave:_?c.onThumbnailMouseLeave:null,onMouseOver:function(ye){return c.handleThumbnailMouseOver(ye,te)},onFocus:function(ye){return c.handleThumbnailMouseOver(ye,te)},onKeyUp:function(ye){return c.handleThumbnailKeyUp(ye,te)},onClick:function(ye){return c.onThumbnailClick(ye,te)}},Ne(ie)))}if(se){var it=m("image-gallery-bullet",ie.bulletClass,{active:l===te});ue.push(f().createElement("button",{type:"button",key:"bullet-".concat(te),className:it,onClick:function(ye){return c.onBulletClick(ye,te)},"aria-pressed":l===te?"true":"false","aria-label":"Go to Slide ".concat(te+1)}))}}),{slides:ge,thumbnails:fe,bullets:ue}}},{key:"ignoreIsTransitioning",value:function(){var c=this.props.items,l=this.state,y=l.previousIndex,C=l.currentIndex,_=c.length-1;return Math.abs(y-C)>1&&!(y===0&&C===_)&&!(y===_&&C===0)}},{key:"isFirstOrLastSlide",value:function(c){return c===this.props.items.length-1||c===0}},{key:"slideIsTransitioning",value:function(c){var l=this.state,y=l.isTransitioning,C=l.previousIndex,_=l.currentIndex;return y&&!(c===C||c===_)}},{key:"isSlideVisible",value:function(c){return!this.slideIsTransitioning(c)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(c)}},{key:"slideThumbnailBar",value:function(){var c=this.state,l=c.currentIndex,y=c.isSwipingThumbnail,C=-this.getThumbsTranslate(l);y||(l===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:C,thumbsSwipedTranslate:C}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){return this.props.infinite||this.canSlidePrevious()}},{key:"canSlideRight",value:function(){return this.props.infinite||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(c){var l=c.event,y=c.absX,C=c.dir,_=this.props,I=_.disableSwipe,H=_.stopPropagation,U=this.state,G=U.galleryWidth,L=U.isTransitioning,D=U.swipingUpDown,F=U.swipingLeftRight;if(C!==He&&C!==Fe&&!D||F){if(C!==Ue&&C!==ze||F||this.setState({swipingLeftRight:!0}),!I){var W=this.props.swipingTransitionDuration;if(H&&l.preventDefault(),L)this.setState({currentSlideOffset:0});else{var Y=C===ze?1:-1,ee=y/G*100;Math.abs(ee)>=100&&(ee=100);var se={transition:"transform ".concat(W,"ms ease-out")};this.setState({currentSlideOffset:Y*ee,slideStyle:se})}}}else D||this.setState({swipingUpDown:!0})}},{key:"handleThumbnailSwiping",value:function(c){var l=c.event,y=c.absX,C=c.absY,_=c.dir,I=this.props,H=I.stopPropagation,U=I.swipingThumbnailTransitionDuration,G=this.state,L=G.thumbsSwipedTranslate,D=G.thumbnailsWrapperHeight,F=G.thumbnailsWrapperWidth,W=G.swipingUpDown,Y=G.swipingLeftRight;if(this.isThumbnailVertical()){if((_===Ue||_===ze||Y)&&!W)return void(Y||this.setState({swipingLeftRight:!0}));_!==He&&_!==Fe||W||this.setState({swipingUpDown:!0})}else{if((_===He||_===Fe||W)&&!Y)return void(W||this.setState({swipingUpDown:!0}));_!==Ue&&_!==ze||Y||this.setState({swipingLeftRight:!0})}var ee,se,ge,fe,ue,ie=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(ee=L+(_===Fe?C:-C),se=ie.scrollHeight-D+20,ge=Math.abs(ee)>se,fe=ee>20,ue=ie.scrollHeight<=D):(ee=L+(_===ze?y:-y),se=ie.scrollWidth-F+20,ge=Math.abs(ee)>se,fe=ee>20,ue=ie.scrollWidth<=F),!ue&&(_!==Ue&&_!==He||!ge)&&(_!==ze&&_!==Fe||!fe)){H&&l.stopPropagation();var te={transition:"transform ".concat(U,"ms ease-out")};this.setState({thumbsTranslate:ee,thumbsStyle:te})}}},{key:"handleOnThumbnailSwiped",value:function(){var c=this.state.thumbsTranslate,l=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:c,thumbsStyle:{transition:"all ".concat(l,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var c=this.state.currentSlideOffset,l=this.props.swipeThreshold;return Math.abs(c)>l}},{key:"resetSwipingDirection",value:function(){var c=this.state,l=c.swipingUpDown,y=c.swipingLeftRight;l&&this.setState({swipingUpDown:!1}),y&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(c){var l=c.event,y=c.dir,C=c.velocity,_=this.props,I=_.disableSwipe,H=_.stopPropagation,U=_.flickThreshold;if(!I){var G=this.props.isRTL;H&&l.stopPropagation(),this.resetSwipingDirection();var L=(y===Ue?1:-1)*(G?-1:1),D=C>U&&!(y===He||y===Fe);this.handleOnSwipedTo(L,D)}}},{key:"handleOnSwipedTo",value:function(c,l){var y=this.state,C=y.currentIndex,_=y.isTransitioning,I=C;!this.sufficientSwipe()&&!l||_||(I+=c),(c===-1&&!this.canSlideLeft()||c===1&&!this.canSlideRight())&&(I=C),this.unthrottledSlideToIndex(I)}},{key:"handleTouchMove",value:function(c){this.state.swipingLeftRight&&c.preventDefault()}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(c){var l=this.props,y=l.disableKeyDown,C=l.useBrowserFullscreen,_=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!y)switch(parseInt(c.keyCode||c.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(c);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(c);break;case 27:_&&!C&&this.exitFullScreen()}}},{key:"handleImageError",value:function(c){var l=this.props.onErrorImageURL;l&&c.target.src.indexOf(l)===-1&&(c.target.src=l)}},{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 c=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(c)))}},{key:"initSlideWrapperResizeObserver",value:function(c){var l=this;c&&!c.current||(this.resizeSlideWrapperObserver=new tr(he(function(y){y&&y.forEach(function(C){l.setState({thumbnailsWrapperWidth:C.contentRect.width},l.handleResize)})},50)),this.resizeSlideWrapperObserver.observe(c.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(c){var l=this;c&&!c.current||(this.resizeThumbnailWrapperObserver=new tr(he(function(y){y&&y.forEach(function(C){l.setState({thumbnailsWrapperHeight:C.contentRect.height},l.handleResize)})},50)),this.resizeThumbnailWrapperObserver.observe(c.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 c=this.props,l=c.onScreenChange,y=c.useBrowserFullscreen,C=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,_=this.imageGallery.current===C;l&&l(_),y&&this.setState({isFullscreen:_})}},{key:"slideToIndex",value:function(c,l){var y=this.state,C=y.currentIndex,_=y.isTransitioning,I=this.props,H=I.items,U=I.slideDuration,G=I.onBeforeSlide;if(!_){l&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var L=H.length-1,D=c;c<0?D=L:c>L&&(D=0),G&&D!==C&&G(D),this.setState({previousIndex:C,currentIndex:D,isTransitioning:D!==C,currentSlideOffset:0,slideStyle:{transition:"all ".concat(U,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(c){var l=this.props.isRTL;this.slideTo(c,l?"right":"left")}},{key:"slideRight",value:function(c){var l=this.props.isRTL;this.slideTo(c,l?"left":"right")}},{key:"slideTo",value:function(c,l){var y=this.state,C=y.currentIndex,_=y.isTransitioning,I=this.props.items,H=C+(l==="left"?-1:1);_||(I.length===2?this.slideToIndexWithStyleReset(H,c):this.slideToIndex(H,c))}},{key:"slideToIndexWithStyleReset",value:function(c,l){var y=this,C=this.state,_=C.currentIndex,I=C.currentSlideOffset;this.setState({currentSlideOffset:I+(_>c?.001:-.001),slideStyle:{transition:"none"}},function(){window.setTimeout(function(){return y.slideToIndex(c,l)},25)})}},{key:"handleThumbnailMouseOver",value:function(c,l){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(c,l)}},{key:"handleThumbnailKeyUp",value:function(c,l){vr(c)&&this.onThumbnailClick(c,l)}},{key:"handleSlideKeyUp",value:function(c){vr(c)&&(0,this.props.onClick)(c)}},{key:"isThumbnailVertical",value:function(){var c=this.props.thumbnailPosition;return c==="left"||c==="right"}},{key:"addScreenChangeEvent",value:function(){var c=this;yr.forEach(function(l){document.addEventListener(l,c.handleScreenChange)})}},{key:"removeScreenChangeEvent",value:function(){var c=this;yr.forEach(function(l){document.removeEventListener(l,c.handleScreenChange)})}},{key:"fullScreen",value:function(){var c=this.props.useBrowserFullscreen,l=this.imageGallery.current;c?l.requestFullscreen?l.requestFullscreen():l.msRequestFullscreen?l.msRequestFullscreen():l.mozRequestFullScreen?l.mozRequestFullScreen():l.webkitRequestFullscreen?l.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var c=this.state.isFullscreen,l=this.props.useBrowserFullscreen;c&&(l?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 c=this.props.infinite,l=this.state.currentIndex;c||this.canSlideRight()?this.slideToIndex(l+1):this.pause()}},{key:"play",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],l=this.props,y=l.onPlay,C=l.slideInterval,_=l.slideDuration,I=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(C,_)),y&&c&&y(I))}},{key:"pause",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],l=this.props.onPause,y=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),l&&c&&l(y))}},{key:"isImageLoaded",value:function(c){return!!this.loadedImages[c.original]||(this.loadedImages[c.original]=!0,!1)}},{key:"handleImageLoaded",value:function(c,l){var y=this.props.onImageLoad;!this.loadedImages[l]&&y&&(this.loadedImages[l]=!0,y(c))}},{key:"renderItem",value:function(c){var l=this.state.isFullscreen,y=this.props.onImageError||this.handleImageError;return f().createElement(co,{description:c.description,fullscreen:c.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:l,onImageError:y,original:c.original,originalAlt:c.originalAlt,originalHeight:c.originalHeight,originalWidth:c.originalWidth,originalTitle:c.originalTitle,sizes:c.sizes,loading:c.loading,srcSet:c.srcSet})}},{key:"renderThumbInner",value:function(c){var l=this.props.onThumbnailError||this.handleImageError;return f().createElement("span",{className:"image-gallery-thumbnail-inner"},f().createElement("img",{className:"image-gallery-thumbnail-image",src:c.thumbnail,height:c.thumbnailHeight,width:c.thumbnailWidth,alt:c.thumbnailAlt,title:c.thumbnailTitle,loading:c.thumbnailLoading,onError:l}),c.thumbnailLabel&&f().createElement("div",{className:"image-gallery-thumbnail-label"},c.thumbnailLabel))}},{key:"render",value:function(){var c=this.state,l=c.currentIndex,y=c.isFullscreen,C=c.modalFullscreen,_=c.isPlaying,I=this.props,H=I.additionalClass,U=I.disableThumbnailSwipe,G=I.indexSeparator,L=I.isRTL,D=I.items,F=I.thumbnailPosition,W=I.renderFullscreenButton,Y=I.renderCustomControls,ee=I.renderLeftNav,se=I.renderRightNav,ge=I.showBullets,fe=I.showFullscreenButton,ue=I.showIndex,ie=I.showThumbnails,te=I.showNav,Re=I.showPlayButton,tt=I.renderPlayPauseButton,nt=this.getThumbnailStyle(),_e=this.getSlideItems(),Ne=_e.slides,Oe=_e.thumbnails,Ge=_e.bullets,rt=m("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(F),{"image-gallery-rtl":L}),Ye=f().createElement("div",{ref:this.imageGallerySlideWrapper,className:rt},Y&&Y(),this.canSlide()?f().createElement(f().Fragment,null,te&&f().createElement(f().Fragment,null,ee(this.slideLeft,!this.canSlideLeft()),se(this.slideRight,!this.canSlideRight())),f().createElement(fr,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},f().createElement("div",{className:"image-gallery-slides"},Ne))):f().createElement("div",{className:"image-gallery-slides"},Ne),Re&&tt(this.togglePlay,_),ge&&f().createElement("div",{className:"image-gallery-bullets"},f().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},Ge)),fe&&W(this.toggleFullScreen,y),ue&&f().createElement("div",{className:"image-gallery-index"},f().createElement("span",{className:"image-gallery-index-current"},l+1),f().createElement("span",{className:"image-gallery-index-separator"},G),f().createElement("span",{className:"image-gallery-index-total"},D.length))),it=m("image-gallery",H,{"fullscreen-modal":C}),ye=m("image-gallery-content",this.getThumbnailPositionClassName(F),{fullscreen:y}),jo=m("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(F),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&L},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!U},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!U});return f().createElement("div",{ref:this.imageGallery,className:it,"aria-live":"polite"},f().createElement("div",{className:ye},(F==="bottom"||F==="right")&&Ye,ie&&Oe.length>0?f().createElement(fr,{className:jo,delta:0,onSwiping:!U&&this.handleThumbnailSwiping,onSwiped:!U&&this.handleOnThumbnailSwiped},f().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},f().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:nt,"aria-label":"Thumbnail Navigation"},Oe))):null,(F==="top"||F==="left")&&Ye))}}],p&&xo(a.prototype,p),Object.defineProperty(a,"prototype",{writable:!1}),J}(f().Component);Zt.propTypes={flickThreshold:k.number,items:(0,k.arrayOf)((0,k.shape)({bulletClass:k.string,bulletOnClick:k.func,description:k.string,original:k.string,originalHeight:k.number,originalWidth:k.number,loading:k.string,thumbnailHeight:k.number,thumbnailWidth:k.number,thumbnailLoading:k.string,fullscreen:k.string,originalAlt:k.string,originalTitle:k.string,thumbnail:k.string,thumbnailAlt:k.string,thumbnailLabel:k.string,thumbnailTitle:k.string,originalClass:k.string,thumbnailClass:k.string,renderItem:k.func,renderThumbInner:k.func,imageSet:So,srcSet:k.string,sizes:k.string})).isRequired,showNav:k.bool,autoPlay:k.bool,lazyLoad:k.bool,infinite:k.bool,showIndex:k.bool,showBullets:k.bool,showThumbnails:k.bool,showPlayButton:k.bool,showFullscreenButton:k.bool,disableThumbnailScroll:k.bool,disableKeyDown:k.bool,disableSwipe:k.bool,disableThumbnailSwipe:k.bool,useBrowserFullscreen:k.bool,onErrorImageURL:k.string,indexSeparator:k.string,thumbnailPosition:(0,k.oneOf)(["top","bottom","left","right"]),startIndex:k.number,slideDuration:k.number,slideInterval:k.number,slideOnThumbnailOver:k.bool,swipeThreshold:k.number,swipingTransitionDuration:k.number,swipingThumbnailTransitionDuration:k.number,onSlide:k.func,onBeforeSlide:k.func,onScreenChange:k.func,onPause:k.func,onPlay:k.func,onClick:k.func,onImageLoad:k.func,onImageError:k.func,onTouchMove:k.func,onTouchEnd:k.func,onTouchStart:k.func,onMouseOver:k.func,onMouseLeave:k.func,onBulletClick:k.func,onThumbnailError:k.func,onThumbnailClick:k.func,renderCustomControls:k.func,renderLeftNav:k.func,renderRightNav:k.func,renderPlayPauseButton:k.func,renderFullscreenButton:k.func,renderItem:k.func,renderThumbInner:k.func,stopPropagation:k.bool,additionalClass:k.string,useTranslate3D:k.bool,isRTL:k.bool,useWindowKeyDown:k.bool},Zt.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,renderLeftNav:function(d,a){return f().createElement(mo,{onClick:d,disabled:a})},renderRightNav:function(d,a){return f().createElement(go,{onClick:d,disabled:a})},renderPlayPauseButton:function(d,a){return f().createElement(bo,{onClick:d,isPlaying:a})},renderFullscreenButton:function(d,a){return f().createElement(po,{onClick:d,isFullscreen:a})},useWindowKeyDown:!0};const ko=Zt})(),u})())})(Ii);var Ma=Ii.exports;const La=Oo(Ma);function Da(){var e=new Map;function t(n){var r=n.root,i=n.rootMargin,s=n.threshold,u=e.get(r);u||(u=new Map,e.set(r,u));var h=JSON.stringify({rootMargin:i,threshold:s}),m=u.get(h);if(!m){var g=new Map,f=new IntersectionObserver(function(v){v.forEach(function(w){var x=g.get(w.target);x==null||x(w)})},{root:r,rootMargin:i,threshold:s});m={observer:f,entryCallbacks:g},u.set(h,m)}return{observe:function(w,x){var S,j;(S=m)==null||S.entryCallbacks.set(w,x),(j=m)==null||j.observer.observe(w)},unobserve:function(w){var x,S;(x=m)==null||x.entryCallbacks.delete(w),(S=m)==null||S.observer.unobserve(w)}}}return{getObserver:t}}var za="0px",Fa=[0],Na=Da();function Aa(e){var t,n,r=(t=e==null?void 0:e.rootMargin)!=null?t:za,i=(n=e==null?void 0:e.threshold)!=null?n:Fa,s=z.useRef(null),u=z.useRef(null),h=z.useRef(null),m=z.useState(),g=m[0],f=m[1],v=z.useCallback(function(){var j=s.current;if(!j){f(void 0);return}var R=Na.getObserver({root:u.current,rootMargin:r,threshold:i});R.observe(j,function(T){f(T)}),h.current=R},[r,i]),w=z.useCallback(function(){var j=h.current,R=s.current;R&&(j==null||j.unobserve(R)),h.current=null},[]),x=z.useCallback(function(j){w(),s.current=j,v()},[v,w]),S=z.useCallback(function(j){w(),u.current=j,v()},[v,w]);return[x,{entry:g,rootRef:S}]}function Sn(){return Sn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Wa(e){var t,n=Aa(e),r=n[0],i=n[1],s=!!((t=i.entry)!=null&&t.isIntersecting),u=z.useState(s),h=u[0],m=u[1];return s&&!h&&m(!0),[r,Sn({},i,{isVisible:s,wasEverVisible:h})]}var Ba=100;function $a(e){var t=e.loading,n=e.hasNextPage,r=e.onLoadMore,i=e.rootMargin,s=e.disabled,u=e.delayInMs,h=u===void 0?Ba:u,m=Wa({rootMargin:i}),g=m[0],f=m[1],v=f.rootRef,w=f.isVisible,x=!s&&!t&&w&&n;return z.useEffect(function(){if(x){var S=setTimeout(function(){r()},h);return function(){clearTimeout(S)}}},[r,x,h]),[g,{rootRef:v}]}const Ka={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"/>'},Ua={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>'};var rn=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function on(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function Ei(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function _i(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function Ha(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,s=0;s<n.length;s++)r.indexOf(n[s])===-1&&(i=!1);return i}var Wn={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,"-":rn?173:189,"=":rn?61:187,";":rn?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},kn={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},de={16:!1,18:!1,17:!1,91:!1},ce={};for(var kt=1;kt<20;kt++)Wn["f".concat(kt)]=111+kt;var re=[],Br=!1,Ri="all",Pi=[],$t=function(t){return Wn[t.toLowerCase()]||Le[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function Mi(e){Ri=e||"all"}function mt(){return Ri||"all"}function qa(){return re.slice(0)}function Va(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function Ga(e){return typeof e=="string"&&(e=$t(e)),re.indexOf(e)!==-1}function Ya(e,t){var n,r;e||(e=mt());for(var i in ce)if(Object.prototype.hasOwnProperty.call(ce,i))for(n=ce[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;mt()===e&&Mi(t||"all")}function Qa(e){var t=e.keyCode||e.which||e.charCode,n=re.indexOf(t);if(n>=0&&re.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&re.splice(0,re.length),(t===93||t===224)&&(t=91),t in de){de[t]=!1;for(var r in Le)Le[r]===t&&(ve[r]=!1)}}function Xa(e){if(typeof e>"u")Object.keys(ce).forEach(function(u){return delete ce[u]});else if(Array.isArray(e))e.forEach(function(u){u.key&&sn(u)});else if(typeof e=="object")e.key&&sn(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],s=n[1];typeof i=="function"&&(s=i,i=""),sn({key:e,scope:i,method:s,splitKey:"+"})}}var sn=function(t){var n=t.key,r=t.scope,i=t.method,s=t.splitKey,u=s===void 0?"+":s,h=_i(n);h.forEach(function(m){var g=m.split(u),f=g.length,v=g[f-1],w=v==="*"?"*":$t(v);if(ce[w]){r||(r=mt());var x=f>1?Ei(Le,g):[];ce[w]=ce[w].filter(function(S){var j=i?S.method===i:!0;return!(j&&S.scope===r&&Ha(S.mods,x))})}})};function $r(e,t,n,r){if(t.element===r){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var s in de)Object.prototype.hasOwnProperty.call(de,s)&&(!de[s]&&t.mods.indexOf(+s)>-1||de[s]&&t.mods.indexOf(+s)===-1)&&(i=!1);(t.mods.length===0&&!de[16]&&!de[18]&&!de[17]&&!de[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function Kr(e,t){var n=ce["*"],r=e.keyCode||e.which||e.charCode;if(ve.filter.call(this,e)){if((r===93||r===224)&&(r=91),re.indexOf(r)===-1&&r!==229&&re.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(S){var j=kn[S];e[S]&&re.indexOf(j)===-1?re.push(j):!e[S]&&re.indexOf(j)>-1?re.splice(re.indexOf(j),1):S==="metaKey"&&e[S]&&re.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(re=re.slice(re.indexOf(j))))}),r in de){de[r]=!0;for(var i in Le)Le[i]===r&&(ve[i]=!0);if(!n)return}for(var s in de)Object.prototype.hasOwnProperty.call(de,s)&&(de[s]=e[kn[s]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(re.indexOf(17)===-1&&re.push(17),re.indexOf(18)===-1&&re.push(18),de[17]=!0,de[18]=!0);var u=mt();if(n)for(var h=0;h<n.length;h++)n[h].scope===u&&(e.type==="keydown"&&n[h].keydown||e.type==="keyup"&&n[h].keyup)&&$r(e,n[h],u,t);if(r in ce){for(var m=0;m<ce[r].length;m++)if((e.type==="keydown"&&ce[r][m].keydown||e.type==="keyup"&&ce[r][m].keyup)&&ce[r][m].key){for(var g=ce[r][m],f=g.splitKey,v=g.key.split(f),w=[],x=0;x<v.length;x++)w.push($t(v[x]));w.sort().join("")===re.sort().join("")&&$r(e,g,u,t)}}}}function Ja(e){return Pi.indexOf(e)>-1}function ve(e,t,n){re=[];var r=_i(e),i=[],s="all",u=document,h=0,m=!1,g=!0,f="+",v=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(s=t.scope),t.element&&(u=t.element),t.keyup&&(m=t.keyup),t.keydown!==void 0&&(g=t.keydown),t.capture!==void 0&&(v=t.capture),typeof t.splitKey=="string"&&(f=t.splitKey)),typeof t=="string"&&(s=t);h<r.length;h++)e=r[h].split(f),i=[],e.length>1&&(i=Ei(Le,e)),e=e[e.length-1],e=e==="*"?"*":$t(e),e in ce||(ce[e]=[]),ce[e].push({keyup:m,keydown:g,scope:s,mods:i,shortcut:r[h],method:n,key:r[h],splitKey:f,element:u});typeof u<"u"&&!Ja(u)&&window&&(Pi.push(u),on(u,"keydown",function(w){Kr(w,u)},v),Br||(Br=!0,on(window,"focus",function(){re=[]},v)),on(u,"keyup",function(w){Kr(w,u),Qa(w)},v))}function Za(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(ce).forEach(function(n){var r=ce[n].find(function(i){return i.scope===t&&i.shortcut===e});r&&r.method&&r.method()})}var an={setScope:Mi,getScope:mt,deleteScope:Ya,getPressedKeyCodes:qa,isPressed:Ga,filter:Va,trigger:Za,unbind:Xa,keyMap:Wn,modifier:Le,modifierMap:kn};for(var ln in an)Object.prototype.hasOwnProperty.call(an,ln)&&(ve[ln]=an[ln]);if(typeof window<"u"){var el=window.hotkeys;ve.noConflict=function(e){return e&&window.hotkeys===ve&&(window.hotkeys=el),ve},window.hotkeys=ve}ve.filter=function(){return!0};var Li=function(t,n){var r=t.target,i=r&&r.tagName;return!!(i&&n&&n.includes(i))},tl=function(t){return Li(t,["INPUT","TEXTAREA","SELECT"])};function nl(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},s=i.enableOnTags,u=i.filter,h=i.keyup,m=i.keydown,g=i.filterPreventDefault,f=g===void 0?!0:g,v=i.enabled,w=v===void 0?!0:v,x=i.enableOnContentEditable,S=x===void 0?!1:x,j=z.useRef(null),R=z.useCallback(function(T,O){var M,$;return u&&!u(T)?!f:tl(T)&&!Li(T,s)||(M=T.target)!=null&&M.isContentEditable&&!S?!0:j.current===null||document.activeElement===j.current||($=j.current)!=null&&$.contains(document.activeElement)?(t(T,O),!0):!1},r?[j,s,u].concat(r):[j,s,u]);return z.useEffect(function(){if(!w){ve.unbind(e,R);return}return h&&m!==!0&&(n.keydown=!1),ve(e,n||{},R),function(){return ve.unbind(e,R)}},[R,e,w]),j}ve.isPressed;const Di=z.createContext({open:!1,toggleOpen:e=>{}});function rl({children:e}){const[t,n]=z.useState(!1),r=s=>{n(s??!s)},i=z.useMemo(()=>({open:t,toggleOpen:r}),[t]);return o.jsx(Di.Provider,{value:i,children:e})}function Bn(){return z.useContext(Di)}const Se={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},il=e=>At(async()=>{const{data:t}=await e.get(Se.categoriesPath);return Array.isArray(t)?t:[]},{manual:!0});function ol(e,t){const n=e.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...Ro(e,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...e,menu:void 0},{onFilterChange:r,onSearchSelect:i=h=>{t.onFilterChange({...n,keyword:h.title})},emptyCategory:s}=t;!n.category&&!s&&(n.category="All");const u=h=>{const m={...n,...h};r(en(m,g=>g===""||g===void 0))};return{filters:e,cleanFilter:h=>{const m=h?en(n,(g,f)=>h.includes(f)):{};r(en(m,g=>g===""||g===void 0))},handleActiveMenu:h=>{h!==e.menu&&r({menu:h})},handleSort:(h,m)=>{u({sortBy:h,sortDirection:m||h==="nameAsc"?"asc":"desc"})},handleKeyword:h=>{u({category:void 0,keyword:h||void 0})},handlePrice:h=>{u({price:h===e.price?void 0:h})},handleCategory:h=>{u({category:h===e.category?"":h})},handleDeveloper:h=>{u({owner:h||void 0})},handlePage:h=>{u({currentPage:h})},handleSwitchShowResources:h=>{u({showResources:h})},handleSearchSelect:h=>{i(h)}}}const sl=(e,t,n)=>e&&t||!n,zi=e=>[{name:e("sort.popularity"),value:"popularity"},{name:e("sort.lastPublished"),value:"publishAt"}],Fi=(e,t,n)=>{var r,i;const s=Do(e),u=zo(s.search);if((r=Fo(e,{strict:!0}))!=null&&r.endsWith(".gif"))return u.imageFilter?No({...s,search:""}):e;if(u.imageFilter)return e;const h=n||((i=window.blocklet)==null?void 0:i.version),{w:m,h:g}=typeof t=="object"?{w:t.w,h:t.h}:{w:t,h:t};return En(e,{...m||g?{imageFilter:"resize",w:m,h:g}:{},v:h})},al=e=>[{name:e("blocklet.free"),value:"free"},{name:e("blocklet.payment"),value:"payment"}],ll=(e=[],t="en")=>e.map(n=>({name:n.locales[t]||n.locales.en,value:n._id})),cl=e=>{var t,n;return Array.isArray(e)?e.map(r=>r.message).join(`
2
- `):(n=(t=e.response)==null?void 0:t.data)!=null&&n.error?e.response.data.error.message||e.response.data.error:e.message||e},ul=(e,t)=>e==null?void 0:e.replace(/{(\w*)}/g,(n,r)=>t.hasOwnProperty(r)?t[r]:""),dl=()=>window.innerWidth<=600,hl={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",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}"'}},fl={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",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}” 的所有搜索结果"}},cn={en:Sr(hl),zh:Sr(fl)},Ni=(e,t)=>{const n={};return e&&(n["x-blocklet-server-version"]=e),t&&(n["x-blocklet-store-version"]=t),n},pl=e=>(t,n)=>{const r=cn[e]?cn[e][t]:cn.en[t];return ul(r,n)||t},Ai={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},compact:!1,endpoint:"",wrapChildren:()=>null,t:e=>e,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:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},Wi=z.createContext(Ai),{Provider:ml,Consumer:Cc}=Wi;function gl(e){const{locale:t="zh",filters:n={},serverVersion:r="",onFilterChange:i=()=>{},minItemWidth:s=350,queryFilter:u=!0,layout:h={},wrapChildren:m=oe=>oe,extraFilter:g=oe=>oe,baseSearch:f=!1,fetchCategoryDelay:v=0,showResourcesSwitch:w=!1,showCategory:x=!0,tagFilters:S=[],children:j,storeVersion:R,onSearchSelect:T=()=>{},endpoint:O,blockletRender:M,compact:$=!1}=e,Q=Ni(r,R),B=z.useMemo(()=>Xr({baseURL:O,headers:Q}),[O]),q=ol(n,{onFilterChange:i,emptyCategory:!h.showExplore,onSearchSelect:T}),[ne,ae]=z.useState(""),{data:K=[],error:Ie,loading:ke,run:Te}=il(B),be=z.useMemo(()=>{const oe=fs(K,[Ee=>Ee.name],["asc"]),xe=oe.findIndex(Ee=>Ee.name==="All"||Ee.locales.en==="All");return xe>-1?[{...oe[xe],_id:"All"},...oe.slice(0,xe),...oe.slice(xe+1)]:oe},[K]),je=z.useCallback(pl(t),[t]),N=z.useMemo(()=>ll(be,t),[be,t]),X=al(je),he={search:q,compact:$,errors:{fetchCategoriesError:Ie},loadings:{fetchCategoriesLoading:ke},extraFilter:g,endpoint:O,queryFilter:u,layout:{showExplore:h.showExplore??!1,showCategory:h.showCategory??!0,showTitle:h.showTitle??!0,showSearch:h.showSearch??!0},minItemWidth:s,wrapChildren:m,t:je,storeVersion:R,serverVersion:r,selectedCategory:q.filters.category||(h.showExplore?"":"All"),categoryList:be,blockletRender:M,locale:t,categoryOptions:N,priceOptions:X,storeApi:B,baseSearch:f,showResourcesSwitch:w,showCategory:x,tagFilters:S,onFilterChange:i,getCategoryLocale:oe=>{if(!oe)return null;const xe=K.find(Ee=>Ee._id===oe||Ee.locales.en==="All");return xe?xe.locales[t]||xe.locales.en:null},get developerName(){return ne},updateDeveloperName:ae};return z.useEffect(()=>{setTimeout(Te,v||0)},[O,Te,v]),o.jsx(ml,{value:he,children:j})}function me(){return z.useContext(Wi)||Ai}function Bi({children:e,onClick:t,size:n=32,...r}){return o.jsx(we,{...r,onClick:t,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:e})}function jt(e,t){return e===void 0?t:e}function $n({xs:e,sm:t,md:n,lg:r,xl:i,exact:s}){const u=Be(),h=Qe(u.breakpoints.down("sm")),m=Qe(u.breakpoints.between("sm","md")),g=Qe(u.breakpoints.between("md","lg")),f=Qe(u.breakpoints.between("lg","xl"));if(s)return h?e||null:m?t||null:g?n||null:f?r||null:i||null;let v=e;return h||(v=jt(t,v),m)||(v=jt(n,v),g)||(v=jt(r,v),f)?v:jt(i,v)}function bl({children:e}){const{open:t,toggleOpen:n}=Bn();return o.jsx($n,{xs:o.jsx(Mo,{open:t,onClose:()=>n(!1),children:e}),md:o.jsx(V,{children:e})})}const yl=z.forwardRef(({loading:e,disabled:t,...n},r)=>o.jsx(we,{ref:r,disableElevation:!0,disabled:t||e,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:e&&o.jsx(Ce,{size:"1em"})}));function jn({value:e,options:t,onChange:n,placeholder:r,...i}){var s;const u=z.useRef(null),h=Be(),[m,g]=z.useState(!1),[f,v]=z.useState(e!==null?e:""),w=Qe(h.breakpoints.down("sm"));z.useEffect(()=>{v(e!==null?e:"")},[e]);const x=z.useCallback(()=>{g(!1)},[]),S=z.useCallback(()=>{g(!0)},[]);function j(T){v(T.value),n(T.value),w&&x()}function R(T){return T===f}return o.jsxs(o.Fragment,{children:[o.jsxs(vl,{ref:u,onClick:S,variant:"outlined",size:"medium",className:["my-select__selector",Ao(f)?"":"my-select__selector--active"].join(" "),sx:{minWidth:{xs:"100px",md:"auto"},color:"text.primary",borderRadius:"8px"},...i,children:[((s=t.find(T=>T.value===f))==null?void 0:s.name)||r,o.jsx(Wo,{className:"my-select__arrowdown",component:Oi,sx:{width:18,height:18}})]}),o.jsx(Bo,{open:m,anchorEl:u.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:T,placement:O})=>o.jsx($o,{...T,style:{transformOrigin:O==="bottom"?"center top":"center bottom"},children:o.jsx(Ko,{children:o.jsx(Uo,{onClickAway:x,children:o.jsx(xl,{autoFocusItem:m,onMouseEnter:S,onMouseLeave:x,children:t.map(M=>o.jsxs(Rt,{onClick:()=>j(M),sx:{fontSize:14},children:[o.jsx(Ho,{sx:{mr:1,fontSize:16,visibility:R(M.value)?"visible":"hidden"}}),M.name]},M.value))})})})})})]})}const vl=De(yl)`
1
+ import{bZ as xr,a6 as zt,bX as ot,df as To,r as z,c2 as wr,j as o,bh as Me,aP as Ft,aQ as Nt,d7 as st,bl as Oo,c$ as Sr,en as we,C as Ce,dp as De,K as V,al as Be,dF as Co,a3 as Eo,dS as Io,fK as Qr,fj as Jr,fL as Zr,fM as Cn,aD as _o,aE as En,aZ as pe,cs as At,fN as Ro,fO as en,k as Z,fP as Po,E as Ye,fQ as Mo,aY as ei,U as ti,cG as In,fE as Pe,av as _t,G as kr,eh as jr,aT as Lo,cI as Do,fR as zo,fS as Fo,fT as No,M as Ao,cH as Wo,fk as Bo,eA as $o,e9 as Ko,fi as Uo,Q as Rt,$ as Ho,fU as ni,fV as qo,t as ri,a2 as Qe,fW as Tr,fX as Vo,P,m as $e,aB as _n,aS as Or,eT as ii,b6 as Go,aH as wt,B as Pt,a8 as Xo,a9 as oi,aI as Yo,fY as Cr,aa as Qo,bq as Rn,D as Jo,s as Zo,V as es,cO as ts,X as lt,A as si,y as Ae,b as ns,o as rs,b3 as is,ae as os,ct as ss,cy as as,W as ls}from"./index-DR-LzDpz.js";import{u as cs}from"./index-BkuoRakK.js";import{d as us}from"./ChevronLeft-CK0wXsqo.js";import{d as ds}from"./ChevronRight-EV2u1ASi.js";import{d as Ct}from"./Search-C29PuVwY.js";import{E as hs}from"./index-DVLGVAgs.js";import{o as fs,u as ps}from"./blocklet-CVPCTpAm.js";import{A as ms}from"./Autocomplete-CR1bdhJ8.js";import{d as gs}from"./Verified-BLKTzR1S.js";import{d as bs,a as ys}from"./VerifiedUser-B9UfFGjN.js";import{d as vs}from"./Add-B9VQn0vA.js";import{d as ai}from"./Launch-B2oUG1C0.js";import{d as xs}from"./Done-DJvQ4tWu.js";import{d as li}from"./DeleteOutline-CtJvLUtz.js";import{D as ws}from"./delete-confirm-DqkJQzdi.js";import{d as Ss}from"./MoreVert-k56JiJFI.js";import{g as dt}from"./get-safe-url-BBt-uWG8.js";import{B as Er}from"./ButtonGroup-wDVjf00e.js";const ks=["name"],js=["children","className","clone","component"];function Ts(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function Os(e){return(n,r={})=>{const{name:i}=r,s=xr(r,ks);let u=i;const m=zt(typeof n=="function"?v=>({root:w=>n(ot({theme:v},w))}):{root:n},ot({Component:e,name:i||e.displayName,classNamePrefix:u},s));let g;n.filterProps&&(g=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);const f=z.forwardRef(function(w,x){const{children:S,className:j,clone:R,component:T}=w,O=xr(w,js),M=m(w),$=wr(M.root,j);let Y=O;if(g&&(Y=Ts(Y,g)),R)return z.cloneElement(S,ot({className:wr(S.props.className,$)},Y));if(typeof S=="function")return S(ot({className:$},Y));const B=T||e;return o.jsx(B,ot({ref:x,className:$},Y,{children:S}))});return To(f,e),f}}const Tc="blocklet-add-component-registry",Oc="server-add-registry",Cs={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>'},ct=/^[a-z0-9]+(-[a-z0-9]+)*$/,Wt=(e,t,n,r="")=>{const i=e.split(":");if(e.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 h=i.pop(),m=i.pop(),g={provider:i.length>0?i[0]:r,prefix:m,name:h};return t&&!Et(g)?null:g}const s=i[0],u=s.split("-");if(u.length>1){const h={provider:r,prefix:u.shift(),name:u.join("-")};return t&&!Et(h)?null:h}if(n&&r===""){const h={provider:r,prefix:"",name:s};return t&&!Et(h,n)?null:h}return null},Et=(e,t)=>e?!!((e.provider===""||e.provider.match(ct))&&(t&&e.prefix===""||e.prefix.match(ct))&&e.name.match(ct)):!1,ci=Object.freeze({left:0,top:0,width:16,height:16}),Mt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Pn=Object.freeze({...ci,...Mt}),mn=Object.freeze({...Pn,body:"",hidden:!1});function Es(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Ir(e,t){const n=Es(e,t);for(const r in mn)r in Mt?r in e&&!(r in n)&&(n[r]=Mt[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Is(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(u){if(n[u])return i[u]=[];if(!(u in i)){i[u]=null;const h=r[u]&&r[u].parent,m=h&&s(h);m&&(i[u]=[h].concat(m))}return i[u]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function _s(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function u(h){s=Ir(r[h]||i[h],s)}return u(t),n.forEach(u),Ir(e,s)}function ui(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Is(e);for(const i in r){const s=r[i];s&&(t(i,_s(e,i,s)),n.push(i))}return n}const Rs={provider:"",aliases:{},not_found:{},...ci};function tn(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function di(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!tn(e,Rs))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i.match(ct)||typeof s.body!="string"||!tn(s,mn))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],u=s.parent;if(!i.match(ct)||typeof u!="string"||!n[u]&&!r[u]||!tn(s,mn))return null}return t}const _r=Object.create(null);function Ps(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function We(e,t){const n=_r[e]||(_r[e]=Object.create(null));return n[t]||(n[t]=Ps(e,t))}function Mn(e,t){return di(t)?ui(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Ms(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let ht=!1;function hi(e){return typeof e=="boolean"&&(ht=e),ht}function Ls(e){const t=typeof e=="string"?Wt(e,!0,ht):e;if(t){const n=We(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Ds(e,t){const n=Wt(e,!0,ht);if(!n)return!1;const r=We(n.provider,n.prefix);return Ms(r,n.name,t)}function zs(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ht&&!t&&!e.prefix){let i=!1;return di(e)&&(e.prefix="",ui(e,(s,u)=>{u&&Ds(s,u)&&(i=!0)})),i}const n=e.prefix;if(!Et({provider:t,prefix:n,name:"a"}))return!1;const r=We(t,n);return!!Mn(r,e)}const fi=Object.freeze({width:null,height:null}),pi=Object.freeze({...fi,...Mt}),Fs=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ns=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rr(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Fs);if(r===null||!r.length)return e;const i=[];let s=r.shift(),u=Ns.test(s);for(;;){if(u){const h=parseFloat(s);isNaN(h)?i.push(s):i.push(Math.ceil(h*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");u=!u}}const As=e=>e==="unset"||e==="undefined"||e==="none";function Ws(e,t){const n={...Pn,...e},r={...pi,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(S=>{const j=[],R=S.hFlip,T=S.vFlip;let O=S.rotate;R?T?O+=2:(j.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),j.push("scale(-1 1)"),i.top=i.left=0):T&&(j.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),j.push("scale(1 -1)"),i.top=i.left=0);let M;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:M=i.height/2+i.top,j.unshift("rotate(90 "+M.toString()+" "+M.toString()+")");break;case 2:j.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:M=i.width/2+i.left,j.unshift("rotate(-90 "+M.toString()+" "+M.toString()+")");break}O%2===1&&(i.left!==i.top&&(M=i.left,i.left=i.top,i.top=M),i.width!==i.height&&(M=i.width,i.width=i.height,i.height=M)),j.length&&(s='<g transform="'+j.join(" ")+'">'+s+"</g>")});const u=r.width,h=r.height,m=i.width,g=i.height;let f,v;u===null?(v=h===null?"1em":h==="auto"?g:h,f=Rr(v,m/g)):(f=u==="auto"?m:u,v=h===null?Rr(f,g/m):h==="auto"?g:h);const w={},x=(S,j)=>{As(j)||(w[S]=j.toString())};return x("width",f),x("height",v),w.viewBox=i.left.toString()+" "+i.top.toString()+" "+m.toString()+" "+g.toString(),{attributes:w,body:s}}const Bs=/\sid="(\S+)"/g,$s="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ks=0;function Us(e,t=$s){const n=[];let r;for(;r=Bs.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const u=typeof t=="function"?t(s):t+(Ks++).toString(),h=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+h+')([")]|\\.[a-z])',"g"),"$1"+u+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const gn=Object.create(null);function Hs(e,t){gn[e]=t}function bn(e){return gn[e]||gn[""]}function Ln(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Dn=Object.create(null),at=["https://api.simplesvg.com","https://api.unisvg.com"],It=[];for(;at.length>0;)at.length===1||Math.random()>.5?It.push(at.shift()):It.push(at.pop());Dn[""]=Ln({resources:["https://api.iconify.design"].concat(It)});function qs(e,t){const n=Ln(t);return n===null?!1:(Dn[e]=n,!0)}function zn(e){return Dn[e]}const Vs=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pr=Vs();function Gs(e,t){const n=zn(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(u=>{i=Math.max(i,u.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function Xs(e){return e===404}const Ys=(e,t,n)=>{const r=[],i=Gs(e,t),s="icons";let u={type:s,provider:e,prefix:t,icons:[]},h=0;return n.forEach((m,g)=>{h+=m.length+1,h>=i&&g>0&&(r.push(u),u={type:s,provider:e,prefix:t,icons:[]},h=m.length),u.icons.push(m)}),r.push(u),r};function Qs(e){if(typeof e=="string"){const t=zn(e);if(t)return t.path}return"/"}const Js=(e,t,n)=>{if(!Pr){n("abort",424);return}let r=Qs(t.provider);switch(t.type){case"icons":{const s=t.prefix,h=t.icons.join(","),m=new URLSearchParams({icons:h});r+=s+".json?"+m.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Pr(e+r).then(s=>{const u=s.status;if(u!==200){setTimeout(()=>{n(Xs(u)?"abort":"next",u)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},Zs={prepare:Ys,send:Js};function ea(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,u=i.prefix,h=i.name,m=n[s]||(n[s]=Object.create(null)),g=m[u]||(m[u]=We(s,u));let f;h in g.icons?f=t.loaded:u===""||g.missing.has(h)?f=t.missing:f=t.pending;const v={provider:s,prefix:u,name:h};f.push(v)}),t}function mi(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function ta(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const u=s.icons,h=u.pending.length;u.pending=u.pending.filter(m=>{if(m.prefix!==i)return!0;const g=m.name;if(e.icons[g])u.loaded.push({provider:r,prefix:i,name:g});else if(e.missing.has(g))u.missing.push({provider:r,prefix:i,name:g});else return n=!0,!0;return!1}),u.pending.length!==h&&(n||mi([e],s.id),s.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),s.abort))})}))}let na=0;function ra(e,t,n){const r=na++,i=mi.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(s)}),i}function ia(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?Wt(i,t,n):i;s&&r.push(s)}),r}var oa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sa(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let u;if(e.random){let B=e.resources.slice(0);for(u=[];B.length>1;){const q=Math.floor(Math.random()*B.length);u.push(B[q]),B=B.slice(0,q).concat(B.slice(q+1))}u=u.concat(B)}else u=e.resources.slice(s).concat(e.resources.slice(0,s));const h=Date.now();let m="pending",g=0,f,v=null,w=[],x=[];typeof r=="function"&&x.push(r);function S(){v&&(clearTimeout(v),v=null)}function j(){m==="pending"&&(m="aborted"),S(),w.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),w=[]}function R(B,q){q&&(x=[]),typeof B=="function"&&x.push(B)}function T(){return{startTime:h,payload:t,status:m,queriesSent:g,queriesPending:w.length,subscribe:R,abort:j}}function O(){m="failed",x.forEach(B=>{B(void 0,f)})}function M(){w.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),w=[]}function $(B,q,ne){const ae=q!=="success";switch(w=w.filter(K=>K!==B),m){case"pending":break;case"failed":if(ae||!e.dataAfterTimeout)return;break;default:return}if(q==="abort"){f=ne,O();return}if(ae){f=ne,w.length||(u.length?Y():O());return}if(S(),M(),!e.random){const K=e.resources.indexOf(B.resource);K!==-1&&K!==e.index&&(e.index=K)}m="completed",x.forEach(K=>{K(ne)})}function Y(){if(m!=="pending")return;S();const B=u.shift();if(B===void 0){if(w.length){v=setTimeout(()=>{S(),m==="pending"&&(M(),O())},e.timeout);return}O();return}const q={status:"pending",resource:B,callback:(ne,ae)=>{$(q,ne,ae)}};w.push(q),g++,v=setTimeout(Y,e.rotate),n(B,t,q.callback)}return setTimeout(Y),T}function gi(e){const t={...oa,...e};let n=[];function r(){n=n.filter(h=>h().status==="pending")}function i(h,m,g){const f=sa(t,h,m,(v,w)=>{r(),g&&g(v,w)});return n.push(f),f}function s(h){return n.find(m=>h(m))||null}return{query:i,find:s,setIndex:h=>{t.index=h},getIndex:()=>t.index,cleanup:r}}function Mr(){}const nn=Object.create(null);function aa(e){if(!nn[e]){const t=zn(e);if(!t)return;const n=gi(t),r={config:t,redundancy:n};nn[e]=r}return nn[e]}function la(e,t,n){let r,i;if(typeof e=="string"){const s=bn(e);if(!s)return n(void 0,424),Mr;i=s.send;const u=aa(e);u&&(r=u.redundancy)}else{const s=Ln(e);if(s){r=gi(s);const u=e.resources?e.resources[0]:"",h=bn(u);h&&(i=h.send)}}return!r||!i?(n(void 0,424),Mr):r.query(t,i,n)().abort}const Lr="iconify2",ft="iconify",bi=ft+"-count",Dr=ft+"-version",yi=36e5,ca=168;function yn(e,t){try{return e.getItem(t)}catch{}}function Fn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function zr(e,t){try{e.removeItem(t)}catch{}}function vn(e,t){return Fn(e,bi,t.toString())}function xn(e){return parseInt(yn(e,bi))||0}const Bt={local:!0,session:!0},vi={local:new Set,session:new Set};let Nn=!1;function ua(e){Nn=e}let St=typeof window>"u"?{}:window;function xi(e){const t=e+"Storage";try{if(St&&St[t]&&typeof St[t].length=="number")return St[t]}catch{}Bt[e]=!1}function wi(e,t){const n=xi(e);if(!n)return;const r=yn(n,Dr);if(r!==Lr){if(r){const h=xn(n);for(let m=0;m<h;m++)zr(n,ft+m.toString())}Fn(n,Dr,Lr),vn(n,0);return}const i=Math.floor(Date.now()/yi)-ca,s=h=>{const m=ft+h.toString(),g=yn(n,m);if(typeof g=="string"){try{const f=JSON.parse(g);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>i&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&t(f,h))return!0}catch{}zr(n,m)}};let u=xn(n);for(let h=u-1;h>=0;h--)s(h)||(h===u-1?(u--,vn(n,u)):vi[e].add(h))}function Si(){if(!Nn){ua(!0);for(const e in Bt)wi(e,t=>{const n=t.data,r=t.provider,i=n.prefix,s=We(r,i);if(!Mn(s,n).length)return!1;const u=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,u):u,!0})}}function da(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Bt)wi(r,i=>{const s=i.data;return i.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function ha(e,t){Nn||Si();function n(r){let i;if(!Bt[r]||!(i=xi(r)))return;const s=vi[r];let u;if(s.size)s.delete(u=Array.from(s).shift());else if(u=xn(i),!vn(i,u+1))return;const h={cached:Math.floor(Date.now()/yi),provider:e.provider,data:t};return Fn(i,ft+u.toString(),JSON.stringify(h))}t.lastModified&&!da(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fr(){}function fa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ta(e)}))}function pa(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad;let s;if(!i||!(s=bn(n)))return;s.prepare(n,r,i).forEach(h=>{la(n,h,m=>{if(typeof m!="object")h.icons.forEach(g=>{e.missing.add(g)});else try{const g=Mn(e,m);if(!g.length)return;const f=e.pendingIcons;f&&g.forEach(v=>{f.delete(v)}),ha(e,m)}catch(g){console.error(g)}fa(e)})})}))}const ma=(e,t)=>{const n=ia(e,!0,hi()),r=ea(n);if(!r.pending.length){let m=!0;return t&&setTimeout(()=>{m&&t(r.loaded,r.missing,r.pending,Fr)}),()=>{m=!1}}const i=Object.create(null),s=[];let u,h;return r.pending.forEach(m=>{const{provider:g,prefix:f}=m;if(f===h&&g===u)return;u=g,h=f,s.push(We(g,f));const v=i[g]||(i[g]=Object.create(null));v[f]||(v[f]=[])}),r.pending.forEach(m=>{const{provider:g,prefix:f,name:v}=m,w=We(g,f),x=w.pendingIcons||(w.pendingIcons=new Set);x.has(v)||(x.add(v),i[g][f].push(v))}),s.forEach(m=>{const{provider:g,prefix:f}=m;i[g][f].length&&pa(m,i[g][f])}),t?ra(t,r,s):Fr};function ga(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in fi?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const ba=/[\s,]+/;function ya(e,t){t.split(ba).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function va(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function xa(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function wa(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Sa(e){return"data:image/svg+xml,"+wa(e)}function ka(e){return'url("'+Sa(e)+'")'}let ut;function ja(){try{ut=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ut=null}}function Ta(e){return ut===void 0&&ja(),ut?ut.createHTML(e):e}const ki={...pi,inline:!1},Oa={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ca={display:"inline-block"},wn={backgroundColor:"currentColor"},ji={backgroundColor:"transparent"},Nr={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ar={WebkitMask:wn,mask:wn,background:ji};for(const e in Ar){const t=Ar[e];for(const n in Nr)t[e+n]=Nr[n]}const Ea={...ki,inline:!0};function Wr(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ia=(e,t,n,r)=>{const i=n?Ea:ki,s=ga(i,t),u=t.mode||"svg",h={},m=t.style||{},g={...u==="svg"?Oa:{},ref:r};for(let T in t){const O=t[T];if(O!==void 0)switch(T){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":s[T]=O===!0||O==="true"||O===1;break;case"flip":typeof O=="string"&&ya(s,O);break;case"color":h.color=O;break;case"rotate":typeof O=="string"?s[T]=va(O):typeof O=="number"&&(s[T]=O);break;case"ariaHidden":case"aria-hidden":O!==!0&&O!=="true"&&delete g["aria-hidden"];break;default:i[T]===void 0&&(g[T]=O)}}const f=Ws(e,s),v=f.attributes;if(s.inline&&(h.verticalAlign="-0.125em"),u==="svg"){g.style={...h,...m},Object.assign(g,v);let T=0,O=t.id;return typeof O=="string"&&(O=O.replace(/-/g,"_")),g.dangerouslySetInnerHTML={__html:Ta(Us(f.body,O?()=>O+"ID"+T++:"iconifyReact"))},Me.createElement("svg",g)}const{body:w,width:x,height:S}=e,j=u==="mask"||(u==="bg"?!1:w.indexOf("currentColor")!==-1),R=xa(w,{...v,width:x+"",height:S+""});return g.style={...h,"--svg":ka(R),width:Wr(v.width),height:Wr(v.height),...Ca,...j?wn:ji,...m},Me.createElement("span",g)};hi(!0);Hs("",Zs);if(typeof document<"u"&&typeof window<"u"){Si();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!zs(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;qs(n,i)||console.error(r)}catch{console.error(r)}}}}class Ti extends Me.Component{constructor(t){super(t),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(t){this.state.icon!==t&&this.setState({icon:t})}_checkIcon(t){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(t||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=Wt(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const s=Ls(i);if(!s){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),s!==null&&(this._loading={name:r,abort:ma([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const u=["iconify"];i.prefix!==""&&u.push("iconify--"+i.prefix),i.provider!==""&&u.push("iconify--"+i.provider),this._setData({data:s,classes:u}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(t){t.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const t=this.props,n=this.state.icon;if(n===null)return t.children?t.children:Me.createElement("span",{});let r=t;return n.classes&&(r={...t,className:(typeof t.className=="string"?t.className+" ":"")+n.classes.join(" ")}),Ia({...Pn,...n.data},r,t._inline,t._ref)}}const pt=Me.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!1};return Me.createElement(Ti,r)});Me.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!0};return Me.createElement(Ti,r)});var An={},_a=Nt;Object.defineProperty(An,"__esModule",{value:!0});var Oi=An.default=void 0,Ra=_a(Ft()),Pa=o;Oi=An.default=(0,Ra.default)((0,Pa.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");const Ci={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 Ei={exports:{}};(function(e,t){(function(n,r){e.exports=r(z)})(st,n=>(()=>{var r={703:(h,m,g)=>{var f=g(414);function v(){}function w(){}w.resetWarningCache=v,h.exports=function(){function x(R,T,O,M,$,Y){if(Y!==f){var B=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 B.name="Invariant Violation",B}}function S(){return x}x.isRequired=x;var j={array:x,bool:x,func:x,number:x,object:x,string:x,symbol:x,any:x,arrayOf:S,element:x,elementType:x,instanceOf:S,node:x,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:w,resetWarningCache:v};return j.PropTypes=j,j}},697:(h,m,g)=>{h.exports=g(703)()},414:h=>{h.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:h=>{var m=typeof Element<"u",g=typeof Map=="function",f=typeof Set=="function",v=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function w(x,S){if(x===S)return!0;if(x&&S&&typeof x=="object"&&typeof S=="object"){if(x.constructor!==S.constructor)return!1;var j,R,T,O;if(Array.isArray(x)){if((j=x.length)!=S.length)return!1;for(R=j;R--!=0;)if(!w(x[R],S[R]))return!1;return!0}if(g&&x instanceof Map&&S instanceof Map){if(x.size!==S.size)return!1;for(O=x.entries();!(R=O.next()).done;)if(!S.has(R.value[0]))return!1;for(O=x.entries();!(R=O.next()).done;)if(!w(R.value[1],S.get(R.value[0])))return!1;return!0}if(f&&x instanceof Set&&S instanceof Set){if(x.size!==S.size)return!1;for(O=x.entries();!(R=O.next()).done;)if(!S.has(R.value[0]))return!1;return!0}if(v&&ArrayBuffer.isView(x)&&ArrayBuffer.isView(S)){if((j=x.length)!=S.length)return!1;for(R=j;R--!=0;)if(x[R]!==S[R])return!1;return!0}if(x.constructor===RegExp)return x.source===S.source&&x.flags===S.flags;if(x.valueOf!==Object.prototype.valueOf)return x.valueOf()===S.valueOf();if(x.toString!==Object.prototype.toString)return x.toString()===S.toString();if((j=(T=Object.keys(x)).length)!==Object.keys(S).length)return!1;for(R=j;R--!=0;)if(!Object.prototype.hasOwnProperty.call(S,T[R]))return!1;if(m&&x instanceof Element)return!1;for(R=j;R--!=0;)if((T[R]!=="_owner"&&T[R]!=="__v"&&T[R]!=="__o"||!x.$$typeof)&&!w(x[T[R]],S[T[R]]))return!1;return!0}return x!=x&&S!=S}h.exports=function(x,S){try{return w(x,S)}catch(j){if((j.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw j}}},359:h=>{h.exports=n}},i={};function s(h){var m=i[h];if(m!==void 0)return m.exports;var g=i[h]={exports:{}};return r[h](g,g.exports,s),g.exports}s.n=h=>{var m=h&&h.__esModule?()=>h.default:()=>h;return s.d(m,{a:m}),m},s.d=(h,m)=>{for(var g in m)s.o(m,g)&&!s.o(h,g)&&Object.defineProperty(h,g,{enumerable:!0,get:m[g]})},s.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),s.o=(h,m)=>Object.prototype.hasOwnProperty.call(h,m),s.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var u={};return(()=>{function h(d){var a,p,b="";if(typeof d=="string"||typeof d=="number")b+=d;else if(typeof d=="object")if(Array.isArray(d))for(a=0;a<d.length;a++)d[a]&&(p=h(d[a]))&&(b&&(b+=" "),b+=p);else for(a in d)d[a]&&(b&&(b+=" "),b+=a);return b}function m(){for(var d,a,p=0,b="";p<arguments.length;)(d=arguments[p++])&&(a=h(d))&&(b&&(b+=" "),b+=a);return b}s.r(u),s.d(u,{default:()=>ko});var g=s(359),f=s.n(g);const v=function(d){var a=typeof d;return d!=null&&(a=="object"||a=="function")},w=typeof st=="object"&&st&&st.Object===Object&&st;var x=typeof self=="object"&&self&&self.Object===Object&&self;const S=w||x||Function("return this")(),j=function(){return S.Date.now()};var R=/\s/,T=/^\s+/;const O=function(d){return d&&d.slice(0,function(a){for(var p=a.length;p--&&R.test(a.charAt(p)););return p}(d)+1).replace(T,"")},M=S.Symbol;var $=Object.prototype,Y=$.hasOwnProperty,B=$.toString,q=M?M.toStringTag:void 0,ne=Object.prototype.toString,ae=M?M.toStringTag:void 0;const K=function(d){return d==null?d===void 0?"[object Undefined]":"[object Null]":ae&&ae in Object(d)?function(a){var p=Y.call(a,q),b=a[q];try{a[q]=void 0;var I=!0}catch{}var A=B.call(a);return I&&(p?a[q]=b:delete a[q]),A}(d):function(a){return ne.call(a)}(d)};var Ee=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Te=/^0o[0-7]+$/i,be=parseInt;const je=function(d){if(typeof d=="number")return d;if(function(b){return typeof b=="symbol"||function(I){return I!=null&&typeof I=="object"}(b)&&K(b)=="[object Symbol]"}(d))return NaN;if(v(d)){var a=typeof d.valueOf=="function"?d.valueOf():d;d=v(a)?a+"":a}if(typeof d!="string")return d===0?d:+d;d=O(d);var p=ke.test(d);return p||Te.test(d)?be(d.slice(2),p?2:8):Ee.test(d)?NaN:+d};var N=Math.max,Q=Math.min;const he=function(d,a,p){var b,I,A,J,c,l,y=0,C=!1,_=!1,E=!0;if(typeof d!="function")throw new TypeError("Expected a function");function H(W){var X=b,ee=I;return b=I=void 0,y=W,J=d.apply(ee,X)}function U(W){return y=W,c=setTimeout(L,a),C?H(W):J}function G(W){var X=W-l;return l===void 0||X>=a||X<0||_&&W-y>=A}function L(){var W=j();if(G(W))return D(W);c=setTimeout(L,function(X){var ee=a-(X-l);return _?Q(ee,A-(X-y)):ee}(W))}function D(W){return c=void 0,E&&b?H(W):(b=I=void 0,J)}function F(){var W=j(),X=G(W);if(b=arguments,I=this,l=W,X){if(c===void 0)return U(l);if(_)return clearTimeout(c),c=setTimeout(L,a),H(l)}return c===void 0&&(c=setTimeout(L,a)),J}return a=je(a)||0,v(p)&&(C=!!p.leading,A=(_="maxWait"in p)?N(je(p.maxWait)||0,a):A,E="trailing"in p?!!p.trailing:E),F.cancel=function(){c!==void 0&&clearTimeout(c),y=0,b=l=I=c=void 0},F.flush=function(){return c===void 0?J:D(j())},F},oe=function(d,a,p){var b=!0,I=!0;if(typeof d!="function")throw new TypeError("Expected a function");return v(p)&&(b="leading"in p?!!p.leading:b,I="trailing"in p?!!p.trailing:I),he(d,a,{leading:b,maxWait:a,trailing:I})};var xe=s(590),Ie=s.n(xe),Xn=function(){if(typeof Map<"u")return Map;function d(a,p){var b=-1;return a.some(function(I,A){return I[0]===p&&(b=A,!0)}),b}return function(){function a(){this.__entries__=[]}return Object.defineProperty(a.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),a.prototype.get=function(p){var b=d(this.__entries__,p),I=this.__entries__[b];return I&&I[1]},a.prototype.set=function(p,b){var I=d(this.__entries__,p);~I?this.__entries__[I][1]=b:this.__entries__.push([p,b])},a.prototype.delete=function(p){var b=this.__entries__,I=d(b,p);~I&&b.splice(I,1)},a.prototype.has=function(p){return!!~d(this.__entries__,p)},a.prototype.clear=function(){this.__entries__.splice(0)},a.prototype.forEach=function(p,b){b===void 0&&(b=null);for(var I=0,A=this.__entries__;I<A.length;I++){var J=A[I];p.call(b,J[1],J[0])}},a}()}(),Ut=typeof window<"u"&&typeof document<"u"&&window.document===document,gt=s.g!==void 0&&s.g.Math===Math?s.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Qi=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(gt):function(d){return setTimeout(function(){return d(Date.now())},1e3/60)},Ji=["top","right","bottom","left","width","height","size","weight"],Zi=typeof MutationObserver<"u",eo=function(){function d(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(a,p){var b=!1,I=!1,A=0;function J(){b&&(b=!1,a()),I&&l()}function c(){Qi(J)}function l(){var y=Date.now();if(b){if(y-A<2)return;I=!0}else b=!0,I=!1,setTimeout(c,20);A=y}return l}(this.refresh.bind(this))}return d.prototype.addObserver=function(a){~this.observers_.indexOf(a)||this.observers_.push(a),this.connected_||this.connect_()},d.prototype.removeObserver=function(a){var p=this.observers_,b=p.indexOf(a);~b&&p.splice(b,1),!p.length&&this.connected_&&this.disconnect_()},d.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},d.prototype.updateObservers_=function(){var a=this.observers_.filter(function(p){return p.gatherActive(),p.hasActive()});return a.forEach(function(p){return p.broadcastActive()}),a.length>0},d.prototype.connect_=function(){Ut&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Zi?(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)},d.prototype.disconnect_=function(){Ut&&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)},d.prototype.onTransitionEnd_=function(a){var p=a.propertyName,b=p===void 0?"":p;Ji.some(function(I){return!!~b.indexOf(I)})&&this.refresh()},d.getInstance=function(){return this.instance_||(this.instance_=new d),this.instance_},d.instance_=null,d}(),Yn=function(d,a){for(var p=0,b=Object.keys(a);p<b.length;p++){var I=b[p];Object.defineProperty(d,I,{value:a[I],enumerable:!1,writable:!1,configurable:!0})}return d},Ke=function(d){return d&&d.ownerDocument&&d.ownerDocument.defaultView||gt},Qn=yt(0,0,0,0);function bt(d){return parseFloat(d)||0}function Jn(d){for(var a=[],p=1;p<arguments.length;p++)a[p-1]=arguments[p];return a.reduce(function(b,I){return b+bt(d["border-"+I+"-width"])},0)}var to=typeof SVGGraphicsElement<"u"?function(d){return d instanceof Ke(d).SVGGraphicsElement}:function(d){return d instanceof Ke(d).SVGElement&&typeof d.getBBox=="function"};function no(d){return Ut?to(d)?function(a){var p=a.getBBox();return yt(0,0,p.width,p.height)}(d):function(a){var p=a.clientWidth,b=a.clientHeight;if(!p&&!b)return Qn;var I=Ke(a).getComputedStyle(a),A=function(E){for(var H={},U=0,G=["top","right","bottom","left"];U<G.length;U++){var L=G[U],D=E["padding-"+L];H[L]=bt(D)}return H}(I),J=A.left+A.right,c=A.top+A.bottom,l=bt(I.width),y=bt(I.height);if(I.boxSizing==="border-box"&&(Math.round(l+J)!==p&&(l-=Jn(I,"left","right")+J),Math.round(y+c)!==b&&(y-=Jn(I,"top","bottom")+c)),!function(E){return E===Ke(E).document.documentElement}(a)){var C=Math.round(l+J)-p,_=Math.round(y+c)-b;Math.abs(C)!==1&&(l-=C),Math.abs(_)!==1&&(y-=_)}return yt(A.left,A.top,l,y)}(d):Qn}function yt(d,a,p,b){return{x:d,y:a,width:p,height:b}}var ro=function(){function d(a){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=yt(0,0,0,0),this.target=a}return d.prototype.isActive=function(){var a=no(this.target);return this.contentRect_=a,a.width!==this.broadcastWidth||a.height!==this.broadcastHeight},d.prototype.broadcastRect=function(){var a=this.contentRect_;return this.broadcastWidth=a.width,this.broadcastHeight=a.height,a},d}(),io=function(d,a){var p,b,I,A,J,c,l,y=(b=(p=a).x,I=p.y,A=p.width,J=p.height,c=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,l=Object.create(c.prototype),Yn(l,{x:b,y:I,width:A,height:J,top:I,right:b+A,bottom:J+I,left:b}),l);Yn(this,{target:d,contentRect:y})},oo=function(){function d(a,p,b){if(this.activeObservations_=[],this.observations_=new Xn,typeof a!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=a,this.controller_=p,this.callbackCtx_=b}return d.prototype.observe=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(a instanceof Ke(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var p=this.observations_;p.has(a)||(p.set(a,new ro(a)),this.controller_.addObserver(this),this.controller_.refresh())}},d.prototype.unobserve=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(a instanceof Ke(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var p=this.observations_;p.has(a)&&(p.delete(a),p.size||this.controller_.removeObserver(this))}},d.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},d.prototype.gatherActive=function(){var a=this;this.clearActive(),this.observations_.forEach(function(p){p.isActive()&&a.activeObservations_.push(p)})},d.prototype.broadcastActive=function(){if(this.hasActive()){var a=this.callbackCtx_,p=this.activeObservations_.map(function(b){return new io(b.target,b.broadcastRect())});this.callback_.call(a,p,a),this.clearActive()}},d.prototype.clearActive=function(){this.activeObservations_.splice(0)},d.prototype.hasActive=function(){return this.activeObservations_.length>0},d}(),Zn=typeof WeakMap<"u"?new WeakMap:new Xn,er=function d(a){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var p=eo.getInstance(),b=new oo(a,p,this);Zn.set(this,b)};["observe","unobserve","disconnect"].forEach(function(d){er.prototype[d]=function(){var a;return(a=Zn.get(this))[d].apply(a,arguments)}});const tr=gt.ResizeObserver!==void 0?gt.ResizeObserver:er,Ue="Left",ze="Right",He="Up",Fe="Down",qe={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Ht={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},nr="mousemove",rr="mouseup";function ir(d,a){if(a===0)return d;const p=Math.PI/180*a;return[d[0]*Math.cos(p)+d[1]*Math.sin(p),d[1]*Math.cos(p)-d[0]*Math.sin(p)]}function so(d){const{trackMouse:a}=d,p=g.useRef(Object.assign({},Ht)),b=g.useRef(Object.assign({},qe)),I=g.useRef(Object.assign({},b.current));let A;for(A in I.current=Object.assign({},b.current),b.current=Object.assign(Object.assign({},qe),d),qe)b.current[A]===void 0&&(b.current[A]=qe[A]);const[J,c]=g.useMemo(()=>function(l,y){const C=L=>{const D="touches"in L;D&&L.touches.length>1||l((F,W)=>{W.trackMouse&&!D&&(document.addEventListener(nr,_),document.addEventListener(rr,H));const{clientX:X,clientY:ee}=D?L.touches[0]:L,se=ir([X,ee],W.rotationAngle);return W.onTouchStartOrOnMouseDown&&W.onTouchStartOrOnMouseDown({event:L}),Object.assign(Object.assign(Object.assign({},F),Ht),{initial:se.slice(),xy:se,start:L.timeStamp||0})})},_=L=>{l((D,F)=>{const W="touches"in L;if(W&&L.touches.length>1)return D;if(L.timeStamp-D.start>F.swipeDuration)return D.swiping?Object.assign(Object.assign({},D),{swiping:!1}):D;const{clientX:X,clientY:ee}=W?L.touches[0]:L,[se,ge]=ir([X,ee],F.rotationAngle),fe=se-D.xy[0],ue=ge-D.xy[1],ie=Math.abs(fe),te=Math.abs(ue),Re=(L.timeStamp||0)-D.start,tt=Math.sqrt(ie*ie+te*te)/(Re||1),nt=[fe/(Re||1),ue/(Re||1)],_e=function(rt,Xe,it,ye){return rt>Xe?it>0?ze:Ue:ye>0?Fe:He}(ie,te,fe,ue),Ne=typeof F.delta=="number"?F.delta:F.delta[_e.toLowerCase()]||qe.delta;if(ie<Ne&&te<Ne&&!D.swiping)return D;const Oe={absX:ie,absY:te,deltaX:fe,deltaY:ue,dir:_e,event:L,first:D.first,initial:D.initial,velocity:tt,vxvy:nt};Oe.first&&F.onSwipeStart&&F.onSwipeStart(Oe),F.onSwiping&&F.onSwiping(Oe);let Ge=!1;return(F.onSwiping||F.onSwiped||F[`onSwiped${_e}`])&&(Ge=!0),Ge&&F.preventScrollOnSwipe&&F.trackTouch&&L.cancelable&&L.preventDefault(),Object.assign(Object.assign({},D),{first:!1,eventData:Oe,swiping:!0})})},E=L=>{l((D,F)=>{let W;if(D.swiping&&D.eventData){if(L.timeStamp-D.start<F.swipeDuration){W=Object.assign(Object.assign({},D.eventData),{event:L}),F.onSwiped&&F.onSwiped(W);const X=F[`onSwiped${W.dir}`];X&&X(W)}}else F.onTap&&F.onTap({event:L});return F.onTouchEndOrOnMouseUp&&F.onTouchEndOrOnMouseUp({event:L}),Object.assign(Object.assign(Object.assign({},D),Ht),{eventData:W})})},H=L=>{document.removeEventListener(nr,_),document.removeEventListener(rr,H),E(L)},U=(L,D)=>{let F=()=>{};if(L&&L.addEventListener){const W=Object.assign(Object.assign({},qe.touchEventOptions),D.touchEventOptions),X=[["touchstart",C,W],["touchmove",_,Object.assign(Object.assign({},W),D.preventScrollOnSwipe?{passive:!1}:{})],["touchend",E,W]];X.forEach(([ee,se,ge])=>L.addEventListener(ee,se,ge)),F=()=>X.forEach(([ee,se])=>L.removeEventListener(ee,se))}return F},G={ref:L=>{L!==null&&l((D,F)=>{if(D.el===L)return D;const W={};return D.el&&D.el!==L&&D.cleanUpTouch&&(D.cleanUpTouch(),W.cleanUpTouch=void 0),F.trackTouch&&L&&(W.cleanUpTouch=U(L,F)),Object.assign(Object.assign(Object.assign({},D),{el:L}),W)})}};return y.trackMouse&&(G.onMouseDown=C),[G,U]}(l=>p.current=l(p.current,b.current),{trackMouse:a}),[a]);return p.current=function(l,y,C,_){return y.trackTouch&&l.el?l.cleanUpTouch?y.preventScrollOnSwipe!==C.preventScrollOnSwipe||y.touchEventOptions.passive!==C.touchEventOptions.passive?(l.cleanUpTouch(),Object.assign(Object.assign({},l),{cleanUpTouch:_(l.el,y)})):l:Object.assign(Object.assign({},l),{cleanUpTouch:_(l.el,y)}):(l.cleanUpTouch&&l.cleanUpTouch(),Object.assign(Object.assign({},l),{cleanUpTouch:void 0}))}(p.current,b.current,I.current,c),J}var k=s(697);function Je(d){return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Je(d)}function or(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(d,I).enumerable})),p.push.apply(p,b)}return p}function sr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?or(Object(p),!0).forEach(function(b){ao(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):or(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function ao(d,a,p){return(a=function(b){var I=function(A,J){if(Je(A)!=="object"||A===null)return A;var c=A[Symbol.toPrimitive];if(c!==void 0){var l=c.call(A,J);if(Je(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}(b,"string");return Je(I)==="symbol"?I:String(I)}(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}var lo={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},qt=f().memo(function(d){var a=sr(sr({},lo),d),p=a.description,b=a.fullscreen,I=a.handleImageLoaded,A=a.isFullscreen,J=a.onImageError,c=a.original,l=a.originalAlt,y=a.originalHeight,C=a.originalWidth,_=a.originalTitle,E=a.sizes,H=a.srcSet,U=a.loading,G=A&&b||c;return f().createElement(f().Fragment,null,f().createElement("img",{className:"image-gallery-image",src:G,alt:l,srcSet:H,height:y,width:C,sizes:E,title:_,onLoad:function(L){return I(L,c)},onError:J,loading:U}),p&&f().createElement("span",{className:"image-gallery-description"},p))});qt.displayName="Item",qt.propTypes={description:k.string,fullscreen:k.string,handleImageLoaded:k.func.isRequired,isFullscreen:k.bool,onImageError:k.func.isRequired,original:k.string.isRequired,originalAlt:k.string,originalHeight:k.string,originalWidth:k.string,originalTitle:k.string,sizes:k.string,srcSet:k.string,loading:k.string};const co=qt;function Ze(d){return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Ze(d)}function ar(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(d,I).enumerable})),p.push.apply(p,b)}return p}function lr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?ar(Object(p),!0).forEach(function(b){uo(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):ar(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function uo(d,a,p){return(a=function(b){var I=function(A,J){if(Ze(A)!=="object"||A===null)return A;var c=A[Symbol.toPrimitive];if(c!==void 0){var l=c.call(A,J);if(Ze(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}(b,"string");return Ze(I)==="symbol"?I:String(I)}(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}var ho={left:f().createElement("polyline",{points:"15 18 9 12 15 6"}),right:f().createElement("polyline",{points:"9 18 15 12 9 6"}),maximize:f().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:f().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:f().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:f().createElement(f().Fragment,null,f().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),f().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},fo={strokeWidth:1,viewBox:"0 0 24 24"},cr=function(d){var a=lr(lr({},fo),d),p=a.strokeWidth,b=a.viewBox,I=a.icon;return f().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:b,fill:"none",stroke:"currentColor",strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round"},ho[I])};cr.propTypes={strokeWidth:k.number,viewBox:k.string,icon:(0,k.oneOf)(["left","right","maximize","minimize","play","pause"]).isRequired};const vt=cr;var Vt=f().memo(function(d){var a=d.isFullscreen,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:p,"aria-label":"Open Fullscreen"},f().createElement(vt,{strokeWidth:2,icon:a?"minimize":"maximize"}))});Vt.displayName="Fullscreen",Vt.propTypes={isFullscreen:k.bool.isRequired,onClick:k.func.isRequired};const po=Vt;var Gt=f().memo(function(d){var a=d.disabled,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:a,onClick:p,"aria-label":"Previous Slide"},f().createElement(vt,{icon:"left",viewBox:"6 0 12 24"}))});Gt.displayName="LeftNav",Gt.propTypes={disabled:k.bool.isRequired,onClick:k.func.isRequired};const mo=Gt;var Xt=f().memo(function(d){var a=d.disabled,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:a,onClick:p,"aria-label":"Next Slide"},f().createElement(vt,{icon:"right",viewBox:"6 0 12 24"}))});Xt.displayName="RightNav",Xt.propTypes={disabled:k.bool.isRequired,onClick:k.func.isRequired};const go=Xt;var Yt=f().memo(function(d){var a=d.isPlaying,p=d.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:p,"aria-label":"Play or Pause Slideshow"},f().createElement(vt,{strokeWidth:2,icon:a?"pause":"play"}))});Yt.displayName="PlayPause",Yt.propTypes={isPlaying:k.bool.isRequired,onClick:k.func.isRequired};const bo=Yt;function et(d){return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},et(d)}function Qt(){return Qt=Object.assign?Object.assign.bind():function(d){for(var a=1;a<arguments.length;a++){var p=arguments[a];for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(d[b]=p[b])}return d},Qt.apply(this,arguments)}function ur(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(d,I).enumerable})),p.push.apply(p,b)}return p}function dr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?ur(Object(p),!0).forEach(function(b){yo(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):ur(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function yo(d,a,p){return(a=function(b){var I=function(A,J){if(et(A)!=="object"||A===null)return A;var c=A[Symbol.toPrimitive];if(c!==void 0){var l=c.call(A,J);if(et(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}(b,"string");return et(I)==="symbol"?I:String(I)}(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}var vo={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},hr=function(d){var a=dr(dr({},vo),d),p=a.children,b=a.className,I=so({delta:a.delta,onSwiping:a.onSwiping,onSwiped:a.onSwiped});return f().createElement("div",Qt({},I,{className:b}),p)};hr.propTypes={children:k.node.isRequired,className:k.string,delta:k.number,onSwiped:k.func,onSwiping:k.func};const fr=hr;function Ve(d){return Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Ve(d)}function pr(d,a){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(d,I).enumerable})),p.push.apply(p,b)}return p}function mr(d){for(var a=1;a<arguments.length;a++){var p=arguments[a]!=null?arguments[a]:{};a%2?pr(Object(p),!0).forEach(function(b){gr(d,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):pr(Object(p)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(p,b))})}return d}function xo(d,a){for(var p=0;p<a.length;p++){var b=a[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,br(b.key),b)}}function Jt(d,a){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,b){return p.__proto__=b,p},Jt(d,a)}function wo(d,a){if(a&&(Ve(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return le(d)}function le(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function xt(d){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},xt(d)}function gr(d,a,p){return(a=br(a))in d?Object.defineProperty(d,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[a]=p,d}function br(d){var a=function(p,b){if(Ve(p)!=="object"||p===null)return p;var I=p[Symbol.toPrimitive];if(I!==void 0){var A=I.call(p,b);if(Ve(A)!=="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(d,"string");return Ve(a)==="symbol"?a:String(a)}var yr=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],So=(0,k.arrayOf)((0,k.shape)({srcSet:k.string,media:k.string}));function vr(d){var a=parseInt(d.keyCode||d.which||0,10);return a===66||a===62}var Zt=function(d){(function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&Jt(c,l)})(J,d);var a,p,b,I,A=(b=J,I=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var c,l=xt(b);if(I){var y=xt(this).constructor;c=Reflect.construct(l,arguments,y)}else c=l.apply(this,arguments);return wo(this,c)});function J(c){var l;return function(y,C){if(!(y instanceof C))throw new TypeError("Cannot call a class as a function")}(this,J),gr(le(l=A.call(this,c)),"onBulletClick",function(y,C){var _=l.props,E=_.onBulletClick,H=_.items,U=l.state.currentIndex;y.target.blur(),U!==C&&(H.length===2?l.slideToIndexWithStyleReset(C,y):l.slideToIndex(C,y)),E&&E(y,C)}),l.state={currentIndex:c.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(c.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},l.loadedImages={},l.imageGallery=f().createRef(),l.thumbnailsWrapper=f().createRef(),l.thumbnails=f().createRef(),l.imageGallerySlideWrapper=f().createRef(),l.handleImageLoaded=l.handleImageLoaded.bind(le(l)),l.handleKeyDown=l.handleKeyDown.bind(le(l)),l.handleMouseDown=l.handleMouseDown.bind(le(l)),l.handleResize=l.handleResize.bind(le(l)),l.handleTouchMove=l.handleTouchMove.bind(le(l)),l.handleOnSwiped=l.handleOnSwiped.bind(le(l)),l.handleScreenChange=l.handleScreenChange.bind(le(l)),l.handleSwiping=l.handleSwiping.bind(le(l)),l.handleThumbnailSwiping=l.handleThumbnailSwiping.bind(le(l)),l.handleOnThumbnailSwiped=l.handleOnThumbnailSwiped.bind(le(l)),l.onThumbnailMouseLeave=l.onThumbnailMouseLeave.bind(le(l)),l.handleImageError=l.handleImageError.bind(le(l)),l.pauseOrPlay=l.pauseOrPlay.bind(le(l)),l.renderThumbInner=l.renderThumbInner.bind(le(l)),l.renderItem=l.renderItem.bind(le(l)),l.slideLeft=l.slideLeft.bind(le(l)),l.slideRight=l.slideRight.bind(le(l)),l.toggleFullScreen=l.toggleFullScreen.bind(le(l)),l.togglePlay=l.togglePlay.bind(le(l)),l.unthrottledSlideToIndex=l.slideToIndex,l.slideToIndex=oe(l.unthrottledSlideToIndex,c.slideDuration,{trailing:!1}),c.lazyLoad&&(l.lazyLoaded=[]),l}return a=J,p=[{key:"componentDidMount",value:function(){var c=this.props,l=c.autoPlay,y=c.useWindowKeyDown;l&&this.play(),y?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(c,l){var y=this.props,C=y.items,_=y.lazyLoad,E=y.slideDuration,H=y.slideInterval,U=y.startIndex,G=y.thumbnailPosition,L=y.showThumbnails,D=y.useWindowKeyDown,F=this.state,W=F.currentIndex,X=F.isPlaying,ee=c.items.length!==C.length,se=!Ie()(c.items,C),ge=c.startIndex!==U,fe=c.thumbnailPosition!==G,ue=c.showThumbnails!==L;H===c.slideInterval&&E===c.slideDuration||X&&(this.pause(),this.play()),fe&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),ue&&L&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),ue&&!L&&this.removeThumbnailsResizeObserver(),(ee||ue)&&this.handleResize(),l.currentIndex!==W&&this.slideThumbnailBar(),c.slideDuration!==E&&(this.slideToIndex=oe(this.unthrottledSlideToIndex,E,{trailing:!1})),!_||c.lazyLoad&&!se||(this.lazyLoaded=[]),D!==c.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))),(ge||se)&&this.setState({currentIndex:U,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var c=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchmove",this.handleTouchMove),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),c?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var c=this,l=this.state,y=l.currentIndex,C=l.isTransitioning,_=this.props,E=_.onSlide,H=_.slideDuration;this.transitionTimer=window.setTimeout(function(){C&&(c.setState({isTransitioning:!C,isSwipingThumbnail:!1}),E&&E(y))},H+50)}},{key:"onThumbnailClick",value:function(c,l){var y=this.props,C=y.onThumbnailClick,_=y.items,E=this.state.currentIndex;c.target.parentNode.parentNode.blur(),E!==l&&(_.length===2?this.slideToIndexWithStyleReset(l,c):this.slideToIndex(l,c)),C&&C(c,l)}},{key:"onThumbnailMouseOver",value:function(c,l){var y=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout(function(){y.slideToIndex(l),y.pause()},300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var c=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,c&&this.play()}}},{key:"setThumbsTranslate",value:function(c){this.setState({thumbsTranslate:c})}},{key:"setModalFullscreen",value:function(c){var l=this.props.onScreenChange;this.setState({modalFullscreen:c}),l&&l(c)}},{key:"getThumbsTranslate",value:function(c){var l,y=this.props,C=y.disableThumbnailScroll,_=y.items,E=this.state,H=E.thumbnailsWrapperWidth,U=E.thumbnailsWrapperHeight,G=this.thumbnails&&this.thumbnails.current;if(C)return 0;if(G){if(this.isThumbnailVertical()){if(G.scrollHeight<=U)return 0;l=G.scrollHeight-U}else{if(G.scrollWidth<=H||H<=0)return 0;l=G.scrollWidth-H}return c*(l/(_.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(c){switch(c){case"left":c=" ".concat("image-gallery-thumbnails-left");break;case"right":c=" ".concat("image-gallery-thumbnails-right");break;case"bottom":c=" ".concat("image-gallery-thumbnails-bottom");break;case"top":c=" ".concat("image-gallery-thumbnails-top")}return c}},{key:"getAlignmentClassName",value:function(c){var l=this.state.currentIndex,y=this.props,C=y.infinite,_=y.items,E="",H="image-gallery-left",U="image-gallery-right";switch(c){case l-1:E=" ".concat(H);break;case l:E=" ".concat("image-gallery-center");break;case l+1:E=" ".concat(U)}return _.length>=3&&C&&(c===0&&l===_.length-1?E=" ".concat(U):c===_.length-1&&l===0&&(E=" ".concat(H))),E}},{key:"getTranslateXForTwoSlide",value:function(c){var l=this.state,y=l.currentIndex,C=l.currentSlideOffset,_=l.previousIndex,E=y!==_,H=c===0&&_===0,U=c===1&&_===1,G=c===0&&y===1,L=c===1&&y===0,D=C===0,F=-100*y+100*c+C;return C>0?this.direction="left":C<0&&(this.direction="right"),L&&C>0&&(F=-100+C),G&&C<0&&(F=100+C),E?H&&D&&this.direction==="left"?F=100:U&&D&&this.direction==="right"&&(F=-100):(L&&D&&this.direction==="left"&&(F=-100),G&&D&&this.direction==="right"&&(F=100)),F}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(c){var l=this.state,y=l.currentIndex,C=l.currentSlideOffset,_=l.slideStyle,E=this.props,H=E.infinite,U=E.items,G=E.useTranslate3D,L=E.isRTL,D=-100*y,F=U.length-1,W=(D+100*c)*(L?-1:1)+C;H&&U.length>2&&(y===0&&c===F?W=-100*(L?-1:1)+C:y===F&&c===0&&(W=100*(L?-1:1)+C)),H&&U.length===2&&(W=this.getTranslateXForTwoSlide(c));var X="translate(".concat(W,"%, 0)");return G&&(X="translate3d(".concat(W,"%, 0, 0)")),mr({display:this.isSlideVisible(c)?"inherit":"none",WebkitTransform:X,MozTransform:X,msTransform:X,OTransform:X,transform:X},_)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var c,l=this.props,y=l.useTranslate3D,C=l.isRTL,_=this.state,E=_.thumbsTranslate,H=_.thumbsStyle,U=C?-1*E:E;return this.isThumbnailVertical()?(c="translate(0, ".concat(E,"px)"),y&&(c="translate3d(0, ".concat(E,"px, 0)"))):(c="translate(".concat(U,"px, 0)"),y&&(c="translate3d(".concat(U,"px, 0, 0)"))),mr({WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,transform:c},H)}},{key:"getSlideItems",value:function(){var c=this,l=this.state.currentIndex,y=this.props,C=y.items,_=y.slideOnThumbnailOver,E=y.onClick,H=y.lazyLoad,U=y.onTouchMove,G=y.onTouchEnd,L=y.onTouchStart,D=y.onMouseOver,F=y.onMouseLeave,W=y.renderItem,X=y.renderThumbInner,ee=y.showThumbnails,se=y.showBullets,ge=[],fe=[],ue=[];return C.forEach(function(ie,te){var Re=c.getAlignmentClassName(te),tt=ie.originalClass?" ".concat(ie.originalClass):"",nt=ie.thumbnailClass?" ".concat(ie.thumbnailClass):"",_e=ie.renderItem||W||c.renderItem,Ne=ie.renderThumbInner||X||c.renderThumbInner,Oe=!H||Re||c.lazyLoaded[te];Oe&&H&&!c.lazyLoaded[te]&&(c.lazyLoaded[te]=!0);var Ge=c.getSlideStyle(te),rt=f().createElement("div",{"aria-label":"Go to Slide ".concat(te+1),key:"slide-".concat(te),tabIndex:"-1",className:"image-gallery-slide ".concat(Re," ").concat(tt),style:Ge,onClick:E,onKeyUp:c.handleSlideKeyUp,onTouchMove:U,onTouchEnd:G,onTouchStart:L,onMouseOver:D,onFocus:D,onMouseLeave:F,role:"button"},Oe?_e(ie):f().createElement("div",{style:{height:"100%"}}));if(ge.push(rt),ee&&ie.thumbnail){var Xe=m("image-gallery-thumbnail",nt,{active:l===te});fe.push(f().createElement("button",{key:"thumbnail-".concat(te),type:"button",tabIndex:"0","aria-pressed":l===te?"true":"false","aria-label":"Go to Slide ".concat(te+1),className:Xe,onMouseLeave:_?c.onThumbnailMouseLeave:null,onMouseOver:function(ye){return c.handleThumbnailMouseOver(ye,te)},onFocus:function(ye){return c.handleThumbnailMouseOver(ye,te)},onKeyUp:function(ye){return c.handleThumbnailKeyUp(ye,te)},onClick:function(ye){return c.onThumbnailClick(ye,te)}},Ne(ie)))}if(se){var it=m("image-gallery-bullet",ie.bulletClass,{active:l===te});ue.push(f().createElement("button",{type:"button",key:"bullet-".concat(te),className:it,onClick:function(ye){return c.onBulletClick(ye,te)},"aria-pressed":l===te?"true":"false","aria-label":"Go to Slide ".concat(te+1)}))}}),{slides:ge,thumbnails:fe,bullets:ue}}},{key:"ignoreIsTransitioning",value:function(){var c=this.props.items,l=this.state,y=l.previousIndex,C=l.currentIndex,_=c.length-1;return Math.abs(y-C)>1&&!(y===0&&C===_)&&!(y===_&&C===0)}},{key:"isFirstOrLastSlide",value:function(c){return c===this.props.items.length-1||c===0}},{key:"slideIsTransitioning",value:function(c){var l=this.state,y=l.isTransitioning,C=l.previousIndex,_=l.currentIndex;return y&&!(c===C||c===_)}},{key:"isSlideVisible",value:function(c){return!this.slideIsTransitioning(c)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(c)}},{key:"slideThumbnailBar",value:function(){var c=this.state,l=c.currentIndex,y=c.isSwipingThumbnail,C=-this.getThumbsTranslate(l);y||(l===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:C,thumbsSwipedTranslate:C}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){return this.props.infinite||this.canSlidePrevious()}},{key:"canSlideRight",value:function(){return this.props.infinite||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(c){var l=c.event,y=c.absX,C=c.dir,_=this.props,E=_.disableSwipe,H=_.stopPropagation,U=this.state,G=U.galleryWidth,L=U.isTransitioning,D=U.swipingUpDown,F=U.swipingLeftRight;if(C!==He&&C!==Fe&&!D||F){if(C!==Ue&&C!==ze||F||this.setState({swipingLeftRight:!0}),!E){var W=this.props.swipingTransitionDuration;if(H&&l.preventDefault(),L)this.setState({currentSlideOffset:0});else{var X=C===ze?1:-1,ee=y/G*100;Math.abs(ee)>=100&&(ee=100);var se={transition:"transform ".concat(W,"ms ease-out")};this.setState({currentSlideOffset:X*ee,slideStyle:se})}}}else D||this.setState({swipingUpDown:!0})}},{key:"handleThumbnailSwiping",value:function(c){var l=c.event,y=c.absX,C=c.absY,_=c.dir,E=this.props,H=E.stopPropagation,U=E.swipingThumbnailTransitionDuration,G=this.state,L=G.thumbsSwipedTranslate,D=G.thumbnailsWrapperHeight,F=G.thumbnailsWrapperWidth,W=G.swipingUpDown,X=G.swipingLeftRight;if(this.isThumbnailVertical()){if((_===Ue||_===ze||X)&&!W)return void(X||this.setState({swipingLeftRight:!0}));_!==He&&_!==Fe||W||this.setState({swipingUpDown:!0})}else{if((_===He||_===Fe||W)&&!X)return void(W||this.setState({swipingUpDown:!0}));_!==Ue&&_!==ze||X||this.setState({swipingLeftRight:!0})}var ee,se,ge,fe,ue,ie=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(ee=L+(_===Fe?C:-C),se=ie.scrollHeight-D+20,ge=Math.abs(ee)>se,fe=ee>20,ue=ie.scrollHeight<=D):(ee=L+(_===ze?y:-y),se=ie.scrollWidth-F+20,ge=Math.abs(ee)>se,fe=ee>20,ue=ie.scrollWidth<=F),!ue&&(_!==Ue&&_!==He||!ge)&&(_!==ze&&_!==Fe||!fe)){H&&l.stopPropagation();var te={transition:"transform ".concat(U,"ms ease-out")};this.setState({thumbsTranslate:ee,thumbsStyle:te})}}},{key:"handleOnThumbnailSwiped",value:function(){var c=this.state.thumbsTranslate,l=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:c,thumbsStyle:{transition:"all ".concat(l,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var c=this.state.currentSlideOffset,l=this.props.swipeThreshold;return Math.abs(c)>l}},{key:"resetSwipingDirection",value:function(){var c=this.state,l=c.swipingUpDown,y=c.swipingLeftRight;l&&this.setState({swipingUpDown:!1}),y&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(c){var l=c.event,y=c.dir,C=c.velocity,_=this.props,E=_.disableSwipe,H=_.stopPropagation,U=_.flickThreshold;if(!E){var G=this.props.isRTL;H&&l.stopPropagation(),this.resetSwipingDirection();var L=(y===Ue?1:-1)*(G?-1:1),D=C>U&&!(y===He||y===Fe);this.handleOnSwipedTo(L,D)}}},{key:"handleOnSwipedTo",value:function(c,l){var y=this.state,C=y.currentIndex,_=y.isTransitioning,E=C;!this.sufficientSwipe()&&!l||_||(E+=c),(c===-1&&!this.canSlideLeft()||c===1&&!this.canSlideRight())&&(E=C),this.unthrottledSlideToIndex(E)}},{key:"handleTouchMove",value:function(c){this.state.swipingLeftRight&&c.preventDefault()}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(c){var l=this.props,y=l.disableKeyDown,C=l.useBrowserFullscreen,_=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!y)switch(parseInt(c.keyCode||c.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(c);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(c);break;case 27:_&&!C&&this.exitFullScreen()}}},{key:"handleImageError",value:function(c){var l=this.props.onErrorImageURL;l&&c.target.src.indexOf(l)===-1&&(c.target.src=l)}},{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 c=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(c)))}},{key:"initSlideWrapperResizeObserver",value:function(c){var l=this;c&&!c.current||(this.resizeSlideWrapperObserver=new tr(he(function(y){y&&y.forEach(function(C){l.setState({thumbnailsWrapperWidth:C.contentRect.width},l.handleResize)})},50)),this.resizeSlideWrapperObserver.observe(c.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(c){var l=this;c&&!c.current||(this.resizeThumbnailWrapperObserver=new tr(he(function(y){y&&y.forEach(function(C){l.setState({thumbnailsWrapperHeight:C.contentRect.height},l.handleResize)})},50)),this.resizeThumbnailWrapperObserver.observe(c.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 c=this.props,l=c.onScreenChange,y=c.useBrowserFullscreen,C=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,_=this.imageGallery.current===C;l&&l(_),y&&this.setState({isFullscreen:_})}},{key:"slideToIndex",value:function(c,l){var y=this.state,C=y.currentIndex,_=y.isTransitioning,E=this.props,H=E.items,U=E.slideDuration,G=E.onBeforeSlide;if(!_){l&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var L=H.length-1,D=c;c<0?D=L:c>L&&(D=0),G&&D!==C&&G(D),this.setState({previousIndex:C,currentIndex:D,isTransitioning:D!==C,currentSlideOffset:0,slideStyle:{transition:"all ".concat(U,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(c){var l=this.props.isRTL;this.slideTo(c,l?"right":"left")}},{key:"slideRight",value:function(c){var l=this.props.isRTL;this.slideTo(c,l?"left":"right")}},{key:"slideTo",value:function(c,l){var y=this.state,C=y.currentIndex,_=y.isTransitioning,E=this.props.items,H=C+(l==="left"?-1:1);_||(E.length===2?this.slideToIndexWithStyleReset(H,c):this.slideToIndex(H,c))}},{key:"slideToIndexWithStyleReset",value:function(c,l){var y=this,C=this.state,_=C.currentIndex,E=C.currentSlideOffset;this.setState({currentSlideOffset:E+(_>c?.001:-.001),slideStyle:{transition:"none"}},function(){window.setTimeout(function(){return y.slideToIndex(c,l)},25)})}},{key:"handleThumbnailMouseOver",value:function(c,l){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(c,l)}},{key:"handleThumbnailKeyUp",value:function(c,l){vr(c)&&this.onThumbnailClick(c,l)}},{key:"handleSlideKeyUp",value:function(c){vr(c)&&(0,this.props.onClick)(c)}},{key:"isThumbnailVertical",value:function(){var c=this.props.thumbnailPosition;return c==="left"||c==="right"}},{key:"addScreenChangeEvent",value:function(){var c=this;yr.forEach(function(l){document.addEventListener(l,c.handleScreenChange)})}},{key:"removeScreenChangeEvent",value:function(){var c=this;yr.forEach(function(l){document.removeEventListener(l,c.handleScreenChange)})}},{key:"fullScreen",value:function(){var c=this.props.useBrowserFullscreen,l=this.imageGallery.current;c?l.requestFullscreen?l.requestFullscreen():l.msRequestFullscreen?l.msRequestFullscreen():l.mozRequestFullScreen?l.mozRequestFullScreen():l.webkitRequestFullscreen?l.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var c=this.state.isFullscreen,l=this.props.useBrowserFullscreen;c&&(l?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 c=this.props.infinite,l=this.state.currentIndex;c||this.canSlideRight()?this.slideToIndex(l+1):this.pause()}},{key:"play",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],l=this.props,y=l.onPlay,C=l.slideInterval,_=l.slideDuration,E=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(C,_)),y&&c&&y(E))}},{key:"pause",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],l=this.props.onPause,y=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),l&&c&&l(y))}},{key:"isImageLoaded",value:function(c){return!!this.loadedImages[c.original]||(this.loadedImages[c.original]=!0,!1)}},{key:"handleImageLoaded",value:function(c,l){var y=this.props.onImageLoad;!this.loadedImages[l]&&y&&(this.loadedImages[l]=!0,y(c))}},{key:"renderItem",value:function(c){var l=this.state.isFullscreen,y=this.props.onImageError||this.handleImageError;return f().createElement(co,{description:c.description,fullscreen:c.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:l,onImageError:y,original:c.original,originalAlt:c.originalAlt,originalHeight:c.originalHeight,originalWidth:c.originalWidth,originalTitle:c.originalTitle,sizes:c.sizes,loading:c.loading,srcSet:c.srcSet})}},{key:"renderThumbInner",value:function(c){var l=this.props.onThumbnailError||this.handleImageError;return f().createElement("span",{className:"image-gallery-thumbnail-inner"},f().createElement("img",{className:"image-gallery-thumbnail-image",src:c.thumbnail,height:c.thumbnailHeight,width:c.thumbnailWidth,alt:c.thumbnailAlt,title:c.thumbnailTitle,loading:c.thumbnailLoading,onError:l}),c.thumbnailLabel&&f().createElement("div",{className:"image-gallery-thumbnail-label"},c.thumbnailLabel))}},{key:"render",value:function(){var c=this.state,l=c.currentIndex,y=c.isFullscreen,C=c.modalFullscreen,_=c.isPlaying,E=this.props,H=E.additionalClass,U=E.disableThumbnailSwipe,G=E.indexSeparator,L=E.isRTL,D=E.items,F=E.thumbnailPosition,W=E.renderFullscreenButton,X=E.renderCustomControls,ee=E.renderLeftNav,se=E.renderRightNav,ge=E.showBullets,fe=E.showFullscreenButton,ue=E.showIndex,ie=E.showThumbnails,te=E.showNav,Re=E.showPlayButton,tt=E.renderPlayPauseButton,nt=this.getThumbnailStyle(),_e=this.getSlideItems(),Ne=_e.slides,Oe=_e.thumbnails,Ge=_e.bullets,rt=m("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(F),{"image-gallery-rtl":L}),Xe=f().createElement("div",{ref:this.imageGallerySlideWrapper,className:rt},X&&X(),this.canSlide()?f().createElement(f().Fragment,null,te&&f().createElement(f().Fragment,null,ee(this.slideLeft,!this.canSlideLeft()),se(this.slideRight,!this.canSlideRight())),f().createElement(fr,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},f().createElement("div",{className:"image-gallery-slides"},Ne))):f().createElement("div",{className:"image-gallery-slides"},Ne),Re&&tt(this.togglePlay,_),ge&&f().createElement("div",{className:"image-gallery-bullets"},f().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},Ge)),fe&&W(this.toggleFullScreen,y),ue&&f().createElement("div",{className:"image-gallery-index"},f().createElement("span",{className:"image-gallery-index-current"},l+1),f().createElement("span",{className:"image-gallery-index-separator"},G),f().createElement("span",{className:"image-gallery-index-total"},D.length))),it=m("image-gallery",H,{"fullscreen-modal":C}),ye=m("image-gallery-content",this.getThumbnailPositionClassName(F),{fullscreen:y}),jo=m("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(F),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&L},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!U},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!U});return f().createElement("div",{ref:this.imageGallery,className:it,"aria-live":"polite"},f().createElement("div",{className:ye},(F==="bottom"||F==="right")&&Xe,ie&&Oe.length>0?f().createElement(fr,{className:jo,delta:0,onSwiping:!U&&this.handleThumbnailSwiping,onSwiped:!U&&this.handleOnThumbnailSwiped},f().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},f().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:nt,"aria-label":"Thumbnail Navigation"},Oe))):null,(F==="top"||F==="left")&&Xe))}}],p&&xo(a.prototype,p),Object.defineProperty(a,"prototype",{writable:!1}),J}(f().Component);Zt.propTypes={flickThreshold:k.number,items:(0,k.arrayOf)((0,k.shape)({bulletClass:k.string,bulletOnClick:k.func,description:k.string,original:k.string,originalHeight:k.number,originalWidth:k.number,loading:k.string,thumbnailHeight:k.number,thumbnailWidth:k.number,thumbnailLoading:k.string,fullscreen:k.string,originalAlt:k.string,originalTitle:k.string,thumbnail:k.string,thumbnailAlt:k.string,thumbnailLabel:k.string,thumbnailTitle:k.string,originalClass:k.string,thumbnailClass:k.string,renderItem:k.func,renderThumbInner:k.func,imageSet:So,srcSet:k.string,sizes:k.string})).isRequired,showNav:k.bool,autoPlay:k.bool,lazyLoad:k.bool,infinite:k.bool,showIndex:k.bool,showBullets:k.bool,showThumbnails:k.bool,showPlayButton:k.bool,showFullscreenButton:k.bool,disableThumbnailScroll:k.bool,disableKeyDown:k.bool,disableSwipe:k.bool,disableThumbnailSwipe:k.bool,useBrowserFullscreen:k.bool,onErrorImageURL:k.string,indexSeparator:k.string,thumbnailPosition:(0,k.oneOf)(["top","bottom","left","right"]),startIndex:k.number,slideDuration:k.number,slideInterval:k.number,slideOnThumbnailOver:k.bool,swipeThreshold:k.number,swipingTransitionDuration:k.number,swipingThumbnailTransitionDuration:k.number,onSlide:k.func,onBeforeSlide:k.func,onScreenChange:k.func,onPause:k.func,onPlay:k.func,onClick:k.func,onImageLoad:k.func,onImageError:k.func,onTouchMove:k.func,onTouchEnd:k.func,onTouchStart:k.func,onMouseOver:k.func,onMouseLeave:k.func,onBulletClick:k.func,onThumbnailError:k.func,onThumbnailClick:k.func,renderCustomControls:k.func,renderLeftNav:k.func,renderRightNav:k.func,renderPlayPauseButton:k.func,renderFullscreenButton:k.func,renderItem:k.func,renderThumbInner:k.func,stopPropagation:k.bool,additionalClass:k.string,useTranslate3D:k.bool,isRTL:k.bool,useWindowKeyDown:k.bool},Zt.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,renderLeftNav:function(d,a){return f().createElement(mo,{onClick:d,disabled:a})},renderRightNav:function(d,a){return f().createElement(go,{onClick:d,disabled:a})},renderPlayPauseButton:function(d,a){return f().createElement(bo,{onClick:d,isPlaying:a})},renderFullscreenButton:function(d,a){return f().createElement(po,{onClick:d,isFullscreen:a})},useWindowKeyDown:!0};const ko=Zt})(),u})())})(Ei);var Ma=Ei.exports;const La=Oo(Ma);function Da(){var e=new Map;function t(n){var r=n.root,i=n.rootMargin,s=n.threshold,u=e.get(r);u||(u=new Map,e.set(r,u));var h=JSON.stringify({rootMargin:i,threshold:s}),m=u.get(h);if(!m){var g=new Map,f=new IntersectionObserver(function(v){v.forEach(function(w){var x=g.get(w.target);x==null||x(w)})},{root:r,rootMargin:i,threshold:s});m={observer:f,entryCallbacks:g},u.set(h,m)}return{observe:function(w,x){var S,j;(S=m)==null||S.entryCallbacks.set(w,x),(j=m)==null||j.observer.observe(w)},unobserve:function(w){var x,S;(x=m)==null||x.entryCallbacks.delete(w),(S=m)==null||S.observer.unobserve(w)}}}return{getObserver:t}}var za="0px",Fa=[0],Na=Da();function Aa(e){var t,n,r=(t=e==null?void 0:e.rootMargin)!=null?t:za,i=(n=e==null?void 0:e.threshold)!=null?n:Fa,s=z.useRef(null),u=z.useRef(null),h=z.useRef(null),m=z.useState(),g=m[0],f=m[1],v=z.useCallback(function(){var j=s.current;if(!j){f(void 0);return}var R=Na.getObserver({root:u.current,rootMargin:r,threshold:i});R.observe(j,function(T){f(T)}),h.current=R},[r,i]),w=z.useCallback(function(){var j=h.current,R=s.current;R&&(j==null||j.unobserve(R)),h.current=null},[]),x=z.useCallback(function(j){w(),s.current=j,v()},[v,w]),S=z.useCallback(function(j){w(),u.current=j,v()},[v,w]);return[x,{entry:g,rootRef:S}]}function Sn(){return Sn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Wa(e){var t,n=Aa(e),r=n[0],i=n[1],s=!!((t=i.entry)!=null&&t.isIntersecting),u=z.useState(s),h=u[0],m=u[1];return s&&!h&&m(!0),[r,Sn({},i,{isVisible:s,wasEverVisible:h})]}var Ba=100;function $a(e){var t=e.loading,n=e.hasNextPage,r=e.onLoadMore,i=e.rootMargin,s=e.disabled,u=e.delayInMs,h=u===void 0?Ba:u,m=Wa({rootMargin:i}),g=m[0],f=m[1],v=f.rootRef,w=f.isVisible,x=!s&&!t&&w&&n;return z.useEffect(function(){if(x){var S=setTimeout(function(){r()},h);return function(){clearTimeout(S)}}},[r,x,h]),[g,{rootRef:v}]}const Ka={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"/>'},Ua={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>'};var rn=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function on(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function Ii(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function _i(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function Ha(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,s=0;s<n.length;s++)r.indexOf(n[s])===-1&&(i=!1);return i}var Wn={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,"-":rn?173:189,"=":rn?61:187,";":rn?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},kn={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},de={16:!1,18:!1,17:!1,91:!1},ce={};for(var kt=1;kt<20;kt++)Wn["f".concat(kt)]=111+kt;var re=[],Br=!1,Ri="all",Pi=[],$t=function(t){return Wn[t.toLowerCase()]||Le[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function Mi(e){Ri=e||"all"}function mt(){return Ri||"all"}function qa(){return re.slice(0)}function Va(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function Ga(e){return typeof e=="string"&&(e=$t(e)),re.indexOf(e)!==-1}function Xa(e,t){var n,r;e||(e=mt());for(var i in ce)if(Object.prototype.hasOwnProperty.call(ce,i))for(n=ce[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;mt()===e&&Mi(t||"all")}function Ya(e){var t=e.keyCode||e.which||e.charCode,n=re.indexOf(t);if(n>=0&&re.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&re.splice(0,re.length),(t===93||t===224)&&(t=91),t in de){de[t]=!1;for(var r in Le)Le[r]===t&&(ve[r]=!1)}}function Qa(e){if(typeof e>"u")Object.keys(ce).forEach(function(u){return delete ce[u]});else if(Array.isArray(e))e.forEach(function(u){u.key&&sn(u)});else if(typeof e=="object")e.key&&sn(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],s=n[1];typeof i=="function"&&(s=i,i=""),sn({key:e,scope:i,method:s,splitKey:"+"})}}var sn=function(t){var n=t.key,r=t.scope,i=t.method,s=t.splitKey,u=s===void 0?"+":s,h=_i(n);h.forEach(function(m){var g=m.split(u),f=g.length,v=g[f-1],w=v==="*"?"*":$t(v);if(ce[w]){r||(r=mt());var x=f>1?Ii(Le,g):[];ce[w]=ce[w].filter(function(S){var j=i?S.method===i:!0;return!(j&&S.scope===r&&Ha(S.mods,x))})}})};function $r(e,t,n,r){if(t.element===r){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var s in de)Object.prototype.hasOwnProperty.call(de,s)&&(!de[s]&&t.mods.indexOf(+s)>-1||de[s]&&t.mods.indexOf(+s)===-1)&&(i=!1);(t.mods.length===0&&!de[16]&&!de[18]&&!de[17]&&!de[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function Kr(e,t){var n=ce["*"],r=e.keyCode||e.which||e.charCode;if(ve.filter.call(this,e)){if((r===93||r===224)&&(r=91),re.indexOf(r)===-1&&r!==229&&re.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(S){var j=kn[S];e[S]&&re.indexOf(j)===-1?re.push(j):!e[S]&&re.indexOf(j)>-1?re.splice(re.indexOf(j),1):S==="metaKey"&&e[S]&&re.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(re=re.slice(re.indexOf(j))))}),r in de){de[r]=!0;for(var i in Le)Le[i]===r&&(ve[i]=!0);if(!n)return}for(var s in de)Object.prototype.hasOwnProperty.call(de,s)&&(de[s]=e[kn[s]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(re.indexOf(17)===-1&&re.push(17),re.indexOf(18)===-1&&re.push(18),de[17]=!0,de[18]=!0);var u=mt();if(n)for(var h=0;h<n.length;h++)n[h].scope===u&&(e.type==="keydown"&&n[h].keydown||e.type==="keyup"&&n[h].keyup)&&$r(e,n[h],u,t);if(r in ce){for(var m=0;m<ce[r].length;m++)if((e.type==="keydown"&&ce[r][m].keydown||e.type==="keyup"&&ce[r][m].keyup)&&ce[r][m].key){for(var g=ce[r][m],f=g.splitKey,v=g.key.split(f),w=[],x=0;x<v.length;x++)w.push($t(v[x]));w.sort().join("")===re.sort().join("")&&$r(e,g,u,t)}}}}function Ja(e){return Pi.indexOf(e)>-1}function ve(e,t,n){re=[];var r=_i(e),i=[],s="all",u=document,h=0,m=!1,g=!0,f="+",v=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(s=t.scope),t.element&&(u=t.element),t.keyup&&(m=t.keyup),t.keydown!==void 0&&(g=t.keydown),t.capture!==void 0&&(v=t.capture),typeof t.splitKey=="string"&&(f=t.splitKey)),typeof t=="string"&&(s=t);h<r.length;h++)e=r[h].split(f),i=[],e.length>1&&(i=Ii(Le,e)),e=e[e.length-1],e=e==="*"?"*":$t(e),e in ce||(ce[e]=[]),ce[e].push({keyup:m,keydown:g,scope:s,mods:i,shortcut:r[h],method:n,key:r[h],splitKey:f,element:u});typeof u<"u"&&!Ja(u)&&window&&(Pi.push(u),on(u,"keydown",function(w){Kr(w,u)},v),Br||(Br=!0,on(window,"focus",function(){re=[]},v)),on(u,"keyup",function(w){Kr(w,u),Ya(w)},v))}function Za(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(ce).forEach(function(n){var r=ce[n].find(function(i){return i.scope===t&&i.shortcut===e});r&&r.method&&r.method()})}var an={setScope:Mi,getScope:mt,deleteScope:Xa,getPressedKeyCodes:qa,isPressed:Ga,filter:Va,trigger:Za,unbind:Qa,keyMap:Wn,modifier:Le,modifierMap:kn};for(var ln in an)Object.prototype.hasOwnProperty.call(an,ln)&&(ve[ln]=an[ln]);if(typeof window<"u"){var el=window.hotkeys;ve.noConflict=function(e){return e&&window.hotkeys===ve&&(window.hotkeys=el),ve},window.hotkeys=ve}ve.filter=function(){return!0};var Li=function(t,n){var r=t.target,i=r&&r.tagName;return!!(i&&n&&n.includes(i))},tl=function(t){return Li(t,["INPUT","TEXTAREA","SELECT"])};function nl(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},s=i.enableOnTags,u=i.filter,h=i.keyup,m=i.keydown,g=i.filterPreventDefault,f=g===void 0?!0:g,v=i.enabled,w=v===void 0?!0:v,x=i.enableOnContentEditable,S=x===void 0?!1:x,j=z.useRef(null),R=z.useCallback(function(T,O){var M,$;return u&&!u(T)?!f:tl(T)&&!Li(T,s)||(M=T.target)!=null&&M.isContentEditable&&!S?!0:j.current===null||document.activeElement===j.current||($=j.current)!=null&&$.contains(document.activeElement)?(t(T,O),!0):!1},r?[j,s,u].concat(r):[j,s,u]);return z.useEffect(function(){if(!w){ve.unbind(e,R);return}return h&&m!==!0&&(n.keydown=!1),ve(e,n||{},R),function(){return ve.unbind(e,R)}},[R,e,w]),j}ve.isPressed;const Di=z.createContext({open:!1,toggleOpen:e=>{}});function rl({children:e}){const[t,n]=z.useState(!1),r=s=>{n(s??!s)},i=z.useMemo(()=>({open:t,toggleOpen:r}),[t]);return o.jsx(Di.Provider,{value:i,children:e})}function Bn(){return z.useContext(Di)}const Se={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},il=e=>At(async()=>{const{data:t}=await e.get(Se.categoriesPath);return Array.isArray(t)?t:[]},{manual:!0});function ol(e,t){const n=e.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...Ro(e,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...e,menu:void 0},{onFilterChange:r,onSearchSelect:i=h=>{t.onFilterChange({...n,keyword:h.title})},emptyCategory:s}=t;!n.category&&!s&&(n.category="All");const u=h=>{const m={...n,...h};r(en(m,g=>g===""||g===void 0))};return{filters:e,cleanFilter:h=>{const m=h?en(n,(g,f)=>h.includes(f)):{};r(en(m,g=>g===""||g===void 0))},handleActiveMenu:h=>{h!==e.menu&&r({menu:h})},handleSort:(h,m)=>{u({sortBy:h,sortDirection:m||h==="nameAsc"?"asc":"desc"})},handleKeyword:h=>{u({category:void 0,keyword:h||void 0})},handlePrice:h=>{u({price:h===e.price?void 0:h})},handleCategory:h=>{u({category:h===e.category?"":h})},handleDeveloper:h=>{u({owner:h||void 0})},handlePage:h=>{u({currentPage:h})},handleSwitchShowResources:h=>{u({showResources:h})},handleSearchSelect:h=>{i(h)}}}const sl=(e,t,n)=>e&&t||!n,zi=e=>[{name:e("sort.popularity"),value:"popularity"},{name:e("sort.lastPublished"),value:"publishAt"}],Fi=(e,t,n)=>{var r,i;const s=Do(e),u=zo(s.search);if((r=Fo(e,{strict:!0}))!=null&&r.endsWith(".gif"))return u.imageFilter?No({...s,search:""}):e;if(u.imageFilter)return e;const h=n||((i=window.blocklet)==null?void 0:i.version),{w:m,h:g}=typeof t=="object"?{w:t.w,h:t.h}:{w:t,h:t};return In(e,{...m||g?{imageFilter:"resize",w:m,h:g}:{},v:h})},al=e=>[{name:e("blocklet.free"),value:"free"},{name:e("blocklet.payment"),value:"payment"}],ll=(e=[],t="en")=>e.map(n=>({name:n.locales[t]||n.locales.en,value:n._id})),cl=e=>{var t,n;return Array.isArray(e)?e.map(r=>r.message).join(`
2
+ `):(n=(t=e.response)==null?void 0:t.data)!=null&&n.error?e.response.data.error.message||e.response.data.error:e.message||e},ul=(e,t)=>e==null?void 0:e.replace(/{(\w*)}/g,(n,r)=>t.hasOwnProperty(r)?t[r]:""),dl=()=>window.innerWidth<=600,hl={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",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}"'}},fl={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",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}” 的所有搜索结果"}},cn={en:Sr(hl),zh:Sr(fl)},Ni=(e,t)=>{const n={};return e&&(n["x-blocklet-server-version"]=e),t&&(n["x-blocklet-store-version"]=t),n},pl=e=>(t,n)=>{const r=cn[e]?cn[e][t]:cn.en[t];return ul(r,n)||t},Ai={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},compact:!1,endpoint:"",wrapChildren:()=>null,t:e=>e,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:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},Wi=z.createContext(Ai),{Provider:ml,Consumer:Cc}=Wi;function gl(e){const{locale:t="zh",filters:n={},serverVersion:r="",onFilterChange:i=()=>{},minItemWidth:s=350,queryFilter:u=!0,layout:h={},wrapChildren:m=oe=>oe,extraFilter:g=oe=>oe,baseSearch:f=!1,fetchCategoryDelay:v=0,showResourcesSwitch:w=!1,showCategory:x=!0,tagFilters:S=[],children:j,storeVersion:R,onSearchSelect:T=()=>{},endpoint:O,blockletRender:M,compact:$=!1}=e,Y=Ni(r,R),B=z.useMemo(()=>Qr({baseURL:O,headers:Y}),[O]),q=ol(n,{onFilterChange:i,emptyCategory:!h.showExplore,onSearchSelect:T}),[ne,ae]=z.useState(""),{data:K=[],error:Ee,loading:ke,run:Te}=il(B),be=z.useMemo(()=>{const oe=fs(K,[Ie=>Ie.name],["asc"]),xe=oe.findIndex(Ie=>Ie.name==="All"||Ie.locales.en==="All");return xe>-1?[{...oe[xe],_id:"All"},...oe.slice(0,xe),...oe.slice(xe+1)]:oe},[K]),je=z.useCallback(pl(t),[t]),N=z.useMemo(()=>ll(be,t),[be,t]),Q=al(je),he={search:q,compact:$,errors:{fetchCategoriesError:Ee},loadings:{fetchCategoriesLoading:ke},extraFilter:g,endpoint:O,queryFilter:u,layout:{showExplore:h.showExplore??!1,showCategory:h.showCategory??!0,showTitle:h.showTitle??!0,showSearch:h.showSearch??!0},minItemWidth:s,wrapChildren:m,t:je,storeVersion:R,serverVersion:r,selectedCategory:q.filters.category||(h.showExplore?"":"All"),categoryList:be,blockletRender:M,locale:t,categoryOptions:N,priceOptions:Q,storeApi:B,baseSearch:f,showResourcesSwitch:w,showCategory:x,tagFilters:S,onFilterChange:i,getCategoryLocale:oe=>{if(!oe)return null;const xe=K.find(Ie=>Ie._id===oe||Ie.locales.en==="All");return xe?xe.locales[t]||xe.locales.en:null},get developerName(){return ne},updateDeveloperName:ae};return z.useEffect(()=>{setTimeout(Te,v||0)},[O,Te,v]),o.jsx(ml,{value:he,children:j})}function me(){return z.useContext(Wi)||Ai}function Bi({children:e,onClick:t,size:n=32,...r}){return o.jsx(we,{...r,onClick:t,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:e})}function jt(e,t){return e===void 0?t:e}function $n({xs:e,sm:t,md:n,lg:r,xl:i,exact:s}){const u=Be(),h=Ye(u.breakpoints.down("sm")),m=Ye(u.breakpoints.between("sm","md")),g=Ye(u.breakpoints.between("md","lg")),f=Ye(u.breakpoints.between("lg","xl"));if(s)return h?e||null:m?t||null:g?n||null:f?r||null:i||null;let v=e;return h||(v=jt(t,v),m)||(v=jt(n,v),g)||(v=jt(r,v),f)?v:jt(i,v)}function bl({children:e}){const{open:t,toggleOpen:n}=Bn();return o.jsx($n,{xs:o.jsx(Mo,{open:t,onClose:()=>n(!1),children:e}),md:o.jsx(V,{children:e})})}const yl=z.forwardRef(({loading:e,disabled:t,...n},r)=>o.jsx(we,{ref:r,disableElevation:!0,disabled:t||e,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:e&&o.jsx(Ce,{size:"1em"})}));function jn({value:e,options:t,onChange:n,placeholder:r,...i}){var s;const u=z.useRef(null),h=Be(),[m,g]=z.useState(!1),[f,v]=z.useState(e!==null?e:""),w=Ye(h.breakpoints.down("sm"));z.useEffect(()=>{v(e!==null?e:"")},[e]);const x=z.useCallback(()=>{g(!1)},[]),S=z.useCallback(()=>{g(!0)},[]);function j(T){v(T.value),n(T.value),w&&x()}function R(T){return T===f}return o.jsxs(o.Fragment,{children:[o.jsxs(vl,{ref:u,onClick:S,variant:"outlined",size:"medium",className:["my-select__selector",Ao(f)?"":"my-select__selector--active"].join(" "),sx:{minWidth:{xs:"100px",md:"auto"},color:"text.primary",borderRadius:"8px"},...i,children:[((s=t.find(T=>T.value===f))==null?void 0:s.name)||r,o.jsx(Wo,{className:"my-select__arrowdown",component:Oi,sx:{width:18,height:18}})]}),o.jsx(Bo,{open:m,anchorEl:u.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:T,placement:O})=>o.jsx($o,{...T,style:{transformOrigin:O==="bottom"?"center top":"center bottom"},children:o.jsx(Ko,{children:o.jsx(Uo,{onClickAway:x,children:o.jsx(xl,{autoFocusItem:m,onMouseEnter:S,onMouseLeave:x,children:t.map(M=>o.jsxs(Rt,{onClick:()=>j(M),sx:{fontSize:14},children:[o.jsx(Ho,{sx:{mr:1,fontSize:16,visibility:R(M.value)?"visible":"hidden"}}),M.name]},M.value))})})})})})]})}const vl=De(yl)`
3
3
  border: 1px solid ${e=>e.theme.palette.divider};
4
4
  padding: 6px 8px 6px 12px;
5
5
  font-weight: ${e=>e.theme.typography.fontWeightRegular};
@@ -43,7 +43,7 @@ import{b$ as xr,a6 as zt,bZ as ot,dg as To,r as z,c4 as wr,j as o,bh as Me,aP as
43
43
  color: ${e=>e.theme.palette.primary.main};
44
44
  }
45
45
  }
46
- `;function $i(){const{search:e,t}=me(),{filters:n,handleSort:r,handlePrice:i}=e,s=zi(t);return o.jsxs(pe,{direction:{xs:"row",md:"column"},alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between",children:[o.jsx(ei,{control:o.jsx(ti,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.hint"}},onChange:u=>i(u.target.checked?"free":"")}),label:t("blocklet.free")}),o.jsx(jn,{value:n.sortBy||s[0].value,options:s,onChange:u=>r(u),placeholder:t("sort.sort")})]})}function wl({menus:e}){const{selectedCategory:t,search:n,t:r,categoryOptions:i,loadings:s,layout:u,baseSearch:h,compact:m}=me(),{filters:g,handleActiveMenu:f,handleCategory:v,cleanFilter:w}=n,{toggleOpen:x}=Bn();z.useEffect(()=>{x(!1)},[Object.values(g).join("")]);const S=sl(h,u.showSearch,g.keyword);return u.showCategory&&!m?o.jsxs(bl,{children:[o.jsx($n,{xs:o.jsxs(pe,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[o.jsx(Bi,{onClick:()=>x(!1),children:o.jsx(Cn,{})}),o.jsx(Z,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),o.jsx(pe,{visibility:s.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:S?o.jsxs(o.Fragment,{children:[u.showExplore&&o.jsxs(V,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[o.jsxs(V,{display:"flex",alignItems:"center",gap:1,children:[o.jsx(pt,{icon:Cs,width:20,height:20}),o.jsx(Z,{variant:"body1",color:!t&&!g.menu?"text.primary":"grey.400",fontWeight:!t&&!g.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),w()},children:r("explore.title")})]}),e==null?void 0:e.map(j=>o.jsxs(V,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof j.icon=="string"?o.jsx(pt,{icon:j.icon,width:20,height:20}):j.icon,o.jsx(Z,{variant:"body1",color:g.menu===j.key?"text.primary":"grey.400",fontWeight:g.menu===j.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{var R;x(!1),f(j.key),(R=j.onClick)==null||R.call(j)},children:j.title})]},j.key))]}),!!i.length&&o.jsx(pe,{gap:2,children:i.map(j=>o.jsx(Z,{variant:"body1",title:j.name,sx:{cursor:"pointer"},"data-cy":"filter",color:t===j.value?"text.primary":"grey.400",textTransform:"capitalize",onClick:()=>{t===j.value?w():v(j.value),x(!1)},children:j.name},j.value))})]}):o.jsx($i,{})})]}):null}function Kn(){const{endpoint:e,serverVersion:t,storeVersion:n}=me(),r=Ni(t,n),i=z.useMemo(()=>Xr({baseURL:e,headers:r}),[e]);return{get:async s=>{const{data:u}=await i.get(s);return u},post:async(s,u)=>{const{data:h}=await i.post(s,u);return h}}}const Ki=z.memo(function(e){return o.jsx(V,{height:60,display:"flex",alignItems:"center",justifyContent:"center",...e,children:o.jsx(Ce,{})})});function Ur({icon:e,children:t,maxWidth:n=100,title:r}){return(t===0||t)&&o.jsxs(pe,{direction:"row",alignItems:"center",gap:1,sx:{maxWidth:n,overflow:"hidden"},children:[e,o.jsx(Z,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r||(typeof t=="string"?t:void 0),children:t})]})}const Sl=16/9,un=292,Tn=189,Lt=336;function kl(){var e,t;const{t:n,search:r}=me(),{get:i}=Kn(),s=Be(),u=Qe(s.breakpoints.down("md")),h=((t=(e=window.blocklet)==null?void 0:e.preferences)==null?void 0:t.homeBanner)||[],{data:m=[],error:g,loading:f}=At(async()=>{const T=await i(En(Se.blockletsPath,{didList:h.map(O=>O.did).join(",")}));return T!=null&&T.dataList?h.map(O=>T.dataList.find(M=>M.did===O.did)):[]});g&&console.error("Get Banner Blocklets error:",g);const v={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.hint"};return!g&&h.length>0?o.jsxs(o.Fragment,{children:[o.jsx(Z,{component:"h2",variant:"h2",mt:{xs:2,md:0},mb:3,children:n("explore.title")}),o.jsx(V,{height:{xs:"auto",md:un},minHeight:un,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden",children:f?o.jsxs(V,{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center",children:[o.jsx(Pe,{variant:"rounded",height:Tn,width:Lt}),o.jsxs(V,{flex:1,height:"100%",children:[o.jsx(Pe,{variant:"text",height:50,width:100}),o.jsx(Pe,{variant:"text",height:40,width:"100%"}),o.jsx(Pe,{variant:"text",height:40,width:300}),o.jsxs(V,{display:"flex",gap:1,my:2,children:[o.jsx(Pe,{variant:"circular",height:20,width:20}),o.jsx(Pe,{variant:"text",height:20,width:50})]}),o.jsx(Pe,{variant:"rounded",height:30,width:100})]})]}):o.jsx(La,{showNav:!0,autoPlay:!0,slideDuration:u?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:T=>o.jsx(V,{onClick:T,sx:{display:{xs:"none",md:"block"}},children:o.jsx(us,{sx:{...v,left:5}})}),renderRightNav:T=>o.jsx(V,{onClick:T,sx:{display:{xs:"none",md:"block"}},children:o.jsx(ds,{sx:{...v,right:5}})}),items:h.map((T,O)=>({original:T.did,renderItem:()=>{var M;const $=m[O]||{},Q=T.cover||Tl(T.did,(M=$.screenshots)==null?void 0:M[0]),B=Fi(Q,s.breakpoints.values.md*2);return o.jsxs(pe,{height:{xs:"auto",md:un},sx:{cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${B}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},display:"flex",direction:{xs:"column",md:"row"},justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},onClick:()=>r.handleSearchSelect($),gap:{xs:2,md:5},children:[w(B),o.jsxs(pe,{flex:1,height:"100%",gap:3,children:[o.jsxs(V,{flex:1,children:[x(T.name||$.title||T.name),S(T.desc||$.description)]}),$.did&&j($,T.baseNum),R($)]})]})}}))})})]}):null;function w(T){return o.jsx(V,{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:Lt},children:o.jsx(Ol,{url:T})})}function x(T){return o.jsx(Z,{variant:"h2",width:"100%",children:T})}function S(T){return o.jsx(Z,{variant:"body2",color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:70,pt:1,sx:{display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,maxHeight:71,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:T})}function j(T,O=0){const{did:M,owner:$,stats:Q}=T;return o.jsxs(V,{display:"flex",alignItems:"center",gap:2,color:"text.secondary",children:[o.jsx(Ur,{icon:o.jsx(_t,{src:$.avatar,did:M,size:20,variant:"circle"}),children:$.fullName}),o.jsx(Ur,{icon:o.jsx(pt,{icon:Ci}),title:`${Q.downloads+O}`,children:jl(Q.downloads+O)})]})}function R(T){return o.jsx(we,{variant:"outlined",size:"small",onClick:()=>r.handleSearchSelect(T),sx:{width:"fit-content",textTransform:"none",borderRadius:1,borderColor:"grey.300","&:hover":{borderColor:"divider"}},children:n("explore.viewDetail")})}}const jl=e=>Number.isNaN(e)?0:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`,Tl=(e,t)=>e&&t?`/assets/${e}/screenshots/${t}`:"";function Ol({url:e}){const[t,n]=z.useState(!0);return o.jsxs(o.Fragment,{children:[t&&o.jsx(Pe,{variant:"rectangular",sx:{width:{xs:"100%",md:Lt},height:{xs:"auto",md:Tn}}}),o.jsx(V,{display:t?"none":"block",component:"img",src:e,alt:"",width:{xs:"100%",md:Lt},height:{xs:"auto",md:Tn},borderRadius:2,border:1,borderColor:"divider",sx:{objectFit:"container",cursor:"pointer",aspectRatio:Sl},onLoad:()=>n(!1),onError:()=>n(!1)})]})}function Cl({title:e,blocklets:t}){const{blockletRender:n,serverVersion:r}=me();return o.jsxs(V,{mt:3,children:[o.jsx(Z,{component:"h3",variant:"h3",sx:{mb:2},children:e}),o.jsx(kr,{container:!0,spacing:2,boxSizing:"border-box",maxWidth:"calc(100vw - 16px)",children:t.map(i=>o.jsx(kr,{item:!0,xs:12,md:6,p:"2px","data-blocklet-did":i.did,children:o.jsx(V,{padding:"1px",children:n({blocklet:i,blocklets:t,serverVersion:r})})},i.did))})]})}function Il(){const{get:e}=Kn(),{t}=me(),{data:n=[],error:r,loading:i}=At(async()=>{const s=await e(Se.explorePath);return Array.isArray(s)?s:[]});return r?o.jsx(In,{error:new Error(`Failed to fetch blocklets from ${Se.explorePath}`)}):i?o.jsx(Ki,{mt:15}):o.jsxs(o.Fragment,{children:[o.jsx(kl,{}),n.map(s=>{var u;return((u=s.blocklets)==null?void 0:u.length)>0?o.jsx(Cl,{title:t(`explore.${s.type}`),blocklets:s.blocklets},s.type):null})]})}const dn="__FREE_TEXT__",Hr="__NO_RESULT__",hn=40;function El({endpoint:e,t,locale:n,filters:r,handleKeyword:i,handleSearchSelect:s,...u}){const h=z.useRef(null),m=z.useRef(!1),[g,f]=z.useState(!1),[v,w]=z.useState(""),[x,S]=z.useState(!1),j=Kn(),[R,T]=z.useState(!1),O=(u==null?void 0:u.placeholder)||t("common.searchStore"),M=async N=>{T(!0);const X=await j.get(Xe(e,En(Se.blockletsPath,N)));return T(!1),X.dataList||[]},{data:$,run:Q}=At(N=>N?M({sortBy:Se.nameDesc,page:1,pageSize:10,keyword:N,showResources:"true"}):Promise.resolve([]),{manual:!0});z.useEffect(()=>{T(!0),Q(r.keyword),w(r.keyword||"")},[r.keyword,Q]),nl("ctrl + k, command + k",N=>{var X,he;return N.stopPropagation(),N.preventDefault(),(he=(X=h.current)==null?void 0:X.querySelector("input"))==null||he.focus(),!1},{enableOnTags:["INPUT"]});const B=ni(N=>Q(N),{wait:300}),q={name:dn,title:v,did:""};let ne=[];return v&&(R?ne=[q]:$!=null&&$.length?ne=[q,...$]:ne=[{name:Hr,title:t("blocklet.noResults"),did:""}]),o.jsxs(o.Fragment,{children:[o.jsxs(qo,{fullScreen:!0,open:x,sx:{display:{md:"none"}},children:[o.jsxs(V,{p:2,pb:0,display:"flex",alignItems:"center",gap:2,children:[o.jsx(Zr,{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:O,className:"bl-autocomplete-input",value:v,onChange:N=>ae(N.target.value),startAdornment:be(x),endAdornment:je()}),o.jsx(we,{variant:"outlined",onClick:()=>{S(!1),w(r.keyword||"")},children:t("common.cancel")})]}),o.jsx(Jr,{sx:{p:.5},children:ne.map(N=>ke(N))})]}),o.jsx(Ct,{sx:{display:{sx:"block",md:"none"},fontSize:28,color:"text.hint"},onClick:()=>S(!0)}),o.jsx(ms,{ref:h,open:!!v&&g,size:"small",onOpen:()=>f(!0),onClose:(N,X)=>{f(!1),X==="selectOption"&&!m.current&&i(v)},onKeyDown:N=>{N.key==="Enter"&&!v&&K()},disableClearable:!0,inputValue:v,onInputChange:(N,X)=>ae(X),isOptionEqualToValue:(N,X)=>N.name===X.name,getOptionLabel:N=>N.title,getOptionKey:N=>N.name,noOptionsText:t("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:N=>o.jsx(ri,{...N,InputProps:{...N.InputProps,autoFocus:!0,placeholder:O,className:"bl-autocomplete-input",value:v,startAdornment:be(g),endAdornment:je()}}),filterOptions:N=>N,...u,options:ne,renderOption:(N,X)=>ke(X),value:q,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(u.sx)?u.sx:[u.sx]]})]});function ae(N){T(!0),w(N),m.current=!1,B.run(N)}function K(){S(!1),w(""),ae(""),i("")}function Ie(N){N!=null&&N.did?(S(!1),m.current=!0,w(""),s(N)):N.name===dn&&(S(!1),i(v))}function ke(N){var X,he;return o.jsxs(Rt,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>Ie(N),children:[Te(N),o.jsxs(Z,{variant:"body1",children:[o.jsx(Z,{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1,children:N.title}),o.jsx(Z,{sx:{color:"text.hint"},fontSize:"13px",children:((he=(X=N.category)==null?void 0:X.locales)==null?void 0:he[n||"en"])||""})]})]},N.did)}function Te(N){if([dn,Hr].includes(N.name))return o.jsx(V,{width:hn,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.hint",bgcolor:"grey.100",borderRadius:"8px",children:o.jsx(Ct,{sx:{fontSize:28}})});let X="";return N.logo&&(X=Xe(e,"assets",N.did,Fi(N.logo,hn,N.version))),o.jsx(_t,{src:X,size:hn,style:{borderRadius:"8px",overflow:"hidden"}})}function be(N=!0){return o.jsx(V,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.hint"},children:N&&v&&R?o.jsx(Ce,{color:"inherit",size:16}):o.jsx(Ct,{sx:{fontSize:16,cursor:"default"}})})}function je(){return v?o.jsx(V,{sx:{display:"flex",alignItems:"center",color:"text.hint"},children:o.jsx(Cn,{sx:{fontSize:20,cursor:"pointer"},onClick:()=>K()})}):null}}function _l({placeholder:e,...t}){const{search:n,t:r}=me(),{filters:i,handleKeyword:s}=n,[u,h]=z.useState(i.keyword||""),m=ni(s,{wait:300}),g=w=>{const{value:x}=w.target;h(x),m.run(x)},f=()=>{h(""),s("")};z.useEffect(()=>{h(i.keyword||"")},[i.keyword]);const v=e||r("common.searchPlaceholder");return o.jsx(Rl,{inputProps:{"data-cy":"search-blocklet"},startAdornment:o.jsx(Tr,{position:"start",children:o.jsx(Pl,{sx:{fontSize:18,ml:-.5}})}),onChange:g,placeholder:v,value:u,title:v,"data-cy":"search",endAdornment:u&&o.jsx(Tr,{position:"end",children:o.jsx(Ml,{"data-cy":"search-delete",onClick:f})}),...t})}const Rl=De(Zr)`
46
+ `;function $i(){const{search:e,t}=me(),{filters:n,handleSort:r,handlePrice:i}=e,s=zi(t);return o.jsxs(pe,{direction:{xs:"row",md:"column"},alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between",children:[o.jsx(ei,{control:o.jsx(ti,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.hint"}},onChange:u=>i(u.target.checked?"free":"")}),label:t("blocklet.free")}),o.jsx(jn,{value:n.sortBy||s[0].value,options:s,onChange:u=>r(u),placeholder:t("sort.sort")})]})}function wl({menus:e}){const{selectedCategory:t,search:n,t:r,categoryOptions:i,loadings:s,layout:u,baseSearch:h,compact:m}=me(),{filters:g,handleActiveMenu:f,handleCategory:v,cleanFilter:w}=n,{toggleOpen:x}=Bn();z.useEffect(()=>{x(!1)},[Object.values(g).join("")]);const S=sl(h,u.showSearch,g.keyword);return u.showCategory&&!m?o.jsxs(bl,{children:[o.jsx($n,{xs:o.jsxs(pe,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[o.jsx(Bi,{onClick:()=>x(!1),children:o.jsx(Cn,{})}),o.jsx(Z,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),o.jsx(pe,{visibility:s.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:S?o.jsxs(o.Fragment,{children:[u.showExplore&&o.jsxs(V,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[o.jsxs(V,{display:"flex",alignItems:"center",gap:1,children:[o.jsx(pt,{icon:Cs,width:20,height:20}),o.jsx(Z,{variant:"body1",color:!t&&!g.menu?"text.primary":"grey.400",fontWeight:!t&&!g.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),w()},children:r("explore.title")})]}),e==null?void 0:e.map(j=>o.jsxs(V,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof j.icon=="string"?o.jsx(pt,{icon:j.icon,width:20,height:20}):j.icon,o.jsx(Z,{variant:"body1",color:g.menu===j.key?"text.primary":"grey.400",fontWeight:g.menu===j.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{var R;x(!1),f(j.key),(R=j.onClick)==null||R.call(j)},children:j.title})]},j.key))]}),!!i.length&&o.jsx(pe,{gap:2,children:i.map(j=>o.jsx(Z,{variant:"body1",title:j.name,sx:{cursor:"pointer"},"data-cy":"filter",color:t===j.value?"text.primary":"grey.400",textTransform:"capitalize",onClick:()=>{t===j.value?w():v(j.value),x(!1)},children:j.name},j.value))})]}):o.jsx($i,{})})]}):null}function Kn(){const{endpoint:e,serverVersion:t,storeVersion:n}=me(),r=Ni(t,n),i=z.useMemo(()=>Qr({baseURL:e,headers:r}),[e]);return{get:async s=>{const{data:u}=await i.get(s);return u},post:async(s,u)=>{const{data:h}=await i.post(s,u);return h}}}const Ki=z.memo(function(e){return o.jsx(V,{height:60,display:"flex",alignItems:"center",justifyContent:"center",...e,children:o.jsx(Ce,{})})});function Ur({icon:e,children:t,maxWidth:n=100,title:r}){return(t===0||t)&&o.jsxs(pe,{direction:"row",alignItems:"center",gap:1,sx:{maxWidth:n,overflow:"hidden"},children:[e,o.jsx(Z,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r||(typeof t=="string"?t:void 0),children:t})]})}const Sl=16/9,un=292,Tn=189,Lt=336;function kl(){var e,t;const{t:n,search:r}=me(),{get:i}=Kn(),s=Be(),u=Ye(s.breakpoints.down("md")),h=((t=(e=window.blocklet)==null?void 0:e.preferences)==null?void 0:t.homeBanner)||[],{data:m=[],error:g,loading:f}=At(async()=>{const T=await i(In(Se.blockletsPath,{didList:h.map(O=>O.did).join(",")}));return T!=null&&T.dataList?h.map(O=>T.dataList.find(M=>M.did===O.did)):[]});g&&console.error("Get Banner Blocklets error:",g);const v={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.hint"};return!g&&h.length>0?o.jsxs(o.Fragment,{children:[o.jsx(Z,{component:"h2",variant:"h2",mt:{xs:2,md:0},mb:3,children:n("explore.title")}),o.jsx(V,{height:{xs:"auto",md:un},minHeight:un,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden",children:f?o.jsxs(V,{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center",children:[o.jsx(Pe,{variant:"rounded",height:Tn,width:Lt}),o.jsxs(V,{flex:1,height:"100%",children:[o.jsx(Pe,{variant:"text",height:50,width:100}),o.jsx(Pe,{variant:"text",height:40,width:"100%"}),o.jsx(Pe,{variant:"text",height:40,width:300}),o.jsxs(V,{display:"flex",gap:1,my:2,children:[o.jsx(Pe,{variant:"circular",height:20,width:20}),o.jsx(Pe,{variant:"text",height:20,width:50})]}),o.jsx(Pe,{variant:"rounded",height:30,width:100})]})]}):o.jsx(La,{showNav:!0,autoPlay:!0,slideDuration:u?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:T=>o.jsx(V,{onClick:T,sx:{display:{xs:"none",md:"block"}},children:o.jsx(us,{sx:{...v,left:5}})}),renderRightNav:T=>o.jsx(V,{onClick:T,sx:{display:{xs:"none",md:"block"}},children:o.jsx(ds,{sx:{...v,right:5}})}),items:h.map((T,O)=>({original:T.did,renderItem:()=>{var M;const $=m[O]||{},Y=T.cover||Tl(T.did,(M=$.screenshots)==null?void 0:M[0]),B=Fi(Y,s.breakpoints.values.md*2);return o.jsxs(pe,{height:{xs:"auto",md:un},sx:{cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${B}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},display:"flex",direction:{xs:"column",md:"row"},justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},onClick:()=>r.handleSearchSelect($),gap:{xs:2,md:5},children:[w(B),o.jsxs(pe,{flex:1,height:"100%",gap:3,children:[o.jsxs(V,{flex:1,children:[x(T.name||$.title||T.name),S(T.desc||$.description)]}),$.did&&j($,T.baseNum),R($)]})]})}}))})})]}):null;function w(T){return o.jsx(V,{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:Lt},children:o.jsx(Ol,{url:T})})}function x(T){return o.jsx(Z,{variant:"h2",width:"100%",children:T})}function S(T){return o.jsx(Z,{variant:"body2",color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:70,pt:1,sx:{display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,maxHeight:71,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:T})}function j(T,O=0){const{did:M,owner:$,stats:Y}=T;return o.jsxs(V,{display:"flex",alignItems:"center",gap:2,color:"text.secondary",children:[o.jsx(Ur,{icon:o.jsx(_t,{src:$.avatar,did:M,size:20,variant:"circle"}),children:$.fullName}),o.jsx(Ur,{icon:o.jsx(pt,{icon:Ci}),title:`${Y.downloads+O}`,children:jl(Y.downloads+O)})]})}function R(T){return o.jsx(we,{variant:"outlined",size:"small",onClick:()=>r.handleSearchSelect(T),sx:{width:"fit-content",textTransform:"none",borderRadius:1,borderColor:"grey.300","&:hover":{borderColor:"divider"}},children:n("explore.viewDetail")})}}const jl=e=>Number.isNaN(e)?0:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`,Tl=(e,t)=>e&&t?`/assets/${e}/screenshots/${t}`:"";function Ol({url:e}){const[t,n]=z.useState(!0);return o.jsxs(o.Fragment,{children:[t&&o.jsx(Pe,{variant:"rectangular",sx:{width:{xs:"100%",md:Lt},height:{xs:"auto",md:Tn}}}),o.jsx(V,{display:t?"none":"block",component:"img",src:e,alt:"",width:{xs:"100%",md:Lt},height:{xs:"auto",md:Tn},borderRadius:2,border:1,borderColor:"divider",sx:{objectFit:"container",cursor:"pointer",aspectRatio:Sl},onLoad:()=>n(!1),onError:()=>n(!1)})]})}function Cl({title:e,blocklets:t}){const{blockletRender:n,serverVersion:r}=me();return o.jsxs(V,{mt:3,children:[o.jsx(Z,{component:"h3",variant:"h3",sx:{mb:2},children:e}),o.jsx(kr,{container:!0,spacing:2,boxSizing:"border-box",maxWidth:"calc(100vw - 16px)",children:t.map(i=>o.jsx(kr,{item:!0,xs:12,md:6,p:"2px","data-blocklet-did":i.did,children:o.jsx(V,{padding:"1px",children:n({blocklet:i,blocklets:t,serverVersion:r})})},i.did))})]})}function El(){const{get:e}=Kn(),{t}=me(),{data:n=[],error:r,loading:i}=At(async()=>{const s=await e(Se.explorePath);return Array.isArray(s)?s:[]});return r?o.jsx(En,{error:new Error(`Failed to fetch blocklets from ${Se.explorePath}`)}):i?o.jsx(Ki,{mt:15}):o.jsxs(o.Fragment,{children:[o.jsx(kl,{}),n.map(s=>{var u;return((u=s.blocklets)==null?void 0:u.length)>0?o.jsx(Cl,{title:t(`explore.${s.type}`),blocklets:s.blocklets},s.type):null})]})}const dn="__FREE_TEXT__",Hr="__NO_RESULT__",hn=40;function Il({endpoint:e,t,locale:n,filters:r,handleKeyword:i,handleSearchSelect:s,...u}){const h=z.useRef(null),m=z.useRef(!1),[g,f]=z.useState(!1),[v,w]=z.useState(""),[x,S]=z.useState(!1),j=Kn(),[R,T]=z.useState(!1),O=(u==null?void 0:u.placeholder)||t("common.searchStore"),M=async N=>{T(!0);const Q=await j.get(Qe(e,In(Se.blockletsPath,N)));return T(!1),Q.dataList||[]},{data:$,run:Y}=At(N=>N?M({sortBy:Se.nameDesc,page:1,pageSize:10,keyword:N,showResources:"true"}):Promise.resolve([]),{manual:!0});z.useEffect(()=>{T(!0),Y(r.keyword),w(r.keyword||"")},[r.keyword,Y]),nl("ctrl + k, command + k",N=>{var Q,he;return N.stopPropagation(),N.preventDefault(),(he=(Q=h.current)==null?void 0:Q.querySelector("input"))==null||he.focus(),!1},{enableOnTags:["INPUT"]});const B=ni(N=>Y(N),{wait:300}),q={name:dn,title:v,did:""};let ne=[];return v&&(R?ne=[q]:$!=null&&$.length?ne=[q,...$]:ne=[{name:Hr,title:t("blocklet.noResults"),did:""}]),o.jsxs(o.Fragment,{children:[o.jsxs(qo,{fullScreen:!0,open:x,sx:{display:{md:"none"}},children:[o.jsxs(V,{p:2,pb:0,display:"flex",alignItems:"center",gap:2,children:[o.jsx(Zr,{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:O,className:"bl-autocomplete-input",value:v,onChange:N=>ae(N.target.value),startAdornment:be(x),endAdornment:je()}),o.jsx(we,{variant:"outlined",onClick:()=>{S(!1),w(r.keyword||"")},children:t("common.cancel")})]}),o.jsx(Jr,{sx:{p:.5},children:ne.map(N=>ke(N))})]}),o.jsx(Ct,{sx:{display:{sx:"block",md:"none"},fontSize:28,color:"text.hint"},onClick:()=>S(!0)}),o.jsx(ms,{ref:h,open:!!v&&g,size:"small",onOpen:()=>f(!0),onClose:(N,Q)=>{f(!1),Q==="selectOption"&&!m.current&&i(v)},onKeyDown:N=>{N.key==="Enter"&&!v&&K()},disableClearable:!0,inputValue:v,onInputChange:(N,Q)=>ae(Q),isOptionEqualToValue:(N,Q)=>N.name===Q.name,getOptionLabel:N=>N.title,getOptionKey:N=>N.name,noOptionsText:t("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:N=>o.jsx(ri,{...N,InputProps:{...N.InputProps,autoFocus:!0,placeholder:O,className:"bl-autocomplete-input",value:v,startAdornment:be(g),endAdornment:je()}}),filterOptions:N=>N,...u,options:ne,renderOption:(N,Q)=>ke(Q),value:q,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(u.sx)?u.sx:[u.sx]]})]});function ae(N){T(!0),w(N),m.current=!1,B.run(N)}function K(){S(!1),w(""),ae(""),i("")}function Ee(N){N!=null&&N.did?(S(!1),m.current=!0,w(""),s(N)):N.name===dn&&(S(!1),i(v))}function ke(N){var Q,he;return o.jsxs(Rt,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>Ee(N),children:[Te(N),o.jsxs(Z,{variant:"body1",children:[o.jsx(Z,{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1,children:N.title}),o.jsx(Z,{sx:{color:"text.hint"},fontSize:"13px",children:((he=(Q=N.category)==null?void 0:Q.locales)==null?void 0:he[n||"en"])||""})]})]},N.did)}function Te(N){if([dn,Hr].includes(N.name))return o.jsx(V,{width:hn,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.hint",bgcolor:"grey.100",borderRadius:"8px",children:o.jsx(Ct,{sx:{fontSize:28}})});let Q="";return N.logo&&(Q=Qe(e,"assets",N.did,Fi(N.logo,hn,N.version))),o.jsx(_t,{src:Q,size:hn,style:{borderRadius:"8px",overflow:"hidden"}})}function be(N=!0){return o.jsx(V,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.hint"},children:N&&v&&R?o.jsx(Ce,{color:"inherit",size:16}):o.jsx(Ct,{sx:{fontSize:16,cursor:"default"}})})}function je(){return v?o.jsx(V,{sx:{display:"flex",alignItems:"center",color:"text.hint"},children:o.jsx(Cn,{sx:{fontSize:20,cursor:"pointer"},onClick:()=>K()})}):null}}function _l({placeholder:e,...t}){const{search:n,t:r}=me(),{filters:i,handleKeyword:s}=n,[u,h]=z.useState(i.keyword||""),m=ni(s,{wait:300}),g=w=>{const{value:x}=w.target;h(x),m.run(x)},f=()=>{h(""),s("")};z.useEffect(()=>{h(i.keyword||"")},[i.keyword]);const v=e||r("common.searchPlaceholder");return o.jsx(Rl,{inputProps:{"data-cy":"search-blocklet"},startAdornment:o.jsx(Tr,{position:"start",children:o.jsx(Pl,{sx:{fontSize:18,ml:-.5}})}),onChange:g,placeholder:v,value:u,title:v,"data-cy":"search",endAdornment:u&&o.jsx(Tr,{position:"end",children:o.jsx(Ml,{"data-cy":"search-delete",onClick:f})}),...t})}const Rl=De(Zr)`
47
47
  background-color: ${e=>e.theme.palette.grey[50]};
48
48
  font-size: 14px;
49
49
  border-radius: 6px;
@@ -66,7 +66,7 @@ import{b$ as xr,a6 as zt,bZ as ot,dg as To,r as z,c4 as wr,j as o,bh as Me,aP as
66
66
  color: ${e=>e.theme.palette.grey[500]};
67
67
  font-size: 16px;
68
68
  cursor: pointer;
69
- `;function Ll(){var e;const{search:t,t:n,endpoint:r,locale:i,getCategoryLocale:s,developerName:u,showResourcesSwitch:h,layout:m,baseSearch:g,categoryOptions:f,compact:v}=me(),{filters:w,handleSort:x,handlePrice:S,handleDeveloper:j,handleSwitchShowResources:R,cleanFilter:T,handleCategory:O}=t,M=zi(n);return o.jsxs(pe,{position:"sticky",top:0,zIndex:1e3,className:"filter-bar",direction:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,spacing:{xs:1,md:0},pt:{xs:2,md:0},px:0,pb:v?2:3,sx:{backgroundColor:"background.default"},children:[!v&&o.jsx(Z,{variant:"h2",textTransform:"capitalize",children:s(w.category)}),o.jsxs(pe,{flex:1,direction:"row",alignItems:"center",flexWrap:{xs:"wrap",md:"nowrap"},width:"100%",justifyContent:{xs:"flex-start",md:"flex-end"},gap:2,children:[m.showSearch?o.jsx(V,{flex:1,flexBasis:{xs:"100%",md:"auto"},children:g?o.jsx(_l,{}):o.jsx(El,{locale:i,endpoint:r,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t:n,filters:t.filters,handleKeyword:t.handleKeyword,handleSearchSelect:t.handleSearchSelect})}):null,w.owner&&u&&o.jsx(jr,{label:n("blocklet.authorTag",{name:u}),size:"small",onDelete:()=>j("")}),w.resourceDid&&w.resourceBlocklet&&o.jsx(jr,{label:n("blocklet.resourceTag",{name:w.resourceBlocklet}),size:"small",onDelete:()=>T(["resourceDid","resourceBlocklet","showResources"])}),h?o.jsx(qr,{checked:w.showResources!=="false",onChange:$=>R($?"true":"false"),label:n("common.showResources")}):null,o.jsx(qr,{checked:w.price==="free",onChange:$=>S($?"free":""),label:n("blocklet.free")}),v&&o.jsx(V,{children:o.jsx(jn,{value:w.category||((e=f[0])==null?void 0:e.value),options:f,placeholder:n("common.category"),onChange:$=>O($)})}),o.jsx(jn,{value:w.sortBy||M[0].value,options:M,placeholder:n("sort.sort"),onChange:$=>x($)})]})]})}function qr({checked:e,onChange:t,label:n}){const r=Be();return o.jsx(ei,{sx:{m:0,p:0},className:"check-button",control:o.jsx(ti,{checked:e,icon:o.jsx(pt,{style:{padding:0,color:r.palette.text.secondary},icon:Ka}),checkedIcon:o.jsx(pt,{style:{padding:0,color:r.palette.primary.main},icon:Ua}),size:"large",sx:{p:0,mr:1},onChange:i=>t(i.target.checked)}),label:n})}function Tt({children:e}){return o.jsxs(V,{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.hint",children:[o.jsx(hs,{}),e]})}function Vr(){const{t:e}=me();return o.jsx(Z,{style:{textAlign:"center"},variant:"subtitle2",children:e("blocklet.noResults")})}function fn({filterTip:e,keywordTip:t}){const{t:n,locale:r}=me(),i=()=>r==="zh"?"、":" , ";return o.jsxs(V,{mt:1,display:"flex",children:[o.jsx(Z,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),e&&o.jsx(Z,{children:n("blocklet.filterTip")}),e&&t&&i(),t&&o.jsx(Z,{children:n("blocklet.keywordTip")})]})}function pn({primaryStart:e,primaryEnd:t,filter:n}){return o.jsxs(Z,{variant:"subtitle2",display:"flex",gap:.5,mx:.5,children:[o.jsx(Z,{children:e}),o.jsx(Z,{title:n,color:"primary",sx:{maxWidth:"30vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),o.jsxs(Z,{children:[t," "]})]})}function Dl(){const{t:e,search:t,getCategoryLocale:n,selectedCategory:r}=me(),{filters:i}=t,s=!!r||!!i.price;if(i.keyword&&s)return o.jsxs(Tt,{children:[o.jsx(pn,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:i.keyword}),o.jsx(fn,{keywordTip:!0,filterTip:!0})]});if(i.keyword)return o.jsxs(Tt,{children:[o.jsx(pn,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:i.keyword}),o.jsx(fn,{keywordTip:!0})]});if(s){const u=n(r);return o.jsxs(Tt,{children:[u?o.jsx(pn,{primaryStart:e("blocklet.noCategoryResults1"),primaryEnd:e("blocklet.noCategoryResults2"),filter:u}):o.jsx(Vr,{}),o.jsx(fn,{filterTip:!0})]})}return o.jsx(Tt,{children:o.jsx(Vr,{})})}const zl=(e,t,n,r)=>cs(async i=>{i||(n.currentPage=n.defaultCurrentPage);const{currentPage:s,pageSize:u}=n,h={...t,category:t.category==="All"?"":t.category,sortBy:Se[t.sortBy],page:s,pageSize:u};r(null);const{data:m={}}=await e.get(Se.blockletsPath,{params:h});return n.currentPage++,{page:s,pageSize:u,list:(m==null?void 0:m.dataList)||[],total:(m==null?void 0:m.total)||0}},{isNoMore:i=>i?i.page*i.pageSize>=i.total:!1,reloadDeps:[e,Vo(t)],onError:r});function Fl(){var e;const{storeApi:t,search:n,extraFilter:r,errors:i,updateDeveloperName:s}=me(),{filters:u}=n,h=Lo({currentPage:Se.currentPage,pageSize:dl()?Se.mobilePageSize:Se.pageSize,defaultCurrentPage:Se.defaultCurrentPage}),[m,g]=z.useState(null),f=zl(t,u,h,g),v=z.useMemo(()=>{var w,x;return r?r(((w=f.data)==null?void 0:w.list)||[]):((x=f.data)==null?void 0:x.list)||[]},[f.data,r]);return z.useEffect(()=>{const w=v.find(x=>x.owner.did===u.owner);s((w==null?void 0:w.owner.fullName)||(w==null?void 0:w.author.name)||"")},[u.owner,v,s]),{blocklets:v,fetchBlockletsError:m,loadMore:f.loadMore,hasNextPage:!f.noMore,total:((e=f.data)==null?void 0:e.total)||0,loadings:{fetchBlockletsLoading:f.loading,loadingMore:f.loadingMore},errors:{...i,fetchBlockletsError:m}}}function Nl(){const{t:e,search:t,endpoint:n,blockletRender:r,serverVersion:i,minItemWidth:s,layout:u,baseSearch:h,compact:m}=me(),{filters:g}=t,{blocklets:f,errors:v,loadMore:w,loadings:x,hasNextPage:S,total:j}=Fl(),[R]=$a({loading:x.fetchBlockletsLoading||x.loadingMore,hasNextPage:S,onLoadMore:w});if(v.fetchBlockletsError){const $=new Error(`Failed to fetch blocklets from ${n}: ${cl(v.fetchBlockletsError)}`);return o.jsx(In,{error:$})}const T=h&&u.showSearch||!g.keyword;return o.jsxs(o.Fragment,{children:[T?o.jsx(Ll,{}):o.jsxs(o.Fragment,{children:[o.jsx($n,{xs:o.jsx($i,{}),md:null}),M()]}),O(),!x.fetchBlockletsLoading&&S&&o.jsx(V,{height:70,minHeight:70,display:"flex",justifyContent:"center",py:2,overflow:"hidden",ref:R,children:o.jsx(Ce,{})})]});function O(){return x.fetchBlockletsLoading?o.jsx(Ki,{mt:15}):f.length?o.jsx(V,{className:"blocklet-list",display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${s}px, 1fr))`},p:"2px",rowGap:2,columnGap:m?0:2,children:f.map($=>o.jsx(V,{"data-blocklet-did":$.did,minWidth:{xs:"100%",sm:s},maxWidth:"calc(100vw - 32px)",children:r({blocklet:$,blocklets:f,serverVersion:i})},$.did))}):o.jsx(Dl,{})}function M(){return o.jsxs(pe,{direction:"row",className:"search-result-title",alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0},children:[o.jsx(Z,{variant:"h3",title:g.keyword,maxWidth:"50vw",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e("blocklet.search",{keyword:g.keyword})}),o.jsx(Z,{variant:"body1",color:"text.hint",fontSize:13,children:e("blocklet.resultCount",{count:j})})]})}}function Al(){const{t:e,selectedCategory:t,getCategoryLocale:n}=me(),{toggleOpen:r}=Bn();return o.jsxs(Z,{variant:"body1",display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium",children:[o.jsx(Bi,{onClick:()=>r(!0),children:o.jsx(Po,{})}),n(t)||e("common.category")]})}function Wl({menus:e,children:t}){var n;const{search:r,layout:i,compact:s}=me(),{filters:u}=r,h=z.useRef(null),m=u.category||u.keyword||u.price,g=(n=e==null?void 0:e.find(f=>f.key===u.menu))==null?void 0:n.key;return o.jsx(rl,{children:o.jsxs(_o,{FallbackComponent:In,children:[!s&&o.jsx(Al,{}),o.jsxs(V,{ref:h,display:"flex",height:"100%",className:"list-container",pt:{xs:0,md:s?0:5},children:[o.jsx(wl,{menus:e}),o.jsxs(pe,{height:"100%",position:"relative",flex:1,sx:s?{overflowY:"auto",ml:-2,pr:1,pb:2}:{overflow:"visible"},children:[g&&(t==null?void 0:t(g)),!g&&(i.showExplore&&!m?o.jsx(Il,{}):o.jsx(Nl,{}))]})]})]})})}function Ic(e){const{menus:t,children:n,...r}=e,i=Be(),s=Co(Io({},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 o.jsx(Eo,{theme:s,children:o.jsx(gl,{...r,children:o.jsx(Wl,{menus:t,children:n})})})}const Ec={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>'},Bl=(e,t)=>!t||!e?!0:Or.satisfies(Or.coerce(e),t);function Ui({children:e,serverVersion:t="",requirementVersion:n="",...r}){const{t:i}=$e();return Bl(t,n)?e:o.jsx(_n,{title:i("store.tooltip.upgradeServer",{serverVersion:t,version:n}),arrow:!0,children:o.jsx(Z,{children:o.jsx(we,{disabled:!0,variant:"outlined",...r,children:i("common.upgradeServer")})})})}Ui.propTypes={children:P.node.isRequired,serverVersion:P.string,requirementVersion:P.string};Ui.defaultProps={serverVersion:"",requirementVersion:""};De("div")`
69
+ `;function Ll(){var e;const{search:t,t:n,endpoint:r,locale:i,getCategoryLocale:s,developerName:u,showResourcesSwitch:h,layout:m,baseSearch:g,categoryOptions:f,compact:v}=me(),{filters:w,handleSort:x,handlePrice:S,handleDeveloper:j,handleSwitchShowResources:R,cleanFilter:T,handleCategory:O}=t,M=zi(n);return o.jsxs(pe,{position:"sticky",top:0,zIndex:1e3,className:"filter-bar",direction:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,spacing:{xs:1,md:0},pt:{xs:2,md:0},px:0,pb:v?2:3,sx:{backgroundColor:"background.default"},children:[!v&&o.jsx(Z,{variant:"h2",textTransform:"capitalize",children:s(w.category)}),o.jsxs(pe,{flex:1,direction:"row",alignItems:"center",flexWrap:{xs:"wrap",md:"nowrap"},width:"100%",justifyContent:{xs:"flex-start",md:"flex-end"},gap:2,children:[m.showSearch?o.jsx(V,{flex:1,flexBasis:{xs:"100%",md:"auto"},children:g?o.jsx(_l,{}):o.jsx(Il,{locale:i,endpoint:r,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t:n,filters:t.filters,handleKeyword:t.handleKeyword,handleSearchSelect:t.handleSearchSelect})}):null,w.owner&&u&&o.jsx(jr,{label:n("blocklet.authorTag",{name:u}),size:"small",onDelete:()=>j("")}),w.resourceDid&&w.resourceBlocklet&&o.jsx(jr,{label:n("blocklet.resourceTag",{name:w.resourceBlocklet}),size:"small",onDelete:()=>T(["resourceDid","resourceBlocklet","showResources"])}),h?o.jsx(qr,{checked:w.showResources!=="false",onChange:$=>R($?"true":"false"),label:n("common.showResources")}):null,o.jsx(qr,{checked:w.price==="free",onChange:$=>S($?"free":""),label:n("blocklet.free")}),v&&o.jsx(V,{children:o.jsx(jn,{value:w.category||((e=f[0])==null?void 0:e.value),options:f,placeholder:n("common.category"),onChange:$=>O($)})}),o.jsx(jn,{value:w.sortBy||M[0].value,options:M,placeholder:n("sort.sort"),onChange:$=>x($)})]})]})}function qr({checked:e,onChange:t,label:n}){const r=Be();return o.jsx(ei,{sx:{m:0,p:0},className:"check-button",control:o.jsx(ti,{checked:e,icon:o.jsx(pt,{style:{padding:0,color:r.palette.text.secondary},icon:Ka}),checkedIcon:o.jsx(pt,{style:{padding:0,color:r.palette.primary.main},icon:Ua}),size:"large",sx:{p:0,mr:1},onChange:i=>t(i.target.checked)}),label:n})}function Tt({children:e}){return o.jsxs(V,{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.hint",children:[o.jsx(hs,{}),e]})}function Vr(){const{t:e}=me();return o.jsx(Z,{style:{textAlign:"center"},variant:"subtitle2",children:e("blocklet.noResults")})}function fn({filterTip:e,keywordTip:t}){const{t:n,locale:r}=me(),i=()=>r==="zh"?"、":" , ";return o.jsxs(V,{mt:1,display:"flex",children:[o.jsx(Z,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),e&&o.jsx(Z,{children:n("blocklet.filterTip")}),e&&t&&i(),t&&o.jsx(Z,{children:n("blocklet.keywordTip")})]})}function pn({primaryStart:e,primaryEnd:t,filter:n}){return o.jsxs(Z,{variant:"subtitle2",display:"flex",gap:.5,mx:.5,children:[o.jsx(Z,{children:e}),o.jsx(Z,{title:n,color:"primary",sx:{maxWidth:"30vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),o.jsxs(Z,{children:[t," "]})]})}function Dl(){const{t:e,search:t,getCategoryLocale:n,selectedCategory:r}=me(),{filters:i}=t,s=!!r||!!i.price;if(i.keyword&&s)return o.jsxs(Tt,{children:[o.jsx(pn,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:i.keyword}),o.jsx(fn,{keywordTip:!0,filterTip:!0})]});if(i.keyword)return o.jsxs(Tt,{children:[o.jsx(pn,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:i.keyword}),o.jsx(fn,{keywordTip:!0})]});if(s){const u=n(r);return o.jsxs(Tt,{children:[u?o.jsx(pn,{primaryStart:e("blocklet.noCategoryResults1"),primaryEnd:e("blocklet.noCategoryResults2"),filter:u}):o.jsx(Vr,{}),o.jsx(fn,{filterTip:!0})]})}return o.jsx(Tt,{children:o.jsx(Vr,{})})}const zl=(e,t,n,r)=>cs(async i=>{i||(n.currentPage=n.defaultCurrentPage);const{currentPage:s,pageSize:u}=n,h={...t,category:t.category==="All"?"":t.category,sortBy:Se[t.sortBy],page:s,pageSize:u};r(null);const{data:m={}}=await e.get(Se.blockletsPath,{params:h});return n.currentPage++,{page:s,pageSize:u,list:(m==null?void 0:m.dataList)||[],total:(m==null?void 0:m.total)||0}},{isNoMore:i=>i?i.page*i.pageSize>=i.total:!1,reloadDeps:[e,Vo(t)],onError:r});function Fl(){var e;const{storeApi:t,search:n,extraFilter:r,errors:i,updateDeveloperName:s}=me(),{filters:u}=n,h=Lo({currentPage:Se.currentPage,pageSize:dl()?Se.mobilePageSize:Se.pageSize,defaultCurrentPage:Se.defaultCurrentPage}),[m,g]=z.useState(null),f=zl(t,u,h,g),v=z.useMemo(()=>{var w,x;return r?r(((w=f.data)==null?void 0:w.list)||[]):((x=f.data)==null?void 0:x.list)||[]},[f.data,r]);return z.useEffect(()=>{const w=v.find(x=>x.owner.did===u.owner);s((w==null?void 0:w.owner.fullName)||(w==null?void 0:w.author.name)||"")},[u.owner,v,s]),{blocklets:v,fetchBlockletsError:m,loadMore:f.loadMore,hasNextPage:!f.noMore,total:((e=f.data)==null?void 0:e.total)||0,loadings:{fetchBlockletsLoading:f.loading,loadingMore:f.loadingMore},errors:{...i,fetchBlockletsError:m}}}function Nl(){const{t:e,search:t,endpoint:n,blockletRender:r,serverVersion:i,minItemWidth:s,layout:u,baseSearch:h,compact:m}=me(),{filters:g}=t,{blocklets:f,errors:v,loadMore:w,loadings:x,hasNextPage:S,total:j}=Fl(),[R]=$a({loading:x.fetchBlockletsLoading||x.loadingMore,hasNextPage:S,onLoadMore:w});if(v.fetchBlockletsError){const $=new Error(`Failed to fetch blocklets from ${n}: ${cl(v.fetchBlockletsError)}`);return o.jsx(En,{error:$})}const T=h&&u.showSearch||!g.keyword;return o.jsxs(o.Fragment,{children:[T?o.jsx(Ll,{}):o.jsxs(o.Fragment,{children:[o.jsx($n,{xs:o.jsx($i,{}),md:null}),M()]}),O(),!x.fetchBlockletsLoading&&S&&o.jsx(V,{height:70,minHeight:70,display:"flex",justifyContent:"center",py:2,overflow:"hidden",ref:R,children:o.jsx(Ce,{})})]});function O(){return x.fetchBlockletsLoading?o.jsx(Ki,{mt:15}):f.length?o.jsx(V,{className:"blocklet-list",display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${s}px, 1fr))`},p:"2px",rowGap:2,columnGap:m?0:2,children:f.map($=>o.jsx(V,{"data-blocklet-did":$.did,minWidth:{xs:"100%",sm:s},maxWidth:"calc(100vw - 32px)",children:r({blocklet:$,blocklets:f,serverVersion:i})},$.did))}):o.jsx(Dl,{})}function M(){return o.jsxs(pe,{direction:"row",className:"search-result-title",alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0},children:[o.jsx(Z,{variant:"h3",title:g.keyword,maxWidth:"50vw",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e("blocklet.search",{keyword:g.keyword})}),o.jsx(Z,{variant:"body1",color:"text.hint",fontSize:13,children:e("blocklet.resultCount",{count:j})})]})}}function Al(){const{t:e,selectedCategory:t,getCategoryLocale:n}=me(),{toggleOpen:r}=Bn();return o.jsxs(Z,{variant:"body1",display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium",children:[o.jsx(Bi,{onClick:()=>r(!0),children:o.jsx(Po,{})}),n(t)||e("common.category")]})}function Wl({menus:e,children:t}){var n;const{search:r,layout:i,compact:s}=me(),{filters:u}=r,h=z.useRef(null),m=u.category||u.keyword||u.price,g=(n=e==null?void 0:e.find(f=>f.key===u.menu))==null?void 0:n.key;return o.jsx(rl,{children:o.jsxs(_o,{FallbackComponent:En,children:[!s&&o.jsx(Al,{}),o.jsxs(V,{ref:h,display:"flex",height:"100%",className:"list-container",pt:{xs:0,md:s?0:5},children:[o.jsx(wl,{menus:e}),o.jsxs(pe,{height:"100%",position:"relative",flex:1,sx:s?{overflowY:"auto",ml:-2,pr:1,pb:2}:{overflow:"visible"},children:[g&&(t==null?void 0:t(g)),!g&&(i.showExplore&&!m?o.jsx(El,{}):o.jsx(Nl,{}))]})]})]})})}function Ec(e){const{menus:t,children:n,...r}=e,i=Be(),s=Co(Eo({},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 o.jsx(Io,{theme:s,children:o.jsx(gl,{...r,children:o.jsx(Wl,{menus:t,children:n})})})}const Ic={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>'},Bl=(e,t)=>!t||!e?!0:Or.satisfies(Or.coerce(e),t);function Ui({children:e,serverVersion:t="",requirementVersion:n="",...r}){const{t:i}=$e();return Bl(t,n)?e:o.jsx(_n,{title:i("store.tooltip.upgradeServer",{serverVersion:t,version:n}),arrow:!0,children:o.jsx(Z,{children:o.jsx(we,{disabled:!0,variant:"outlined",...r,children:i("common.upgradeServer")})})})}Ui.propTypes={children:P.node.isRequired,serverVersion:P.string,requirementVersion:P.string};Ui.defaultProps={serverVersion:"",requirementVersion:""};De("div")`
70
70
  background-color: transparent !important;
71
71
  & > :not(.Mui-disabled) {
72
72
  position: relative;
@@ -115,7 +115,7 @@ import{b$ as xr,a6 as zt,bZ as ot,dg as To,r as z,c4 as wr,j as o,bh as Me,aP as
115
115
  color: ${e=>e.theme.palette.common.white}!important;
116
116
  }
117
117
  }
118
- `;const Gr=(e="")=>e.replace(/(<([^>]+)>)/gi,"").trim(),$l=(e="")=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`};function On({title:e,sx:t,children:n,slotProps:r,fontSize:i=12,fontWeight:s=500,color:u="text.contrast",...h}){var m,g;return e?o.jsx(_n,{title:e,placement:"top",...h,slotProps:{popper:{...r==null?void 0:r.popper,sx:[{[`& .${ii.tooltip}`]:{fontSize:i,fontWeight:s,boxShadow:2,marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:u,display:"flex",alignItems:"center"}},...Array.isArray((m=r==null?void 0:r.popper)==null?void 0:m.sx)?r.popper.sx:[(g=r==null?void 0:r.popper)==null?void 0:g.sx]]}},children:n}):n}function Ot({icon:e,children:t,maxWidth:n=100,title:r,sx:i}){return(t===0||t)&&o.jsxs(pe,{direction:"row",alignItems:"center",gap:.5,sx:[{maxWidth:n,overflow:"hidden"},...Array.isArray(i)?i:[i]],children:[e,o.jsx(On,{title:r||(typeof t=="string"?t:""),children:o.jsx(Z,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:t})})]})}function _c(e){const{title:t,description:n="",cover:r="",avatar:i,author:s,download:u,did:h,official:m,buttonText:g="Install",buttonDisabled:f,buttonLoading:v,button:w,onButtonClick:x=()=>{},onMainClick:S,className:j,ref:R,icons:T,status:O,...M}=e,$=Be(),Q=(K,Ie=()=>!1)=>(ke,...Te)=>{const be=K instanceof Function;(Ie()||be)&&(ke.preventDefault(),ke.stopPropagation(),be&&K(...Te))},B=S&&Q(S),q=Q(x,()=>!!(w||f||v)),ne=z.isValidElement(t)?{children:t}:{title:Gr(t),dangerouslySetInnerHTML:{__html:t}},ae=z.isValidElement(n)?{children:n}:{title:Gr(n),dangerouslySetInnerHTML:{__html:n}};return o.jsxs(Go,{variant:"outlined",onClick:B,...M,sx:{p:{xs:2,md:3},borderRadius:1,...M.sx},children:[o.jsxs(pe,{flex:1,direction:"row",gap:1,alignItems:"center",overflow:"hidden",sx:{"& > *":{flexShrink:0}},children:[o.jsx(_t,{src:r,did:h,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),o.jsx(Z,{className:"blocklet-title",fontWeight:"fontWeightMedium",sx:{fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...ne}),o.jsxs(V,{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1,children:[m&&o.jsx(On,{title:m.tooltip,children:o.jsx(gs,{sx:{color:m.color||"#D97706",fontSize:m.size||18}})}),T==null?void 0:T.map(K=>o.jsx(On,{title:K.title,children:typeof K.icon=="string"?o.jsx(wt,{icon:K.icon,style:{color:K.color}}):K.icon},K.key))]}),x&&o.jsxs(Pt,{variant:"outlined",size:"small",disabled:f||v,style:{color:$.palette.text.primary,borderColor:$.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:$.typography.fontWeightMedium},onClick:q,children:[v&&o.jsx(Ce,{size:15,style:{marginRight:3,color:"inherit"}}),g]}),w]}),o.jsx(pe,{py:2,children:o.jsx(Z,{className:"blocklet-description",variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...ae})}),o.jsxs(pe,{direction:"row",alignItems:"center",gap:2,color:"text.secondary",children:[o.jsx(Ot,{icon:o.jsx(_t,{src:i,did:h,size:20,variant:"circle"}),maxWidth:200,children:s}),o.jsx(Ot,{icon:o.jsx(wt,{icon:Ci}),title:u,children:$l(u)}),O==null?void 0:O.filter(K=>K.align!=="right").map(K=>o.jsx(Ot,{icon:typeof K.icon=="string"?o.jsx(wt,{icon:K.icon}):K.icon,title:K.title,maxWidth:K.maxWidth,children:K.text},K.key)),o.jsx(V,{sx:{flex:1}}),O==null?void 0:O.filter(K=>K.align==="right").map(K=>o.jsx(Ot,{icon:typeof K.icon=="string"?o.jsx(wt,{icon:K.icon}):K.icon,title:K.title,maxWidth:K.maxWidth,sx:{color:K.color},children:K.text},K.key))]})]})}const Rc=De("div")`
118
+ `;const Gr=(e="")=>e.replace(/(<([^>]+)>)/gi,"").trim(),$l=(e="")=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`};function On({title:e,sx:t,children:n,slotProps:r,fontSize:i=12,fontWeight:s=500,color:u="text.contrast",...h}){var m,g;return e?o.jsx(_n,{title:e,placement:"top",...h,slotProps:{popper:{...r==null?void 0:r.popper,sx:[{[`& .${ii.tooltip}`]:{fontSize:i,fontWeight:s,boxShadow:2,marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:u,display:"flex",alignItems:"center"}},...Array.isArray((m=r==null?void 0:r.popper)==null?void 0:m.sx)?r.popper.sx:[(g=r==null?void 0:r.popper)==null?void 0:g.sx]]}},children:n}):n}function Ot({icon:e,children:t,maxWidth:n=100,title:r,sx:i}){return(t===0||t)&&o.jsxs(pe,{direction:"row",alignItems:"center",gap:.5,sx:[{maxWidth:n,overflow:"hidden"},...Array.isArray(i)?i:[i]],children:[e,o.jsx(On,{title:r||(typeof t=="string"?t:""),children:o.jsx(Z,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:t})})]})}function _c(e){const{title:t,description:n="",cover:r="",avatar:i,author:s,download:u,did:h,official:m,buttonText:g="Install",buttonDisabled:f,buttonLoading:v,button:w,onButtonClick:x=()=>{},onMainClick:S,className:j,ref:R,icons:T,status:O,...M}=e,$=Be(),Y=(K,Ee=()=>!1)=>(ke,...Te)=>{const be=K instanceof Function;(Ee()||be)&&(ke.preventDefault(),ke.stopPropagation(),be&&K(...Te))},B=S&&Y(S),q=Y(x,()=>!!(w||f||v)),ne=z.isValidElement(t)?{children:t}:{title:Gr(t),dangerouslySetInnerHTML:{__html:t}},ae=z.isValidElement(n)?{children:n}:{title:Gr(n),dangerouslySetInnerHTML:{__html:n}};return o.jsxs(Go,{variant:"outlined",onClick:B,...M,sx:{p:{xs:2,md:3},borderRadius:1,...M.sx},children:[o.jsxs(pe,{flex:1,direction:"row",gap:1,alignItems:"center",overflow:"hidden",sx:{"& > *":{flexShrink:0}},children:[o.jsx(_t,{src:r,did:h,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),o.jsx(Z,{className:"blocklet-title",fontWeight:"fontWeightMedium",sx:{fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...ne}),o.jsxs(V,{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1,children:[m&&o.jsx(On,{title:m.tooltip,children:o.jsx(gs,{sx:{color:m.color||"#D97706",fontSize:m.size||18}})}),T==null?void 0:T.map(K=>o.jsx(On,{title:K.title,children:typeof K.icon=="string"?o.jsx(wt,{icon:K.icon,style:{color:K.color}}):K.icon},K.key))]}),x&&o.jsxs(Pt,{variant:"outlined",size:"small",disabled:f||v,style:{color:$.palette.text.primary,borderColor:$.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:$.typography.fontWeightMedium},onClick:q,children:[v&&o.jsx(Ce,{size:15,style:{marginRight:3,color:"inherit"}}),g]}),w]}),o.jsx(pe,{py:2,children:o.jsx(Z,{className:"blocklet-description",variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...ae})}),o.jsxs(pe,{direction:"row",alignItems:"center",gap:2,color:"text.secondary",children:[o.jsx(Ot,{icon:o.jsx(_t,{src:i,did:h,size:20,variant:"circle"}),maxWidth:200,children:s}),o.jsx(Ot,{icon:o.jsx(wt,{icon:Ci}),title:u,children:$l(u)}),O==null?void 0:O.filter(K=>K.align!=="right").map(K=>o.jsx(Ot,{icon:typeof K.icon=="string"?o.jsx(wt,{icon:K.icon}):K.icon,title:K.title,maxWidth:K.maxWidth,children:K.text},K.key)),o.jsx(V,{sx:{flex:1}}),O==null?void 0:O.filter(K=>K.align==="right").map(K=>o.jsx(Ot,{icon:typeof K.icon=="string"?o.jsx(wt,{icon:K.icon}):K.icon,title:K.title,maxWidth:K.maxWidth,sx:{color:K.color},children:K.text},K.key))]})]})}const Rc=De("div")`
119
119
  background-color: transparent !important;
120
120
  & > :not(.Mui-disabled) {
121
121
  position: relative;
@@ -274,4 +274,4 @@ import{b$ as xr,a6 as zt,bZ as ot,dg as To,r as z,c4 as wr,j as o,bh as Me,aP as
274
274
  color: ${e=>e.theme.palette.grey[600]};
275
275
  font-size: 12px;
276
276
  }
277
- `;P.string||P.node,P.string,P.string||P.node,P.string,P.string,P.bool,P.bool,P.element,P.string,P.func,P.func,P.string;const Pc={meta:P.object.isRequired,onCancel:P.func.isRequired},Kl=zt(()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}}));function Ul({action:e,onSelect:t,onNext:n}){const r=Kl(),{t:i}=$e(),s=[{action:"purchase",title:i("store.purchase.purchase.title"),description:i("store.purchase.purchase.description")},{action:"verify",title:i("store.purchase.verify.title"),description:i("store.purchase.verify.description")}];return o.jsxs(o.Fragment,{children:[o.jsx(Yo,{className:r.tabPanel,children:s.map(u=>o.jsxs(oi,{button:!0,selected:e===u.action,onClick:()=>t(u.action),children:[o.jsx(Qo,{className:r.iconRoot,children:u.action==="purchase"?o.jsx(bs,{style:{color:e==="purchase"?Cr.primary.main:"#AAA",fontSize:32}}):o.jsx(ys,{style:{color:e==="verify"?Cr.primary.main:"#AAA",fontSize:32}})}),o.jsx(Xo,{primary:u.title,secondary:u.description})]},u.action))}),n&&o.jsx(Pt,{fullWidth:!0,disabled:!e,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:i("common.next")})]})}Ul.propTypes={action:P.oneOf(["both","purchase","verify"]).isRequired,onSelect:P.func.isRequired,onNext:P.func.isRequired};const Hl=zt(e=>({addMenuItemRoot:{marginTop:"8px",justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}}));function Hi({disabled:e,storeList:t,teamDid:n,onAdd:r,scope:i,hiddenChildren:s,open:u,onClose:h}){const{api:m}=Rn(),[g,f]=z.useState(!1),[v,w]=z.useState(!0),[x,S]=z.useState(!1),[j,R]=z.useState(""),[T,O]=z.useState(""),{t:M}=$e(),$=Hl(),Q=async()=>{f(!0);try{const{decoded:q}=ts(j,t);await m.addBlockletStore({input:{teamDid:n,url:q,scope:i}}),r(q),S(!1),h()}catch(q){const ne=`${M("store.blockletRegistry.addFailed")} ${lt(q)}`;O(ne)}finally{f(!1)}},B=()=>{S(!1),h()};return o.jsxs(o.Fragment,{children:[!s&&o.jsxs(oi,{button:!0,disabled:e,className:$.addMenuItemRoot,onClick:()=>{S(!0)},children:[o.jsx(vs,{font:!0}),o.jsx(Z,{variant:"inherit",children:M("store.blockletRegistry.addRegistry")})]}),o.jsxs(Jo,{title:M("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:u||x,onClose:B,PaperProps:{style:{minHeight:"auto"}},actions:o.jsxs(o.Fragment,{children:[o.jsx(Pt,{onClick:q=>{q.stopPropagation(),B()},color:"inherit",children:M("common.cancel")}),o.jsxs(Pt,{onClick:q=>{q.stopPropagation(),Q()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!j||v,variant:"contained",autoFocus:!0,children:[g&&o.jsx(Ce,{size:16}),M("common.confirm")]})]}),children:[o.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:o.jsx(Zo,{component:"div",children:o.jsx(Z,{component:"div",children:o.jsx(ri,{label:M("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:j,onChange:q=>{O(null);let ne=!1;q.target.value.trim()||(ne=!0),q.target.value.trim()||O(M("store.blockletRegistry.registryUrlEmpty")),R(q.target.value),w(ne)},disabled:g,onKeyPress:q=>{q.key==="Enter"&&(q.preventDefault(),q.target.value.trim()?Q():O(M("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!T&&o.jsx(es,{severity:"error",style:{width:"100%"},children:T})]})]})}Hi.propTypes={teamDid:P.string.isRequired,disabled:P.bool,storeList:P.array,onAdd:P.func,scope:P.string,hiddenChildren:P.bool,open:P.bool,onClose:P.func};Hi.defaultProps={disabled:!1,storeList:[],onAdd:()=>{},scope:"",hiddenChildren:!1,open:!1,onClose:()=>{}};var Un={},ql=Nt;Object.defineProperty(Un,"__esModule",{value:!0});var qi=Un.default=void 0,Vl=ql(Ft()),Gl=o;qi=Un.default=(0,Vl.default)((0,Gl.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"}),"LinkOutlined");var Hn={},Yl=Nt;Object.defineProperty(Hn,"__esModule",{value:!0});var Vi=Hn.default=void 0,Ql=Yl(Ft()),Xl=o;Vi=Hn.default=(0,Ql.default)((0,Xl.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"}),"BackupOutlined");var Jl={};const{NODE_MODES:Yr}=si,Zl=({mode:e,previousMode:t}={})=>e===Yr.SERVERLESS||t===Yr.SERVERLESS||Jl.ABT_NODE_DEBUG_AS_SERVERLESS==="true";var ec={isInServerlessMode:Zl};function Kt({store:e,teamDid:t,onDelete:n,children:r,projectId:i="",scope:s=""}){const{api:u}=Rn(),{t:h}=$e(),m=ps(),[g,f]=z.useState(!1),[v,w]=z.useState(null),x=Be(),S=()=>{f(!1),w(null)},j=async()=>{var O;try{f(!0),await u.deleteBlockletStore({input:{teamDid:t,url:e.url,projectId:i,scope:s}}),await((O=m==null?void 0:m.actions)==null?void 0:O.refreshBlocklet()),n&&typeof n=="function"&&n()}catch(M){Ae.error(`Remove Blocklet Store Error: ${lt(M)}`)}finally{f(!1),w(null)}},R={keyName:e.url,title:h("store.blockletRegistry.deleteRegistry"),description:h("store.blockletRegistry.deleteDesc",{name:`<b>${e.url}</b>`,color:x.palette.error.main}),confirmPlaceholder:h("store.blockletRegistry.confirmDesc",{name:e.url}),confirm:h("common.delConfirm"),cancel:h("common.cancel"),onConfirm:j,onCancel:S},T=O=>{e.protected||(O.stopPropagation(),w(R))};return o.jsxs(o.Fragment,{children:[r?o.jsx("span",{onClick:T,children:r}):o.jsx(we,{"data-cy":"store-action-delete",color:"primary",disabled:g,onClick:T,size:"small",children:o.jsx(li,{sx:{zoom:.95}})}),v&&o.jsx(ws,{keyName:v.keyName,title:v.title,description:v.description,confirmPlaceholder:v.confirmPlaceholder,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}Kt.propTypes={children:P.node,teamDid:P.string.isRequired,store:P.object.isRequired,onDelete:P.func,projectId:P.string,scope:P.string};Kt.defaultProps={children:null,projectId:"",scope:"",onDelete:()=>{}};var qn={},tc=Nt;Object.defineProperty(qn,"__esModule",{value:!0});var Gi=qn.default=void 0,nc=tc(Ft()),rc=o;Gi=qn.default=(0,nc.default)((0,rc.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"}),"LinkOff");const ic=({store:e,userDid:t})=>{var r;const n=((r=window.blocklet)==null?void 0:r.tenantMode)!==ns.BLOCKLET_TENANT_MODES.MULTIPLE;return e.protected?!1:e.scope&&e.scope===t?!0:n?e.scope==="studio":!1};function Vn({connectedStore:e,onDisconnect:t,onDelete:n,store:r,teamDid:i,projectId:s}){var O;const[u,h]=z.useState(null),m=!!u,{t:g}=$e(),{session:f}=rs(),[v,w]=z.useState(!1),x=M=>{M.stopPropagation(),window.open(dt(`${Xe(r.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},S=M=>{h(M.currentTarget)},j=()=>{h(null)},R=()=>{w(!1),t()},T=[{label:g("common.visitStore"),action:x,icon:ai},{label:g("common.disconnect"),action:()=>{j(),w(!0)},icon:Gi,hidden:!e}];return o.jsxs(o.Fragment,{children:[o.jsx(we,{ref:u,color:"primary",onClick:S,size:"small",children:o.jsx(Ss,{sx:{zoom:.95}})}),o.jsxs(is,{anchorEl:u,open:m,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[T.map(M=>M.hidden?null:o.jsxs(Rt,{dense:!0,onClick:M.action,disabled:M.disabled,children:[M.icon&&o.jsx(M.icon,{color:"action",sx:{marginRight:1}}),o.jsx(V,{color:"action",children:M.label})]},M.label)),ic({store:r,userDid:(O=f==null?void 0:f.user)==null?void 0:O.did})&&o.jsx(Kt,{store:r,onDelete:n,teamDid:i,projectId:s,scope:r.scope||"studio",children:o.jsxs(Rt,{dense:!0,disabled:r.protected,children:[o.jsx(li,{sx:{color:r.protected?"action":"error.main",marginRight:1}}),o.jsx(V,{color:r.protected?"action":"error.main",children:g("common.delete")})]})})]}),v&&o.jsx(os,{displayError:!0,title:`${g("common.disconnect")} ${r.name}`,description:g("blocklet.publish.disconnectStoreTip"),confirm:g("common.confirm"),onConfirm:R,onCancel:()=>w(!1)})]})}Vn.propTypes={connectedStore:P.object.isRequired,onDisconnect:P.func,onDelete:P.func,store:P.object.isRequired,teamDid:P.string.isRequired,projectId:P.string};Vn.defaultProps={projectId:"",onDelete:()=>{},onDisconnect:()=>{}};function oc({messageType:e,onOpen:t,onClose:n}){const r=z.useRef(null),i=z.useRef(null),s=async h=>{setTimeout(()=>{try{n==null||n()}catch{}},10*1e3),r.current&&(clearInterval(i.current),r.current.close());const m=Math.random().toString(36).slice(2);r.current=window.open(`${si.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${m}`,"_blank"),t==null||t(r.current),i.current=setInterval(()=>{(!r.current||r.current.closed)&&(r.current=null,clearInterval(i.current),setTimeout(()=>{n==null||n()},1100))},200),await Promise.resolve(h(r.current,g=>{if(!r.current){localStorage.setItem(`open-window-url-${m}`,JSON.stringify({url:g,time:Date.now()}));return}r.current.location.href=dt(g,{allowDomains:null})}))},u=ss(h=>{const{type:m,error:g}=h.data;r.current&&m===e&&g&&(Ae.error(g),n==null||n())});return z.useEffect(()=>(window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}),[u]),s}function Dt({connectedStore:e,sx:t,...n}){return o.jsx(as,{sx:{width:24,height:24,...t},src:Xe(e.storeUrl,`/.well-known/service/user/avatar/${e.developerDid}?imageFilter=resize&w=120&h=120`),...n})}Dt.propTypes={connectedStore:P.object.isRequired,sx:P.object};Dt.defaultProps={sx:{}};function Gn({storeUrl:e,storeName:t,published:n,did:r,version:i}){const{t:s}=$e(),u=()=>{window.open(dt(`${Xe(e,r&&i?`/blocklets/${r}/${i}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return o.jsxs(V,{children:[o.jsx(Z,{variant:"subtitle2",children:s(n?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:t})}),o.jsx(we,{size:"small",sx:{mt:1},onClick:u,variant:"contained",color:"success",children:s("common.visitTarget",{name:t})})]})}Gn.propTypes={storeName:P.string.isRequired,storeUrl:P.string.isRequired,published:P.bool.isRequired,did:P.string,version:P.string};Gn.defaultProps={did:"",version:""};const Yi={CONNECT:"connect",SELECT:"select"},sc=zt(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},box:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},menuName:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},actions:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},title:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},url:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},buttonLine:{height:"100%",width:"1px",backgroundColor:"#e0e0e0"}})),Qr=Os(({className:e,...t})=>o.jsx(_n,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${ii.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:e.spacing(2),fontSize:e.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Qi({teamDid:e,projectId:t,releaseId:n,store:r,warningList:i,onDelete:s,kind:u,published:h,connectedStore:m,releaseType:g,onPublish:f,onOpenConnectStore:v,onSelectConnectStore:w,behavior:x,scope:S="",version:j}){const R=sc(),{t:T}=$e(),{api:O,info:M,inService:$}=Rn(),[Q,B]=z.useState(!1),q=oc({messageType:"connect-store-message",onOpen:()=>B(!0),onClose:()=>B(!1)}),ne=u==="publish",ae=!!m,K=X=>{if(X.stopPropagation(),ne){window.open(dt(Xe(r.url,"developer/blocklets"),{allowDomains:null}));return}window.open(dt(r.url,{allowDomains:null}))},Ie=()=>{if(x===Yi.SELECT){w(r);return}q(async(X,he)=>{try{const oe=await O.connectToStore({input:{did:e,storeUrl:r.url,storeId:r.id,storeName:r.name,projectId:t}});if(!(oe!=null&&oe.url)){Ae.error("failed to connect to store");return}he(oe.url),await v({did:e,projectId:t,storeId:r.id}),B(!1)}catch(oe){const xe=lt(oe);Ae.error(xe),B(!1)}})},ke=async()=>{try{await O.disconnectFromStore({input:{did:e,storeId:r.id,projectId:t,storeScope:S}}),s()}catch(X){Ae.error(lt(X))}},Te=()=>{B(!0),O.publishToStore({input:{did:e,storeId:r.id,storeName:r.name,projectId:t,releaseId:n,type:g}}).then(X=>{Ae.success(o.jsx(Gn,{storeName:m.storeName,storeUrl:m.storeUrl,did:t,version:j,published:X.url==="published"}),{duration:1e4}),f==null||f(null)}).catch(X=>{Ae.error(lt(X)),f==null||f(X)}).finally(()=>{B(!1)})};z.useEffect(()=>{ae&&B(!1)},[ae]);const be=z.useMemo(()=>!($&&ec.isInServerlessMode(M)),[$,M]),je=i.length>0,N=o.jsxs(we,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:je,onClick:Te,children:[Q?o.jsx(Ce,{sx:{marginRight:1},size:16}):o.jsx(Vi,{sx:{marginRight:1,fontSize:20}}),T("common.upload")]});return o.jsxs("div",{className:R.box,children:[!ne&&Q&&o.jsx(Ce,{sx:{marginRight:2},size:16}),o.jsxs("div",{className:R.menuName,children:[o.jsx(V,{sx:{display:"flex",flexDirection:"row"},children:o.jsx(Z,{component:"span",className:R.title,variant:"subtitle1",children:r.name})}),o.jsx(Z,{className:R.url,component:"span",variant:"inherit",children:`${r.url}`})]}),o.jsxs("div",{className:R.actions,children:[m&&o.jsx(Qr,{placement:"top",title:o.jsxs(V,{children:[o.jsx(Z,{component:"span",variant:"caption",sx:{opacity:.7},children:T("blocklet.publish.developerInfo")}),o.jsxs(V,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[o.jsx(Dt,{connectedStore:m,sx:{width:42,height:42}}),o.jsxs(V,{sx:{flex:1},children:[o.jsx(Z,{component:"span",variant:"subtitle1",children:m.developerName}),o.jsx(ls,{size:14,copyable:!0,compact:!0,responsive:!1,did:m.developerDid})]})]})]}),children:o.jsx("div",{children:o.jsx(Dt,{connectedStore:m,sx:{marginRight:1,cursor:"help"}})})}),ne&&o.jsxs(Ir,{disabled:Q,variant:"outlined",sx:{height:38},size:"small",children:[!ae&&o.jsxs(we,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:Ie,children:[Q?o.jsx(Ce,{sx:{marginRight:1},size:16}):o.jsx(qi,{sx:{marginRight:1}}),T("common.connect")]}),ae&&h&&o.jsxs(we,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[Q?o.jsx(Ce,{sx:{marginRight:1},size:16}):o.jsx(xs,{sx:{marginRight:1}}),T("common.uploaded")]}),ae&&!h&&(je?o.jsx(Qr,{title:o.jsxs(V,{children:[o.jsx(V,{sx:{color:"error.main",mb:.5},children:T("blocklet.publish.storeRule.warning")}),i.map((X,he)=>o.jsxs(V,{sx:{color:"error.main"},children:[he+1,". ",X]},X))]}),children:o.jsx("div",{children:N})}):N),o.jsx(Vn,{projectId:t,connectedStore:m,store:r,onDelete:s,teamDid:e,onDisconnect:ke})]}),!ne&&o.jsxs(Ir,{disabled:Q,variant:"outlined",sx:{height:36},size:"small",children:[o.jsx(we,{"data-cy":"store-open-url",onClick:K,children:o.jsx(ai,{sx:{zoom:.9}})}),!r.protected&&be&&o.jsx(Kt,{store:r,onDelete:s,teamDid:e,scope:""})]})]})]})}Qi.propTypes={kind:P.string,teamDid:P.string.isRequired,published:P.bool,connectedStore:P.shape({storeName:P.string,storeId:P.string,storeUrl:P.string,developerDid:P.string,developerName:P.string}),warningList:P.array,projectId:P.string,releaseId:P.string,releaseType:P.string,store:P.shape({id:P.string.isRequired,name:P.string.isRequired,url:P.string.isRequired,protected:P.bool,connected:P.bool}).isRequired,scope:P.string,onDelete:P.func,onPublish:P.func,onOpenConnectStore:P.func,behavior:P.string,onSelectConnectStore:P.func,version:P.string};Qi.defaultProps={kind:"store",published:!1,connectedStore:null,releaseId:"",projectId:"",warningList:[],releaseType:"",version:"",scope:"",behavior:Yi.CONNECT,onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{}};export{Rc as A,_c as B,Ul as C,Oc as S,Ui as a,Qi as b,Pc as c,Ec as d,Hi as e,Tc as f,ec as s,Ic as z};
277
+ `;P.string||P.node,P.string,P.string||P.node,P.string,P.string,P.bool,P.bool,P.element,P.string,P.func,P.func,P.string;const Pc={meta:P.object.isRequired,onCancel:P.func.isRequired},Kl=zt(()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}}));function Ul({action:e,onSelect:t,onNext:n}){const r=Kl(),{t:i}=$e(),s=[{action:"purchase",title:i("store.purchase.purchase.title"),description:i("store.purchase.purchase.description")},{action:"verify",title:i("store.purchase.verify.title"),description:i("store.purchase.verify.description")}];return o.jsxs(o.Fragment,{children:[o.jsx(Xo,{className:r.tabPanel,children:s.map(u=>o.jsxs(oi,{button:!0,selected:e===u.action,onClick:()=>t(u.action),children:[o.jsx(Yo,{className:r.iconRoot,children:u.action==="purchase"?o.jsx(bs,{style:{color:e==="purchase"?Cr.primary.main:"#AAA",fontSize:32}}):o.jsx(ys,{style:{color:e==="verify"?Cr.primary.main:"#AAA",fontSize:32}})}),o.jsx(Qo,{primary:u.title,secondary:u.description})]},u.action))}),n&&o.jsx(Pt,{fullWidth:!0,disabled:!e,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:i("common.next")})]})}Ul.propTypes={action:P.oneOf(["both","purchase","verify"]).isRequired,onSelect:P.func.isRequired,onNext:P.func.isRequired};const Hl=zt(e=>({addMenuItemRoot:{marginTop:"8px",justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}}));function Hi({disabled:e,storeList:t,teamDid:n,onAdd:r,scope:i,hiddenChildren:s,open:u,onClose:h}){const{api:m}=Rn(),[g,f]=z.useState(!1),[v,w]=z.useState(!0),[x,S]=z.useState(!1),[j,R]=z.useState(""),[T,O]=z.useState(""),{t:M}=$e(),$=Hl(),Y=async()=>{f(!0);try{const{decoded:q}=ts(j,t);await m.addBlockletStore({input:{teamDid:n,url:q,scope:i}}),r(q),S(!1),h()}catch(q){const ne=`${M("store.blockletRegistry.addFailed")} ${lt(q)}`;O(ne)}finally{f(!1)}},B=()=>{S(!1),h()};return o.jsxs(o.Fragment,{children:[!s&&o.jsxs(oi,{button:!0,disabled:e,className:$.addMenuItemRoot,onClick:()=>{S(!0)},children:[o.jsx(vs,{font:!0}),o.jsx(Z,{variant:"inherit",children:M("store.blockletRegistry.addRegistry")})]}),o.jsxs(Jo,{title:M("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:u||x,onClose:B,PaperProps:{style:{minHeight:"auto"}},actions:o.jsxs(o.Fragment,{children:[o.jsx(Pt,{onClick:q=>{q.stopPropagation(),B()},color:"inherit",children:M("common.cancel")}),o.jsxs(Pt,{onClick:q=>{q.stopPropagation(),Y()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!j||v,variant:"contained",autoFocus:!0,children:[g&&o.jsx(Ce,{size:16}),M("common.confirm")]})]}),children:[o.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:o.jsx(Zo,{component:"div",children:o.jsx(Z,{component:"div",children:o.jsx(ri,{label:M("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:j,onChange:q=>{O(null);let ne=!1;q.target.value.trim()||(ne=!0),q.target.value.trim()||O(M("store.blockletRegistry.registryUrlEmpty")),R(q.target.value),w(ne)},disabled:g,onKeyPress:q=>{q.key==="Enter"&&(q.preventDefault(),q.target.value.trim()?Y():O(M("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!T&&o.jsx(es,{severity:"error",style:{width:"100%"},children:T})]})]})}Hi.propTypes={teamDid:P.string.isRequired,disabled:P.bool,storeList:P.array,onAdd:P.func,scope:P.string,hiddenChildren:P.bool,open:P.bool,onClose:P.func};Hi.defaultProps={disabled:!1,storeList:[],onAdd:()=>{},scope:"",hiddenChildren:!1,open:!1,onClose:()=>{}};var Un={},ql=Nt;Object.defineProperty(Un,"__esModule",{value:!0});var qi=Un.default=void 0,Vl=ql(Ft()),Gl=o;qi=Un.default=(0,Vl.default)((0,Gl.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"}),"LinkOutlined");var Hn={},Xl=Nt;Object.defineProperty(Hn,"__esModule",{value:!0});var Vi=Hn.default=void 0,Yl=Xl(Ft()),Ql=o;Vi=Hn.default=(0,Yl.default)((0,Ql.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"}),"BackupOutlined");var Jl={};const{NODE_MODES:Xr}=si,Zl=({mode:e,previousMode:t}={})=>e===Xr.SERVERLESS||t===Xr.SERVERLESS||Jl.ABT_NODE_DEBUG_AS_SERVERLESS==="true";var ec={isInServerlessMode:Zl};function Kt({store:e,teamDid:t,onDelete:n,children:r,projectId:i="",scope:s=""}){const{api:u}=Rn(),{t:h}=$e(),m=ps(),[g,f]=z.useState(!1),[v,w]=z.useState(null),x=Be(),S=()=>{f(!1),w(null)},j=async()=>{var O;try{f(!0),await u.deleteBlockletStore({input:{teamDid:t,url:e.url,projectId:i,scope:s}}),await((O=m==null?void 0:m.actions)==null?void 0:O.refreshBlocklet()),n&&typeof n=="function"&&n()}catch(M){Ae.error(`Remove Blocklet Store Error: ${lt(M)}`)}finally{f(!1),w(null)}},R={keyName:e.url,title:h("store.blockletRegistry.deleteRegistry"),description:h("store.blockletRegistry.deleteDesc",{name:`<b>${e.url}</b>`,color:x.palette.error.main}),confirmPlaceholder:h("store.blockletRegistry.confirmDesc",{name:e.url}),confirm:h("common.delConfirm"),cancel:h("common.cancel"),onConfirm:j,onCancel:S},T=O=>{e.protected||(O.stopPropagation(),w(R))};return o.jsxs(o.Fragment,{children:[r?o.jsx("span",{onClick:T,children:r}):o.jsx(we,{"data-cy":"store-action-delete",color:"primary",disabled:g,onClick:T,size:"small",children:o.jsx(li,{sx:{zoom:.95}})}),v&&o.jsx(ws,{keyName:v.keyName,title:v.title,description:v.description,confirmPlaceholder:v.confirmPlaceholder,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}Kt.propTypes={children:P.node,teamDid:P.string.isRequired,store:P.object.isRequired,onDelete:P.func,projectId:P.string,scope:P.string};Kt.defaultProps={children:null,projectId:"",scope:"",onDelete:()=>{}};var qn={},tc=Nt;Object.defineProperty(qn,"__esModule",{value:!0});var Gi=qn.default=void 0,nc=tc(Ft()),rc=o;Gi=qn.default=(0,nc.default)((0,rc.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"}),"LinkOff");const ic=({store:e,userDid:t})=>{var r;const n=((r=window.blocklet)==null?void 0:r.tenantMode)!==ns.BLOCKLET_TENANT_MODES.MULTIPLE;return e.protected?!1:e.scope&&e.scope===t?!0:n?e.scope==="studio":!1};function Vn({connectedStore:e,onDisconnect:t,onDelete:n,store:r,teamDid:i,projectId:s}){var O;const[u,h]=z.useState(null),m=!!u,{t:g}=$e(),{session:f}=rs(),[v,w]=z.useState(!1),x=M=>{M.stopPropagation(),window.open(dt(`${Qe(r.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},S=M=>{h(M.currentTarget)},j=()=>{h(null)},R=()=>{w(!1),t()},T=[{label:g("common.visitStore"),action:x,icon:ai},{label:g("common.disconnect"),action:()=>{j(),w(!0)},icon:Gi,hidden:!e}];return o.jsxs(o.Fragment,{children:[o.jsx(we,{ref:u,color:"primary",onClick:S,size:"small",children:o.jsx(Ss,{sx:{zoom:.95}})}),o.jsxs(is,{anchorEl:u,open:m,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[T.map(M=>M.hidden?null:o.jsxs(Rt,{dense:!0,onClick:M.action,disabled:M.disabled,children:[M.icon&&o.jsx(M.icon,{color:"action",sx:{marginRight:1}}),o.jsx(V,{color:"action",children:M.label})]},M.label)),ic({store:r,userDid:(O=f==null?void 0:f.user)==null?void 0:O.did})&&o.jsx(Kt,{store:r,onDelete:n,teamDid:i,projectId:s,scope:r.scope||"studio",children:o.jsxs(Rt,{dense:!0,disabled:r.protected,children:[o.jsx(li,{sx:{color:r.protected?"action":"error.main",marginRight:1}}),o.jsx(V,{color:r.protected?"action":"error.main",children:g("common.delete")})]})})]}),v&&o.jsx(os,{displayError:!0,title:`${g("common.disconnect")} ${r.name}`,description:g("blocklet.publish.disconnectStoreTip"),confirm:g("common.confirm"),onConfirm:R,onCancel:()=>w(!1)})]})}Vn.propTypes={connectedStore:P.object.isRequired,onDisconnect:P.func,onDelete:P.func,store:P.object.isRequired,teamDid:P.string.isRequired,projectId:P.string};Vn.defaultProps={projectId:"",onDelete:()=>{},onDisconnect:()=>{}};function oc({messageType:e,onOpen:t,onClose:n}){const r=z.useRef(null),i=z.useRef(null),s=async h=>{setTimeout(()=>{try{n==null||n()}catch{}},10*1e3),r.current&&(clearInterval(i.current),r.current.close());const m=Math.random().toString(36).slice(2);r.current=window.open(`${si.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${m}`,"_blank"),t==null||t(r.current),i.current=setInterval(()=>{(!r.current||r.current.closed)&&(r.current=null,clearInterval(i.current),setTimeout(()=>{n==null||n()},1100))},200),await Promise.resolve(h(r.current,g=>{if(!r.current){localStorage.setItem(`open-window-url-${m}`,JSON.stringify({url:g,time:Date.now()}));return}r.current.location.href=dt(g,{allowDomains:null})}))},u=ss(h=>{const{type:m,error:g}=h.data;r.current&&m===e&&g&&(Ae.error(g),n==null||n())});return z.useEffect(()=>(window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}),[u]),s}function Dt({connectedStore:e,sx:t,...n}){return o.jsx(as,{sx:{width:24,height:24,...t},src:Qe(e.storeUrl,`/.well-known/service/user/avatar/${e.developerDid}?imageFilter=resize&w=120&h=120`),...n})}Dt.propTypes={connectedStore:P.object.isRequired,sx:P.object};Dt.defaultProps={sx:{}};function Gn({storeUrl:e,storeName:t,published:n,did:r,version:i}){const{t:s}=$e(),u=()=>{window.open(dt(`${Qe(e,r&&i?`/blocklets/${r}/${i}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return o.jsxs(V,{children:[o.jsx(Z,{variant:"subtitle2",children:s(n?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:t})}),o.jsx(we,{size:"small",sx:{mt:1},onClick:u,variant:"contained",color:"success",children:s("common.visitTarget",{name:t})})]})}Gn.propTypes={storeName:P.string.isRequired,storeUrl:P.string.isRequired,published:P.bool.isRequired,did:P.string,version:P.string};Gn.defaultProps={did:"",version:""};const Xi={CONNECT:"connect",SELECT:"select"},sc=zt(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},box:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},menuName:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},actions:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},title:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},url:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},buttonLine:{height:"100%",width:"1px",backgroundColor:"#e0e0e0"}})),Yr=Os(({className:e,...t})=>o.jsx(_n,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${ii.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:e.spacing(2),fontSize:e.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Yi({teamDid:e,projectId:t,releaseId:n,store:r,warningList:i,onDelete:s,kind:u,published:h,connectedStore:m,releaseType:g,onPublish:f,onOpenConnectStore:v,onSelectConnectStore:w,behavior:x,scope:S="",version:j}){const R=sc(),{t:T}=$e(),{api:O,info:M,inService:$}=Rn(),[Y,B]=z.useState(!1),q=oc({messageType:"connect-store-message",onOpen:()=>B(!0),onClose:()=>B(!1)}),ne=u==="publish",ae=!!m,K=Q=>{if(Q.stopPropagation(),ne){window.open(dt(Qe(r.url,"developer/blocklets"),{allowDomains:null}));return}window.open(dt(r.url,{allowDomains:null}))},Ee=()=>{if(x===Xi.SELECT){w(r);return}q(async(Q,he)=>{try{const oe=await O.connectToStore({input:{did:e,storeUrl:r.url,storeId:r.id,storeName:r.name,projectId:t}});if(!(oe!=null&&oe.url)){Ae.error("failed to connect to store");return}he(oe.url),await v({did:e,projectId:t,storeId:r.id}),B(!1)}catch(oe){const xe=lt(oe);Ae.error(xe),B(!1)}})},ke=async()=>{try{await O.disconnectFromStore({input:{did:e,storeId:r.id,projectId:t,storeScope:S}}),s()}catch(Q){Ae.error(lt(Q))}},Te=()=>{B(!0),O.publishToStore({input:{did:e,storeId:r.id,storeName:r.name,projectId:t,releaseId:n,type:g}}).then(Q=>{Ae.success(o.jsx(Gn,{storeName:m.storeName,storeUrl:m.storeUrl,did:t,version:j,published:Q.url==="published"}),{duration:1e4}),f==null||f(null)}).catch(Q=>{Ae.error(lt(Q)),f==null||f(Q)}).finally(()=>{B(!1)})};z.useEffect(()=>{ae&&B(!1)},[ae]);const be=z.useMemo(()=>!($&&ec.isInServerlessMode(M)),[$,M]),je=i.length>0,N=o.jsxs(we,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:je,onClick:Te,children:[Y?o.jsx(Ce,{sx:{marginRight:1},size:16}):o.jsx(Vi,{sx:{marginRight:1,fontSize:20}}),T("common.upload")]});return o.jsxs("div",{className:R.box,children:[!ne&&Y&&o.jsx(Ce,{sx:{marginRight:2},size:16}),o.jsxs("div",{className:R.menuName,children:[o.jsx(V,{sx:{display:"flex",flexDirection:"row"},children:o.jsx(Z,{component:"span",className:R.title,variant:"subtitle1",children:r.name})}),o.jsx(Z,{className:R.url,component:"span",variant:"inherit",children:`${r.url}`})]}),o.jsxs("div",{className:R.actions,children:[m&&o.jsx(Yr,{placement:"top",title:o.jsxs(V,{children:[o.jsx(Z,{component:"span",variant:"caption",sx:{opacity:.7},children:T("blocklet.publish.developerInfo")}),o.jsxs(V,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[o.jsx(Dt,{connectedStore:m,sx:{width:42,height:42}}),o.jsxs(V,{sx:{flex:1},children:[o.jsx(Z,{component:"span",variant:"subtitle1",children:m.developerName}),o.jsx(ls,{size:14,copyable:!0,compact:!0,responsive:!1,did:m.developerDid})]})]})]}),children:o.jsx("div",{children:o.jsx(Dt,{connectedStore:m,sx:{marginRight:1,cursor:"help"}})})}),ne&&o.jsxs(Er,{disabled:Y,variant:"outlined",sx:{height:38},size:"small",children:[!ae&&o.jsxs(we,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:Ee,children:[Y?o.jsx(Ce,{sx:{marginRight:1},size:16}):o.jsx(qi,{sx:{marginRight:1}}),T("common.connect")]}),ae&&h&&o.jsxs(we,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[Y?o.jsx(Ce,{sx:{marginRight:1},size:16}):o.jsx(xs,{sx:{marginRight:1}}),T("common.uploaded")]}),ae&&!h&&(je?o.jsx(Yr,{title:o.jsxs(V,{children:[o.jsx(V,{sx:{color:"error.main",mb:.5},children:T("blocklet.publish.storeRule.warning")}),i.map((Q,he)=>o.jsxs(V,{sx:{color:"error.main"},children:[he+1,". ",Q]},Q))]}),children:o.jsx("div",{children:N})}):N),o.jsx(Vn,{projectId:t,connectedStore:m,store:r,onDelete:s,teamDid:e,onDisconnect:ke})]}),!ne&&o.jsxs(Er,{disabled:Y,variant:"outlined",sx:{height:36},size:"small",children:[o.jsx(we,{"data-cy":"store-open-url",onClick:K,children:o.jsx(ai,{sx:{zoom:.9}})}),!r.protected&&be&&o.jsx(Kt,{store:r,onDelete:s,teamDid:e,scope:""})]})]})]})}Yi.propTypes={kind:P.string,teamDid:P.string.isRequired,published:P.bool,connectedStore:P.shape({storeName:P.string,storeId:P.string,storeUrl:P.string,developerDid:P.string,developerName:P.string}),warningList:P.array,projectId:P.string,releaseId:P.string,releaseType:P.string,store:P.shape({id:P.string.isRequired,name:P.string.isRequired,url:P.string.isRequired,protected:P.bool,connected:P.bool}).isRequired,scope:P.string,onDelete:P.func,onPublish:P.func,onOpenConnectStore:P.func,behavior:P.string,onSelectConnectStore:P.func,version:P.string};Yi.defaultProps={kind:"store",published:!1,connectedStore:null,releaseId:"",projectId:"",warningList:[],releaseType:"",version:"",scope:"",behavior:Xi.CONNECT,onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{}};export{Rc as A,_c as B,Ul as C,Oc as S,Ui as a,Yi as b,Pc as c,Ic as d,Hi as e,Tc as f,ec as s,Ec as z};