comp-hub 0.42.8 → 0.42.9

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 (157) hide show
  1. package/dist/index.js +6 -6
  2. package/dist/website/container/assets/index-6TGp-7st.css +1 -0
  3. package/dist/website/container/assets/index-BKC7DzZV.js +33 -0
  4. package/dist/website/container/index.html +2 -2
  5. package/dist/website/container/js/less-compiler.js +22 -22
  6. package/dist/website/container/js/sass-compiler.js +94 -94
  7. package/dist/website/item/assets/index-Pkb33-i2.css +1 -0
  8. package/dist/website/item/assets/{index-CwtVkGPL.js → index-kBvGmplc.js} +2 -2
  9. package/dist/website/item/index.html +2 -2
  10. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CH79cQAu.js +1 -0
  11. package/dist/website/main/assets/{BaseBadge-BReHrAqs.js → BaseBadge-D53B9edx.js} +1 -1
  12. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-Bcc7UYpp.js +1 -0
  13. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-RYuIoPF7.js +1 -0
  14. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-BNlJ1yyx.js +1 -0
  15. package/dist/website/main/assets/{CodeMirrorEditor-Cqow8ROO-DYjlZgX9.js → CodeMirrorEditor-Cqow8ROO-AryRubtp.js} +3 -3
  16. package/dist/website/main/assets/{EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CNOUTt3S.js → EmptyStatusContainer.vue_vue_type_script_setup_true_lang-kK4W-ekr.js} +1 -1
  17. package/dist/website/main/assets/GithubCallback-BjmPqH_L.js +1 -0
  18. package/dist/website/main/assets/{LoadingWrapper.vue_vue_type_script_setup_true_lang-BYA4gUOI.js → LoadingWrapper.vue_vue_type_script_setup_true_lang-BPfuSpto.js} +1 -1
  19. package/dist/website/main/assets/ReplyForm.vue_vue_type_script_setup_true_lang-BiETILOo.js +1 -0
  20. package/dist/website/main/assets/{SiteLogo-Bpm2Ah9F.js → SiteLogo-DEIcFHUB.js} +1 -1
  21. package/dist/website/main/assets/SiteLogo-DbJD21Ac.css +1 -0
  22. package/dist/website/main/assets/{cloud-upload-BqJFdj_J.js → cloud-upload-DVf0ki5J.js} +1 -1
  23. package/dist/website/main/assets/el-table-column-BqpEDPpl.js +1 -0
  24. package/dist/website/main/assets/{home-rounded-CN0qCDnE.js → home-rounded-DcB333c-.js} +1 -1
  25. package/dist/website/main/assets/{index-DS44gjNL.js → index-0jhSi0Id.js} +1 -1
  26. package/dist/website/main/assets/{index-DdIWt0oE.js → index-6e_pcD2g.js} +1 -1
  27. package/dist/website/main/assets/{index-72rReQ2I-C_aIAupr.js → index-72rReQ2I-Dls_4Kw0.js} +1 -1
  28. package/dist/website/main/assets/index-B-o-geOz.js +1 -0
  29. package/dist/website/main/assets/{index-DvFQxOj2.js → index-B6DlcvMU.js} +1 -1
  30. package/dist/website/main/assets/index-BNYhon33.js +1 -0
  31. package/dist/website/main/assets/index-BOUkLBc8.js +1 -0
  32. package/dist/website/main/assets/index-BPiRmvZl.js +1 -0
  33. package/dist/website/main/assets/{index-DgQa2ZqK.js → index-BWSpWNwa.js} +1 -1
  34. package/dist/website/main/assets/index-BhaaT_GF.js +1 -0
  35. package/dist/website/main/assets/index-BqUqA7W4.js +1 -0
  36. package/dist/website/main/assets/{index-CMiBqyhH.js → index-Bqhbsn_n.js} +1 -1
  37. package/dist/website/main/assets/{index-Zt46lwNk.js → index-BrpXOHl6.js} +1 -1
  38. package/dist/website/main/assets/index-BxmgEr3S.js +1 -0
  39. package/dist/website/main/assets/index-C1Hw6vXQ.js +1 -0
  40. package/dist/website/main/assets/index-C42i82mF.js +2 -0
  41. package/dist/website/main/assets/{index-CeiBBtdW.js → index-C81i40Gx.js} +1 -1
  42. package/dist/website/main/assets/index-C9BP4kWZ.js +6 -0
  43. package/dist/website/main/assets/{index-DlkXaOkE.css → index-CFTT7hu0.css} +1 -1
  44. package/dist/website/main/assets/{index-B1K6cAvN.js → index-CIVzXolG.js} +1 -1
  45. package/dist/website/main/assets/index-CPc1AP3H.js +1 -0
  46. package/dist/website/main/assets/index-CWMIyyC3.js +1 -0
  47. package/dist/website/main/assets/{index-VyPJ3PyN.js → index-CglP2y1M.js} +1 -1
  48. package/dist/website/main/assets/index-CiPfzZM4.js +1 -0
  49. package/dist/website/main/assets/{index-BPdEkCOx.js → index-Cs-jTkU_.js} +1 -1
  50. package/dist/website/main/assets/{index-CtNrOkJr.js → index-CuvsliuR.js} +1 -1
  51. package/dist/website/main/assets/index-Cv6z_Edq.js +1 -0
  52. package/dist/website/main/assets/index-CxHPM7Fg.js +1 -0
  53. package/dist/website/main/assets/index-CytdBEyB.js +1 -0
  54. package/dist/website/main/assets/{index-S0EB9acK.js → index-D1_g-khQ.js} +1 -1
  55. package/dist/website/main/assets/index-D2eSTfJw.js +1 -0
  56. package/dist/website/main/assets/{index-KhSB9wFh.js → index-D3HuxiUJ.js} +1 -1
  57. package/dist/website/main/assets/{index-D76eWsZ1-a1NwqrGS.js → index-D76eWsZ1-Z0x-dydi.js} +1 -1
  58. package/dist/website/main/assets/index-DH0rbH_2.js +1 -0
  59. package/dist/website/main/assets/index-DPBASOD1.js +1 -0
  60. package/dist/website/main/assets/index-DQfTUb4g.js +1 -0
  61. package/dist/website/main/assets/{index-CuCbuNEj.js → index-DS0KGu0h.js} +1 -1
  62. package/dist/website/main/assets/index-DVxz8FkV.js +2 -0
  63. package/dist/website/main/assets/{index-DgrizPPB.js → index-DgXgHraR.js} +4 -4
  64. package/dist/website/main/assets/{index-B2qulmRp.js → index-DjWcnHPR.js} +1 -1
  65. package/dist/website/main/assets/{index-Dms7ZQ2h-DZe32-4Q.js → index-Dms7ZQ2h-B_6qoSW-.js} +1 -1
  66. package/dist/website/main/assets/index-Dnz1UQnr.js +1 -0
  67. package/dist/website/main/assets/index-DpYJK6hB.js +1 -0
  68. package/dist/website/main/assets/{index-DqiFCfGx-Be_VzFT8.js → index-DqiFCfGx-uaEe5kQB.js} +1 -1
  69. package/dist/website/main/assets/index-Dr-xg5xd.js +1 -0
  70. package/dist/website/main/assets/index-DtBE21vT.js +1 -0
  71. package/dist/website/main/assets/{index-DdqWCLvd.js → index-DxdtqQU6.js} +1 -1
  72. package/dist/website/main/assets/{index-DxypSQ0K-DZ74HfZS.js → index-DxypSQ0K-zR2L90gm.js} +1 -1
  73. package/dist/website/main/assets/{index-BA02DjBI.js → index-DzxzRGrk.js} +1 -1
  74. package/dist/website/main/assets/index-NYRLx08d.js +1 -0
  75. package/dist/website/main/assets/{index-B5rd6Qgm.js → index-PMqboCW5.js} +1 -1
  76. package/dist/website/main/assets/index-R79ZeMZV.js +1 -0
  77. package/dist/website/main/assets/{index-T76vWLBU-iHnxnk3E.js → index-T76vWLBU-B_wdWDQF.js} +1 -1
  78. package/dist/website/main/assets/{index-DyFpWAJM.js → index-XhJP7gYm.js} +1 -1
  79. package/dist/website/main/assets/{index-fZBcgzqR-CqMOhDrG.js → index-fZBcgzqR-CZSkQJVN.js} +1 -1
  80. package/dist/website/main/assets/index-kE41pQo6.js +1 -0
  81. package/dist/website/main/assets/{index-mqeGrL6B-C5oP0065.js → index-mqeGrL6B-Dup8h8xb.js} +1 -1
  82. package/dist/website/main/assets/{index-CLT68CCM.css → index-rRr1TSL-.css} +1 -1
  83. package/dist/website/main/assets/{index-BX3Tl9jb.js → index-tMz4-DEB.js} +1 -1
  84. package/dist/website/main/assets/{index-Dblv7zZt.js → index-ywM9Y30i.js} +1 -1
  85. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-B8gjIiIt.js +2 -0
  86. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-Bs4fbZK8.js → index.vue_vue_type_script_setup_true_lang-BdH7Nx9p.js} +1 -1
  87. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-Dsu1eY0B.js → index.vue_vue_type_script_setup_true_lang-Bphion84.js} +1 -1
  88. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-C8D789jG.js +1 -0
  89. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-B05SHLQS.js → index.vue_vue_type_script_setup_true_lang-CfvoANZj.js} +1 -1
  90. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-BOkD4Vs3.js → index.vue_vue_type_script_setup_true_lang-uwxiML83.js} +1 -1
  91. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-DDVUKgQ8.js +1 -0
  92. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-DiN6WUUw.js +6 -0
  93. package/dist/website/main/assets/index3-BB6QcGH6.js +1 -0
  94. package/dist/website/main/assets/{kid-star-CiMfD7Sa.js → kid-star-0b7jegzF.js} +1 -1
  95. package/dist/website/main/assets/{md5-Dkj6ZNQB.js → md5-BqUl3L9Y.js} +1 -1
  96. package/dist/website/main/assets/{settings-CSr4nQM1.js → settings-DpNeh4hy.js} +1 -1
  97. package/dist/website/main/assets/{supervised-user-circle-BwUSx6w_.js → supervised-user-circle-B5yCz5Oo.js} +1 -1
  98. package/dist/website/main/assets/{sync-saved-locally-rounded-DyESI323.js → sync-saved-locally-rounded-BX8GcRCO.js} +1 -1
  99. package/dist/website/main/assets/{terminal-DAZ0JqKA.js → terminal-DXqN9Hoj.js} +1 -1
  100. package/dist/website/main/assets/{useCacheOssStore-C6-kY3lP.js → useCacheOssStore-DRfQruRw.js} +1 -1
  101. package/dist/website/main/assets/{useCompEditStore-B7__tBPJ.js → useCompEditStore-DpFLk9bE.js} +3 -3
  102. package/dist/website/main/assets/{useCompMetaLocalStore-DUMtt_yz.js → useCompMetaLocalStore-Dko7Z-qO.js} +1 -1
  103. package/dist/website/main/assets/{useKeyword-O-wdQuD_.js → useKeyword-Dh8n_REW.js} +1 -1
  104. package/dist/website/main/assets/useMessage-DeFP0yQy.js +1 -0
  105. package/dist/website/main/assets/{useTeamHeaders-BMHQzwDq.css → useTeamHeaders-BSofrH8c.css} +1 -1
  106. package/dist/website/main/assets/{useTeamHeaders-BbJQSrjN.js → useTeamHeaders-Bl2nRtJe.js} +1 -1
  107. package/dist/website/main/assets/{useUnreadStore-COt1XJEP.js → useUnreadStore-C1fMXHK-.js} +1 -1
  108. package/dist/website/main/assets/{useVscodeOpen-CCvngYEV.js → useVscodeOpen-CcI7l8e8.js} +1 -1
  109. package/dist/website/main/assets/{vendor-core-CNXB6kVe.js → vendor-core-CfnvwQzw.js} +3 -3
  110. package/dist/website/main/assets/{vendor-ui-Cvgmewma.js → vendor-ui-g5RNTRAc.js} +15 -15
  111. package/dist/website/main/index.html +4 -4
  112. package/package.json +3 -10
  113. package/dist/website/container/assets/index-BmW7jge6.css +0 -1
  114. package/dist/website/container/assets/index-E15UfKFM.js +0 -33
  115. package/dist/website/item/assets/index-CfkvQ31V.css +0 -1
  116. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-D-jhE3yA.js +0 -1
  117. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-BK7dbjCA.js +0 -1
  118. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-CcSntY2B.js +0 -1
  119. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-T5vn0JFD.js +0 -1
  120. package/dist/website/main/assets/GithubCallback-UUNSnoh7.js +0 -1
  121. package/dist/website/main/assets/ReplyForm.vue_vue_type_script_setup_true_lang-CEqkWYsv.js +0 -1
  122. package/dist/website/main/assets/SiteLogo-CszHjM2d.css +0 -1
  123. package/dist/website/main/assets/el-table-column-C2GQUl4R.js +0 -1
  124. package/dist/website/main/assets/index-4S2NYemE.js +0 -1
  125. package/dist/website/main/assets/index-6zg8j_nT.js +0 -1
  126. package/dist/website/main/assets/index-B6JeEo9g.js +0 -1
  127. package/dist/website/main/assets/index-B6Oo99Ej.js +0 -1
  128. package/dist/website/main/assets/index-BD8DwKlG.js +0 -1
  129. package/dist/website/main/assets/index-BF2ETnQh.js +0 -1
  130. package/dist/website/main/assets/index-BNwWVTCF.js +0 -1
  131. package/dist/website/main/assets/index-BTmh_pkn.js +0 -1
  132. package/dist/website/main/assets/index-BWh3R1jI.js +0 -6
  133. package/dist/website/main/assets/index-By_sRNiP.js +0 -1
  134. package/dist/website/main/assets/index-C1zFaUVE.js +0 -1
  135. package/dist/website/main/assets/index-CCJiyDal.js +0 -1
  136. package/dist/website/main/assets/index-CaoAcCMA.js +0 -2
  137. package/dist/website/main/assets/index-CbOKlsZn.js +0 -2
  138. package/dist/website/main/assets/index-D-25wqLa.js +0 -1
  139. package/dist/website/main/assets/index-D-HOLV6Z.js +0 -1
  140. package/dist/website/main/assets/index-D6zFRika.js +0 -1
  141. package/dist/website/main/assets/index-DR4j8Ql1.js +0 -1
  142. package/dist/website/main/assets/index-DRsSRfwD.js +0 -1
  143. package/dist/website/main/assets/index-D_NvG8ob.js +0 -1
  144. package/dist/website/main/assets/index-Dcp6qLr1.js +0 -1
  145. package/dist/website/main/assets/index-DpUmZw4S.js +0 -1
  146. package/dist/website/main/assets/index-Dy0c-ddP.js +0 -1
  147. package/dist/website/main/assets/index-RrkKKQjp.js +0 -1
  148. package/dist/website/main/assets/index-VpAGAhRh.js +0 -1
  149. package/dist/website/main/assets/index-ex5YI_gC.js +0 -1
  150. package/dist/website/main/assets/index-wd7ZswFD.js +0 -1
  151. package/dist/website/main/assets/index-z8BnmFXm.js +0 -1
  152. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Ap8wTvsB.js +0 -2
  153. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-ByHasmxS.js +0 -1
  154. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-66fUtqSq.js +0 -6
  155. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-CUQ5yd-1.js +0 -1
  156. package/dist/website/main/assets/index3-BiHnTK1Z.js +0 -1
  157. package/dist/website/main/assets/useMessage-yR4W8KDP.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-C1zFaUVE.js","./vendor-ui-Cvgmewma.js","./vendor-core-CNXB6kVe.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-BYA4gUOI.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CNOUTt3S.js","./BaseDialog.vue_vue_type_script_setup_true_lang-BK7dbjCA.js","./el-dropdown-item-BeIfAqTO.css","./el-card-BAyktVMS.css","./index-D-25wqLa.js","./useUnreadStore-COt1XJEP.js","./index.vue_vue_type_script_setup_true_lang-B05SHLQS.js","./useCacheOssStore-C6-kY3lP.js","./index-DOlF0Z_P.css","./index-BD8DwKlG.js","./index-C0WquRMM.css","./useVscodeOpen-CCvngYEV.js","./SiteLogo-Bpm2Ah9F.js","./SiteLogo-CszHjM2d.css","./index-DpUmZw4S.js","./index-8dCw6Y2Z.css","./el-link-CPQZ-olG.css","./index-RrkKKQjp.js","./md5-Dkj6ZNQB.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-D-jhE3yA.js","./index-CuCbuNEj.js","./CanvasAnimation.vue_vue_type_script_setup_true_lang-T5vn0JFD.js","./index-CioMG7I6.css","./GithubCallback-UUNSnoh7.js","./index-BWh3R1jI.js","./index-KhSB9wFh.js","./el-empty-S7fQQ3B8.css","./index-By_sRNiP.js","./index-DyFpWAJM.js","./index.vue_vue_type_script_setup_true_lang-Dsu1eY0B.js","./useMessage-yR4W8KDP.js","./index-VpAGAhRh.js","./useCompMetaLocalStore-DUMtt_yz.js","./index.vue_vue_type_script_setup_true_lang-Bs4fbZK8.js","./index-Dcp6qLr1.js","./el-table-column-C2GQUl4R.js","./el-table-column-B3ZEEuPD.css","./index.vue_vue_type_style_index_0_lang-66fUtqSq.js","./vendor-xterm-mNFjEaKn.js","./index-Bn5vi5XZ.css","./index.vue_vue_type_script_setup_true_lang-BOkD4Vs3.js","./index.vue_vue_type_script_setup_true_lang-Ap8wTvsB.js","./useTeamHeaders-BbJQSrjN.js","./useTeamHeaders-BMHQzwDq.css","./index.vue_vue_type_script_setup_true_lang-ByHasmxS.js","./index3-BiHnTK1Z.js","./index-DlkXaOkE.css","./ReplyForm.vue_vue_type_script_setup_true_lang-CEqkWYsv.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-CcSntY2B.js","./index-D-zBzPPy.css","./home-rounded-CN0qCDnE.js","./home-rounded-B4KVwSYb.css","./index-z8BnmFXm.js","./useKeyword-O-wdQuD_.js","./supervised-user-circle-BwUSx6w_.js","./supervised-user-circle-CZYpyCV4.css","./index-Dy0c-ddP.js","./index.vue_vue_type_style_index_0_lang-CUQ5yd-1.js","./useCompEditStore-B7__tBPJ.js","./v4-EwEgHOG0.js","./BaseBadge-BReHrAqs.js","./BaseBadge-ledSuDnX.css","./useCompEditStore-C2cDxPfw.css","./index-CdWXO9ks.css","./kid-star-CiMfD7Sa.js","./kid-star-D1M-aC1C.css","./index-D_NvG8ob.js","./index-4S2NYemE.js","./sync-saved-locally-rounded-DyESI323.js","./sync-saved-locally-rounded-wbwASI26.css","./index-ex5YI_gC.js","./cloud-upload-BqJFdj_J.js","./cloud-upload-j3Y0taC9.css","./index-CbOKlsZn.js","./index-BvmEG8Qn.css","./index-DgQa2ZqK.js","./moment-B-YVwB4U.js","./index-ChFpxx4T.css","./index-B6Oo99Ej.js","./terminal-DAZ0JqKA.js","./terminal-DFt3N_TH.css","./index-B6JeEo9g.js","./settings-CSr4nQM1.js","./settings-BhagQj3w.css","./index-6zg8j_nT.js","./index-Mnu1wKgu.css","./index-CaoAcCMA.js","./index-Ji2WmMDE.css","./index-D6zFRika.js","./CodeMirrorEditor-Cqow8ROO-DYjlZgX9.js"])))=>i.map(i=>d[i]);
2
- import{ao as Ja,m as se,z as ze,aa as ft,G as C,I as Ee,P as Le,W as Z,u as w,ap as Eo,f as xt,n as gt,g as yw,o as bw,h as Ds,w as He,k as Za,b as ri,e as _n,t as En,r as ww,c as Ew,a as re,i as Sw,j as Fs,d as zn,l as Hn,A as Ia,aq as _i,H as R,K as mt,J as _,F as We,a7 as ct,U as Et,V as q,$ as xn,Y as Cw,S as Se,ar as Ah,a4 as Rh,R as Pn,N as Ot,aj as ni,ah as Lr,a5 as ht,as as xw,O as QR,Q as Ct,a6 as Tw,ac as ii,ad as Vi,L as an,at as XR,au as Sc,av as JR,aw as ZR,ax as Ph,a2 as eP,M as Be,ay as Ih,az as Jr,aA as tP,aB as nP,am as Mh,y as xs,a3 as Ni,a0 as L_,v as rP,q as ts,a1 as kw,ab as iP,x as Ow,X as Nr,T as el,ai as oi,ae as Zs,aC as Op,af as Cf,aD as Fu}from"./vendor-core-CNXB6kVe.js";import{e as oP,u as sP,E as aP,a as Ls,d as lP,b as j_,c as Ps,f as $p,v as $w,g as uP,h as cP,i as dP,x as fP,j as pP,k as ns,l as hP,m as Ma,n as mP,o as vP,p as gP,q as Ap,r as Rp,s as _P,t as yP,w as bP,y as wP,z as U_,A as N_,B as z_,C as B_,D as V_,F as H_,G as q_,H as W_,I as Y_,J as K_,K as G_,L as Q_,M as X_,N as J_,O as Z_,P as ey,Q as ty,R as ny,S as ry,T as iy,U as oy,V as sy,W as ay,X as ly,Y as uy,Z as cy,_ as dy,$ as uu,a0 as js,a1 as Dh,a2 as Da,a3 as Fa,a4 as La,a5 as cu,a6 as EP}from"./vendor-ui-Cvgmewma.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const SP="Comp Hub",CP="main",xP="container",TP="item",kP="/__global_config__",OP="local://",$P="comphubConfig",AP="__remote__",RP="__local__",PP="__admin__",IP="https://api.comphub.cn",MP="http://localhost:7002",DP="http://127.0.0.1:5000",FP="http://localhost:5001",LP="http://localhost:3580",jP="https://apiadmin.comphub.cn",UP="https://admin.comphub.cn",NP="/_module_load_prefix_",zP="/_node_modules_load_prefix_",BP="/_comp_preview_prefix_local_",VP="/__proxy__",HP="/__master__",qP="authorization",WP="x-refresh-token",YP="accept-language",KP="comp-hub-db",GP="file-compiled",QP="https://oss.comphub.cn",XP="oss:sts:token",JP="oss:sts:expire",ZP="https://prebuild.comphub.cn",eI="/dev",tI="/prod",nI="/node_modules/.prebuild_module",rI="_metadata.json",iI="vue/dist/vue.esm-bundler.js",oI="react-jsx-loader",sI="vue3-sfc-loader",aI="vue2-sfc-loader",lI="sass-compiler",uI="less-compiler",Aw="react",cI={COMP_FRAMEWORK_VUE:"vue",COMP_FRAMEWORK_REACT:Aw},dI="comp.json",fI="README.md",pI="main.js",hI="index.vue",mI=["index.jsx","index.js","index.tsx"],vI="/.comp_hub_temp",gI="screenshot_mini.png",_I=1024*1024*10,yI=1024*1024*3,bI=30,Rw="list_local",Pw="list_remote",wI={COMP_LIST_TYPE_LOCAL:Rw,COMP_LIST_TYPE_REMOTE:Pw},Iw="config",Mw="error",Dw="dir",Fw="preview",Lw="extra",jw="deps",Uw="readme",Nw="upgradeLog",EI={TAB_TYPE_CONFIG:Iw,TAB_TYPE_ERROR:Mw,TAB_TYPE_DIR:Dw,TAB_TYPE_PREVIEW:Fw,TAB_TYPE_EXTRA:Lw,TAB_TYPE_DEPS:jw,TAB_TYPE_README:Uw,TAB_TYPE_UPGRADE_LOG:Nw},zw="mini",Bw="full",SI={COMP_EDIT_TAB_TYPE_MINI:zw,COMP_EDIT_TAB_TYPE_FULL:Bw},Vw="EDIT",Hw="ADD",CI={DIALOG_TYPE_EDIT:Vw,DIALOG_TYPE_ADD:Hw},qw="ONLY_INSTALL",Ww="AUTO",Yw="MAJOR_VERSION",Kw="MINOR_VERSION",Gw="EXACT_VERSION",xI={COMP_MATCH_TYPE_ONLY_INSTALL:qw,COMP_MATCH_TYPE_AUTO:Ww,COMP_MATCH_TYPE_MAJOR_VERSION:Yw,COMP_MATCH_TYPE_MINOR_VERSION:Kw,COMP_MATCH_TYPE_EXACT_VERSION:Gw},Qw="online",Xw="offline",TI={COMP_UPDATE_TYPE_ONLINE:Qw,COMP_UPDATE_TYPE_OFFLINE:Xw},Jw="NOT_EXIST",Zw="EXIST",kI={COMP_CHECK_STATUS_NOT_EXIST:Jw,COMP_CHECK_STATUS_EXIST:Zw},e1="__id__",OI=0,$I=1,AI=-1,t1="checkPreviewListForm",n1="checkExtraInfoForm",r1="checkCompConfig",i1="checkUpgradeLogForm",o1="getCompError",s1="afterCompDel",a1="afterCompCancelCollect",l1="afterCompRenderRetry",u1="openCompTerminal",RI={COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:t1,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:n1,COMP_METHOD_KEY_CHECK_COMP_CONFIG:r1,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:i1,COMP_METHOD_KEY_GET_COMP_ERROR:o1,COMP_METHOD_KEY_AFTER_COMP_DEL:s1,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:a1,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:l1,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:u1},PI="compListStore",II="compEditStore",MI="callbacks",DI={CONTAINER:{SHARE:"share",COLLECT:"collect",LOCAL:"local",MINE:"mine",SIMILAR:"similar",TEAM_ALL:"teamAll",TEAM_MINE:"teamMine",TEAM_GROUP:"teamGroup",TEAM_ADD:"teamAdd"},ITEM:{PREVIEW_REMOTE:"previewRemote",PREVIEW_LOCAL:"previewLocal",CAROUSEL_REMOTE:"carouselRemote",CAROUSEL_LOCAL:"carouselLocal",EDIT_PANEL:"editPanel"}},FI="http://127.0.0.1",LI="http://localhost:8095",jI="http://localhost:8096",UI="http://localhost:5198",NI="http://localhost:3056",zI="https://www.comphub.cn",BI="http://localhost:8101",VI="https://render.comphub.cn",HI="/item",qI="/container",WI="CREATE",YI="JOIN",KI="EXIT",GI="teamAddMyComp",QI="teamCompList",XI="teamCompGroupList",JI="teamMyCompList",ZI="teamMyCompUpdate",eM="__v__",tM="local",nM="prod",rM="local",iM="prod",oM="http://localhost:5173",sM="https://docs.comphub.cn",aM=20,lM=20,uM="SUPER_ADMIN",cM="ADMIN",Rn=Object.freeze(Object.defineProperty({__proto__:null,ACCEPT_LANGUAGE_HEADER_NAME:YP,ADMIN_SERVICE_PREFIX:PP,ADMIN_SERVICE_URL_DEV:LP,ADMIN_SERVICE_URL_PROD:jP,ADMIN_WEB_URL_PROD:UP,AUTHORIZATION_HEADER_NAME:qP,CACHE_KEY_STS_EXPIRE_TIME:JP,CACHE_KEY_STS_TOKEN:XP,COMPHUB_CONFIG_KEY:$P,COMP_ACTION_ICON_HEIGHT:lM,COMP_ACTION_ICON_WIDTH:aM,COMP_CHECK_STATUSES:kI,COMP_CHECK_STATUS_EXIST:Zw,COMP_CHECK_STATUS_NOT_EXIST:Jw,COMP_CONFIG_FILENAME:dI,COMP_EDIT_TAB_TYPES:SI,COMP_EDIT_TAB_TYPE_FULL:Bw,COMP_EDIT_TAB_TYPE_MINI:zw,COMP_ENTRY_FILE:pI,COMP_FIELD_COMP_ID:e1,COMP_FRAMEWORK_REACT:Aw,COMP_FRAMEWORK_TYPES:cI,COMP_FRAMEWORK_VUE:"vue",COMP_HUB_DEV_DOCS_URL:oM,COMP_HUB_PROD_DOCS_URL:sM,COMP_LIST_TYPES:wI,COMP_LIST_TYPE_LOCAL:Rw,COMP_LIST_TYPE_REMOTE:Pw,COMP_MATCH_TYPES:xI,COMP_MATCH_TYPE_AUTO:Ww,COMP_MATCH_TYPE_EXACT_VERSION:Gw,COMP_MATCH_TYPE_MAJOR_VERSION:Yw,COMP_MATCH_TYPE_MINOR_VERSION:Kw,COMP_MATCH_TYPE_ONLY_INSTALL:qw,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:a1,COMP_METHOD_KEY_AFTER_COMP_DEL:s1,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:l1,COMP_METHOD_KEY_CHECK_COMP_CONFIG:r1,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:n1,COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:t1,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:i1,COMP_METHOD_KEY_GET_COMP_ERROR:o1,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:u1,COMP_PREVIEW_PREFIX_LOCAL:BP,COMP_README_FILENAME:fI,COMP_SCREENSHOT_MINI_FILENAME:gI,COMP_SUBMIT_MAX_FILE_COUNT:bI,COMP_SUBMIT_MAX_SINGLE_FILE_SIZE:yI,COMP_SUBMIT_MAX_TOTAL_SIZE:_I,COMP_TEMP_DIR:vI,COMP_UPDATE_TYPES:TI,COMP_UPDATE_TYPE_OFFLINE:Xw,COMP_UPDATE_TYPE_ONLINE:Qw,COMP_USE_ENTRY_FILE:hI,COMP_USE_ENTRY_FILE_REACT:mI,DIALOG_TYPES:CI,DIALOG_TYPE_ADD:Hw,DIALOG_TYPE_EDIT:Vw,FILE_MANAGER_DIRNAME:OP,GLOBAL_CONFIG_PATH:kP,IFRAME_CONTAINER_WEBSITE_PATH:qI,IFRAME_HOST:FI,IFRAME_ITEM_WEBSITE_PATH:HI,IFRAME_ROUTES:DI,INDEX_DB_NAME:KP,INDEX_DB_TABLE_NAME:GP,LESS_COMPILER_KEY:uI,LOCAL_CHILD_IFRAME_URL:LI,LOCAL_ITEM_EXTRANET_URL:BI,LOCAL_LEAF_IFRAME_URL:jI,LOCAL_MAIN_EXTRANET_URL:NI,LOCAL_MIDWAY_ENV_LOCAL:tM,LOCAL_MIDWAY_ENV_PROD:nM,LOCAL_SERVICE_PREFIX:RP,LOCAL_SERVICE_URL_DEV:DP,LOCAL_SERVICE_URL_DEV_SUB:FP,LOCAL_TOP_IFRAME_URL:UI,MASTER_API_PREFIX:HP,META_FILE_NAME:rI,MODULE_LOAD_PREFIX:NP,NODE_MODULES_LOAD_PREFIX:zP,OSS_CUSTOM_DOMAIN:QP,PREBUILD_HOST:ZP,PREBUILD_MAX_SINGLE_FILE_SIZE:52428800,PREBUILD_MODULE_DIR:nI,PREBUILD_MODULE_DIR_DEV:eI,PREBUILD_MODULE_DIR_PROD:tI,PROVIDE_KEYS:RI,PROVIDE_KEY_CALLBACKS:MI,PROVIDE_KEY_COMP_EDIT_STORE:II,PROVIDE_KEY_COMP_LIST_STORE:PI,PROXY_PATH_PREFIX:VP,REACT_JSX_LOADER_KEY:oI,REFRESH_TOKEN_HEADER_NAME:WP,REMOTE_ITEM_EXTRANET_URL:VI,REMOTE_MAIN_EXTRANET_URL:zI,REMOTE_MIDWAY_ENV_LOCAL:rM,REMOTE_MIDWAY_ENV_PROD:iM,REMOTE_SERVICE_PREFIX:AP,REMOTE_SERVICE_URL_DEV:MP,REMOTE_SERVICE_URL_PROD:IP,ROLE_CODE_ADMIN:cM,ROLE_CODE_SUPER_ADMIN:uM,ROUTE_STATE_KEY_VERSION:eM,SASS_COMPILER_KEY:lI,SCOPE_ID_TEAM_ADD_MY_COMP:GI,SCOPE_ID_TEAM_COMP_GROUP_LIST:XI,SCOPE_ID_TEAM_COMP_LIST:QI,SCOPE_ID_TEAM_MY_COMP_LIST:JI,SCOPE_ID_TEAM_MY_COMP_UPDATE:ZI,SITE_TITLE:SP,TAB_TYPES:EI,TAB_TYPE_CONFIG:Iw,TAB_TYPE_DEPS:jw,TAB_TYPE_DIR:Dw,TAB_TYPE_ERROR:Mw,TAB_TYPE_EXTRA:Lw,TAB_TYPE_PREVIEW:Fw,TAB_TYPE_README:Uw,TAB_TYPE_UPGRADE_LOG:Nw,TEAM_OPERATE_TYPE_CREATE:WI,TEAM_OPERATE_TYPE_EXIT:KI,TEAM_OPERATE_TYPE_JOIN:YI,VERSION_COMPARE_GREATER:$I,VERSION_COMPARE_LESS:AI,VERSION_COMPARE_SAME:OI,VUE2_SFC_LOADER_KEY:aI,VUE3_SFC_LOADER_KEY:sI,VUE_ESM_BUNDLER:iI,WEBSITE_PATH_CONTAINER:xP,WEBSITE_PATH_ITEM:TP,WEBSITE_PATH_MAIN:CP},Symbol.toStringTag,{value:"Module"}));var c1=(e=>(e.FILE="file",e.DIRECTORY="directory",e))(c1||{}),d1=(e=>(e.RECEIVED="received",e.MY="my",e))(d1||{}),f1=(e=>(e.GLOBAL="global",e.TEAM="team",e))(f1||{});const oie=Object.freeze(Object.defineProperty({__proto__:null,FileType:c1,MyCommentTab:d1,TargetType:f1},Symbol.toStringTag,{value:"Module"})),dM=[{label:"tag.systemRecommended",value:"XTTJ"},{label:"tag.all",value:"QB"},{label:"tag.latest",value:"ZX"},{label:"tag.hottest",value:"ZR"}],fM=[".css"],pM=[{name:e1,label:"comp.fieldId",required:!0,default:""},{name:"name",label:"comp.fieldName",required:!0,default:""},{name:"version",label:"comp.fieldVersion",required:!0,default:"1.0.0"}],sie=Object.freeze(Object.defineProperty({__proto__:null,COMP_DEFAULT_FIELD:pM,DEFAULT_TAG_GROUP:dM,PREBUILD_MODULE_SKIP_EXT:fM},Symbol.toStringTag,{value:"Module"})),hM="comp-hub-locale",mM=Object.freeze(Object.defineProperty({__proto__:null,LOCALE_KEY:hM},Symbol.toStringTag,{value:"Module"})),vM="send-auth-code",gM="send-auth-code-success",_M="send-auth-code-failed",yM="login-button",bM="login-button-success",wM="login-button-failed",EM="skip-login",SM="upload-select-folder",CM="upload-confirm",xM="upload-success",TM="upload-failed",kM="upload-repeat-confirm",OM="edit-panel-submit",$M="edit-panel-submit-success",AM="edit-panel-submit-failed",RM="edit-generate-comp-json",PM="edit-view-diff",IM="edit-bg-color-change",MM="edit-dep-version-change",DM="search-component",FM="filter-tag",LM="page-size-change",jM="comp-preview",UM="comp-download",NM="comp-download-success",zM="comp-download-failed",BM="comp-collect-toggle",VM="comp-delete",HM="comp-update",qM="comp-update-success",WM="comp-update-failed",YM="comp-version-change",KM="preview-open-newtab",GM="preview-tab-change",QM="user-update-avatar",XM="user-update-avatar-success",JM="user-update-avatar-failed",ZM="user-update-nickname",eD="user-update-nickname-success",tD="user-update-nickname-failed",nD="user-update-email",rD="user-update-email-success",iD="user-update-email-failed",oD="user-update-password",sD="user-update-password-success",aD="user-update-password-failed",lD="user-email-login-toggle",uD="team-tab-change",cD="team-filter-group",dD="team-kick-member",fD="team-apply-accept",pD="team-apply-reject",hD="team-comp-remove",mD="team-comp-permission-change",vD="sidebar-toggle",gD="setting-apply-rule",_D="clear-cache",fy=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_CACHE:_D,COMP_COLLECT_TOGGLE:BM,COMP_DELETE:VM,COMP_DOWNLOAD:UM,COMP_DOWNLOAD_FAILED:zM,COMP_DOWNLOAD_SUCCESS:NM,COMP_PREVIEW:jM,COMP_UPDATE:HM,COMP_UPDATE_FAILED:WM,COMP_UPDATE_SUCCESS:qM,COMP_VERSION_CHANGE:YM,EDIT_BG_COLOR_CHANGE:IM,EDIT_DEP_VERSION_CHANGE:MM,EDIT_GENERATE_COMP_JSON:RM,EDIT_PANEL_SUBMIT:OM,EDIT_PANEL_SUBMIT_FAILED:AM,EDIT_PANEL_SUBMIT_SUCCESS:$M,EDIT_VIEW_DIFF:PM,FILTER_TAG:FM,LOGIN_BUTTON:yM,LOGIN_BUTTON_FAILED:wM,LOGIN_BUTTON_SUCCESS:bM,PAGE_SIZE_CHANGE:LM,PREVIEW_OPEN_NEWTAB:KM,PREVIEW_TAB_CHANGE:GM,SEARCH_COMPONENT:DM,SEND_AUTH_CODE:vM,SEND_AUTH_CODE_FAILED:_M,SEND_AUTH_CODE_SUCCESS:gM,SETTING_APPLY_RULE:gD,SIDEBAR_TOGGLE:vD,SKIP_LOGIN:EM,TEAM_APPLY_ACCEPT:fD,TEAM_APPLY_REJECT:pD,TEAM_COMP_PERMISSION_CHANGE:mD,TEAM_COMP_REMOVE:hD,TEAM_FILTER_GROUP:cD,TEAM_KICK_MEMBER:dD,TEAM_TAB_CHANGE:uD,UPLOAD_CONFIRM:CM,UPLOAD_FAILED:TM,UPLOAD_REPEAT_CONFIRM:kM,UPLOAD_SELECT_FOLDER:SM,UPLOAD_SUCCESS:xM,USER_EMAIL_LOGIN_TOGGLE:lD,USER_UPDATE_AVATAR:QM,USER_UPDATE_AVATAR_FAILED:JM,USER_UPDATE_AVATAR_SUCCESS:XM,USER_UPDATE_EMAIL:nD,USER_UPDATE_EMAIL_FAILED:iD,USER_UPDATE_EMAIL_SUCCESS:rD,USER_UPDATE_NICKNAME:ZM,USER_UPDATE_NICKNAME_FAILED:tD,USER_UPDATE_NICKNAME_SUCCESS:eD,USER_UPDATE_PASSWORD:oD,USER_UPDATE_PASSWORD_FAILED:aD,USER_UPDATE_PASSWORD_SUCCESS:sD},Symbol.toStringTag,{value:"Module"})),aie=e=>Rn.COMP_HUB_PROD_DOCS_URL,yD=e=>"";var bD={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const wD=()=>{const{locale:e}=Ja(),t={zh:bD,en:oP};return{locale:se(()=>t[e.value])}},ED=ze({__name:"App",setup(e){const{locale:t}=wD();return sP(),(n,r)=>{const i=ft("router-view");return C(),Ee(w(aP),{locale:w(t)},{default:Le(()=>[Z(i)]),_:1},8,["locale"])}}}),SD="modulepreload",CD=function(e,t){return new URL(e,t).href},py={},Rt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),u=l?.nonce||l?.getAttribute("nonce");i=d(n.map(f=>{if(f=CD(f,r),f in py)return;py[f]=!0;const p=f.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(r)for(let g=s.length-1;g>=0;g--){const m=s[g];if(m.href===f&&(!p||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${v}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":SD,p||(y.as="script"),y.crossOrigin="",y.href=f,u&&y.setAttribute("nonce",u),document.head.appendChild(y),p)return new Promise((g,m)=>{y.addEventListener("load",g),y.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},uo="authorization",sc=()=>localStorage.getItem(uo),xD=e=>localStorage.setItem(uo,e),TD=()=>localStorage.removeItem(uo),Bo="x-refresh-token",kD=()=>localStorage.getItem(Bo),OD=e=>localStorage.setItem(Bo,e),$D=()=>localStorage.removeItem(Bo),AD="aside_is_collapse",lie="loginType",uie="compUploadFullscreen",cie="terminalCommandHistory",die="compUploadSidePanelSize",fie="tagSelected",RD="asideSize",PD="headerSize",p1="tagsViewMaxCache",pie="readUploadAgreement",ID="dependencyMatchRule",hie="teamTabActiveName",mie="settingTabActiveName",vie="compPreviewTabActiveName",gie="myCommentsTabActiveName",h1="paginationPageSize",MD=()=>localStorage.getItem(h1),DD=e=>localStorage.setItem(h1,e),_ie="selectedFolderPath",tl=Eo("tagsView",{state:()=>({visitedViews:[],maxCache:Ls(p1,10),payloadMap:new Map}),actions:{setMaxCache(e){this.$patch(t=>{t.maxCache=e})},addView(e){this.$patch(t=>{const n={...e},r=t.visitedViews.findIndex(o=>o.path===e.path);if(r!==-1){t.visitedViews[r]=n;return}t.visitedViews.unshift(n);const i=t.visitedViews.length-t.maxCache;i>0&&this.spliceVisitedViews(-i,i)})},spliceVisitedViews(e,t){this.$patch(n=>{n.visitedViews.splice(e,t)})},delViewByPath(e){this.$patch(t=>{for(const[n,r]of t.visitedViews.entries())if(r.path===e){t.visitedViews.splice(n,1);break}})},delViewAndJumpToPrev(e,t=!1,n){if(t){const r=this.visitedViews.filter(i=>i.path!==e)?.[0];r?n.push(r.path).then(i=>{i||setTimeout(()=>{this.delViewByPath(e)},250)}):n.push("/").then(i=>{i||this.delViewByPath(e)})}else this.delViewByPath(e)},addPayLoad(e,t){this.$patch(n=>{n.payloadMap.set(e,t)})},getPayLoad(e){return this.payloadMap.get(e)}}});function m1(e){return yw()?(bw(e),!0):!1}const xf=new WeakMap,FD=(...e)=>{var t;const n=e[0],r=(t=Ds())==null?void 0:t.proxy;if(r==null&&!Sw())throw new Error("injectLocal must be called in setup");return r&&xf.has(r)&&n in xf.get(r)?xf.get(r)[n]:Fs(...e)},LD=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const jD=Object.prototype.toString,UD=e=>jD.call(e)==="[object Object]",ND=()=>{};function v1(...e){if(e.length!==1)return En(...e);const t=e[0];return typeof t=="function"?ww(Ew(()=>({get:t,set:ND}))):re(t)}function zD(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const g1=e=>e();function BD(e=g1,t={}){const{initialState:n="active"}=t,r=v1(n==="active");function i(){r.value=!1}function o(){r.value=!0}const s=(...l)=>{r.value&&e(...l)};return{isActive:ww(r),pause:i,resume:o,eventFilter:s}}function hy(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Lu(e){return Array.isArray(e)?e:[e]}function VD(e){return Ds()}function HD(e,t,n={}){const{eventFilter:r=g1,...i}=n;return He(e,zD(r,t),i)}function qD(e,t,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:s,pause:l,resume:u,isActive:d}=BD(r,{initialState:i});return{stop:HD(e,t,{...o,eventFilter:s}),pause:l,resume:u,isActive:d}}function Cc(e,t=!0,n){VD()?xt(e,n):t?e():gt(e)}function yie(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,i=Za(e),o=_n(e);function s(l){if(arguments.length)return o.value=l,o.value;{const u=ri(n);return o.value=o.value===u?ri(r):u,o.value}}return i?s:[o,s]}function WD(e,t,n){return He(e,t,{...n,immediate:!0})}const yo=LD?window:void 0;function fo(e){var t;const n=ri(e);return(t=n?.$el)!=null?t:n}function ja(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},r=(l,u,d,f)=>(l.addEventListener(u,d,f),()=>l.removeEventListener(u,d,f)),i=se(()=>{const l=Lu(ri(e[0])).filter(u=>u!=null);return l.every(u=>typeof u!="string")?l:void 0}),o=WD(()=>{var l,u;return[(u=(l=i.value)==null?void 0:l.map(d=>fo(d)))!=null?u:[yo].filter(d=>d!=null),Lu(ri(i.value?e[1]:e[0])),Lu(w(i.value?e[2]:e[1])),ri(i.value?e[3]:e[2])]},([l,u,d,f])=>{if(n(),!l?.length||!u?.length||!d?.length)return;const p=UD(f)?{...f}:f;t.push(...l.flatMap(v=>u.flatMap(y=>d.map(g=>r(v,y,g,p)))))},{flush:"post"}),s=()=>{o(),n()};return m1(n),s}function YD(){const e=_n(!1),t=Ds();return t&&xt(()=>{e.value=!0},t),e}function _1(e){const t=YD();return se(()=>(t.value,!!e()))}const KD=Symbol("vueuse-ssr-width");function GD(){const e=Sw()?FD(KD,null):null;return typeof e=="number"?e:void 0}function y1(e,t={}){const{window:n=yo,ssrWidth:r=GD()}=t,i=_1(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=_n(typeof r=="number"),s=_n(),l=_n(!1),u=d=>{l.value=d.matches};return zn(()=>{if(o.value){o.value=!i.value;const d=ri(e).split(",");l.value=d.some(f=>{const p=f.includes("not all"),v=f.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),y=f.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||y);return v&&g&&(g=r>=hy(v[1])),y&&g&&(g=r<=hy(y[1])),p?!g:g});return}i.value&&(s.value=n.matchMedia(ri(e)),l.value=s.value.matches)}),ja(s,"change",u,{passive:!0}),se(()=>l.value)}const du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fu="__vueuse_ssr_handlers__",QD=XD();function XD(){return fu in du||(du[fu]=du[fu]||{}),du[fu]}function b1(e,t){return QD[e]||t}function JD(e){return y1("(prefers-color-scheme: dark)",e)}function ZD(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const eF={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},my="vueuse-storage";function tF(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:u=!0,mergeDefaults:d=!1,shallow:f,window:p=yo,eventFilter:v,onError:y=D=>{console.error(D)},initOnMounted:g}=r,m=(f?_n:re)(typeof t=="function"?t():t),b=se(()=>ri(e));if(!n)try{n=b1("getDefaultStorage",()=>{var D;return(D=yo)==null?void 0:D.localStorage})()}catch(D){y(D)}if(!n)return m;const x=ri(t),S=ZD(x),O=(i=r.serializer)!=null?i:eF[S],{pause:T,resume:A}=qD(m,D=>W(D),{flush:o,deep:s,eventFilter:v});He(b,()=>K(),{flush:o});let M=!1;const z=D=>{g&&!M||K(D)},Y=D=>{g&&!M||L(D)};p&&l&&(n instanceof Storage?ja(p,"storage",z,{passive:!0}):ja(p,my,Y)),g?Cc(()=>{M=!0,K()}):K();function ve(D,ne){if(p){const le={key:b.value,oldValue:D,newValue:ne,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent("storage",le):new CustomEvent(my,{detail:le}))}}function W(D){try{const ne=n.getItem(b.value);if(D==null)ve(ne,null),n.removeItem(b.value);else{const le=O.write(D);ne!==le&&(n.setItem(b.value,le),ve(ne,le))}}catch(ne){y(ne)}}function X(D){const ne=D?D.newValue:n.getItem(b.value);if(ne==null)return u&&x!=null&&n.setItem(b.value,O.write(x)),x;if(!D&&d){const le=O.read(ne);return typeof d=="function"?d(le,x):S==="object"&&!Array.isArray(le)?{...x,...le}:le}else return typeof ne!="string"?ne:O.read(ne)}function K(D){if(!(D&&D.storageArea!==n)){if(D&&D.key==null){m.value=x;return}if(!(D&&D.key!==b.value)){T();try{const ne=O.write(m.value);(D===void 0||D?.newValue!==ne)&&(m.value=X(D))}catch(ne){y(ne)}finally{D?gt(A):A()}}}}function L(D){K(D.detail)}return m}const nF="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function rF(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=yo,storage:o,storageKey:s="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:u,emitAuto:d,disableTransition:f=!0}=e,p={auto:"",light:"light",dark:"dark",...e.modes||{}},v=JD({window:i}),y=se(()=>v.value?"dark":"light"),g=u||(s==null?v1(r):tF(s,r,o,{window:i,listenToStorageChanges:l})),m=se(()=>g.value==="auto"?y.value:g.value),b=b1("updateHTMLAttrs",(T,A,M)=>{const z=typeof T=="string"?i?.document.querySelector(T):fo(T);if(!z)return;const Y=new Set,ve=new Set;let W=null;if(A==="class"){const K=M.split(/\s/g);Object.values(p).flatMap(L=>(L||"").split(/\s/g)).filter(Boolean).forEach(L=>{K.includes(L)?Y.add(L):ve.add(L)})}else W={key:A,value:M};if(Y.size===0&&ve.size===0&&W===null)return;let X;f&&(X=i.document.createElement("style"),X.appendChild(document.createTextNode(nF)),i.document.head.appendChild(X));for(const K of Y)z.classList.add(K);for(const K of ve)z.classList.remove(K);W&&z.setAttribute(W.key,W.value),f&&(i.getComputedStyle(X).opacity,document.head.removeChild(X))});function x(T){var A;b(t,n,(A=p[T])!=null?A:T)}function S(T){e.onChanged?e.onChanged(T,x):x(T)}He(m,S,{flush:"post",immediate:!0}),Cc(()=>S(m.value));const O=se({get(){return d?g.value:m.value},set(T){g.value=T}});return Object.assign(O,{store:g,system:y,state:m})}function bie(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=rF({...e,onChanged:(s,l)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,s==="dark",l,s):l(s)},modes:{dark:t,light:n}}),i=se(()=>r.system.value);return se({get(){return r.value==="dark"},set(s){const l=s?"dark":"light";i.value===l?r.value="auto":r.value=l}})}function iF(e,t,n={}){const{window:r=yo,...i}=n;let o;const s=_1(()=>r&&"ResizeObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},u=se(()=>{const p=ri(e);return Array.isArray(p)?p.map(v=>fo(v)):[fo(p)]}),d=He(u,p=>{if(l(),s.value&&r){o=new ResizeObserver(t);for(const v of p)v&&o.observe(v,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),d()};return m1(f),{isSupported:s,stop:f}}function Fh(e,t={width:0,height:0},n={}){const{window:r=yo,box:i="content-box"}=n,o=se(()=>{var p,v;return(v=(p=fo(e))==null?void 0:p.namespaceURI)==null?void 0:v.includes("svg")}),s=_n(t.width),l=_n(t.height),{stop:u}=iF(e,([p])=>{const v=i==="border-box"?p.borderBoxSize:i==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(r&&o.value){const y=fo(e);if(y){const g=y.getBoundingClientRect();s.value=g.width,l.value=g.height}}else if(v){const y=Lu(v);s.value=y.reduce((g,{inlineSize:m})=>g+m,0),l.value=y.reduce((g,{blockSize:m})=>g+m,0)}else s.value=p.contentRect.width,l.value=p.contentRect.height},n);Cc(()=>{const p=fo(e);p&&(s.value="offsetWidth"in p?p.offsetWidth:t.width,l.value="offsetHeight"in p?p.offsetHeight:t.height)});const d=He(()=>fo(e),p=>{s.value=p?t.width:0,l.value=p?t.height:0});function f(){u(),d()}return{width:s,height:l,stop:f}}function wie(e={}){const{window:t=yo,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:s="inner"}=e,l=_n(n),u=_n(r),d=()=>{if(t)if(s==="outer")l.value=t.outerWidth,u.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:p,height:v,scale:y}=t.visualViewport;l.value=Math.round(p*y),u.value=Math.round(v*y)}else o?(l.value=t.innerWidth,u.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,u.value=t.document.documentElement.clientHeight)};d(),Cc(d);const f={passive:!0};if(ja("resize",d,f),t&&s==="visual"&&t.visualViewport&&ja(t.visualViewport,"resize",d,f),i){const p=y1("(orientation: portrait)");He(p,()=>d())}return{width:l,height:u}}const oF=ze({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){var n,r;const i=_n(),o=Hn(Fh(i,{width:(n=e.width)!=null?n:0,height:(r=e.height)!=null?r:0},{box:e.box}));return()=>{if(t.default)return Ia(e.as||"div",{ref:i},t.default(o))}}}),sF={ref:"el",class:"relative"},aF={class:"absolute opacity-0 pointer-events-none flex"},lF=["itemKey"],uF=ze({__name:"AutoWrapRow",props:{list:{},moreWidth:{default:70},gap:{default:5},getKey:{}},setup(e){const t=e,n=re(new Map),r=_i("el"),i=_i("items"),{width:o}=Fh(r),s=re([]),l=re(!1),u=se(()=>o.value-t.moreWidth),d=se(()=>{const m=s.value.map(b=>b.key);return t.list.filter(b=>m.includes(t.getKey(b)))}),f=se(()=>l.value?t.list.length-s.value.length:0),p=se(()=>{let m=0;for(const b of n.value.values())m+=b;return m});function v(m,b){n.value.set(m,b)}function y(){const m=new Map;for(const b of t.list){const x=t.getKey(b);m.set(x,n.value.get(x)??0)}n.value=m}const g=lP(()=>{let m=0;const b=[];if(!(!i.value||t.list.length===0)){for(const x of t.list){const S=t.getKey(x),O=i.value.find(T=>T.getAttribute("itemKey")===S);if(O){if(m+=O.offsetWidth+t.gap,m>u.value)break;b.push({key:S,value:O.offsetWidth})}}s.value=b,l.value=!0}},100);return He([()=>o.value,()=>t.list,()=>p.value],([,,m],[,,b])=>{m!==b&&(l.value=!1),g()},{flush:"post",deep:!0}),He(()=>t.list.length,()=>{y()}),(m,b)=>(C(),R("div",sF,[mt(m.$slots,"display",{visibleList:d.value,overflow:f.value}),_("div",aF,[(C(!0),R(We,null,ct(e.list,(x,S)=>(C(),Ee(w(oF),{key:e.getKey(x)},{default:Le(({width:O})=>[Et(q(v(e.getKey(x),Number(O)))+" ",1),_("div",{ref_for:!0,ref:"items",itemKey:e.getKey(x),class:"invisible whitespace-nowrap"},[mt(m.$slots,"measure",{item:x,index:S})],8,lF)]),_:2},1024))),128))])],512))}}),Lh=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},w1=/^[a-z0-9]+(-[a-z0-9]+)*$/,xc=(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 l=i.pop(),u=i.pop(),d={provider:i.length>0?i[0]:r,prefix:u,name:l};return t&&!ju(d)?null:d}const o=i[0],s=o.split("-");if(s.length>1){const l={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!ju(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:o};return t&&!ju(l,n)?null:l}return null},ju=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function cF(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const l=r[s]&&r[s].parent,u=l&&o(l);u&&(i[s]=[l].concat(u))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}const E1=Object.freeze({left:0,top:0,width:16,height:16}),ac=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Tc=Object.freeze({...E1,...ac}),Pp=Object.freeze({...Tc,body:"",hidden:!1});function dF(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 vy(e,t){const n=dF(e,t);for(const r in Pp)r in ac?r in e&&!(r in n)&&(n[r]=ac[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function fF(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function s(l){o=vy(r[l]||i[l],o)}return s(t),n.forEach(s),vy(e,o)}function S1(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=cF(e);for(const i in r){const o=r[i];o&&(t(i,fF(e,i,o)),n.push(i))}return n}const pF={provider:"",aliases:{},not_found:{},...E1};function Tf(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function C1(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Tf(e,pF))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!Tf(o,Pp))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i||typeof s!="string"||!n[s]&&!r[s]||!Tf(o,Pp))return null}return t}const gy=Object.create(null);function hF(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Us(e,t){const n=gy[e]||(gy[e]=Object.create(null));return n[t]||(n[t]=hF(e,t))}function x1(e,t){return C1(t)?S1(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function mF(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ua=!1;function T1(e){return typeof e=="boolean"&&(Ua=e),Ua}function vF(e){const t=typeof e=="string"?xc(e,!0,Ua):e;if(t){const n=Us(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function gF(e,t){const n=xc(e,!0,Ua);if(!n)return!1;const r=Us(n.provider,n.prefix);return t?mF(r,n.name,t):(r.missing.add(n.name),!0)}function _F(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ua&&!t&&!e.prefix){let r=!1;return C1(e)&&(e.prefix="",S1(e,(i,o)=>{gF(i,o)&&(r=!0)})),r}const n=e.prefix;return ju({prefix:n,name:"a"})?!!x1(Us(t,n),e):!1}const k1=Object.freeze({width:null,height:null}),O1=Object.freeze({...k1,...ac}),yF=/(-?[0-9.]*[0-9]+[0-9.]*)/g,bF=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function _y(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(yF);if(r===null||!r.length)return e;const i=[];let o=r.shift(),s=bF.test(o);for(;;){if(s){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function wF(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("</"+t);if(i===-1||o===-1)break;const s=e.indexOf(">",o);if(s===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:n,content:e}}function EF(e,t){return e?"<defs>"+e+"</defs>"+t:t}function SF(e,t,n){const r=wF(e);return EF(r.defs,t+r.content+n)}const CF=e=>e==="unset"||e==="undefined"||e==="none";function xF(e,t){const n={...Tc,...e},r={...O1,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const b=[],x=m.hFlip,S=m.vFlip;let O=m.rotate;x?S?O+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):S&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let T;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:T=i.height/2+i.top,b.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:T=i.width/2+i.left,b.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}O%2===1&&(i.left!==i.top&&(T=i.left,i.left=i.top,i.top=T),i.width!==i.height&&(T=i.width,i.width=i.height,i.height=T)),b.length&&(o=SF(o,'<g transform="'+b.join(" ")+'">',"</g>"))});const s=r.width,l=r.height,u=i.width,d=i.height;let f,p;s===null?(p=l===null?"1em":l==="auto"?d:l,f=_y(p,u/d)):(f=s==="auto"?u:s,p=l===null?_y(f,d/u):l==="auto"?d:l);const v={},y=(m,b)=>{CF(b)||(v[m]=b.toString())};y("width",f),y("height",p);const g=[i.left,i.top,u,d];return v.viewBox=g.join(" "),{attributes:v,viewBox:g,body:o}}const TF=/\sid="(\S+)"/g,yy=new Map;function kF(e){e=e.replace(/[0-9]+$/,"")||"a";const t=yy.get(e)||0;return yy.set(e,t+1),t?`${e}${t}`:e}function OF(e){const t=[];let n;for(;n=TF.exec(e);)t.push(n[1]);if(!t.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const o=kF(i),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Ip=Object.create(null);function $F(e,t){Ip[e]=t}function Mp(e){return Ip[e]||Ip[""]}function jh(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 Uh=Object.create(null),wa=["https://api.simplesvg.com","https://api.unisvg.com"],Uu=[];for(;wa.length>0;)wa.length===1||Math.random()>.5?Uu.push(wa.shift()):Uu.push(wa.pop());Uh[""]=jh({resources:["https://api.iconify.design"].concat(Uu)});function AF(e,t){const n=jh(t);return n===null?!1:(Uh[e]=n,!0)}function Nh(e){return Uh[e]}const RF=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let by=RF();function PF(e,t){const n=Nh(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function IF(e){return e===404}const MF=(e,t,n)=>{const r=[],i=PF(e,t),o="icons";let s={type:o,provider:e,prefix:t,icons:[]},l=0;return n.forEach((u,d)=>{l+=u.length+1,l>=i&&d>0&&(r.push(s),s={type:o,provider:e,prefix:t,icons:[]},l=u.length),s.icons.push(u)}),r.push(s),r};function DF(e){if(typeof e=="string"){const t=Nh(e);if(t)return t.path}return"/"}const FF=(e,t,n)=>{if(!by){n("abort",424);return}let r=DF(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),l=new URLSearchParams({icons:s});r+=o+".json?"+l.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;by(e+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(IF(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},LF={prepare:MF,send:FF};function $1(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function jF(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(o=>{const s=o.icons,l=s.pending.length;s.pending=s.pending.filter(u=>{if(u.prefix!==i)return!0;const d=u.name;if(e.icons[d])s.loaded.push({provider:r,prefix:i,name:d});else if(e.missing.has(d))s.missing.push({provider:r,prefix:i,name:d});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||$1([e],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let UF=0;function NF(e,t,n){const r=UF++,i=$1.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function zF(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,l=i.name,u=n[o]||(n[o]=Object.create(null)),d=u[s]||(u[s]=Us(o,s));let f;l in d.icons?f=t.loaded:s===""||d.missing.has(l)?f=t.missing:f=t.pending;const p={provider:o,prefix:s,name:l};f.push(p)}),t}function BF(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?xc(i,t,n):i;o&&r.push(o)}),r}const VF={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function HF(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let M=e.resources.slice(0);for(s=[];M.length>1;){const z=Math.floor(Math.random()*M.length);s.push(M[z]),M=M.slice(0,z).concat(M.slice(z+1))}s=s.concat(M)}else s=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let u="pending",d=0,f,p=null,v=[],y=[];typeof r=="function"&&y.push(r);function g(){p&&(clearTimeout(p),p=null)}function m(){u==="pending"&&(u="aborted"),g(),v.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),v=[]}function b(M,z){z&&(y=[]),typeof M=="function"&&y.push(M)}function x(){return{startTime:l,payload:t,status:u,queriesSent:d,queriesPending:v.length,subscribe:b,abort:m}}function S(){u="failed",y.forEach(M=>{M(void 0,f)})}function O(){v.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),v=[]}function T(M,z,Y){const ve=z!=="success";switch(v=v.filter(W=>W!==M),u){case"pending":break;case"failed":if(ve||!e.dataAfterTimeout)return;break;default:return}if(z==="abort"){f=Y,S();return}if(ve){f=Y,v.length||(s.length?A():S());return}if(g(),O(),!e.random){const W=e.resources.indexOf(M.resource);W!==-1&&W!==e.index&&(e.index=W)}u="completed",y.forEach(W=>{W(Y)})}function A(){if(u!=="pending")return;g();const M=s.shift();if(M===void 0){if(v.length){p=setTimeout(()=>{g(),u==="pending"&&(O(),S())},e.timeout);return}S();return}const z={status:"pending",resource:M,callback:(Y,ve)=>{T(z,Y,ve)}};v.push(z),d++,p=setTimeout(A,e.rotate),n(M,t,z.callback)}return setTimeout(A),x}function A1(e){const t={...VF,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,l,u){const d=HF(t,s,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function wy(){}const kf=Object.create(null);function qF(e){if(!kf[e]){const t=Nh(e);if(!t)return;kf[e]={config:t,redundancy:A1(t)}}return kf[e]}function WF(e,t,n){let r,i;if(typeof e=="string"){const o=Mp(e);if(!o)return n(void 0,424),wy;i=o.send;const s=qF(e);s&&(r=s.redundancy)}else{const o=jh(e);if(o){r=A1(o);const s=Mp(e.resources?e.resources[0]:"");s&&(i=s.send)}}return!r||!i?(n(void 0,424),wy):r.query(t,i,n)().abort}function Ey(){}function YF(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,jF(e)}))}function KF(e){const t=[],n=[];return e.forEach(r=>{(r.match(w1)?t:n).push(r)}),{valid:t,invalid:n}}function Ea(e,t,n){function r(){const i=e.pendingIcons;t.forEach(o=>{i&&i.delete(o),e.icons[o]||e.missing.add(o)})}if(n&&typeof n=="object")try{if(!x1(e,n).length){r();return}}catch(i){console.error(i)}r(),YF(e)}function Sy(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function GF(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;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){Sy(e.loadIcons(i,r,n),d=>{Ea(e,i,d)});return}if(o){i.forEach(d=>{Sy(o(d,r,n),f=>{Ea(e,[d],f?{prefix:r,icons:{[d]:f}}:null)})});return}const{valid:s,invalid:l}=KF(i);if(l.length&&Ea(e,l,null),!s.length)return;const u=r.match(w1)?Mp(n):null;if(!u){Ea(e,s,null);return}u.prepare(n,r,s).forEach(d=>{WF(n,d,f=>{Ea(e,d.icons,f)})})}))}const QF=(e,t)=>{const n=zF(BF(e,!0,T1()));if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,Ey)}),()=>{l=!1}}const r=Object.create(null),i=[];let o,s;return n.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===s&&u===o)return;o=u,s=d,i.push(Us(u,d));const f=r[u]||(r[u]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=Us(u,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(f)||(v.add(f),r[u][d].push(f))}),i.forEach(l=>{const u=r[l.provider][l.prefix];u.length&&GF(l,u)}),t?NF(t,n,i):Ey};function XF(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in k1?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const JF=/[\s,]+/;function ZF(e,t){t.split(JF).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function eL(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 o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function tL(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 nL(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function rL(e){return"data:image/svg+xml,"+nL(e)}function iL(e){return'url("'+rL(e)+'")'}const Cy={...O1,inline:!1},oL={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},sL={display:"inline-block"},Dp={backgroundColor:"currentColor"},R1={backgroundColor:"transparent"},xy={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ty={webkitMask:Dp,mask:Dp,background:R1};for(const e in Ty){const t=Ty[e];for(const n in xy)t[e+n]=xy[n]}const Nu={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Nu[e+"-flip"]=t,Nu[e.slice(0,1)+"-flip"]=t,Nu[e+"Flip"]=t});function ky(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Oy=(e,t)=>{const n=XF(Cy,t),r={...oL},i=t.mode||"svg",o={},s=t.style,l=typeof s=="object"&&!(s instanceof Array)?s:{};for(let m in t){const b=t[m];if(b!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[m]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&ZF(n,b);break;case"color":o.color=b;break;case"rotate":typeof b=="string"?n[m]=eL(b):typeof b=="number"&&(n[m]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete r["aria-hidden"];break;default:{const x=Nu[m];x?(b===!0||b==="true"||b===1)&&(n[x]=!0):Cy[m]===void 0&&(r[m]=b)}}}const u=xF(e,n),d=u.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),i==="svg")return r.style={...o,...l},Object.assign(r,d),r.innerHTML=OF(u.body),Ia("svg",r);const{body:f,width:p,height:v}=e,y=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=tL(f,{...d,width:p+"",height:v+""});return r.style={...o,"--svg":iL(g),width:ky(d.width),height:ky(d.height),...sL,...y?Dp:R1,...l},Ia("span",r)};T1(!0);$F("",LF);if(typeof document<"u"&&typeof window<"u"){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"||!_F(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;AF(n,i)||console.error(r)}catch{console.error(r)}}}}const aL={...Tc,body:""},lL=ze((e,{emit:t})=>{const n=re(null);function r(){n.value&&(n.value.abort?.(),n.value=null)}const i=re(!!e.ssr),o=re(""),s=_n(null);function l(){const d=e.icon;if(typeof d=="object"&&d!==null&&typeof d.body=="string")return o.value="",{data:d};let f;if(typeof d!="string"||(f=xc(d,!1,!0))===null)return null;let p=vF(f);if(!p){const g=n.value;return(!g||g.name!==d)&&(p===null?n.value={name:d}:n.value={name:d,abort:QF([f],u)}),null}r(),o.value!==d&&(o.value=d,gt(()=>{t("load",d)}));const v=e.customise;if(v){p=Object.assign({},p);const g=v(p.body,f.name,f.prefix,f.provider);typeof g=="string"&&(p.body=g)}const y=["iconify"];return f.prefix!==""&&y.push("iconify--"+f.prefix),f.provider!==""&&y.push("iconify--"+f.provider),{data:p,classes:y}}function u(){const d=l();d?d.data!==s.value?.data&&(s.value=d):s.value=null}return i.value?u():xt(()=>{i.value=!0,u()}),He(()=>e.icon,u),xn(r),()=>{const d=s.value;if(!d)return Oy(aL,e);let f=e;return d.classes&&(f={...e,class:d.classes.join(" ")}),Oy({...Tc,...d.data},f)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});var pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zu={exports:{}},uL=zu.exports,$y;function cL(){return $y||($y=1,(function(e,t){(function(){var n,r="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",u="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",v=1,y=2,g=4,m=1,b=2,x=1,S=2,O=4,T=8,A=16,M=32,z=64,Y=128,ve=256,W=512,X=30,K="...",L=800,D=16,ne=1,le=2,je=3,J=1/0,j=9007199254740991,de=17976931348623157e292,U=NaN,ee=4294967295,Q=ee-1,B=ee>>>1,oe=[["ary",Y],["bind",x],["bindKey",S],["curry",T],["curryRight",A],["flip",W],["partial",M],["partialRight",z],["rearg",ve]],V="[object Arguments]",P="[object Array]",F="[object AsyncFunction]",G="[object Boolean]",N="[object Date]",ie="[object DOMException]",ge="[object Error]",fe="[object Function]",pe="[object GeneratorFunction]",Ce="[object Map]",$e="[object Number]",Ke="[object Null]",Ne="[object Object]",tt="[object Promise]",Ge="[object Proxy]",Ze="[object RegExp]",Pt="[object Set]",St="[object String]",Nt="[object Symbol]",It="[object Undefined]",qt="[object WeakMap]",Gt="[object WeakSet]",Wt="[object ArrayBuffer]",nn="[object DataView]",Dn="[object Float32Array]",_e="[object Float64Array]",ue="[object Int8Array]",ye="[object Int16Array]",Fe="[object Int32Array]",qe="[object Uint8Array]",xe="[object Uint8ClampedArray]",et="[object Uint16Array]",be="[object Uint32Array]",ke=/\b__p \+= '';/g,Ie=/\b(__p \+=) '' \+/g,Oe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ue=/&(?:amp|lt|gt|quot|#39);/g,pr=/[&<>"']/g,Fn=RegExp(Ue.source),qn=RegExp(pr.source),kn=/<%-([\s\S]+?)%>/g,dn=/<%([\s\S]+?)%>/g,ko=/<%=([\s\S]+?)%>/g,cd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bl=/^\w*$/,is=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yi=/[\\^$.*+?()[\]{}|]/g,os=RegExp(Yi.source),Ki=/^\s+/,dd=/\s/,wl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,P2=/\{\n\/\* \[wrapped with (.+)\] \*/,I2=/,? & /,M2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uv=/[()=,{}\[\]\/\s]/,D2=/\\(\\)?/g,F2=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cv=/\w*$/,L2=/^[-+]0x[0-9a-f]+$/i,j2=/^0b[01]+$/i,U2=/^\[object .+?Constructor\]$/,N2=/^0o[0-7]+$/i,z2=/^(?:0|[1-9]\d*)$/,B2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,El=/($^)/,V2=/['\n\r\u2028\u2029\\]/g,Sl="\\ud800-\\udfff",H2="\\u0300-\\u036f",q2="\\ufe20-\\ufe2f",W2="\\u20d0-\\u20ff",dv=H2+q2+W2,fv="\\u2700-\\u27bf",pv="a-z\\xdf-\\xf6\\xf8-\\xff",Y2="\\xac\\xb1\\xd7\\xf7",K2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",G2="\\u2000-\\u206f",Q2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hv="A-Z\\xc0-\\xd6\\xd8-\\xde",mv="\\ufe0e\\ufe0f",vv=Y2+K2+G2+Q2,fd="['’]",X2="["+Sl+"]",gv="["+vv+"]",Cl="["+dv+"]",_v="\\d+",J2="["+fv+"]",yv="["+pv+"]",bv="[^"+Sl+vv+_v+fv+pv+hv+"]",pd="\\ud83c[\\udffb-\\udfff]",Z2="(?:"+Cl+"|"+pd+")",wv="[^"+Sl+"]",hd="(?:\\ud83c[\\udde6-\\uddff]){2}",md="[\\ud800-\\udbff][\\udc00-\\udfff]",ss="["+hv+"]",Ev="\\u200d",Sv="(?:"+yv+"|"+bv+")",ex="(?:"+ss+"|"+bv+")",Cv="(?:"+fd+"(?:d|ll|m|re|s|t|ve))?",xv="(?:"+fd+"(?:D|LL|M|RE|S|T|VE))?",Tv=Z2+"?",kv="["+mv+"]?",tx="(?:"+Ev+"(?:"+[wv,hd,md].join("|")+")"+kv+Tv+")*",nx="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ov=kv+Tv+tx,ix="(?:"+[J2,hd,md].join("|")+")"+Ov,ox="(?:"+[wv+Cl+"?",Cl,hd,md,X2].join("|")+")",sx=RegExp(fd,"g"),ax=RegExp(Cl,"g"),vd=RegExp(pd+"(?="+pd+")|"+ox+Ov,"g"),lx=RegExp([ss+"?"+yv+"+"+Cv+"(?="+[gv,ss,"$"].join("|")+")",ex+"+"+xv+"(?="+[gv,ss+Sv,"$"].join("|")+")",ss+"?"+Sv+"+"+Cv,ss+"+"+xv,rx,nx,_v,ix].join("|"),"g"),ux=RegExp("["+Ev+Sl+dv+mv+"]"),cx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dx=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],fx=-1,Kt={};Kt[Dn]=Kt[_e]=Kt[ue]=Kt[ye]=Kt[Fe]=Kt[qe]=Kt[xe]=Kt[et]=Kt[be]=!0,Kt[V]=Kt[P]=Kt[Wt]=Kt[G]=Kt[nn]=Kt[N]=Kt[ge]=Kt[fe]=Kt[Ce]=Kt[$e]=Kt[Ne]=Kt[Ze]=Kt[Pt]=Kt[St]=Kt[qt]=!1;var Yt={};Yt[V]=Yt[P]=Yt[Wt]=Yt[nn]=Yt[G]=Yt[N]=Yt[Dn]=Yt[_e]=Yt[ue]=Yt[ye]=Yt[Fe]=Yt[Ce]=Yt[$e]=Yt[Ne]=Yt[Ze]=Yt[Pt]=Yt[St]=Yt[Nt]=Yt[qe]=Yt[xe]=Yt[et]=Yt[be]=!0,Yt[ge]=Yt[fe]=Yt[qt]=!1;var px={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},hx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mx={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},vx={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},gx=parseFloat,_x=parseInt,$v=typeof pu=="object"&&pu&&pu.Object===Object&&pu,yx=typeof self=="object"&&self&&self.Object===Object&&self,bn=$v||yx||Function("return this")(),gd=t&&!t.nodeType&&t,Oo=gd&&!0&&e&&!e.nodeType&&e,Av=Oo&&Oo.exports===gd,_d=Av&&$v.process,Tr=(function(){try{var ae=Oo&&Oo.require&&Oo.require("util").types;return ae||_d&&_d.binding&&_d.binding("util")}catch{}})(),Rv=Tr&&Tr.isArrayBuffer,Pv=Tr&&Tr.isDate,Iv=Tr&&Tr.isMap,Mv=Tr&&Tr.isRegExp,Dv=Tr&&Tr.isSet,Fv=Tr&&Tr.isTypedArray;function hr(ae,Te,we){switch(we.length){case 0:return ae.call(Te);case 1:return ae.call(Te,we[0]);case 2:return ae.call(Te,we[0],we[1]);case 3:return ae.call(Te,we[0],we[1],we[2])}return ae.apply(Te,we)}function bx(ae,Te,we,Ye){for(var pt=-1,Lt=ae==null?0:ae.length;++pt<Lt;){var fn=ae[pt];Te(Ye,fn,we(fn),ae)}return Ye}function mr(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye&&Te(ae[we],we,ae)!==!1;);return ae}function wx(ae,Te){for(var we=ae==null?0:ae.length;we--&&Te(ae[we],we,ae)!==!1;);return ae}function Lv(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye;)if(!Te(ae[we],we,ae))return!1;return!0}function Gi(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length,pt=0,Lt=[];++we<Ye;){var fn=ae[we];Te(fn,we,ae)&&(Lt[pt++]=fn)}return Lt}function xl(ae,Te){var we=ae==null?0:ae.length;return!!we&&as(ae,Te,0)>-1}function yd(ae,Te,we){for(var Ye=-1,pt=ae==null?0:ae.length;++Ye<pt;)if(we(Te,ae[Ye]))return!0;return!1}function Qt(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length,pt=Array(Ye);++we<Ye;)pt[we]=Te(ae[we],we,ae);return pt}function Qi(ae,Te){for(var we=-1,Ye=Te.length,pt=ae.length;++we<Ye;)ae[pt+we]=Te[we];return ae}function bd(ae,Te,we,Ye){var pt=-1,Lt=ae==null?0:ae.length;for(Ye&&Lt&&(we=ae[++pt]);++pt<Lt;)we=Te(we,ae[pt],pt,ae);return we}function Ex(ae,Te,we,Ye){var pt=ae==null?0:ae.length;for(Ye&&pt&&(we=ae[--pt]);pt--;)we=Te(we,ae[pt],pt,ae);return we}function wd(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye;)if(Te(ae[we],we,ae))return!0;return!1}var Sx=Ed("length");function Cx(ae){return ae.split("")}function xx(ae){return ae.match(M2)||[]}function jv(ae,Te,we){var Ye;return we(ae,function(pt,Lt,fn){if(Te(pt,Lt,fn))return Ye=Lt,!1}),Ye}function Tl(ae,Te,we,Ye){for(var pt=ae.length,Lt=we+(Ye?1:-1);Ye?Lt--:++Lt<pt;)if(Te(ae[Lt],Lt,ae))return Lt;return-1}function as(ae,Te,we){return Te===Te?Lx(ae,Te,we):Tl(ae,Uv,we)}function Tx(ae,Te,we,Ye){for(var pt=we-1,Lt=ae.length;++pt<Lt;)if(Ye(ae[pt],Te))return pt;return-1}function Uv(ae){return ae!==ae}function Nv(ae,Te){var we=ae==null?0:ae.length;return we?Cd(ae,Te)/we:U}function Ed(ae){return function(Te){return Te==null?n:Te[ae]}}function Sd(ae){return function(Te){return ae==null?n:ae[Te]}}function zv(ae,Te,we,Ye,pt){return pt(ae,function(Lt,fn,Bt){we=Ye?(Ye=!1,Lt):Te(we,Lt,fn,Bt)}),we}function kx(ae,Te){var we=ae.length;for(ae.sort(Te);we--;)ae[we]=ae[we].value;return ae}function Cd(ae,Te){for(var we,Ye=-1,pt=ae.length;++Ye<pt;){var Lt=Te(ae[Ye]);Lt!==n&&(we=we===n?Lt:we+Lt)}return we}function xd(ae,Te){for(var we=-1,Ye=Array(ae);++we<ae;)Ye[we]=Te(we);return Ye}function Ox(ae,Te){return Qt(Te,function(we){return[we,ae[we]]})}function Bv(ae){return ae&&ae.slice(0,Wv(ae)+1).replace(Ki,"")}function vr(ae){return function(Te){return ae(Te)}}function Td(ae,Te){return Qt(Te,function(we){return ae[we]})}function sa(ae,Te){return ae.has(Te)}function Vv(ae,Te){for(var we=-1,Ye=ae.length;++we<Ye&&as(Te,ae[we],0)>-1;);return we}function Hv(ae,Te){for(var we=ae.length;we--&&as(Te,ae[we],0)>-1;);return we}function $x(ae,Te){for(var we=ae.length,Ye=0;we--;)ae[we]===Te&&++Ye;return Ye}var Ax=Sd(px),Rx=Sd(hx);function Px(ae){return"\\"+vx[ae]}function Ix(ae,Te){return ae==null?n:ae[Te]}function ls(ae){return ux.test(ae)}function Mx(ae){return cx.test(ae)}function Dx(ae){for(var Te,we=[];!(Te=ae.next()).done;)we.push(Te.value);return we}function kd(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye,pt){we[++Te]=[pt,Ye]}),we}function qv(ae,Te){return function(we){return ae(Te(we))}}function Xi(ae,Te){for(var we=-1,Ye=ae.length,pt=0,Lt=[];++we<Ye;){var fn=ae[we];(fn===Te||fn===p)&&(ae[we]=p,Lt[pt++]=we)}return Lt}function kl(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye){we[++Te]=Ye}),we}function Fx(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye){we[++Te]=[Ye,Ye]}),we}function Lx(ae,Te,we){for(var Ye=we-1,pt=ae.length;++Ye<pt;)if(ae[Ye]===Te)return Ye;return-1}function jx(ae,Te,we){for(var Ye=we+1;Ye--;)if(ae[Ye]===Te)return Ye;return Ye}function us(ae){return ls(ae)?Nx(ae):Sx(ae)}function qr(ae){return ls(ae)?zx(ae):Cx(ae)}function Wv(ae){for(var Te=ae.length;Te--&&dd.test(ae.charAt(Te)););return Te}var Ux=Sd(mx);function Nx(ae){for(var Te=vd.lastIndex=0;vd.test(ae);)++Te;return Te}function zx(ae){return ae.match(vd)||[]}function Bx(ae){return ae.match(lx)||[]}var Vx=(function ae(Te){Te=Te==null?bn:cs.defaults(bn.Object(),Te,cs.pick(bn,dx));var we=Te.Array,Ye=Te.Date,pt=Te.Error,Lt=Te.Function,fn=Te.Math,Bt=Te.Object,Od=Te.RegExp,Hx=Te.String,kr=Te.TypeError,Ol=we.prototype,qx=Lt.prototype,ds=Bt.prototype,$l=Te["__core-js_shared__"],Al=qx.toString,jt=ds.hasOwnProperty,Wx=0,Yv=(function(){var a=/[^.]+$/.exec($l&&$l.keys&&$l.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})(),Rl=ds.toString,Yx=Al.call(Bt),Kx=bn._,Gx=Od("^"+Al.call(jt).replace(Yi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pl=Av?Te.Buffer:n,Ji=Te.Symbol,Il=Te.Uint8Array,Kv=Pl?Pl.allocUnsafe:n,Ml=qv(Bt.getPrototypeOf,Bt),Gv=Bt.create,Qv=ds.propertyIsEnumerable,Dl=Ol.splice,Xv=Ji?Ji.isConcatSpreadable:n,aa=Ji?Ji.iterator:n,$o=Ji?Ji.toStringTag:n,Fl=(function(){try{var a=Mo(Bt,"defineProperty");return a({},"",{}),a}catch{}})(),Qx=Te.clearTimeout!==bn.clearTimeout&&Te.clearTimeout,Xx=Ye&&Ye.now!==bn.Date.now&&Ye.now,Jx=Te.setTimeout!==bn.setTimeout&&Te.setTimeout,Ll=fn.ceil,jl=fn.floor,$d=Bt.getOwnPropertySymbols,Zx=Pl?Pl.isBuffer:n,Jv=Te.isFinite,eT=Ol.join,tT=qv(Bt.keys,Bt),pn=fn.max,On=fn.min,nT=Ye.now,rT=Te.parseInt,Zv=fn.random,iT=Ol.reverse,Ad=Mo(Te,"DataView"),la=Mo(Te,"Map"),Rd=Mo(Te,"Promise"),fs=Mo(Te,"Set"),ua=Mo(Te,"WeakMap"),ca=Mo(Bt,"create"),Ul=ua&&new ua,ps={},oT=Do(Ad),sT=Do(la),aT=Do(Rd),lT=Do(fs),uT=Do(ua),Nl=Ji?Ji.prototype:n,da=Nl?Nl.valueOf:n,eg=Nl?Nl.toString:n;function $(a){if(tn(a)&&!vt(a)&&!(a instanceof $t)){if(a instanceof Or)return a;if(jt.call(a,"__wrapped__"))return t_(a)}return new Or(a)}var hs=(function(){function a(){}return function(c){if(!Xt(c))return{};if(Gv)return Gv(c);a.prototype=c;var h=new a;return a.prototype=n,h}})();function zl(){}function Or(a,c){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=n}$.templateSettings={escape:kn,evaluate:dn,interpolate:ko,variable:"",imports:{_:$}},$.prototype=zl.prototype,$.prototype.constructor=$,Or.prototype=hs(zl.prototype),Or.prototype.constructor=Or;function $t(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function cT(){var a=new $t(this.__wrapped__);return a.__actions__=Wn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Wn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Wn(this.__views__),a}function dT(){if(this.__filtered__){var a=new $t(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function fT(){var a=this.__wrapped__.value(),c=this.__dir__,h=vt(a),E=c<0,k=h?a.length:0,I=Ck(0,k,this.__views__),H=I.start,te=I.end,ce=te-H,Ae=E?te:H-1,Re=this.__iteratees__,De=Re.length,Ve=0,Je=On(ce,this.__takeCount__);if(!h||!E&&k==ce&&Je==ce)return Cg(a,this.__actions__);var ut=[];e:for(;ce--&&Ve<Je;){Ae+=c;for(var bt=-1,it=a[Ae];++bt<De;){var Tt=Re[bt],At=Tt.iteratee,yr=Tt.type,Un=At(it);if(yr==le)it=Un;else if(!Un){if(yr==ne)continue e;break e}}ut[Ve++]=it}return ut}$t.prototype=hs(zl.prototype),$t.prototype.constructor=$t;function Ao(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var E=a[c];this.set(E[0],E[1])}}function pT(){this.__data__=ca?ca(null):{},this.size=0}function hT(a){var c=this.has(a)&&delete this.__data__[a];return this.size-=c?1:0,c}function mT(a){var c=this.__data__;if(ca){var h=c[a];return h===d?n:h}return jt.call(c,a)?c[a]:n}function vT(a){var c=this.__data__;return ca?c[a]!==n:jt.call(c,a)}function gT(a,c){var h=this.__data__;return this.size+=this.has(a)?0:1,h[a]=ca&&c===n?d:c,this}Ao.prototype.clear=pT,Ao.prototype.delete=hT,Ao.prototype.get=mT,Ao.prototype.has=vT,Ao.prototype.set=gT;function Ti(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var E=a[c];this.set(E[0],E[1])}}function _T(){this.__data__=[],this.size=0}function yT(a){var c=this.__data__,h=Bl(c,a);if(h<0)return!1;var E=c.length-1;return h==E?c.pop():Dl.call(c,h,1),--this.size,!0}function bT(a){var c=this.__data__,h=Bl(c,a);return h<0?n:c[h][1]}function wT(a){return Bl(this.__data__,a)>-1}function ET(a,c){var h=this.__data__,E=Bl(h,a);return E<0?(++this.size,h.push([a,c])):h[E][1]=c,this}Ti.prototype.clear=_T,Ti.prototype.delete=yT,Ti.prototype.get=bT,Ti.prototype.has=wT,Ti.prototype.set=ET;function ki(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var E=a[c];this.set(E[0],E[1])}}function ST(){this.size=0,this.__data__={hash:new Ao,map:new(la||Ti),string:new Ao}}function CT(a){var c=eu(this,a).delete(a);return this.size-=c?1:0,c}function xT(a){return eu(this,a).get(a)}function TT(a){return eu(this,a).has(a)}function kT(a,c){var h=eu(this,a),E=h.size;return h.set(a,c),this.size+=h.size==E?0:1,this}ki.prototype.clear=ST,ki.prototype.delete=CT,ki.prototype.get=xT,ki.prototype.has=TT,ki.prototype.set=kT;function Ro(a){var c=-1,h=a==null?0:a.length;for(this.__data__=new ki;++c<h;)this.add(a[c])}function OT(a){return this.__data__.set(a,d),this}function $T(a){return this.__data__.has(a)}Ro.prototype.add=Ro.prototype.push=OT,Ro.prototype.has=$T;function Wr(a){var c=this.__data__=new Ti(a);this.size=c.size}function AT(){this.__data__=new Ti,this.size=0}function RT(a){var c=this.__data__,h=c.delete(a);return this.size=c.size,h}function PT(a){return this.__data__.get(a)}function IT(a){return this.__data__.has(a)}function MT(a,c){var h=this.__data__;if(h instanceof Ti){var E=h.__data__;if(!la||E.length<i-1)return E.push([a,c]),this.size=++h.size,this;h=this.__data__=new ki(E)}return h.set(a,c),this.size=h.size,this}Wr.prototype.clear=AT,Wr.prototype.delete=RT,Wr.prototype.get=PT,Wr.prototype.has=IT,Wr.prototype.set=MT;function tg(a,c){var h=vt(a),E=!h&&Fo(a),k=!h&&!E&&ro(a),I=!h&&!E&&!k&&_s(a),H=h||E||k||I,te=H?xd(a.length,Hx):[],ce=te.length;for(var Ae in a)(c||jt.call(a,Ae))&&!(H&&(Ae=="length"||k&&(Ae=="offset"||Ae=="parent")||I&&(Ae=="buffer"||Ae=="byteLength"||Ae=="byteOffset")||Ai(Ae,ce)))&&te.push(Ae);return te}function ng(a){var c=a.length;return c?a[Bd(0,c-1)]:n}function DT(a,c){return tu(Wn(a),Po(c,0,a.length))}function FT(a){return tu(Wn(a))}function Pd(a,c,h){(h!==n&&!Kr(a[c],h)||h===n&&!(c in a))&&ci(a,c,h)}function fa(a,c,h){var E=a[c];(!(jt.call(a,c)&&Kr(E,h))||h===n&&!(c in a))&&ci(a,c,h)}function Bl(a,c){for(var h=a.length;h--;)if(Kr(a[h][0],c))return h;return-1}function LT(a,c,h,E){return Zi(a,function(k,I,H){c(E,k,h(k),H)}),E}function rg(a,c){return a&&fi(c,vn(c),a)}function jT(a,c){return a&&fi(c,Kn(c),a)}function ci(a,c,h){c=="__proto__"&&Fl?Fl(a,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):a[c]=h}function Id(a,c){for(var h=-1,E=c.length,k=we(E),I=a==null;++h<E;)k[h]=I?n:mf(a,c[h]);return k}function Po(a,c,h){return a===a&&(h!==n&&(a=a<=h?a:h),c!==n&&(a=a>=c?a:c)),a}function $r(a,c,h,E,k,I){var H,te=c&v,ce=c&y,Ae=c&g;if(h&&(H=k?h(a,E,k,I):h(a)),H!==n)return H;if(!Xt(a))return a;var Re=vt(a);if(Re){if(H=Tk(a),!te)return Wn(a,H)}else{var De=$n(a),Ve=De==fe||De==pe;if(ro(a))return kg(a,te);if(De==Ne||De==V||Ve&&!k){if(H=ce||Ve?{}:Wg(a),!te)return ce?mk(a,jT(H,a)):hk(a,rg(H,a))}else{if(!Yt[De])return k?a:{};H=kk(a,De,te)}}I||(I=new Wr);var Je=I.get(a);if(Je)return Je;I.set(a,H),w_(a)?a.forEach(function(it){H.add($r(it,c,h,it,a,I))}):y_(a)&&a.forEach(function(it,Tt){H.set(Tt,$r(it,c,h,Tt,a,I))});var ut=Ae?ce?Zd:Jd:ce?Kn:vn,bt=Re?n:ut(a);return mr(bt||a,function(it,Tt){bt&&(Tt=it,it=a[Tt]),fa(H,Tt,$r(it,c,h,Tt,a,I))}),H}function UT(a){var c=vn(a);return function(h){return ig(h,a,c)}}function ig(a,c,h){var E=h.length;if(a==null)return!E;for(a=Bt(a);E--;){var k=h[E],I=c[k],H=a[k];if(H===n&&!(k in a)||!I(H))return!1}return!0}function og(a,c,h){if(typeof a!="function")throw new kr(s);return ya(function(){a.apply(n,h)},c)}function pa(a,c,h,E){var k=-1,I=xl,H=!0,te=a.length,ce=[],Ae=c.length;if(!te)return ce;h&&(c=Qt(c,vr(h))),E?(I=yd,H=!1):c.length>=i&&(I=sa,H=!1,c=new Ro(c));e:for(;++k<te;){var Re=a[k],De=h==null?Re:h(Re);if(Re=E||Re!==0?Re:0,H&&De===De){for(var Ve=Ae;Ve--;)if(c[Ve]===De)continue e;ce.push(Re)}else I(c,De,E)||ce.push(Re)}return ce}var Zi=Pg(di),sg=Pg(Dd,!0);function NT(a,c){var h=!0;return Zi(a,function(E,k,I){return h=!!c(E,k,I),h}),h}function Vl(a,c,h){for(var E=-1,k=a.length;++E<k;){var I=a[E],H=c(I);if(H!=null&&(te===n?H===H&&!_r(H):h(H,te)))var te=H,ce=I}return ce}function zT(a,c,h,E){var k=a.length;for(h=yt(h),h<0&&(h=-h>k?0:k+h),E=E===n||E>k?k:yt(E),E<0&&(E+=k),E=h>E?0:S_(E);h<E;)a[h++]=c;return a}function ag(a,c){var h=[];return Zi(a,function(E,k,I){c(E,k,I)&&h.push(E)}),h}function wn(a,c,h,E,k){var I=-1,H=a.length;for(h||(h=$k),k||(k=[]);++I<H;){var te=a[I];c>0&&h(te)?c>1?wn(te,c-1,h,E,k):Qi(k,te):E||(k[k.length]=te)}return k}var Md=Ig(),lg=Ig(!0);function di(a,c){return a&&Md(a,c,vn)}function Dd(a,c){return a&&lg(a,c,vn)}function Hl(a,c){return Gi(c,function(h){return Ri(a[h])})}function Io(a,c){c=to(c,a);for(var h=0,E=c.length;a!=null&&h<E;)a=a[Yr(c[h++])];return h&&h==E?a:n}function ug(a,c,h){var E=c(a);return vt(a)?E:Qi(E,h(a))}function Ln(a){return a==null?a===n?It:Ke:$o&&$o in Bt(a)?Sk(a):Fk(a)}function Fd(a,c){return a>c}function BT(a,c){return a!=null&&jt.call(a,c)}function VT(a,c){return a!=null&&c in Bt(a)}function HT(a,c,h){return a>=On(c,h)&&a<pn(c,h)}function Ld(a,c,h){for(var E=h?yd:xl,k=a[0].length,I=a.length,H=I,te=we(I),ce=1/0,Ae=[];H--;){var Re=a[H];H&&c&&(Re=Qt(Re,vr(c))),ce=On(Re.length,ce),te[H]=!h&&(c||k>=120&&Re.length>=120)?new Ro(H&&Re):n}Re=a[0];var De=-1,Ve=te[0];e:for(;++De<k&&Ae.length<ce;){var Je=Re[De],ut=c?c(Je):Je;if(Je=h||Je!==0?Je:0,!(Ve?sa(Ve,ut):E(Ae,ut,h))){for(H=I;--H;){var bt=te[H];if(!(bt?sa(bt,ut):E(a[H],ut,h)))continue e}Ve&&Ve.push(ut),Ae.push(Je)}}return Ae}function qT(a,c,h,E){return di(a,function(k,I,H){c(E,h(k),I,H)}),E}function ha(a,c,h){c=to(c,a),a=Qg(a,c);var E=a==null?a:a[Yr(Rr(c))];return E==null?n:hr(E,a,h)}function cg(a){return tn(a)&&Ln(a)==V}function WT(a){return tn(a)&&Ln(a)==Wt}function YT(a){return tn(a)&&Ln(a)==N}function ma(a,c,h,E,k){return a===c?!0:a==null||c==null||!tn(a)&&!tn(c)?a!==a&&c!==c:KT(a,c,h,E,ma,k)}function KT(a,c,h,E,k,I){var H=vt(a),te=vt(c),ce=H?P:$n(a),Ae=te?P:$n(c);ce=ce==V?Ne:ce,Ae=Ae==V?Ne:Ae;var Re=ce==Ne,De=Ae==Ne,Ve=ce==Ae;if(Ve&&ro(a)){if(!ro(c))return!1;H=!0,Re=!1}if(Ve&&!Re)return I||(I=new Wr),H||_s(a)?Vg(a,c,h,E,k,I):wk(a,c,ce,h,E,k,I);if(!(h&m)){var Je=Re&&jt.call(a,"__wrapped__"),ut=De&&jt.call(c,"__wrapped__");if(Je||ut){var bt=Je?a.value():a,it=ut?c.value():c;return I||(I=new Wr),k(bt,it,h,E,I)}}return Ve?(I||(I=new Wr),Ek(a,c,h,E,k,I)):!1}function GT(a){return tn(a)&&$n(a)==Ce}function jd(a,c,h,E){var k=h.length,I=k,H=!E;if(a==null)return!I;for(a=Bt(a);k--;){var te=h[k];if(H&&te[2]?te[1]!==a[te[0]]:!(te[0]in a))return!1}for(;++k<I;){te=h[k];var ce=te[0],Ae=a[ce],Re=te[1];if(H&&te[2]){if(Ae===n&&!(ce in a))return!1}else{var De=new Wr;if(E)var Ve=E(Ae,Re,ce,a,c,De);if(!(Ve===n?ma(Re,Ae,m|b,E,De):Ve))return!1}}return!0}function dg(a){if(!Xt(a)||Rk(a))return!1;var c=Ri(a)?Gx:U2;return c.test(Do(a))}function QT(a){return tn(a)&&Ln(a)==Ze}function XT(a){return tn(a)&&$n(a)==Pt}function JT(a){return tn(a)&&au(a.length)&&!!Kt[Ln(a)]}function fg(a){return typeof a=="function"?a:a==null?Gn:typeof a=="object"?vt(a)?mg(a[0],a[1]):hg(a):D_(a)}function Ud(a){if(!_a(a))return tT(a);var c=[];for(var h in Bt(a))jt.call(a,h)&&h!="constructor"&&c.push(h);return c}function ZT(a){if(!Xt(a))return Dk(a);var c=_a(a),h=[];for(var E in a)E=="constructor"&&(c||!jt.call(a,E))||h.push(E);return h}function Nd(a,c){return a<c}function pg(a,c){var h=-1,E=Yn(a)?we(a.length):[];return Zi(a,function(k,I,H){E[++h]=c(k,I,H)}),E}function hg(a){var c=tf(a);return c.length==1&&c[0][2]?Kg(c[0][0],c[0][1]):function(h){return h===a||jd(h,a,c)}}function mg(a,c){return rf(a)&&Yg(c)?Kg(Yr(a),c):function(h){var E=mf(h,a);return E===n&&E===c?vf(h,a):ma(c,E,m|b)}}function ql(a,c,h,E,k){a!==c&&Md(c,function(I,H){if(k||(k=new Wr),Xt(I))ek(a,c,H,h,ql,E,k);else{var te=E?E(sf(a,H),I,H+"",a,c,k):n;te===n&&(te=I),Pd(a,H,te)}},Kn)}function ek(a,c,h,E,k,I,H){var te=sf(a,h),ce=sf(c,h),Ae=H.get(ce);if(Ae){Pd(a,h,Ae);return}var Re=I?I(te,ce,h+"",a,c,H):n,De=Re===n;if(De){var Ve=vt(ce),Je=!Ve&&ro(ce),ut=!Ve&&!Je&&_s(ce);Re=ce,Ve||Je||ut?vt(te)?Re=te:rn(te)?Re=Wn(te):Je?(De=!1,Re=kg(ce,!0)):ut?(De=!1,Re=Og(ce,!0)):Re=[]:ba(ce)||Fo(ce)?(Re=te,Fo(te)?Re=C_(te):(!Xt(te)||Ri(te))&&(Re=Wg(ce))):De=!1}De&&(H.set(ce,Re),k(Re,ce,E,I,H),H.delete(ce)),Pd(a,h,Re)}function vg(a,c){var h=a.length;if(h)return c+=c<0?h:0,Ai(c,h)?a[c]:n}function gg(a,c,h){c.length?c=Qt(c,function(I){return vt(I)?function(H){return Io(H,I.length===1?I[0]:I)}:I}):c=[Gn];var E=-1;c=Qt(c,vr(ot()));var k=pg(a,function(I,H,te){var ce=Qt(c,function(Ae){return Ae(I)});return{criteria:ce,index:++E,value:I}});return kx(k,function(I,H){return pk(I,H,h)})}function tk(a,c){return _g(a,c,function(h,E){return vf(a,E)})}function _g(a,c,h){for(var E=-1,k=c.length,I={};++E<k;){var H=c[E],te=Io(a,H);h(te,H)&&va(I,to(H,a),te)}return I}function nk(a){return function(c){return Io(c,a)}}function zd(a,c,h,E){var k=E?Tx:as,I=-1,H=c.length,te=a;for(a===c&&(c=Wn(c)),h&&(te=Qt(a,vr(h)));++I<H;)for(var ce=0,Ae=c[I],Re=h?h(Ae):Ae;(ce=k(te,Re,ce,E))>-1;)te!==a&&Dl.call(te,ce,1),Dl.call(a,ce,1);return a}function yg(a,c){for(var h=a?c.length:0,E=h-1;h--;){var k=c[h];if(h==E||k!==I){var I=k;Ai(k)?Dl.call(a,k,1):qd(a,k)}}return a}function Bd(a,c){return a+jl(Zv()*(c-a+1))}function rk(a,c,h,E){for(var k=-1,I=pn(Ll((c-a)/(h||1)),0),H=we(I);I--;)H[E?I:++k]=a,a+=h;return H}function Vd(a,c){var h="";if(!a||c<1||c>j)return h;do c%2&&(h+=a),c=jl(c/2),c&&(a+=a);while(c);return h}function wt(a,c){return af(Gg(a,c,Gn),a+"")}function ik(a){return ng(ys(a))}function ok(a,c){var h=ys(a);return tu(h,Po(c,0,h.length))}function va(a,c,h,E){if(!Xt(a))return a;c=to(c,a);for(var k=-1,I=c.length,H=I-1,te=a;te!=null&&++k<I;){var ce=Yr(c[k]),Ae=h;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return a;if(k!=H){var Re=te[ce];Ae=E?E(Re,ce,te):n,Ae===n&&(Ae=Xt(Re)?Re:Ai(c[k+1])?[]:{})}fa(te,ce,Ae),te=te[ce]}return a}var bg=Ul?function(a,c){return Ul.set(a,c),a}:Gn,sk=Fl?function(a,c){return Fl(a,"toString",{configurable:!0,enumerable:!1,value:_f(c),writable:!0})}:Gn;function ak(a){return tu(ys(a))}function Ar(a,c,h){var E=-1,k=a.length;c<0&&(c=-c>k?0:k+c),h=h>k?k:h,h<0&&(h+=k),k=c>h?0:h-c>>>0,c>>>=0;for(var I=we(k);++E<k;)I[E]=a[E+c];return I}function lk(a,c){var h;return Zi(a,function(E,k,I){return h=c(E,k,I),!h}),!!h}function Wl(a,c,h){var E=0,k=a==null?E:a.length;if(typeof c=="number"&&c===c&&k<=B){for(;E<k;){var I=E+k>>>1,H=a[I];H!==null&&!_r(H)&&(h?H<=c:H<c)?E=I+1:k=I}return k}return Hd(a,c,Gn,h)}function Hd(a,c,h,E){var k=0,I=a==null?0:a.length;if(I===0)return 0;c=h(c);for(var H=c!==c,te=c===null,ce=_r(c),Ae=c===n;k<I;){var Re=jl((k+I)/2),De=h(a[Re]),Ve=De!==n,Je=De===null,ut=De===De,bt=_r(De);if(H)var it=E||ut;else Ae?it=ut&&(E||Ve):te?it=ut&&Ve&&(E||!Je):ce?it=ut&&Ve&&!Je&&(E||!bt):Je||bt?it=!1:it=E?De<=c:De<c;it?k=Re+1:I=Re}return On(I,Q)}function wg(a,c){for(var h=-1,E=a.length,k=0,I=[];++h<E;){var H=a[h],te=c?c(H):H;if(!h||!Kr(te,ce)){var ce=te;I[k++]=H===0?0:H}}return I}function Eg(a){return typeof a=="number"?a:_r(a)?U:+a}function gr(a){if(typeof a=="string")return a;if(vt(a))return Qt(a,gr)+"";if(_r(a))return eg?eg.call(a):"";var c=a+"";return c=="0"&&1/a==-J?"-0":c}function eo(a,c,h){var E=-1,k=xl,I=a.length,H=!0,te=[],ce=te;if(h)H=!1,k=yd;else if(I>=i){var Ae=c?null:yk(a);if(Ae)return kl(Ae);H=!1,k=sa,ce=new Ro}else ce=c?[]:te;e:for(;++E<I;){var Re=a[E],De=c?c(Re):Re;if(Re=h||Re!==0?Re:0,H&&De===De){for(var Ve=ce.length;Ve--;)if(ce[Ve]===De)continue e;c&&ce.push(De),te.push(Re)}else k(ce,De,h)||(ce!==te&&ce.push(De),te.push(Re))}return te}function qd(a,c){c=to(c,a);var h=-1,E=c.length;if(!E)return!0;for(;++h<E;){var k=Yr(c[h]);if(k==="__proto__"&&!jt.call(a,"__proto__")||(k==="constructor"||k==="prototype")&&h<E-1)return!1}var I=Qg(a,c);return I==null||delete I[Yr(Rr(c))]}function Sg(a,c,h,E){return va(a,c,h(Io(a,c)),E)}function Yl(a,c,h,E){for(var k=a.length,I=E?k:-1;(E?I--:++I<k)&&c(a[I],I,a););return h?Ar(a,E?0:I,E?I+1:k):Ar(a,E?I+1:0,E?k:I)}function Cg(a,c){var h=a;return h instanceof $t&&(h=h.value()),bd(c,function(E,k){return k.func.apply(k.thisArg,Qi([E],k.args))},h)}function Wd(a,c,h){var E=a.length;if(E<2)return E?eo(a[0]):[];for(var k=-1,I=we(E);++k<E;)for(var H=a[k],te=-1;++te<E;)te!=k&&(I[k]=pa(I[k]||H,a[te],c,h));return eo(wn(I,1),c,h)}function xg(a,c,h){for(var E=-1,k=a.length,I=c.length,H={};++E<k;){var te=E<I?c[E]:n;h(H,a[E],te)}return H}function Yd(a){return rn(a)?a:[]}function Kd(a){return typeof a=="function"?a:Gn}function to(a,c){return vt(a)?a:rf(a,c)?[a]:e_(Ut(a))}var uk=wt;function no(a,c,h){var E=a.length;return h=h===n?E:h,!c&&h>=E?a:Ar(a,c,h)}var Tg=Qx||function(a){return bn.clearTimeout(a)};function kg(a,c){if(c)return a.slice();var h=a.length,E=Kv?Kv(h):new a.constructor(h);return a.copy(E),E}function Gd(a){var c=new a.constructor(a.byteLength);return new Il(c).set(new Il(a)),c}function ck(a,c){var h=c?Gd(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.byteLength)}function dk(a){var c=new a.constructor(a.source,cv.exec(a));return c.lastIndex=a.lastIndex,c}function fk(a){return da?Bt(da.call(a)):{}}function Og(a,c){var h=c?Gd(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.length)}function $g(a,c){if(a!==c){var h=a!==n,E=a===null,k=a===a,I=_r(a),H=c!==n,te=c===null,ce=c===c,Ae=_r(c);if(!te&&!Ae&&!I&&a>c||I&&H&&ce&&!te&&!Ae||E&&H&&ce||!h&&ce||!k)return 1;if(!E&&!I&&!Ae&&a<c||Ae&&h&&k&&!E&&!I||te&&h&&k||!H&&k||!ce)return-1}return 0}function pk(a,c,h){for(var E=-1,k=a.criteria,I=c.criteria,H=k.length,te=h.length;++E<H;){var ce=$g(k[E],I[E]);if(ce){if(E>=te)return ce;var Ae=h[E];return ce*(Ae=="desc"?-1:1)}}return a.index-c.index}function Ag(a,c,h,E){for(var k=-1,I=a.length,H=h.length,te=-1,ce=c.length,Ae=pn(I-H,0),Re=we(ce+Ae),De=!E;++te<ce;)Re[te]=c[te];for(;++k<H;)(De||k<I)&&(Re[h[k]]=a[k]);for(;Ae--;)Re[te++]=a[k++];return Re}function Rg(a,c,h,E){for(var k=-1,I=a.length,H=-1,te=h.length,ce=-1,Ae=c.length,Re=pn(I-te,0),De=we(Re+Ae),Ve=!E;++k<Re;)De[k]=a[k];for(var Je=k;++ce<Ae;)De[Je+ce]=c[ce];for(;++H<te;)(Ve||k<I)&&(De[Je+h[H]]=a[k++]);return De}function Wn(a,c){var h=-1,E=a.length;for(c||(c=we(E));++h<E;)c[h]=a[h];return c}function fi(a,c,h,E){var k=!h;h||(h={});for(var I=-1,H=c.length;++I<H;){var te=c[I],ce=E?E(h[te],a[te],te,h,a):n;ce===n&&(ce=a[te]),k?ci(h,te,ce):fa(h,te,ce)}return h}function hk(a,c){return fi(a,nf(a),c)}function mk(a,c){return fi(a,Hg(a),c)}function Kl(a,c){return function(h,E){var k=vt(h)?bx:LT,I=c?c():{};return k(h,a,ot(E,2),I)}}function ms(a){return wt(function(c,h){var E=-1,k=h.length,I=k>1?h[k-1]:n,H=k>2?h[2]:n;for(I=a.length>3&&typeof I=="function"?(k--,I):n,H&&jn(h[0],h[1],H)&&(I=k<3?n:I,k=1),c=Bt(c);++E<k;){var te=h[E];te&&a(c,te,E,I)}return c})}function Pg(a,c){return function(h,E){if(h==null)return h;if(!Yn(h))return a(h,E);for(var k=h.length,I=c?k:-1,H=Bt(h);(c?I--:++I<k)&&E(H[I],I,H)!==!1;);return h}}function Ig(a){return function(c,h,E){for(var k=-1,I=Bt(c),H=E(c),te=H.length;te--;){var ce=H[a?te:++k];if(h(I[ce],ce,I)===!1)break}return c}}function vk(a,c,h){var E=c&x,k=ga(a);function I(){var H=this&&this!==bn&&this instanceof I?k:a;return H.apply(E?h:this,arguments)}return I}function Mg(a){return function(c){c=Ut(c);var h=ls(c)?qr(c):n,E=h?h[0]:c.charAt(0),k=h?no(h,1).join(""):c.slice(1);return E[a]()+k}}function vs(a){return function(c){return bd(I_(P_(c).replace(sx,"")),a,"")}}function ga(a){return function(){var c=arguments;switch(c.length){case 0:return new a;case 1:return new a(c[0]);case 2:return new a(c[0],c[1]);case 3:return new a(c[0],c[1],c[2]);case 4:return new a(c[0],c[1],c[2],c[3]);case 5:return new a(c[0],c[1],c[2],c[3],c[4]);case 6:return new a(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new a(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=hs(a.prototype),E=a.apply(h,c);return Xt(E)?E:h}}function gk(a,c,h){var E=ga(a);function k(){for(var I=arguments.length,H=we(I),te=I,ce=gs(k);te--;)H[te]=arguments[te];var Ae=I<3&&H[0]!==ce&&H[I-1]!==ce?[]:Xi(H,ce);if(I-=Ae.length,I<h)return Ug(a,c,Gl,k.placeholder,n,H,Ae,n,n,h-I);var Re=this&&this!==bn&&this instanceof k?E:a;return hr(Re,this,H)}return k}function Dg(a){return function(c,h,E){var k=Bt(c);if(!Yn(c)){var I=ot(h,3);c=vn(c),h=function(te){return I(k[te],te,k)}}var H=a(c,h,E);return H>-1?k[I?c[H]:H]:n}}function Fg(a){return $i(function(c){var h=c.length,E=h,k=Or.prototype.thru;for(a&&c.reverse();E--;){var I=c[E];if(typeof I!="function")throw new kr(s);if(k&&!H&&Zl(I)=="wrapper")var H=new Or([],!0)}for(E=H?E:h;++E<h;){I=c[E];var te=Zl(I),ce=te=="wrapper"?ef(I):n;ce&&of(ce[0])&&ce[1]==(Y|T|M|ve)&&!ce[4].length&&ce[9]==1?H=H[Zl(ce[0])].apply(H,ce[3]):H=I.length==1&&of(I)?H[te]():H.thru(I)}return function(){var Ae=arguments,Re=Ae[0];if(H&&Ae.length==1&&vt(Re))return H.plant(Re).value();for(var De=0,Ve=h?c[De].apply(this,Ae):Re;++De<h;)Ve=c[De].call(this,Ve);return Ve}})}function Gl(a,c,h,E,k,I,H,te,ce,Ae){var Re=c&Y,De=c&x,Ve=c&S,Je=c&(T|A),ut=c&W,bt=Ve?n:ga(a);function it(){for(var Tt=arguments.length,At=we(Tt),yr=Tt;yr--;)At[yr]=arguments[yr];if(Je)var Un=gs(it),br=$x(At,Un);if(E&&(At=Ag(At,E,k,Je)),I&&(At=Rg(At,I,H,Je)),Tt-=br,Je&&Tt<Ae){var on=Xi(At,Un);return Ug(a,c,Gl,it.placeholder,h,At,on,te,ce,Ae-Tt)}var Gr=De?h:this,Ii=Ve?Gr[a]:a;return Tt=At.length,te?At=Lk(At,te):ut&&Tt>1&&At.reverse(),Re&&ce<Tt&&(At.length=ce),this&&this!==bn&&this instanceof it&&(Ii=bt||ga(Ii)),Ii.apply(Gr,At)}return it}function Lg(a,c){return function(h,E){return qT(h,a,c(E),{})}}function Ql(a,c){return function(h,E){var k;if(h===n&&E===n)return c;if(h!==n&&(k=h),E!==n){if(k===n)return E;typeof h=="string"||typeof E=="string"?(h=gr(h),E=gr(E)):(h=Eg(h),E=Eg(E)),k=a(h,E)}return k}}function Qd(a){return $i(function(c){return c=Qt(c,vr(ot())),wt(function(h){var E=this;return a(c,function(k){return hr(k,E,h)})})})}function Xl(a,c){c=c===n?" ":gr(c);var h=c.length;if(h<2)return h?Vd(c,a):c;var E=Vd(c,Ll(a/us(c)));return ls(c)?no(qr(E),0,a).join(""):E.slice(0,a)}function _k(a,c,h,E){var k=c&x,I=ga(a);function H(){for(var te=-1,ce=arguments.length,Ae=-1,Re=E.length,De=we(Re+ce),Ve=this&&this!==bn&&this instanceof H?I:a;++Ae<Re;)De[Ae]=E[Ae];for(;ce--;)De[Ae++]=arguments[++te];return hr(Ve,k?h:this,De)}return H}function jg(a){return function(c,h,E){return E&&typeof E!="number"&&jn(c,h,E)&&(h=E=n),c=Pi(c),h===n?(h=c,c=0):h=Pi(h),E=E===n?c<h?1:-1:Pi(E),rk(c,h,E,a)}}function Jl(a){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=Pr(c),h=Pr(h)),a(c,h)}}function Ug(a,c,h,E,k,I,H,te,ce,Ae){var Re=c&T,De=Re?H:n,Ve=Re?n:H,Je=Re?I:n,ut=Re?n:I;c|=Re?M:z,c&=~(Re?z:M),c&O||(c&=-4);var bt=[a,c,k,Je,De,ut,Ve,te,ce,Ae],it=h.apply(n,bt);return of(a)&&Xg(it,bt),it.placeholder=E,Jg(it,a,c)}function Xd(a){var c=fn[a];return function(h,E){if(h=Pr(h),E=E==null?0:On(yt(E),292),E&&Jv(h)){var k=(Ut(h)+"e").split("e"),I=c(k[0]+"e"+(+k[1]+E));return k=(Ut(I)+"e").split("e"),+(k[0]+"e"+(+k[1]-E))}return c(h)}}var yk=fs&&1/kl(new fs([,-0]))[1]==J?function(a){return new fs(a)}:wf;function Ng(a){return function(c){var h=$n(c);return h==Ce?kd(c):h==Pt?Fx(c):Ox(c,a(c))}}function Oi(a,c,h,E,k,I,H,te){var ce=c&S;if(!ce&&typeof a!="function")throw new kr(s);var Ae=E?E.length:0;if(Ae||(c&=-97,E=k=n),H=H===n?H:pn(yt(H),0),te=te===n?te:yt(te),Ae-=k?k.length:0,c&z){var Re=E,De=k;E=k=n}var Ve=ce?n:ef(a),Je=[a,c,h,E,k,Re,De,I,H,te];if(Ve&&Mk(Je,Ve),a=Je[0],c=Je[1],h=Je[2],E=Je[3],k=Je[4],te=Je[9]=Je[9]===n?ce?0:a.length:pn(Je[9]-Ae,0),!te&&c&(T|A)&&(c&=-25),!c||c==x)var ut=vk(a,c,h);else c==T||c==A?ut=gk(a,c,te):(c==M||c==(x|M))&&!k.length?ut=_k(a,c,h,E):ut=Gl.apply(n,Je);var bt=Ve?bg:Xg;return Jg(bt(ut,Je),a,c)}function zg(a,c,h,E){return a===n||Kr(a,ds[h])&&!jt.call(E,h)?c:a}function Bg(a,c,h,E,k,I){return Xt(a)&&Xt(c)&&(I.set(c,a),ql(a,c,n,Bg,I),I.delete(c)),a}function bk(a){return ba(a)?n:a}function Vg(a,c,h,E,k,I){var H=h&m,te=a.length,ce=c.length;if(te!=ce&&!(H&&ce>te))return!1;var Ae=I.get(a),Re=I.get(c);if(Ae&&Re)return Ae==c&&Re==a;var De=-1,Ve=!0,Je=h&b?new Ro:n;for(I.set(a,c),I.set(c,a);++De<te;){var ut=a[De],bt=c[De];if(E)var it=H?E(bt,ut,De,c,a,I):E(ut,bt,De,a,c,I);if(it!==n){if(it)continue;Ve=!1;break}if(Je){if(!wd(c,function(Tt,At){if(!sa(Je,At)&&(ut===Tt||k(ut,Tt,h,E,I)))return Je.push(At)})){Ve=!1;break}}else if(!(ut===bt||k(ut,bt,h,E,I))){Ve=!1;break}}return I.delete(a),I.delete(c),Ve}function wk(a,c,h,E,k,I,H){switch(h){case nn:if(a.byteLength!=c.byteLength||a.byteOffset!=c.byteOffset)return!1;a=a.buffer,c=c.buffer;case Wt:return!(a.byteLength!=c.byteLength||!I(new Il(a),new Il(c)));case G:case N:case $e:return Kr(+a,+c);case ge:return a.name==c.name&&a.message==c.message;case Ze:case St:return a==c+"";case Ce:var te=kd;case Pt:var ce=E&m;if(te||(te=kl),a.size!=c.size&&!ce)return!1;var Ae=H.get(a);if(Ae)return Ae==c;E|=b,H.set(a,c);var Re=Vg(te(a),te(c),E,k,I,H);return H.delete(a),Re;case Nt:if(da)return da.call(a)==da.call(c)}return!1}function Ek(a,c,h,E,k,I){var H=h&m,te=Jd(a),ce=te.length,Ae=Jd(c),Re=Ae.length;if(ce!=Re&&!H)return!1;for(var De=ce;De--;){var Ve=te[De];if(!(H?Ve in c:jt.call(c,Ve)))return!1}var Je=I.get(a),ut=I.get(c);if(Je&&ut)return Je==c&&ut==a;var bt=!0;I.set(a,c),I.set(c,a);for(var it=H;++De<ce;){Ve=te[De];var Tt=a[Ve],At=c[Ve];if(E)var yr=H?E(At,Tt,Ve,c,a,I):E(Tt,At,Ve,a,c,I);if(!(yr===n?Tt===At||k(Tt,At,h,E,I):yr)){bt=!1;break}it||(it=Ve=="constructor")}if(bt&&!it){var Un=a.constructor,br=c.constructor;Un!=br&&"constructor"in a&&"constructor"in c&&!(typeof Un=="function"&&Un instanceof Un&&typeof br=="function"&&br instanceof br)&&(bt=!1)}return I.delete(a),I.delete(c),bt}function $i(a){return af(Gg(a,n,i_),a+"")}function Jd(a){return ug(a,vn,nf)}function Zd(a){return ug(a,Kn,Hg)}var ef=Ul?function(a){return Ul.get(a)}:wf;function Zl(a){for(var c=a.name+"",h=ps[c],E=jt.call(ps,c)?h.length:0;E--;){var k=h[E],I=k.func;if(I==null||I==a)return k.name}return c}function gs(a){var c=jt.call($,"placeholder")?$:a;return c.placeholder}function ot(){var a=$.iteratee||yf;return a=a===yf?fg:a,arguments.length?a(arguments[0],arguments[1]):a}function eu(a,c){var h=a.__data__;return Ak(c)?h[typeof c=="string"?"string":"hash"]:h.map}function tf(a){for(var c=vn(a),h=c.length;h--;){var E=c[h],k=a[E];c[h]=[E,k,Yg(k)]}return c}function Mo(a,c){var h=Ix(a,c);return dg(h)?h:n}function Sk(a){var c=jt.call(a,$o),h=a[$o];try{a[$o]=n;var E=!0}catch{}var k=Rl.call(a);return E&&(c?a[$o]=h:delete a[$o]),k}var nf=$d?function(a){return a==null?[]:(a=Bt(a),Gi($d(a),function(c){return Qv.call(a,c)}))}:Ef,Hg=$d?function(a){for(var c=[];a;)Qi(c,nf(a)),a=Ml(a);return c}:Ef,$n=Ln;(Ad&&$n(new Ad(new ArrayBuffer(1)))!=nn||la&&$n(new la)!=Ce||Rd&&$n(Rd.resolve())!=tt||fs&&$n(new fs)!=Pt||ua&&$n(new ua)!=qt)&&($n=function(a){var c=Ln(a),h=c==Ne?a.constructor:n,E=h?Do(h):"";if(E)switch(E){case oT:return nn;case sT:return Ce;case aT:return tt;case lT:return Pt;case uT:return qt}return c});function Ck(a,c,h){for(var E=-1,k=h.length;++E<k;){var I=h[E],H=I.size;switch(I.type){case"drop":a+=H;break;case"dropRight":c-=H;break;case"take":c=On(c,a+H);break;case"takeRight":a=pn(a,c-H);break}}return{start:a,end:c}}function xk(a){var c=a.match(P2);return c?c[1].split(I2):[]}function qg(a,c,h){c=to(c,a);for(var E=-1,k=c.length,I=!1;++E<k;){var H=Yr(c[E]);if(!(I=a!=null&&h(a,H)))break;a=a[H]}return I||++E!=k?I:(k=a==null?0:a.length,!!k&&au(k)&&Ai(H,k)&&(vt(a)||Fo(a)))}function Tk(a){var c=a.length,h=new a.constructor(c);return c&&typeof a[0]=="string"&&jt.call(a,"index")&&(h.index=a.index,h.input=a.input),h}function Wg(a){return typeof a.constructor=="function"&&!_a(a)?hs(Ml(a)):{}}function kk(a,c,h){var E=a.constructor;switch(c){case Wt:return Gd(a);case G:case N:return new E(+a);case nn:return ck(a,h);case Dn:case _e:case ue:case ye:case Fe:case qe:case xe:case et:case be:return Og(a,h);case Ce:return new E;case $e:case St:return new E(a);case Ze:return dk(a);case Pt:return new E;case Nt:return fk(a)}}function Ok(a,c){var h=c.length;if(!h)return a;var E=h-1;return c[E]=(h>1?"& ":"")+c[E],c=c.join(h>2?", ":" "),a.replace(wl,`{
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-R79ZeMZV.js","./vendor-ui-g5RNTRAc.js","./vendor-core-CfnvwQzw.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-BPfuSpto.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-kK4W-ekr.js","./BaseDialog.vue_vue_type_script_setup_true_lang-Bcc7UYpp.js","./el-dropdown-item-BeIfAqTO.css","./el-card-BAyktVMS.css","./index-BNYhon33.js","./useUnreadStore-C1fMXHK-.js","./index.vue_vue_type_script_setup_true_lang-CfvoANZj.js","./useCacheOssStore-DRfQruRw.js","./index-DOlF0Z_P.css","./index-BPiRmvZl.js","./index-C0WquRMM.css","./useVscodeOpen-CcI7l8e8.js","./SiteLogo-DEIcFHUB.js","./SiteLogo-DbJD21Ac.css","./index-DtBE21vT.js","./index-8dCw6Y2Z.css","./el-link-CPQZ-olG.css","./index-B-o-geOz.js","./md5-BqUl3L9Y.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CH79cQAu.js","./index-DS0KGu0h.js","./CanvasAnimation.vue_vue_type_script_setup_true_lang-BNlJ1yyx.js","./index-CioMG7I6.css","./GithubCallback-BjmPqH_L.js","./index-C9BP4kWZ.js","./index-D3HuxiUJ.js","./el-empty-S7fQQ3B8.css","./index-CxHPM7Fg.js","./index-XhJP7gYm.js","./index.vue_vue_type_script_setup_true_lang-Bphion84.js","./useMessage-DeFP0yQy.js","./index-DpYJK6hB.js","./useCompMetaLocalStore-Dko7Z-qO.js","./index.vue_vue_type_script_setup_true_lang-BdH7Nx9p.js","./index-C1Hw6vXQ.js","./el-table-column-BqpEDPpl.js","./el-table-column-B3ZEEuPD.css","./index.vue_vue_type_style_index_0_lang-DiN6WUUw.js","./vendor-xterm-mNFjEaKn.js","./index-Bn5vi5XZ.css","./index.vue_vue_type_script_setup_true_lang-uwxiML83.js","./index.vue_vue_type_script_setup_true_lang-B8gjIiIt.js","./useTeamHeaders-Bl2nRtJe.js","./useTeamHeaders-BSofrH8c.css","./index.vue_vue_type_script_setup_true_lang-C8D789jG.js","./index3-BB6QcGH6.js","./index-CFTT7hu0.css","./ReplyForm.vue_vue_type_script_setup_true_lang-BiETILOo.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-RYuIoPF7.js","./index-D-zBzPPy.css","./home-rounded-DcB333c-.js","./home-rounded-B4KVwSYb.css","./index-BhaaT_GF.js","./useKeyword-Dh8n_REW.js","./supervised-user-circle-B5yCz5Oo.js","./supervised-user-circle-CZYpyCV4.css","./index-kE41pQo6.js","./index.vue_vue_type_style_index_0_lang-DDVUKgQ8.js","./useCompEditStore-DpFLk9bE.js","./v4-EwEgHOG0.js","./BaseBadge-D53B9edx.js","./BaseBadge-ledSuDnX.css","./useCompEditStore-C2cDxPfw.css","./index-CdWXO9ks.css","./kid-star-0b7jegzF.js","./kid-star-D1M-aC1C.css","./index-CytdBEyB.js","./index-Dnz1UQnr.js","./sync-saved-locally-rounded-BX8GcRCO.js","./sync-saved-locally-rounded-wbwASI26.css","./index-CPc1AP3H.js","./cloud-upload-DVf0ki5J.js","./cloud-upload-j3Y0taC9.css","./index-DVxz8FkV.js","./index-BvmEG8Qn.css","./index-BWSpWNwa.js","./moment-B-YVwB4U.js","./index-ChFpxx4T.css","./index-Cv6z_Edq.js","./terminal-DXqN9Hoj.js","./terminal-DFt3N_TH.css","./index-DQfTUb4g.js","./settings-DpNeh4hy.js","./settings-BhagQj3w.css","./index-BqUqA7W4.js","./index-Mnu1wKgu.css","./index-C42i82mF.js","./index-Ji2WmMDE.css","./index-CiPfzZM4.js","./CodeMirrorEditor-Cqow8ROO-AryRubtp.js"])))=>i.map(i=>d[i]);
2
+ import{aA as Ja,m as se,I as ze,ak as ft,O as C,Q as Ee,Y as Le,a2 as Z,u as w,aB as Eo,f as xt,n as gt,g as yw,o as bw,h as Ds,w as He,k as Za,b as ri,e as _n,t as En,r as ww,c as Ew,a as re,i as Sw,j as Fs,d as zn,l as Hn,J as Ia,aC as _i,P as R,S as mt,R as _,H as We,af as ct,a0 as Et,a1 as q,a7 as xn,a4 as Cw,$ as Se,aD as Ah,ac as Rh,_ as Pn,W as Ot,au as ni,ar as Lr,ad as ht,aE as xw,X as QR,Z as Ct,ae as Tw,am as ii,an as Vi,T as an,aF as XR,aG as Sc,aH as JR,aI as ZR,aJ as Ph,aa as eP,U as Be,aK as Ih,aL as Jr,aM as tP,aN as nP,ax as Mh,F as xs,ab as Ni,a8 as L_,D as rP,B as ts,a9 as kw,al as iP,E as Ow,a3 as Nr,V as el,as as oi,ao as Zs,aO as Op,ap as Cf,aP as Fu}from"./vendor-core-CfnvwQzw.js";import{e as oP,u as sP,E as aP,a as Ls,d as lP,b as j_,c as Ps,f as $p,v as $w,g as uP,h as cP,i as dP,x as fP,j as pP,k as ns,l as hP,m as Ma,n as mP,o as vP,p as gP,q as Ap,r as Rp,s as _P,t as yP,w as bP,y as wP,z as U_,A as N_,B as z_,C as B_,D as V_,F as H_,G as q_,H as W_,I as Y_,J as K_,K as G_,L as Q_,M as X_,N as J_,O as Z_,P as ey,Q as ty,R as ny,S as ry,T as iy,U as oy,V as sy,W as ay,X as ly,Y as uy,Z as cy,_ as dy,$ as uu,a0 as js,a1 as Dh,a2 as Da,a3 as Fa,a4 as La,a5 as cu,a6 as EP}from"./vendor-ui-g5RNTRAc.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const SP="Comp Hub",CP="main",xP="container",TP="item",kP="/__global_config__",OP="local://",$P="comphubConfig",AP="__remote__",RP="__local__",PP="__admin__",IP="https://api.comphub.cn",MP="http://localhost:7002",DP="http://127.0.0.1:5000",FP="http://localhost:5001",LP="http://localhost:3580",jP="https://apiadmin.comphub.cn",UP="https://admin.comphub.cn",NP="/_module_load_prefix_",zP="/_node_modules_load_prefix_",BP="/_comp_preview_prefix_local_",VP="/__proxy__",HP="/__master__",qP="authorization",WP="x-refresh-token",YP="accept-language",KP="comp-hub-db",GP="file-compiled",QP="https://oss.comphub.cn",XP="oss:sts:token",JP="oss:sts:expire",ZP="https://prebuild.comphub.cn",eI="/dev",tI="/prod",nI="/node_modules/.prebuild_module",rI="_metadata.json",iI="vue/dist/vue.esm-bundler.js",oI="react-jsx-loader",sI="vue3-sfc-loader",aI="vue2-sfc-loader",lI="sass-compiler",uI="less-compiler",Aw="react",cI={COMP_FRAMEWORK_VUE:"vue",COMP_FRAMEWORK_REACT:Aw},dI="comp.json",fI="README.md",pI="main.js",hI="index.vue",mI=["index.jsx","index.js","index.tsx"],vI="/.comp_hub_temp",gI="screenshot_mini.png",_I=1024*1024*10,yI=1024*1024*3,bI=30,Rw="list_local",Pw="list_remote",wI={COMP_LIST_TYPE_LOCAL:Rw,COMP_LIST_TYPE_REMOTE:Pw},Iw="config",Mw="error",Dw="dir",Fw="preview",Lw="extra",jw="deps",Uw="readme",Nw="upgradeLog",EI={TAB_TYPE_CONFIG:Iw,TAB_TYPE_ERROR:Mw,TAB_TYPE_DIR:Dw,TAB_TYPE_PREVIEW:Fw,TAB_TYPE_EXTRA:Lw,TAB_TYPE_DEPS:jw,TAB_TYPE_README:Uw,TAB_TYPE_UPGRADE_LOG:Nw},zw="mini",Bw="full",SI={COMP_EDIT_TAB_TYPE_MINI:zw,COMP_EDIT_TAB_TYPE_FULL:Bw},Vw="EDIT",Hw="ADD",CI={DIALOG_TYPE_EDIT:Vw,DIALOG_TYPE_ADD:Hw},qw="ONLY_INSTALL",Ww="AUTO",Yw="MAJOR_VERSION",Kw="MINOR_VERSION",Gw="EXACT_VERSION",xI={COMP_MATCH_TYPE_ONLY_INSTALL:qw,COMP_MATCH_TYPE_AUTO:Ww,COMP_MATCH_TYPE_MAJOR_VERSION:Yw,COMP_MATCH_TYPE_MINOR_VERSION:Kw,COMP_MATCH_TYPE_EXACT_VERSION:Gw},Qw="online",Xw="offline",TI={COMP_UPDATE_TYPE_ONLINE:Qw,COMP_UPDATE_TYPE_OFFLINE:Xw},Jw="NOT_EXIST",Zw="EXIST",kI={COMP_CHECK_STATUS_NOT_EXIST:Jw,COMP_CHECK_STATUS_EXIST:Zw},e1="__id__",OI=0,$I=1,AI=-1,t1="checkPreviewListForm",n1="checkExtraInfoForm",r1="checkCompConfig",i1="checkUpgradeLogForm",o1="getCompError",s1="afterCompDel",a1="afterCompCancelCollect",l1="afterCompRenderRetry",u1="openCompTerminal",RI={COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:t1,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:n1,COMP_METHOD_KEY_CHECK_COMP_CONFIG:r1,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:i1,COMP_METHOD_KEY_GET_COMP_ERROR:o1,COMP_METHOD_KEY_AFTER_COMP_DEL:s1,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:a1,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:l1,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:u1},PI="compListStore",II="compEditStore",MI="callbacks",DI={CONTAINER:{SHARE:"share",COLLECT:"collect",LOCAL:"local",MINE:"mine",SIMILAR:"similar",TEAM_ALL:"teamAll",TEAM_MINE:"teamMine",TEAM_GROUP:"teamGroup",TEAM_ADD:"teamAdd"},ITEM:{PREVIEW_REMOTE:"previewRemote",PREVIEW_LOCAL:"previewLocal",CAROUSEL_REMOTE:"carouselRemote",CAROUSEL_LOCAL:"carouselLocal",EDIT_PANEL:"editPanel"}},FI="http://127.0.0.1",LI="http://localhost:8095",jI="http://localhost:8096",UI="http://localhost:5198",NI="http://localhost:3056",zI="https://www.comphub.cn",BI="http://localhost:8101",VI="https://render.comphub.cn",HI="/item",qI="/container",WI="CREATE",YI="JOIN",KI="EXIT",GI="teamAddMyComp",QI="teamCompList",XI="teamCompGroupList",JI="teamMyCompList",ZI="teamMyCompUpdate",eM="__v__",tM="local",nM="prod",rM="local",iM="prod",oM="http://localhost:5173",sM="https://docs.comphub.cn",aM=20,lM=20,uM="SUPER_ADMIN",cM="ADMIN",Rn=Object.freeze(Object.defineProperty({__proto__:null,ACCEPT_LANGUAGE_HEADER_NAME:YP,ADMIN_SERVICE_PREFIX:PP,ADMIN_SERVICE_URL_DEV:LP,ADMIN_SERVICE_URL_PROD:jP,ADMIN_WEB_URL_PROD:UP,AUTHORIZATION_HEADER_NAME:qP,CACHE_KEY_STS_EXPIRE_TIME:JP,CACHE_KEY_STS_TOKEN:XP,COMPHUB_CONFIG_KEY:$P,COMP_ACTION_ICON_HEIGHT:lM,COMP_ACTION_ICON_WIDTH:aM,COMP_CHECK_STATUSES:kI,COMP_CHECK_STATUS_EXIST:Zw,COMP_CHECK_STATUS_NOT_EXIST:Jw,COMP_CONFIG_FILENAME:dI,COMP_EDIT_TAB_TYPES:SI,COMP_EDIT_TAB_TYPE_FULL:Bw,COMP_EDIT_TAB_TYPE_MINI:zw,COMP_ENTRY_FILE:pI,COMP_FIELD_COMP_ID:e1,COMP_FRAMEWORK_REACT:Aw,COMP_FRAMEWORK_TYPES:cI,COMP_FRAMEWORK_VUE:"vue",COMP_HUB_DEV_DOCS_URL:oM,COMP_HUB_PROD_DOCS_URL:sM,COMP_LIST_TYPES:wI,COMP_LIST_TYPE_LOCAL:Rw,COMP_LIST_TYPE_REMOTE:Pw,COMP_MATCH_TYPES:xI,COMP_MATCH_TYPE_AUTO:Ww,COMP_MATCH_TYPE_EXACT_VERSION:Gw,COMP_MATCH_TYPE_MAJOR_VERSION:Yw,COMP_MATCH_TYPE_MINOR_VERSION:Kw,COMP_MATCH_TYPE_ONLY_INSTALL:qw,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:a1,COMP_METHOD_KEY_AFTER_COMP_DEL:s1,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:l1,COMP_METHOD_KEY_CHECK_COMP_CONFIG:r1,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:n1,COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:t1,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:i1,COMP_METHOD_KEY_GET_COMP_ERROR:o1,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:u1,COMP_PREVIEW_PREFIX_LOCAL:BP,COMP_README_FILENAME:fI,COMP_SCREENSHOT_MINI_FILENAME:gI,COMP_SUBMIT_MAX_FILE_COUNT:bI,COMP_SUBMIT_MAX_SINGLE_FILE_SIZE:yI,COMP_SUBMIT_MAX_TOTAL_SIZE:_I,COMP_TEMP_DIR:vI,COMP_UPDATE_TYPES:TI,COMP_UPDATE_TYPE_OFFLINE:Xw,COMP_UPDATE_TYPE_ONLINE:Qw,COMP_USE_ENTRY_FILE:hI,COMP_USE_ENTRY_FILE_REACT:mI,DIALOG_TYPES:CI,DIALOG_TYPE_ADD:Hw,DIALOG_TYPE_EDIT:Vw,FILE_MANAGER_DIRNAME:OP,GLOBAL_CONFIG_PATH:kP,IFRAME_CONTAINER_WEBSITE_PATH:qI,IFRAME_HOST:FI,IFRAME_ITEM_WEBSITE_PATH:HI,IFRAME_ROUTES:DI,INDEX_DB_NAME:KP,INDEX_DB_TABLE_NAME:GP,LESS_COMPILER_KEY:uI,LOCAL_CHILD_IFRAME_URL:LI,LOCAL_ITEM_EXTRANET_URL:BI,LOCAL_LEAF_IFRAME_URL:jI,LOCAL_MAIN_EXTRANET_URL:NI,LOCAL_MIDWAY_ENV_LOCAL:tM,LOCAL_MIDWAY_ENV_PROD:nM,LOCAL_SERVICE_PREFIX:RP,LOCAL_SERVICE_URL_DEV:DP,LOCAL_SERVICE_URL_DEV_SUB:FP,LOCAL_TOP_IFRAME_URL:UI,MASTER_API_PREFIX:HP,META_FILE_NAME:rI,MODULE_LOAD_PREFIX:NP,NODE_MODULES_LOAD_PREFIX:zP,OSS_CUSTOM_DOMAIN:QP,PREBUILD_HOST:ZP,PREBUILD_MAX_SINGLE_FILE_SIZE:52428800,PREBUILD_MODULE_DIR:nI,PREBUILD_MODULE_DIR_DEV:eI,PREBUILD_MODULE_DIR_PROD:tI,PROVIDE_KEYS:RI,PROVIDE_KEY_CALLBACKS:MI,PROVIDE_KEY_COMP_EDIT_STORE:II,PROVIDE_KEY_COMP_LIST_STORE:PI,PROXY_PATH_PREFIX:VP,REACT_JSX_LOADER_KEY:oI,REFRESH_TOKEN_HEADER_NAME:WP,REMOTE_ITEM_EXTRANET_URL:VI,REMOTE_MAIN_EXTRANET_URL:zI,REMOTE_MIDWAY_ENV_LOCAL:rM,REMOTE_MIDWAY_ENV_PROD:iM,REMOTE_SERVICE_PREFIX:AP,REMOTE_SERVICE_URL_DEV:MP,REMOTE_SERVICE_URL_PROD:IP,ROLE_CODE_ADMIN:cM,ROLE_CODE_SUPER_ADMIN:uM,ROUTE_STATE_KEY_VERSION:eM,SASS_COMPILER_KEY:lI,SCOPE_ID_TEAM_ADD_MY_COMP:GI,SCOPE_ID_TEAM_COMP_GROUP_LIST:XI,SCOPE_ID_TEAM_COMP_LIST:QI,SCOPE_ID_TEAM_MY_COMP_LIST:JI,SCOPE_ID_TEAM_MY_COMP_UPDATE:ZI,SITE_TITLE:SP,TAB_TYPES:EI,TAB_TYPE_CONFIG:Iw,TAB_TYPE_DEPS:jw,TAB_TYPE_DIR:Dw,TAB_TYPE_ERROR:Mw,TAB_TYPE_EXTRA:Lw,TAB_TYPE_PREVIEW:Fw,TAB_TYPE_README:Uw,TAB_TYPE_UPGRADE_LOG:Nw,TEAM_OPERATE_TYPE_CREATE:WI,TEAM_OPERATE_TYPE_EXIT:KI,TEAM_OPERATE_TYPE_JOIN:YI,VERSION_COMPARE_GREATER:$I,VERSION_COMPARE_LESS:AI,VERSION_COMPARE_SAME:OI,VUE2_SFC_LOADER_KEY:aI,VUE3_SFC_LOADER_KEY:sI,VUE_ESM_BUNDLER:iI,WEBSITE_PATH_CONTAINER:xP,WEBSITE_PATH_ITEM:TP,WEBSITE_PATH_MAIN:CP},Symbol.toStringTag,{value:"Module"}));var c1=(e=>(e.FILE="file",e.DIRECTORY="directory",e))(c1||{}),d1=(e=>(e.RECEIVED="received",e.MY="my",e))(d1||{}),f1=(e=>(e.GLOBAL="global",e.TEAM="team",e))(f1||{});const oie=Object.freeze(Object.defineProperty({__proto__:null,FileType:c1,MyCommentTab:d1,TargetType:f1},Symbol.toStringTag,{value:"Module"})),dM=[{label:"tag.systemRecommended",value:"XTTJ"},{label:"tag.all",value:"QB"},{label:"tag.latest",value:"ZX"},{label:"tag.hottest",value:"ZR"}],fM=[".css"],pM=[{name:e1,label:"comp.fieldId",required:!0,default:""},{name:"name",label:"comp.fieldName",required:!0,default:""},{name:"version",label:"comp.fieldVersion",required:!0,default:"1.0.0"}],sie=Object.freeze(Object.defineProperty({__proto__:null,COMP_DEFAULT_FIELD:pM,DEFAULT_TAG_GROUP:dM,PREBUILD_MODULE_SKIP_EXT:fM},Symbol.toStringTag,{value:"Module"})),hM="comp-hub-locale",mM=Object.freeze(Object.defineProperty({__proto__:null,LOCALE_KEY:hM},Symbol.toStringTag,{value:"Module"})),vM="send-auth-code",gM="send-auth-code-success",_M="send-auth-code-failed",yM="login-button",bM="login-button-success",wM="login-button-failed",EM="skip-login",SM="upload-select-folder",CM="upload-confirm",xM="upload-success",TM="upload-failed",kM="upload-repeat-confirm",OM="edit-panel-submit",$M="edit-panel-submit-success",AM="edit-panel-submit-failed",RM="edit-generate-comp-json",PM="edit-view-diff",IM="edit-bg-color-change",MM="edit-dep-version-change",DM="search-component",FM="filter-tag",LM="page-size-change",jM="comp-preview",UM="comp-download",NM="comp-download-success",zM="comp-download-failed",BM="comp-collect-toggle",VM="comp-delete",HM="comp-update",qM="comp-update-success",WM="comp-update-failed",YM="comp-version-change",KM="preview-open-newtab",GM="preview-tab-change",QM="user-update-avatar",XM="user-update-avatar-success",JM="user-update-avatar-failed",ZM="user-update-nickname",eD="user-update-nickname-success",tD="user-update-nickname-failed",nD="user-update-email",rD="user-update-email-success",iD="user-update-email-failed",oD="user-update-password",sD="user-update-password-success",aD="user-update-password-failed",lD="user-email-login-toggle",uD="team-tab-change",cD="team-filter-group",dD="team-kick-member",fD="team-apply-accept",pD="team-apply-reject",hD="team-comp-remove",mD="team-comp-permission-change",vD="sidebar-toggle",gD="setting-apply-rule",_D="clear-cache",fy=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_CACHE:_D,COMP_COLLECT_TOGGLE:BM,COMP_DELETE:VM,COMP_DOWNLOAD:UM,COMP_DOWNLOAD_FAILED:zM,COMP_DOWNLOAD_SUCCESS:NM,COMP_PREVIEW:jM,COMP_UPDATE:HM,COMP_UPDATE_FAILED:WM,COMP_UPDATE_SUCCESS:qM,COMP_VERSION_CHANGE:YM,EDIT_BG_COLOR_CHANGE:IM,EDIT_DEP_VERSION_CHANGE:MM,EDIT_GENERATE_COMP_JSON:RM,EDIT_PANEL_SUBMIT:OM,EDIT_PANEL_SUBMIT_FAILED:AM,EDIT_PANEL_SUBMIT_SUCCESS:$M,EDIT_VIEW_DIFF:PM,FILTER_TAG:FM,LOGIN_BUTTON:yM,LOGIN_BUTTON_FAILED:wM,LOGIN_BUTTON_SUCCESS:bM,PAGE_SIZE_CHANGE:LM,PREVIEW_OPEN_NEWTAB:KM,PREVIEW_TAB_CHANGE:GM,SEARCH_COMPONENT:DM,SEND_AUTH_CODE:vM,SEND_AUTH_CODE_FAILED:_M,SEND_AUTH_CODE_SUCCESS:gM,SETTING_APPLY_RULE:gD,SIDEBAR_TOGGLE:vD,SKIP_LOGIN:EM,TEAM_APPLY_ACCEPT:fD,TEAM_APPLY_REJECT:pD,TEAM_COMP_PERMISSION_CHANGE:mD,TEAM_COMP_REMOVE:hD,TEAM_FILTER_GROUP:cD,TEAM_KICK_MEMBER:dD,TEAM_TAB_CHANGE:uD,UPLOAD_CONFIRM:CM,UPLOAD_FAILED:TM,UPLOAD_REPEAT_CONFIRM:kM,UPLOAD_SELECT_FOLDER:SM,UPLOAD_SUCCESS:xM,USER_EMAIL_LOGIN_TOGGLE:lD,USER_UPDATE_AVATAR:QM,USER_UPDATE_AVATAR_FAILED:JM,USER_UPDATE_AVATAR_SUCCESS:XM,USER_UPDATE_EMAIL:nD,USER_UPDATE_EMAIL_FAILED:iD,USER_UPDATE_EMAIL_SUCCESS:rD,USER_UPDATE_NICKNAME:ZM,USER_UPDATE_NICKNAME_FAILED:tD,USER_UPDATE_NICKNAME_SUCCESS:eD,USER_UPDATE_PASSWORD:oD,USER_UPDATE_PASSWORD_FAILED:aD,USER_UPDATE_PASSWORD_SUCCESS:sD},Symbol.toStringTag,{value:"Module"})),aie=e=>Rn.COMP_HUB_PROD_DOCS_URL,yD=e=>"";var bD={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const wD=()=>{const{locale:e}=Ja(),t={zh:bD,en:oP};return{locale:se(()=>t[e.value])}},ED=ze({__name:"App",setup(e){const{locale:t}=wD();return sP(),(n,r)=>{const i=ft("router-view");return C(),Ee(w(aP),{locale:w(t)},{default:Le(()=>[Z(i)]),_:1},8,["locale"])}}}),SD="modulepreload",CD=function(e,t){return new URL(e,t).href},py={},Rt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),u=l?.nonce||l?.getAttribute("nonce");i=d(n.map(f=>{if(f=CD(f,r),f in py)return;py[f]=!0;const p=f.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(r)for(let g=s.length-1;g>=0;g--){const m=s[g];if(m.href===f&&(!p||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${v}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":SD,p||(y.as="script"),y.crossOrigin="",y.href=f,u&&y.setAttribute("nonce",u),document.head.appendChild(y),p)return new Promise((g,m)=>{y.addEventListener("load",g),y.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},uo="authorization",sc=()=>localStorage.getItem(uo),xD=e=>localStorage.setItem(uo,e),TD=()=>localStorage.removeItem(uo),Bo="x-refresh-token",kD=()=>localStorage.getItem(Bo),OD=e=>localStorage.setItem(Bo,e),$D=()=>localStorage.removeItem(Bo),AD="aside_is_collapse",lie="loginType",uie="compUploadFullscreen",cie="terminalCommandHistory",die="compUploadSidePanelSize",fie="tagSelected",RD="asideSize",PD="headerSize",p1="tagsViewMaxCache",pie="readUploadAgreement",ID="dependencyMatchRule",hie="teamTabActiveName",mie="settingTabActiveName",vie="compPreviewTabActiveName",gie="myCommentsTabActiveName",h1="paginationPageSize",MD=()=>localStorage.getItem(h1),DD=e=>localStorage.setItem(h1,e),_ie="selectedFolderPath",tl=Eo("tagsView",{state:()=>({visitedViews:[],maxCache:Ls(p1,10),payloadMap:new Map}),actions:{setMaxCache(e){this.$patch(t=>{t.maxCache=e})},addView(e){this.$patch(t=>{const n={...e},r=t.visitedViews.findIndex(o=>o.path===e.path);if(r!==-1){t.visitedViews[r]=n;return}t.visitedViews.unshift(n);const i=t.visitedViews.length-t.maxCache;i>0&&this.spliceVisitedViews(-i,i)})},spliceVisitedViews(e,t){this.$patch(n=>{n.visitedViews.splice(e,t)})},delViewByPath(e){this.$patch(t=>{for(const[n,r]of t.visitedViews.entries())if(r.path===e){t.visitedViews.splice(n,1);break}})},delViewAndJumpToPrev(e,t=!1,n){if(t){const r=this.visitedViews.filter(i=>i.path!==e)?.[0];r?n.push(r.path).then(i=>{i||setTimeout(()=>{this.delViewByPath(e)},250)}):n.push("/").then(i=>{i||this.delViewByPath(e)})}else this.delViewByPath(e)},addPayLoad(e,t){this.$patch(n=>{n.payloadMap.set(e,t)})},getPayLoad(e){return this.payloadMap.get(e)}}});function m1(e){return yw()?(bw(e),!0):!1}const xf=new WeakMap,FD=(...e)=>{var t;const n=e[0],r=(t=Ds())==null?void 0:t.proxy;if(r==null&&!Sw())throw new Error("injectLocal must be called in setup");return r&&xf.has(r)&&n in xf.get(r)?xf.get(r)[n]:Fs(...e)},LD=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const jD=Object.prototype.toString,UD=e=>jD.call(e)==="[object Object]",ND=()=>{};function v1(...e){if(e.length!==1)return En(...e);const t=e[0];return typeof t=="function"?ww(Ew(()=>({get:t,set:ND}))):re(t)}function zD(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const g1=e=>e();function BD(e=g1,t={}){const{initialState:n="active"}=t,r=v1(n==="active");function i(){r.value=!1}function o(){r.value=!0}const s=(...l)=>{r.value&&e(...l)};return{isActive:ww(r),pause:i,resume:o,eventFilter:s}}function hy(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Lu(e){return Array.isArray(e)?e:[e]}function VD(e){return Ds()}function HD(e,t,n={}){const{eventFilter:r=g1,...i}=n;return He(e,zD(r,t),i)}function qD(e,t,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:s,pause:l,resume:u,isActive:d}=BD(r,{initialState:i});return{stop:HD(e,t,{...o,eventFilter:s}),pause:l,resume:u,isActive:d}}function Cc(e,t=!0,n){VD()?xt(e,n):t?e():gt(e)}function yie(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,i=Za(e),o=_n(e);function s(l){if(arguments.length)return o.value=l,o.value;{const u=ri(n);return o.value=o.value===u?ri(r):u,o.value}}return i?s:[o,s]}function WD(e,t,n){return He(e,t,{...n,immediate:!0})}const yo=LD?window:void 0;function fo(e){var t;const n=ri(e);return(t=n?.$el)!=null?t:n}function ja(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},r=(l,u,d,f)=>(l.addEventListener(u,d,f),()=>l.removeEventListener(u,d,f)),i=se(()=>{const l=Lu(ri(e[0])).filter(u=>u!=null);return l.every(u=>typeof u!="string")?l:void 0}),o=WD(()=>{var l,u;return[(u=(l=i.value)==null?void 0:l.map(d=>fo(d)))!=null?u:[yo].filter(d=>d!=null),Lu(ri(i.value?e[1]:e[0])),Lu(w(i.value?e[2]:e[1])),ri(i.value?e[3]:e[2])]},([l,u,d,f])=>{if(n(),!l?.length||!u?.length||!d?.length)return;const p=UD(f)?{...f}:f;t.push(...l.flatMap(v=>u.flatMap(y=>d.map(g=>r(v,y,g,p)))))},{flush:"post"}),s=()=>{o(),n()};return m1(n),s}function YD(){const e=_n(!1),t=Ds();return t&&xt(()=>{e.value=!0},t),e}function _1(e){const t=YD();return se(()=>(t.value,!!e()))}const KD=Symbol("vueuse-ssr-width");function GD(){const e=Sw()?FD(KD,null):null;return typeof e=="number"?e:void 0}function y1(e,t={}){const{window:n=yo,ssrWidth:r=GD()}=t,i=_1(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=_n(typeof r=="number"),s=_n(),l=_n(!1),u=d=>{l.value=d.matches};return zn(()=>{if(o.value){o.value=!i.value;const d=ri(e).split(",");l.value=d.some(f=>{const p=f.includes("not all"),v=f.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),y=f.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||y);return v&&g&&(g=r>=hy(v[1])),y&&g&&(g=r<=hy(y[1])),p?!g:g});return}i.value&&(s.value=n.matchMedia(ri(e)),l.value=s.value.matches)}),ja(s,"change",u,{passive:!0}),se(()=>l.value)}const du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fu="__vueuse_ssr_handlers__",QD=XD();function XD(){return fu in du||(du[fu]=du[fu]||{}),du[fu]}function b1(e,t){return QD[e]||t}function JD(e){return y1("(prefers-color-scheme: dark)",e)}function ZD(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const eF={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},my="vueuse-storage";function tF(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:u=!0,mergeDefaults:d=!1,shallow:f,window:p=yo,eventFilter:v,onError:y=D=>{console.error(D)},initOnMounted:g}=r,m=(f?_n:re)(typeof t=="function"?t():t),b=se(()=>ri(e));if(!n)try{n=b1("getDefaultStorage",()=>{var D;return(D=yo)==null?void 0:D.localStorage})()}catch(D){y(D)}if(!n)return m;const x=ri(t),S=ZD(x),O=(i=r.serializer)!=null?i:eF[S],{pause:T,resume:A}=qD(m,D=>W(D),{flush:o,deep:s,eventFilter:v});He(b,()=>K(),{flush:o});let M=!1;const z=D=>{g&&!M||K(D)},Y=D=>{g&&!M||L(D)};p&&l&&(n instanceof Storage?ja(p,"storage",z,{passive:!0}):ja(p,my,Y)),g?Cc(()=>{M=!0,K()}):K();function ve(D,ne){if(p){const le={key:b.value,oldValue:D,newValue:ne,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent("storage",le):new CustomEvent(my,{detail:le}))}}function W(D){try{const ne=n.getItem(b.value);if(D==null)ve(ne,null),n.removeItem(b.value);else{const le=O.write(D);ne!==le&&(n.setItem(b.value,le),ve(ne,le))}}catch(ne){y(ne)}}function X(D){const ne=D?D.newValue:n.getItem(b.value);if(ne==null)return u&&x!=null&&n.setItem(b.value,O.write(x)),x;if(!D&&d){const le=O.read(ne);return typeof d=="function"?d(le,x):S==="object"&&!Array.isArray(le)?{...x,...le}:le}else return typeof ne!="string"?ne:O.read(ne)}function K(D){if(!(D&&D.storageArea!==n)){if(D&&D.key==null){m.value=x;return}if(!(D&&D.key!==b.value)){T();try{const ne=O.write(m.value);(D===void 0||D?.newValue!==ne)&&(m.value=X(D))}catch(ne){y(ne)}finally{D?gt(A):A()}}}}function L(D){K(D.detail)}return m}const nF="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function rF(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=yo,storage:o,storageKey:s="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:u,emitAuto:d,disableTransition:f=!0}=e,p={auto:"",light:"light",dark:"dark",...e.modes||{}},v=JD({window:i}),y=se(()=>v.value?"dark":"light"),g=u||(s==null?v1(r):tF(s,r,o,{window:i,listenToStorageChanges:l})),m=se(()=>g.value==="auto"?y.value:g.value),b=b1("updateHTMLAttrs",(T,A,M)=>{const z=typeof T=="string"?i?.document.querySelector(T):fo(T);if(!z)return;const Y=new Set,ve=new Set;let W=null;if(A==="class"){const K=M.split(/\s/g);Object.values(p).flatMap(L=>(L||"").split(/\s/g)).filter(Boolean).forEach(L=>{K.includes(L)?Y.add(L):ve.add(L)})}else W={key:A,value:M};if(Y.size===0&&ve.size===0&&W===null)return;let X;f&&(X=i.document.createElement("style"),X.appendChild(document.createTextNode(nF)),i.document.head.appendChild(X));for(const K of Y)z.classList.add(K);for(const K of ve)z.classList.remove(K);W&&z.setAttribute(W.key,W.value),f&&(i.getComputedStyle(X).opacity,document.head.removeChild(X))});function x(T){var A;b(t,n,(A=p[T])!=null?A:T)}function S(T){e.onChanged?e.onChanged(T,x):x(T)}He(m,S,{flush:"post",immediate:!0}),Cc(()=>S(m.value));const O=se({get(){return d?g.value:m.value},set(T){g.value=T}});return Object.assign(O,{store:g,system:y,state:m})}function bie(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=rF({...e,onChanged:(s,l)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,s==="dark",l,s):l(s)},modes:{dark:t,light:n}}),i=se(()=>r.system.value);return se({get(){return r.value==="dark"},set(s){const l=s?"dark":"light";i.value===l?r.value="auto":r.value=l}})}function iF(e,t,n={}){const{window:r=yo,...i}=n;let o;const s=_1(()=>r&&"ResizeObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},u=se(()=>{const p=ri(e);return Array.isArray(p)?p.map(v=>fo(v)):[fo(p)]}),d=He(u,p=>{if(l(),s.value&&r){o=new ResizeObserver(t);for(const v of p)v&&o.observe(v,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),d()};return m1(f),{isSupported:s,stop:f}}function Fh(e,t={width:0,height:0},n={}){const{window:r=yo,box:i="content-box"}=n,o=se(()=>{var p,v;return(v=(p=fo(e))==null?void 0:p.namespaceURI)==null?void 0:v.includes("svg")}),s=_n(t.width),l=_n(t.height),{stop:u}=iF(e,([p])=>{const v=i==="border-box"?p.borderBoxSize:i==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(r&&o.value){const y=fo(e);if(y){const g=y.getBoundingClientRect();s.value=g.width,l.value=g.height}}else if(v){const y=Lu(v);s.value=y.reduce((g,{inlineSize:m})=>g+m,0),l.value=y.reduce((g,{blockSize:m})=>g+m,0)}else s.value=p.contentRect.width,l.value=p.contentRect.height},n);Cc(()=>{const p=fo(e);p&&(s.value="offsetWidth"in p?p.offsetWidth:t.width,l.value="offsetHeight"in p?p.offsetHeight:t.height)});const d=He(()=>fo(e),p=>{s.value=p?t.width:0,l.value=p?t.height:0});function f(){u(),d()}return{width:s,height:l,stop:f}}function wie(e={}){const{window:t=yo,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:s="inner"}=e,l=_n(n),u=_n(r),d=()=>{if(t)if(s==="outer")l.value=t.outerWidth,u.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:p,height:v,scale:y}=t.visualViewport;l.value=Math.round(p*y),u.value=Math.round(v*y)}else o?(l.value=t.innerWidth,u.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,u.value=t.document.documentElement.clientHeight)};d(),Cc(d);const f={passive:!0};if(ja("resize",d,f),t&&s==="visual"&&t.visualViewport&&ja(t.visualViewport,"resize",d,f),i){const p=y1("(orientation: portrait)");He(p,()=>d())}return{width:l,height:u}}const oF=ze({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){var n,r;const i=_n(),o=Hn(Fh(i,{width:(n=e.width)!=null?n:0,height:(r=e.height)!=null?r:0},{box:e.box}));return()=>{if(t.default)return Ia(e.as||"div",{ref:i},t.default(o))}}}),sF={ref:"el",class:"relative"},aF={class:"absolute opacity-0 pointer-events-none flex"},lF=["itemKey"],uF=ze({__name:"AutoWrapRow",props:{list:{},moreWidth:{default:70},gap:{default:5},getKey:{}},setup(e){const t=e,n=re(new Map),r=_i("el"),i=_i("items"),{width:o}=Fh(r),s=re([]),l=re(!1),u=se(()=>o.value-t.moreWidth),d=se(()=>{const m=s.value.map(b=>b.key);return t.list.filter(b=>m.includes(t.getKey(b)))}),f=se(()=>l.value?t.list.length-s.value.length:0),p=se(()=>{let m=0;for(const b of n.value.values())m+=b;return m});function v(m,b){n.value.set(m,b)}function y(){const m=new Map;for(const b of t.list){const x=t.getKey(b);m.set(x,n.value.get(x)??0)}n.value=m}const g=lP(()=>{let m=0;const b=[];if(!(!i.value||t.list.length===0)){for(const x of t.list){const S=t.getKey(x),O=i.value.find(T=>T.getAttribute("itemKey")===S);if(O){if(m+=O.offsetWidth+t.gap,m>u.value)break;b.push({key:S,value:O.offsetWidth})}}s.value=b,l.value=!0}},100);return He([()=>o.value,()=>t.list,()=>p.value],([,,m],[,,b])=>{m!==b&&(l.value=!1),g()},{flush:"post",deep:!0}),He(()=>t.list.length,()=>{y()}),(m,b)=>(C(),R("div",sF,[mt(m.$slots,"display",{visibleList:d.value,overflow:f.value}),_("div",aF,[(C(!0),R(We,null,ct(e.list,(x,S)=>(C(),Ee(w(oF),{key:e.getKey(x)},{default:Le(({width:O})=>[Et(q(v(e.getKey(x),Number(O)))+" ",1),_("div",{ref_for:!0,ref:"items",itemKey:e.getKey(x),class:"invisible whitespace-nowrap"},[mt(m.$slots,"measure",{item:x,index:S})],8,lF)]),_:2},1024))),128))])],512))}}),Lh=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},w1=/^[a-z0-9]+(-[a-z0-9]+)*$/,xc=(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 l=i.pop(),u=i.pop(),d={provider:i.length>0?i[0]:r,prefix:u,name:l};return t&&!ju(d)?null:d}const o=i[0],s=o.split("-");if(s.length>1){const l={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!ju(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:o};return t&&!ju(l,n)?null:l}return null},ju=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function cF(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const l=r[s]&&r[s].parent,u=l&&o(l);u&&(i[s]=[l].concat(u))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}const E1=Object.freeze({left:0,top:0,width:16,height:16}),ac=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Tc=Object.freeze({...E1,...ac}),Pp=Object.freeze({...Tc,body:"",hidden:!1});function dF(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 vy(e,t){const n=dF(e,t);for(const r in Pp)r in ac?r in e&&!(r in n)&&(n[r]=ac[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function fF(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function s(l){o=vy(r[l]||i[l],o)}return s(t),n.forEach(s),vy(e,o)}function S1(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=cF(e);for(const i in r){const o=r[i];o&&(t(i,fF(e,i,o)),n.push(i))}return n}const pF={provider:"",aliases:{},not_found:{},...E1};function Tf(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function C1(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Tf(e,pF))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!Tf(o,Pp))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i||typeof s!="string"||!n[s]&&!r[s]||!Tf(o,Pp))return null}return t}const gy=Object.create(null);function hF(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Us(e,t){const n=gy[e]||(gy[e]=Object.create(null));return n[t]||(n[t]=hF(e,t))}function x1(e,t){return C1(t)?S1(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function mF(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ua=!1;function T1(e){return typeof e=="boolean"&&(Ua=e),Ua}function vF(e){const t=typeof e=="string"?xc(e,!0,Ua):e;if(t){const n=Us(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function gF(e,t){const n=xc(e,!0,Ua);if(!n)return!1;const r=Us(n.provider,n.prefix);return t?mF(r,n.name,t):(r.missing.add(n.name),!0)}function _F(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ua&&!t&&!e.prefix){let r=!1;return C1(e)&&(e.prefix="",S1(e,(i,o)=>{gF(i,o)&&(r=!0)})),r}const n=e.prefix;return ju({prefix:n,name:"a"})?!!x1(Us(t,n),e):!1}const k1=Object.freeze({width:null,height:null}),O1=Object.freeze({...k1,...ac}),yF=/(-?[0-9.]*[0-9]+[0-9.]*)/g,bF=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function _y(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(yF);if(r===null||!r.length)return e;const i=[];let o=r.shift(),s=bF.test(o);for(;;){if(s){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function wF(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("</"+t);if(i===-1||o===-1)break;const s=e.indexOf(">",o);if(s===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:n,content:e}}function EF(e,t){return e?"<defs>"+e+"</defs>"+t:t}function SF(e,t,n){const r=wF(e);return EF(r.defs,t+r.content+n)}const CF=e=>e==="unset"||e==="undefined"||e==="none";function xF(e,t){const n={...Tc,...e},r={...O1,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const b=[],x=m.hFlip,S=m.vFlip;let O=m.rotate;x?S?O+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):S&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let T;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:T=i.height/2+i.top,b.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:T=i.width/2+i.left,b.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}O%2===1&&(i.left!==i.top&&(T=i.left,i.left=i.top,i.top=T),i.width!==i.height&&(T=i.width,i.width=i.height,i.height=T)),b.length&&(o=SF(o,'<g transform="'+b.join(" ")+'">',"</g>"))});const s=r.width,l=r.height,u=i.width,d=i.height;let f,p;s===null?(p=l===null?"1em":l==="auto"?d:l,f=_y(p,u/d)):(f=s==="auto"?u:s,p=l===null?_y(f,d/u):l==="auto"?d:l);const v={},y=(m,b)=>{CF(b)||(v[m]=b.toString())};y("width",f),y("height",p);const g=[i.left,i.top,u,d];return v.viewBox=g.join(" "),{attributes:v,viewBox:g,body:o}}const TF=/\sid="(\S+)"/g,yy=new Map;function kF(e){e=e.replace(/[0-9]+$/,"")||"a";const t=yy.get(e)||0;return yy.set(e,t+1),t?`${e}${t}`:e}function OF(e){const t=[];let n;for(;n=TF.exec(e);)t.push(n[1]);if(!t.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const o=kF(i),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Ip=Object.create(null);function $F(e,t){Ip[e]=t}function Mp(e){return Ip[e]||Ip[""]}function jh(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 Uh=Object.create(null),wa=["https://api.simplesvg.com","https://api.unisvg.com"],Uu=[];for(;wa.length>0;)wa.length===1||Math.random()>.5?Uu.push(wa.shift()):Uu.push(wa.pop());Uh[""]=jh({resources:["https://api.iconify.design"].concat(Uu)});function AF(e,t){const n=jh(t);return n===null?!1:(Uh[e]=n,!0)}function Nh(e){return Uh[e]}const RF=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let by=RF();function PF(e,t){const n=Nh(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function IF(e){return e===404}const MF=(e,t,n)=>{const r=[],i=PF(e,t),o="icons";let s={type:o,provider:e,prefix:t,icons:[]},l=0;return n.forEach((u,d)=>{l+=u.length+1,l>=i&&d>0&&(r.push(s),s={type:o,provider:e,prefix:t,icons:[]},l=u.length),s.icons.push(u)}),r.push(s),r};function DF(e){if(typeof e=="string"){const t=Nh(e);if(t)return t.path}return"/"}const FF=(e,t,n)=>{if(!by){n("abort",424);return}let r=DF(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),l=new URLSearchParams({icons:s});r+=o+".json?"+l.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;by(e+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(IF(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},LF={prepare:MF,send:FF};function $1(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function jF(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(o=>{const s=o.icons,l=s.pending.length;s.pending=s.pending.filter(u=>{if(u.prefix!==i)return!0;const d=u.name;if(e.icons[d])s.loaded.push({provider:r,prefix:i,name:d});else if(e.missing.has(d))s.missing.push({provider:r,prefix:i,name:d});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||$1([e],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let UF=0;function NF(e,t,n){const r=UF++,i=$1.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function zF(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,l=i.name,u=n[o]||(n[o]=Object.create(null)),d=u[s]||(u[s]=Us(o,s));let f;l in d.icons?f=t.loaded:s===""||d.missing.has(l)?f=t.missing:f=t.pending;const p={provider:o,prefix:s,name:l};f.push(p)}),t}function BF(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?xc(i,t,n):i;o&&r.push(o)}),r}const VF={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function HF(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let M=e.resources.slice(0);for(s=[];M.length>1;){const z=Math.floor(Math.random()*M.length);s.push(M[z]),M=M.slice(0,z).concat(M.slice(z+1))}s=s.concat(M)}else s=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let u="pending",d=0,f,p=null,v=[],y=[];typeof r=="function"&&y.push(r);function g(){p&&(clearTimeout(p),p=null)}function m(){u==="pending"&&(u="aborted"),g(),v.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),v=[]}function b(M,z){z&&(y=[]),typeof M=="function"&&y.push(M)}function x(){return{startTime:l,payload:t,status:u,queriesSent:d,queriesPending:v.length,subscribe:b,abort:m}}function S(){u="failed",y.forEach(M=>{M(void 0,f)})}function O(){v.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),v=[]}function T(M,z,Y){const ve=z!=="success";switch(v=v.filter(W=>W!==M),u){case"pending":break;case"failed":if(ve||!e.dataAfterTimeout)return;break;default:return}if(z==="abort"){f=Y,S();return}if(ve){f=Y,v.length||(s.length?A():S());return}if(g(),O(),!e.random){const W=e.resources.indexOf(M.resource);W!==-1&&W!==e.index&&(e.index=W)}u="completed",y.forEach(W=>{W(Y)})}function A(){if(u!=="pending")return;g();const M=s.shift();if(M===void 0){if(v.length){p=setTimeout(()=>{g(),u==="pending"&&(O(),S())},e.timeout);return}S();return}const z={status:"pending",resource:M,callback:(Y,ve)=>{T(z,Y,ve)}};v.push(z),d++,p=setTimeout(A,e.rotate),n(M,t,z.callback)}return setTimeout(A),x}function A1(e){const t={...VF,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,l,u){const d=HF(t,s,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function wy(){}const kf=Object.create(null);function qF(e){if(!kf[e]){const t=Nh(e);if(!t)return;kf[e]={config:t,redundancy:A1(t)}}return kf[e]}function WF(e,t,n){let r,i;if(typeof e=="string"){const o=Mp(e);if(!o)return n(void 0,424),wy;i=o.send;const s=qF(e);s&&(r=s.redundancy)}else{const o=jh(e);if(o){r=A1(o);const s=Mp(e.resources?e.resources[0]:"");s&&(i=s.send)}}return!r||!i?(n(void 0,424),wy):r.query(t,i,n)().abort}function Ey(){}function YF(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,jF(e)}))}function KF(e){const t=[],n=[];return e.forEach(r=>{(r.match(w1)?t:n).push(r)}),{valid:t,invalid:n}}function Ea(e,t,n){function r(){const i=e.pendingIcons;t.forEach(o=>{i&&i.delete(o),e.icons[o]||e.missing.add(o)})}if(n&&typeof n=="object")try{if(!x1(e,n).length){r();return}}catch(i){console.error(i)}r(),YF(e)}function Sy(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function GF(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;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){Sy(e.loadIcons(i,r,n),d=>{Ea(e,i,d)});return}if(o){i.forEach(d=>{Sy(o(d,r,n),f=>{Ea(e,[d],f?{prefix:r,icons:{[d]:f}}:null)})});return}const{valid:s,invalid:l}=KF(i);if(l.length&&Ea(e,l,null),!s.length)return;const u=r.match(w1)?Mp(n):null;if(!u){Ea(e,s,null);return}u.prepare(n,r,s).forEach(d=>{WF(n,d,f=>{Ea(e,d.icons,f)})})}))}const QF=(e,t)=>{const n=zF(BF(e,!0,T1()));if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,Ey)}),()=>{l=!1}}const r=Object.create(null),i=[];let o,s;return n.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===s&&u===o)return;o=u,s=d,i.push(Us(u,d));const f=r[u]||(r[u]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=Us(u,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(f)||(v.add(f),r[u][d].push(f))}),i.forEach(l=>{const u=r[l.provider][l.prefix];u.length&&GF(l,u)}),t?NF(t,n,i):Ey};function XF(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in k1?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const JF=/[\s,]+/;function ZF(e,t){t.split(JF).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function eL(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 o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function tL(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 nL(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function rL(e){return"data:image/svg+xml,"+nL(e)}function iL(e){return'url("'+rL(e)+'")'}const Cy={...O1,inline:!1},oL={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},sL={display:"inline-block"},Dp={backgroundColor:"currentColor"},R1={backgroundColor:"transparent"},xy={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ty={webkitMask:Dp,mask:Dp,background:R1};for(const e in Ty){const t=Ty[e];for(const n in xy)t[e+n]=xy[n]}const Nu={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Nu[e+"-flip"]=t,Nu[e.slice(0,1)+"-flip"]=t,Nu[e+"Flip"]=t});function ky(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Oy=(e,t)=>{const n=XF(Cy,t),r={...oL},i=t.mode||"svg",o={},s=t.style,l=typeof s=="object"&&!(s instanceof Array)?s:{};for(let m in t){const b=t[m];if(b!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[m]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&ZF(n,b);break;case"color":o.color=b;break;case"rotate":typeof b=="string"?n[m]=eL(b):typeof b=="number"&&(n[m]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete r["aria-hidden"];break;default:{const x=Nu[m];x?(b===!0||b==="true"||b===1)&&(n[x]=!0):Cy[m]===void 0&&(r[m]=b)}}}const u=xF(e,n),d=u.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),i==="svg")return r.style={...o,...l},Object.assign(r,d),r.innerHTML=OF(u.body),Ia("svg",r);const{body:f,width:p,height:v}=e,y=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=tL(f,{...d,width:p+"",height:v+""});return r.style={...o,"--svg":iL(g),width:ky(d.width),height:ky(d.height),...sL,...y?Dp:R1,...l},Ia("span",r)};T1(!0);$F("",LF);if(typeof document<"u"&&typeof window<"u"){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"||!_F(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;AF(n,i)||console.error(r)}catch{console.error(r)}}}}const aL={...Tc,body:""},lL=ze((e,{emit:t})=>{const n=re(null);function r(){n.value&&(n.value.abort?.(),n.value=null)}const i=re(!!e.ssr),o=re(""),s=_n(null);function l(){const d=e.icon;if(typeof d=="object"&&d!==null&&typeof d.body=="string")return o.value="",{data:d};let f;if(typeof d!="string"||(f=xc(d,!1,!0))===null)return null;let p=vF(f);if(!p){const g=n.value;return(!g||g.name!==d)&&(p===null?n.value={name:d}:n.value={name:d,abort:QF([f],u)}),null}r(),o.value!==d&&(o.value=d,gt(()=>{t("load",d)}));const v=e.customise;if(v){p=Object.assign({},p);const g=v(p.body,f.name,f.prefix,f.provider);typeof g=="string"&&(p.body=g)}const y=["iconify"];return f.prefix!==""&&y.push("iconify--"+f.prefix),f.provider!==""&&y.push("iconify--"+f.provider),{data:p,classes:y}}function u(){const d=l();d?d.data!==s.value?.data&&(s.value=d):s.value=null}return i.value?u():xt(()=>{i.value=!0,u()}),He(()=>e.icon,u),xn(r),()=>{const d=s.value;if(!d)return Oy(aL,e);let f=e;return d.classes&&(f={...e,class:d.classes.join(" ")}),Oy({...Tc,...d.data},f)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});var pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zu={exports:{}},uL=zu.exports,$y;function cL(){return $y||($y=1,(function(e,t){(function(){var n,r="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",u="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",v=1,y=2,g=4,m=1,b=2,x=1,S=2,O=4,T=8,A=16,M=32,z=64,Y=128,ve=256,W=512,X=30,K="...",L=800,D=16,ne=1,le=2,je=3,J=1/0,j=9007199254740991,de=17976931348623157e292,U=NaN,ee=4294967295,Q=ee-1,B=ee>>>1,oe=[["ary",Y],["bind",x],["bindKey",S],["curry",T],["curryRight",A],["flip",W],["partial",M],["partialRight",z],["rearg",ve]],V="[object Arguments]",P="[object Array]",F="[object AsyncFunction]",G="[object Boolean]",N="[object Date]",ie="[object DOMException]",ge="[object Error]",fe="[object Function]",pe="[object GeneratorFunction]",Ce="[object Map]",$e="[object Number]",Ke="[object Null]",Ne="[object Object]",tt="[object Promise]",Ge="[object Proxy]",Ze="[object RegExp]",Pt="[object Set]",St="[object String]",Nt="[object Symbol]",It="[object Undefined]",qt="[object WeakMap]",Gt="[object WeakSet]",Wt="[object ArrayBuffer]",nn="[object DataView]",Dn="[object Float32Array]",_e="[object Float64Array]",ue="[object Int8Array]",ye="[object Int16Array]",Fe="[object Int32Array]",qe="[object Uint8Array]",xe="[object Uint8ClampedArray]",et="[object Uint16Array]",be="[object Uint32Array]",ke=/\b__p \+= '';/g,Ie=/\b(__p \+=) '' \+/g,Oe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ue=/&(?:amp|lt|gt|quot|#39);/g,pr=/[&<>"']/g,Fn=RegExp(Ue.source),qn=RegExp(pr.source),kn=/<%-([\s\S]+?)%>/g,dn=/<%([\s\S]+?)%>/g,ko=/<%=([\s\S]+?)%>/g,cd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bl=/^\w*$/,is=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yi=/[\\^$.*+?()[\]{}|]/g,os=RegExp(Yi.source),Ki=/^\s+/,dd=/\s/,wl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,P2=/\{\n\/\* \[wrapped with (.+)\] \*/,I2=/,? & /,M2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uv=/[()=,{}\[\]\/\s]/,D2=/\\(\\)?/g,F2=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cv=/\w*$/,L2=/^[-+]0x[0-9a-f]+$/i,j2=/^0b[01]+$/i,U2=/^\[object .+?Constructor\]$/,N2=/^0o[0-7]+$/i,z2=/^(?:0|[1-9]\d*)$/,B2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,El=/($^)/,V2=/['\n\r\u2028\u2029\\]/g,Sl="\\ud800-\\udfff",H2="\\u0300-\\u036f",q2="\\ufe20-\\ufe2f",W2="\\u20d0-\\u20ff",dv=H2+q2+W2,fv="\\u2700-\\u27bf",pv="a-z\\xdf-\\xf6\\xf8-\\xff",Y2="\\xac\\xb1\\xd7\\xf7",K2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",G2="\\u2000-\\u206f",Q2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hv="A-Z\\xc0-\\xd6\\xd8-\\xde",mv="\\ufe0e\\ufe0f",vv=Y2+K2+G2+Q2,fd="['’]",X2="["+Sl+"]",gv="["+vv+"]",Cl="["+dv+"]",_v="\\d+",J2="["+fv+"]",yv="["+pv+"]",bv="[^"+Sl+vv+_v+fv+pv+hv+"]",pd="\\ud83c[\\udffb-\\udfff]",Z2="(?:"+Cl+"|"+pd+")",wv="[^"+Sl+"]",hd="(?:\\ud83c[\\udde6-\\uddff]){2}",md="[\\ud800-\\udbff][\\udc00-\\udfff]",ss="["+hv+"]",Ev="\\u200d",Sv="(?:"+yv+"|"+bv+")",ex="(?:"+ss+"|"+bv+")",Cv="(?:"+fd+"(?:d|ll|m|re|s|t|ve))?",xv="(?:"+fd+"(?:D|LL|M|RE|S|T|VE))?",Tv=Z2+"?",kv="["+mv+"]?",tx="(?:"+Ev+"(?:"+[wv,hd,md].join("|")+")"+kv+Tv+")*",nx="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ov=kv+Tv+tx,ix="(?:"+[J2,hd,md].join("|")+")"+Ov,ox="(?:"+[wv+Cl+"?",Cl,hd,md,X2].join("|")+")",sx=RegExp(fd,"g"),ax=RegExp(Cl,"g"),vd=RegExp(pd+"(?="+pd+")|"+ox+Ov,"g"),lx=RegExp([ss+"?"+yv+"+"+Cv+"(?="+[gv,ss,"$"].join("|")+")",ex+"+"+xv+"(?="+[gv,ss+Sv,"$"].join("|")+")",ss+"?"+Sv+"+"+Cv,ss+"+"+xv,rx,nx,_v,ix].join("|"),"g"),ux=RegExp("["+Ev+Sl+dv+mv+"]"),cx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dx=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],fx=-1,Kt={};Kt[Dn]=Kt[_e]=Kt[ue]=Kt[ye]=Kt[Fe]=Kt[qe]=Kt[xe]=Kt[et]=Kt[be]=!0,Kt[V]=Kt[P]=Kt[Wt]=Kt[G]=Kt[nn]=Kt[N]=Kt[ge]=Kt[fe]=Kt[Ce]=Kt[$e]=Kt[Ne]=Kt[Ze]=Kt[Pt]=Kt[St]=Kt[qt]=!1;var Yt={};Yt[V]=Yt[P]=Yt[Wt]=Yt[nn]=Yt[G]=Yt[N]=Yt[Dn]=Yt[_e]=Yt[ue]=Yt[ye]=Yt[Fe]=Yt[Ce]=Yt[$e]=Yt[Ne]=Yt[Ze]=Yt[Pt]=Yt[St]=Yt[Nt]=Yt[qe]=Yt[xe]=Yt[et]=Yt[be]=!0,Yt[ge]=Yt[fe]=Yt[qt]=!1;var px={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},hx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mx={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},vx={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},gx=parseFloat,_x=parseInt,$v=typeof pu=="object"&&pu&&pu.Object===Object&&pu,yx=typeof self=="object"&&self&&self.Object===Object&&self,bn=$v||yx||Function("return this")(),gd=t&&!t.nodeType&&t,Oo=gd&&!0&&e&&!e.nodeType&&e,Av=Oo&&Oo.exports===gd,_d=Av&&$v.process,Tr=(function(){try{var ae=Oo&&Oo.require&&Oo.require("util").types;return ae||_d&&_d.binding&&_d.binding("util")}catch{}})(),Rv=Tr&&Tr.isArrayBuffer,Pv=Tr&&Tr.isDate,Iv=Tr&&Tr.isMap,Mv=Tr&&Tr.isRegExp,Dv=Tr&&Tr.isSet,Fv=Tr&&Tr.isTypedArray;function hr(ae,Te,we){switch(we.length){case 0:return ae.call(Te);case 1:return ae.call(Te,we[0]);case 2:return ae.call(Te,we[0],we[1]);case 3:return ae.call(Te,we[0],we[1],we[2])}return ae.apply(Te,we)}function bx(ae,Te,we,Ye){for(var pt=-1,Lt=ae==null?0:ae.length;++pt<Lt;){var fn=ae[pt];Te(Ye,fn,we(fn),ae)}return Ye}function mr(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye&&Te(ae[we],we,ae)!==!1;);return ae}function wx(ae,Te){for(var we=ae==null?0:ae.length;we--&&Te(ae[we],we,ae)!==!1;);return ae}function Lv(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye;)if(!Te(ae[we],we,ae))return!1;return!0}function Gi(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length,pt=0,Lt=[];++we<Ye;){var fn=ae[we];Te(fn,we,ae)&&(Lt[pt++]=fn)}return Lt}function xl(ae,Te){var we=ae==null?0:ae.length;return!!we&&as(ae,Te,0)>-1}function yd(ae,Te,we){for(var Ye=-1,pt=ae==null?0:ae.length;++Ye<pt;)if(we(Te,ae[Ye]))return!0;return!1}function Qt(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length,pt=Array(Ye);++we<Ye;)pt[we]=Te(ae[we],we,ae);return pt}function Qi(ae,Te){for(var we=-1,Ye=Te.length,pt=ae.length;++we<Ye;)ae[pt+we]=Te[we];return ae}function bd(ae,Te,we,Ye){var pt=-1,Lt=ae==null?0:ae.length;for(Ye&&Lt&&(we=ae[++pt]);++pt<Lt;)we=Te(we,ae[pt],pt,ae);return we}function Ex(ae,Te,we,Ye){var pt=ae==null?0:ae.length;for(Ye&&pt&&(we=ae[--pt]);pt--;)we=Te(we,ae[pt],pt,ae);return we}function wd(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye;)if(Te(ae[we],we,ae))return!0;return!1}var Sx=Ed("length");function Cx(ae){return ae.split("")}function xx(ae){return ae.match(M2)||[]}function jv(ae,Te,we){var Ye;return we(ae,function(pt,Lt,fn){if(Te(pt,Lt,fn))return Ye=Lt,!1}),Ye}function Tl(ae,Te,we,Ye){for(var pt=ae.length,Lt=we+(Ye?1:-1);Ye?Lt--:++Lt<pt;)if(Te(ae[Lt],Lt,ae))return Lt;return-1}function as(ae,Te,we){return Te===Te?Lx(ae,Te,we):Tl(ae,Uv,we)}function Tx(ae,Te,we,Ye){for(var pt=we-1,Lt=ae.length;++pt<Lt;)if(Ye(ae[pt],Te))return pt;return-1}function Uv(ae){return ae!==ae}function Nv(ae,Te){var we=ae==null?0:ae.length;return we?Cd(ae,Te)/we:U}function Ed(ae){return function(Te){return Te==null?n:Te[ae]}}function Sd(ae){return function(Te){return ae==null?n:ae[Te]}}function zv(ae,Te,we,Ye,pt){return pt(ae,function(Lt,fn,Bt){we=Ye?(Ye=!1,Lt):Te(we,Lt,fn,Bt)}),we}function kx(ae,Te){var we=ae.length;for(ae.sort(Te);we--;)ae[we]=ae[we].value;return ae}function Cd(ae,Te){for(var we,Ye=-1,pt=ae.length;++Ye<pt;){var Lt=Te(ae[Ye]);Lt!==n&&(we=we===n?Lt:we+Lt)}return we}function xd(ae,Te){for(var we=-1,Ye=Array(ae);++we<ae;)Ye[we]=Te(we);return Ye}function Ox(ae,Te){return Qt(Te,function(we){return[we,ae[we]]})}function Bv(ae){return ae&&ae.slice(0,Wv(ae)+1).replace(Ki,"")}function vr(ae){return function(Te){return ae(Te)}}function Td(ae,Te){return Qt(Te,function(we){return ae[we]})}function sa(ae,Te){return ae.has(Te)}function Vv(ae,Te){for(var we=-1,Ye=ae.length;++we<Ye&&as(Te,ae[we],0)>-1;);return we}function Hv(ae,Te){for(var we=ae.length;we--&&as(Te,ae[we],0)>-1;);return we}function $x(ae,Te){for(var we=ae.length,Ye=0;we--;)ae[we]===Te&&++Ye;return Ye}var Ax=Sd(px),Rx=Sd(hx);function Px(ae){return"\\"+vx[ae]}function Ix(ae,Te){return ae==null?n:ae[Te]}function ls(ae){return ux.test(ae)}function Mx(ae){return cx.test(ae)}function Dx(ae){for(var Te,we=[];!(Te=ae.next()).done;)we.push(Te.value);return we}function kd(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye,pt){we[++Te]=[pt,Ye]}),we}function qv(ae,Te){return function(we){return ae(Te(we))}}function Xi(ae,Te){for(var we=-1,Ye=ae.length,pt=0,Lt=[];++we<Ye;){var fn=ae[we];(fn===Te||fn===p)&&(ae[we]=p,Lt[pt++]=we)}return Lt}function kl(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye){we[++Te]=Ye}),we}function Fx(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye){we[++Te]=[Ye,Ye]}),we}function Lx(ae,Te,we){for(var Ye=we-1,pt=ae.length;++Ye<pt;)if(ae[Ye]===Te)return Ye;return-1}function jx(ae,Te,we){for(var Ye=we+1;Ye--;)if(ae[Ye]===Te)return Ye;return Ye}function us(ae){return ls(ae)?Nx(ae):Sx(ae)}function qr(ae){return ls(ae)?zx(ae):Cx(ae)}function Wv(ae){for(var Te=ae.length;Te--&&dd.test(ae.charAt(Te)););return Te}var Ux=Sd(mx);function Nx(ae){for(var Te=vd.lastIndex=0;vd.test(ae);)++Te;return Te}function zx(ae){return ae.match(vd)||[]}function Bx(ae){return ae.match(lx)||[]}var Vx=(function ae(Te){Te=Te==null?bn:cs.defaults(bn.Object(),Te,cs.pick(bn,dx));var we=Te.Array,Ye=Te.Date,pt=Te.Error,Lt=Te.Function,fn=Te.Math,Bt=Te.Object,Od=Te.RegExp,Hx=Te.String,kr=Te.TypeError,Ol=we.prototype,qx=Lt.prototype,ds=Bt.prototype,$l=Te["__core-js_shared__"],Al=qx.toString,jt=ds.hasOwnProperty,Wx=0,Yv=(function(){var a=/[^.]+$/.exec($l&&$l.keys&&$l.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})(),Rl=ds.toString,Yx=Al.call(Bt),Kx=bn._,Gx=Od("^"+Al.call(jt).replace(Yi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pl=Av?Te.Buffer:n,Ji=Te.Symbol,Il=Te.Uint8Array,Kv=Pl?Pl.allocUnsafe:n,Ml=qv(Bt.getPrototypeOf,Bt),Gv=Bt.create,Qv=ds.propertyIsEnumerable,Dl=Ol.splice,Xv=Ji?Ji.isConcatSpreadable:n,aa=Ji?Ji.iterator:n,$o=Ji?Ji.toStringTag:n,Fl=(function(){try{var a=Mo(Bt,"defineProperty");return a({},"",{}),a}catch{}})(),Qx=Te.clearTimeout!==bn.clearTimeout&&Te.clearTimeout,Xx=Ye&&Ye.now!==bn.Date.now&&Ye.now,Jx=Te.setTimeout!==bn.setTimeout&&Te.setTimeout,Ll=fn.ceil,jl=fn.floor,$d=Bt.getOwnPropertySymbols,Zx=Pl?Pl.isBuffer:n,Jv=Te.isFinite,eT=Ol.join,tT=qv(Bt.keys,Bt),pn=fn.max,On=fn.min,nT=Ye.now,rT=Te.parseInt,Zv=fn.random,iT=Ol.reverse,Ad=Mo(Te,"DataView"),la=Mo(Te,"Map"),Rd=Mo(Te,"Promise"),fs=Mo(Te,"Set"),ua=Mo(Te,"WeakMap"),ca=Mo(Bt,"create"),Ul=ua&&new ua,ps={},oT=Do(Ad),sT=Do(la),aT=Do(Rd),lT=Do(fs),uT=Do(ua),Nl=Ji?Ji.prototype:n,da=Nl?Nl.valueOf:n,eg=Nl?Nl.toString:n;function $(a){if(tn(a)&&!vt(a)&&!(a instanceof $t)){if(a instanceof Or)return a;if(jt.call(a,"__wrapped__"))return t_(a)}return new Or(a)}var hs=(function(){function a(){}return function(c){if(!Xt(c))return{};if(Gv)return Gv(c);a.prototype=c;var h=new a;return a.prototype=n,h}})();function zl(){}function Or(a,c){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=n}$.templateSettings={escape:kn,evaluate:dn,interpolate:ko,variable:"",imports:{_:$}},$.prototype=zl.prototype,$.prototype.constructor=$,Or.prototype=hs(zl.prototype),Or.prototype.constructor=Or;function $t(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function cT(){var a=new $t(this.__wrapped__);return a.__actions__=Wn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Wn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Wn(this.__views__),a}function dT(){if(this.__filtered__){var a=new $t(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function fT(){var a=this.__wrapped__.value(),c=this.__dir__,h=vt(a),E=c<0,k=h?a.length:0,I=Ck(0,k,this.__views__),H=I.start,te=I.end,ce=te-H,Ae=E?te:H-1,Re=this.__iteratees__,De=Re.length,Ve=0,Je=On(ce,this.__takeCount__);if(!h||!E&&k==ce&&Je==ce)return Cg(a,this.__actions__);var ut=[];e:for(;ce--&&Ve<Je;){Ae+=c;for(var bt=-1,it=a[Ae];++bt<De;){var Tt=Re[bt],At=Tt.iteratee,yr=Tt.type,Un=At(it);if(yr==le)it=Un;else if(!Un){if(yr==ne)continue e;break e}}ut[Ve++]=it}return ut}$t.prototype=hs(zl.prototype),$t.prototype.constructor=$t;function Ao(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var E=a[c];this.set(E[0],E[1])}}function pT(){this.__data__=ca?ca(null):{},this.size=0}function hT(a){var c=this.has(a)&&delete this.__data__[a];return this.size-=c?1:0,c}function mT(a){var c=this.__data__;if(ca){var h=c[a];return h===d?n:h}return jt.call(c,a)?c[a]:n}function vT(a){var c=this.__data__;return ca?c[a]!==n:jt.call(c,a)}function gT(a,c){var h=this.__data__;return this.size+=this.has(a)?0:1,h[a]=ca&&c===n?d:c,this}Ao.prototype.clear=pT,Ao.prototype.delete=hT,Ao.prototype.get=mT,Ao.prototype.has=vT,Ao.prototype.set=gT;function Ti(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var E=a[c];this.set(E[0],E[1])}}function _T(){this.__data__=[],this.size=0}function yT(a){var c=this.__data__,h=Bl(c,a);if(h<0)return!1;var E=c.length-1;return h==E?c.pop():Dl.call(c,h,1),--this.size,!0}function bT(a){var c=this.__data__,h=Bl(c,a);return h<0?n:c[h][1]}function wT(a){return Bl(this.__data__,a)>-1}function ET(a,c){var h=this.__data__,E=Bl(h,a);return E<0?(++this.size,h.push([a,c])):h[E][1]=c,this}Ti.prototype.clear=_T,Ti.prototype.delete=yT,Ti.prototype.get=bT,Ti.prototype.has=wT,Ti.prototype.set=ET;function ki(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var E=a[c];this.set(E[0],E[1])}}function ST(){this.size=0,this.__data__={hash:new Ao,map:new(la||Ti),string:new Ao}}function CT(a){var c=eu(this,a).delete(a);return this.size-=c?1:0,c}function xT(a){return eu(this,a).get(a)}function TT(a){return eu(this,a).has(a)}function kT(a,c){var h=eu(this,a),E=h.size;return h.set(a,c),this.size+=h.size==E?0:1,this}ki.prototype.clear=ST,ki.prototype.delete=CT,ki.prototype.get=xT,ki.prototype.has=TT,ki.prototype.set=kT;function Ro(a){var c=-1,h=a==null?0:a.length;for(this.__data__=new ki;++c<h;)this.add(a[c])}function OT(a){return this.__data__.set(a,d),this}function $T(a){return this.__data__.has(a)}Ro.prototype.add=Ro.prototype.push=OT,Ro.prototype.has=$T;function Wr(a){var c=this.__data__=new Ti(a);this.size=c.size}function AT(){this.__data__=new Ti,this.size=0}function RT(a){var c=this.__data__,h=c.delete(a);return this.size=c.size,h}function PT(a){return this.__data__.get(a)}function IT(a){return this.__data__.has(a)}function MT(a,c){var h=this.__data__;if(h instanceof Ti){var E=h.__data__;if(!la||E.length<i-1)return E.push([a,c]),this.size=++h.size,this;h=this.__data__=new ki(E)}return h.set(a,c),this.size=h.size,this}Wr.prototype.clear=AT,Wr.prototype.delete=RT,Wr.prototype.get=PT,Wr.prototype.has=IT,Wr.prototype.set=MT;function tg(a,c){var h=vt(a),E=!h&&Fo(a),k=!h&&!E&&ro(a),I=!h&&!E&&!k&&_s(a),H=h||E||k||I,te=H?xd(a.length,Hx):[],ce=te.length;for(var Ae in a)(c||jt.call(a,Ae))&&!(H&&(Ae=="length"||k&&(Ae=="offset"||Ae=="parent")||I&&(Ae=="buffer"||Ae=="byteLength"||Ae=="byteOffset")||Ai(Ae,ce)))&&te.push(Ae);return te}function ng(a){var c=a.length;return c?a[Bd(0,c-1)]:n}function DT(a,c){return tu(Wn(a),Po(c,0,a.length))}function FT(a){return tu(Wn(a))}function Pd(a,c,h){(h!==n&&!Kr(a[c],h)||h===n&&!(c in a))&&ci(a,c,h)}function fa(a,c,h){var E=a[c];(!(jt.call(a,c)&&Kr(E,h))||h===n&&!(c in a))&&ci(a,c,h)}function Bl(a,c){for(var h=a.length;h--;)if(Kr(a[h][0],c))return h;return-1}function LT(a,c,h,E){return Zi(a,function(k,I,H){c(E,k,h(k),H)}),E}function rg(a,c){return a&&fi(c,vn(c),a)}function jT(a,c){return a&&fi(c,Kn(c),a)}function ci(a,c,h){c=="__proto__"&&Fl?Fl(a,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):a[c]=h}function Id(a,c){for(var h=-1,E=c.length,k=we(E),I=a==null;++h<E;)k[h]=I?n:mf(a,c[h]);return k}function Po(a,c,h){return a===a&&(h!==n&&(a=a<=h?a:h),c!==n&&(a=a>=c?a:c)),a}function $r(a,c,h,E,k,I){var H,te=c&v,ce=c&y,Ae=c&g;if(h&&(H=k?h(a,E,k,I):h(a)),H!==n)return H;if(!Xt(a))return a;var Re=vt(a);if(Re){if(H=Tk(a),!te)return Wn(a,H)}else{var De=$n(a),Ve=De==fe||De==pe;if(ro(a))return kg(a,te);if(De==Ne||De==V||Ve&&!k){if(H=ce||Ve?{}:Wg(a),!te)return ce?mk(a,jT(H,a)):hk(a,rg(H,a))}else{if(!Yt[De])return k?a:{};H=kk(a,De,te)}}I||(I=new Wr);var Je=I.get(a);if(Je)return Je;I.set(a,H),w_(a)?a.forEach(function(it){H.add($r(it,c,h,it,a,I))}):y_(a)&&a.forEach(function(it,Tt){H.set(Tt,$r(it,c,h,Tt,a,I))});var ut=Ae?ce?Zd:Jd:ce?Kn:vn,bt=Re?n:ut(a);return mr(bt||a,function(it,Tt){bt&&(Tt=it,it=a[Tt]),fa(H,Tt,$r(it,c,h,Tt,a,I))}),H}function UT(a){var c=vn(a);return function(h){return ig(h,a,c)}}function ig(a,c,h){var E=h.length;if(a==null)return!E;for(a=Bt(a);E--;){var k=h[E],I=c[k],H=a[k];if(H===n&&!(k in a)||!I(H))return!1}return!0}function og(a,c,h){if(typeof a!="function")throw new kr(s);return ya(function(){a.apply(n,h)},c)}function pa(a,c,h,E){var k=-1,I=xl,H=!0,te=a.length,ce=[],Ae=c.length;if(!te)return ce;h&&(c=Qt(c,vr(h))),E?(I=yd,H=!1):c.length>=i&&(I=sa,H=!1,c=new Ro(c));e:for(;++k<te;){var Re=a[k],De=h==null?Re:h(Re);if(Re=E||Re!==0?Re:0,H&&De===De){for(var Ve=Ae;Ve--;)if(c[Ve]===De)continue e;ce.push(Re)}else I(c,De,E)||ce.push(Re)}return ce}var Zi=Pg(di),sg=Pg(Dd,!0);function NT(a,c){var h=!0;return Zi(a,function(E,k,I){return h=!!c(E,k,I),h}),h}function Vl(a,c,h){for(var E=-1,k=a.length;++E<k;){var I=a[E],H=c(I);if(H!=null&&(te===n?H===H&&!_r(H):h(H,te)))var te=H,ce=I}return ce}function zT(a,c,h,E){var k=a.length;for(h=yt(h),h<0&&(h=-h>k?0:k+h),E=E===n||E>k?k:yt(E),E<0&&(E+=k),E=h>E?0:S_(E);h<E;)a[h++]=c;return a}function ag(a,c){var h=[];return Zi(a,function(E,k,I){c(E,k,I)&&h.push(E)}),h}function wn(a,c,h,E,k){var I=-1,H=a.length;for(h||(h=$k),k||(k=[]);++I<H;){var te=a[I];c>0&&h(te)?c>1?wn(te,c-1,h,E,k):Qi(k,te):E||(k[k.length]=te)}return k}var Md=Ig(),lg=Ig(!0);function di(a,c){return a&&Md(a,c,vn)}function Dd(a,c){return a&&lg(a,c,vn)}function Hl(a,c){return Gi(c,function(h){return Ri(a[h])})}function Io(a,c){c=to(c,a);for(var h=0,E=c.length;a!=null&&h<E;)a=a[Yr(c[h++])];return h&&h==E?a:n}function ug(a,c,h){var E=c(a);return vt(a)?E:Qi(E,h(a))}function Ln(a){return a==null?a===n?It:Ke:$o&&$o in Bt(a)?Sk(a):Fk(a)}function Fd(a,c){return a>c}function BT(a,c){return a!=null&&jt.call(a,c)}function VT(a,c){return a!=null&&c in Bt(a)}function HT(a,c,h){return a>=On(c,h)&&a<pn(c,h)}function Ld(a,c,h){for(var E=h?yd:xl,k=a[0].length,I=a.length,H=I,te=we(I),ce=1/0,Ae=[];H--;){var Re=a[H];H&&c&&(Re=Qt(Re,vr(c))),ce=On(Re.length,ce),te[H]=!h&&(c||k>=120&&Re.length>=120)?new Ro(H&&Re):n}Re=a[0];var De=-1,Ve=te[0];e:for(;++De<k&&Ae.length<ce;){var Je=Re[De],ut=c?c(Je):Je;if(Je=h||Je!==0?Je:0,!(Ve?sa(Ve,ut):E(Ae,ut,h))){for(H=I;--H;){var bt=te[H];if(!(bt?sa(bt,ut):E(a[H],ut,h)))continue e}Ve&&Ve.push(ut),Ae.push(Je)}}return Ae}function qT(a,c,h,E){return di(a,function(k,I,H){c(E,h(k),I,H)}),E}function ha(a,c,h){c=to(c,a),a=Qg(a,c);var E=a==null?a:a[Yr(Rr(c))];return E==null?n:hr(E,a,h)}function cg(a){return tn(a)&&Ln(a)==V}function WT(a){return tn(a)&&Ln(a)==Wt}function YT(a){return tn(a)&&Ln(a)==N}function ma(a,c,h,E,k){return a===c?!0:a==null||c==null||!tn(a)&&!tn(c)?a!==a&&c!==c:KT(a,c,h,E,ma,k)}function KT(a,c,h,E,k,I){var H=vt(a),te=vt(c),ce=H?P:$n(a),Ae=te?P:$n(c);ce=ce==V?Ne:ce,Ae=Ae==V?Ne:Ae;var Re=ce==Ne,De=Ae==Ne,Ve=ce==Ae;if(Ve&&ro(a)){if(!ro(c))return!1;H=!0,Re=!1}if(Ve&&!Re)return I||(I=new Wr),H||_s(a)?Vg(a,c,h,E,k,I):wk(a,c,ce,h,E,k,I);if(!(h&m)){var Je=Re&&jt.call(a,"__wrapped__"),ut=De&&jt.call(c,"__wrapped__");if(Je||ut){var bt=Je?a.value():a,it=ut?c.value():c;return I||(I=new Wr),k(bt,it,h,E,I)}}return Ve?(I||(I=new Wr),Ek(a,c,h,E,k,I)):!1}function GT(a){return tn(a)&&$n(a)==Ce}function jd(a,c,h,E){var k=h.length,I=k,H=!E;if(a==null)return!I;for(a=Bt(a);k--;){var te=h[k];if(H&&te[2]?te[1]!==a[te[0]]:!(te[0]in a))return!1}for(;++k<I;){te=h[k];var ce=te[0],Ae=a[ce],Re=te[1];if(H&&te[2]){if(Ae===n&&!(ce in a))return!1}else{var De=new Wr;if(E)var Ve=E(Ae,Re,ce,a,c,De);if(!(Ve===n?ma(Re,Ae,m|b,E,De):Ve))return!1}}return!0}function dg(a){if(!Xt(a)||Rk(a))return!1;var c=Ri(a)?Gx:U2;return c.test(Do(a))}function QT(a){return tn(a)&&Ln(a)==Ze}function XT(a){return tn(a)&&$n(a)==Pt}function JT(a){return tn(a)&&au(a.length)&&!!Kt[Ln(a)]}function fg(a){return typeof a=="function"?a:a==null?Gn:typeof a=="object"?vt(a)?mg(a[0],a[1]):hg(a):D_(a)}function Ud(a){if(!_a(a))return tT(a);var c=[];for(var h in Bt(a))jt.call(a,h)&&h!="constructor"&&c.push(h);return c}function ZT(a){if(!Xt(a))return Dk(a);var c=_a(a),h=[];for(var E in a)E=="constructor"&&(c||!jt.call(a,E))||h.push(E);return h}function Nd(a,c){return a<c}function pg(a,c){var h=-1,E=Yn(a)?we(a.length):[];return Zi(a,function(k,I,H){E[++h]=c(k,I,H)}),E}function hg(a){var c=tf(a);return c.length==1&&c[0][2]?Kg(c[0][0],c[0][1]):function(h){return h===a||jd(h,a,c)}}function mg(a,c){return rf(a)&&Yg(c)?Kg(Yr(a),c):function(h){var E=mf(h,a);return E===n&&E===c?vf(h,a):ma(c,E,m|b)}}function ql(a,c,h,E,k){a!==c&&Md(c,function(I,H){if(k||(k=new Wr),Xt(I))ek(a,c,H,h,ql,E,k);else{var te=E?E(sf(a,H),I,H+"",a,c,k):n;te===n&&(te=I),Pd(a,H,te)}},Kn)}function ek(a,c,h,E,k,I,H){var te=sf(a,h),ce=sf(c,h),Ae=H.get(ce);if(Ae){Pd(a,h,Ae);return}var Re=I?I(te,ce,h+"",a,c,H):n,De=Re===n;if(De){var Ve=vt(ce),Je=!Ve&&ro(ce),ut=!Ve&&!Je&&_s(ce);Re=ce,Ve||Je||ut?vt(te)?Re=te:rn(te)?Re=Wn(te):Je?(De=!1,Re=kg(ce,!0)):ut?(De=!1,Re=Og(ce,!0)):Re=[]:ba(ce)||Fo(ce)?(Re=te,Fo(te)?Re=C_(te):(!Xt(te)||Ri(te))&&(Re=Wg(ce))):De=!1}De&&(H.set(ce,Re),k(Re,ce,E,I,H),H.delete(ce)),Pd(a,h,Re)}function vg(a,c){var h=a.length;if(h)return c+=c<0?h:0,Ai(c,h)?a[c]:n}function gg(a,c,h){c.length?c=Qt(c,function(I){return vt(I)?function(H){return Io(H,I.length===1?I[0]:I)}:I}):c=[Gn];var E=-1;c=Qt(c,vr(ot()));var k=pg(a,function(I,H,te){var ce=Qt(c,function(Ae){return Ae(I)});return{criteria:ce,index:++E,value:I}});return kx(k,function(I,H){return pk(I,H,h)})}function tk(a,c){return _g(a,c,function(h,E){return vf(a,E)})}function _g(a,c,h){for(var E=-1,k=c.length,I={};++E<k;){var H=c[E],te=Io(a,H);h(te,H)&&va(I,to(H,a),te)}return I}function nk(a){return function(c){return Io(c,a)}}function zd(a,c,h,E){var k=E?Tx:as,I=-1,H=c.length,te=a;for(a===c&&(c=Wn(c)),h&&(te=Qt(a,vr(h)));++I<H;)for(var ce=0,Ae=c[I],Re=h?h(Ae):Ae;(ce=k(te,Re,ce,E))>-1;)te!==a&&Dl.call(te,ce,1),Dl.call(a,ce,1);return a}function yg(a,c){for(var h=a?c.length:0,E=h-1;h--;){var k=c[h];if(h==E||k!==I){var I=k;Ai(k)?Dl.call(a,k,1):qd(a,k)}}return a}function Bd(a,c){return a+jl(Zv()*(c-a+1))}function rk(a,c,h,E){for(var k=-1,I=pn(Ll((c-a)/(h||1)),0),H=we(I);I--;)H[E?I:++k]=a,a+=h;return H}function Vd(a,c){var h="";if(!a||c<1||c>j)return h;do c%2&&(h+=a),c=jl(c/2),c&&(a+=a);while(c);return h}function wt(a,c){return af(Gg(a,c,Gn),a+"")}function ik(a){return ng(ys(a))}function ok(a,c){var h=ys(a);return tu(h,Po(c,0,h.length))}function va(a,c,h,E){if(!Xt(a))return a;c=to(c,a);for(var k=-1,I=c.length,H=I-1,te=a;te!=null&&++k<I;){var ce=Yr(c[k]),Ae=h;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return a;if(k!=H){var Re=te[ce];Ae=E?E(Re,ce,te):n,Ae===n&&(Ae=Xt(Re)?Re:Ai(c[k+1])?[]:{})}fa(te,ce,Ae),te=te[ce]}return a}var bg=Ul?function(a,c){return Ul.set(a,c),a}:Gn,sk=Fl?function(a,c){return Fl(a,"toString",{configurable:!0,enumerable:!1,value:_f(c),writable:!0})}:Gn;function ak(a){return tu(ys(a))}function Ar(a,c,h){var E=-1,k=a.length;c<0&&(c=-c>k?0:k+c),h=h>k?k:h,h<0&&(h+=k),k=c>h?0:h-c>>>0,c>>>=0;for(var I=we(k);++E<k;)I[E]=a[E+c];return I}function lk(a,c){var h;return Zi(a,function(E,k,I){return h=c(E,k,I),!h}),!!h}function Wl(a,c,h){var E=0,k=a==null?E:a.length;if(typeof c=="number"&&c===c&&k<=B){for(;E<k;){var I=E+k>>>1,H=a[I];H!==null&&!_r(H)&&(h?H<=c:H<c)?E=I+1:k=I}return k}return Hd(a,c,Gn,h)}function Hd(a,c,h,E){var k=0,I=a==null?0:a.length;if(I===0)return 0;c=h(c);for(var H=c!==c,te=c===null,ce=_r(c),Ae=c===n;k<I;){var Re=jl((k+I)/2),De=h(a[Re]),Ve=De!==n,Je=De===null,ut=De===De,bt=_r(De);if(H)var it=E||ut;else Ae?it=ut&&(E||Ve):te?it=ut&&Ve&&(E||!Je):ce?it=ut&&Ve&&!Je&&(E||!bt):Je||bt?it=!1:it=E?De<=c:De<c;it?k=Re+1:I=Re}return On(I,Q)}function wg(a,c){for(var h=-1,E=a.length,k=0,I=[];++h<E;){var H=a[h],te=c?c(H):H;if(!h||!Kr(te,ce)){var ce=te;I[k++]=H===0?0:H}}return I}function Eg(a){return typeof a=="number"?a:_r(a)?U:+a}function gr(a){if(typeof a=="string")return a;if(vt(a))return Qt(a,gr)+"";if(_r(a))return eg?eg.call(a):"";var c=a+"";return c=="0"&&1/a==-J?"-0":c}function eo(a,c,h){var E=-1,k=xl,I=a.length,H=!0,te=[],ce=te;if(h)H=!1,k=yd;else if(I>=i){var Ae=c?null:yk(a);if(Ae)return kl(Ae);H=!1,k=sa,ce=new Ro}else ce=c?[]:te;e:for(;++E<I;){var Re=a[E],De=c?c(Re):Re;if(Re=h||Re!==0?Re:0,H&&De===De){for(var Ve=ce.length;Ve--;)if(ce[Ve]===De)continue e;c&&ce.push(De),te.push(Re)}else k(ce,De,h)||(ce!==te&&ce.push(De),te.push(Re))}return te}function qd(a,c){c=to(c,a);var h=-1,E=c.length;if(!E)return!0;for(;++h<E;){var k=Yr(c[h]);if(k==="__proto__"&&!jt.call(a,"__proto__")||(k==="constructor"||k==="prototype")&&h<E-1)return!1}var I=Qg(a,c);return I==null||delete I[Yr(Rr(c))]}function Sg(a,c,h,E){return va(a,c,h(Io(a,c)),E)}function Yl(a,c,h,E){for(var k=a.length,I=E?k:-1;(E?I--:++I<k)&&c(a[I],I,a););return h?Ar(a,E?0:I,E?I+1:k):Ar(a,E?I+1:0,E?k:I)}function Cg(a,c){var h=a;return h instanceof $t&&(h=h.value()),bd(c,function(E,k){return k.func.apply(k.thisArg,Qi([E],k.args))},h)}function Wd(a,c,h){var E=a.length;if(E<2)return E?eo(a[0]):[];for(var k=-1,I=we(E);++k<E;)for(var H=a[k],te=-1;++te<E;)te!=k&&(I[k]=pa(I[k]||H,a[te],c,h));return eo(wn(I,1),c,h)}function xg(a,c,h){for(var E=-1,k=a.length,I=c.length,H={};++E<k;){var te=E<I?c[E]:n;h(H,a[E],te)}return H}function Yd(a){return rn(a)?a:[]}function Kd(a){return typeof a=="function"?a:Gn}function to(a,c){return vt(a)?a:rf(a,c)?[a]:e_(Ut(a))}var uk=wt;function no(a,c,h){var E=a.length;return h=h===n?E:h,!c&&h>=E?a:Ar(a,c,h)}var Tg=Qx||function(a){return bn.clearTimeout(a)};function kg(a,c){if(c)return a.slice();var h=a.length,E=Kv?Kv(h):new a.constructor(h);return a.copy(E),E}function Gd(a){var c=new a.constructor(a.byteLength);return new Il(c).set(new Il(a)),c}function ck(a,c){var h=c?Gd(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.byteLength)}function dk(a){var c=new a.constructor(a.source,cv.exec(a));return c.lastIndex=a.lastIndex,c}function fk(a){return da?Bt(da.call(a)):{}}function Og(a,c){var h=c?Gd(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.length)}function $g(a,c){if(a!==c){var h=a!==n,E=a===null,k=a===a,I=_r(a),H=c!==n,te=c===null,ce=c===c,Ae=_r(c);if(!te&&!Ae&&!I&&a>c||I&&H&&ce&&!te&&!Ae||E&&H&&ce||!h&&ce||!k)return 1;if(!E&&!I&&!Ae&&a<c||Ae&&h&&k&&!E&&!I||te&&h&&k||!H&&k||!ce)return-1}return 0}function pk(a,c,h){for(var E=-1,k=a.criteria,I=c.criteria,H=k.length,te=h.length;++E<H;){var ce=$g(k[E],I[E]);if(ce){if(E>=te)return ce;var Ae=h[E];return ce*(Ae=="desc"?-1:1)}}return a.index-c.index}function Ag(a,c,h,E){for(var k=-1,I=a.length,H=h.length,te=-1,ce=c.length,Ae=pn(I-H,0),Re=we(ce+Ae),De=!E;++te<ce;)Re[te]=c[te];for(;++k<H;)(De||k<I)&&(Re[h[k]]=a[k]);for(;Ae--;)Re[te++]=a[k++];return Re}function Rg(a,c,h,E){for(var k=-1,I=a.length,H=-1,te=h.length,ce=-1,Ae=c.length,Re=pn(I-te,0),De=we(Re+Ae),Ve=!E;++k<Re;)De[k]=a[k];for(var Je=k;++ce<Ae;)De[Je+ce]=c[ce];for(;++H<te;)(Ve||k<I)&&(De[Je+h[H]]=a[k++]);return De}function Wn(a,c){var h=-1,E=a.length;for(c||(c=we(E));++h<E;)c[h]=a[h];return c}function fi(a,c,h,E){var k=!h;h||(h={});for(var I=-1,H=c.length;++I<H;){var te=c[I],ce=E?E(h[te],a[te],te,h,a):n;ce===n&&(ce=a[te]),k?ci(h,te,ce):fa(h,te,ce)}return h}function hk(a,c){return fi(a,nf(a),c)}function mk(a,c){return fi(a,Hg(a),c)}function Kl(a,c){return function(h,E){var k=vt(h)?bx:LT,I=c?c():{};return k(h,a,ot(E,2),I)}}function ms(a){return wt(function(c,h){var E=-1,k=h.length,I=k>1?h[k-1]:n,H=k>2?h[2]:n;for(I=a.length>3&&typeof I=="function"?(k--,I):n,H&&jn(h[0],h[1],H)&&(I=k<3?n:I,k=1),c=Bt(c);++E<k;){var te=h[E];te&&a(c,te,E,I)}return c})}function Pg(a,c){return function(h,E){if(h==null)return h;if(!Yn(h))return a(h,E);for(var k=h.length,I=c?k:-1,H=Bt(h);(c?I--:++I<k)&&E(H[I],I,H)!==!1;);return h}}function Ig(a){return function(c,h,E){for(var k=-1,I=Bt(c),H=E(c),te=H.length;te--;){var ce=H[a?te:++k];if(h(I[ce],ce,I)===!1)break}return c}}function vk(a,c,h){var E=c&x,k=ga(a);function I(){var H=this&&this!==bn&&this instanceof I?k:a;return H.apply(E?h:this,arguments)}return I}function Mg(a){return function(c){c=Ut(c);var h=ls(c)?qr(c):n,E=h?h[0]:c.charAt(0),k=h?no(h,1).join(""):c.slice(1);return E[a]()+k}}function vs(a){return function(c){return bd(I_(P_(c).replace(sx,"")),a,"")}}function ga(a){return function(){var c=arguments;switch(c.length){case 0:return new a;case 1:return new a(c[0]);case 2:return new a(c[0],c[1]);case 3:return new a(c[0],c[1],c[2]);case 4:return new a(c[0],c[1],c[2],c[3]);case 5:return new a(c[0],c[1],c[2],c[3],c[4]);case 6:return new a(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new a(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=hs(a.prototype),E=a.apply(h,c);return Xt(E)?E:h}}function gk(a,c,h){var E=ga(a);function k(){for(var I=arguments.length,H=we(I),te=I,ce=gs(k);te--;)H[te]=arguments[te];var Ae=I<3&&H[0]!==ce&&H[I-1]!==ce?[]:Xi(H,ce);if(I-=Ae.length,I<h)return Ug(a,c,Gl,k.placeholder,n,H,Ae,n,n,h-I);var Re=this&&this!==bn&&this instanceof k?E:a;return hr(Re,this,H)}return k}function Dg(a){return function(c,h,E){var k=Bt(c);if(!Yn(c)){var I=ot(h,3);c=vn(c),h=function(te){return I(k[te],te,k)}}var H=a(c,h,E);return H>-1?k[I?c[H]:H]:n}}function Fg(a){return $i(function(c){var h=c.length,E=h,k=Or.prototype.thru;for(a&&c.reverse();E--;){var I=c[E];if(typeof I!="function")throw new kr(s);if(k&&!H&&Zl(I)=="wrapper")var H=new Or([],!0)}for(E=H?E:h;++E<h;){I=c[E];var te=Zl(I),ce=te=="wrapper"?ef(I):n;ce&&of(ce[0])&&ce[1]==(Y|T|M|ve)&&!ce[4].length&&ce[9]==1?H=H[Zl(ce[0])].apply(H,ce[3]):H=I.length==1&&of(I)?H[te]():H.thru(I)}return function(){var Ae=arguments,Re=Ae[0];if(H&&Ae.length==1&&vt(Re))return H.plant(Re).value();for(var De=0,Ve=h?c[De].apply(this,Ae):Re;++De<h;)Ve=c[De].call(this,Ve);return Ve}})}function Gl(a,c,h,E,k,I,H,te,ce,Ae){var Re=c&Y,De=c&x,Ve=c&S,Je=c&(T|A),ut=c&W,bt=Ve?n:ga(a);function it(){for(var Tt=arguments.length,At=we(Tt),yr=Tt;yr--;)At[yr]=arguments[yr];if(Je)var Un=gs(it),br=$x(At,Un);if(E&&(At=Ag(At,E,k,Je)),I&&(At=Rg(At,I,H,Je)),Tt-=br,Je&&Tt<Ae){var on=Xi(At,Un);return Ug(a,c,Gl,it.placeholder,h,At,on,te,ce,Ae-Tt)}var Gr=De?h:this,Ii=Ve?Gr[a]:a;return Tt=At.length,te?At=Lk(At,te):ut&&Tt>1&&At.reverse(),Re&&ce<Tt&&(At.length=ce),this&&this!==bn&&this instanceof it&&(Ii=bt||ga(Ii)),Ii.apply(Gr,At)}return it}function Lg(a,c){return function(h,E){return qT(h,a,c(E),{})}}function Ql(a,c){return function(h,E){var k;if(h===n&&E===n)return c;if(h!==n&&(k=h),E!==n){if(k===n)return E;typeof h=="string"||typeof E=="string"?(h=gr(h),E=gr(E)):(h=Eg(h),E=Eg(E)),k=a(h,E)}return k}}function Qd(a){return $i(function(c){return c=Qt(c,vr(ot())),wt(function(h){var E=this;return a(c,function(k){return hr(k,E,h)})})})}function Xl(a,c){c=c===n?" ":gr(c);var h=c.length;if(h<2)return h?Vd(c,a):c;var E=Vd(c,Ll(a/us(c)));return ls(c)?no(qr(E),0,a).join(""):E.slice(0,a)}function _k(a,c,h,E){var k=c&x,I=ga(a);function H(){for(var te=-1,ce=arguments.length,Ae=-1,Re=E.length,De=we(Re+ce),Ve=this&&this!==bn&&this instanceof H?I:a;++Ae<Re;)De[Ae]=E[Ae];for(;ce--;)De[Ae++]=arguments[++te];return hr(Ve,k?h:this,De)}return H}function jg(a){return function(c,h,E){return E&&typeof E!="number"&&jn(c,h,E)&&(h=E=n),c=Pi(c),h===n?(h=c,c=0):h=Pi(h),E=E===n?c<h?1:-1:Pi(E),rk(c,h,E,a)}}function Jl(a){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=Pr(c),h=Pr(h)),a(c,h)}}function Ug(a,c,h,E,k,I,H,te,ce,Ae){var Re=c&T,De=Re?H:n,Ve=Re?n:H,Je=Re?I:n,ut=Re?n:I;c|=Re?M:z,c&=~(Re?z:M),c&O||(c&=-4);var bt=[a,c,k,Je,De,ut,Ve,te,ce,Ae],it=h.apply(n,bt);return of(a)&&Xg(it,bt),it.placeholder=E,Jg(it,a,c)}function Xd(a){var c=fn[a];return function(h,E){if(h=Pr(h),E=E==null?0:On(yt(E),292),E&&Jv(h)){var k=(Ut(h)+"e").split("e"),I=c(k[0]+"e"+(+k[1]+E));return k=(Ut(I)+"e").split("e"),+(k[0]+"e"+(+k[1]-E))}return c(h)}}var yk=fs&&1/kl(new fs([,-0]))[1]==J?function(a){return new fs(a)}:wf;function Ng(a){return function(c){var h=$n(c);return h==Ce?kd(c):h==Pt?Fx(c):Ox(c,a(c))}}function Oi(a,c,h,E,k,I,H,te){var ce=c&S;if(!ce&&typeof a!="function")throw new kr(s);var Ae=E?E.length:0;if(Ae||(c&=-97,E=k=n),H=H===n?H:pn(yt(H),0),te=te===n?te:yt(te),Ae-=k?k.length:0,c&z){var Re=E,De=k;E=k=n}var Ve=ce?n:ef(a),Je=[a,c,h,E,k,Re,De,I,H,te];if(Ve&&Mk(Je,Ve),a=Je[0],c=Je[1],h=Je[2],E=Je[3],k=Je[4],te=Je[9]=Je[9]===n?ce?0:a.length:pn(Je[9]-Ae,0),!te&&c&(T|A)&&(c&=-25),!c||c==x)var ut=vk(a,c,h);else c==T||c==A?ut=gk(a,c,te):(c==M||c==(x|M))&&!k.length?ut=_k(a,c,h,E):ut=Gl.apply(n,Je);var bt=Ve?bg:Xg;return Jg(bt(ut,Je),a,c)}function zg(a,c,h,E){return a===n||Kr(a,ds[h])&&!jt.call(E,h)?c:a}function Bg(a,c,h,E,k,I){return Xt(a)&&Xt(c)&&(I.set(c,a),ql(a,c,n,Bg,I),I.delete(c)),a}function bk(a){return ba(a)?n:a}function Vg(a,c,h,E,k,I){var H=h&m,te=a.length,ce=c.length;if(te!=ce&&!(H&&ce>te))return!1;var Ae=I.get(a),Re=I.get(c);if(Ae&&Re)return Ae==c&&Re==a;var De=-1,Ve=!0,Je=h&b?new Ro:n;for(I.set(a,c),I.set(c,a);++De<te;){var ut=a[De],bt=c[De];if(E)var it=H?E(bt,ut,De,c,a,I):E(ut,bt,De,a,c,I);if(it!==n){if(it)continue;Ve=!1;break}if(Je){if(!wd(c,function(Tt,At){if(!sa(Je,At)&&(ut===Tt||k(ut,Tt,h,E,I)))return Je.push(At)})){Ve=!1;break}}else if(!(ut===bt||k(ut,bt,h,E,I))){Ve=!1;break}}return I.delete(a),I.delete(c),Ve}function wk(a,c,h,E,k,I,H){switch(h){case nn:if(a.byteLength!=c.byteLength||a.byteOffset!=c.byteOffset)return!1;a=a.buffer,c=c.buffer;case Wt:return!(a.byteLength!=c.byteLength||!I(new Il(a),new Il(c)));case G:case N:case $e:return Kr(+a,+c);case ge:return a.name==c.name&&a.message==c.message;case Ze:case St:return a==c+"";case Ce:var te=kd;case Pt:var ce=E&m;if(te||(te=kl),a.size!=c.size&&!ce)return!1;var Ae=H.get(a);if(Ae)return Ae==c;E|=b,H.set(a,c);var Re=Vg(te(a),te(c),E,k,I,H);return H.delete(a),Re;case Nt:if(da)return da.call(a)==da.call(c)}return!1}function Ek(a,c,h,E,k,I){var H=h&m,te=Jd(a),ce=te.length,Ae=Jd(c),Re=Ae.length;if(ce!=Re&&!H)return!1;for(var De=ce;De--;){var Ve=te[De];if(!(H?Ve in c:jt.call(c,Ve)))return!1}var Je=I.get(a),ut=I.get(c);if(Je&&ut)return Je==c&&ut==a;var bt=!0;I.set(a,c),I.set(c,a);for(var it=H;++De<ce;){Ve=te[De];var Tt=a[Ve],At=c[Ve];if(E)var yr=H?E(At,Tt,Ve,c,a,I):E(Tt,At,Ve,a,c,I);if(!(yr===n?Tt===At||k(Tt,At,h,E,I):yr)){bt=!1;break}it||(it=Ve=="constructor")}if(bt&&!it){var Un=a.constructor,br=c.constructor;Un!=br&&"constructor"in a&&"constructor"in c&&!(typeof Un=="function"&&Un instanceof Un&&typeof br=="function"&&br instanceof br)&&(bt=!1)}return I.delete(a),I.delete(c),bt}function $i(a){return af(Gg(a,n,i_),a+"")}function Jd(a){return ug(a,vn,nf)}function Zd(a){return ug(a,Kn,Hg)}var ef=Ul?function(a){return Ul.get(a)}:wf;function Zl(a){for(var c=a.name+"",h=ps[c],E=jt.call(ps,c)?h.length:0;E--;){var k=h[E],I=k.func;if(I==null||I==a)return k.name}return c}function gs(a){var c=jt.call($,"placeholder")?$:a;return c.placeholder}function ot(){var a=$.iteratee||yf;return a=a===yf?fg:a,arguments.length?a(arguments[0],arguments[1]):a}function eu(a,c){var h=a.__data__;return Ak(c)?h[typeof c=="string"?"string":"hash"]:h.map}function tf(a){for(var c=vn(a),h=c.length;h--;){var E=c[h],k=a[E];c[h]=[E,k,Yg(k)]}return c}function Mo(a,c){var h=Ix(a,c);return dg(h)?h:n}function Sk(a){var c=jt.call(a,$o),h=a[$o];try{a[$o]=n;var E=!0}catch{}var k=Rl.call(a);return E&&(c?a[$o]=h:delete a[$o]),k}var nf=$d?function(a){return a==null?[]:(a=Bt(a),Gi($d(a),function(c){return Qv.call(a,c)}))}:Ef,Hg=$d?function(a){for(var c=[];a;)Qi(c,nf(a)),a=Ml(a);return c}:Ef,$n=Ln;(Ad&&$n(new Ad(new ArrayBuffer(1)))!=nn||la&&$n(new la)!=Ce||Rd&&$n(Rd.resolve())!=tt||fs&&$n(new fs)!=Pt||ua&&$n(new ua)!=qt)&&($n=function(a){var c=Ln(a),h=c==Ne?a.constructor:n,E=h?Do(h):"";if(E)switch(E){case oT:return nn;case sT:return Ce;case aT:return tt;case lT:return Pt;case uT:return qt}return c});function Ck(a,c,h){for(var E=-1,k=h.length;++E<k;){var I=h[E],H=I.size;switch(I.type){case"drop":a+=H;break;case"dropRight":c-=H;break;case"take":c=On(c,a+H);break;case"takeRight":a=pn(a,c-H);break}}return{start:a,end:c}}function xk(a){var c=a.match(P2);return c?c[1].split(I2):[]}function qg(a,c,h){c=to(c,a);for(var E=-1,k=c.length,I=!1;++E<k;){var H=Yr(c[E]);if(!(I=a!=null&&h(a,H)))break;a=a[H]}return I||++E!=k?I:(k=a==null?0:a.length,!!k&&au(k)&&Ai(H,k)&&(vt(a)||Fo(a)))}function Tk(a){var c=a.length,h=new a.constructor(c);return c&&typeof a[0]=="string"&&jt.call(a,"index")&&(h.index=a.index,h.input=a.input),h}function Wg(a){return typeof a.constructor=="function"&&!_a(a)?hs(Ml(a)):{}}function kk(a,c,h){var E=a.constructor;switch(c){case Wt:return Gd(a);case G:case N:return new E(+a);case nn:return ck(a,h);case Dn:case _e:case ue:case ye:case Fe:case qe:case xe:case et:case be:return Og(a,h);case Ce:return new E;case $e:case St:return new E(a);case Ze:return dk(a);case Pt:return new E;case Nt:return fk(a)}}function Ok(a,c){var h=c.length;if(!h)return a;var E=h-1;return c[E]=(h>1?"& ":"")+c[E],c=c.join(h>2?", ":" "),a.replace(wl,`{
3
3
  /* [wrapped with `+c+`] */
4
4
  `)}function $k(a){return vt(a)||Fo(a)||!!(Xv&&a&&a[Xv])}function Ai(a,c){var h=typeof a;return c=c??j,!!c&&(h=="number"||h!="symbol"&&z2.test(a))&&a>-1&&a%1==0&&a<c}function jn(a,c,h){if(!Xt(h))return!1;var E=typeof c;return(E=="number"?Yn(h)&&Ai(c,h.length):E=="string"&&c in h)?Kr(h[c],a):!1}function rf(a,c){if(vt(a))return!1;var h=typeof a;return h=="number"||h=="symbol"||h=="boolean"||a==null||_r(a)?!0:bl.test(a)||!cd.test(a)||c!=null&&a in Bt(c)}function Ak(a){var c=typeof a;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?a!=="__proto__":a===null}function of(a){var c=Zl(a),h=$[c];if(typeof h!="function"||!(c in $t.prototype))return!1;if(a===h)return!0;var E=ef(h);return!!E&&a===E[0]}function Rk(a){return!!Yv&&Yv in a}var Pk=$l?Ri:Sf;function _a(a){var c=a&&a.constructor,h=typeof c=="function"&&c.prototype||ds;return a===h}function Yg(a){return a===a&&!Xt(a)}function Kg(a,c){return function(h){return h==null?!1:h[a]===c&&(c!==n||a in Bt(h))}}function Ik(a){var c=ou(a,function(E){return h.size===f&&h.clear(),E}),h=c.cache;return c}function Mk(a,c){var h=a[1],E=c[1],k=h|E,I=k<(x|S|Y),H=E==Y&&h==T||E==Y&&h==ve&&a[7].length<=c[8]||E==(Y|ve)&&c[7].length<=c[8]&&h==T;if(!(I||H))return a;E&x&&(a[2]=c[2],k|=h&x?0:O);var te=c[3];if(te){var ce=a[3];a[3]=ce?Ag(ce,te,c[4]):te,a[4]=ce?Xi(a[3],p):c[4]}return te=c[5],te&&(ce=a[5],a[5]=ce?Rg(ce,te,c[6]):te,a[6]=ce?Xi(a[5],p):c[6]),te=c[7],te&&(a[7]=te),E&Y&&(a[8]=a[8]==null?c[8]:On(a[8],c[8])),a[9]==null&&(a[9]=c[9]),a[0]=c[0],a[1]=k,a}function Dk(a){var c=[];if(a!=null)for(var h in Bt(a))c.push(h);return c}function Fk(a){return Rl.call(a)}function Gg(a,c,h){return c=pn(c===n?a.length-1:c,0),function(){for(var E=arguments,k=-1,I=pn(E.length-c,0),H=we(I);++k<I;)H[k]=E[c+k];k=-1;for(var te=we(c+1);++k<c;)te[k]=E[k];return te[c]=h(H),hr(a,this,te)}}function Qg(a,c){return c.length<2?a:Io(a,Ar(c,0,-1))}function Lk(a,c){for(var h=a.length,E=On(c.length,h),k=Wn(a);E--;){var I=c[E];a[E]=Ai(I,h)?k[I]:n}return a}function sf(a,c){if(!(c==="constructor"&&typeof a[c]=="function")&&c!="__proto__")return a[c]}var Xg=Zg(bg),ya=Jx||function(a,c){return bn.setTimeout(a,c)},af=Zg(sk);function Jg(a,c,h){var E=c+"";return af(a,Ok(E,jk(xk(E),h)))}function Zg(a){var c=0,h=0;return function(){var E=nT(),k=D-(E-h);if(h=E,k>0){if(++c>=L)return arguments[0]}else c=0;return a.apply(n,arguments)}}function tu(a,c){var h=-1,E=a.length,k=E-1;for(c=c===n?E:c;++h<c;){var I=Bd(h,k),H=a[I];a[I]=a[h],a[h]=H}return a.length=c,a}var e_=Ik(function(a){var c=[];return a.charCodeAt(0)===46&&c.push(""),a.replace(is,function(h,E,k,I){c.push(k?I.replace(D2,"$1"):E||h)}),c});function Yr(a){if(typeof a=="string"||_r(a))return a;var c=a+"";return c=="0"&&1/a==-J?"-0":c}function Do(a){if(a!=null){try{return Al.call(a)}catch{}try{return a+""}catch{}}return""}function jk(a,c){return mr(oe,function(h){var E="_."+h[0];c&h[1]&&!xl(a,E)&&a.push(E)}),a.sort()}function t_(a){if(a instanceof $t)return a.clone();var c=new Or(a.__wrapped__,a.__chain__);return c.__actions__=Wn(a.__actions__),c.__index__=a.__index__,c.__values__=a.__values__,c}function Uk(a,c,h){(h?jn(a,c,h):c===n)?c=1:c=pn(yt(c),0);var E=a==null?0:a.length;if(!E||c<1)return[];for(var k=0,I=0,H=we(Ll(E/c));k<E;)H[I++]=Ar(a,k,k+=c);return H}function Nk(a){for(var c=-1,h=a==null?0:a.length,E=0,k=[];++c<h;){var I=a[c];I&&(k[E++]=I)}return k}function zk(){var a=arguments.length;if(!a)return[];for(var c=we(a-1),h=arguments[0],E=a;E--;)c[E-1]=arguments[E];return Qi(vt(h)?Wn(h):[h],wn(c,1))}var Bk=wt(function(a,c){return rn(a)?pa(a,wn(c,1,rn,!0)):[]}),Vk=wt(function(a,c){var h=Rr(c);return rn(h)&&(h=n),rn(a)?pa(a,wn(c,1,rn,!0),ot(h,2)):[]}),Hk=wt(function(a,c){var h=Rr(c);return rn(h)&&(h=n),rn(a)?pa(a,wn(c,1,rn,!0),n,h):[]});function qk(a,c,h){var E=a==null?0:a.length;return E?(c=h||c===n?1:yt(c),Ar(a,c<0?0:c,E)):[]}function Wk(a,c,h){var E=a==null?0:a.length;return E?(c=h||c===n?1:yt(c),c=E-c,Ar(a,0,c<0?0:c)):[]}function Yk(a,c){return a&&a.length?Yl(a,ot(c,3),!0,!0):[]}function Kk(a,c){return a&&a.length?Yl(a,ot(c,3),!0):[]}function Gk(a,c,h,E){var k=a==null?0:a.length;return k?(h&&typeof h!="number"&&jn(a,c,h)&&(h=0,E=k),zT(a,c,h,E)):[]}function n_(a,c,h){var E=a==null?0:a.length;if(!E)return-1;var k=h==null?0:yt(h);return k<0&&(k=pn(E+k,0)),Tl(a,ot(c,3),k)}function r_(a,c,h){var E=a==null?0:a.length;if(!E)return-1;var k=E-1;return h!==n&&(k=yt(h),k=h<0?pn(E+k,0):On(k,E-1)),Tl(a,ot(c,3),k,!0)}function i_(a){var c=a==null?0:a.length;return c?wn(a,1):[]}function Qk(a){var c=a==null?0:a.length;return c?wn(a,J):[]}function Xk(a,c){var h=a==null?0:a.length;return h?(c=c===n?1:yt(c),wn(a,c)):[]}function Jk(a){for(var c=-1,h=a==null?0:a.length,E={};++c<h;){var k=a[c];ci(E,k[0],k[1])}return E}function o_(a){return a&&a.length?a[0]:n}function Zk(a,c,h){var E=a==null?0:a.length;if(!E)return-1;var k=h==null?0:yt(h);return k<0&&(k=pn(E+k,0)),as(a,c,k)}function eO(a){var c=a==null?0:a.length;return c?Ar(a,0,-1):[]}var tO=wt(function(a){var c=Qt(a,Yd);return c.length&&c[0]===a[0]?Ld(c):[]}),nO=wt(function(a){var c=Rr(a),h=Qt(a,Yd);return c===Rr(h)?c=n:h.pop(),h.length&&h[0]===a[0]?Ld(h,ot(c,2)):[]}),rO=wt(function(a){var c=Rr(a),h=Qt(a,Yd);return c=typeof c=="function"?c:n,c&&h.pop(),h.length&&h[0]===a[0]?Ld(h,n,c):[]});function iO(a,c){return a==null?"":eT.call(a,c)}function Rr(a){var c=a==null?0:a.length;return c?a[c-1]:n}function oO(a,c,h){var E=a==null?0:a.length;if(!E)return-1;var k=E;return h!==n&&(k=yt(h),k=k<0?pn(E+k,0):On(k,E-1)),c===c?jx(a,c,k):Tl(a,Uv,k,!0)}function sO(a,c){return a&&a.length?vg(a,yt(c)):n}var aO=wt(s_);function s_(a,c){return a&&a.length&&c&&c.length?zd(a,c):a}function lO(a,c,h){return a&&a.length&&c&&c.length?zd(a,c,ot(h,2)):a}function uO(a,c,h){return a&&a.length&&c&&c.length?zd(a,c,n,h):a}var cO=$i(function(a,c){var h=a==null?0:a.length,E=Id(a,c);return yg(a,Qt(c,function(k){return Ai(k,h)?+k:k}).sort($g)),E});function dO(a,c){var h=[];if(!(a&&a.length))return h;var E=-1,k=[],I=a.length;for(c=ot(c,3);++E<I;){var H=a[E];c(H,E,a)&&(h.push(H),k.push(E))}return yg(a,k),h}function lf(a){return a==null?a:iT.call(a)}function fO(a,c,h){var E=a==null?0:a.length;return E?(h&&typeof h!="number"&&jn(a,c,h)?(c=0,h=E):(c=c==null?0:yt(c),h=h===n?E:yt(h)),Ar(a,c,h)):[]}function pO(a,c){return Wl(a,c)}function hO(a,c,h){return Hd(a,c,ot(h,2))}function mO(a,c){var h=a==null?0:a.length;if(h){var E=Wl(a,c);if(E<h&&Kr(a[E],c))return E}return-1}function vO(a,c){return Wl(a,c,!0)}function gO(a,c,h){return Hd(a,c,ot(h,2),!0)}function _O(a,c){var h=a==null?0:a.length;if(h){var E=Wl(a,c,!0)-1;if(Kr(a[E],c))return E}return-1}function yO(a){return a&&a.length?wg(a):[]}function bO(a,c){return a&&a.length?wg(a,ot(c,2)):[]}function wO(a){var c=a==null?0:a.length;return c?Ar(a,1,c):[]}function EO(a,c,h){return a&&a.length?(c=h||c===n?1:yt(c),Ar(a,0,c<0?0:c)):[]}function SO(a,c,h){var E=a==null?0:a.length;return E?(c=h||c===n?1:yt(c),c=E-c,Ar(a,c<0?0:c,E)):[]}function CO(a,c){return a&&a.length?Yl(a,ot(c,3),!1,!0):[]}function xO(a,c){return a&&a.length?Yl(a,ot(c,3)):[]}var TO=wt(function(a){return eo(wn(a,1,rn,!0))}),kO=wt(function(a){var c=Rr(a);return rn(c)&&(c=n),eo(wn(a,1,rn,!0),ot(c,2))}),OO=wt(function(a){var c=Rr(a);return c=typeof c=="function"?c:n,eo(wn(a,1,rn,!0),n,c)});function $O(a){return a&&a.length?eo(a):[]}function AO(a,c){return a&&a.length?eo(a,ot(c,2)):[]}function RO(a,c){return c=typeof c=="function"?c:n,a&&a.length?eo(a,n,c):[]}function uf(a){if(!(a&&a.length))return[];var c=0;return a=Gi(a,function(h){if(rn(h))return c=pn(h.length,c),!0}),xd(c,function(h){return Qt(a,Ed(h))})}function a_(a,c){if(!(a&&a.length))return[];var h=uf(a);return c==null?h:Qt(h,function(E){return hr(c,n,E)})}var PO=wt(function(a,c){return rn(a)?pa(a,c):[]}),IO=wt(function(a){return Wd(Gi(a,rn))}),MO=wt(function(a){var c=Rr(a);return rn(c)&&(c=n),Wd(Gi(a,rn),ot(c,2))}),DO=wt(function(a){var c=Rr(a);return c=typeof c=="function"?c:n,Wd(Gi(a,rn),n,c)}),FO=wt(uf);function LO(a,c){return xg(a||[],c||[],fa)}function jO(a,c){return xg(a||[],c||[],va)}var UO=wt(function(a){var c=a.length,h=c>1?a[c-1]:n;return h=typeof h=="function"?(a.pop(),h):n,a_(a,h)});function l_(a){var c=$(a);return c.__chain__=!0,c}function NO(a,c){return c(a),a}function nu(a,c){return c(a)}var zO=$i(function(a){var c=a.length,h=c?a[0]:0,E=this.__wrapped__,k=function(I){return Id(I,a)};return c>1||this.__actions__.length||!(E instanceof $t)||!Ai(h)?this.thru(k):(E=E.slice(h,+h+(c?1:0)),E.__actions__.push({func:nu,args:[k],thisArg:n}),new Or(E,this.__chain__).thru(function(I){return c&&!I.length&&I.push(n),I}))});function BO(){return l_(this)}function VO(){return new Or(this.value(),this.__chain__)}function HO(){this.__values__===n&&(this.__values__=E_(this.value()));var a=this.__index__>=this.__values__.length,c=a?n:this.__values__[this.__index__++];return{done:a,value:c}}function qO(){return this}function WO(a){for(var c,h=this;h instanceof zl;){var E=t_(h);E.__index__=0,E.__values__=n,c?k.__wrapped__=E:c=E;var k=E;h=h.__wrapped__}return k.__wrapped__=a,c}function YO(){var a=this.__wrapped__;if(a instanceof $t){var c=a;return this.__actions__.length&&(c=new $t(this)),c=c.reverse(),c.__actions__.push({func:nu,args:[lf],thisArg:n}),new Or(c,this.__chain__)}return this.thru(lf)}function KO(){return Cg(this.__wrapped__,this.__actions__)}var GO=Kl(function(a,c,h){jt.call(a,h)?++a[h]:ci(a,h,1)});function QO(a,c,h){var E=vt(a)?Lv:NT;return h&&jn(a,c,h)&&(c=n),E(a,ot(c,3))}function XO(a,c){var h=vt(a)?Gi:ag;return h(a,ot(c,3))}var JO=Dg(n_),ZO=Dg(r_);function e$(a,c){return wn(ru(a,c),1)}function t$(a,c){return wn(ru(a,c),J)}function n$(a,c,h){return h=h===n?1:yt(h),wn(ru(a,c),h)}function u_(a,c){var h=vt(a)?mr:Zi;return h(a,ot(c,3))}function c_(a,c){var h=vt(a)?wx:sg;return h(a,ot(c,3))}var r$=Kl(function(a,c,h){jt.call(a,h)?a[h].push(c):ci(a,h,[c])});function i$(a,c,h,E){a=Yn(a)?a:ys(a),h=h&&!E?yt(h):0;var k=a.length;return h<0&&(h=pn(k+h,0)),lu(a)?h<=k&&a.indexOf(c,h)>-1:!!k&&as(a,c,h)>-1}var o$=wt(function(a,c,h){var E=-1,k=typeof c=="function",I=Yn(a)?we(a.length):[];return Zi(a,function(H){I[++E]=k?hr(c,H,h):ha(H,c,h)}),I}),s$=Kl(function(a,c,h){ci(a,h,c)});function ru(a,c){var h=vt(a)?Qt:pg;return h(a,ot(c,3))}function a$(a,c,h,E){return a==null?[]:(vt(c)||(c=c==null?[]:[c]),h=E?n:h,vt(h)||(h=h==null?[]:[h]),gg(a,c,h))}var l$=Kl(function(a,c,h){a[h?0:1].push(c)},function(){return[[],[]]});function u$(a,c,h){var E=vt(a)?bd:zv,k=arguments.length<3;return E(a,ot(c,4),h,k,Zi)}function c$(a,c,h){var E=vt(a)?Ex:zv,k=arguments.length<3;return E(a,ot(c,4),h,k,sg)}function d$(a,c){var h=vt(a)?Gi:ag;return h(a,su(ot(c,3)))}function f$(a){var c=vt(a)?ng:ik;return c(a)}function p$(a,c,h){(h?jn(a,c,h):c===n)?c=1:c=yt(c);var E=vt(a)?DT:ok;return E(a,c)}function h$(a){var c=vt(a)?FT:ak;return c(a)}function m$(a){if(a==null)return 0;if(Yn(a))return lu(a)?us(a):a.length;var c=$n(a);return c==Ce||c==Pt?a.size:Ud(a).length}function v$(a,c,h){var E=vt(a)?wd:lk;return h&&jn(a,c,h)&&(c=n),E(a,ot(c,3))}var g$=wt(function(a,c){if(a==null)return[];var h=c.length;return h>1&&jn(a,c[0],c[1])?c=[]:h>2&&jn(c[0],c[1],c[2])&&(c=[c[0]]),gg(a,wn(c,1),[])}),iu=Xx||function(){return bn.Date.now()};function _$(a,c){if(typeof c!="function")throw new kr(s);return a=yt(a),function(){if(--a<1)return c.apply(this,arguments)}}function d_(a,c,h){return c=h?n:c,c=a&&c==null?a.length:c,Oi(a,Y,n,n,n,n,c)}function f_(a,c){var h;if(typeof c!="function")throw new kr(s);return a=yt(a),function(){return--a>0&&(h=c.apply(this,arguments)),a<=1&&(c=n),h}}var cf=wt(function(a,c,h){var E=x;if(h.length){var k=Xi(h,gs(cf));E|=M}return Oi(a,E,c,h,k)}),p_=wt(function(a,c,h){var E=x|S;if(h.length){var k=Xi(h,gs(p_));E|=M}return Oi(c,E,a,h,k)});function h_(a,c,h){c=h?n:c;var E=Oi(a,T,n,n,n,n,n,c);return E.placeholder=h_.placeholder,E}function m_(a,c,h){c=h?n:c;var E=Oi(a,A,n,n,n,n,n,c);return E.placeholder=m_.placeholder,E}function v_(a,c,h){var E,k,I,H,te,ce,Ae=0,Re=!1,De=!1,Ve=!0;if(typeof a!="function")throw new kr(s);c=Pr(c)||0,Xt(h)&&(Re=!!h.leading,De="maxWait"in h,I=De?pn(Pr(h.maxWait)||0,c):I,Ve="trailing"in h?!!h.trailing:Ve);function Je(on){var Gr=E,Ii=k;return E=k=n,Ae=on,H=a.apply(Ii,Gr),H}function ut(on){return Ae=on,te=ya(Tt,c),Re?Je(on):H}function bt(on){var Gr=on-ce,Ii=on-Ae,F_=c-Gr;return De?On(F_,I-Ii):F_}function it(on){var Gr=on-ce,Ii=on-Ae;return ce===n||Gr>=c||Gr<0||De&&Ii>=I}function Tt(){var on=iu();if(it(on))return At(on);te=ya(Tt,bt(on))}function At(on){return te=n,Ve&&E?Je(on):(E=k=n,H)}function yr(){te!==n&&Tg(te),Ae=0,E=ce=k=te=n}function Un(){return te===n?H:At(iu())}function br(){var on=iu(),Gr=it(on);if(E=arguments,k=this,ce=on,Gr){if(te===n)return ut(ce);if(De)return Tg(te),te=ya(Tt,c),Je(ce)}return te===n&&(te=ya(Tt,c)),H}return br.cancel=yr,br.flush=Un,br}var y$=wt(function(a,c){return og(a,1,c)}),b$=wt(function(a,c,h){return og(a,Pr(c)||0,h)});function w$(a){return Oi(a,W)}function ou(a,c){if(typeof a!="function"||c!=null&&typeof c!="function")throw new kr(s);var h=function(){var E=arguments,k=c?c.apply(this,E):E[0],I=h.cache;if(I.has(k))return I.get(k);var H=a.apply(this,E);return h.cache=I.set(k,H)||I,H};return h.cache=new(ou.Cache||ki),h}ou.Cache=ki;function su(a){if(typeof a!="function")throw new kr(s);return function(){var c=arguments;switch(c.length){case 0:return!a.call(this);case 1:return!a.call(this,c[0]);case 2:return!a.call(this,c[0],c[1]);case 3:return!a.call(this,c[0],c[1],c[2])}return!a.apply(this,c)}}function E$(a){return f_(2,a)}var S$=uk(function(a,c){c=c.length==1&&vt(c[0])?Qt(c[0],vr(ot())):Qt(wn(c,1),vr(ot()));var h=c.length;return wt(function(E){for(var k=-1,I=On(E.length,h);++k<I;)E[k]=c[k].call(this,E[k]);return hr(a,this,E)})}),df=wt(function(a,c){var h=Xi(c,gs(df));return Oi(a,M,n,c,h)}),g_=wt(function(a,c){var h=Xi(c,gs(g_));return Oi(a,z,n,c,h)}),C$=$i(function(a,c){return Oi(a,ve,n,n,n,c)});function x$(a,c){if(typeof a!="function")throw new kr(s);return c=c===n?c:yt(c),wt(a,c)}function T$(a,c){if(typeof a!="function")throw new kr(s);return c=c==null?0:pn(yt(c),0),wt(function(h){var E=h[c],k=no(h,0,c);return E&&Qi(k,E),hr(a,this,k)})}function k$(a,c,h){var E=!0,k=!0;if(typeof a!="function")throw new kr(s);return Xt(h)&&(E="leading"in h?!!h.leading:E,k="trailing"in h?!!h.trailing:k),v_(a,c,{leading:E,maxWait:c,trailing:k})}function O$(a){return d_(a,1)}function $$(a,c){return df(Kd(c),a)}function A$(){if(!arguments.length)return[];var a=arguments[0];return vt(a)?a:[a]}function R$(a){return $r(a,g)}function P$(a,c){return c=typeof c=="function"?c:n,$r(a,g,c)}function I$(a){return $r(a,v|g)}function M$(a,c){return c=typeof c=="function"?c:n,$r(a,v|g,c)}function D$(a,c){return c==null||ig(a,c,vn(c))}function Kr(a,c){return a===c||a!==a&&c!==c}var F$=Jl(Fd),L$=Jl(function(a,c){return a>=c}),Fo=cg((function(){return arguments})())?cg:function(a){return tn(a)&&jt.call(a,"callee")&&!Qv.call(a,"callee")},vt=we.isArray,j$=Rv?vr(Rv):WT;function Yn(a){return a!=null&&au(a.length)&&!Ri(a)}function rn(a){return tn(a)&&Yn(a)}function U$(a){return a===!0||a===!1||tn(a)&&Ln(a)==G}var ro=Zx||Sf,N$=Pv?vr(Pv):YT;function z$(a){return tn(a)&&a.nodeType===1&&!ba(a)}function B$(a){if(a==null)return!0;if(Yn(a)&&(vt(a)||typeof a=="string"||typeof a.splice=="function"||ro(a)||_s(a)||Fo(a)))return!a.length;var c=$n(a);if(c==Ce||c==Pt)return!a.size;if(_a(a))return!Ud(a).length;for(var h in a)if(jt.call(a,h))return!1;return!0}function V$(a,c){return ma(a,c)}function H$(a,c,h){h=typeof h=="function"?h:n;var E=h?h(a,c):n;return E===n?ma(a,c,n,h):!!E}function ff(a){if(!tn(a))return!1;var c=Ln(a);return c==ge||c==ie||typeof a.message=="string"&&typeof a.name=="string"&&!ba(a)}function q$(a){return typeof a=="number"&&Jv(a)}function Ri(a){if(!Xt(a))return!1;var c=Ln(a);return c==fe||c==pe||c==F||c==Ge}function __(a){return typeof a=="number"&&a==yt(a)}function au(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=j}function Xt(a){var c=typeof a;return a!=null&&(c=="object"||c=="function")}function tn(a){return a!=null&&typeof a=="object"}var y_=Iv?vr(Iv):GT;function W$(a,c){return a===c||jd(a,c,tf(c))}function Y$(a,c,h){return h=typeof h=="function"?h:n,jd(a,c,tf(c),h)}function K$(a){return b_(a)&&a!=+a}function G$(a){if(Pk(a))throw new pt(o);return dg(a)}function Q$(a){return a===null}function X$(a){return a==null}function b_(a){return typeof a=="number"||tn(a)&&Ln(a)==$e}function ba(a){if(!tn(a)||Ln(a)!=Ne)return!1;var c=Ml(a);if(c===null)return!0;var h=jt.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&Al.call(h)==Yx}var pf=Mv?vr(Mv):QT;function J$(a){return __(a)&&a>=-j&&a<=j}var w_=Dv?vr(Dv):XT;function lu(a){return typeof a=="string"||!vt(a)&&tn(a)&&Ln(a)==St}function _r(a){return typeof a=="symbol"||tn(a)&&Ln(a)==Nt}var _s=Fv?vr(Fv):JT;function Z$(a){return a===n}function eA(a){return tn(a)&&$n(a)==qt}function tA(a){return tn(a)&&Ln(a)==Gt}var nA=Jl(Nd),rA=Jl(function(a,c){return a<=c});function E_(a){if(!a)return[];if(Yn(a))return lu(a)?qr(a):Wn(a);if(aa&&a[aa])return Dx(a[aa]());var c=$n(a),h=c==Ce?kd:c==Pt?kl:ys;return h(a)}function Pi(a){if(!a)return a===0?a:0;if(a=Pr(a),a===J||a===-J){var c=a<0?-1:1;return c*de}return a===a?a:0}function yt(a){var c=Pi(a),h=c%1;return c===c?h?c-h:c:0}function S_(a){return a?Po(yt(a),0,ee):0}function Pr(a){if(typeof a=="number")return a;if(_r(a))return U;if(Xt(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=Xt(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=Bv(a);var h=j2.test(a);return h||N2.test(a)?_x(a.slice(2),h?2:8):L2.test(a)?U:+a}function C_(a){return fi(a,Kn(a))}function iA(a){return a?Po(yt(a),-j,j):a===0?a:0}function Ut(a){return a==null?"":gr(a)}var oA=ms(function(a,c){if(_a(c)||Yn(c)){fi(c,vn(c),a);return}for(var h in c)jt.call(c,h)&&fa(a,h,c[h])}),x_=ms(function(a,c){fi(c,Kn(c),a)}),T_=ms(function(a,c,h,E){fi(c,Kn(c),a,E)}),hf=ms(function(a,c,h,E){fi(c,vn(c),a,E)}),sA=$i(Id);function aA(a,c){var h=hs(a);return c==null?h:rg(h,c)}var lA=wt(function(a,c){a=Bt(a);var h=-1,E=c.length,k=E>2?c[2]:n;for(k&&jn(c[0],c[1],k)&&(E=1);++h<E;)for(var I=c[h],H=Kn(I),te=-1,ce=H.length;++te<ce;){var Ae=H[te],Re=a[Ae];(Re===n||Kr(Re,ds[Ae])&&!jt.call(a,Ae))&&(a[Ae]=I[Ae])}return a}),uA=wt(function(a){return a.push(n,Bg),hr(k_,n,a)});function cA(a,c){return jv(a,ot(c,3),di)}function dA(a,c){return jv(a,ot(c,3),Dd)}function fA(a,c){return a==null?a:Md(a,ot(c,3),Kn)}function pA(a,c){return a==null?a:lg(a,ot(c,3),Kn)}function hA(a,c){return a&&di(a,ot(c,3))}function mA(a,c){return a&&Dd(a,ot(c,3))}function vA(a){return a==null?[]:Hl(a,vn(a))}function gA(a){return a==null?[]:Hl(a,Kn(a))}function mf(a,c,h){var E=a==null?n:Io(a,c);return E===n?h:E}function _A(a,c){return a!=null&&qg(a,c,BT)}function vf(a,c){return a!=null&&qg(a,c,VT)}var yA=Lg(function(a,c,h){c!=null&&typeof c.toString!="function"&&(c=Rl.call(c)),a[c]=h},_f(Gn)),bA=Lg(function(a,c,h){c!=null&&typeof c.toString!="function"&&(c=Rl.call(c)),jt.call(a,c)?a[c].push(h):a[c]=[h]},ot),wA=wt(ha);function vn(a){return Yn(a)?tg(a):Ud(a)}function Kn(a){return Yn(a)?tg(a,!0):ZT(a)}function EA(a,c){var h={};return c=ot(c,3),di(a,function(E,k,I){ci(h,c(E,k,I),E)}),h}function SA(a,c){var h={};return c=ot(c,3),di(a,function(E,k,I){ci(h,k,c(E,k,I))}),h}var CA=ms(function(a,c,h){ql(a,c,h)}),k_=ms(function(a,c,h,E){ql(a,c,h,E)}),xA=$i(function(a,c){var h={};if(a==null)return h;var E=!1;c=Qt(c,function(I){return I=to(I,a),E||(E=I.length>1),I}),fi(a,Zd(a),h),E&&(h=$r(h,v|y|g,bk));for(var k=c.length;k--;)qd(h,c[k]);return h});function TA(a,c){return O_(a,su(ot(c)))}var kA=$i(function(a,c){return a==null?{}:tk(a,c)});function O_(a,c){if(a==null)return{};var h=Qt(Zd(a),function(E){return[E]});return c=ot(c),_g(a,h,function(E,k){return c(E,k[0])})}function OA(a,c,h){c=to(c,a);var E=-1,k=c.length;for(k||(k=1,a=n);++E<k;){var I=a==null?n:a[Yr(c[E])];I===n&&(E=k,I=h),a=Ri(I)?I.call(a):I}return a}function $A(a,c,h){return a==null?a:va(a,c,h)}function AA(a,c,h,E){return E=typeof E=="function"?E:n,a==null?a:va(a,c,h,E)}var $_=Ng(vn),A_=Ng(Kn);function RA(a,c,h){var E=vt(a),k=E||ro(a)||_s(a);if(c=ot(c,4),h==null){var I=a&&a.constructor;k?h=E?new I:[]:Xt(a)?h=Ri(I)?hs(Ml(a)):{}:h={}}return(k?mr:di)(a,function(H,te,ce){return c(h,H,te,ce)}),h}function PA(a,c){return a==null?!0:qd(a,c)}function IA(a,c,h){return a==null?a:Sg(a,c,Kd(h))}function MA(a,c,h,E){return E=typeof E=="function"?E:n,a==null?a:Sg(a,c,Kd(h),E)}function ys(a){return a==null?[]:Td(a,vn(a))}function DA(a){return a==null?[]:Td(a,Kn(a))}function FA(a,c,h){return h===n&&(h=c,c=n),h!==n&&(h=Pr(h),h=h===h?h:0),c!==n&&(c=Pr(c),c=c===c?c:0),Po(Pr(a),c,h)}function LA(a,c,h){return c=Pi(c),h===n?(h=c,c=0):h=Pi(h),a=Pr(a),HT(a,c,h)}function jA(a,c,h){if(h&&typeof h!="boolean"&&jn(a,c,h)&&(c=h=n),h===n&&(typeof c=="boolean"?(h=c,c=n):typeof a=="boolean"&&(h=a,a=n)),a===n&&c===n?(a=0,c=1):(a=Pi(a),c===n?(c=a,a=0):c=Pi(c)),a>c){var E=a;a=c,c=E}if(h||a%1||c%1){var k=Zv();return On(a+k*(c-a+gx("1e-"+((k+"").length-1))),c)}return Bd(a,c)}var UA=vs(function(a,c,h){return c=c.toLowerCase(),a+(h?R_(c):c)});function R_(a){return gf(Ut(a).toLowerCase())}function P_(a){return a=Ut(a),a&&a.replace(B2,Ax).replace(ax,"")}function NA(a,c,h){a=Ut(a),c=gr(c);var E=a.length;h=h===n?E:Po(yt(h),0,E);var k=h;return h-=c.length,h>=0&&a.slice(h,k)==c}function zA(a){return a=Ut(a),a&&qn.test(a)?a.replace(pr,Rx):a}function BA(a){return a=Ut(a),a&&os.test(a)?a.replace(Yi,"\\$&"):a}var VA=vs(function(a,c,h){return a+(h?"-":"")+c.toLowerCase()}),HA=vs(function(a,c,h){return a+(h?" ":"")+c.toLowerCase()}),qA=Mg("toLowerCase");function WA(a,c,h){a=Ut(a),c=yt(c);var E=c?us(a):0;if(!c||E>=c)return a;var k=(c-E)/2;return Xl(jl(k),h)+a+Xl(Ll(k),h)}function YA(a,c,h){a=Ut(a),c=yt(c);var E=c?us(a):0;return c&&E<c?a+Xl(c-E,h):a}function KA(a,c,h){a=Ut(a),c=yt(c);var E=c?us(a):0;return c&&E<c?Xl(c-E,h)+a:a}function GA(a,c,h){return h||c==null?c=0:c&&(c=+c),rT(Ut(a).replace(Ki,""),c||0)}function QA(a,c,h){return(h?jn(a,c,h):c===n)?c=1:c=yt(c),Vd(Ut(a),c)}function XA(){var a=arguments,c=Ut(a[0]);return a.length<3?c:c.replace(a[1],a[2])}var JA=vs(function(a,c,h){return a+(h?"_":"")+c.toLowerCase()});function ZA(a,c,h){return h&&typeof h!="number"&&jn(a,c,h)&&(c=h=n),h=h===n?ee:h>>>0,h?(a=Ut(a),a&&(typeof c=="string"||c!=null&&!pf(c))&&(c=gr(c),!c&&ls(a))?no(qr(a),0,h):a.split(c,h)):[]}var eR=vs(function(a,c,h){return a+(h?" ":"")+gf(c)});function tR(a,c,h){return a=Ut(a),h=h==null?0:Po(yt(h),0,a.length),c=gr(c),a.slice(h,h+c.length)==c}function nR(a,c,h){var E=$.templateSettings;h&&jn(a,c,h)&&(c=n),a=Ut(a),c=hf({},c,E,zg);var k=hf({},c.imports,E.imports,zg),I=vn(k),H=Td(k,I);mr(I,function(it){if(uv.test(it))throw new pt(u)});var te,ce,Ae=0,Re=c.interpolate||El,De="__p += '",Ve=Od((c.escape||El).source+"|"+Re.source+"|"+(Re===ko?F2:El).source+"|"+(c.evaluate||El).source+"|$","g"),Je="//# sourceURL="+(jt.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++fx+"]")+`
5
5
  `;a.replace(Ve,function(it,Tt,At,yr,Un,br){return At||(At=yr),De+=a.slice(Ae,br).replace(V2,Px),Tt&&(te=!0,De+=`' +
@@ -27,7 +27,7 @@ function print() { __p += __j.call(arguments, '') }
27
27
  `);return s===-1?"":i.stack.slice(s+1)})();try{if(!r.stack)r.stack=o;else if(o){const s=o.indexOf(`
28
28
  `),l=s===-1?-1:o.indexOf(`
29
29
  `,s+1),u=l===-1?"":o.slice(l+1);String(r.stack).endsWith(u)||(r.stack+=`
30
- `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&qu.assertOptions(r,{silentJSONParsing:Ir.transitional(Ir.boolean),forcedJSONParsing:Ir.transitional(Ir.boolean),clarifyTimeoutError:Ir.transitional(Ir.boolean),legacyInterceptorReqResOrdering:Ir.transitional(Ir.boolean)},!1),i!=null&&(he.isFunction(i)?n.paramsSerializer={serialize:i}:qu.assertOptions(i,{encode:Ir.function,serialize:Ir.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qu.assertOptions(n,{baseUrl:Ir.spelling("baseURL"),withXsrfToken:Ir.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&he.merge(o.common,o[n.method]);o&&he.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ir.concat(s,o);const l=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;u=u&&g.synchronous;const m=n.transitional||Wh;m&&m.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let f,p=0,v;if(!u){const g=[Ky.bind(this),void 0];for(g.unshift(...l),g.push(...d),v=g.length,f=Promise.resolve(n);p<v;)f=f.then(g[p++],g[p++]);return f}v=l.length;let y=n;for(;p<v;){const g=l[p++],m=l[p++];try{y=g(y)}catch(b){m.call(this,b);break}}try{f=Ky.call(this,y)}catch(g){return Promise.reject(g)}for(p=0,v=d.length;p<v;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=Xo(this.defaults,t);const n=nE(t.baseURL,t.url,t.allowAbsoluteUrls);return J1(n,t.params,t.paramsSerializer)}};he.forEach(["delete","get","head","options"],function(e){Wo.prototype[e]=function(t,n){return this.request(Xo(n||{},{method:e,url:t,data:(n||{}).data}))}});he.forEach(["post","put","patch"],function(e){function t(n){return function(r,i,o){return this.request(Xo(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Wo.prototype[e]=t(),Wo.prototype[e+"Form"]=t(!0)});let z5=class aE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(i,o,s){r.reason||(r.reason=new sl(i,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new aE(function(n){t=n}),cancel:t}}};function B5(e){return function(t){return e.apply(null,t)}}function V5(e){return he.isObject(e)&&e.isAxiosError===!0}const zp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zp).forEach(([e,t])=>{zp[t]=e});function lE(e){const t=new Wo(e),n=z1(Wo.prototype.request,t);return he.extend(n,Wo.prototype,t,{allOwnKeys:!0}),he.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return lE(Xo(e,r))},n}const ln=lE(ol);ln.Axios=Wo;ln.CanceledError=sl;ln.CancelToken=z5;ln.isCancel=eE;ln.VERSION=sE;ln.toFormData=Rc;ln.AxiosError=at;ln.Cancel=ln.CanceledError;ln.all=function(e){return Promise.all(e)};ln.spread=B5;ln.isAxiosError=V5;ln.mergeConfig=Xo;ln.AxiosHeaders=ir;ln.formToJSON=e=>Z1(he.isHTMLForm(e)?new FormData(e):e);ln.getAdapter=oE.getAdapter;ln.HttpStatusCode=zp;ln.default=ln;const{Axios:Iie,AxiosError:Mie,CanceledError:Die,isCancel:Fie,CancelToken:Lie,VERSION:jie,all:Uie,Cancel:Nie,isAxiosError:zie,spread:Bie,toFormData:Vie,AxiosHeaders:Hie,HttpStatusCode:qie,formToJSON:Wie,getAdapter:Yie,mergeConfig:Kie}=ln,uE=new Map,H5={baseURL:"",timeout:1e4};function Qy(e,t,n){const r=ln.create({...H5,...t});return uE.set(e,{instance:r,urlResolver:n}),r}async function Pe(e,t){const n=e.split("/")[0];if(!n)throw new Error("Instance name could not be extracted from url.");const r=uE.get(n);if(!r)throw new Error(`Instance "${n}" not initialized. Call initInstance() first.`);if(!r.urlResolver)throw new Error(`Instance "${n}" has no urlResolver. Pass one to initInstance().`);return e=r.urlResolver(e),r.instance.request({url:e,...t})}async function q5(e,t){return Pe("__local__/api/comp/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function W5(e,t){return Pe("__local__/api/comp/checkCompRepeat",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Y5(e,t){return Pe("__local__/api/comp/compFileHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function K5(e,t){return Pe("__local__/api/comp/compFilesOssSignedUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function G5(e,t){return Pe("__local__/api/comp/dep",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Q5(e,t){return Pe("__local__/api/comp/dir",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function X5(e,t){return Pe("__local__/api/comp/download",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function J5(e,t){return Pe("__local__/api/comp/file",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Z5(e,t){return Pe("__local__/api/comp/generateCompJson",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function ej(e,t){return Pe("__local__/api/comp/localCompDetailByPathHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function tj(e,t){return Pe("__local__/api/comp/localComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function nj(e,t){return Pe("__local__/api/comp/localCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function rj(e,t){return Pe("__local__/api/comp/openCompPathInExplorer",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function ij(e,t){return Pe("__local__/api/comp/openCompPathInVscode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function oj(e){return Pe("__local__/api/comp/packageJson",{method:"POST",...e||{}})}async function sj(e,t){return Pe("__local__/api/comp/renameDir",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function aj(e,t){return Pe("__local__/api/comp/submit",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function lj(e,t){return Pe("__local__/api/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function uj(e,t){return Pe("__local__/api/comp/updateVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function cj(e,t){return Pe("__local__/api/comp/writeFile",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const dj=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheck:q5,compcontrollerCheckcomprepeat:W5,compcontrollerCompfilehash:Y5,compcontrollerCompfilesosssignedurl:K5,compcontrollerDep:G5,compcontrollerDir:Q5,compcontrollerDownload:X5,compcontrollerFile:J5,compcontrollerGeneratecompjson:Z5,compcontrollerLocalcompdetailbypathhash:ej,compcontrollerLocalcomps:tj,compcontrollerLocalcompsbyids:nj,compcontrollerOpencomppathinexplorer:rj,compcontrollerOpencomppathinvscode:ij,compcontrollerPackagejson:oj,compcontrollerRenamedir:sj,compcontrollerSubmit:aj,compcontrollerUpdate:lj,compcontrollerUpdateversion:uj,compcontrollerWritefile:cj},Symbol.toStringTag,{value:"Module"}));async function fj(e,t){return Pe("__local__/api/module/buildTemplateCompiler",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function pj(e){return Pe("__local__/api/module/clearPreBuild",{method:"POST",...e||{}})}async function hj(e,t){return Pe("__local__/api/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function mj(e){return Pe("__local__/api/module/preBuildSize",{method:"POST",...e||{}})}const vj=Object.freeze(Object.defineProperty({__proto__:null,modulecontrollerBuildtemplatecompiler:fj,modulecontrollerClearprebuild:pj,modulecontrollerPrebuild:hj,modulecontrollerPrebuildsize:mj},Symbol.toStringTag,{value:"Module"}));async function gj(e,t){return Pe("__local__/api/oss/fileSignUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const _j=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerFilesignurl:gj},Symbol.toStringTag,{value:"Module"}));async function yj(e,t){return Pe("__local__/api/vuefinder/list",{method:"GET",params:{...e},...t||{}})}const bj=Object.freeze(Object.defineProperty({__proto__:null,vuefindercontrollerList:yj},Symbol.toStringTag,{value:"Module"})),wj={comp:dj,module:vj,oss:_j,vuefinder:bj};async function Ej(e){return Pe("__remote__/api/v1/auth/github",{method:"GET",...e||{}})}async function Sj(e){return Pe("__remote__/api/v1/auth/github/callback",{method:"GET",...e||{}})}const Cj=Object.freeze(Object.defineProperty({__proto__:null,authcontrollerGithuboauth:Ej,authcontrollerGithuboauthcallback:Sj},Symbol.toStringTag,{value:"Module"}));async function xj(e,t){return Pe("__remote__/api/v1/comment/create",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Tj(e,t){return Pe("__remote__/api/v1/comment/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function kj(e,t){return Pe("__remote__/api/v1/comment/list",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Oj(e,t){return Pe("__remote__/api/v1/comment/markRead",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function $j(e,t){return Pe("__remote__/api/v1/comment/myCompsComments",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Aj(e,t){return Pe("__remote__/api/v1/comment/replies",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Rj(e){return Pe("__remote__/api/v1/comment/unreadCount",{method:"POST",...e||{}})}const Pj=Object.freeze(Object.defineProperty({__proto__:null,commentcontrollerCreate:xj,commentcontrollerDelete:Tj,commentcontrollerList:kj,commentcontrollerMarkread:Oj,commentcontrollerMycompscomments:$j,commentcontrollerReplies:Aj,commentcontrollerUnreadcount:Rj},Symbol.toStringTag,{value:"Module"}));async function Ij(e,t){return Pe("__remote__/api/v1/comp/checkCompExistByHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Mj(e,t){return Pe("__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Dj(e,t){return Pe("__remote__/api/v1/comp/checkVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Fj(e,t){return Pe("__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Lj(e,t){return Pe("__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function jj(e,t){return Pe("__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Uj(e,t){return Pe("__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Nj(e,t){return Pe("__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function zj(e,t){return Pe("__remote__/api/v1/comp/compsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Bj(e,t){return Pe("__remote__/api/v1/comp/deleteFailedComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Vj(e,t){return Pe("__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Hj(e,t){return Pe("__remote__/api/v1/comp/existCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function qj(e,t){return Pe("__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Wj(e,t){return Pe("__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Yj(e,t){return Pe("__remote__/api/v1/comp/softDelete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Kj(e,t){return Pe("__remote__/api/v1/comp/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Gj(e,t){return Pe("__remote__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Qj(e,t){return Pe("__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Xj(e,t){return Pe("__remote__/api/v1/comp/updateCompDownloadCount",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Jj(e,t){return Pe("__remote__/api/v1/comp/updateObjectId",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Zj(e,t){return Pe("__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function e3(e,t){return Pe("__remote__/api/v1/comp/upload",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function t3(e,t){return Pe("__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const n3=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheckcompexistbyhash:Ij,compcontrollerCheckcompexistbyid:Mj,compcontrollerCheckversion:Dj,compcontrollerCollect:Fj,compcontrollerCollectedcomps:Lj,compcontrollerCompdetail:jj,compcontrollerComphash:Uj,compcontrollerComps:Nj,compcontrollerCompsbyids:zj,compcontrollerDeletefailedcomp:Bj,compcontrollerDeletemycomp:Vj,compcontrollerExistcompsbyids:Hj,compcontrollerMycomps:qj,compcontrollerSimilarcomps:Wj,compcontrollerSoftdelete:Yj,compcontrollerTags:Kj,compcontrollerUpdate:Gj,compcontrollerUpdatebasicinfo:Qj,compcontrollerUpdatecompdownloadcount:Xj,compcontrollerUpdateobjectid:Jj,compcontrollerUpgraderecords:Zj,compcontrollerUpload:e3,compcontrollerVersions:t3},Symbol.toStringTag,{value:"Module"}));async function r3(e,t){return Pe("__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const i3=Object.freeze(Object.defineProperty({__proto__:null,emailcontrollerSendcode:r3},Symbol.toStringTag,{value:"Module"}));async function o3(e,t){return Pe("__remote__/api/v1/extranet/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function s3(e,t){return Pe("__remote__/api/v1/extranet/comps/detail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function a3(e,t){return Pe("__remote__/api/v1/extranet/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const l3=Object.freeze(Object.defineProperty({__proto__:null,extranetcontrollerCompdetail:s3,extranetcontrollerComps:o3,extranetcontrollerTags:a3},Symbol.toStringTag,{value:"Module"}));async function u3(e,t){return Pe("__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const c3=Object.freeze(Object.defineProperty({__proto__:null,keywordcontrollerQuerykeywordscomp:u3},Symbol.toStringTag,{value:"Module"}));async function d3(e){return Pe("__remote__/api/v1/oss/compOssDir",{method:"POST",...e||{}})}async function f3(e){return Pe("__remote__/api/v1/oss/getSts",{method:"POST",...e||{}})}async function p3(e){return Pe("__remote__/api/v1/oss/prebuildPutPolicy",{method:"POST",...e||{}})}async function h3(e,t){return Pe("__remote__/api/v1/oss/putPolicy",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const m3=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerCompossdir:d3,osscontrollerGetsts:f3,osscontrollerPrebuildputpolicy:p3,osscontrollerPutpolicy:h3},Symbol.toStringTag,{value:"Module"}));async function v3(e,t){return Pe("__remote__/api/v1/rating/my",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function g3(e,t){return Pe("__remote__/api/v1/rating/remove",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function _3(e,t){return Pe("__remote__/api/v1/rating/set",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const y3=Object.freeze(Object.defineProperty({__proto__:null,ratingcontrollerMy:v3,ratingcontrollerRemove:g3,ratingcontrollerSet:_3},Symbol.toStringTag,{value:"Module"}));async function b3(e,t){return Pe("__remote__/api/v1/team/addToTeamMyComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function w3(e){return Pe("__remote__/api/v1/team/allMember",{method:"POST",...e||{}})}async function E3(e,t){return Pe("__remote__/api/v1/team/applyList",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function S3(e,t){return Pe("__remote__/api/v1/team/checkCompUpdatePermission",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function C3(e,t){return Pe("__remote__/api/v1/team/copyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function x3(e,t){return Pe("__remote__/api/v1/team/create",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function T3(e){return Pe("__remote__/api/v1/team/created",{method:"POST",...e||{}})}async function k3(e,t){return Pe("__remote__/api/v1/team/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function O3(e){return Pe("__remote__/api/v1/team/detail",{method:"POST",...e||{}})}async function $3(e){return Pe("__remote__/api/v1/team/exit",{method:"POST",...e||{}})}async function A3(e,t){return Pe("__remote__/api/v1/team/findByCode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function R3(e,t){return Pe("__remote__/api/v1/team/handleApply",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function P3(e,t){return Pe("__remote__/api/v1/team/join",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function I3(e){return Pe("__remote__/api/v1/team/joined",{method:"POST",...e||{}})}async function M3(e,t){return Pe("__remote__/api/v1/team/kickOut",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function D3(e,t){return Pe("__remote__/api/v1/team/member",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function F3(e,t){return Pe("__remote__/api/v1/team/myTeamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function L3(e,t){return Pe("__remote__/api/v1/team/removeComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function j3(e,t){return Pe("__remote__/api/v1/team/removeMyTeamComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function U3(e,t){return Pe("__remote__/api/v1/team/teamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function N3(e,t){return Pe("__remote__/api/v1/team/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function z3(e,t){return Pe("__remote__/api/v1/team/updateCompCanUpdateUsers",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function B3(e,t){return Pe("__remote__/api/v1/team/updateMenu",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function V3(e,t){return Pe("__remote__/api/v1/team/updateTeamUserNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const H3=Object.freeze(Object.defineProperty({__proto__:null,teamcontrollerAddtoteammycomps:b3,teamcontrollerAllmember:w3,teamcontrollerApplylist:E3,teamcontrollerCheckcompupdatepermission:S3,teamcontrollerCopycomp:C3,teamcontrollerCreate:x3,teamcontrollerCreated:T3,teamcontrollerDelete:k3,teamcontrollerDetail:O3,teamcontrollerExit:$3,teamcontrollerFindbycode:A3,teamcontrollerHandleapply:R3,teamcontrollerJoin:P3,teamcontrollerJoined:I3,teamcontrollerKickout:M3,teamcontrollerMember:D3,teamcontrollerMyteamcomps:F3,teamcontrollerRemovecompfromteam:L3,teamcontrollerRemovemyteamcomp:j3,teamcontrollerTeamcomps:U3,teamcontrollerUpdate:N3,teamcontrollerUpdatecompcanupdateusers:z3,teamcontrollerUpdatemenu:B3,teamcontrollerUpdateteamusernickname:V3},Symbol.toStringTag,{value:"Module"}));async function q3(e){return Pe("__remote__/api/v1/token/approachExpire",{method:"POST",...e||{}})}async function W3(e){return Pe("__remote__/api/v1/token/refresh",{method:"POST",...e||{}})}const Y3=Object.freeze(Object.defineProperty({__proto__:null,tokencontrollerApproachexpire:q3,tokencontrollerRefresh:W3},Symbol.toStringTag,{value:"Module"}));async function K3(e,t){return Pe("__remote__/api/v1/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function G3(e){return Pe("__remote__/api/v1/upgrade/logs",{method:"POST",...e||{}})}const Q3=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerCheck:K3,upgradecontrollerLogs:G3},Symbol.toStringTag,{value:"Module"}));async function X3(e,t){return Pe("__remote__/api/v1/user/bindEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function J3(e,t){return Pe("__remote__/api/v1/user/changeAvatar",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Z3(e,t){return Pe("__remote__/api/v1/user/changeNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function eU(e,t){return Pe("__remote__/api/v1/user/changePassword",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function tU(e){return Pe("__remote__/api/v1/user/checkPassword",{method:"POST",...e||{}})}async function nU(e,t){return Pe("__remote__/api/v1/user/login",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function rU(e,t){return Pe("__remote__/api/v1/user/setAllowEmailLogin",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function iU(e,t){return Pe("__remote__/api/v1/user/updateEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function oU(e){return Pe("__remote__/api/v1/user/userInfo",{method:"POST",...e||{}})}async function sU(e){return Pe("__remote__/api/v1/user/whoAmI",{method:"POST",...e||{}})}const aU=Object.freeze(Object.defineProperty({__proto__:null,usercontrollerBindemail:X3,usercontrollerChangeavatar:J3,usercontrollerChangenickname:Z3,usercontrollerChangepassword:eU,usercontrollerCheckpassword:tU,usercontrollerLogin:nU,usercontrollerSetallowemaillogin:rU,usercontrollerUpdateemail:iU,usercontrollerUserinfo:oU,usercontrollerWhoami:sU},Symbol.toStringTag,{value:"Module"}));async function lU(e,t){return Pe("__remote__/api/v2/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const uU=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerv2Check:lU},Symbol.toStringTag,{value:"Module"})),zs={v1Auth:Cj,v1Comment:Pj,v1Comp:n3,v1Email:i3,v1Extranet:l3,v1Keyword:c3,v1Oss:m3,v1Rating:y3,v1Team:H3,v1Token:Y3,v1Upgrade:Q3,v1User:aU,v2Upgrade:uU},cU=Eo("personalStore",{state:()=>({userInfo:{},isPasswordSet:!1}),getters:{email(e){return e.userInfo?.email??""},isAllowEmailLogin(e){return e.userInfo?.isAllowEmailLogin??!1}},actions:{setUserInfo(e){this.$patch(t=>{t.userInfo=e})},setIsPasswordSet(e){this.$patch(t=>{t.isPasswordSet=e})},async initUserInfo(){const e=await zs.v1User.usercontrollerUserinfo();e.code===0&&this.setUserInfo(e.data)},async setEmail(e){this.$patch(t=>{t.userInfo.email=e})},async setNickname(e){this.$patch(t=>{t.userInfo.nickname=e})},async setAllowEmailLogin(e){await zs.v1User.usercontrollerSetallowemaillogin({allow:e}).then(()=>{this.$patch(t=>{t.userInfo.isAllowEmailLogin=e})})}}}),dU=Eo("moduleStore",{state:()=>({modules:{}}),actions:{setModules(e,t){this.$patch(n=>{n.modules[e]=t})},async loadModule(e){if(this.modules[e])return this.modules[e];const t=await import(e);return this.setModules(e,t),t}}}),mu=Ls(AD,!0),Gh=Eo("appStore",{state:()=>({}),getters:{collapse(){return mu.value}},actions:{toggleSideBar(){mu.value=!mu.value},setSideBarCollapse(e){e!==this.collapse&&(mu.value=e)}}}),fU=Eo("team",{state:()=>({joinedTeams:[],createdTeams:[]}),actions:{setJoinedTeams(e){this.$patch(t=>{t.joinedTeams=e})},setCreatedTeams(e){this.$patch(t=>{t.createdTeams=e})},removeCreatedTeam(e){this.$patch(t=>{t.createdTeams=t.createdTeams.filter(n=>n._id!==e)})},addCreatedTeam(e){this.$patch(t=>{t.createdTeams.some(r=>r._id===e._id)||t.createdTeams.push(e)})},addJoinedTeam(e){this.$patch(t=>{t.joinedTeams.some(r=>r._id===e._id)||t.joinedTeams.push(e)})},removeJoinedTeam(e){this.$patch(t=>{t.joinedTeams=t.joinedTeams.filter(n=>n._id!==e)})},updateCreatedTeamItemById(e,t){this.$patch(n=>{const r=n.createdTeams.findIndex(i=>i._id===e);r!==-1&&(n.createdTeams[r]=t)})},getTeamDetail(e){return this.joinedTeams.find(n=>n._id===e)||this.createdTeams.find(n=>n._id===e)}}}),pU={keyword:"关键词",confirm:"确定",cancel:"取消",close:"关闭",save:"保存",submit:"提交",delete:"删除",edit:"编辑",add:"添加",update:"更新",upload:"上传",download:"下载",refresh:"刷新",loadingText:"加载中",success:"成功",error:"错误",warning:"警告",info:"提示",copy:"复制",copied:"已复制",copySuccess:"复制成功",copyFailed:"复制失败",open:"打开",search:"搜索",reset:"重置",clear:"清空",back:"返回",next:"下一步",prev:"上一步",finish:"完成",operation:"操作",status:"状态",yes:"是",no:"否",name:"名称",description:"描述",version:"版本",time:"时间",date:"日期",author:"作者",type:"类型",category:"分类",tag:"标签",content:"内容",setting:"设置",cache:"缓存",cacheSize:"已使用",clearCache:"清空缓存",clearCacheConfirm:"将清空浏览器单文件编译结果以及模块预编译文件,确认清空缓存吗?",cacheCleared:"缓存已清空",newPage:"新页面打开",terminal:"终端",preview:"预览",doc:"文档",readme:"README.md",upgradeRecord:"更新记录",ratingReview:"评分评论",openInNewPage:"新页面打开",depInstall:"依赖安装",fullscreen:"全屏",exitFullscreen:"退出全屏",maximizeRestore:"最大化/还原",siteSlogan:"原子化组件社区,让组件流通更简单。",siteSubtitle:"Vue 组件共享平台",adminSlogan:"组件管理平台 · 后台管理系统",docsTutorial:"文档教程",empty:"暂无数据",noReadme:"组件没有配置README.md文件",dragSort:"拖拽排序",filter:"筛选",apply:"应用",person:"人",unit:"个",pleaseSelect:"请选择",pleaseInput:"请输入",me:"我",generate:"生成",regenerate:"重新生成",generateSuccess:"生成成功",moreOperations:"更多操作",more:"更多",maxTagCount:"最大标签数量",or:"或"},hU={keywordPlaceholder:"请输入组件名称/描述",title:"组件",name:"组件名称",fieldId:"组件ID",fieldName:"组件名称",fieldVersion:"版本号",desc:"组件描述",remarksDesc:"备注说明",remarksDescRequired:"请输入备注说明",pleaseInputCompName:"请输入组件名称",pleaseInputRemarks:"请输入备注,有助于组件市场检索",pleaseInputTags:"请选择或输入标签",tags:"组件标签",tagsMaxCount:"标签数量不能超过5个",tagsEmpty:"标签不能为空",tagsTooLong:"标签「{tag}」长度不能超过20个字符",tagsInvalidChars:"标签「{tag}」包含非法字符,仅允许中文、英文、数字、连字符和下划线",tagsHelp:"输入文字后按回车键创建新标签,最多5个",compNameRequired:"组件名称不能为空",compNameNamingRule:"组件名只能是「大驼峰(PascalCase)」或「短横线(kebab-case)」命名法",lengthBetween:"长度在 {min} 到 {max} 个字符",previewImage:"预览图",previewImageRequired:"请上传或生成预览图",previewImageHint:"在小窗预览面板展示的截图,用于组件市场封面。如自动截图失败,请手动上传 PNG 图片",uploadPreviewImage:"上传预览图",generateScreenshot:"生成截图",previewImageFallbackHint:"预览图仅在组件无法渲染时生效",version:"组件版本",detail:"组件详情",preview:"组件预览",previewConfig:"预览配置",previewList:"预览列表",uploadPreview:"组件上传预览",updatePreview:"组件更新预览",download:"下载组件",update:"更新组件",upload:"上传组件",submit:"提交组件",edit:"编辑组件",add:"添加组件",delete:"删除组件",local:"本地组件",remote:"远程组件",online:"在线组件",similar:"相似组件",similarFound:"检测到相似组件",similarTeam:"团队内相似组件",dir:"组件目录",file:"组件文件",entry:"入口文件",previewEntry:"预览入口地址",previewEntryFull:"预览入口地址(全屏窗口)",addPreviewEntry:"添加预览入口",maxPreviewEntry:"最多添加{n}个预览入口",pleaseAddPreviewEntry:"请添加预览入口",miniPreviewFile:"小窗预览文件",fullPreviewFile:"全屏预览文件",pleaseSelectPreviewFile:"请选择预览文件",remarkDesc:"备注说明",dep:"组件依赖",localDep:"组件依赖(本地)",onlineDep:"组件依赖(线上)",finalDep:"最终依赖",localVersion:"本地:",onlineVersion:"线上:",onlineDepEmpty:"线上依赖暂无数据!",versionConsistent:"版本一致",versionChange:"版本变化,请手动选择最终版本",versionChangeConfirmed:"已确认",newDep:"新增依赖",miniPanel:"小窗面板",fullPanel:"全屏面板",reload:"重新加载",uploadProtocol:"组件发布协议",bgPanel:"背景板",compLocation:"组件位置",pleaseSelectFolderFirst:"请先选择文件夹",compAlreadyUploaded:"组件已经上传,更新操作请前往我的组件或团队组件",affirmDep:"组件依赖(确认的版本)",checkConfig:"配置检查",checkError:"报错信息",extraInfo:"附加信息",baseInfo:"基础信息",upgradeLog:"更新说明",pleaseInputUpgradeLog:"请填写更新说明",config:"组件配置",configStatus:"组件配置检查状态",configError:"配置异常",configCheckError:"配置检查报错",needUpgrade:"需要升级",fileChanged:"组件文件有变化",versionChanged:"版本号变化",fileNoChange:"文件没有变化",markdownValid:"Markdown预览校验通过",noMarkdown:"没有md文件",hash:"文件哈希",localHash:"本地组件文件hash",remoteHash:"线上组件文件hash",remoteVersion:"线上组件版本号",remoteVersionPrefix:"线上:",localVersionPrefix:"本地:",versionCompare:"版本号比较结果",carouselIndex:"组件预览走马灯index",bgColor:"组件背景颜色",dialogType:"组件弹窗类型",repeat:"组件重复检查",existLocal:"组件在本地存在",scopeId:"作用域id",tempDir:"组件临时目录",submitLimit:"组件提交限制",maxSize:"总大小限制",maxCount:"文件数量限制",matchType:"匹配类型",updateType:"更新类型",updateOnline:"在线更新",updateOffline:"离线更新",compOfflineUpdate:"组件离线更新",compOnlineUpdate:"组件在线更新",folder:"文件夹",compNotInLocal:"组件不在本地,继续更新只能更新组件描述,预览配置等基础信息,是否继续?",selectUpdateFolder:"请选择要更新的文件夹",openInVscode:"在编辑器中打开",openingInEditor:"在编辑器中打开...",openInExplorer:"在文件管理器中打开",openingInExplorer:"正在打开文件管理器...",updateSuccess:"更新成功",downloadVersionConfirm:"当前选择的版本为:{version},确认下载吗?",downloading:"组件下载中...",downloadPathConfirm:"是否下载组件到【{path}】路径下",downloadCoverConfirm:"组件【{name}】已经下载或者有同名组件,是否覆盖?",downloadCoverTitle:"组件覆盖确认",coverConfirm:"确认覆盖",uncollectConfirm:"是否取消收藏组件【{name}】,取消收藏后组件将不再显示在收藏列表中,是否继续?",deleteConfirm:"是否删除组件【{name}】,删除组件后会释放占用的组件名称,是否继续?",collect:"收藏",uncollect:"取消收藏",collected:"已收藏",uncollected:"未收藏",entryFile:"入口文件",configFile:"配置文件",fileChangedNeedVersion:"文件内容改变,请增加版本号",viewFileChanges:"查看文件变化",versionChangedButFileSame:"版本号改变,但文件内容未改变,请还原版本号",errorMsg:"错误信息",versionCannotBeLessThanLatest:"版本号不能小于最新版本{version}",uploadAnyway:"仍然上传",compileError:"组件编译失败",compileWarn:"组件编译警告",formatCode:"格式化代码:",formatCodeTooltip:"仅格式化对比时的文件,不会格式化原始文件",noChanges:"暂无变更",diff:{changed:"M 改变",unchanged:"U 未改变",added:"A 新增",deleted:"D 删除"},uploadConfirmTitle:"上传确认",renameFolderTitle:"文件夹名称不一致",renameFolderTip:"组件名称「{editedName}」与文件夹名称「{folderName}」不一致。",renameFolderQuestion:"是否在上传成功后同步修改文件夹名称?",renameSyncYes:"同步修改文件夹名称",renameSyncNo:"仅上传,不修改文件夹名称"},mU={title:"团队",name:"团队名称",code:"团队码",desc:"团队描述",create:"创建团队",join:"加入团队",exit:"退出团队",exitConfirm:"退出确认",manage:"团队管理",setting:"团队设置",member:"团队成员",memberCount:"成员数",maxMember:"最大成员数",compCount:"组件数量",maxCompCount:"最大组件数量",creator:"创建者",downloadCount:"下载量",collectCount:"收藏量",createTime:"创建时间",myTeam:"我的团队",joinedTeam:"已加入团队",space:"团队空间",noJoined:"暂无加入的团队",noCreated:"暂无创建的团队",createCountLimit:"最大允许创建的团队数量",joinCountLimit:"允许最多加入的团队数量",compList:"团队组件列表",myCompList:"我的组件",compGroup:"团队组件分组",compGroupList:"团队组件分组列表",addMyComp:"团队添加我的组件",compUpdate:"团队我的组件更新",addFromMine:"去我的组件添加",applyList:"申请列表",nickname:"团队昵称",noTeamInfo:"暂无团队信息",compLib:"组件库",groupConfig:"分组配置",compManage:"组件管理",unsavedDataLeave:"分组配置数据未保存,确定要离开吗?",leave:"离开",disbandTeam:"解散团队",applyAudit:"申请审核",teamName:"团队名称",fillTeamCode:"填写团队码",pleaseInputTeamCode:"请输入团队码",teamIdNotExist:"团队ID不存在",joinSuccess:"加入团队成功",applyJoinTeam:"申请加入团队",showRepeatComp:"展示重复组件",allowAuthorDelete:"作者删除组件权限",teamIntro:"团队介绍",fillTeamName:"填写团队名称",pleaseInputTeamName:"请输入团队名称",pleaseInputTeamDesc:"请输入团队介绍",createSuccess:"创建团队成功",charLength:"长度在 {min} 到 {max} 个字符",disbandConfirm:"确定解散团队吗,解散后所有成员和组件将被移除,并且无法恢复?",deleteConfirm:"删除确认",inputAuthCode:"请输入验证码",disbandSuccess:"解散团队成功",reject:"拒绝",agree:"同意",approved:"已同意",rejected:"已拒绝",kickOut:"踢出",teamUserNickname:"团队内昵称",pleaseInputTeamNickname:"请输入你在团队的昵称",normalUser:"普通用户",kickOutConfirm:"确定踢出用户【{name}】吗?",kickOutSuccess:"踢出成功",selectCanUpdateUser:"选择可更新用户",authorAutoAuth:"作者自带授权",updateAuth:"更新授权",updateTime:"更新时间",expandAll:"展开全部",createGroup:"创建分组",unsaved:"未保存",pleaseInputGroupName:"请输入分组名称",addComp:"添加组件",added:"已添加",notAdded:"未添加",defaultGroup:"默认分组",deleteGroupConfirm:"确认删除该分组吗?删除后该分组下的所有组件将被移除分组",addSuccess:"添加成功",isGrouped:"是否分组",grouped:"已分组",ungrouped:"未分组",group:"分组",prevVersion:"升级前版本",newVersion:"升级后版本",upgradeDesc:"升级描述",similarCompInTeam:"团队内相似组件",similarComp:"相似组件",deleteCompConfirm:"是否删除团队组件【{name}】,删除组件后团队成员将无法使用该组件,是否继续?",descTitle:"为业务团队打造专属组件空间",descItem1:"创建私密团队,组件仅对成员可见,保护核心资产",descItem2:"每个账号最多可创建 {count} 个团队",descItem3:"每个账号最多可加入 {count} 个团队",descItem4:"基础版团队支持最多 {count} 名成员",descItem5:"基础版团队可管理最多 {count} 个组件",descItem6:"支持创建分组菜单,灵活组织团队组件"},vU={title:"用户",username:"用户名",account:"账号",password:"密码",newPassword:"新密码",confirmPassword:"确认密码",confirmNewPassword:"确认新密码",pleaseInputNewPassword:"请输入新密码",pleaseConfirmNewPassword:"请确认新密码",passwordModified:"密码修改成功",email:"邮箱",oldEmail:"旧邮箱",newEmail:"新邮箱",phone:"手机号",avatar:"头像",nickname:"昵称",login:"登录",logout:"退出登录",register:"注册",forgotPassword:"忘记密码",resetPassword:"重置密码",changePassword:"修改密码",changeNickname:"修改昵称",pleaseInputNickname:"请输入昵称",changeAvatar:"修改头像",avatarModified:"头像修改成功",changeEmail:"修改邮箱",bindEmail:"绑定邮箱",emailBound:"邮箱绑定成功",basicInfo:"基本信息",securitySettings:"安全设置",loginPassword:"登录密码",passwordTip:"建议定期更换密码,确保账号安全",setPassword:"设置密码",emailLogin:"邮箱登录",emailLoginTip:"允许使用邮箱作为登录账号",pleaseSetPasswordFirst:"请先设置登录密码",pleaseBindEmailFirst:"请先绑定邮箱",emailLoginEnabled:"邮箱登录已开启",emailLoginDisabled:"邮箱登录已关闭",registerTime:"注册时间",notBound:"未绑定",change:"更换",bind:"绑定",authCode:"验证码",oldAuthCode:"旧验证码",newAuthCode:"新验证码",sendAuthCode:"发送验证码",resendAuthCode:"重新发送",getAuthCode:"获取验证码",pleaseInputAuthCode:"请输入验证码",pleaseInputNewAuthCode:"请输入新验证码",resendAfterSeconds:"{n}秒后重新获取",accountLogin:"账号登录",pleaseInputAccount:"请输入账号",pleaseInputUsername:"请输入用户名",pleaseInputPassword:"请输入密码",pleaseInputEmail:"请输入邮箱",pleaseInputOldEmail:"请输入旧邮箱",pleaseInputNewEmail:"请输入新邮箱",pleaseInputCorrectEmail:"请输入正确的邮箱",emailModified:"邮箱修改成功",newAuthCodeSent:"新验证码已发送",authCodeSent:"验证码已发送",skip:"跳过",loginSuccess:"登录成功",loggingIn:"登录中…",pleaseInputAccountAndPassword:"请输入您的账号和密码",invalidAccountOrPassword:"账号或密码错误",userInfo:"用户信息",personalCenter:"个人中心",myComp:"我的组件",notLoggedIn:"未登录",goLogin:"去登录",loginWithGithub:"使用 GitHub 登录",githubLoggingIn:"GitHub 登录中…",githubLoginFailed:"GitHub 登录失败",missingToken:"未获取到授权令牌",returnToLogin:"返回登录"},gU={title:"文件",name:"文件名",path:"文件路径",size:"文件大小",type:"文件类型",dir:"文件夹",selectDir:"选择文件夹",upload:"文件上传",download:"文件下载",select:"选择",multiSelect:"不支持多选",onlyDir:"只能选择文件夹",rootDir:"根目录",projectPath:"项目路径",currentDir:"当前目录",parentDir:"上级目录",refreshDir:"刷新文件夹列表"},_U={success:{download:"下载成功",update:"更新成功",delete:"删除成功",collect:"收藏成功",uncollect:"取消收藏成功",save:"保存成功",submit:"提交成功",upload:"上传成功",copy:"复制成功",operation:"操作成功",sendAuthCode:"验证码已发送",exitTeam:"退出成功",renameFolder:"文件夹名称修改成功"},error:{download:"下载失败",update:"更新失败",delete:"删除失败",collect:"收藏失败",uncollect:"取消收藏失败",save:"保存失败",submit:"提交失败",upload:"上传失败",copy:"复制失败",operation:"操作失败",load:"加载失败",network:"网络错误",timeout:"请求超时",unknown:"未知错误",pleaseFixCompileError:"请先处理编译错误",loginExpired:"登录已过期,请重新登录",refreshFailed:"刷新失败",requestFailed:"请求失败,请联系管理员",storageNotSupported:"浏览器不支持 storage.estimate API",renameFolder:"文件夹重命名失败,但组件已上传成功"},noUpdatePermission:"当前组件您没有更新权限,请联系管理员获取权限",confirm:{delete:"确定删除吗?",submit:"确定提交吗?",update:"确定更新吗?",exit:"确定退出吗?",cancel:"确定取消吗?"},loginRequired:"请先登录",fileExceed:"最多只能选择 {limit} 个文件,本次已选择 {selected} 个,共将上传 {total} 个文件",validate:{required:"必填项",format:"格式不正确",min:"不能小于最小值",max:"不能超过最大值",length:"长度不正确",email:"邮箱格式不正确",phone:"手机号格式不正确",imageFormat:"上传文件只能是图片格式",pleaseSelectFile:"请先选择文件",fileMaxSize:"上传文件大小不能超过 {size}MB!"}},yU={404:"页面不存在",share:"组件市场",collect:"收藏组件",collectSimple:"收藏",myComments:"我的评论",mine:"我的组件",mineSimple:"我的",local:"本地组件",localSimple:"本地",team:"团队",upload:"上传组件",uploadSimple:"上传",uploadTeam:"上传团队组件",setting:"设置",userInfo:"用户信息",upgrade:"更新",terminal:"终端",preview:"组件预览",previewLocal:"本地组件预览",previewTeam:"团队组件预览",previewBlank:"预览",similarPreview:"相似组件预览",login:"登录",githubCallback:"GitHub 登录回调",unknownTag:"未知标签"},bU={parse:"解析 Markdown",loading:"加载 Markdown",error:"加载失败",toc:"目录",anchor:"锚点"},wU={title:"终端",open:"打开终端",close:"关闭终端",execute:"执行命令",shutdown:"关闭进程",timeout:"超时时间",disconnected:"终端已断开连接"},EU={title:"依赖",name:"依赖名称",version:"依赖版本",install:"安装依赖",installing:"安装中",installed:"已安装",prebuild:"预构建",prebuildSize:"预构建大小",clearPrebuild:"清空预构建",batchSetting:"批量设置",dependencies:"dependencies",devDependencies:"devDependencies",match:{auto:"自动",onlyInstall:"仅安装",majorVersion:"主版本",minorVersion:"主次版本",exactVersion:"完全一致"},matchDesc:{auto:"不限制版本,使用当前环境直接渲染",onlyInstall:"不限制版本,仅需模块已安装",majorVersion:"主版本号一致即可(如 2.x)",minorVersion:"主版本和次版本一致(如 2.7.x)",exactVersion:"版本号完全匹配(如 2.7.14)"}},SU={title:"设置",previewRule:"预览规则",other:"其他设置",theme:"主题",language:"语言",darkMode:"暗黑模式",lightMode:"明亮模式"},CU={title:"版本更新",current:"当前版本",latest:"最新版本",check:"检查更新",upgrading:"更新中",upgraded:"已更新",publish:"发布更新",record:"更新记录",log:"更新日志",hasUpdate:"有更新",betaVersion:"内测版",noUpdate:"暂无更新",updateMethod:"更新方式",openTerminalAndRun:"打开终端,执行以下命令:",cannotIgnoreUpdate:"不可忽略此次更新"},xU={systemRecommended:"系统推荐",all:"全部",latest:"最新",hottest:"最热"},TU={submit:"提交"},kU={empty:"不能为空",notString:"必须是字符串类型,当前类型为: {type}",contentEmpty:"内容不能为空",startsWithNumber:'内容不能以数字开头,当前以 "{char}" 开头',invalidCharBacktick:"内容包含反引号(Markdown 语法标记),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharNewline:"内容包含换行符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharCarriageReturn:"内容包含回车符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharTab:"内容包含制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharFormFeed:"内容包含换页符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharVerticalTab:"内容包含垂直制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHash:"内容包含 # 字符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHtmlSpecial:'内容包含 HTML 特殊字符 "{char}",特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格',invalidCharUnknown:'内容包含非法字符 "{char}"(Unicode: U+{code}),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格'},OU={openInEditor:"在编辑器中打开",current:"当前",noRegistered:"暂无已注册项目",deregisterTitle:"注销项目",deregisterConfirm:"确定要注销项目 {hash} ({cwd}) 吗?",deregisterSuccess:"已注销项目 {hash}",deregisterFailed:"注销失败"},$U={myCommentsTitle:"我的评论",tabReceived:"收到的评论",tabMyDiscussions:"我的讨论",noMyCompsComments:"暂无评论",noReceivedComments:"暂无收到的评论",noMyDiscussions:"暂无参与讨论",new:"新",rating:"评分",ratingSuccess:"评分成功",ratingCancelSuccess:"已取消评分",ratingError:"评分失败,请重试",ratingDialogDesc:"正确的评分有助组件曝光,帮助更多人发现优秀组件",ratingThanks:"感谢你的打分,有什么意见请在评论区留言",writePlaceholder:"写下你的评论...",loginPlaceholder:"请先登录后再评论",post:"发表评论",allComments:"全部评论",empty:"暂无评论,来说两句吧",loadError:"加载评论失败",postSuccess:"评论发表成功",postError:"评论失败,请重试",anonymous:"匿名",self:"自己",cancelReply:"取消回复",reply:"回复",replyTo:"回复 {'@'}{name}...",replySuccess:"回复成功",replyError:"回复失败,请重试",expandReplies:"展开 {count} 条回复",collapseReplies:"收起回复",deleteConfirm:"确定删除这条评论吗?删除后不可恢复。",deleteTitle:"确认删除",deleteSuccess:"删除成功",deleteError:"删除失败,请重试",viewAllReplies:"查看全部 {count} 条回复",time:{justNow:"刚刚",minutesAgo:"{n}分钟前",hoursAgo:"{n}小时前",daysAgo:"{n}天前"}},AU={common:pU,comp:hU,team:mU,user:vU,file:gU,message:_U,route:yU,markdown:bU,terminal:wU,deps:EU,setting:SU,upgrade:CU,tag:xU,formCreate:TU,validateHash:kU,project:OU,comment:$U},RU={keyword:"Keyword",confirm:"Confirm",cancel:"Cancel",close:"Close",save:"Save",submit:"Submit",delete:"Delete",edit:"Edit",add:"Add",update:"Update",upload:"Upload",download:"Download",refresh:"Refresh",loadingText:"Loading",success:"Success",error:"Error",warning:"Warning",info:"Info",copy:"Copy",copied:"Copied",copySuccess:"Copy successful",copyFailed:"Copy failed",open:"Open",search:"Search",reset:"Reset",clear:"Clear",back:"Back",next:"Next",prev:"Previous",finish:"Finish",operation:"Operation",status:"Status",yes:"Yes",no:"No",name:"Name",description:"Description",version:"Version",time:"Time",date:"Date",author:"Author",type:"Type",category:"Category",tag:"Tag",content:"Content",setting:"Setting",cache:"Cache",cacheSize:"Used",clearCache:"Clear Cache",clearCacheConfirm:"This will clear browser single-file compilation results and module pre-compilation files. Confirm to clear cache?",cacheCleared:"Cache cleared",newPage:"Open in new page",terminal:"Terminal",preview:"Preview",doc:"Documentation",readme:"README.md",upgradeRecord:"Update Record",ratingReview:"Ratings & Reviews",openInNewPage:"Open in new page",depInstall:"Dependency Installation",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",maximizeRestore:"Maximize/Restore",siteSlogan:"Atomic Component Community, Making Component Sharing Easier.",siteSubtitle:"Vue Component Sharing Platform",adminSlogan:"Component Management Platform · Admin System",docsTutorial:"Documentation",empty:"No data",noReadme:"Component has no README.md file configured",dragSort:"Drag to sort",filter:"Filter",apply:"Apply",person:"people",unit:"items",pleaseSelect:"Please select",pleaseInput:"Please input",me:"Me",generate:"Generate",regenerate:"Regenerate",generateSuccess:"Generated successfully",moreOperations:"More Operations",more:"More",maxTagCount:"Max Tag Count",or:"or"},PU={keywordPlaceholder:"Please input component name or description",title:"Component",name:"Component Name",fieldId:"Component ID",fieldName:"Component Name",fieldVersion:"Version",desc:"Component Description",remarksDesc:"Remarks",remarksDescRequired:"Please enter remarks",pleaseInputCompName:"Please enter component name",pleaseInputRemarks:"Please enter remarks to help with component market search",pleaseInputTags:"Select or enter tags",tags:"Tags",tagsMaxCount:"No more than 5 tags allowed",tagsEmpty:"Tag cannot be empty",tagsTooLong:'Tag "{tag}" cannot exceed 20 characters',tagsInvalidChars:'Tag "{tag}" contains invalid characters, only Chinese, English, numbers, hyphens and underscores are allowed',tagsHelp:"Type and press Enter to create a new tag, max 5",compNameRequired:"Component name is required",compNameNamingRule:"Component name must be in PascalCase or kebab-case",lengthBetween:"Length must be between {min} and {max} characters",previewImage:"Preview Image",previewImageRequired:"Please upload or generate a preview image",previewImageHint:"Screenshot displayed in the mini preview panel, used as the component market cover. If auto-screenshot fails, please manually upload a PNG image",uploadPreviewImage:"Upload Preview Image",generateScreenshot:"Generate Screenshot",previewImageFallbackHint:"Preview image only takes effect when the component fails to render",version:"Component Version",detail:"Component Detail",preview:"Component Preview",previewConfig:"Preview Config",previewList:"Preview List",uploadPreview:"Component Upload Preview",updatePreview:"Component Update Preview",download:"Download Component",update:"Update Component",upload:"Upload Component",submit:"Submit Component",edit:"Edit Component",add:"Add Component",delete:"Delete Component",local:"Local Component",remote:"Remote Component",online:"Online Component",similar:"Similar Components",similarFound:"Similar Components Detected",similarTeam:"Similar Components in Team",dir:"Component Directory",file:"Component File",entry:"Entry File",previewEntry:"Preview Entry Address",previewEntryFull:"Preview Entry Address (Fullscreen)",addPreviewEntry:"Add Preview Entry",maxPreviewEntry:"Maximum {n} preview entries allowed",pleaseAddPreviewEntry:"Please add a preview entry",miniPreviewFile:"Mini Preview File",fullPreviewFile:"Full Preview File",pleaseSelectPreviewFile:"Please select preview file",remarkDesc:"Remarks",dep:"Component Dependencies",localDep:"Component Dependencies (Local)",onlineDep:"Component Dependencies (Online)",finalDep:"Final Dependencies",localVersion:"Local: ",onlineVersion:"Online: ",onlineDepEmpty:"No online dependency data!",versionConsistent:"Version Consistent",versionChange:"Version changed, please select final version",versionChangeConfirmed:"Confirmed",newDep:"New Dependency",miniPanel:"Mini Panel",fullPanel:"Full Panel",reload:"Reload",uploadProtocol:"Upload Protocol",bgPanel:"Background",compLocation:"Component Location",pleaseSelectFolderFirst:"Please select a folder first",compAlreadyUploaded:"Component already uploaded, please go to My Components or Team Components to update",affirmDep:"Component Dependencies (Confirmed Version)",checkConfig:"Config Check",checkError:"Error Info",extraInfo:"Extra Info",baseInfo:"Basic Info",upgradeLog:"Upgrade Log",pleaseInputUpgradeLog:"Please enter upgrade description",config:"Component Config",configStatus:"Component Config Check Status",configError:"Config Error",configCheckError:"Config Check Error",needUpgrade:"Needs Upgrade",fileChanged:"Component files changed",versionChanged:"Version changed",fileNoChange:"Files unchanged",markdownValid:"Markdown preview validation passed",noMarkdown:"No markdown file",hash:"File Hash",localHash:"Local Component File Hash",remoteHash:"Remote Component File Hash",remoteVersion:"Remote Component Version",remoteVersionPrefix:"Online: ",localVersionPrefix:"Local: ",versionCompare:"Version Comparison Result",carouselIndex:"Component Preview Carousel Index",bgColor:"Component Background Color",dialogType:"Component Dialog Type",repeat:"Component Repeat Check",existLocal:"Component exists locally",scopeId:"Scope ID",tempDir:"Component Temp Directory",submitLimit:"Component Submit Limit",maxSize:"Total Size Limit",maxCount:"File Count Limit",matchType:"Match Type",updateType:"Update Type",updateOnline:"Online Update",updateOffline:"Offline Update",compOfflineUpdate:"Component Offline Update",compOnlineUpdate:"Component Online Update",folder:"Folder",compNotInLocal:"Component is not local. Continuing will only update basic information like description and preview config. Continue?",selectUpdateFolder:"Please select folder to update",openInVscode:"Open in editor",openingInEditor:"Opening in editor...",openInExplorer:"Open in File Explorer",openingInExplorer:"Opening file explorer...",updateSuccess:"Update successful",downloadVersionConfirm:"The currently selected version is: {version}, confirm download?",downloading:"Downloading component...",downloadPathConfirm:"Download component to path [{path}]?",downloadCoverConfirm:"Component [{name}] already exists or has a duplicate name, overwrite?",downloadCoverTitle:"Overwrite Confirmation",coverConfirm:"Confirm Overwrite",uncollectConfirm:"Are you sure you want to uncollect component [{name}]? It will no longer appear in your collection list.",deleteConfirm:"Are you sure you want to delete component [{name}]? This will free up the component name and cannot be undone.",collect:"Collect",uncollect:"Uncollect",collected:"Collected",uncollected:"Not Collected",entryFile:"Entry File",configFile:"Config File",fileChangedNeedVersion:"File content changed, please increment version",viewFileChanges:"View File Changes",versionChangedButFileSame:"Version changed but file content unchanged, please revert version",errorMsg:"Error Message",versionCannotBeLessThanLatest:"Version cannot be less than latest version {version}",uploadAnyway:"Upload Anyway",compileError:"Component compilation failed",compileWarn:"Component compilation warning",formatCode:"Format Code:",formatCodeTooltip:"Only formats files during comparison, original files remain unchanged",noChanges:"No changes",diff:{changed:"M Changed",unchanged:"U Unchanged",added:"A Added",deleted:"D Deleted"},uploadConfirmTitle:"Upload Confirmation",renameFolderTitle:"Folder Name Mismatch",renameFolderTip:'Component name "{editedName}" does not match folder name "{folderName}".',renameFolderQuestion:"Do you want to sync the folder name after upload?",renameSyncYes:"Sync folder name",renameSyncNo:"Upload only, do not modify folder name"},IU={title:"Team",name:"Team Name",code:"Team Code",desc:"Team Description",create:"Create Team",join:"Join Team",exit:"Exit Team",exitConfirm:"Exit Confirmation",manage:"Team Management",setting:"Team Settings",member:"Team Members",memberCount:"Member Count",maxMember:"Max Members",compCount:"Component Count",maxCompCount:"Max Components",creator:"Creator",downloadCount:"Downloads",collectCount:"Collections",createTime:"Create Time",myTeam:"My Teams",joinedTeam:"Joined Teams",space:"Team Space",noJoined:"No joined teams",noCreated:"No created teams",createCountLimit:"Max teams allowed to create",joinCountLimit:"Max teams allowed to join",compList:"Team Component List",myCompList:"My Component List",compGroup:"Team Component Group",compGroupList:"Team Component Group List",addMyComp:"Team Add My Component",compUpdate:"Team My Component Update",addFromMine:"Add from My Components",applyList:"Apply List",nickname:"Team Nickname",noTeamInfo:"No team information",compLib:"Component Library",groupConfig:"Group Config",compManage:"Component Management",unsavedDataLeave:"Group configuration data is not saved, are you sure you want to leave?",leave:"Leave",disbandTeam:"Disband Team",applyAudit:"Apply Audit",teamName:"Team Name",fillTeamCode:"Fill in Team Code",pleaseInputTeamCode:"Please enter team code",teamIdNotExist:"Team ID does not exist",joinSuccess:"Joined team successfully",applyJoinTeam:"Apply to Join Team",showRepeatComp:"Show Duplicate Components",allowAuthorDelete:"Allow Author Delete",teamIntro:"Team Introduction",fillTeamName:"Fill in Team Name",pleaseInputTeamName:"Please enter team name",pleaseInputTeamDesc:"Please enter team description",createSuccess:"Team created successfully",charLength:"Length must be between {min} and {max} characters",disbandConfirm:"Are you sure you want to disband the team? All members and components will be removed and cannot be recovered.",deleteConfirm:"Delete Confirmation",inputAuthCode:"Please enter verification code",disbandSuccess:"Team disbanded successfully",reject:"Reject",agree:"Agree",approved:"Approved",rejected:"Rejected",kickOut:"Kick Out",teamUserNickname:"Team Nickname",pleaseInputTeamNickname:"Please enter your team nickname",normalUser:"Normal User",kickOutConfirm:"Are you sure you want to kick out user [{name}]?",kickOutSuccess:"Kicked out successfully",selectCanUpdateUser:"Select users who can update",authorAutoAuth:"Author has default authorization",updateAuth:"Update Authorization",updateTime:"Update Time",expandAll:"Expand All",createGroup:"Create Group",unsaved:"Unsaved",pleaseInputGroupName:"Please enter group name",addComp:"Add Component",added:"Added",notAdded:"Not Added",defaultGroup:"Default Group",deleteGroupConfirm:"Are you sure you want to delete this group? All components in this group will be removed from the group.",addSuccess:"Added successfully",isGrouped:"Is Grouped",grouped:"Grouped",ungrouped:"Ungrouped",group:"Group",prevVersion:"Previous Version",newVersion:"New Version",upgradeDesc:"Upgrade Description",similarCompInTeam:"Similar Components in Team",similarComp:"Similar Components",deleteCompConfirm:"Are you sure you want to delete team component [{name}]? Team members will no longer be able to use this component.",descTitle:"Create an Exclusive Component Space for Your Team",descItem1:"Create a private team where components are only visible to members, protecting core assets",descItem2:"Each account can create up to {count} teams",descItem3:"Each account can join up to {count} teams",descItem4:"Basic team supports up to {count} members",descItem5:"Basic team can manage up to {count} components",descItem6:"Support creating group menus to organize team components flexibly"},MU={title:"User",username:"Username",account:"Account",password:"Password",newPassword:"New Password",confirmPassword:"Confirm Password",confirmNewPassword:"Confirm New Password",pleaseInputNewPassword:"Please enter new password",pleaseConfirmNewPassword:"Please confirm new password",passwordModified:"Password modified successfully",email:"Email",oldEmail:"Old Email",newEmail:"New Email",phone:"Phone",avatar:"Avatar",nickname:"Nickname",login:"Login",logout:"Logout",register:"Register",forgotPassword:"Forgot Password",resetPassword:"Reset Password",changePassword:"Change Password",changeNickname:"Change Nickname",pleaseInputNickname:"Please enter nickname",changeAvatar:"Change Avatar",avatarModified:"Avatar updated successfully",changeEmail:"Change Email",bindEmail:"Bind Email",emailBound:"Email bound successfully",basicInfo:"Basic Information",securitySettings:"Security Settings",loginPassword:"Login Password",passwordTip:"Regularly change your password to ensure account security",setPassword:"Set Password",emailLogin:"Email Login",emailLoginTip:"Allow using email as login account",pleaseSetPasswordFirst:"Please set login password first",pleaseBindEmailFirst:"Please bind an email first",emailLoginEnabled:"Email login enabled",emailLoginDisabled:"Email login disabled",registerTime:"Registration Time",notBound:"Not Bound",change:"Change",bind:"Bind",authCode:"Verification Code",oldAuthCode:"Old Verification Code",newAuthCode:"New Verification Code",sendAuthCode:"Send Auth Code",resendAuthCode:"Resend",getAuthCode:"Get Code",pleaseInputAuthCode:"Please enter code",pleaseInputNewAuthCode:"Please enter new code",resendAfterSeconds:"Resend in {n}s",accountLogin:"Account Login",pleaseInputAccount:"Please enter account",pleaseInputUsername:"Please enter username",pleaseInputPassword:"Please enter password",pleaseInputEmail:"Please enter email",pleaseInputOldEmail:"Please enter old email",pleaseInputNewEmail:"Please enter new email",pleaseInputCorrectEmail:"Please enter correct email",emailModified:"Email modified successfully",newAuthCodeSent:"New verification code sent",authCodeSent:"Verification code sent",skip:"Skip",loginSuccess:"Login successful",loggingIn:"Logging in...",pleaseInputAccountAndPassword:"Please enter your account and password",invalidAccountOrPassword:"Invalid account or password",userInfo:"User Info",personalCenter:"Personal Center",myComp:"My Components",notLoggedIn:"Not logged in",goLogin:"Go to Login",loginWithGithub:"Login with GitHub",githubLoggingIn:"Logging in with GitHub...",githubLoginFailed:"GitHub Login Failed",missingToken:"Authorization token not received",returnToLogin:"Return to Login"},DU={title:"File",name:"Filename",path:"File Path",size:"File Size",type:"File Type",dir:"Directory",selectDir:"Select Directory",upload:"File Upload",download:"File Download",select:"Select",multiSelect:"Multiple selection not supported",onlyDir:"Only directories can be selected",rootDir:"Root Directory",projectPath:"Project Path",currentDir:"Current Directory",parentDir:"Parent Directory",refreshDir:"Refresh Directory List"},FU={success:{download:"Download successful",update:"Update successful",delete:"Delete successful",collect:"Collect successful",uncollect:"Uncollect successful",save:"Save successful",submit:"Submit successful",upload:"Upload successful",copy:"Copy successful",operation:"Operation successful",sendAuthCode:"Verification code sent",exitTeam:"Exit successful",renameFolder:"Folder name updated successfully"},error:{download:"Download failed",update:"Update failed",delete:"Delete failed",collect:"Collect failed",uncollect:"Uncollect failed",save:"Save failed",submit:"Submit failed",upload:"Upload failed",copy:"Copy failed",operation:"Operation failed",load:"Load failed",network:"Network error",timeout:"Request timeout",unknown:"Unknown error",pleaseFixCompileError:"Please fix compilation errors first",loginExpired:"Login expired, please log in again",refreshFailed:"Refresh failed",requestFailed:"Request failed, please contact administrator",storageNotSupported:"Browser does not support storage.estimate API",renameFolder:"Folder rename failed, but component was uploaded successfully"},noUpdatePermission:"You do not have permission to update this component. Please contact the administrator for access.",confirm:{delete:"Are you sure to delete?",submit:"Are you sure to submit?",update:"Are you sure to update?",exit:"Are you sure to exit?",cancel:"Are you sure to cancel?"},loginRequired:"Please login first",fileExceed:"You can select at most {limit} files, {selected} selected this time, {total} total to be uploaded",validate:{required:"Required field",format:"Invalid format",min:"Cannot be less than minimum value",max:"Cannot exceed maximum value",length:"Invalid length",email:"Invalid email format",phone:"Invalid phone format",imageFormat:"Only image files are allowed",pleaseSelectFile:"Please select a file first",fileMaxSize:"File size cannot exceed {size}MB!"}},LU={404:"Page Not Found",share:"Component Market",collect:"Collected Components",collectSimple:"Collection",myComments:"My Comments",mine:"My Components",mineSimple:"Mine",local:"Local Components",localSimple:"Local",team:"Team",upload:"Upload Component",uploadSimple:"Upload",uploadTeam:"Upload Team Component",setting:"Settings",userInfo:"User Info",upgrade:"Upgrade",terminal:"Terminal",preview:"Component Preview",previewLocal:"Local Component Preview",previewTeam:"Team Component Preview",previewBlank:"Preview",similarPreview:"Similar Component Preview",login:"Login",githubCallback:"GitHub Login Callback",unknownTag:"Unknown Tag"},jU={parse:"Parse Markdown",loading:"Loading Markdown",error:"Load failed",toc:"Table of Contents",anchor:"Anchor"},UU={title:"Terminal",open:"Open Terminal",close:"Close Terminal",execute:"Execute Command",shutdown:"Shutdown Process",timeout:"Timeout",disconnected:"Terminal disconnected"},NU={title:"Dependencies",name:"Dependency Name",version:"Dependency Version",install:"Install Dependencies",installing:"Installing",installed:"Installed",prebuild:"Prebuild",prebuildSize:"Prebuild Size",clearPrebuild:"Clear Prebuild",batchSetting:"Batch Setting",dependencies:"dependencies",devDependencies:"devDependencies",match:{auto:"Auto",onlyInstall:"Install Only",majorVersion:"Major Version",minorVersion:"Major + Minor",exactVersion:"Exact Match"},matchDesc:{auto:"No version restriction, render with current environment",onlyInstall:"No version restriction, only requires installation",majorVersion:"Major version match (e.g. 2.x)",minorVersion:"Major and minor version match (e.g. 2.7.x)",exactVersion:"Exact version match (e.g. 2.7.14)"}},zU={title:"Settings",previewRule:"Preview Rule",other:"Other Settings",theme:"Theme",language:"Language",darkMode:"Dark Mode",lightMode:"Light Mode"},BU={title:"Version Update",current:"Current Version",latest:"Latest Version",check:"Check for Updates",upgrading:"Updating",upgraded:"Updated",publish:"Publish Update",record:"Update Record",log:"Changelog",hasUpdate:"Update Available",betaVersion:"Beta",noUpdate:"No updates available",updateMethod:"Update Method",openTerminalAndRun:"Open terminal and run:",cannotIgnoreUpdate:"This update cannot be ignored"},VU={systemRecommended:"System Recommended",all:"All",latest:"Latest",hottest:"Hottest"},HU={submit:"Submit"},qU={empty:"Cannot be empty",notString:"Must be a string type, current type: {type}",contentEmpty:"Content cannot be empty",startsWithNumber:'Content cannot start with a number, currently starts with "{char}"',invalidCharBacktick:"Content contains backtick (Markdown syntax marker), only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharNewline:"Content contains newline character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharCarriageReturn:"Content contains carriage return, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharTab:"Content contains tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharFormFeed:"Content contains form feed character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharVerticalTab:"Content contains vertical tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHash:"Content contains # character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHtmlSpecial:'Content contains HTML special character "{char}", only hyphen(-), underscore(_), parentheses(), and spaces are allowed',invalidCharUnknown:'Content contains invalid character "{char}" (Unicode: U+{code}), only hyphen(-), underscore(_), parentheses(), and spaces are allowed'},WU={openInEditor:"Open in Editor",current:"Current",noRegistered:"No registered projects",deregisterTitle:"Deregister Project",deregisterConfirm:"Are you sure you want to deregister project {hash} ({cwd})?",deregisterSuccess:"Deregistered project {hash}",deregisterFailed:"Deregister failed"},YU={myCommentsTitle:"My Comments",tabReceived:"Received",tabMyDiscussions:"My Discussions",noMyCompsComments:"No comments yet",noReceivedComments:"No comments received",noMyDiscussions:"No discussions yet",new:"New",rating:"Rating",ratingSuccess:"Rating submitted",ratingCancelSuccess:"Rating removed",ratingError:"Failed to rate, please try again",ratingDialogDesc:"Accurate ratings help components get more exposure",ratingThanks:"Thank you for your rating! Feel free to leave a comment below.",writePlaceholder:"Write a comment...",loginPlaceholder:"Please login to comment",post:"Post Comment",allComments:"All Comments",empty:"No comments yet. Be the first to comment!",loadError:"Failed to load comments",postSuccess:"Comment posted successfully",postError:"Failed to post comment, please try again",anonymous:"Anonymous",self:"Me",cancelReply:"Cancel Reply",reply:"Reply",replyTo:"Reply to {'@'}{name}...",replySuccess:"Reply posted successfully",replyError:"Failed to reply, please try again",expandReplies:"Expand {count} replies",collapseReplies:"Collapse replies",deleteConfirm:"Are you sure you want to delete this comment? This action cannot be undone.",deleteTitle:"Confirm Delete",deleteSuccess:"Deleted successfully",deleteError:"Failed to delete, please try again",viewAllReplies:"View all {count} replies",time:{justNow:"just now",minutesAgo:"{n} minutes ago",hoursAgo:"{n} hours ago",daysAgo:"{n} days ago"}},KU={common:RU,comp:PU,team:IU,user:MU,file:DU,message:FU,route:LU,markdown:jU,terminal:UU,deps:NU,setting:zU,upgrade:BU,tag:VU,formCreate:HU,validateHash:qU,project:WU,comment:YU},GU={zh:AU,en:KU},QU=localStorage.getItem(mM.LOCALE_KEY)||"zh",cE=JR({locale:QU,messages:GU,legacy:!1});function dE(e){e.use(cE)}const Qh=Object.freeze(Object.defineProperty({__proto__:null,i18n:cE,setup:dE},Symbol.toStringTag,{value:"Module"}));function XU({store:e}){e.$subscribe((...t)=>{const[n]=t;if(n.type==="direct")throw new Error("不允许直接修改store,建议使用action修改")})}const Bp=ZR();function fE(e){Bp.use(XU),e.use(Bp)}const JU=Object.freeze(Object.defineProperty({__proto__:null,pinia:Bp,setup:fE},Symbol.toStringTag,{value:"Module"}));function ZU(e){e.directive("loading",$w)}function eN(e){e.component("Icon",lL)}const{i18n:vu}=Qh,{pinia:If}=JU,Is=Eo("userStore",{state:()=>({userInfo:{},logoutDialogOpen:!1}),getters:{userId:e=>e.userInfo._id,displayName(e){return e.userInfo.nickname||e.userInfo.account||vu.global.t("user.notLoggedIn")},avatar:e=>e.userInfo.avatar,avatarStr(e){return e.userInfo.nickname?.[0]||e.userInfo.account?.[0]||""}},actions:{updateAvatar(e){this.$patch(t=>{t.userInfo&&(t.userInfo.avatar=e)})},updateNickname(e){this.$patch(t=>{t.userInfo&&(t.userInfo.nickname=e)})},setLogoutDialogOpen(e){this.$patch(t=>{t.logoutDialogOpen=e})},setUserInfo(e){this.$patch(t=>{t.userInfo=e})},login(e){return zs.v1User.usercontrollerLogin({...e})},async fetchWhoAmI(){const e=await zs.v1User.usercontrollerWhoami();e.data&&this.setUserInfo(e.data)},logout(){Bs.push("/login?type=logout").then(e=>{e||(this.clearLocalStorage(),this.resetAll(),this.$reset())})},resetAll(){const e=tl(),t=cU(),n=dU(),r=Gh(),i=fU();e?.$reset(),t?.$reset(),n?.$reset(),r?.$reset(),i?.$reset(),this.clearTeamHomeStores(),this.clearCompListStores(),this.clearCompEditStore()},clearLocalStorage(){TD(),$D()},clearTeamHomeStores(){for(const[e,t]of If._s.entries())e.startsWith("teamHome")&&t.$reset()},clearCompListStores(){for(const[e,t]of If._s.entries())e.startsWith("compList")&&t.$reset()},clearCompEditStore(){for(const[e,t]of If._s.entries())e.startsWith("compEdit")&&t.$reset()},isRealUserLogin(){const e=Object.keys(this.userInfo),t=sc();return e.length>0&&t!==null},isAccessTokenExist(){return sc()!==null},logoutDialog(){if(this.logoutDialogOpen)return;this.setLogoutDialogOpen(!0);const e={confirmButtonText:vu.global.t("user.goLogin"),showClose:!0,callback:t=>{this.setLogoutDialogOpen(!1),t==="confirm"&&this.logout()}};mP.alert(vu.global.t("message.loginRequired"),vu.global.t("common.info"),e)}}}),tN=ze({__name:"SubMenu",props:{route:{},basePath:{}},setup(e){const{getTitle:t}=Hh(),n=e,r=Is(),i=(d,f="")=>s4.resolve(d,f),o=se(()=>i(n.basePath||"",n.route.path)),s=se(()=>(n.route.children||[]).some(d=>!d.meta?.hidden)),l=se(()=>{const{children:d=[]}=n.route;return d.length===0||d.length===1&&!d[0]?.children?.length}),u=se(()=>{const{children:d=[],meta:f={}}=n.route;return f?.hidden?!1:r.isRealUserLogin()||d.length>0?!0:!r.isAccessTokenExist()&&n.route.meta?.noAuth});return(d,f)=>{const p=ft("SubMenu",!0),v=Ma,y=vP;return u.value?(C(),R(We,{key:0},[e.route.meta?.hideParent&&s.value?(C(!0),R(We,{key:0},ct(e.route.children,g=>(C(),Ee(p,{key:i(o.value,g.path),route:g,"base-path":i(o.value,g.path)},null,8,["route","base-path"]))),128)):(C(),R(We,{key:1},[l.value?(C(),Ee(l4,{key:0,route:e.route,"full-path":o.value},null,8,["route","full-path"])):(C(),Ee(y,{key:1,index:o.value},{title:Le(()=>[Z(v,null,{default:Le(()=>[(C(),Ee(Pn(e.route?.meta?.icon)))]),_:1}),_("span",null,q(w(t)(e.route?.meta?.title)),1)]),default:Le(()=>[(C(!0),R(We,null,ct(e.route.children,g=>(C(),Ee(p,{key:i(o.value,g.path),route:g,"base-path":i(o.value,g.path)},null,8,["route","base-path"]))),128))]),_:1},8,["index"]))],64))],64)):Se("",!0)}}}),nN=ze({__name:"index",setup(e){const t=Gh(),n=Sc(),r=Ph(),i=se(()=>n.options.routes),o=se(()=>r.path);return(s,l)=>{const u=gP;return C(),Ee(u,{class:"dark:!bg-gray-800 border-t border-gray-200 dark:border-gray-700",collapse:w(t).collapse,"default-active":o.value},{default:Le(()=>[(C(!0),R(We,null,ct(i.value,d=>(C(),R(We,null,[d?.meta?.hidden?Se("",!0):(C(),Ee(tN,{key:d.path,basePath:d.path,route:d},null,8,["basePath","route"]))],64))),256))]),_:1},8,["collapse","default-active"])}}}),rN={class:"flex gap-[20px] items-center pl-[10px] pr-[10px]"},iN=["title"],oN=["title"],sN=["title"],aN={class:"flex items-center gap-[10px]"},lN=ze({__name:"index",setup(e){const{t}=Ja(),n=tl(),r=Sc(),i=Ph(),o=Ls(p1,10),s=re(n.maxCache),l=()=>{r.back()},u=()=>{r.replace({path:i.path,query:{...i.query,[Rn.ROUTE_STATE_KEY_VERSION]:Date.now()}})};function d(f){f&&n.setMaxCache(f)}return zn(()=>{o.value=n.maxCache}),(f,p)=>{const v=ft("Icon"),y=Rp,g=Ap;return C(),R("div",rN,[_("span",{title:w(t)("common.back")},[Z(v,{icon:"material-symbols:arrow-back-rounded",class:"cursor-pointer",onClick:l})],8,iN),_("span",{title:w(t)("common.refresh")},[Z(v,{icon:"material-symbols:refresh-rounded",class:"cursor-pointer",onClick:u})],8,oN),Z(g,{placement:"bottom",trigger:"hover",width:"auto"},{reference:Le(()=>[_("span",{title:w(t)("common.moreOperations")},[Z(v,{icon:"material-symbols:article-outline",class:"cursor-pointer"})],8,sN)]),default:Le(()=>[_("div",aN,[_("div",null,q(w(t)("common.maxTagCount"))+":",1),_("div",null,[Z(y,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=m=>s.value=m),min:1,style:{width:"90px"},"controls-position":"right",onChange:d},null,8,["modelValue"])])])]),_:1})])}}}),uN={class:"flex dark:bg-gray-800 py-[2px] h-[40px] border border-gray-200 dark:border-gray-700"},cN=ze({__name:"index",setup(e){const{t}=Ja(),n=Sc(),r=Ph(),i=tl(),{getTitle:o}=Hh();He(()=>r,()=>{i.addView(r)},{immediate:!0,deep:!0});const s=se(()=>i.visitedViews),l=se(()=>s.value.length===1);function u(v){const y=d(v);i.delViewAndJumpToPrev(v.path,y,n)}function d(v){return v.path===r.path}function f(v){n.push(v)}function p(v){const y=v?.meta?.title||t("route.unknownTag"),g=i.getPayLoad(v.path);return o(g?.name||y)}return(v,y)=>{const g=ft("Icon"),m=Ma,b=Ps,x=_P;return C(),R("div",uN,[Z(lN),Z(w(uF),{class:"flex-1 overflow-hidden",list:s.value,getKey:S=>S.path},{display:Le(({visibleList:S,overflow:O})=>[Z(eP,{tag:"ul",name:"fade",class:"flex gap-[5px] p-[2px] items-center"},{default:Le(()=>[(C(!0),R(We,null,ct(S,T=>(C(),R("div",{key:T.path},[Z(b,{type:d(T)?"primary":"default",onClick:A=>f(T)},{default:Le(()=>[Et(q(p(T))+" ",1),l.value?Se("",!0):(C(),Ee(m,{key:0,style:{"font-size":"16px"},class:"ml-[5px]",onClick:ht(A=>u(T),["stop"])},{default:Le(()=>[Z(g,{icon:"material-symbols:close"})]),_:1},8,["onClick"]))]),_:2},1032,["type","onClick"])]))),128)),O>0?(C(),Ee(x,{key:0,type:"info"},{default:Le(()=>[Et("+"+q(O)+" "+q(w(t)("common.more")),1)]),_:2},1024)):Se("",!0)]),_:2},1024)]),measure:Le(({item:S})=>[Z(b,{type:"primary"},{default:Le(()=>[Et(q(p(S))+" ",1),l.value?Se("",!0):(C(),Ee(m,{key:0,style:{"font-size":"16px"},class:"ml-[5px]"},{default:Le(()=>[Z(g,{icon:"material-symbols:close"})]),_:1}))]),_:2},1024)]),_:1},8,["list","getKey"])])}}}),dN=Lh(cN,[["__scopeId","data-v-72cc4b44"]]),fN={class:"size-full overflow-hidden"},pN={class:"h-[60px] dark:bg-gray-800"},hN={class:"size-full overflow-hidden flex flex-col dark:bg-gray-800"},mN={class:"dark:bg-gray-800"},vN={class:"size-full flex flex-col"},gN={class:""},_N={class:"flex-1 overflow-auto"},yN=ze({__name:"index",setup(e){const t=Jr(()=>Rt(()=>import("./index-C1zFaUVE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),n=Jr(()=>Rt(()=>import("./index-D-25wqLa.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,14,15,16,17,18,19,20,6]),import.meta.url)),r=re(68),i=re(200),o=re(60),s=re(""),l=re(""),u=se(()=>s.value?"transition-width duration-400":""),d=se(()=>l.value?"transition-height duration-300":""),f=se(()=>({class:d.value,size:y.value,collapsible:!0,resizable:!1})),p=se(()=>({class:u.value,min:r.value,max:300,collapsible:!0})),v=Ls(RD,r.value),y=Ls(PD,o.value),g=Gh(),m=Is(),b=async(O,T)=>{s.value=T,T==="end"&&v.value===0?(v.value=i.value,window?.umami?.track(fy.SIDEBAR_TOGGLE,{state:"expanded"})):T==="start"&&window?.umami?.track(fy.SIDEBAR_TOGGLE,{state:"collapsed"})},x=(O,T)=>{l.value=T,T==="start"?y.value=0:T==="end"&&(y.value=o.value)},S=O=>{O==="header"?l.value="":O==="side"&&(s.value="")};return zn(()=>{g.setSideBarCollapse(v.value===r.value)}),(O,T)=>{const A=yP,M=wP,z=bP;return C(),R("div",fN,[Z(z,{layout:"vertical",onCollapse:x},{default:Le(()=>[Z(A,Ot({class:"!overflow-hidden transform-gpu isolate will-change-height"},f.value,{onTransitionend:T[0]||(T[0]=Y=>S("header")),onWebkitTransitionEnd:T[1]||(T[1]=Y=>S("header"))}),{default:Le(()=>[_("div",pN,[Z(w(n))])]),_:1},16),Z(A,{class:Be(["transform-gpu isolate",d.value])},{default:Le(()=>[Z(z,{onCollapse:b},{default:Le(()=>[Z(A,Ot(p.value,{size:w(v),"onUpdate:size":T[2]||(T[2]=Y=>Za(v)?v.value=Y:null),class:"transform-gpu isolate will-change-width",onTransitionend:T[3]||(T[3]=Y=>S("side")),onWebkitTransitionEnd:T[4]||(T[4]=Y=>S("side"))}),{default:Le(()=>[_("div",hN,[Z(nN),w(m).isRealUserLogin()?(C(),R(We,{key:0},[_("div",mN,[Z(M)]),Z(w(t))],64)):Se("",!0)])]),_:1},16,["size"]),Z(A,{class:Be(["transform-gpu isolate !overflow-hidden",u.value])},{default:Le(()=>[_("div",vN,[_("div",gN,[Z(dN)]),_("div",_N,[(C(),Ee(Ih,null,{default:Le(()=>[Z(r4)]),_:1}))])])]),_:1},8,["class"])]),_:1})]),_:1},8,["class"])]),_:1})])}}});let Bs;function bN(){const e=window.__GLOBAL_CONFIG__?.projectHash,t=e?`/${e}/main/`:`/${Rn.WEBSITE_PATH_MAIN}/`;return Bs=tP({history:nP(t),routes:[{path:"/login",name:"login",component:()=>Rt(()=>import("./index-RrkKKQjp.js"),__vite__mapDeps([21,1,2,13,14,16,17,22,23,3,24,25,26,20]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.login"}},{path:"/github-callback",name:"githubCallback",component:()=>Rt(()=>import("./GithubCallback-UUNSnoh7.js"),__vite__mapDeps([27,1,2,24]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.githubCallback"}},{path:"/upgrade",name:"upgrade",component:()=>Rt(()=>import("./index-BWh3R1jI.js"),__vite__mapDeps([28,1,2,29,25,16,17,7,30]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.upgrade"}},{path:"/previewBlank/:compId/:version?",name:"previewBlank",component:()=>Rt(()=>import("./index-By_sRNiP.js"),__vite__mapDeps([31,2,32,33,1,34,4]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.preview"}},{path:"/previewLocalBlank/:compId",name:"previewLocalBlank",component:()=>Rt(()=>import("./index-VpAGAhRh.js"),__vite__mapDeps([35,2,36,37,1,15,34,4]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.previewLocal"}},{path:"/similarPreview/:compId",name:"similarPreview",component:()=>Rt(()=>import("./index-Dcp6qLr1.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.similarPreview"}},{path:"/",component:yN,redirect:"/share",meta:{hideParent:!0},children:[{path:"/share",name:"share",meta:{title:"route.share",icon:Jr(()=>Rt(()=>import("./home-rounded-CN0qCDnE.js"),__vite__mapDeps([54,18,2,55]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-z8BnmFXm.js"),__vite__mapDeps([56,1,2,45,32,36,11,15,46,5,47,6,20,4,34,57]),import.meta.url)},{path:"/mine",name:"mine",meta:{title:"route.mine",icon:Jr(()=>Rt(()=>import("./supervised-user-circle-BwUSx6w_.js"),__vite__mapDeps([58,18,2,59]),import.meta.url))},component:()=>Rt(()=>import("./index-Dy0c-ddP.js"),__vite__mapDeps([60,1,2,45,32,36,11,15,46,5,47,6,20,4,34,61,62,63,29,49,52,64,65,3,66,7,67,57]),import.meta.url)},{path:"/collect",name:"collect",meta:{title:"route.collect",icon:Jr(()=>Rt(()=>import("./kid-star-CiMfD7Sa.js"),__vite__mapDeps([68,18,2,69]),import.meta.url))},component:()=>Rt(()=>import("./index-D_NvG8ob.js"),__vite__mapDeps([70,1,2,45,32,36,11,15,46,5,47,6,20,4,34,57]),import.meta.url)},{path:"/myComments",name:"myComments",meta:{title:"route.myComments",hidden:!0},component:()=>Rt(()=>import("./index-4S2NYemE.js"),__vite__mapDeps([71,1,2,9,10,11,12,51,52,64,65,7,20]),import.meta.url)},{path:"/local",name:"local",meta:{title:"route.local",icon:Jr(()=>Rt(()=>import("./sync-saved-locally-rounded-DyESI323.js"),__vite__mapDeps([72,18,2,73]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-ex5YI_gC.js"),__vite__mapDeps([74,1,2,45,32,36,11,15,46,5,47,6,20,4,34]),import.meta.url)},{path:"/upload",name:"upload",meta:{title:"route.upload",icon:Jr(()=>Rt(()=>import("./cloud-upload-BqJFdj_J.js"),__vite__mapDeps([75,18,2,76]),import.meta.url)),noAuth:!0,hidden:!0},component:()=>Rt(()=>import("./index-CbOKlsZn.js"),__vite__mapDeps([77,1,2,62,32,4,63,34,29,49,5,15,46,47,6,20,52,64,65,3,66,7,44,78,30]),import.meta.url)},{path:"/uploadTeam/:teamId",name:"uploadTeam",meta:{title:"route.uploadTeam",hidden:!0},component:()=>Rt(()=>import("./index-CbOKlsZn.js"),__vite__mapDeps([77,1,2,62,32,4,63,34,29,49,5,15,46,47,6,20,52,64,65,3,66,7,44,78,30]),import.meta.url)},{path:"/userInfo",name:"userInfo",meta:{title:"route.userInfo",hidden:!0},component:()=>Rt(()=>import("./index-DgQa2ZqK.js"),__vite__mapDeps([79,1,2,23,3,5,22,80,10,11,12,81,7]),import.meta.url)},{path:"/preview/:compId",name:"preview",meta:{title:"route.preview",noAuth:!0,hidden:!0},component:()=>Rt(()=>import("./index-Dcp6qLr1.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url)},{path:"/previewLocal/:compId",meta:{title:"route.previewLocal",hidden:!0,noAuth:!0},component:()=>Rt(()=>import("./index-B6Oo99Ej.js"),__vite__mapDeps([82,1,2,36,48,24,45,32,11,15,46,5,47,6,20,4,34,29,49,50,7,37]),import.meta.url)},{path:"/previewTeam/:teamId/:compId",meta:{title:"route.previewTeam",noAuth:!0,hidden:!0},props:{isTeamPreview:!0},component:()=>Rt(()=>import("./index-Dcp6qLr1.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url)},{path:"/terminal",name:"terminal",meta:{title:"route.terminal",icon:Jr(()=>Rt(()=>import("./terminal-DAZ0JqKA.js"),__vite__mapDeps([83,18,2,84]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-B6JeEo9g.js"),__vite__mapDeps([85,41,2,42,1,43]),import.meta.url)},{path:"/setting",name:"setting",meta:{title:"route.setting",icon:Jr(()=>Rt(()=>import("./settings-CSr4nQM1.js"),__vite__mapDeps([86,18,2,87]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-6zg8j_nT.js"),__vite__mapDeps([88,1,2,52,89,7]),import.meta.url)},{path:"/team/:teamId",name:"team",meta:{title:"route.team",hidden:!0},component:()=>Rt(()=>import("./index-CaoAcCMA.js"),__vite__mapDeps([90,1,2,39,40,10,11,12,45,32,36,15,46,5,47,6,20,4,34,3,57,18,52,91,7]),import.meta.url)}]},{path:"/:pathMatch(.*)*",name:"404",meta:{hidden:!0,noAuth:!0,title:"route.404"},component:()=>Rt(()=>import("./index-D6zFRika.js"),__vite__mapDeps([92,2]),import.meta.url)}]}),Bs}function wN(e){bN(),e.use(Bs)}const EN=re([]);function SN(e){const t=Mh(YL,{errors:EN.value}),n=document.createElement("div");n.id="error-container",t.mount(n),document.body.appendChild(n)}var Wu={exports:{}},CN=Wu.exports,Xy;function xN(){return Xy||(Xy=1,(function(e,t){(function(n,r){e.exports=r()})(CN,function(){function n(_e){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(_e)}function r(_e,ue){if(!(_e instanceof ue))throw new TypeError("Cannot call a class as a function")}function i(_e,ue){for(var ye=0;ye<ue.length;ye++){var Fe=ue[ye];Fe.enumerable=Fe.enumerable||!1,Fe.configurable=!0,"value"in Fe&&(Fe.writable=!0),Object.defineProperty(_e,Fe.key,Fe)}}function o(_e,ue,ye){ue&&i(_e.prototype,ue),ye&&i(_e,ye),Object.defineProperty(_e,"prototype",{writable:!1})}function s(_e,ue,ye){ue in _e?Object.defineProperty(_e,ue,{value:ye,enumerable:!0,configurable:!0,writable:!0}):_e[ue]=ye}function l(_e,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");_e.prototype=Object.create(ue&&ue.prototype,{constructor:{value:_e,writable:!0,configurable:!0}}),Object.defineProperty(_e,"prototype",{writable:!1}),ue&&d(_e,ue)}function u(_e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ue){return ue.__proto__||Object.getPrototypeOf(ue)})(_e)}function d(_e,ue){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ye,Fe){return ye.__proto__=Fe,ye})(_e,ue)}function f(_e,ue){if(ue&&(typeof ue=="object"||typeof ue=="function"))return ue;if(ue!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(ue=_e,ue===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ue}function p(_e){var ue=(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}})();return function(){var ye,Fe=u(_e);return f(this,ue?(ye=u(this).constructor,Reflect.construct(Fe,arguments,ye)):Fe.apply(this,arguments))}}function v(_e,ue){(ue==null||ue>_e.length)&&(ue=_e.length);for(var ye=0,Fe=new Array(ue);ye<ue;ye++)Fe[ye]=_e[ye];return Fe}function y(_e,ue){var ye,Fe=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(!Fe){if(Array.isArray(_e)||(Fe=(function(be,ke){if(be){if(typeof be=="string")return v(be,ke);var Ie=Object.prototype.toString.call(be).slice(8,-1);return(Ie=Ie==="Object"&&be.constructor?be.constructor.name:Ie)==="Map"||Ie==="Set"?Array.from(be):Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie)?v(be,ke):void 0}})(_e))||ue&&_e&&typeof _e.length=="number")return Fe&&(_e=Fe),ye=0,{s:ue=function(){},n:function(){return ye>=_e.length?{done:!0}:{done:!1,value:_e[ye++]}},e:function(be){throw be},f:ue};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&qu.assertOptions(r,{silentJSONParsing:Ir.transitional(Ir.boolean),forcedJSONParsing:Ir.transitional(Ir.boolean),clarifyTimeoutError:Ir.transitional(Ir.boolean),legacyInterceptorReqResOrdering:Ir.transitional(Ir.boolean)},!1),i!=null&&(he.isFunction(i)?n.paramsSerializer={serialize:i}:qu.assertOptions(i,{encode:Ir.function,serialize:Ir.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qu.assertOptions(n,{baseUrl:Ir.spelling("baseURL"),withXsrfToken:Ir.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&he.merge(o.common,o[n.method]);o&&he.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ir.concat(s,o);const l=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;u=u&&g.synchronous;const m=n.transitional||Wh;m&&m.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let f,p=0,v;if(!u){const g=[Ky.bind(this),void 0];for(g.unshift(...l),g.push(...d),v=g.length,f=Promise.resolve(n);p<v;)f=f.then(g[p++],g[p++]);return f}v=l.length;let y=n;for(;p<v;){const g=l[p++],m=l[p++];try{y=g(y)}catch(b){m.call(this,b);break}}try{f=Ky.call(this,y)}catch(g){return Promise.reject(g)}for(p=0,v=d.length;p<v;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=Xo(this.defaults,t);const n=nE(t.baseURL,t.url,t.allowAbsoluteUrls);return J1(n,t.params,t.paramsSerializer)}};he.forEach(["delete","get","head","options"],function(e){Wo.prototype[e]=function(t,n){return this.request(Xo(n||{},{method:e,url:t,data:(n||{}).data}))}});he.forEach(["post","put","patch"],function(e){function t(n){return function(r,i,o){return this.request(Xo(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Wo.prototype[e]=t(),Wo.prototype[e+"Form"]=t(!0)});let z5=class aE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(i,o,s){r.reason||(r.reason=new sl(i,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new aE(function(n){t=n}),cancel:t}}};function B5(e){return function(t){return e.apply(null,t)}}function V5(e){return he.isObject(e)&&e.isAxiosError===!0}const zp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zp).forEach(([e,t])=>{zp[t]=e});function lE(e){const t=new Wo(e),n=z1(Wo.prototype.request,t);return he.extend(n,Wo.prototype,t,{allOwnKeys:!0}),he.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return lE(Xo(e,r))},n}const ln=lE(ol);ln.Axios=Wo;ln.CanceledError=sl;ln.CancelToken=z5;ln.isCancel=eE;ln.VERSION=sE;ln.toFormData=Rc;ln.AxiosError=at;ln.Cancel=ln.CanceledError;ln.all=function(e){return Promise.all(e)};ln.spread=B5;ln.isAxiosError=V5;ln.mergeConfig=Xo;ln.AxiosHeaders=ir;ln.formToJSON=e=>Z1(he.isHTMLForm(e)?new FormData(e):e);ln.getAdapter=oE.getAdapter;ln.HttpStatusCode=zp;ln.default=ln;const{Axios:Iie,AxiosError:Mie,CanceledError:Die,isCancel:Fie,CancelToken:Lie,VERSION:jie,all:Uie,Cancel:Nie,isAxiosError:zie,spread:Bie,toFormData:Vie,AxiosHeaders:Hie,HttpStatusCode:qie,formToJSON:Wie,getAdapter:Yie,mergeConfig:Kie}=ln,uE=new Map,H5={baseURL:"",timeout:1e4};function Qy(e,t,n){const r=ln.create({...H5,...t});return uE.set(e,{instance:r,urlResolver:n}),r}async function Pe(e,t){const n=e.split("/")[0];if(!n)throw new Error("Instance name could not be extracted from url.");const r=uE.get(n);if(!r)throw new Error(`Instance "${n}" not initialized. Call initInstance() first.`);if(!r.urlResolver)throw new Error(`Instance "${n}" has no urlResolver. Pass one to initInstance().`);return e=r.urlResolver(e),r.instance.request({url:e,...t})}async function q5(e,t){return Pe("__local__/api/comp/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function W5(e,t){return Pe("__local__/api/comp/checkCompRepeat",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Y5(e,t){return Pe("__local__/api/comp/compFileHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function K5(e,t){return Pe("__local__/api/comp/compFilesOssSignedUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function G5(e,t){return Pe("__local__/api/comp/dep",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Q5(e,t){return Pe("__local__/api/comp/dir",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function X5(e,t){return Pe("__local__/api/comp/download",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function J5(e,t){return Pe("__local__/api/comp/file",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Z5(e,t){return Pe("__local__/api/comp/generateCompJson",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function ej(e,t){return Pe("__local__/api/comp/localCompDetailByPathHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function tj(e,t){return Pe("__local__/api/comp/localComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function nj(e,t){return Pe("__local__/api/comp/localCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function rj(e,t){return Pe("__local__/api/comp/openCompPathInExplorer",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function ij(e,t){return Pe("__local__/api/comp/openCompPathInVscode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function oj(e){return Pe("__local__/api/comp/packageJson",{method:"POST",...e||{}})}async function sj(e,t){return Pe("__local__/api/comp/renameDir",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function aj(e,t){return Pe("__local__/api/comp/submit",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function lj(e,t){return Pe("__local__/api/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function uj(e,t){return Pe("__local__/api/comp/updateVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function cj(e,t){return Pe("__local__/api/comp/writeFile",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const dj=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheck:q5,compcontrollerCheckcomprepeat:W5,compcontrollerCompfilehash:Y5,compcontrollerCompfilesosssignedurl:K5,compcontrollerDep:G5,compcontrollerDir:Q5,compcontrollerDownload:X5,compcontrollerFile:J5,compcontrollerGeneratecompjson:Z5,compcontrollerLocalcompdetailbypathhash:ej,compcontrollerLocalcomps:tj,compcontrollerLocalcompsbyids:nj,compcontrollerOpencomppathinexplorer:rj,compcontrollerOpencomppathinvscode:ij,compcontrollerPackagejson:oj,compcontrollerRenamedir:sj,compcontrollerSubmit:aj,compcontrollerUpdate:lj,compcontrollerUpdateversion:uj,compcontrollerWritefile:cj},Symbol.toStringTag,{value:"Module"}));async function fj(e,t){return Pe("__local__/api/module/buildTemplateCompiler",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function pj(e){return Pe("__local__/api/module/clearPreBuild",{method:"POST",...e||{}})}async function hj(e,t){return Pe("__local__/api/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function mj(e){return Pe("__local__/api/module/preBuildSize",{method:"POST",...e||{}})}const vj=Object.freeze(Object.defineProperty({__proto__:null,modulecontrollerBuildtemplatecompiler:fj,modulecontrollerClearprebuild:pj,modulecontrollerPrebuild:hj,modulecontrollerPrebuildsize:mj},Symbol.toStringTag,{value:"Module"}));async function gj(e,t){return Pe("__local__/api/oss/fileSignUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const _j=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerFilesignurl:gj},Symbol.toStringTag,{value:"Module"}));async function yj(e,t){return Pe("__local__/api/vuefinder/list",{method:"GET",params:{...e},...t||{}})}const bj=Object.freeze(Object.defineProperty({__proto__:null,vuefindercontrollerList:yj},Symbol.toStringTag,{value:"Module"})),wj={comp:dj,module:vj,oss:_j,vuefinder:bj};async function Ej(e){return Pe("__remote__/api/v1/auth/github",{method:"GET",...e||{}})}async function Sj(e){return Pe("__remote__/api/v1/auth/github/callback",{method:"GET",...e||{}})}const Cj=Object.freeze(Object.defineProperty({__proto__:null,authcontrollerGithuboauth:Ej,authcontrollerGithuboauthcallback:Sj},Symbol.toStringTag,{value:"Module"}));async function xj(e,t){return Pe("__remote__/api/v1/comment/create",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Tj(e,t){return Pe("__remote__/api/v1/comment/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function kj(e,t){return Pe("__remote__/api/v1/comment/list",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Oj(e,t){return Pe("__remote__/api/v1/comment/markRead",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function $j(e,t){return Pe("__remote__/api/v1/comment/myCompsComments",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Aj(e,t){return Pe("__remote__/api/v1/comment/replies",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Rj(e){return Pe("__remote__/api/v1/comment/unreadCount",{method:"POST",...e||{}})}const Pj=Object.freeze(Object.defineProperty({__proto__:null,commentcontrollerCreate:xj,commentcontrollerDelete:Tj,commentcontrollerList:kj,commentcontrollerMarkread:Oj,commentcontrollerMycompscomments:$j,commentcontrollerReplies:Aj,commentcontrollerUnreadcount:Rj},Symbol.toStringTag,{value:"Module"}));async function Ij(e,t){return Pe("__remote__/api/v1/comp/checkCompExistByHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Mj(e,t){return Pe("__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Dj(e,t){return Pe("__remote__/api/v1/comp/checkVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Fj(e,t){return Pe("__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Lj(e,t){return Pe("__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function jj(e,t){return Pe("__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Uj(e,t){return Pe("__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Nj(e,t){return Pe("__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function zj(e,t){return Pe("__remote__/api/v1/comp/compsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Bj(e,t){return Pe("__remote__/api/v1/comp/deleteFailedComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Vj(e,t){return Pe("__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Hj(e,t){return Pe("__remote__/api/v1/comp/existCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function qj(e,t){return Pe("__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Wj(e,t){return Pe("__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Yj(e,t){return Pe("__remote__/api/v1/comp/softDelete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Kj(e,t){return Pe("__remote__/api/v1/comp/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Gj(e,t){return Pe("__remote__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Qj(e,t){return Pe("__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Xj(e,t){return Pe("__remote__/api/v1/comp/updateCompDownloadCount",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Jj(e,t){return Pe("__remote__/api/v1/comp/updateObjectId",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Zj(e,t){return Pe("__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function e3(e,t){return Pe("__remote__/api/v1/comp/upload",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function t3(e,t){return Pe("__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const n3=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheckcompexistbyhash:Ij,compcontrollerCheckcompexistbyid:Mj,compcontrollerCheckversion:Dj,compcontrollerCollect:Fj,compcontrollerCollectedcomps:Lj,compcontrollerCompdetail:jj,compcontrollerComphash:Uj,compcontrollerComps:Nj,compcontrollerCompsbyids:zj,compcontrollerDeletefailedcomp:Bj,compcontrollerDeletemycomp:Vj,compcontrollerExistcompsbyids:Hj,compcontrollerMycomps:qj,compcontrollerSimilarcomps:Wj,compcontrollerSoftdelete:Yj,compcontrollerTags:Kj,compcontrollerUpdate:Gj,compcontrollerUpdatebasicinfo:Qj,compcontrollerUpdatecompdownloadcount:Xj,compcontrollerUpdateobjectid:Jj,compcontrollerUpgraderecords:Zj,compcontrollerUpload:e3,compcontrollerVersions:t3},Symbol.toStringTag,{value:"Module"}));async function r3(e,t){return Pe("__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const i3=Object.freeze(Object.defineProperty({__proto__:null,emailcontrollerSendcode:r3},Symbol.toStringTag,{value:"Module"}));async function o3(e,t){return Pe("__remote__/api/v1/extranet/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function s3(e,t){return Pe("__remote__/api/v1/extranet/comps/detail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function a3(e,t){return Pe("__remote__/api/v1/extranet/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const l3=Object.freeze(Object.defineProperty({__proto__:null,extranetcontrollerCompdetail:s3,extranetcontrollerComps:o3,extranetcontrollerTags:a3},Symbol.toStringTag,{value:"Module"}));async function u3(e,t){return Pe("__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const c3=Object.freeze(Object.defineProperty({__proto__:null,keywordcontrollerQuerykeywordscomp:u3},Symbol.toStringTag,{value:"Module"}));async function d3(e){return Pe("__remote__/api/v1/oss/compOssDir",{method:"POST",...e||{}})}async function f3(e){return Pe("__remote__/api/v1/oss/getSts",{method:"POST",...e||{}})}async function p3(e){return Pe("__remote__/api/v1/oss/prebuildPutPolicy",{method:"POST",...e||{}})}async function h3(e,t){return Pe("__remote__/api/v1/oss/putPolicy",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const m3=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerCompossdir:d3,osscontrollerGetsts:f3,osscontrollerPrebuildputpolicy:p3,osscontrollerPutpolicy:h3},Symbol.toStringTag,{value:"Module"}));async function v3(e,t){return Pe("__remote__/api/v1/rating/my",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function g3(e,t){return Pe("__remote__/api/v1/rating/remove",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function _3(e,t){return Pe("__remote__/api/v1/rating/set",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const y3=Object.freeze(Object.defineProperty({__proto__:null,ratingcontrollerMy:v3,ratingcontrollerRemove:g3,ratingcontrollerSet:_3},Symbol.toStringTag,{value:"Module"}));async function b3(e,t){return Pe("__remote__/api/v1/team/addToTeamMyComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function w3(e){return Pe("__remote__/api/v1/team/allMember",{method:"POST",...e||{}})}async function E3(e,t){return Pe("__remote__/api/v1/team/applyList",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function S3(e,t){return Pe("__remote__/api/v1/team/checkCompUpdatePermission",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function C3(e,t){return Pe("__remote__/api/v1/team/copyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function x3(e,t){return Pe("__remote__/api/v1/team/create",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function T3(e){return Pe("__remote__/api/v1/team/created",{method:"POST",...e||{}})}async function k3(e,t){return Pe("__remote__/api/v1/team/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function O3(e){return Pe("__remote__/api/v1/team/detail",{method:"POST",...e||{}})}async function $3(e){return Pe("__remote__/api/v1/team/exit",{method:"POST",...e||{}})}async function A3(e,t){return Pe("__remote__/api/v1/team/findByCode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function R3(e,t){return Pe("__remote__/api/v1/team/handleApply",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function P3(e,t){return Pe("__remote__/api/v1/team/join",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function I3(e){return Pe("__remote__/api/v1/team/joined",{method:"POST",...e||{}})}async function M3(e,t){return Pe("__remote__/api/v1/team/kickOut",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function D3(e,t){return Pe("__remote__/api/v1/team/member",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function F3(e,t){return Pe("__remote__/api/v1/team/myTeamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function L3(e,t){return Pe("__remote__/api/v1/team/removeComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function j3(e,t){return Pe("__remote__/api/v1/team/removeMyTeamComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function U3(e,t){return Pe("__remote__/api/v1/team/teamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function N3(e,t){return Pe("__remote__/api/v1/team/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function z3(e,t){return Pe("__remote__/api/v1/team/updateCompCanUpdateUsers",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function B3(e,t){return Pe("__remote__/api/v1/team/updateMenu",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function V3(e,t){return Pe("__remote__/api/v1/team/updateTeamUserNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const H3=Object.freeze(Object.defineProperty({__proto__:null,teamcontrollerAddtoteammycomps:b3,teamcontrollerAllmember:w3,teamcontrollerApplylist:E3,teamcontrollerCheckcompupdatepermission:S3,teamcontrollerCopycomp:C3,teamcontrollerCreate:x3,teamcontrollerCreated:T3,teamcontrollerDelete:k3,teamcontrollerDetail:O3,teamcontrollerExit:$3,teamcontrollerFindbycode:A3,teamcontrollerHandleapply:R3,teamcontrollerJoin:P3,teamcontrollerJoined:I3,teamcontrollerKickout:M3,teamcontrollerMember:D3,teamcontrollerMyteamcomps:F3,teamcontrollerRemovecompfromteam:L3,teamcontrollerRemovemyteamcomp:j3,teamcontrollerTeamcomps:U3,teamcontrollerUpdate:N3,teamcontrollerUpdatecompcanupdateusers:z3,teamcontrollerUpdatemenu:B3,teamcontrollerUpdateteamusernickname:V3},Symbol.toStringTag,{value:"Module"}));async function q3(e){return Pe("__remote__/api/v1/token/approachExpire",{method:"POST",...e||{}})}async function W3(e){return Pe("__remote__/api/v1/token/refresh",{method:"POST",...e||{}})}const Y3=Object.freeze(Object.defineProperty({__proto__:null,tokencontrollerApproachexpire:q3,tokencontrollerRefresh:W3},Symbol.toStringTag,{value:"Module"}));async function K3(e,t){return Pe("__remote__/api/v1/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function G3(e){return Pe("__remote__/api/v1/upgrade/logs",{method:"POST",...e||{}})}const Q3=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerCheck:K3,upgradecontrollerLogs:G3},Symbol.toStringTag,{value:"Module"}));async function X3(e,t){return Pe("__remote__/api/v1/user/bindEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function J3(e,t){return Pe("__remote__/api/v1/user/changeAvatar",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Z3(e,t){return Pe("__remote__/api/v1/user/changeNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function eU(e,t){return Pe("__remote__/api/v1/user/changePassword",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function tU(e){return Pe("__remote__/api/v1/user/checkPassword",{method:"POST",...e||{}})}async function nU(e,t){return Pe("__remote__/api/v1/user/login",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function rU(e,t){return Pe("__remote__/api/v1/user/setAllowEmailLogin",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function iU(e,t){return Pe("__remote__/api/v1/user/updateEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function oU(e){return Pe("__remote__/api/v1/user/userInfo",{method:"POST",...e||{}})}async function sU(e){return Pe("__remote__/api/v1/user/whoAmI",{method:"POST",...e||{}})}const aU=Object.freeze(Object.defineProperty({__proto__:null,usercontrollerBindemail:X3,usercontrollerChangeavatar:J3,usercontrollerChangenickname:Z3,usercontrollerChangepassword:eU,usercontrollerCheckpassword:tU,usercontrollerLogin:nU,usercontrollerSetallowemaillogin:rU,usercontrollerUpdateemail:iU,usercontrollerUserinfo:oU,usercontrollerWhoami:sU},Symbol.toStringTag,{value:"Module"}));async function lU(e,t){return Pe("__remote__/api/v2/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const uU=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerv2Check:lU},Symbol.toStringTag,{value:"Module"})),zs={v1Auth:Cj,v1Comment:Pj,v1Comp:n3,v1Email:i3,v1Extranet:l3,v1Keyword:c3,v1Oss:m3,v1Rating:y3,v1Team:H3,v1Token:Y3,v1Upgrade:Q3,v1User:aU,v2Upgrade:uU},cU=Eo("personalStore",{state:()=>({userInfo:{},isPasswordSet:!1}),getters:{email(e){return e.userInfo?.email??""},isAllowEmailLogin(e){return e.userInfo?.isAllowEmailLogin??!1}},actions:{setUserInfo(e){this.$patch(t=>{t.userInfo=e})},setIsPasswordSet(e){this.$patch(t=>{t.isPasswordSet=e})},async initUserInfo(){const e=await zs.v1User.usercontrollerUserinfo();e.code===0&&this.setUserInfo(e.data)},async setEmail(e){this.$patch(t=>{t.userInfo.email=e})},async setNickname(e){this.$patch(t=>{t.userInfo.nickname=e})},async setAllowEmailLogin(e){await zs.v1User.usercontrollerSetallowemaillogin({allow:e}).then(()=>{this.$patch(t=>{t.userInfo.isAllowEmailLogin=e})})}}}),dU=Eo("moduleStore",{state:()=>({modules:{}}),actions:{setModules(e,t){this.$patch(n=>{n.modules[e]=t})},async loadModule(e){if(this.modules[e])return this.modules[e];const t=await import(e);return this.setModules(e,t),t}}}),mu=Ls(AD,!0),Gh=Eo("appStore",{state:()=>({}),getters:{collapse(){return mu.value}},actions:{toggleSideBar(){mu.value=!mu.value},setSideBarCollapse(e){e!==this.collapse&&(mu.value=e)}}}),fU=Eo("team",{state:()=>({joinedTeams:[],createdTeams:[]}),actions:{setJoinedTeams(e){this.$patch(t=>{t.joinedTeams=e})},setCreatedTeams(e){this.$patch(t=>{t.createdTeams=e})},removeCreatedTeam(e){this.$patch(t=>{t.createdTeams=t.createdTeams.filter(n=>n._id!==e)})},addCreatedTeam(e){this.$patch(t=>{t.createdTeams.some(r=>r._id===e._id)||t.createdTeams.push(e)})},addJoinedTeam(e){this.$patch(t=>{t.joinedTeams.some(r=>r._id===e._id)||t.joinedTeams.push(e)})},removeJoinedTeam(e){this.$patch(t=>{t.joinedTeams=t.joinedTeams.filter(n=>n._id!==e)})},updateCreatedTeamItemById(e,t){this.$patch(n=>{const r=n.createdTeams.findIndex(i=>i._id===e);r!==-1&&(n.createdTeams[r]=t)})},getTeamDetail(e){return this.joinedTeams.find(n=>n._id===e)||this.createdTeams.find(n=>n._id===e)}}}),pU={keyword:"关键词",confirm:"确定",cancel:"取消",close:"关闭",save:"保存",submit:"提交",delete:"删除",edit:"编辑",add:"添加",update:"更新",upload:"上传",download:"下载",refresh:"刷新",loadingText:"加载中",success:"成功",error:"错误",warning:"警告",info:"提示",copy:"复制",copied:"已复制",copySuccess:"复制成功",copyFailed:"复制失败",open:"打开",search:"搜索",reset:"重置",clear:"清空",back:"返回",next:"下一步",prev:"上一步",finish:"完成",operation:"操作",status:"状态",yes:"是",no:"否",name:"名称",description:"描述",version:"版本",time:"时间",date:"日期",author:"作者",type:"类型",category:"分类",tag:"标签",content:"内容",setting:"设置",cache:"缓存",cacheSize:"已使用",clearCache:"清空缓存",clearCacheConfirm:"将清空浏览器单文件编译结果以及模块预编译文件,确认清空缓存吗?",cacheCleared:"缓存已清空",newPage:"新页面打开",terminal:"终端",preview:"预览",doc:"文档",readme:"README.md",upgradeRecord:"更新记录",ratingReview:"评分评论",openInNewPage:"新页面打开",depInstall:"依赖安装",fullscreen:"全屏",exitFullscreen:"退出全屏",maximizeRestore:"最大化/还原",siteSlogan:"原子化组件社区,让组件流通更简单。",siteSubtitle:"Vue 组件共享平台",adminSlogan:"组件管理平台 · 后台管理系统",docsTutorial:"文档教程",empty:"暂无数据",noReadme:"组件没有配置README.md文件",dragSort:"拖拽排序",filter:"筛选",apply:"应用",person:"人",unit:"个",pleaseSelect:"请选择",pleaseInput:"请输入",me:"我",generate:"生成",regenerate:"重新生成",generateSuccess:"生成成功",moreOperations:"更多操作",more:"更多",maxTagCount:"最大标签数量",or:"或"},hU={keywordPlaceholder:"请输入组件名称/描述",title:"组件",name:"组件名称",fieldId:"组件ID",fieldName:"组件名称",fieldVersion:"版本号",desc:"组件描述",remarksDesc:"备注说明",remarksDescRequired:"请输入备注说明",pleaseInputCompName:"请输入组件名称",pleaseInputRemarks:"请输入备注,有助于组件市场检索",pleaseInputTags:"请选择或输入标签",tags:"组件标签",tagsMaxCount:"标签数量不能超过5个",tagsEmpty:"标签不能为空",tagsTooLong:"标签「{tag}」长度不能超过20个字符",tagsInvalidChars:"标签「{tag}」包含非法字符,仅允许中文、英文、数字、连字符和下划线",tagsHelp:"输入文字后按回车键创建新标签,最多5个",compNameRequired:"组件名称不能为空",compNameNamingRule:"组件名只能是「大驼峰(PascalCase)」或「短横线(kebab-case)」命名法",lengthBetween:"长度在 {min} 到 {max} 个字符",previewImage:"预览图",previewImageRequired:"请上传或生成预览图",previewImageHint:"在小窗预览面板展示的截图,用于组件市场封面。如自动截图失败,请手动上传 PNG 图片",uploadPreviewImage:"上传预览图",generateScreenshot:"生成截图",previewImageFallbackHint:"预览图仅在组件无法渲染时生效",version:"组件版本",detail:"组件详情",preview:"组件预览",previewConfig:"预览配置",previewList:"预览列表",uploadPreview:"组件上传预览",updatePreview:"组件更新预览",download:"下载组件",update:"更新组件",upload:"上传组件",submit:"提交组件",edit:"编辑组件",add:"添加组件",delete:"删除组件",local:"本地组件",remote:"远程组件",online:"在线组件",similar:"相似组件",similarFound:"检测到相似组件",similarTeam:"团队内相似组件",dir:"组件目录",file:"组件文件",entry:"入口文件",previewEntry:"预览入口地址",previewEntryFull:"预览入口地址(全屏窗口)",addPreviewEntry:"添加预览入口",maxPreviewEntry:"最多添加{n}个预览入口",pleaseAddPreviewEntry:"请添加预览入口",miniPreviewFile:"小窗预览文件",fullPreviewFile:"全屏预览文件",pleaseSelectPreviewFile:"请选择预览文件",remarkDesc:"备注说明",dep:"组件依赖",localDep:"组件依赖(本地)",onlineDep:"组件依赖(线上)",finalDep:"最终依赖",localVersion:"本地:",onlineVersion:"线上:",onlineDepEmpty:"线上依赖暂无数据!",versionConsistent:"版本一致",versionChange:"版本变化,请手动选择最终版本",versionChangeConfirmed:"已确认",newDep:"新增依赖",miniPanel:"小窗面板",fullPanel:"全屏面板",reload:"重新加载",uploadProtocol:"组件发布协议",bgPanel:"背景板",compLocation:"组件位置",pleaseSelectFolderFirst:"请先选择文件夹",compAlreadyUploaded:"组件已经上传,更新操作请前往我的组件或团队组件",affirmDep:"组件依赖(确认的版本)",checkConfig:"配置检查",checkError:"报错信息",extraInfo:"附加信息",baseInfo:"基础信息",upgradeLog:"更新说明",pleaseInputUpgradeLog:"请填写更新说明",config:"组件配置",configStatus:"组件配置检查状态",configError:"配置异常",configCheckError:"配置检查报错",needUpgrade:"需要升级",fileChanged:"组件文件有变化",versionChanged:"版本号变化",fileNoChange:"文件没有变化",markdownValid:"Markdown预览校验通过",noMarkdown:"没有md文件",hash:"文件哈希",localHash:"本地组件文件hash",remoteHash:"线上组件文件hash",remoteVersion:"线上组件版本号",remoteVersionPrefix:"线上:",localVersionPrefix:"本地:",versionCompare:"版本号比较结果",carouselIndex:"组件预览走马灯index",bgColor:"组件背景颜色",dialogType:"组件弹窗类型",repeat:"组件重复检查",existLocal:"组件在本地存在",scopeId:"作用域id",tempDir:"组件临时目录",submitLimit:"组件提交限制",maxSize:"总大小限制",maxCount:"文件数量限制",matchType:"匹配类型",updateType:"更新类型",updateOnline:"在线更新",updateOffline:"离线更新",compOfflineUpdate:"组件离线更新",compOnlineUpdate:"组件在线更新",folder:"文件夹",compNotInLocal:"组件不在本地,继续更新只能更新组件描述,预览配置等基础信息,是否继续?",selectUpdateFolder:"请选择要更新的文件夹",openInVscode:"在编辑器中打开",openingInEditor:"在编辑器中打开...",openInExplorer:"在文件管理器中打开",openingInExplorer:"正在打开文件管理器...",updateSuccess:"更新成功",downloadVersionConfirm:"当前选择的版本为:{version},确认下载吗?",downloading:"组件下载中...",downloadPathConfirm:"是否下载组件到【{path}】路径下",downloadCoverConfirm:"组件【{name}】已经下载或者有同名组件,是否覆盖?",downloadCoverTitle:"组件覆盖确认",coverConfirm:"确认覆盖",uncollectConfirm:"是否取消收藏组件【{name}】,取消收藏后组件将不再显示在收藏列表中,是否继续?",deleteConfirm:"是否删除组件【{name}】,删除组件后会释放占用的组件名称,是否继续?",collect:"收藏",uncollect:"取消收藏",collected:"已收藏",uncollected:"未收藏",entryFile:"入口文件",configFile:"配置文件",fileChangedNeedVersion:"文件内容改变,请增加版本号",viewFileChanges:"查看文件变化",versionChangedButFileSame:"版本号改变,但文件内容未改变,请还原版本号",errorMsg:"错误信息",versionCannotBeLessThanLatest:"版本号不能小于最新版本{version}",uploadAnyway:"仍然上传",compileError:"组件编译失败",compileWarn:"组件编译警告",formatCode:"格式化代码:",formatCodeTooltip:"仅格式化对比时的文件,不会格式化原始文件",noChanges:"暂无变更",diff:{changed:"M 改变",unchanged:"U 未改变",added:"A 新增",deleted:"D 删除"},uploadConfirmTitle:"上传确认",renameFolderTitle:"文件夹名称不一致",renameFolderTip:"组件名称「{editedName}」与文件夹名称「{folderName}」不一致。",renameFolderQuestion:"是否在上传成功后同步修改文件夹名称?",renameSyncYes:"同步修改文件夹名称",renameSyncNo:"仅上传,不修改文件夹名称"},mU={title:"团队",name:"团队名称",code:"团队码",desc:"团队描述",create:"创建团队",join:"加入团队",exit:"退出团队",exitConfirm:"退出确认",manage:"团队管理",setting:"团队设置",member:"团队成员",memberCount:"成员数",maxMember:"最大成员数",compCount:"组件数量",maxCompCount:"最大组件数量",creator:"创建者",downloadCount:"下载量",collectCount:"收藏量",createTime:"创建时间",myTeam:"我的团队",joinedTeam:"已加入团队",space:"团队空间",noJoined:"暂无加入的团队",noCreated:"暂无创建的团队",createCountLimit:"最大允许创建的团队数量",joinCountLimit:"允许最多加入的团队数量",compList:"团队组件列表",myCompList:"我的组件",compGroup:"团队组件分组",compGroupList:"团队组件分组列表",addMyComp:"团队添加我的组件",compUpdate:"团队我的组件更新",addFromMine:"去我的组件添加",applyList:"申请列表",nickname:"团队昵称",noTeamInfo:"暂无团队信息",compLib:"组件库",groupConfig:"分组配置",compManage:"组件管理",unsavedDataLeave:"分组配置数据未保存,确定要离开吗?",leave:"离开",disbandTeam:"解散团队",applyAudit:"申请审核",teamName:"团队名称",fillTeamCode:"填写团队码",pleaseInputTeamCode:"请输入团队码",teamIdNotExist:"团队ID不存在",joinSuccess:"加入团队成功",applyJoinTeam:"申请加入团队",showRepeatComp:"展示重复组件",allowAuthorDelete:"作者删除组件权限",teamIntro:"团队介绍",fillTeamName:"填写团队名称",pleaseInputTeamName:"请输入团队名称",pleaseInputTeamDesc:"请输入团队介绍",createSuccess:"创建团队成功",charLength:"长度在 {min} 到 {max} 个字符",disbandConfirm:"确定解散团队吗,解散后所有成员和组件将被移除,并且无法恢复?",deleteConfirm:"删除确认",inputAuthCode:"请输入验证码",disbandSuccess:"解散团队成功",reject:"拒绝",agree:"同意",approved:"已同意",rejected:"已拒绝",kickOut:"踢出",teamUserNickname:"团队内昵称",pleaseInputTeamNickname:"请输入你在团队的昵称",normalUser:"普通用户",kickOutConfirm:"确定踢出用户【{name}】吗?",kickOutSuccess:"踢出成功",selectCanUpdateUser:"选择可更新用户",authorAutoAuth:"作者自带授权",updateAuth:"更新授权",updateTime:"更新时间",expandAll:"展开全部",createGroup:"创建分组",unsaved:"未保存",pleaseInputGroupName:"请输入分组名称",addComp:"添加组件",added:"已添加",notAdded:"未添加",defaultGroup:"默认分组",deleteGroupConfirm:"确认删除该分组吗?删除后该分组下的所有组件将被移除分组",addSuccess:"添加成功",isGrouped:"是否分组",grouped:"已分组",ungrouped:"未分组",group:"分组",prevVersion:"升级前版本",newVersion:"升级后版本",upgradeDesc:"升级描述",similarCompInTeam:"团队内相似组件",similarComp:"相似组件",deleteCompConfirm:"是否删除团队组件【{name}】,删除组件后团队成员将无法使用该组件,是否继续?",descTitle:"为业务团队打造专属组件空间",descItem1:"创建私密团队,组件仅对成员可见,保护核心资产",descItem2:"每个账号最多可创建 {count} 个团队",descItem3:"每个账号最多可加入 {count} 个团队",descItem4:"基础版团队支持最多 {count} 名成员",descItem5:"基础版团队可管理最多 {count} 个组件",descItem6:"支持创建分组菜单,灵活组织团队组件"},vU={title:"用户",username:"用户名",account:"账号",password:"密码",newPassword:"新密码",confirmPassword:"确认密码",confirmNewPassword:"确认新密码",pleaseInputNewPassword:"请输入新密码",pleaseConfirmNewPassword:"请确认新密码",passwordModified:"密码修改成功",email:"邮箱",oldEmail:"旧邮箱",newEmail:"新邮箱",phone:"手机号",avatar:"头像",nickname:"昵称",login:"登录",logout:"退出登录",register:"注册",forgotPassword:"忘记密码",resetPassword:"重置密码",changePassword:"修改密码",changeNickname:"修改昵称",pleaseInputNickname:"请输入昵称",changeAvatar:"修改头像",avatarModified:"头像修改成功",changeEmail:"修改邮箱",bindEmail:"绑定邮箱",emailBound:"邮箱绑定成功",basicInfo:"基本信息",securitySettings:"安全设置",loginPassword:"登录密码",passwordTip:"建议定期更换密码,确保账号安全",setPassword:"设置密码",emailLogin:"邮箱登录",emailLoginTip:"允许使用邮箱作为登录账号",pleaseSetPasswordFirst:"请先设置登录密码",pleaseBindEmailFirst:"请先绑定邮箱",emailLoginEnabled:"邮箱登录已开启",emailLoginDisabled:"邮箱登录已关闭",registerTime:"注册时间",notBound:"未绑定",change:"更换",bind:"绑定",authCode:"验证码",oldAuthCode:"旧验证码",newAuthCode:"新验证码",sendAuthCode:"发送验证码",resendAuthCode:"重新发送",getAuthCode:"获取验证码",pleaseInputAuthCode:"请输入验证码",pleaseInputNewAuthCode:"请输入新验证码",resendAfterSeconds:"{n}秒后重新获取",accountLogin:"账号登录",pleaseInputAccount:"请输入账号",pleaseInputUsername:"请输入用户名",pleaseInputPassword:"请输入密码",pleaseInputEmail:"请输入邮箱",pleaseInputOldEmail:"请输入旧邮箱",pleaseInputNewEmail:"请输入新邮箱",pleaseInputCorrectEmail:"请输入正确的邮箱",emailModified:"邮箱修改成功",newAuthCodeSent:"新验证码已发送",authCodeSent:"验证码已发送",skip:"跳过",loginSuccess:"登录成功",loggingIn:"登录中…",pleaseInputAccountAndPassword:"请输入您的账号和密码",invalidAccountOrPassword:"账号或密码错误",userInfo:"用户信息",personalCenter:"个人中心",myComp:"我的组件",notLoggedIn:"未登录",goLogin:"去登录",loginWithGithub:"使用 GitHub 登录",githubLoggingIn:"GitHub 登录中…",githubLoginFailed:"GitHub 登录失败",missingToken:"未获取到授权令牌",returnToLogin:"返回登录"},gU={title:"文件",name:"文件名",path:"文件路径",size:"文件大小",type:"文件类型",dir:"文件夹",selectDir:"选择文件夹",upload:"文件上传",download:"文件下载",select:"选择",multiSelect:"不支持多选",onlyDir:"只能选择文件夹",rootDir:"根目录",projectPath:"项目路径",currentDir:"当前目录",parentDir:"上级目录",refreshDir:"刷新文件夹列表"},_U={success:{download:"下载成功",update:"更新成功",delete:"删除成功",collect:"收藏成功",uncollect:"取消收藏成功",save:"保存成功",submit:"提交成功",upload:"上传成功",copy:"复制成功",operation:"操作成功",sendAuthCode:"验证码已发送",exitTeam:"退出成功",renameFolder:"文件夹名称修改成功"},error:{download:"下载失败",update:"更新失败",delete:"删除失败",collect:"收藏失败",uncollect:"取消收藏失败",save:"保存失败",submit:"提交失败",upload:"上传失败",copy:"复制失败",operation:"操作失败",load:"加载失败",network:"网络错误",timeout:"请求超时",unknown:"未知错误",pleaseFixCompileError:"请先处理编译错误",loginExpired:"登录已过期,请重新登录",refreshFailed:"刷新失败",requestFailed:"请求失败,请联系管理员",storageNotSupported:"浏览器不支持 storage.estimate API",renameFolder:"文件夹重命名失败,但组件已上传成功"},noUpdatePermission:"当前组件您没有更新权限,请联系管理员获取权限",confirm:{delete:"确定删除吗?",submit:"确定提交吗?",update:"确定更新吗?",exit:"确定退出吗?",cancel:"确定取消吗?"},loginRequired:"请先登录",fileExceed:"最多只能选择 {limit} 个文件,本次已选择 {selected} 个,共将上传 {total} 个文件",validate:{required:"必填项",format:"格式不正确",min:"不能小于最小值",max:"不能超过最大值",length:"长度不正确",email:"邮箱格式不正确",phone:"手机号格式不正确",imageFormat:"上传文件只能是图片格式",pleaseSelectFile:"请先选择文件",fileMaxSize:"上传文件大小不能超过 {size}MB!"}},yU={404:"页面不存在",share:"组件市场",collect:"收藏组件",collectSimple:"收藏",myComments:"我的评论",mine:"我的组件",mineSimple:"我的",local:"本地组件",localSimple:"本地",team:"团队",upload:"上传组件",uploadSimple:"上传",uploadTeam:"上传团队组件",setting:"设置",userInfo:"用户信息",upgrade:"更新",terminal:"终端",preview:"组件预览",previewLocal:"本地组件预览",previewTeam:"团队组件预览",previewBlank:"预览",similarPreview:"相似组件预览",login:"登录",githubCallback:"GitHub 登录回调",unknownTag:"未知标签"},bU={parse:"解析 Markdown",loading:"加载 Markdown",error:"加载失败",toc:"目录",anchor:"锚点"},wU={title:"终端",open:"打开终端",close:"关闭终端",execute:"执行命令",shutdown:"关闭进程",timeout:"超时时间",disconnected:"终端已断开连接"},EU={title:"依赖",name:"依赖名称",version:"依赖版本",install:"安装依赖",installing:"安装中",installed:"已安装",prebuild:"预构建",prebuildSize:"预构建大小",clearPrebuild:"清空预构建",batchSetting:"批量设置",dependencies:"dependencies",devDependencies:"devDependencies",match:{auto:"自动",onlyInstall:"仅安装",majorVersion:"主版本",minorVersion:"主次版本",exactVersion:"完全一致"},matchDesc:{auto:"不限制版本,使用当前环境直接渲染",onlyInstall:"不限制版本,仅需模块已安装",majorVersion:"主版本号一致即可(如 2.x)",minorVersion:"主版本和次版本一致(如 2.7.x)",exactVersion:"版本号完全匹配(如 2.7.14)"}},SU={title:"设置",previewRule:"预览规则",other:"其他设置",theme:"主题",language:"语言",darkMode:"暗黑模式",lightMode:"明亮模式"},CU={title:"版本更新",current:"当前版本",latest:"最新版本",check:"检查更新",upgrading:"更新中",upgraded:"已更新",publish:"发布更新",record:"更新记录",log:"更新日志",hasUpdate:"有更新",betaVersion:"内测版",noUpdate:"暂无更新",updateMethod:"更新方式",openTerminalAndRun:"打开终端,执行以下命令:",cannotIgnoreUpdate:"不可忽略此次更新"},xU={systemRecommended:"系统推荐",all:"全部",latest:"最新",hottest:"最热"},TU={submit:"提交"},kU={empty:"不能为空",notString:"必须是字符串类型,当前类型为: {type}",contentEmpty:"内容不能为空",startsWithNumber:'内容不能以数字开头,当前以 "{char}" 开头',invalidCharBacktick:"内容包含反引号(Markdown 语法标记),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharNewline:"内容包含换行符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharCarriageReturn:"内容包含回车符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharTab:"内容包含制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharFormFeed:"内容包含换页符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharVerticalTab:"内容包含垂直制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHash:"内容包含 # 字符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHtmlSpecial:'内容包含 HTML 特殊字符 "{char}",特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格',invalidCharUnknown:'内容包含非法字符 "{char}"(Unicode: U+{code}),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格'},OU={openInEditor:"在编辑器中打开",current:"当前",noRegistered:"暂无已注册项目",deregisterTitle:"注销项目",deregisterConfirm:"确定要注销项目 {hash} ({cwd}) 吗?",deregisterSuccess:"已注销项目 {hash}",deregisterFailed:"注销失败"},$U={myCommentsTitle:"我的评论",tabReceived:"收到的评论",tabMyDiscussions:"我的讨论",noMyCompsComments:"暂无评论",noReceivedComments:"暂无收到的评论",noMyDiscussions:"暂无参与讨论",new:"新",rating:"评分",ratingSuccess:"评分成功",ratingCancelSuccess:"已取消评分",ratingError:"评分失败,请重试",ratingDialogDesc:"正确的评分有助组件曝光,帮助更多人发现优秀组件",ratingThanks:"感谢你的打分,有什么意见请在评论区留言",writePlaceholder:"写下你的评论...",loginPlaceholder:"请先登录后再评论",post:"发表评论",allComments:"全部评论",empty:"暂无评论,来说两句吧",loadError:"加载评论失败",postSuccess:"评论发表成功",postError:"评论失败,请重试",anonymous:"匿名",self:"自己",cancelReply:"取消回复",reply:"回复",replyTo:"回复 {'@'}{name}...",replySuccess:"回复成功",replyError:"回复失败,请重试",expandReplies:"展开 {count} 条回复",collapseReplies:"收起回复",deleteConfirm:"确定删除这条评论吗?删除后不可恢复。",deleteTitle:"确认删除",deleteSuccess:"删除成功",deleteError:"删除失败,请重试",viewAllReplies:"查看全部 {count} 条回复",time:{justNow:"刚刚",minutesAgo:"{n}分钟前",hoursAgo:"{n}小时前",daysAgo:"{n}天前"}},AU={common:pU,comp:hU,team:mU,user:vU,file:gU,message:_U,route:yU,markdown:bU,terminal:wU,deps:EU,setting:SU,upgrade:CU,tag:xU,formCreate:TU,validateHash:kU,project:OU,comment:$U},RU={keyword:"Keyword",confirm:"Confirm",cancel:"Cancel",close:"Close",save:"Save",submit:"Submit",delete:"Delete",edit:"Edit",add:"Add",update:"Update",upload:"Upload",download:"Download",refresh:"Refresh",loadingText:"Loading",success:"Success",error:"Error",warning:"Warning",info:"Info",copy:"Copy",copied:"Copied",copySuccess:"Copy successful",copyFailed:"Copy failed",open:"Open",search:"Search",reset:"Reset",clear:"Clear",back:"Back",next:"Next",prev:"Previous",finish:"Finish",operation:"Operation",status:"Status",yes:"Yes",no:"No",name:"Name",description:"Description",version:"Version",time:"Time",date:"Date",author:"Author",type:"Type",category:"Category",tag:"Tag",content:"Content",setting:"Setting",cache:"Cache",cacheSize:"Used",clearCache:"Clear Cache",clearCacheConfirm:"This will clear browser single-file compilation results and module pre-compilation files. Confirm to clear cache?",cacheCleared:"Cache cleared",newPage:"Open in new page",terminal:"Terminal",preview:"Preview",doc:"Documentation",readme:"README.md",upgradeRecord:"Update Record",ratingReview:"Ratings & Reviews",openInNewPage:"Open in new page",depInstall:"Dependency Installation",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",maximizeRestore:"Maximize/Restore",siteSlogan:"Atomic Component Community, Making Component Sharing Easier.",siteSubtitle:"Vue Component Sharing Platform",adminSlogan:"Component Management Platform · Admin System",docsTutorial:"Documentation",empty:"No data",noReadme:"Component has no README.md file configured",dragSort:"Drag to sort",filter:"Filter",apply:"Apply",person:"people",unit:"items",pleaseSelect:"Please select",pleaseInput:"Please input",me:"Me",generate:"Generate",regenerate:"Regenerate",generateSuccess:"Generated successfully",moreOperations:"More Operations",more:"More",maxTagCount:"Max Tag Count",or:"or"},PU={keywordPlaceholder:"Please input component name or description",title:"Component",name:"Component Name",fieldId:"Component ID",fieldName:"Component Name",fieldVersion:"Version",desc:"Component Description",remarksDesc:"Remarks",remarksDescRequired:"Please enter remarks",pleaseInputCompName:"Please enter component name",pleaseInputRemarks:"Please enter remarks to help with component market search",pleaseInputTags:"Select or enter tags",tags:"Tags",tagsMaxCount:"No more than 5 tags allowed",tagsEmpty:"Tag cannot be empty",tagsTooLong:'Tag "{tag}" cannot exceed 20 characters',tagsInvalidChars:'Tag "{tag}" contains invalid characters, only Chinese, English, numbers, hyphens and underscores are allowed',tagsHelp:"Type and press Enter to create a new tag, max 5",compNameRequired:"Component name is required",compNameNamingRule:"Component name must be in PascalCase or kebab-case",lengthBetween:"Length must be between {min} and {max} characters",previewImage:"Preview Image",previewImageRequired:"Please upload or generate a preview image",previewImageHint:"Screenshot displayed in the mini preview panel, used as the component market cover. If auto-screenshot fails, please manually upload a PNG image",uploadPreviewImage:"Upload Preview Image",generateScreenshot:"Generate Screenshot",previewImageFallbackHint:"Preview image only takes effect when the component fails to render",version:"Component Version",detail:"Component Detail",preview:"Component Preview",previewConfig:"Preview Config",previewList:"Preview List",uploadPreview:"Component Upload Preview",updatePreview:"Component Update Preview",download:"Download Component",update:"Update Component",upload:"Upload Component",submit:"Submit Component",edit:"Edit Component",add:"Add Component",delete:"Delete Component",local:"Local Component",remote:"Remote Component",online:"Online Component",similar:"Similar Components",similarFound:"Similar Components Detected",similarTeam:"Similar Components in Team",dir:"Component Directory",file:"Component File",entry:"Entry File",previewEntry:"Preview Entry Address",previewEntryFull:"Preview Entry Address (Fullscreen)",addPreviewEntry:"Add Preview Entry",maxPreviewEntry:"Maximum {n} preview entries allowed",pleaseAddPreviewEntry:"Please add a preview entry",miniPreviewFile:"Mini Preview File",fullPreviewFile:"Full Preview File",pleaseSelectPreviewFile:"Please select preview file",remarkDesc:"Remarks",dep:"Component Dependencies",localDep:"Component Dependencies (Local)",onlineDep:"Component Dependencies (Online)",finalDep:"Final Dependencies",localVersion:"Local: ",onlineVersion:"Online: ",onlineDepEmpty:"No online dependency data!",versionConsistent:"Version Consistent",versionChange:"Version changed, please select final version",versionChangeConfirmed:"Confirmed",newDep:"New Dependency",miniPanel:"Mini Panel",fullPanel:"Full Panel",reload:"Reload",uploadProtocol:"Upload Protocol",bgPanel:"Background",compLocation:"Component Location",pleaseSelectFolderFirst:"Please select a folder first",compAlreadyUploaded:"Component already uploaded, please go to My Components or Team Components to update",affirmDep:"Component Dependencies (Confirmed Version)",checkConfig:"Config Check",checkError:"Error Info",extraInfo:"Extra Info",baseInfo:"Basic Info",upgradeLog:"Upgrade Log",pleaseInputUpgradeLog:"Please enter upgrade description",config:"Component Config",configStatus:"Component Config Check Status",configError:"Config Error",configCheckError:"Config Check Error",needUpgrade:"Needs Upgrade",fileChanged:"Component files changed",versionChanged:"Version changed",fileNoChange:"Files unchanged",markdownValid:"Markdown preview validation passed",noMarkdown:"No markdown file",hash:"File Hash",localHash:"Local Component File Hash",remoteHash:"Remote Component File Hash",remoteVersion:"Remote Component Version",remoteVersionPrefix:"Online: ",localVersionPrefix:"Local: ",versionCompare:"Version Comparison Result",carouselIndex:"Component Preview Carousel Index",bgColor:"Component Background Color",dialogType:"Component Dialog Type",repeat:"Component Repeat Check",existLocal:"Component exists locally",scopeId:"Scope ID",tempDir:"Component Temp Directory",submitLimit:"Component Submit Limit",maxSize:"Total Size Limit",maxCount:"File Count Limit",matchType:"Match Type",updateType:"Update Type",updateOnline:"Online Update",updateOffline:"Offline Update",compOfflineUpdate:"Component Offline Update",compOnlineUpdate:"Component Online Update",folder:"Folder",compNotInLocal:"Component is not local. Continuing will only update basic information like description and preview config. Continue?",selectUpdateFolder:"Please select folder to update",openInVscode:"Open in editor",openingInEditor:"Opening in editor...",openInExplorer:"Open in File Explorer",openingInExplorer:"Opening file explorer...",updateSuccess:"Update successful",downloadVersionConfirm:"The currently selected version is: {version}, confirm download?",downloading:"Downloading component...",downloadPathConfirm:"Download component to path [{path}]?",downloadCoverConfirm:"Component [{name}] already exists or has a duplicate name, overwrite?",downloadCoverTitle:"Overwrite Confirmation",coverConfirm:"Confirm Overwrite",uncollectConfirm:"Are you sure you want to uncollect component [{name}]? It will no longer appear in your collection list.",deleteConfirm:"Are you sure you want to delete component [{name}]? This will free up the component name and cannot be undone.",collect:"Collect",uncollect:"Uncollect",collected:"Collected",uncollected:"Not Collected",entryFile:"Entry File",configFile:"Config File",fileChangedNeedVersion:"File content changed, please increment version",viewFileChanges:"View File Changes",versionChangedButFileSame:"Version changed but file content unchanged, please revert version",errorMsg:"Error Message",versionCannotBeLessThanLatest:"Version cannot be less than latest version {version}",uploadAnyway:"Upload Anyway",compileError:"Component compilation failed",compileWarn:"Component compilation warning",formatCode:"Format Code:",formatCodeTooltip:"Only formats files during comparison, original files remain unchanged",noChanges:"No changes",diff:{changed:"M Changed",unchanged:"U Unchanged",added:"A Added",deleted:"D Deleted"},uploadConfirmTitle:"Upload Confirmation",renameFolderTitle:"Folder Name Mismatch",renameFolderTip:'Component name "{editedName}" does not match folder name "{folderName}".',renameFolderQuestion:"Do you want to sync the folder name after upload?",renameSyncYes:"Sync folder name",renameSyncNo:"Upload only, do not modify folder name"},IU={title:"Team",name:"Team Name",code:"Team Code",desc:"Team Description",create:"Create Team",join:"Join Team",exit:"Exit Team",exitConfirm:"Exit Confirmation",manage:"Team Management",setting:"Team Settings",member:"Team Members",memberCount:"Member Count",maxMember:"Max Members",compCount:"Component Count",maxCompCount:"Max Components",creator:"Creator",downloadCount:"Downloads",collectCount:"Collections",createTime:"Create Time",myTeam:"My Teams",joinedTeam:"Joined Teams",space:"Team Space",noJoined:"No joined teams",noCreated:"No created teams",createCountLimit:"Max teams allowed to create",joinCountLimit:"Max teams allowed to join",compList:"Team Component List",myCompList:"My Component List",compGroup:"Team Component Group",compGroupList:"Team Component Group List",addMyComp:"Team Add My Component",compUpdate:"Team My Component Update",addFromMine:"Add from My Components",applyList:"Apply List",nickname:"Team Nickname",noTeamInfo:"No team information",compLib:"Component Library",groupConfig:"Group Config",compManage:"Component Management",unsavedDataLeave:"Group configuration data is not saved, are you sure you want to leave?",leave:"Leave",disbandTeam:"Disband Team",applyAudit:"Apply Audit",teamName:"Team Name",fillTeamCode:"Fill in Team Code",pleaseInputTeamCode:"Please enter team code",teamIdNotExist:"Team ID does not exist",joinSuccess:"Joined team successfully",applyJoinTeam:"Apply to Join Team",showRepeatComp:"Show Duplicate Components",allowAuthorDelete:"Allow Author Delete",teamIntro:"Team Introduction",fillTeamName:"Fill in Team Name",pleaseInputTeamName:"Please enter team name",pleaseInputTeamDesc:"Please enter team description",createSuccess:"Team created successfully",charLength:"Length must be between {min} and {max} characters",disbandConfirm:"Are you sure you want to disband the team? All members and components will be removed and cannot be recovered.",deleteConfirm:"Delete Confirmation",inputAuthCode:"Please enter verification code",disbandSuccess:"Team disbanded successfully",reject:"Reject",agree:"Agree",approved:"Approved",rejected:"Rejected",kickOut:"Kick Out",teamUserNickname:"Team Nickname",pleaseInputTeamNickname:"Please enter your team nickname",normalUser:"Normal User",kickOutConfirm:"Are you sure you want to kick out user [{name}]?",kickOutSuccess:"Kicked out successfully",selectCanUpdateUser:"Select users who can update",authorAutoAuth:"Author has default authorization",updateAuth:"Update Authorization",updateTime:"Update Time",expandAll:"Expand All",createGroup:"Create Group",unsaved:"Unsaved",pleaseInputGroupName:"Please enter group name",addComp:"Add Component",added:"Added",notAdded:"Not Added",defaultGroup:"Default Group",deleteGroupConfirm:"Are you sure you want to delete this group? All components in this group will be removed from the group.",addSuccess:"Added successfully",isGrouped:"Is Grouped",grouped:"Grouped",ungrouped:"Ungrouped",group:"Group",prevVersion:"Previous Version",newVersion:"New Version",upgradeDesc:"Upgrade Description",similarCompInTeam:"Similar Components in Team",similarComp:"Similar Components",deleteCompConfirm:"Are you sure you want to delete team component [{name}]? Team members will no longer be able to use this component.",descTitle:"Create an Exclusive Component Space for Your Team",descItem1:"Create a private team where components are only visible to members, protecting core assets",descItem2:"Each account can create up to {count} teams",descItem3:"Each account can join up to {count} teams",descItem4:"Basic team supports up to {count} members",descItem5:"Basic team can manage up to {count} components",descItem6:"Support creating group menus to organize team components flexibly"},MU={title:"User",username:"Username",account:"Account",password:"Password",newPassword:"New Password",confirmPassword:"Confirm Password",confirmNewPassword:"Confirm New Password",pleaseInputNewPassword:"Please enter new password",pleaseConfirmNewPassword:"Please confirm new password",passwordModified:"Password modified successfully",email:"Email",oldEmail:"Old Email",newEmail:"New Email",phone:"Phone",avatar:"Avatar",nickname:"Nickname",login:"Login",logout:"Logout",register:"Register",forgotPassword:"Forgot Password",resetPassword:"Reset Password",changePassword:"Change Password",changeNickname:"Change Nickname",pleaseInputNickname:"Please enter nickname",changeAvatar:"Change Avatar",avatarModified:"Avatar updated successfully",changeEmail:"Change Email",bindEmail:"Bind Email",emailBound:"Email bound successfully",basicInfo:"Basic Information",securitySettings:"Security Settings",loginPassword:"Login Password",passwordTip:"Regularly change your password to ensure account security",setPassword:"Set Password",emailLogin:"Email Login",emailLoginTip:"Allow using email as login account",pleaseSetPasswordFirst:"Please set login password first",pleaseBindEmailFirst:"Please bind an email first",emailLoginEnabled:"Email login enabled",emailLoginDisabled:"Email login disabled",registerTime:"Registration Time",notBound:"Not Bound",change:"Change",bind:"Bind",authCode:"Verification Code",oldAuthCode:"Old Verification Code",newAuthCode:"New Verification Code",sendAuthCode:"Send Auth Code",resendAuthCode:"Resend",getAuthCode:"Get Code",pleaseInputAuthCode:"Please enter code",pleaseInputNewAuthCode:"Please enter new code",resendAfterSeconds:"Resend in {n}s",accountLogin:"Account Login",pleaseInputAccount:"Please enter account",pleaseInputUsername:"Please enter username",pleaseInputPassword:"Please enter password",pleaseInputEmail:"Please enter email",pleaseInputOldEmail:"Please enter old email",pleaseInputNewEmail:"Please enter new email",pleaseInputCorrectEmail:"Please enter correct email",emailModified:"Email modified successfully",newAuthCodeSent:"New verification code sent",authCodeSent:"Verification code sent",skip:"Skip",loginSuccess:"Login successful",loggingIn:"Logging in...",pleaseInputAccountAndPassword:"Please enter your account and password",invalidAccountOrPassword:"Invalid account or password",userInfo:"User Info",personalCenter:"Personal Center",myComp:"My Components",notLoggedIn:"Not logged in",goLogin:"Go to Login",loginWithGithub:"Login with GitHub",githubLoggingIn:"Logging in with GitHub...",githubLoginFailed:"GitHub Login Failed",missingToken:"Authorization token not received",returnToLogin:"Return to Login"},DU={title:"File",name:"Filename",path:"File Path",size:"File Size",type:"File Type",dir:"Directory",selectDir:"Select Directory",upload:"File Upload",download:"File Download",select:"Select",multiSelect:"Multiple selection not supported",onlyDir:"Only directories can be selected",rootDir:"Root Directory",projectPath:"Project Path",currentDir:"Current Directory",parentDir:"Parent Directory",refreshDir:"Refresh Directory List"},FU={success:{download:"Download successful",update:"Update successful",delete:"Delete successful",collect:"Collect successful",uncollect:"Uncollect successful",save:"Save successful",submit:"Submit successful",upload:"Upload successful",copy:"Copy successful",operation:"Operation successful",sendAuthCode:"Verification code sent",exitTeam:"Exit successful",renameFolder:"Folder name updated successfully"},error:{download:"Download failed",update:"Update failed",delete:"Delete failed",collect:"Collect failed",uncollect:"Uncollect failed",save:"Save failed",submit:"Submit failed",upload:"Upload failed",copy:"Copy failed",operation:"Operation failed",load:"Load failed",network:"Network error",timeout:"Request timeout",unknown:"Unknown error",pleaseFixCompileError:"Please fix compilation errors first",loginExpired:"Login expired, please log in again",refreshFailed:"Refresh failed",requestFailed:"Request failed, please contact administrator",storageNotSupported:"Browser does not support storage.estimate API",renameFolder:"Folder rename failed, but component was uploaded successfully"},noUpdatePermission:"You do not have permission to update this component. Please contact the administrator for access.",confirm:{delete:"Are you sure to delete?",submit:"Are you sure to submit?",update:"Are you sure to update?",exit:"Are you sure to exit?",cancel:"Are you sure to cancel?"},loginRequired:"Please login first",fileExceed:"You can select at most {limit} files, {selected} selected this time, {total} total to be uploaded",validate:{required:"Required field",format:"Invalid format",min:"Cannot be less than minimum value",max:"Cannot exceed maximum value",length:"Invalid length",email:"Invalid email format",phone:"Invalid phone format",imageFormat:"Only image files are allowed",pleaseSelectFile:"Please select a file first",fileMaxSize:"File size cannot exceed {size}MB!"}},LU={404:"Page Not Found",share:"Component Market",collect:"Collected Components",collectSimple:"Collection",myComments:"My Comments",mine:"My Components",mineSimple:"Mine",local:"Local Components",localSimple:"Local",team:"Team",upload:"Upload Component",uploadSimple:"Upload",uploadTeam:"Upload Team Component",setting:"Settings",userInfo:"User Info",upgrade:"Upgrade",terminal:"Terminal",preview:"Component Preview",previewLocal:"Local Component Preview",previewTeam:"Team Component Preview",previewBlank:"Preview",similarPreview:"Similar Component Preview",login:"Login",githubCallback:"GitHub Login Callback",unknownTag:"Unknown Tag"},jU={parse:"Parse Markdown",loading:"Loading Markdown",error:"Load failed",toc:"Table of Contents",anchor:"Anchor"},UU={title:"Terminal",open:"Open Terminal",close:"Close Terminal",execute:"Execute Command",shutdown:"Shutdown Process",timeout:"Timeout",disconnected:"Terminal disconnected"},NU={title:"Dependencies",name:"Dependency Name",version:"Dependency Version",install:"Install Dependencies",installing:"Installing",installed:"Installed",prebuild:"Prebuild",prebuildSize:"Prebuild Size",clearPrebuild:"Clear Prebuild",batchSetting:"Batch Setting",dependencies:"dependencies",devDependencies:"devDependencies",match:{auto:"Auto",onlyInstall:"Install Only",majorVersion:"Major Version",minorVersion:"Major + Minor",exactVersion:"Exact Match"},matchDesc:{auto:"No version restriction, render with current environment",onlyInstall:"No version restriction, only requires installation",majorVersion:"Major version match (e.g. 2.x)",minorVersion:"Major and minor version match (e.g. 2.7.x)",exactVersion:"Exact version match (e.g. 2.7.14)"}},zU={title:"Settings",previewRule:"Preview Rule",other:"Other Settings",theme:"Theme",language:"Language",darkMode:"Dark Mode",lightMode:"Light Mode"},BU={title:"Version Update",current:"Current Version",latest:"Latest Version",check:"Check for Updates",upgrading:"Updating",upgraded:"Updated",publish:"Publish Update",record:"Update Record",log:"Changelog",hasUpdate:"Update Available",betaVersion:"Beta",noUpdate:"No updates available",updateMethod:"Update Method",openTerminalAndRun:"Open terminal and run:",cannotIgnoreUpdate:"This update cannot be ignored"},VU={systemRecommended:"System Recommended",all:"All",latest:"Latest",hottest:"Hottest"},HU={submit:"Submit"},qU={empty:"Cannot be empty",notString:"Must be a string type, current type: {type}",contentEmpty:"Content cannot be empty",startsWithNumber:'Content cannot start with a number, currently starts with "{char}"',invalidCharBacktick:"Content contains backtick (Markdown syntax marker), only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharNewline:"Content contains newline character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharCarriageReturn:"Content contains carriage return, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharTab:"Content contains tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharFormFeed:"Content contains form feed character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharVerticalTab:"Content contains vertical tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHash:"Content contains # character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHtmlSpecial:'Content contains HTML special character "{char}", only hyphen(-), underscore(_), parentheses(), and spaces are allowed',invalidCharUnknown:'Content contains invalid character "{char}" (Unicode: U+{code}), only hyphen(-), underscore(_), parentheses(), and spaces are allowed'},WU={openInEditor:"Open in Editor",current:"Current",noRegistered:"No registered projects",deregisterTitle:"Deregister Project",deregisterConfirm:"Are you sure you want to deregister project {hash} ({cwd})?",deregisterSuccess:"Deregistered project {hash}",deregisterFailed:"Deregister failed"},YU={myCommentsTitle:"My Comments",tabReceived:"Received",tabMyDiscussions:"My Discussions",noMyCompsComments:"No comments yet",noReceivedComments:"No comments received",noMyDiscussions:"No discussions yet",new:"New",rating:"Rating",ratingSuccess:"Rating submitted",ratingCancelSuccess:"Rating removed",ratingError:"Failed to rate, please try again",ratingDialogDesc:"Accurate ratings help components get more exposure",ratingThanks:"Thank you for your rating! Feel free to leave a comment below.",writePlaceholder:"Write a comment...",loginPlaceholder:"Please login to comment",post:"Post Comment",allComments:"All Comments",empty:"No comments yet. Be the first to comment!",loadError:"Failed to load comments",postSuccess:"Comment posted successfully",postError:"Failed to post comment, please try again",anonymous:"Anonymous",self:"Me",cancelReply:"Cancel Reply",reply:"Reply",replyTo:"Reply to {'@'}{name}...",replySuccess:"Reply posted successfully",replyError:"Failed to reply, please try again",expandReplies:"Expand {count} replies",collapseReplies:"Collapse replies",deleteConfirm:"Are you sure you want to delete this comment? This action cannot be undone.",deleteTitle:"Confirm Delete",deleteSuccess:"Deleted successfully",deleteError:"Failed to delete, please try again",viewAllReplies:"View all {count} replies",time:{justNow:"just now",minutesAgo:"{n} minutes ago",hoursAgo:"{n} hours ago",daysAgo:"{n} days ago"}},KU={common:RU,comp:PU,team:IU,user:MU,file:DU,message:FU,route:LU,markdown:jU,terminal:UU,deps:NU,setting:zU,upgrade:BU,tag:VU,formCreate:HU,validateHash:qU,project:WU,comment:YU},GU={zh:AU,en:KU},QU=localStorage.getItem(mM.LOCALE_KEY)||"zh",cE=JR({locale:QU,messages:GU,legacy:!1});function dE(e){e.use(cE)}const Qh=Object.freeze(Object.defineProperty({__proto__:null,i18n:cE,setup:dE},Symbol.toStringTag,{value:"Module"}));function XU({store:e}){e.$subscribe((...t)=>{const[n]=t;if(n.type==="direct")throw new Error("不允许直接修改store,建议使用action修改")})}const Bp=ZR();function fE(e){Bp.use(XU),e.use(Bp)}const JU=Object.freeze(Object.defineProperty({__proto__:null,pinia:Bp,setup:fE},Symbol.toStringTag,{value:"Module"}));function ZU(e){e.directive("loading",$w)}function eN(e){e.component("Icon",lL)}const{i18n:vu}=Qh,{pinia:If}=JU,Is=Eo("userStore",{state:()=>({userInfo:{},logoutDialogOpen:!1}),getters:{userId:e=>e.userInfo._id,displayName(e){return e.userInfo.nickname||e.userInfo.account||vu.global.t("user.notLoggedIn")},avatar:e=>e.userInfo.avatar,avatarStr(e){return e.userInfo.nickname?.[0]||e.userInfo.account?.[0]||""}},actions:{updateAvatar(e){this.$patch(t=>{t.userInfo&&(t.userInfo.avatar=e)})},updateNickname(e){this.$patch(t=>{t.userInfo&&(t.userInfo.nickname=e)})},setLogoutDialogOpen(e){this.$patch(t=>{t.logoutDialogOpen=e})},setUserInfo(e){this.$patch(t=>{t.userInfo=e})},login(e){return zs.v1User.usercontrollerLogin({...e})},async fetchWhoAmI(){const e=await zs.v1User.usercontrollerWhoami();e.data&&this.setUserInfo(e.data)},logout(){Bs.push("/login?type=logout").then(e=>{e||(this.clearLocalStorage(),this.resetAll(),this.$reset())})},resetAll(){const e=tl(),t=cU(),n=dU(),r=Gh(),i=fU();e?.$reset(),t?.$reset(),n?.$reset(),r?.$reset(),i?.$reset(),this.clearTeamHomeStores(),this.clearCompListStores(),this.clearCompEditStore()},clearLocalStorage(){TD(),$D()},clearTeamHomeStores(){for(const[e,t]of If._s.entries())e.startsWith("teamHome")&&t.$reset()},clearCompListStores(){for(const[e,t]of If._s.entries())e.startsWith("compList")&&t.$reset()},clearCompEditStore(){for(const[e,t]of If._s.entries())e.startsWith("compEdit")&&t.$reset()},isRealUserLogin(){const e=Object.keys(this.userInfo),t=sc();return e.length>0&&t!==null},isAccessTokenExist(){return sc()!==null},logoutDialog(){if(this.logoutDialogOpen)return;this.setLogoutDialogOpen(!0);const e={confirmButtonText:vu.global.t("user.goLogin"),showClose:!0,callback:t=>{this.setLogoutDialogOpen(!1),t==="confirm"&&this.logout()}};mP.alert(vu.global.t("message.loginRequired"),vu.global.t("common.info"),e)}}}),tN=ze({__name:"SubMenu",props:{route:{},basePath:{}},setup(e){const{getTitle:t}=Hh(),n=e,r=Is(),i=(d,f="")=>s4.resolve(d,f),o=se(()=>i(n.basePath||"",n.route.path)),s=se(()=>(n.route.children||[]).some(d=>!d.meta?.hidden)),l=se(()=>{const{children:d=[]}=n.route;return d.length===0||d.length===1&&!d[0]?.children?.length}),u=se(()=>{const{children:d=[],meta:f={}}=n.route;return f?.hidden?!1:r.isRealUserLogin()||d.length>0?!0:!r.isAccessTokenExist()&&n.route.meta?.noAuth});return(d,f)=>{const p=ft("SubMenu",!0),v=Ma,y=vP;return u.value?(C(),R(We,{key:0},[e.route.meta?.hideParent&&s.value?(C(!0),R(We,{key:0},ct(e.route.children,g=>(C(),Ee(p,{key:i(o.value,g.path),route:g,"base-path":i(o.value,g.path)},null,8,["route","base-path"]))),128)):(C(),R(We,{key:1},[l.value?(C(),Ee(l4,{key:0,route:e.route,"full-path":o.value},null,8,["route","full-path"])):(C(),Ee(y,{key:1,index:o.value},{title:Le(()=>[Z(v,null,{default:Le(()=>[(C(),Ee(Pn(e.route?.meta?.icon)))]),_:1}),_("span",null,q(w(t)(e.route?.meta?.title)),1)]),default:Le(()=>[(C(!0),R(We,null,ct(e.route.children,g=>(C(),Ee(p,{key:i(o.value,g.path),route:g,"base-path":i(o.value,g.path)},null,8,["route","base-path"]))),128))]),_:1},8,["index"]))],64))],64)):Se("",!0)}}}),nN=ze({__name:"index",setup(e){const t=Gh(),n=Sc(),r=Ph(),i=se(()=>n.options.routes),o=se(()=>r.path);return(s,l)=>{const u=gP;return C(),Ee(u,{class:"dark:!bg-gray-800 border-t border-gray-200 dark:border-gray-700",collapse:w(t).collapse,"default-active":o.value},{default:Le(()=>[(C(!0),R(We,null,ct(i.value,d=>(C(),R(We,null,[d?.meta?.hidden?Se("",!0):(C(),Ee(tN,{key:d.path,basePath:d.path,route:d},null,8,["basePath","route"]))],64))),256))]),_:1},8,["collapse","default-active"])}}}),rN={class:"flex gap-[20px] items-center pl-[10px] pr-[10px]"},iN=["title"],oN=["title"],sN=["title"],aN={class:"flex items-center gap-[10px]"},lN=ze({__name:"index",setup(e){const{t}=Ja(),n=tl(),r=Sc(),i=Ph(),o=Ls(p1,10),s=re(n.maxCache),l=()=>{r.back()},u=()=>{r.replace({path:i.path,query:{...i.query,[Rn.ROUTE_STATE_KEY_VERSION]:Date.now()}})};function d(f){f&&n.setMaxCache(f)}return zn(()=>{o.value=n.maxCache}),(f,p)=>{const v=ft("Icon"),y=Rp,g=Ap;return C(),R("div",rN,[_("span",{title:w(t)("common.back")},[Z(v,{icon:"material-symbols:arrow-back-rounded",class:"cursor-pointer",onClick:l})],8,iN),_("span",{title:w(t)("common.refresh")},[Z(v,{icon:"material-symbols:refresh-rounded",class:"cursor-pointer",onClick:u})],8,oN),Z(g,{placement:"bottom",trigger:"hover",width:"auto"},{reference:Le(()=>[_("span",{title:w(t)("common.moreOperations")},[Z(v,{icon:"material-symbols:article-outline",class:"cursor-pointer"})],8,sN)]),default:Le(()=>[_("div",aN,[_("div",null,q(w(t)("common.maxTagCount"))+":",1),_("div",null,[Z(y,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=m=>s.value=m),min:1,style:{width:"90px"},"controls-position":"right",onChange:d},null,8,["modelValue"])])])]),_:1})])}}}),uN={class:"flex dark:bg-gray-800 py-[2px] h-[40px] border border-gray-200 dark:border-gray-700"},cN=ze({__name:"index",setup(e){const{t}=Ja(),n=Sc(),r=Ph(),i=tl(),{getTitle:o}=Hh();He(()=>r,()=>{i.addView(r)},{immediate:!0,deep:!0});const s=se(()=>i.visitedViews),l=se(()=>s.value.length===1);function u(v){const y=d(v);i.delViewAndJumpToPrev(v.path,y,n)}function d(v){return v.path===r.path}function f(v){n.push(v)}function p(v){const y=v?.meta?.title||t("route.unknownTag"),g=i.getPayLoad(v.path);return o(g?.name||y)}return(v,y)=>{const g=ft("Icon"),m=Ma,b=Ps,x=_P;return C(),R("div",uN,[Z(lN),Z(w(uF),{class:"flex-1 overflow-hidden",list:s.value,getKey:S=>S.path},{display:Le(({visibleList:S,overflow:O})=>[Z(eP,{tag:"ul",name:"fade",class:"flex gap-[5px] p-[2px] items-center"},{default:Le(()=>[(C(!0),R(We,null,ct(S,T=>(C(),R("div",{key:T.path},[Z(b,{type:d(T)?"primary":"default",onClick:A=>f(T)},{default:Le(()=>[Et(q(p(T))+" ",1),l.value?Se("",!0):(C(),Ee(m,{key:0,style:{"font-size":"16px"},class:"ml-[5px]",onClick:ht(A=>u(T),["stop"])},{default:Le(()=>[Z(g,{icon:"material-symbols:close"})]),_:1},8,["onClick"]))]),_:2},1032,["type","onClick"])]))),128)),O>0?(C(),Ee(x,{key:0,type:"info"},{default:Le(()=>[Et("+"+q(O)+" "+q(w(t)("common.more")),1)]),_:2},1024)):Se("",!0)]),_:2},1024)]),measure:Le(({item:S})=>[Z(b,{type:"primary"},{default:Le(()=>[Et(q(p(S))+" ",1),l.value?Se("",!0):(C(),Ee(m,{key:0,style:{"font-size":"16px"},class:"ml-[5px]"},{default:Le(()=>[Z(g,{icon:"material-symbols:close"})]),_:1}))]),_:2},1024)]),_:1},8,["list","getKey"])])}}}),dN=Lh(cN,[["__scopeId","data-v-72cc4b44"]]),fN={class:"size-full overflow-hidden"},pN={class:"h-[60px] dark:bg-gray-800"},hN={class:"size-full overflow-hidden flex flex-col dark:bg-gray-800"},mN={class:"dark:bg-gray-800"},vN={class:"size-full flex flex-col"},gN={class:""},_N={class:"flex-1 overflow-auto"},yN=ze({__name:"index",setup(e){const t=Jr(()=>Rt(()=>import("./index-R79ZeMZV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),n=Jr(()=>Rt(()=>import("./index-BNYhon33.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,14,15,16,17,18,19,20,6]),import.meta.url)),r=re(68),i=re(200),o=re(60),s=re(""),l=re(""),u=se(()=>s.value?"transition-width duration-400":""),d=se(()=>l.value?"transition-height duration-300":""),f=se(()=>({class:d.value,size:y.value,collapsible:!0,resizable:!1})),p=se(()=>({class:u.value,min:r.value,max:300,collapsible:!0})),v=Ls(RD,r.value),y=Ls(PD,o.value),g=Gh(),m=Is(),b=async(O,T)=>{s.value=T,T==="end"&&v.value===0?(v.value=i.value,window?.umami?.track(fy.SIDEBAR_TOGGLE,{state:"expanded"})):T==="start"&&window?.umami?.track(fy.SIDEBAR_TOGGLE,{state:"collapsed"})},x=(O,T)=>{l.value=T,T==="start"?y.value=0:T==="end"&&(y.value=o.value)},S=O=>{O==="header"?l.value="":O==="side"&&(s.value="")};return zn(()=>{g.setSideBarCollapse(v.value===r.value)}),(O,T)=>{const A=yP,M=wP,z=bP;return C(),R("div",fN,[Z(z,{layout:"vertical",onCollapse:x},{default:Le(()=>[Z(A,Ot({class:"!overflow-hidden transform-gpu isolate will-change-height"},f.value,{onTransitionend:T[0]||(T[0]=Y=>S("header")),onWebkitTransitionEnd:T[1]||(T[1]=Y=>S("header"))}),{default:Le(()=>[_("div",pN,[Z(w(n))])]),_:1},16),Z(A,{class:Be(["transform-gpu isolate",d.value])},{default:Le(()=>[Z(z,{onCollapse:b},{default:Le(()=>[Z(A,Ot(p.value,{size:w(v),"onUpdate:size":T[2]||(T[2]=Y=>Za(v)?v.value=Y:null),class:"transform-gpu isolate will-change-width",onTransitionend:T[3]||(T[3]=Y=>S("side")),onWebkitTransitionEnd:T[4]||(T[4]=Y=>S("side"))}),{default:Le(()=>[_("div",hN,[Z(nN),w(m).isRealUserLogin()?(C(),R(We,{key:0},[_("div",mN,[Z(M)]),Z(w(t))],64)):Se("",!0)])]),_:1},16,["size"]),Z(A,{class:Be(["transform-gpu isolate !overflow-hidden",u.value])},{default:Le(()=>[_("div",vN,[_("div",gN,[Z(dN)]),_("div",_N,[(C(),Ee(Ih,null,{default:Le(()=>[Z(r4)]),_:1}))])])]),_:1},8,["class"])]),_:1})]),_:1},8,["class"])]),_:1})])}}});let Bs;function bN(){const e=window.__GLOBAL_CONFIG__?.projectHash,t=e?`/${e}/main/`:`/${Rn.WEBSITE_PATH_MAIN}/`;return Bs=tP({history:nP(t),routes:[{path:"/login",name:"login",component:()=>Rt(()=>import("./index-B-o-geOz.js"),__vite__mapDeps([21,1,2,13,14,16,17,22,23,3,24,25,26,20]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.login"}},{path:"/github-callback",name:"githubCallback",component:()=>Rt(()=>import("./GithubCallback-BjmPqH_L.js"),__vite__mapDeps([27,1,2,24]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.githubCallback"}},{path:"/upgrade",name:"upgrade",component:()=>Rt(()=>import("./index-C9BP4kWZ.js"),__vite__mapDeps([28,1,2,29,25,16,17,7,30]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.upgrade"}},{path:"/previewBlank/:compId/:version?",name:"previewBlank",component:()=>Rt(()=>import("./index-CxHPM7Fg.js"),__vite__mapDeps([31,2,32,33,1,34,4]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.preview"}},{path:"/previewLocalBlank/:compId",name:"previewLocalBlank",component:()=>Rt(()=>import("./index-DpYJK6hB.js"),__vite__mapDeps([35,2,36,37,1,15,34,4]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.previewLocal"}},{path:"/similarPreview/:compId",name:"similarPreview",component:()=>Rt(()=>import("./index-C1Hw6vXQ.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.similarPreview"}},{path:"/",component:yN,redirect:"/share",meta:{hideParent:!0},children:[{path:"/share",name:"share",meta:{title:"route.share",icon:Jr(()=>Rt(()=>import("./home-rounded-DcB333c-.js"),__vite__mapDeps([54,18,2,55]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-BhaaT_GF.js"),__vite__mapDeps([56,1,2,45,32,36,11,15,46,5,47,6,20,4,34,57]),import.meta.url)},{path:"/mine",name:"mine",meta:{title:"route.mine",icon:Jr(()=>Rt(()=>import("./supervised-user-circle-B5yCz5Oo.js"),__vite__mapDeps([58,18,2,59]),import.meta.url))},component:()=>Rt(()=>import("./index-kE41pQo6.js"),__vite__mapDeps([60,1,2,45,32,36,11,15,46,5,47,6,20,4,34,61,62,63,29,49,52,64,65,3,66,7,67,57]),import.meta.url)},{path:"/collect",name:"collect",meta:{title:"route.collect",icon:Jr(()=>Rt(()=>import("./kid-star-0b7jegzF.js"),__vite__mapDeps([68,18,2,69]),import.meta.url))},component:()=>Rt(()=>import("./index-CytdBEyB.js"),__vite__mapDeps([70,1,2,45,32,36,11,15,46,5,47,6,20,4,34,57]),import.meta.url)},{path:"/myComments",name:"myComments",meta:{title:"route.myComments",hidden:!0},component:()=>Rt(()=>import("./index-Dnz1UQnr.js"),__vite__mapDeps([71,1,2,9,10,11,12,51,52,64,65,7,20]),import.meta.url)},{path:"/local",name:"local",meta:{title:"route.local",icon:Jr(()=>Rt(()=>import("./sync-saved-locally-rounded-BX8GcRCO.js"),__vite__mapDeps([72,18,2,73]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-CPc1AP3H.js"),__vite__mapDeps([74,1,2,45,32,36,11,15,46,5,47,6,20,4,34]),import.meta.url)},{path:"/upload",name:"upload",meta:{title:"route.upload",icon:Jr(()=>Rt(()=>import("./cloud-upload-DVf0ki5J.js"),__vite__mapDeps([75,18,2,76]),import.meta.url)),noAuth:!0,hidden:!0},component:()=>Rt(()=>import("./index-DVxz8FkV.js"),__vite__mapDeps([77,1,2,62,32,4,63,34,29,49,5,15,46,47,6,20,52,64,65,3,66,7,44,78,30]),import.meta.url)},{path:"/uploadTeam/:teamId",name:"uploadTeam",meta:{title:"route.uploadTeam",hidden:!0},component:()=>Rt(()=>import("./index-DVxz8FkV.js"),__vite__mapDeps([77,1,2,62,32,4,63,34,29,49,5,15,46,47,6,20,52,64,65,3,66,7,44,78,30]),import.meta.url)},{path:"/userInfo",name:"userInfo",meta:{title:"route.userInfo",hidden:!0},component:()=>Rt(()=>import("./index-BWSpWNwa.js"),__vite__mapDeps([79,1,2,23,3,5,22,80,10,11,12,81,7]),import.meta.url)},{path:"/preview/:compId",name:"preview",meta:{title:"route.preview",noAuth:!0,hidden:!0},component:()=>Rt(()=>import("./index-C1Hw6vXQ.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url)},{path:"/previewLocal/:compId",meta:{title:"route.previewLocal",hidden:!0,noAuth:!0},component:()=>Rt(()=>import("./index-Cv6z_Edq.js"),__vite__mapDeps([82,1,2,36,48,24,45,32,11,15,46,5,47,6,20,4,34,29,49,50,7,37]),import.meta.url)},{path:"/previewTeam/:teamId/:compId",meta:{title:"route.previewTeam",noAuth:!0,hidden:!0},props:{isTeamPreview:!0},component:()=>Rt(()=>import("./index-C1Hw6vXQ.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url)},{path:"/terminal",name:"terminal",meta:{title:"route.terminal",icon:Jr(()=>Rt(()=>import("./terminal-DXqN9Hoj.js"),__vite__mapDeps([83,18,2,84]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-DQfTUb4g.js"),__vite__mapDeps([85,41,2,42,1,43]),import.meta.url)},{path:"/setting",name:"setting",meta:{title:"route.setting",icon:Jr(()=>Rt(()=>import("./settings-DpNeh4hy.js"),__vite__mapDeps([86,18,2,87]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-BqUqA7W4.js"),__vite__mapDeps([88,1,2,52,89,7]),import.meta.url)},{path:"/team/:teamId",name:"team",meta:{title:"route.team",hidden:!0},component:()=>Rt(()=>import("./index-C42i82mF.js"),__vite__mapDeps([90,1,2,39,40,10,11,12,45,32,36,15,46,5,47,6,20,4,34,3,57,18,52,91,7]),import.meta.url)}]},{path:"/:pathMatch(.*)*",name:"404",meta:{hidden:!0,noAuth:!0,title:"route.404"},component:()=>Rt(()=>import("./index-CiPfzZM4.js"),__vite__mapDeps([92,2]),import.meta.url)}]}),Bs}function wN(e){bN(),e.use(Bs)}const EN=re([]);function SN(e){const t=Mh(YL,{errors:EN.value}),n=document.createElement("div");n.id="error-container",t.mount(n),document.body.appendChild(n)}var Wu={exports:{}},CN=Wu.exports,Xy;function xN(){return Xy||(Xy=1,(function(e,t){(function(n,r){e.exports=r()})(CN,function(){function n(_e){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(_e)}function r(_e,ue){if(!(_e instanceof ue))throw new TypeError("Cannot call a class as a function")}function i(_e,ue){for(var ye=0;ye<ue.length;ye++){var Fe=ue[ye];Fe.enumerable=Fe.enumerable||!1,Fe.configurable=!0,"value"in Fe&&(Fe.writable=!0),Object.defineProperty(_e,Fe.key,Fe)}}function o(_e,ue,ye){ue&&i(_e.prototype,ue),ye&&i(_e,ye),Object.defineProperty(_e,"prototype",{writable:!1})}function s(_e,ue,ye){ue in _e?Object.defineProperty(_e,ue,{value:ye,enumerable:!0,configurable:!0,writable:!0}):_e[ue]=ye}function l(_e,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");_e.prototype=Object.create(ue&&ue.prototype,{constructor:{value:_e,writable:!0,configurable:!0}}),Object.defineProperty(_e,"prototype",{writable:!1}),ue&&d(_e,ue)}function u(_e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ue){return ue.__proto__||Object.getPrototypeOf(ue)})(_e)}function d(_e,ue){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ye,Fe){return ye.__proto__=Fe,ye})(_e,ue)}function f(_e,ue){if(ue&&(typeof ue=="object"||typeof ue=="function"))return ue;if(ue!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(ue=_e,ue===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ue}function p(_e){var ue=(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}})();return function(){var ye,Fe=u(_e);return f(this,ue?(ye=u(this).constructor,Reflect.construct(Fe,arguments,ye)):Fe.apply(this,arguments))}}function v(_e,ue){(ue==null||ue>_e.length)&&(ue=_e.length);for(var ye=0,Fe=new Array(ue);ye<ue;ye++)Fe[ye]=_e[ye];return Fe}function y(_e,ue){var ye,Fe=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(!Fe){if(Array.isArray(_e)||(Fe=(function(be,ke){if(be){if(typeof be=="string")return v(be,ke);var Ie=Object.prototype.toString.call(be).slice(8,-1);return(Ie=Ie==="Object"&&be.constructor?be.constructor.name:Ie)==="Map"||Ie==="Set"?Array.from(be):Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie)?v(be,ke):void 0}})(_e))||ue&&_e&&typeof _e.length=="number")return Fe&&(_e=Fe),ye=0,{s:ue=function(){},n:function(){return ye>=_e.length?{done:!0}:{done:!1,value:_e[ye++]}},e:function(be){throw be},f:ue};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
31
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qe,xe=!0,et=!1;return{s:function(){Fe=Fe.call(_e)},n:function(){var be=Fe.next();return xe=be.done,be},e:function(be){et=!0,qe=be},f:function(){try{xe||Fe.return==null||Fe.return()}finally{if(et)throw qe}}}}function g(){if(m.url)window.location.href=m.url;else if(m.rewriteHTML)try{document.documentElement.innerHTML=m.rewriteHTML}catch{document.documentElement.innerText=m.rewriteHTML}else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(_e){console.log(_e)}setTimeout(function(){window.location.href=m.timeOutUrl||"https://theajack.github.io/disable-devtool/404.html?h=".concat(encodeURIComponent(location.host))},500)}}var m={md5:"",ondevtoolopen:g,ondevtoolclose:null,url:"",timeOutUrl:"",tkName:"ddtk",interval:500,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:[1,3,4,5,6,7],clearLog:!0,disableSelect:!1,disableInputSelect:!1,disableCopy:!1,disableCut:!1,disablePaste:!1,ignore:null,disableIframeParents:!0,seo:!0,rewriteHTML:""},b=["detectors","ondevtoolclose","ignore"];function x(_e){var ue,ye=0<arguments.length&&_e!==void 0?_e:{};for(ue in ye.onDevtoolOpen&&(ye.ondevtoolopen=ye.onDevtoolOpen),ye.onDevtoolClose&&(ye.ondevtoolclose=ye.onDevtoolClose),m){var Fe=ue;ye[Fe]===void 0||n(m[Fe])!==n(ye[Fe])&&b.indexOf(Fe)===-1||(m[Fe]=ye[Fe])}typeof m.ondevtoolclose=="function"&&m.clearIntervalWhenDevOpenTrigger===!0&&(m.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}function S(){return new Date().getTime()}function O(_e){var ue=S();return _e(),S()-ue}function T(_e,ue){function ye(et){return function(){_e&&_e();var be=et.apply(void 0,arguments);return ue&&ue(),be}}var Fe=window.alert,qe=window.confirm,xe=window.prompt;try{window.alert=ye(Fe),window.confirm=ye(qe),window.prompt=ye(xe)}catch{}}var A,M,z,Y={iframe:!1,pc:!1,qqBrowser:!1,firefox:!1,macos:!1,edge:!1,oldEdge:!1,ie:!1,iosChrome:!1,iosEdge:!1,chrome:!1,seoBot:!1,mobile:!1};function ve(){function _e(kn){return ue.indexOf(kn)!==-1}var ue=navigator.userAgent.toLowerCase(),ye=(function(){var dn=navigator,kn=dn.platform,dn=dn.maxTouchPoints;if(typeof dn=="number")return 1<dn;if(typeof kn=="string"){if(dn=kn.toLowerCase(),/(mac|win)/i.test(dn))return!1;if(/(android|iphone|ipad|ipod|arch)/i.test(dn))return!0}return/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())})(),Fe=!!window.top&&window!==window.top,qe=!ye,xe=_e("qqbrowser"),et=_e("firefox"),be=_e("macintosh"),ke=_e("edge"),Ie=ke&&!_e("chrome"),Oe=Ie||_e("trident")||_e("msie"),Ue=_e("crios"),pr=_e("edgios"),Fn=_e("chrome")||Ue,qn=!ye&&/(googlebot|baiduspider|bingbot|applebot|petalbot|yandexbot|bytespider|chrome\-lighthouse|moto g power)/i.test(ue);Object.assign(Y,{iframe:Fe,pc:qe,qqBrowser:xe,firefox:et,macos:be,edge:ke,oldEdge:Ie,ie:Oe,iosChrome:Ue,iosEdge:pr,chrome:Fn,seoBot:qn,mobile:ye})}function W(){for(var _e=(function(){for(var Fe={},qe=0;qe<500;qe++)Fe["".concat(qe)]="".concat(qe);return Fe})(),ue=[],ye=0;ye<50;ye++)ue.push(_e);return ue}function X(){m.clearLog&&z()}var K="",L=!1;function D(){var _e=m.ignore;if(_e){if(typeof _e=="function")return _e();if(_e.length!==0){var ue=location.href;if(K===ue)return L;K=ue;var ye,Fe=!1,qe=y(_e);try{for(qe.s();!(ye=qe.n()).done;){var xe=ye.value;if(typeof xe=="string"){if(ue.indexOf(xe)!==-1){Fe=!0;break}}else if(xe.test(ue)){Fe=!0;break}}}catch(et){qe.e(et)}finally{qe.f()}return L=Fe}}}var ne=function(){return!1};function le(_e){var ue,ye,Fe=74,qe=73,xe=85,et=83,be=123,ke=Y.macos?function(Oe,Ue){return Oe.metaKey&&Oe.altKey&&(Ue===qe||Ue===Fe)}:function(Oe,Ue){return Oe.ctrlKey&&Oe.shiftKey&&(Ue===qe||Ue===Fe)},Ie=Y.macos?function(Oe,Ue){return Oe.metaKey&&Oe.altKey&&Ue===xe||Oe.metaKey&&Ue===et}:function(Oe,Ue){return Oe.ctrlKey&&(Ue===et||Ue===xe)};_e.addEventListener("keydown",function(Oe){var Ue=(Oe=Oe||_e.event).keyCode||Oe.which;if(Ue===be||ke(Oe,Ue)||Ie(Oe,Ue))return J(_e,Oe)},!0),ue=_e,m.disableMenu&&ue.addEventListener("contextmenu",function(Oe){if(Oe.pointerType!=="touch")return J(ue,Oe)}),ye=_e,(m.disableSelect||m.disableInputSelect)&&je(ye,"selectstart"),ye=_e,m.disableCopy&&je(ye,"copy"),ye=_e,m.disableCut&&je(ye,"cut"),ye=_e,m.disablePaste&&je(ye,"paste")}function je(_e,ue){_e.addEventListener(ue,function(ye){if(!(Fe=ye.target)||Fe.tagName!=="INPUT"&&Fe.tagName!=="TEXTAREA"&&((qe=Fe.getAttribute)==null?void 0:qe.call(Fe,"contenteditable"))!=="true"){if(m.disableSelect)return J(_e,ye)}else if(m.disableInputSelect)return J(_e,ye);var Fe,qe})}function J(_e,ue){if(!D()&&!ne())return(ue=ue||_e.event).returnValue=!1,ue.preventDefault(),!1}var j,de=!1,U={};function ee(_e){U[_e]=!1}function Q(){for(var _e in U)if(U[_e])return de=!0;return de=!1}(Ge=j=j||{})[Ge.Unknown=-1]="Unknown",Ge[Ge.RegToString=0]="RegToString",Ge[Ge.DefineId=1]="DefineId",Ge[Ge.Size=2]="Size",Ge[Ge.DateToString=3]="DateToString",Ge[Ge.FuncToString=4]="FuncToString",Ge[Ge.Debugger=5]="Debugger",Ge[Ge.Performance=6]="Performance",Ge[Ge.DebugLib=7]="DebugLib";var B=(function(){function _e(Fe){var ye=Fe.type,Fe=Fe.enabled,Fe=Fe===void 0||Fe;r(this,_e),this.type=j.Unknown,this.enabled=!0,this.type=ye,this.enabled=Fe,this.enabled&&(ye=this,F.push(ye),this.init())}return o(_e,[{key:"onDevToolOpen",value:function(){var ue;console.warn("You don't have permission to use DEVTOOL!【type = ".concat(this.type,"】")),m.clearIntervalWhenDevOpenTrigger&&ie(),window.clearTimeout(P),m.ondevtoolopen(this.type,g),ue=this.type,U[ue]=!0}},{key:"init",value:function(){}}]),_e})(),oe=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.DebugLib})}return o(ue,[{key:"init",value:function(){}},{key:"detect",value:function(){var ye;(((ye=(ye=window.eruda)==null?void 0:ye._devTools)==null?void 0:ye._isShow)===!0||window._vcOrigConsole&&window.document.querySelector("#__vconsole.vc-toggle"))&&this.onDevToolOpen()}}],[{key:"isUsing",value:function(){return!!window.eruda||!!window._vcOrigConsole}}]),ue})(),V=0,P=0,F=[],G=0;function N(_e){function ue(){Ie=!0}function ye(){Ie=!1}var Fe,qe,xe,et,be,ke,Ie=!1;function Oe(){(ke[et]===xe?qe:Fe)()}T(ue,ye),Fe=ye,qe=ue,(ke=document).hidden!==void 0?(xe="hidden",be="visibilitychange",et="visibilityState"):ke.mozHidden!==void 0?(xe="mozHidden",be="mozvisibilitychange",et="mozVisibilityState"):ke.msHidden!==void 0?(xe="msHidden",be="msvisibilitychange",et="msVisibilityState"):ke.webkitHidden!==void 0&&(xe="webkitHidden",be="webkitvisibilitychange",et="webkitVisibilityState"),ke.removeEventListener(be,Oe,!1),ke.addEventListener(be,Oe,!1),V=window.setInterval(function(){if(!(_e.isSuspend||Ie||D())){var Ue,pr,Fn=y(F);try{for(Fn.s();!(Ue=Fn.n()).done;){var qn=Ue.value;ee(qn.type),qn.detect(G++)}}catch(kn){Fn.e(kn)}finally{Fn.f()}X(),typeof m.ondevtoolclose=="function"&&(pr=de,!Q()&&pr&&m.ondevtoolclose())}},m.interval),P=setTimeout(function(){Y.pc||oe.isUsing()||ie()},m.stopIntervalTime)}function ie(){window.clearInterval(V)}var ge=8;function fe(_e){for(var ue=(function(xe,et){xe[et>>5]|=128<<et%32,xe[14+(et+64>>>9<<4)]=et;for(var be=1732584193,ke=-271733879,Ie=-1732584194,Oe=271733878,Ue=0;Ue<xe.length;Ue+=16){var pr=be,Fn=ke,qn=Ie,kn=Oe;be=Ce(be,ke,Ie,Oe,xe[Ue+0],7,-680876936),Oe=Ce(Oe,be,ke,Ie,xe[Ue+1],12,-389564586),Ie=Ce(Ie,Oe,be,ke,xe[Ue+2],17,606105819),ke=Ce(ke,Ie,Oe,be,xe[Ue+3],22,-1044525330),be=Ce(be,ke,Ie,Oe,xe[Ue+4],7,-176418897),Oe=Ce(Oe,be,ke,Ie,xe[Ue+5],12,1200080426),Ie=Ce(Ie,Oe,be,ke,xe[Ue+6],17,-1473231341),ke=Ce(ke,Ie,Oe,be,xe[Ue+7],22,-45705983),be=Ce(be,ke,Ie,Oe,xe[Ue+8],7,1770035416),Oe=Ce(Oe,be,ke,Ie,xe[Ue+9],12,-1958414417),Ie=Ce(Ie,Oe,be,ke,xe[Ue+10],17,-42063),ke=Ce(ke,Ie,Oe,be,xe[Ue+11],22,-1990404162),be=Ce(be,ke,Ie,Oe,xe[Ue+12],7,1804603682),Oe=Ce(Oe,be,ke,Ie,xe[Ue+13],12,-40341101),Ie=Ce(Ie,Oe,be,ke,xe[Ue+14],17,-1502002290),ke=Ce(ke,Ie,Oe,be,xe[Ue+15],22,1236535329),be=$e(be,ke,Ie,Oe,xe[Ue+1],5,-165796510),Oe=$e(Oe,be,ke,Ie,xe[Ue+6],9,-1069501632),Ie=$e(Ie,Oe,be,ke,xe[Ue+11],14,643717713),ke=$e(ke,Ie,Oe,be,xe[Ue+0],20,-373897302),be=$e(be,ke,Ie,Oe,xe[Ue+5],5,-701558691),Oe=$e(Oe,be,ke,Ie,xe[Ue+10],9,38016083),Ie=$e(Ie,Oe,be,ke,xe[Ue+15],14,-660478335),ke=$e(ke,Ie,Oe,be,xe[Ue+4],20,-405537848),be=$e(be,ke,Ie,Oe,xe[Ue+9],5,568446438),Oe=$e(Oe,be,ke,Ie,xe[Ue+14],9,-1019803690),Ie=$e(Ie,Oe,be,ke,xe[Ue+3],14,-187363961),ke=$e(ke,Ie,Oe,be,xe[Ue+8],20,1163531501),be=$e(be,ke,Ie,Oe,xe[Ue+13],5,-1444681467),Oe=$e(Oe,be,ke,Ie,xe[Ue+2],9,-51403784),Ie=$e(Ie,Oe,be,ke,xe[Ue+7],14,1735328473),ke=$e(ke,Ie,Oe,be,xe[Ue+12],20,-1926607734),be=Ke(be,ke,Ie,Oe,xe[Ue+5],4,-378558),Oe=Ke(Oe,be,ke,Ie,xe[Ue+8],11,-2022574463),Ie=Ke(Ie,Oe,be,ke,xe[Ue+11],16,1839030562),ke=Ke(ke,Ie,Oe,be,xe[Ue+14],23,-35309556),be=Ke(be,ke,Ie,Oe,xe[Ue+1],4,-1530992060),Oe=Ke(Oe,be,ke,Ie,xe[Ue+4],11,1272893353),Ie=Ke(Ie,Oe,be,ke,xe[Ue+7],16,-155497632),ke=Ke(ke,Ie,Oe,be,xe[Ue+10],23,-1094730640),be=Ke(be,ke,Ie,Oe,xe[Ue+13],4,681279174),Oe=Ke(Oe,be,ke,Ie,xe[Ue+0],11,-358537222),Ie=Ke(Ie,Oe,be,ke,xe[Ue+3],16,-722521979),ke=Ke(ke,Ie,Oe,be,xe[Ue+6],23,76029189),be=Ke(be,ke,Ie,Oe,xe[Ue+9],4,-640364487),Oe=Ke(Oe,be,ke,Ie,xe[Ue+12],11,-421815835),Ie=Ke(Ie,Oe,be,ke,xe[Ue+15],16,530742520),ke=Ke(ke,Ie,Oe,be,xe[Ue+2],23,-995338651),be=Ne(be,ke,Ie,Oe,xe[Ue+0],6,-198630844),Oe=Ne(Oe,be,ke,Ie,xe[Ue+7],10,1126891415),Ie=Ne(Ie,Oe,be,ke,xe[Ue+14],15,-1416354905),ke=Ne(ke,Ie,Oe,be,xe[Ue+5],21,-57434055),be=Ne(be,ke,Ie,Oe,xe[Ue+12],6,1700485571),Oe=Ne(Oe,be,ke,Ie,xe[Ue+3],10,-1894986606),Ie=Ne(Ie,Oe,be,ke,xe[Ue+10],15,-1051523),ke=Ne(ke,Ie,Oe,be,xe[Ue+1],21,-2054922799),be=Ne(be,ke,Ie,Oe,xe[Ue+8],6,1873313359),Oe=Ne(Oe,be,ke,Ie,xe[Ue+15],10,-30611744),Ie=Ne(Ie,Oe,be,ke,xe[Ue+6],15,-1560198380),ke=Ne(ke,Ie,Oe,be,xe[Ue+13],21,1309151649),be=Ne(be,ke,Ie,Oe,xe[Ue+4],6,-145523070),Oe=Ne(Oe,be,ke,Ie,xe[Ue+11],10,-1120210379),Ie=Ne(Ie,Oe,be,ke,xe[Ue+2],15,718787259),ke=Ne(ke,Ie,Oe,be,xe[Ue+9],21,-343485551),be=tt(be,pr),ke=tt(ke,Fn),Ie=tt(Ie,qn),Oe=tt(Oe,kn)}return Array(be,ke,Ie,Oe)})((function(xe){for(var et=Array(),be=(1<<ge)-1,ke=0;ke<xe.length*ge;ke+=ge)et[ke>>5]|=(xe.charCodeAt(ke/ge)&be)<<ke%32;return et})(_e),_e.length*ge),ye="0123456789abcdef",Fe="",qe=0;qe<4*ue.length;qe++)Fe+=ye.charAt(ue[qe>>2]>>qe%4*8+4&15)+ye.charAt(ue[qe>>2]>>qe%4*8&15);return Fe}function pe(_e,ue,ye,Fe,qe,xe){return tt((ue=tt(tt(ue,_e),tt(Fe,xe)))<<qe|ue>>>32-qe,ye)}function Ce(_e,ue,ye,Fe,qe,xe,et){return pe(ue&ye|~ue&Fe,_e,ue,qe,xe,et)}function $e(_e,ue,ye,Fe,qe,xe,et){return pe(ue&Fe|ye&~Fe,_e,ue,qe,xe,et)}function Ke(_e,ue,ye,Fe,qe,xe,et){return pe(ue^ye^Fe,_e,ue,qe,xe,et)}function Ne(_e,ue,ye,Fe,qe,xe,et){return pe(ye^(ue|~Fe),_e,ue,qe,xe,et)}function tt(_e,ue){var ye=(65535&_e)+(65535&ue);return(_e>>16)+(ue>>16)+(ye>>16)<<16|65535&ye}var Ge=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.RegToString,enabled:Y.qqBrowser||Y.firefox})}return o(ue,[{key:"init",value:function(){var ye=this;this.lastTime=0,this.reg=/./,A(this.reg),this.reg.toString=function(){var Fe;return Y.qqBrowser?(Fe=new Date().getTime(),ye.lastTime&&Fe-ye.lastTime<100?ye.onDevToolOpen():ye.lastTime=Fe):Y.firefox&&ye.onDevToolOpen(),""}}},{key:"detect",value:function(){A(this.reg)}}]),ue})(),Ze=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.DefineId})}return o(ue,[{key:"init",value:function(){var ye=this;this.div=document.createElement("div"),this.div.__defineGetter__("id",function(){ye.onDevToolOpen()}),Object.defineProperty(this.div,"id",{get:function(){ye.onDevToolOpen()}})}},{key:"detect",value:function(){A(this.div)}}]),ue})(),Pt=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.Size,enabled:!Y.iframe&&!Y.edge})}return o(ue,[{key:"init",value:function(){var ye=this;this.checkWindowSizeUneven(),window.addEventListener("resize",function(){setTimeout(function(){ye.checkWindowSizeUneven()},100)},!0)}},{key:"detect",value:function(){}},{key:"checkWindowSizeUneven",value:function(){var ye=(function(){if(St(window.devicePixelRatio))return window.devicePixelRatio;var qe=window.screen;return!!(St(qe)&&qe.deviceXDPI&&qe.logicalXDPI)&&qe.deviceXDPI/qe.logicalXDPI})();if(ye!==!1){var Fe=200<window.outerWidth-window.innerWidth*ye,ye=300<window.outerHeight-window.innerHeight*ye;if(Fe||ye)return this.onDevToolOpen(),!1;ee(this.type)}return!0}}]),ue})();function St(_e){return _e!=null}var Nt,It=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.DateToString,enabled:!Y.iosChrome&&!Y.iosEdge})}return o(ue,[{key:"init",value:function(){var ye=this;this.count=0,this.date=new Date,this.date.toString=function(){return ye.count++,""}}},{key:"detect",value:function(){this.count=0,A(this.date),X(),2<=this.count&&this.onDevToolOpen()}}]),ue})(),qt=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.FuncToString,enabled:!Y.iosChrome&&!Y.iosEdge})}return o(ue,[{key:"init",value:function(){var ye=this;this.count=0,this.func=function(){},this.func.toString=function(){return ye.count++,""}}},{key:"detect",value:function(){this.count=0,A(this.func),X(),2<=this.count&&this.onDevToolOpen()}}]),ue})(),Gt=(function(){l(ue,B);var _e=p(ue);function ue(){return r(this,ue),_e.call(this,{type:j.Debugger,enabled:Y.iosChrome||Y.iosEdge})}return o(ue,[{key:"detect",value:function(){var ye=S();100<S()-ye&&this.onDevToolOpen()}}]),ue})(),Wt=(function(){l(ue,B);var _e=p(ue);function ue(){var ye;return r(this,ue),(ye=_e.call(this,{type:j.Performance,enabled:Y.chrome||!Y.mobile})).count=0,ye}return o(ue,[{key:"init",value:function(){this.maxPrintTime=0,this.largeObjectArray=W()}},{key:"detect",value:function(){var ye=this,Fe=O(function(){M(ye.largeObjectArray)}),qe=O(function(){A(ye.largeObjectArray)});if(this.maxPrintTime=Math.max(this.maxPrintTime,qe),X(),Fe===0||this.maxPrintTime===0)return!1;Fe>10*this.maxPrintTime&&(2<=this.count?this.onDevToolOpen():(this.count++,this.detect()))}}]),ue})(),nn=(s(Nt={},j.RegToString,Ge),s(Nt,j.DefineId,Ze),s(Nt,j.Size,Pt),s(Nt,j.DateToString,It),s(Nt,j.FuncToString,qt),s(Nt,j.Debugger,Gt),s(Nt,j.Performance,Wt),s(Nt,j.DebugLib,oe),Nt),Dn=Object.assign(function(_e){function ue(){var et=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return{success:!et,reason:et}}var ye;if(Dn.isRunning)return ue("already running");if(ve(),ye=window.console||{log:function(){},table:function(){},clear:function(){}},z=Y.ie?(A=function(){return ye.log.apply(ye,arguments)},M=function(){return ye.table.apply(ye,arguments)},function(){return ye.clear()}):(A=ye.log,M=ye.table,ye.clear),x(_e),m.md5&&fe((function(et){var be=window.location.search,ke=window.location.hash;return(be=be===""&&ke!==""?"?".concat(ke.split("?")[1]):be)!==""&&be!==void 0&&(ke=new RegExp("(^|&)"+et+"=([^&]*)(&|$)","i"),et=be.substr(1).match(ke),et!=null)?unescape(et[2]):""})(m.tkName))===m.md5)return ue("token passed");if(m.seo&&Y.seoBot)return ue("seobot");Dn.isRunning=!0,N(Dn);var Fe=Dn,qe=(ne=function(){return Fe.isSuspend},window.top),xe=window.parent;if(le(window),m.disableIframeParents&&qe&&xe&&qe!==window){for(;xe!==qe;)le(xe),xe=xe.parent;le(qe)}return(m.detectors==="all"?Object.keys(nn):m.detectors).forEach(function(et){new nn[et]}),ue()},{isRunning:!1,isSuspend:!1,md5:fe,version:"0.3.9",DetectorType:j,isDevToolOpened:Q});return Ge=(function(){if(typeof window>"u"||!window.document)return null;var _e=document.querySelector("[disable-devtool-auto]");if(!_e)return null;var ue=["disable-menu","disable-select","disable-copy","disable-cut","disable-paste","clear-log"],ye=["interval"],Fe={};return["md5","url","tk-name","detectors"].concat(ue,ye).forEach(function(qe){var xe=_e.getAttribute(qe);xe!==null&&(ye.indexOf(qe)!==-1?xe=parseInt(xe):ue.indexOf(qe)!==-1?xe=xe!=="false":qe==="detector"&&xe!=="all"&&(xe=xe.split(" ")),Fe[(function(et){if(et.indexOf("-")===-1)return et;var be=!1;return et.split("").map(function(ke){return ke==="-"?(be=!0,""):be?(be=!1,ke.toUpperCase()):ke}).join("")})(qe)]=xe)}),Fe})(),Ge&&Dn(Ge),Dn})})(Wu)),Wu.exports}var TN=xN();const kN=ns(TN);function ON(){window.__GLOBAL_CONFIG__.allowDebug||kN({disableMenu:!1})}(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._fc-frame ._fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{cursor:not-allowed!important;color:#999}._fc-frame ._fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame ._fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-frame ._fc-upload-btn,._fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}._fc-group{display:flex;min-height:38px;justify-content:center;flex-direction:column;width:100%}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;border-radius:5px;margin:5px 5px 25px;padding:20px 20px 25px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}._fc-group._fc-group-card{display:flex;flex-direction:column;width:100%;gap:16px}._fc-group._fc-group-card._fc-group-disabled ._fc-group-btn,._fc-group._fc-group-card._fc-group-disabled ._fc-group-add{cursor:not-allowed;opacity:.5}._fc-group._fc-group-card ._fc-group-container{position:relative;background:#fff;border:1px solid #f0f0f0;border-radius:6px;overflow:hidden;display:flex;flex-direction:column;padding:0;margin:0}._fc-group._fc-group-card ._fc-group-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0;background:#fafafa}._fc-group._fc-group-card ._fc-group-idx{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#f0f0f0;color:#666;border-radius:6px;font-size:12px;font-weight:500;margin-right:12px;flex-shrink:0;position:static;border:1px solid #e0e0e0}._fc-group._fc-group-card ._fc-group-title{flex:1;font-size:14px;font-weight:500;color:#000000d9;line-height:1.5715}._fc-group._fc-group-card ._fc-group-handle{display:flex;align-items:center;gap:4px;margin-left:12px;flex-shrink:0;position:static;bottom:auto;right:auto;border-radius:0;border:none;padding:0;background-color:transparent;flex-direction:row}._fc-group._fc-group-card ._fc-group-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;border:1px solid #d9d9d9;background:#fff;color:#00000073;position:relative}._fc-group._fc-group-card ._fc-group-btn:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}._fc-group._fc-group-card ._fc-group-btn:active{color:#096dd9;border-color:#096dd9}._fc-group._fc-group-card ._fc-group-arrow{position:relative}._fc-group._fc-group-card ._fc-group-arrow:before{content:"";position:absolute;top:50%;left:50%;width:5px;height:5px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:translate(-50%,-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group._fc-group-card ._fc-group-sort{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:24px}._fc-group._fc-group-card ._fc-group-sort:before,._fc-group._fc-group-card ._fc-group-sort:after{content:"";position:absolute;left:50%;width:4px;height:4px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:translate(-50%)}._fc-group._fc-group-card ._fc-group-sort:before{top:6px;transform:translate(-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-sort:after{bottom:6px;transform:translate(-50%) rotate(225deg)}._fc-group._fc-group-card ._fc-group-sort-up,._fc-group._fc-group-card ._fc-group-sort-down{position:absolute;left:0;right:0;height:12px;cursor:pointer;z-index:1}._fc-group._fc-group-card ._fc-group-sort-up{top:0}._fc-group._fc-group-card ._fc-group-sort-down{bottom:0}._fc-group._fc-group-card ._fc-group-sort-up:hover,._fc-group._fc-group-card ._fc-group-sort-down:hover{background:#1890ff1a}._fc-group._fc-group-card ._fc-group-plus-minus{position:relative;background:#409eff;border-color:#409eff;color:#fff;width:24px;height:24px}._fc-group._fc-group-card ._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-plus-minus:before,._fc-group._fc-group-card ._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1px;background-color:currentColor;transform:translate(-50%,-50%)}._fc-group._fc-group-card ._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus{background:#f56c6c;border-color:#f56c6c}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:hover{background:#f78989;border-color:#f78989}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group._fc-group-card ._fc-group-content{padding:20px}._fc-group._fc-group-card ._fc-group-add{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;border:1px solid #d9d9d9;background:#fff;color:#00000073;position:relative}._fc-group._fc-group-card ._fc-group-add:hover{color:#409eff;border-color:#409eff;background:#f0f8ff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus{width:24px;height:24px;background:#409eff;border-color:#409eff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before,._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1px;background-color:currentColor;transform:translate(-50%,-50%)}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-empty{text-align:center;padding:40px 20px;color:#00000073;font-size:14px}@media (max-width: 768px){._fc-group._fc-group-card ._fc-group-container{margin:0 -8px;border-radius:0;border-left:none;border-right:none}._fc-group._fc-group-card ._fc-group-header{padding:12px 16px 8px}._fc-group._fc-group-card ._fc-group-content{padding:16px}._fc-group._fc-group-card ._fc-group-handle{gap:2px}._fc-group._fc-group-card ._fc-group-btn{width:22px;height:22px}}.form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left;float:unset}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();var $N=Object.defineProperty,AN=Object.defineProperties,RN=Object.getOwnPropertyDescriptors,Jy=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,IN=Object.prototype.propertyIsEnumerable,Zy=(e,t,n)=>t in e?$N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t)=>{for(var n in t||(t={}))PN.call(t,n)&&Zy(e,n,t[n]);if(Jy)for(var n of Jy(t))IN.call(t,n)&&Zy(e,n,t[n]);return e},Br=(e,t)=>AN(e,RN(t));function Xh(e,t){return Object.keys(e).reduce((n,r)=>((!t||t.indexOf(r)===-1)&&(n[r]=e[r]),n),{})}function er(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}const MN="fcCheckbox",DN=ze({name:MN,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,t){const n=En(e.formCreateInject,"options",[]),r=En(e,"options"),i=En(e,"modelValue"),o=En(e,"inputValue",""),s=re(o.value),l=En(e,"input",!1),u=p=>{const v=[...er(i.value)],y=v.indexOf(s.value);s.value=p,y>-1&&(v.splice(y,1),v.push(p),f(v))};He(o,p=>{if(!l.value){s.value=p;return}u(p)});const d=se(()=>{let p=n.value||[];return r.value&&(p=r.value||[]),Array.isArray(p)?p:[]});He(i,p=>{let v=null;if(!o.value&&p!=null&&Array.isArray(p)&&p.length>0&&l.value){const y=d.value.map(g=>g.value);p.forEach(g=>{y.indexOf(g)===-1&&(v=g)})}v!=null&&(s.value=v)},{immediate:!0});const f=p=>{t.emit("update:modelValue",p)};return{options:d,value:i,onInput:f,updateCustomValue:u,makeInput(p){if(l.value)return Z(p,{value:s.value||void 0,label:s.value||void 0},{default:()=>[Z(ft("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":u},null)]})}}},render(){const e=this.type==="button"?"ElCheckboxButton":"ElCheckbox",t=ft(e);return Z(ft("ElCheckboxGroup"),Ot(this.$attrs,{modelValue:this.value===null?void 0:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Xe({default:()=>{var n,r;return[this.options.map((i,o)=>{const s=Xe({},i),l=s.value,u=s.label;return delete s.value,delete s.label,Z(t,Ot(s,{label:l,value:l,key:e+o+"-"+l}),{default:()=>[u||l||""]})}),(r=(n=this.$slots).default)==null?void 0:r.call(n),this.makeInput(t)]}},Xh(this.$slots,["default"])))},mounted(){this.$emit("fc.el",this.$refs.el)}});function pE(e){e=e||new Map;const t={$on(n,r){const i=e.get(n);i&&i.push(r)||e.set(n,[r])},$once(n,r){r._once=!0,t.$on(n,r)},$off(n,r){const i=e.get(n);i&&i.splice(i.indexOf(r)>>>0,1)},$emit(n,...r){(e.get(n)||[]).slice().map(i=>{i._once&&(t.$off(n,i),delete i._once),i(...r)}),(e.get("*")||[]).slice().map(i=>{i(n,r)})}};return t}const So=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},FN={name:"IconCircleClose"},LN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function jN(e,t,n,r,i,o){return C(),R("svg",LN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"},null,-1),_("path",{fill:"currentColor",d:"M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"},null,-1)])])}const UN=So(FN,[["render",jN]]),NN={name:"IconDocument"},zN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function BN(e,t,n,r,i,o){return C(),R("svg",zN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,-1)])])}const VN=So(NN,[["render",BN]]),HN={name:"IconDelete"},qN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function WN(e,t,n,r,i,o){return C(),R("svg",qN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"},null,-1)])])}const YN=So(HN,[["render",WN]]),KN={name:"IconView"},GN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function QN(e,t,n,r,i,o){return C(),R("svg",GN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"},null,-1)])])}const XN=So(KN,[["render",QN]]),JN={name:"IconFolderOpened"},ZN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function ez(e,t,n,r,i,o){return C(),R("svg",ZN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"},null,-1)])])}const tz=So(JN,[["render",ez]]),nz="fcFrame",rz=ze({name:nz,props:{type:{type:String,default:"input"},field:String,helper:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},src:{type:String,required:!0},icon:{type:String,default:"IconFolderOpened"},width:{type:String,default:"500px"},height:{type:String,default:"370px"},maxLength:{type:Number,default:0},okBtnText:{type:String,default:""},closeBtnText:{type:String,default:""},modalTitle:String,handleIcon:{type:[String,Boolean],default:void 0},title:String,allowRemove:{type:Boolean,default:!0},onOpen:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}},onCancel:{type:Function,default:()=>{}},onLoad:{type:Function,default:()=>{}},onBeforeRemove:{type:Function,default:()=>{}},onRemove:{type:Function,default:()=>{}},onHandle:Function,modal:{type:Object,default:()=>({})},srcKey:[String,Number],modelValue:[Array,String,Number,Object],previewMask:void 0,footer:{type:Boolean,default:!0},reload:{type:Boolean,default:!0},closeBtn:{type:Boolean,default:!0},okBtn:{type:Boolean,default:!0},formCreateInject:Object},emits:["update:modelValue","change"],components:{IconFolderOpened:tz,IconView:XN},data(){return{fileList:er(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new pE}},watch:{modelValue(e){this.fileList=er(e)}},methods:{close(){this.closeModel(!0)},closeModel(e){this.bus.$emit(e?"$close":"$ok"),this.reload&&(this.bus.$off("$ok"),this.bus.$off("$close")),this.frameVisible=!1},handleCancel(){this.previewVisible=!1},showModel(){this.disabled||this.onOpen()===!1||(this.frameVisible=!0)},input(){const e=this.fileList,t=this.maxLength===1?e[0]||"":e;this.$emit("update:modelValue",t),this.$emit("change",t)},makeInput(){return Z(ft("ElInput"),Ot({type:"text",modelValue:this.fileList.map(e=>this.getSrc(e)).toString(),readonly:!0},{key:1}),{append:()=>Z(ft("ElButton"),{icon:ft(this.icon),onClick:()=>this.showModel()},null),suffix:()=>this.fileList.length&&!this.disabled?Z(ft("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:()=>{this.fileList=[],this.input()}},{default:()=>[Z(UN,null,null)]}):null})},makeGroup(e){return(!this.maxLength||this.fileList.length<this.maxLength)&&e.push(this.makeBtn()),Z("div",{key:2},[e])},makeItem(e,t){return Z("div",{class:"_fc-files",key:"3"+e},[t])},valid(e){const t=this.formCreateInject.field||this.field;if(t&&e!==t)throw new Error("[frame]无效的字段值")},makeIcons(e,t){if(this.handleIcon!==!1||this.allowRemove===!0){const n=[];return(this.type!=="file"&&this.handleIcon!==!1||this.type==="file"&&this.handleIcon)&&n.push(this.makeHandleIcon(e,t)),this.allowRemove&&n.push(this.makeRemoveIcon(e,t)),Z("div",{class:"_fc-upload-cover",key:4},[n])}},makeHandleIcon(e,t){const n=ft(this.handleIcon===!0||this.handleIcon===void 0?"icon-view":this.handleIcon);return Z(ft("ElIcon"),{onClick:()=>this.handleClick(e),key:"5"+t},{default:()=>[Z(n,null,null)]})},makeRemoveIcon(e,t){return Z(ft("ElIcon"),{onClick:()=>this.handleRemove(e),key:"6"+t},{default:()=>[Z(YN,null,null)]})},makeFiles(){return this.makeGroup(this.fileList.map((e,t)=>this.makeItem(t,[Z(ft("ElIcon"),{onClick:()=>this.handleClick(e)},{default:()=>[Z(VN,null,null)]}),this.makeIcons(e,t)])))},makeImages(){return this.makeGroup(this.fileList.map((e,t)=>this.makeItem(t,[Z("img",{src:this.getSrc(e)},null),this.makeIcons(e,t)])))},makeBtn(){const e=ft(this.icon);return Z("div",{class:"_fc-upload-btn",onClick:()=>this.showModel(),key:7},[Z(ft("ElIcon"),null,{default:()=>[Z(e,null,null)]})])},handleClick(e){if(this.onHandle)return this.onHandle(e);this.previewImage=this.getSrc(e),this.previewVisible=!0},handleRemove(e){this.disabled||this.onBeforeRemove(e)!==!1&&(this.fileList.splice(this.fileList.indexOf(e),1),this.input(),this.onRemove(e))},getSrc(e){return this.srcKey?e[this.srcKey]:e},frameLoad(e){this.onLoad(e);try{this.helper===!0&&(e.form_create_helper={api:this.formCreateInject.api,close:t=>{this.valid(t),this.closeModel()},set:(t,n)=>{this.valid(t),!this.disabled&&this.$emit("update:modelValue",n)},get:t=>(this.valid(t),this.modelValue),onOk:t=>this.bus.$on("$ok",t),onClose:t=>this.bus.$on("$close",t)})}catch(t){console.error(t)}},makeFooter(){const{okBtnText:e,closeBtnText:t,closeBtn:n,okBtn:r,footer:i}=this.$props;if(i)return Z("div",null,[n?Z(ft("ElButton"),{onClick:()=>this.onCancel()!==!1&&(this.frameVisible=!1)},{default:()=>[t||this.formCreateInject.t("close")||"关闭"]}):null,r?Z(ft("ElButton"),{type:"primary",onClick:()=>this.onOk()!==!1&&this.closeModel()},{default:()=>[e||this.formCreateInject.t("ok")||"确定"]}):null])}},render(){const e=this.type;let t;e==="input"?t=this.makeInput():e==="image"?t=this.makeImages():t=this.makeFiles();const{width:n="30%",height:r,src:i,title:o,modalTitle:s}=this.$props;return gt(()=>{this.$refs.frame&&this.frameLoad(this.$refs.frame.contentWindow||{})}),Z("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[t,Z(ft("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:s,modelValue:this.previewVisible,onClose:this.handleCancel},{default:()=>[Z("img",{style:"width: 100%",src:this.previewImage},null)]}),Z(ft("ElDialog"),Ot({appendToBody:!0},Xe({width:n,title:o},this.modal),{modelValue:this.frameVisible,onClose:()=>this.closeModel(!0)}),{default:()=>[this.frameVisible||!this.reload?Z("iframe",{ref:"frame",src:i,frameBorder:"0",style:{height:r,border:"0 none",width:"100%"}},null):null],footer:()=>this.makeFooter()})])},beforeMount(){const{name:e,field:t,api:n}=this.formCreateInject;e&&n.on("fc:closeModal:"+e,this.close),t&&n.on("fc:closeModal:"+t,this.close)},beforeUnmount(){const{name:e,field:t,api:n}=this.formCreateInject;e&&n.off("fc:closeModal:"+e,this.close),t&&n.off("fc:closeModal:"+t,this.close)}}),iz="fcRadio",oz=ze({name:iz,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,t){const n=En(e.formCreateInject,"options",[]),r=En(e,"options"),i=En(e,"modelValue"),o=En(e,"inputValue",""),s=re(o.value),l=En(e,"input",!1);He(o,p=>{if(!l.value){s.value=p;return}f(p)});const u=se(()=>{let p=n.value||[];return r.value&&(p=r.value||[]),Array.isArray(p)?p:[]});He(i,p=>{let v=!1;!o.value&&p!=null&&l.value&&(v=u.value.map(y=>y.value).indexOf(p)===-1),v&&(s.value=p)},{immediate:!0});const d=p=>{t.emit("update:modelValue",p)},f=p=>{const v=s.value;s.value=p,i.value===v&&d(p)};return{options:u,value:i,onInput:d,updateCustomValue:f,customValue:s,makeInput(p){if(l.value)return Z(p,{checked:!1,value:s.value||void 0,label:s.value||void 0},{default:()=>[Z(ft("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":f},null)]})}}},render(){const e=this.type==="button"?"ElRadioButton":"ElRadio",t=ft(e);return Z(ft("ElRadioGroup"),Ot(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Xe({default:()=>{var n,r;return[this.options.map((i,o)=>{const s=Xe({},i),l=s.value,u=s.label;return delete s.value,delete s.label,Z(t,Ot(s,{label:l,value:l,key:e+o+"-"+l}),{default:()=>[u||l||""]})}),(r=(n=this.$slots).default)==null?void 0:r.call(n),this.makeInput(t)]}},Xh(this.$slots,["default"])))},mounted(){this.$emit("fc.el",this.$refs.el)}}),Me={type(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef(e){return e==null},Element(e){return typeof e=="object"&&e!==null&&e.nodeType===1&&!Me.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){const t=this.getType(e);return t==="Function"||t==="AsyncFunction"},getType(e){const t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e}};["Date","Object","String","Boolean","Array","Number"].forEach(e=>{Me[e]=function(t){return Me.type(t,e)}});function Zt(e,t){return{}.hasOwnProperty.call(e,t)}const sz="fcSelect",az=ze({name:sz,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const n=En(e.formCreateInject,"options",[]),r=En(e,"modelValue");return{options:se(()=>Array.isArray(n.value)?n.value:[]),value:r,handleUpdate:i=>{t("update:modelValue",i)},hasProperty:Zt,is:Me}},mounted(){this.$emit("fc.el",this.$refs.el)}});function lz(e,t,n,r,i,o){const s=ft("el-option"),l=ft("el-option-group"),u=ft("el-select");return C(),Ee(u,Ot(e.$attrs,{"model-value":e.value,"onUpdate:modelValue":e.handleUpdate,ref:"el"}),{default:Le(()=>[(C(!0),R(We,null,ct(e.options,(d,f)=>(C(),R(We,null,[e.hasProperty(d,"options")?(C(),Ee(l,{label:d.label,key:`${f}-${d.label}`},{default:Le(()=>[(C(!0),R(We,null,ct(e.is.trueArray(d.options)?d.options:[],(p,v)=>(C(),Ee(s,Ot({key:`${v}-${p.value}`},{ref_for:!0},p),null,16))),128))]),_:2},1032,["label"])):(C(),Ee(s,Ot({key:`${f}-${d.value}`},{ref_for:!0},d),null,16))],64))),256)),mt(e.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"])}const uz=So(az,[["render",lz]]),cz="fcTree",dz=ze({name:cz,inheritAttrs:!1,formCreateParser:{mergeProp(e){const t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:()=>[]}},emits:["update:modelValue","fc.el"],watch:{modelValue(){this.setValue()}},methods:{updateValue(){if(!this.$refs.tree)return;let e;this.type==="selected"?e=this.$refs.tree.getCurrentKey():e=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e)},setValue(){this.$refs.tree&&(this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(er(this.modelValue)))}},render(){return Z(ft("ElTree"),Ot(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),fz={name:"IconUpload"},pz={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function hz(e,t,n,r,i,o){return C(),R("svg",pz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)])])}const mz=So(fz,[["render",hz]]);function eb(e,t){return typeof e=="object"?e:{url:e,is_string:!0,name:vz(e),uid:t}}function tb(e){return Br(Xe({},e),{file:e,value:e})}function vz(e){return(""+e).split("/").pop()}const gz="fcUpload",_z=ze({name:gz,inheritAttrs:!1,formCreateParser:{toFormValue(e){return er(e)},toValue(e,t){return t.prop.props.limit===1?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,httpRequest:Function,modalTitle:String,listType:String,uploadText:String,formCreateInject:Object,modelValue:[Array,String,Object]},emits:["update:modelValue","change","remove","fc.el"],data(){return{previewVisible:!1,previewImage:"",fileList:[]}},created(){this.fileList=er(this.modelValue).map(eb).map(tb)},watch:{modelValue(e){this.fileList=er(e).map(eb).map(tb)}},methods:{handlePreview(e){this.onPreview?this.onPreview(...arguments):this.listType==="text"?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update(e){let t=e.map(n=>n.is_string?n.url:n.value||n.url).filter(n=>n!==void 0);this.$emit("update:modelValue",t)},handleCancel(){this.previewVisible=!1},handleChange(e,t){this.$emit("change",...arguments),e.status==="success"&&this.update(t)},handleRemove(e,t){this.$emit("remove",...arguments),this.update(t)},doHttpRequest(e){if(this.httpRequest)return this.httpRequest(e);e.source="upload",this.formCreateInject.api.fetch(e)}},render(){const e=er(this.modelValue).length;return Z("div",{class:"_fc-upload"},[Z(ft("ElUpload"),Ot({key:e},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":this.$attrs.limit?this.$attrs.limit<=e:!1},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),Xe({default:()=>{var t,n;return[((n=(t=this.$slots).default)==null?void 0:n.call(t))||(["text","picture"].indexOf(this.listType)===-1?Z(ft("ElIcon"),null,{default:()=>[Z(mz,null,null)]}):Z(ft("ElButton"),{type:"primary"},{default:()=>[this.formCreateInject.t("clickToUpload")||this.uploadText||"点击上传"]}))]}},Xh(this.$slots,["default"]))),Z(ft("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:()=>[Z("img",{style:"width: 100%",src:this.previewImage},null)]})])},mounted(){this.$emit("fc.el",this.$refs.upload)}});function Fr(e,t,n){e[t]=n}function jo(e,t){delete e[t]}function al(e,t={},n){let r=!1;for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i)){let o=t[i];if((r=Array.isArray(o))||Me.Object(o)){let s=e[i]===void 0;if(r)r=!1,s&&Fr(e,i,[]);else if(o._clone&&n!==void 0)if(n)o=o.getRule(),s&&Fr(e,i,{});else{Fr(e,i,o._clone());continue}else s&&Fr(e,i,{});e[i]=al(e[i],o,n)}else Fr(e,i,o),Me.Undef(o)||(Me.Undef(o.__json)||(e[i].__json=o.__json),Me.Undef(o.__origin)||(e[i].__origin=o.__origin))}return n!==void 0&&Array.isArray(e)?e.filter(i=>!i||!i.__ctrl):e}function yi(e){return al({},{value:e}).value}const yz=Object.assign||function(e){for(let t,n=1;n<arguments.length;n++)for(let r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&Fr(e,r,t[r]);return e};function st(){return yz.apply(this,arguments)}function Vp(e){return typeof e!="object"||e===null?e:e instanceof Array?[...e]:Xe({},e)}function ho(e,t){var n=null;return function(...r){n!==null&&clearTimeout(n),n=setTimeout(()=>e.call(this,...r),t)}}function hE(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function bz(e){return e&&typeof e=="object"&&typeof e.then=="function"}function cc(e){return bz(e)?e:Promise.resolve(e)}function Na(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}function mE(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function vE(e,t,n){return`[form-create ${e}]: ${t}`}function Jh(e,t){console.error(vE("err",e))}function wz(e){Jh(e.toString()),console.error(e)}const Hp="[[FORM-CREATE-PREFIX-",qp="-FORM-CREATE-SUFFIX]]";function za(e,t){return JSON.stringify(al(Array.isArray(e)?[]:{},e,!0),function(n,r){if(!(r&&r._isVue===!0)){if(typeof r!="function")return r;if(r.__json)return r.__json;if(r.__origin&&(r=r.__origin),!r.__emit)return Hp+r+qp}},t)}function Mf(e){return new Function("return "+e)()}function wi(e,t){if(e&&Me.String(e)&&e.length>4){let n=e.trim(),r=!1;try{if(n.indexOf(qp)>0&&n.indexOf(Hp)===0)n=n.replace(qp,"").replace(Hp,""),r=!0;else if(n.indexOf("$FN:")===0)n=n.substring(4),r=!0;else if(n.indexOf("$EXEC:")===0)n=n.substring(6),r=!0;else if(n.indexOf("$GLOBAL:")===0){const o=n.substring(8);return n=function(...s){const l=s[0].api.getGlobalEvent(o);if(l)return l.call(this,...s)},n.__json=e,n.__inject=!0,n}else{if(n.indexOf("$FNX:")===0)return n=Mf(`function($inject){
32
32
  `+n.substring(5)+`
33
33
  }`),n.__json=e,n.__inject=!0,n;(!t&&n.indexOf("function ")===0&&n!=="function "||!t&&n.indexOf("function(")===0&&n!=="function(")&&(r=!0)}if(!r)return e;let i;try{i=Mf(n)}catch{i=Mf("function "+n)}return i.__json=e,i}catch(i){Jh(`解析失败:${n}
@@ -39,7 +39,7 @@ err: ${i}`);return}}return e}function gE(e,t){return JSON.parse(e,function(n,r){
39
39
  type: ${l.type}`)}),r.length>0&&this.#h()}removeFiles(t){const{files:n,currentUploads:r}=this.getState(),i={...n},o={...r},s=Object.create(null);t.forEach(f=>{n[f]&&(s[f]=n[f],delete i[f])});function l(f){return s[f]===void 0}Object.keys(o).forEach(f=>{const p=r[f].fileIDs.filter(l);if(p.length===0){delete o[f];return}const{capabilities:v}=this.getState();if(p.length!==r[f].fileIDs.length&&!v.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");o[f]={...r[f],fileIDs:p}});const u={currentUploads:o,files:i};Object.keys(i).length===0&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.#d();const d=Object.keys(s);d.forEach(f=>{this.emit("file-removed",s[f])}),d.length>5?this.log(`Removed ${d.length} files`):this.log(`Removed files: ${d.join(", ")}`)}removeFile(t){this.removeFiles([t])}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).progress.uploadComplete)return;const n=this.getFile(t),i=!(n.isPaused||!1);return this.setFileState(t,{isPaused:i}),this.emit("upload-pause",n,i),i}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}#v(){const{files:t}=this.getState();return Object.keys(t).filter(n=>{const r=t[n];return r.error&&(!r.missingRequiredMetaFields||r.missingRequiredMetaFields.length===0)})}async#g(){const t=this.#v(),n={...this.getState().files};if(t.forEach(i=>{n[i]={...n[i],isPaused:!1,error:null}}),this.setState({files:n,error:null}),this.emit("retry-all",this.getFilesByIds(t)),t.length===0)return{successful:[],failed:[]};const r=this.#f(t,{forceAllowNewUpload:!0});return this.#p(r)}async retryAll(){const t=await this.#g();return this.emit("complete",t),t}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n),this.setState(Tu)}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(t));const n=this.#f([t],{forceAllowNewUpload:!0});return this.#p(n)}logout(){this.iteratePlugins(t=>{t.provider?.logout?.()})}#S=(t,n)=>{const r=t?this.getFile(t.id):void 0;if(t==null||!r){this.log(`Not setting progress for a file that has been removed: ${t?.id}`);return}if(r.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${t.id}`);return}const i={bytesTotal:n.bytesTotal,percentage:n.bytesTotal!=null&&Number.isFinite(n.bytesTotal)&&n.bytesTotal>0?Math.round(n.bytesUploaded/n.bytesTotal*100):void 0};r.progress.uploadStarted!=null?this.setFileState(t.id,{progress:{...r.progress,...i,bytesUploaded:n.bytesUploaded}}):this.setFileState(t.id,{progress:{...r.progress,...i}}),this.#d()};#_(){const t=this.#C();let n=null;t!=null&&(n=Math.round(t*100),n>100?n=100:n<0&&(n=0)),this.emit("progress",n??0),this.setState({totalProgress:n??0})}#d=x6(()=>this.#_(),500,{leading:!0,trailing:!0});[Symbol.for("uppy test: updateTotalProgress")](){return this.#_()}#C(){const n=this.getFiles().filter(u=>u.progress.uploadStarted||u.progress.preprocess||u.progress.postprocess);if(n.length===0)return 0;if(n.every(u=>u.progress.uploadComplete))return 1;const r=u=>u.progress.bytesTotal!=null&&u.progress.bytesTotal!==0,i=n.filter(r),o=n.filter(u=>!r(u));if(i.every(u=>u.progress.uploadComplete)&&o.length>0&&!o.every(u=>u.progress.uploadComplete))return null;const s=i.reduce((u,d)=>u+(d.progress.bytesTotal??0),0),l=i.reduce((u,d)=>u+(d.progress.bytesUploaded||0),0);return s===0?0:l/s}#x(){const t=(i,o,s)=>{let l=i.message||"Unknown error";i.details&&(l+=` ${i.details}`),this.setState({error:l}),o!=null&&o.id in this.getState().files&&this.setFileState(o.id,{error:l,response:s})};this.on("error",t),this.on("upload-error",(i,o,s)=>{if(t(o,i,s),typeof o=="object"&&o.message){this.log(o.message,"error");const l=new Error(this.i18n("failedToUpload",{file:i?.name??""}));l.isUserFacing=!0,l.details=o.message,o.details&&(l.details+=` ${o.details}`),this.#s([l])}else this.#s([o])});let n=null;this.on("upload-stalled",(i,o)=>{const{message:s}=i,l=o.map(u=>u.meta.name).join(", ");n||(this.info({message:s,details:l},"warning",this.opts.infoTimeout),n=setTimeout(()=>{n=null},this.opts.infoTimeout)),this.log(`${s} ${l}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const r=i=>{const o=i.filter(l=>{const u=l!=null&&this.getFile(l.id);return u||this.log(`Not setting progress for a file that has been removed: ${l?.id}`),u}),s=Object.fromEntries(o.map(l=>[l.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:l.size}}]));this.patchFilesState(s)};this.on("upload-start",r),this.on("upload-progress",this.#S),this.on("upload-success",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const s=this.getFile(i.id).progress,l=this.#a.size>0;this.setFileState(i.id,{progress:{...s,postprocess:l?{mode:"indeterminate"}:void 0,uploadComplete:!0,...!l&&{complete:!0},percentage:100,bytesUploaded:s.bytesTotal},response:o,uploadURL:o.uploadURL,isPaused:!1}),i.size==null&&this.setFileState(i.id,{size:o.bytesUploaded||s.bytesTotal}),this.#d()}),this.on("preprocess-progress",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getFile(i.id).progress,preprocess:o}})}),this.on("preprocess-complete",i=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const o={...this.getState().files};o[i.id]={...o[i.id],progress:{...o[i.id].progress}},delete o[i.id].progress.preprocess,this.setState({files:o})}),this.on("postprocess-progress",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getState().files[i.id].progress,postprocess:o}})}),this.on("postprocess-complete",i=>{const o=i&&this.getFile(i.id);if(o==null){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const{postprocess:s,...l}=o.progress;this.patchFilesState({[o.id]:{progress:{...l,complete:!0}}})}),this.on("restored",()=>{this.#d()}),this.on("dashboard:file-edit-complete",i=>{i&&this.#c(i)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",this.#u),window.addEventListener("offline",this.#u),setTimeout(this.#u,3e3))}updateOnlineStatus(){window.navigator.onLine??!0?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}#u=this.updateOnlineStatus.bind(this);getID(){return this.opts.id}use(t,...n){if(typeof t!="function"){const s=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(s)}const r=new t(this,...n),i=r.id;if(!i)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const s=`Already found a plugin named '${o.id}'. Tried to use: '${i}'.
40
40
  Uppy plugins must have unique \`id\` options.`;throw new Error(s)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in this.#e?this.#e[r.type].push(r):this.#e[r.type]=[r],r.install(),this.emit("plugin-added",r),this}getPlugin(t){for(const n of Object.values(this.#e)){const r=n.find(i=>i.id===t);if(r!=null)return r}}[Symbol.for("uppy test: getPlugins")](t){return this.#e[t]}iteratePlugins(t){Object.values(this.#e).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=this.#e[t.type],r=n.findIndex(s=>s.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),this.#n(),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",this.#u),window.removeEventListener("offline",this.#u))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n="info",r=3e3){const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}#y=new Map;registerRequestClient(t,n){this.#y.set(t,n)}getRequestClientForFile(t){if(!("remote"in t&&t.remote))throw new Error(`Tried to get RequestClient for a non-remote file ${t.id}`);const n=this.#y.get(t.remote.requestClientId);if(n==null)throw new Error(`requestClientId "${t.remote.requestClientId}" not registered for file "${t.id}"`);return n}async restore(t){this.log(`Core: Running restored upload "${t}"`);const n=await this.#p(t);return this.emit("complete",n),n}#f(t,n={}){const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:i,currentUploads:o}=this.getState();if(!i&&!r)throw new Error("Cannot create a new upload: already uploading.");const s=A6();return this.emit("upload",s,this.getFilesByIds(t)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...o,[s]:{fileIDs:t,step:0,result:{}}}}),s}[Symbol.for("uppy test: createUpload")](...t){return this.#f(...t)}#T(t){const{currentUploads:n}=this.getState();return n[t]}addResultData(t,n){if(!this.#T(t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}#b(t){const{[t]:n,...r}=this.getState().currentUploads;this.setState({currentUploads:r})}async#p(t){const n=()=>{const{currentUploads:s}=this.getState();return s[t]};let r=n();if(!r)throw new Error("Nonexistent upload");const i=[...this.#o,...this.#i,...this.#a];try{for(let s=r.step||0;s<i.length;s++){const l=i[s];this.setState({currentUploads:{...this.getState().currentUploads,[t]:{...r,step:s}}});const{fileIDs:u}=r;if(await l(u,t),r=n(),!r)break}}catch(s){throw this.#b(t),s}if(r){r.fileIDs.forEach(d=>{const f=this.getFile(d);f?.progress.postprocess&&this.emit("postprocess-complete",f)});const s=r.fileIDs.map(d=>this.getFile(d)),l=s.filter(d=>!d.error),u=s.filter(d=>d.error);this.addResultData(t,{successful:l,failed:u,uploadID:t}),r=n()}let o;return r&&(o=r.result,this.#b(t)),o==null&&(this.log(`Not setting result for an upload that has been removed: ${t}`),o={successful:[],failed:[],uploadID:t}),o}async upload(){this.#e.uploader?.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();if(this.#v().length>0){const i=await this.#g();if(!(this.getFiles().filter(s=>s.progress.uploadStarted==null).length>0))return this.emit("complete",i),i;({files:t}=this.getState())}const r=this.opts.onBeforeUpload(t);if(r===!1)throw new Error("Not starting the upload because onBeforeUpload returned false");r&&typeof r=="object"&&(t=r,this.setState({files:t}));try{if(this.#t.validateMinNumberOfFiles(t),!this.#l(t))throw new Zr(this.i18n("missingRequiredMetaField"));const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(d=>d.fileIDs),s=Object.keys(t).filter(d=>{const f=this.getFile(d);return f&&!f.progress.uploadStarted&&!o.includes(d)}),l=this.#f(s),u=await this.#p(l);return this.emit("complete",u),u}catch(i){throw this.#s([i]),i}}}const Co=typeof window<"u",tS=Co&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),nS=Co&&window.devicePixelRatio>1,F6={elements_selector:".lazy",container:tS||Co?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},rS=e=>Object.assign({},F6,e),Qb=function(e,t){let n;const r="LazyLoad::Initialized",i=new e(t);try{n=new CustomEvent(r,{detail:{instance:i}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(r,!1,!1,{instance:i})}window.dispatchEvent(n)},L6=(e,t)=>{if(t)if(t.length)for(let n,r=0;n=t[r];r+=1)Qb(e,n);else Qb(e,t)},Wi="src",lm="srcset",um="sizes",iS="poster",ul="llOriginalAttrs",oS="data",cm="loading",sS="loaded",aS="applied",j6="entered",dm="error",lS="native",uS="data-",cS="ll-status",or=(e,t)=>e.getAttribute(uS+t),U6=(e,t,n)=>{const r=uS+t;n!==null?e.setAttribute(r,n):e.removeAttribute(r)},cl=e=>or(e,cS),rs=(e,t)=>U6(e,cS,t),Fc=e=>rs(e,null),fm=e=>cl(e)===null,N6=e=>cl(e)===cm,z6=e=>cl(e)===dm,pm=e=>cl(e)===lS,B6=[cm,sS,aS,dm],V6=e=>B6.indexOf(cl(e))>=0,xo=(e,t,n,r)=>{e&&typeof e=="function"&&(r===void 0?n===void 0?e(t):e(t,n):e(t,n,r))},ta=(e,t)=>{Co&&t!==""&&e.classList.add(t)},mi=(e,t)=>{Co&&t!==""&&e.classList.remove(t)},H6=e=>{e.llTempImage=document.createElement("IMG")},q6=e=>{delete e.llTempImage},dS=e=>e.llTempImage,Lc=(e,t)=>{if(!t)return;const n=t._observer;n&&n.unobserve(e)},W6=e=>{e.disconnect()},Y6=(e,t,n)=>{t.unobserve_entered&&Lc(e,n)},hm=(e,t)=>{e&&(e.loadingCount+=t)},K6=e=>{e&&(e.toLoadCount-=1)},fS=(e,t)=>{e&&(e.toLoadCount=t)},G6=e=>e.loadingCount>0,Q6=e=>e.toLoadCount>0,pS=e=>{let t=[];for(let n,r=0;n=e.children[r];r+=1)n.tagName==="SOURCE"&&t.push(n);return t},mm=(e,t)=>{const n=e.parentNode;n&&n.tagName==="PICTURE"&&pS(n).forEach(t)},hS=(e,t)=>{pS(e).forEach(t)},jc=[Wi],mS=[Wi,iS],Va=[Wi,lm,um],vS=[oS],Uc=e=>!!e[ul],gS=e=>e[ul],_S=e=>delete e[ul],Hs=(e,t)=>{if(Uc(e))return;const n={};t.forEach((r=>{n[r]=e.getAttribute(r)})),e[ul]=n},X6=e=>{Uc(e)||(e[ul]={backgroundImage:e.style.backgroundImage})},Jo=(e,t)=>{if(!Uc(e))return;const n=gS(e);t.forEach((r=>{((i,o,s)=>{s?i.setAttribute(o,s):i.removeAttribute(o)})(e,r,n[r])}))},J6=e=>{if(!Uc(e))return;const t=gS(e);e.style.backgroundImage=t.backgroundImage},yS=(e,t,n)=>{ta(e,t.class_applied),rs(e,aS),n&&(t.unobserve_completed&&Lc(e,t),xo(t.callback_applied,e,n))},bS=(e,t,n)=>{ta(e,t.class_loading),rs(e,cm),n&&(hm(n,1),xo(t.callback_loading,e,n))},mo=(e,t,n)=>{n&&e.setAttribute(t,n)},Xb=(e,t)=>{mo(e,um,or(e,t.data_sizes)),mo(e,lm,or(e,t.data_srcset)),mo(e,Wi,or(e,t.data_src))},Z6=(e,t)=>{mm(e,(n=>{Hs(n,Va),Xb(n,t)})),Hs(e,Va),Xb(e,t)},eH=(e,t)=>{Hs(e,jc),mo(e,Wi,or(e,t.data_src))},tH=(e,t)=>{hS(e,(n=>{Hs(n,jc),mo(n,Wi,or(n,t.data_src))})),Hs(e,mS),mo(e,iS,or(e,t.data_poster)),mo(e,Wi,or(e,t.data_src)),e.load()},nH=(e,t)=>{Hs(e,vS),mo(e,oS,or(e,t.data_src))},rH=(e,t,n)=>{const r=or(e,t.data_bg),i=or(e,t.data_bg_hidpi),o=nS&&i?i:r;o&&(e.style.backgroundImage=`url("${o}")`,dS(e).setAttribute(Wi,o),bS(e,t,n))},iH=(e,t,n)=>{const r=or(e,t.data_bg_multi),i=or(e,t.data_bg_multi_hidpi),o=nS&&i?i:r;o&&(e.style.backgroundImage=o,yS(e,t,n))},oH=(e,t,n)=>{const r=or(e,t.data_bg_set);if(!r)return;let i=r.split("|").map((o=>`image-set(${o})`));e.style.backgroundImage=i.join(),yS(e,t,n)},wS={IMG:Z6,IFRAME:eH,VIDEO:tH,OBJECT:nH},sH=(e,t)=>{const n=wS[e.tagName];n&&n(e,t)},aH=(e,t,n)=>{const r=wS[e.tagName];r&&(r(e,t),bS(e,t,n))},lH=["IMG","IFRAME","VIDEO","OBJECT"],uH=e=>lH.indexOf(e.tagName)>-1,ES=(e,t)=>{!t||G6(t)||Q6(t)||xo(e.callback_finish,t)},Jb=(e,t,n)=>{e.addEventListener(t,n),e.llEvLisnrs[t]=n},cH=(e,t,n)=>{e.removeEventListener(t,n)},vm=e=>!!e.llEvLisnrs,dH=(e,t,n)=>{vm(e)||(e.llEvLisnrs={});const r=e.tagName==="VIDEO"?"loadeddata":"load";Jb(e,r,t),Jb(e,"error",n)},eh=e=>{if(!vm(e))return;const t=e.llEvLisnrs;for(let n in t){const r=t[n];cH(e,n,r)}delete e.llEvLisnrs},SS=(e,t,n)=>{q6(e),hm(n,-1),K6(n),mi(e,t.class_loading),t.unobserve_completed&&Lc(e,n)},fH=(e,t,n,r)=>{const i=pm(t);SS(t,n,r),ta(t,n.class_loaded),rs(t,sS),xo(n.callback_loaded,t,r),i||ES(n,r)},pH=(e,t,n,r)=>{const i=pm(t);SS(t,n,r),ta(t,n.class_error),rs(t,dm),xo(n.callback_error,t,r),n.restore_on_error&&Jo(t,Va),i||ES(n,r)},th=(e,t,n)=>{const r=dS(e)||e;vm(r)||dH(r,(i=>{fH(0,e,t,n),eh(r)}),(i=>{pH(0,e,t,n),eh(r)}))},nh=(e,t,n)=>{uH(e)?((r,i,o)=>{th(r,i,o),aH(r,i,o)})(e,t,n):((r,i,o)=>{H6(r),th(r,i,o),X6(r),rH(r,i,o),iH(r,i,o),oH(r,i,o)})(e,t,n)},hH=(e,t,n)=>{e.setAttribute("loading","lazy"),th(e,t,n),sH(e,t),rs(e,lS)},Zb=e=>{e.removeAttribute(Wi),e.removeAttribute(lm),e.removeAttribute(um)},mH=e=>{mm(e,(t=>{Zb(t)})),Zb(e)},CS=e=>{mm(e,(t=>{Jo(t,Va)})),Jo(e,Va)},vH=e=>{hS(e,(t=>{Jo(t,jc)})),Jo(e,mS),e.load()},gH=e=>{Jo(e,jc)},_H=e=>{Jo(e,vS)},yH={IMG:CS,IFRAME:gH,VIDEO:vH,OBJECT:_H},bH=(e,t)=>{(n=>{const r=yH[n.tagName];r?r(n):J6(n)})(e),((n,r)=>{fm(n)||pm(n)||(mi(n,r.class_entered),mi(n,r.class_exited),mi(n,r.class_applied),mi(n,r.class_loading),mi(n,r.class_loaded),mi(n,r.class_error))})(e,t),Fc(e),_S(e)},wH=(e,t,n,r)=>{n.cancel_on_exit&&N6(e)&&e.tagName==="IMG"&&(eh(e),mH(e),CS(e),mi(e,n.class_loading),hm(r,-1),Fc(e),xo(n.callback_cancel,e,t,r))},EH=(e,t,n,r)=>{const i=V6(e);rs(e,j6),ta(e,n.class_entered),mi(e,n.class_exited),Y6(e,n,r),xo(n.callback_enter,e,t,r),i||nh(e,n,r)},SH=(e,t,n,r)=>{fm(e)||(ta(e,n.class_exited),wH(e,t,n,r),xo(n.callback_exit,e,t,r))},CH=["IMG","IFRAME","VIDEO"],xS=e=>e.use_native&&"loading"in HTMLImageElement.prototype,xH=(e,t,n)=>{e.forEach((r=>{CH.indexOf(r.tagName)!==-1&&hH(r,t,n)})),fS(n,0)},TH=e=>e.isIntersecting||e.intersectionRatio>0,kH=(e,t)=>{t.forEach((n=>{e.observe(n)}))},OH=(e,t)=>{W6(e),kH(e,t)},$H=(e,t)=>{xS(e)||(t._observer=new IntersectionObserver((n=>{((r,i,o)=>{r.forEach((s=>TH(s)?EH(s.target,s,i,o):SH(s.target,s,i,o)))})(n,e,t)}),(n=>({root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))(e)))},TS=e=>Array.prototype.slice.call(e),pc=e=>e.container.querySelectorAll(e.elements_selector),AH=e=>TS(e).filter(fm),RH=e=>z6(e),PH=e=>TS(e).filter(RH),e0=(e,t)=>AH(e||pc(t)),IH=(e,t)=>{PH(pc(e)).forEach((n=>{mi(n,e.class_error),Fc(n)})),t.update()},MH=(e,t)=>{Co&&(t._onlineHandler=()=>{IH(e,t)},window.addEventListener("online",t._onlineHandler))},DH=e=>{Co&&window.removeEventListener("online",e._onlineHandler)},Ho=function(e,t){const n=rS(e);this._settings=n,this.loadingCount=0,$H(n,this),MH(n,this),this.update(t)};Ho.prototype={update:function(e){const t=this._settings,n=e0(e,t);fS(this,n.length),tS?this.loadAll(n):xS(t)?xH(n,t,this):OH(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),DH(this),pc(this._settings).forEach((e=>{_S(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){const t=this._settings;e0(e,t).forEach((n=>{Lc(n,this),nh(n,t,this)}))},restoreAll:function(){const e=this._settings;pc(e).forEach((t=>{bH(t,e)}))}},Ho.load=(e,t)=>{const n=rS(t);nh(e,n)},Ho.resetStatus=e=>{Fc(e)},Co&&L6(Ho,window.lazyLoadOptions);function t0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t0(Object(n),!0).forEach((function(r){jr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t0(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FH(e,t){if(e==null)return{};var n,r,i=(function(s,l){if(s==null)return{};var u,d,f={},p=Object.keys(s);for(d=0;d<p.length;d++)u=p[d],l.indexOf(u)>=0||(f[u]=s[u]);return f})(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zo(e){return(function(t){if(Array.isArray(t))return ap(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||(function(t,n){if(t){if(typeof t=="string")return ap(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ap(t,n)}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
41
41
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ap(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var n0,LH,ku,mn=(n0=function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(s==="object")if(o.toString===Object.prototype.toString)for(var u in o)t.call(o,u)&&o[u]&&r.push(u);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()},n0(ku={path:LH,exports:{},require:function(e,t){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(t==null&&ku.path)}},ku.exports),ku.exports),ai=function(e){return function(t,n){if(!t)return e;var r;typeof t=="string"?r=t:n=t;var i=e;return r&&(i+="__"+r),i+(n?Object.keys(n).reduce((function(o,s){var l=n[s];return l&&(o+=" "+(typeof l=="boolean"?i+"--"+s:i+"--"+s+"_"+l)),o}),""):"")}};function rh(e,t,n){var r,i,o,s,l;function u(){var f=Date.now()-s;f<t&&f>=0?r=setTimeout(u,t-f):(r=null,n||(l=e.apply(o,i),o=i=null))}t==null&&(t=100);var d=function(){o=this,i=arguments,s=Date.now();var f=n&&!r;return r||(r=setTimeout(u,t)),f&&(l=e.apply(o,i),o=i=null),l};return d.clear=function(){r&&(clearTimeout(r),r=null)},d.flush=function(){r&&(l=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},d}rh.debounce=rh;var ih=rh,nt=function(){return nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nt.apply(this,arguments)};function kS(e,t){var n,r;return e&&t?(n=""+e+t[0].toUpperCase()+t.slice(1),r=e+"-"+t):(n=e||t,r=e||t),{name:n,classname:r}}function OS(e){return/^blob:/.test(e)}function r0(e){return OS(e)||(function(t){return/^data:/.test(t)})(e)}function ws(e){return!!(e&&e.constructor&&e.call&&e.apply)}function gn(e){return e===void 0}function Xu(e){return typeof e=="object"&&e!==null}function oh(e,t,n){var r={};return Xu(e)?(Object.keys(t).forEach((function(i){gn(e[i])?r[i]=t[i]:Xu(t[i])?Xu(e[i])?r[i]=oh(e[i],t[i],n[i]):r[i]=e[i]?t[i]:n[i]:t[i]===!0||t[i]===!1?r[i]=!!e[i]:r[i]=e[i]})),r):e?t:n}function Ou(e){var t=Number(e);return Number.isNaN(t)?e:t}function i0(e){return typeof(e=="number"||(function(t){return typeof t=="object"&&t!==null})(e)&&toString.call(e)=="[object Number]")&&!$S(e)}function $S(e){return e!=e}function AS(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}var Pa=function(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=e,this.scale=t},jH=function(e,t){t===void 0&&(t={}),this.type="resize",this.directions=e,this.params=t},gm=function(e){this.type="move",this.directions=e},UH=(function(){function e(t,n,r,i,o){this.type="drag",this.nativeEvent=t,this.position=r,this.previousPosition=i,this.element=n,this.anchor=o}return e.prototype.shift=function(){var t=this,n=t.element,r=t.anchor,i=t.position;if(n){var o=n.getBoundingClientRect(),s=o.left,l=o.top;return{left:i.left-s-r.left,top:i.top-l-r.top}}return{left:0,top:0}},e})(),_m={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(e){e.cancelable&&!this.disabled&&e.touches.length===1&&(this.touches=Zo(e.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),e.touches.length&&this.initAnchor(this.touches.reduce((function(t,n){return{clientX:t.clientX+n.clientX/e.touches.length,clientY:t.clientY+n.clientY/e.touches.length}}),{clientX:0,clientY:0})),e.preventDefault&&e.preventDefault(),e.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(e){this.touches.length&&(this.processMove(e,e.touches),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation())},onMouseDown:function(e){if(!this.disabled){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.initAnchor(t),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var t=this.$refs.draggable.getBoundingClientRect(),n=t.left,r=t.right,i=t.bottom,o=t.top;this.anchor={left:e.clientX-n,top:e.clientY-o,bottom:i-e.clientY,right:r-e.clientX}},processMove:function(e,t){var n=Zo(t);if(this.touches.length){if(this.touches.length===1&&n.length===1){var r=this.$refs.draggable;this.$emit("drag",new UH(e,r,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};_m.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"draggable",class:n.classname,onTouchstart:t[1]||(t[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:t[2]||(t[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onMouseover:t[3]||(t[3]=function(){return o.onMouseOver&&o.onMouseOver.apply(o,arguments)}),onMouseleave:t[4]||(t[4]=function(){return o.onMouseLeave&&o.onMouseLeave.apply(o,arguments)})},[mt(e.$slots,"default")],34)};var lp=ai("vue-handler-wrapper"),RS={name:"HandlerWrapper",components:{DraggableElement:_m},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var e;if(this.horizontalPosition||this.verticalPosition){var t,n=kS(this.horizontalPosition,this.verticalPosition);e=lp((jr(t={},n.classname,!0),jr(t,"disabled",this.disabled),t))}else e=lp({disabled:this.disabled});return{root:e,draggable:lp("draggable")}}},emits:["leave","enter","drag","drag-end"]};RS.render=function(e,t,n,r,i,o){var s=ft("DraggableElement");return C(),Ee("div",{class:o.classes.root},[Z(s,{class:o.classes.draggable,onDrag:t[1]||(t[1]=function(l){return e.$emit("drag",l)}),onDragEnd:t[2]||(t[2]=function(l){return e.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(l){return e.$emit("leave")}),onEnter:t[4]||(t[4]=function(l){return e.$emit("enter")})},{default:Le((function(){return[mt(e.$slots,"default")]})),_:3},8,["class"])],2)};var NH=ai("vue-line-wrapper"),PS={name:"LineWrapper",components:{DraggableElement:_m},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var e;return NH((jr(e={},this.position,!0),jr(e,"disabled",this.disabled),e))}},emits:["leave","enter","drag","drag-end"]};PS.render=function(e,t,n,r,i,o){var s=ft("DraggableElement");return C(),Ee(s,{class:o.classname,onDrag:t[1]||(t[1]=function(l){return e.$emit("drag",l)}),onDragEnd:t[2]||(t[2]=function(l){return e.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(l){return e.$emit("leave")}),onEnter:t[4]||(t[4]=function(l){return e.$emit("enter")})},{default:Le((function(){return[mt(e.$slots,"default")]})),_:3},8,["class"])};var gi=["left","right","top","bottom"],zH=["left","right"],BH=["top","bottom"],VH=["left","top"],HH=["fill-area","fit-area","stencil","none"],o0={left:0,top:0,width:0,height:0};function s0(e,t,n){return!(n=n||["width","height","left","top"]).some((function(r){return e[r]!==t[r]}))}function Ei(e){return{left:e.left,top:e.top,right:e.left+e.width,bottom:e.top+e.height}}function qs(e,t){return{left:e.left-t.left,top:e.top-t.top}}function Sn(e){return{left:e.left+e.width/2,top:e.top+e.height/2}}function Ha(e,t){var n={left:0,top:0,right:0,bottom:0};return gi.forEach((function(r){var i=t[r],o=Ei(e)[r];n[r]=i!==void 0&&o!==void 0?r==="left"||r==="top"?Math.max(0,i-o):Math.max(0,o-i):0})),n}function vi(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width+t.left+t.right,height:e.height+t.top+t.bottom}}function Nc(e){return{left:-e.left,top:-e.top}}function sr(e,t){return nt(nt({},e),{left:e.left+t.left,top:e.top+t.top})}function zr(e,t,n,r){if(t!==1){if(n){var i=Sn(e);return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2+(n.left-i.left)*(1-t),top:e.top+e.height*(1-t)/2+(n.top-i.top)*(1-t)}}return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2,top:e.top+e.height*(1-t)/2}}return e}function Dt(e){return e.width/e.height}function Ws(e,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/e.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/e.height:1/0)}function Ys(e,t){var n={left:0,top:0},r=Ha(e,t);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function up(e,t){var n;return t.minimum&&e<t.minimum?n=t.minimum:t.maximum&&e>t.maximum&&(n=t.maximum),n}function IS(e,t){var n=Dt(e),r=Dt(t);return t.width<1/0&&t.height<1/0?n>r?{width:t.width,height:t.width/n}:{width:t.height*n,height:t.height}:t.width<1/0?{width:t.width,height:t.width/n}:t.height<1/0?{width:t.height*n,height:t.height}:e}function MS(e,t){var n=t*Math.PI/180;return{width:Math.abs(e.width*Math.cos(n))+Math.abs(e.height*Math.sin(n)),height:Math.abs(e.width*Math.sin(n))+Math.abs(e.height*Math.cos(n))}}function co(e,t){var n=t*Math.PI/180;return{left:e.left*Math.cos(n)-e.top*Math.sin(n),top:e.left*Math.sin(n)+e.top*Math.cos(n)}}function zc(e,t){var n=Ha(Cn(e,t),t);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((e.width+n.left+n.right)/e.width,Ws(e,t)):Math.min((e.height+n.top+n.bottom)/e.height,Ws(e,t)):1}function Cn(e,t,n){n===void 0&&(n=!1);var r=Ys(e,t);return sr(e,n?Nc(r):r)}function sh(e){return{width:e.right!==void 0&&e.left!==void 0?e.right-e.left:1/0,height:e.bottom!==void 0&&e.top!==void 0?e.bottom-e.top:1/0}}function qH(e,t){return nt(nt({},e),{minWidth:Math.min(t.width,e.minWidth),minHeight:Math.min(t.height,e.minHeight),maxWidth:Math.min(t.width,e.maxWidth),maxHeight:Math.min(t.height,e.maxHeight)})}function DS(e,t,n){n===void 0&&(n=!0);var r={};return gi.forEach((function(i){var o=e[i],s=t[i];o!==void 0&&s!==void 0?r[i]=i==="left"||i==="top"?n?Math.max(o,s):Math.min(o,s):n?Math.min(o,s):Math.max(o,s):s!==void 0?r[i]=s:o!==void 0&&(r[i]=o)})),r}function Bc(e,t){return DS(e,t,!0)}function a0(e){var t=e.size,n=e.aspectRatio,r=e.ignoreMinimum,i=e.sizeRestrictions;return!!((t.correctRatio||Dt(t)>=n.minimum&&Dt(t)<=n.maximum)&&t.height<=i.maxHeight&&t.width<=i.maxWidth&&t.width&&t.height&&(r||t.height>=i.minHeight&&t.width>=i.minWidth))}function l0(e,t){return Math.pow(e.width-t.width,2)+Math.pow(e.height-t.height,2)}function Bi(e){var t=e.width,n=e.height,r=e.sizeRestrictions,i={minimum:e.aspectRatio&&e.aspectRatio.minimum||0,maximum:e.aspectRatio&&e.aspectRatio.maximum||1/0},o={width:Math.max(r.minWidth,Math.min(r.maxWidth,t)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))};function s(d,f){return f===void 0&&(f=!1),d.reduce((function(p,v){return a0({size:v,aspectRatio:i,sizeRestrictions:r,ignoreMinimum:f})&&(!p||l0(v,{width:t,height:n})<l0(p,{width:t,height:n}))?v:p}),null)}var l=[];i&&[i.minimum,i.maximum].forEach((function(d){d&&l.push({width:o.width,height:o.width/d,correctRatio:!0},{width:o.height*d,height:o.height,correctRatio:!0})})),a0({size:o,aspectRatio:i,sizeRestrictions:r})&&l.push(o);var u=s(l)||s(l,!0);return u&&{width:u.width,height:u.height}}function ah(e){var t=e.event,n=e.coordinates,r=e.positionRestrictions,i=r===void 0?{}:r,o=sr(n,t.directions);return sr(o,Ys(o,i))}function WH(e){var t=e.coordinates,n=e.transform,r=e.imageSize,i=e.sizeRestrictions,o=e.positionRestrictions,s=e.aspectRatio,l=e.visibleArea,u=function(f,p){return ah({coordinates:f,positionRestrictions:o,event:new gm({left:p.left-f.left,top:p.top-f.top})})},d=nt({},t);return(Array.isArray(n)?n:[n]).forEach((function(f){var p={};gn((p=typeof f=="function"?f({coordinates:d,imageSize:r,visibleArea:l}):f).width)&&gn(p.height)||(d=(function(v,y){var g=nt(nt(nt({},v),Bi({width:y.width,height:y.height,sizeRestrictions:i,aspectRatio:s})),{left:0,top:0});return u(g,{left:v.left,top:v.top})})(d,nt(nt({},d),p))),gn(p.left)&&gn(p.top)||(d=u(d,nt(nt({},d),p)))})),d}function YH(e){e.event;var t=e.getAreaRestrictions,n=e.boundaries,r=e.coordinates,i=e.visibleArea;e.aspectRatio;var o=e.stencilSize,s=e.sizeRestrictions,l=e.positionRestrictions;e.stencilReference;var u,d,f,p=nt({},r),v=nt({},i),y=nt({},o);u=Dt(y),d=Dt(p),f===void 0&&(f=.001),(u===0||d===0?Math.abs(d-u)<f:Math.abs(d/u)<1+f&&Math.abs(d/u)>1-f)||(p=nt(nt({},p),Bi({sizeRestrictions:s,width:p.width,height:p.height,aspectRatio:{minimum:Dt(y),maximum:Dt(y)}})));var g=zc(v=zr(v,p.width*n.width/(v.width*y.width)),t({visibleArea:v,type:"resize"}));return g!==1&&(v=zr(v,g),p=zr(p,g)),v=Cn(v=sr(v,qs(Sn(p),Sn(v))),t({visibleArea:v,type:"move"})),{coordinates:p=Cn(p,Bc(Ei(v),l)),visibleArea:v}}function KH(e){var t=e.event,n=e.getAreaRestrictions,r=e.boundaries,i=e.coordinates,o=e.visibleArea;e.aspectRatio,e.stencilSize,e.sizeRestrictions;var s=e.positionRestrictions;e.stencilReference;var l=nt({},i),u=nt({},o);if(i&&o&&t.type!=="manipulateImage"){var d={width:0,height:0};u.width,r.width,Dt(r)>Dt(l)?(d.height=.8*r.height,d.width=d.height*Dt(l)):(d.width=.8*r.width,d.height=d.width*Dt(l));var f=zc(u=zr(u,l.width*r.width/(u.width*d.width)),n({visibleArea:u,type:"resize"}));u=zr(u,f),f!==1&&(d.height/=f,d.width/=f),u=Cn(u=sr(u,qs(Sn(l),Sn(u))),n({visibleArea:u,type:"move"})),l=Cn(l,Bc(Ei(u),s))}return{coordinates:l,visibleArea:u}}function GH(e){var t=e.event,n=e.coordinates,r=e.visibleArea,i=e.getAreaRestrictions,o=nt({},r),s=nt({},n);if(t.type==="setCoordinates"){var l=Math.max(0,s.width-o.width),u=Math.max(0,s.height-o.height);l>u?o=zr(o,Math.min(s.width/o.width,Ws(o,i({visibleArea:o,type:"resize"})))):u>l&&(o=zr(o,Math.min(s.height/o.height,Ws(o,i({visibleArea:o,type:"resize"}))))),o=Cn(o=sr(o,Nc(Ys(s,Ei(o)))),i({visibleArea:o,type:"move"}))}return{visibleArea:o,coordinates:s}}function QH(e){var t=e.imageSize,n=e.visibleArea,r=e.coordinates,i=n||t;return{left:(n?n.left:0)+i.width/2-r.width/2,top:(n?n.top:0)+i.height/2-r.height/2}}function XH(e){var t=e.imageSize,n=e.visibleArea,r=e.aspectRatio,i=e.sizeRestrictions,o=n||t,s=Math.min(r.maximum||1/0,Math.max(r.minimum||0,Dt(o))),l=o.width<o.height?{width:.8*o.width,height:.8*o.width/s}:{height:.8*o.height,width:.8*o.height*s};return Bi(nt(nt({},l),{aspectRatio:r,sizeRestrictions:i}))}function JH(e){var t,n,r=e.imageSize,i=e.visibleArea,o=e.boundaries,s=e.aspectRatio,l=e.sizeRestrictions,u=e.stencilSize,d=i||r;return Dt(d)>Dt(o)?n=(t=u.height*d.height/o.height)*Dt(u):t=(n=u.width*d.width/o.width)/Dt(u),Bi({width:n,height:t,aspectRatio:s,sizeRestrictions:l})}function ZH(e){var t=e.getAreaRestrictions,n=e.coordinates,r=e.imageSize,i=Dt(e.boundaries);if(n){var o={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},s=IS({width:Dt(o)>i?o.width:o.height*i,height:Dt(o)>i?o.width/i:o.height},sh(t())),l={left:n.left+n.width/2-s.width/2,top:n.top+n.height/2-s.height/2,width:s.width,height:s.height},u=Ha(n,Ei(nt({left:0,top:0},r))),d={};return!u.left&&!u.right&&l.width<=r.width&&(d.left=0,d.right=r.width),!u.top&&!u.bottom&&l.height<=r.height&&(d.top=0,d.bottom=r.height),Cn(l,d)}var f=Dt(r);return s={height:f>i?r.height:r.width/i,width:f>i?r.height*i:r.width},{left:r.width/2-s.width/2,top:r.height/2-s.height/2,width:s.width,height:s.height}}function $u(e,t){return DS(e,Ei(t))}function e7(e){var t=e.event,n=e.coordinates,r=e.visibleArea,i=e.sizeRestrictions,o=e.getAreaRestrictions,s=e.positionRestrictions,l=e.adjustStencil,u=t.scale,d=t.move,f=nt({},r),p=nt({},n),v=1,y=1,g=u.factor&&Math.abs(u.factor-1)>.001;f=sr(f,{left:d.left||0,top:d.top||0});var m={stencil:{minimum:Math.max(i.minWidth?i.minWidth/p.width:0,i.minHeight?i.minHeight/p.height:0),maximum:Math.min(i.maxWidth?i.maxWidth/p.width:1/0,i.maxHeight?i.maxHeight/p.height:1/0,Ws(p,s))},area:{maximum:Ws(f,o({visibleArea:f,type:"resize"}))}};u.factor&&g&&(u.factor<1?(y=Math.max(u.factor,m.stencil.minimum))>1&&(y=1):u.factor>1&&(y=Math.min(u.factor,Math.min(m.area.maximum,m.stencil.maximum)))<1&&(y=1)),y&&(f=zr(f,y,u.center));var b=n.left-r.left,x=r.width+r.left-(n.width+n.left),S=n.top-r.top,O=r.height+r.top-(n.height+n.top);return f=Cn(f=sr(f,Ys(f,{left:s.left!==void 0?s.left-b*y:void 0,top:s.top!==void 0?s.top-S*y:void 0,bottom:s.bottom!==void 0?s.bottom+O*y:void 0,right:s.right!==void 0?s.right+x*y:void 0})),o({visibleArea:f,type:"move"})),p.width=p.width*y,p.height=p.height*y,p.left=f.left+b*y,p.top=f.top+S*y,p=Cn(p,Bc(Ei(f),s)),u.factor&&g&&l&&(u.factor>1?v=Math.min(m.area.maximum,u.factor)/y:u.factor<1&&(v=Math.max(p.height/f.height,p.width/f.width,u.factor/y)),v!==1&&(f=sr(f=Cn(f=zr(f,v,u.factor>1?u.center:Sn(p)),o({visibleArea:f,type:"move"})),Nc(Ys(p,Ei(f)))))),{coordinates:p,visibleArea:f}}function t7(e){var t=e.aspectRatio,n=e.getAreaRestrictions,r=e.coordinates,i=e.visibleArea,o=e.sizeRestrictions,s=e.positionRestrictions,l=e.imageSize,u=e.previousImageSize,d=e.angle,f=nt({},r),p=nt({},i),v=co(Sn(nt({left:0,top:0},u)),d);return(f=nt(nt({},Bi({sizeRestrictions:o,aspectRatio:t,width:f.width,height:f.height})),co(Sn(f),d))).left-=v.left-l.width/2+f.width/2,f.top-=v.top-l.height/2+f.height/2,p=zr(p,zc(p,n({visibleArea:p,type:"resize"}))),{coordinates:f=Cn(f,s),visibleArea:p=Cn(p=sr(p,qs(Sn(f),Sn(r))),n({visibleArea:p,type:"move"}))}}function n7(e){var t=e.flip,n=e.previousFlip,r=e.rotate,i=e.getAreaRestrictions,o=e.coordinates,s=e.visibleArea,l=e.imageSize,u=nt({},o),d=nt({},s),f=n.horizontal!==t.horizontal,p=n.vertical!==t.vertical;if(f||p){var v=co({left:l.width/2,top:l.height/2},-r),y=co(Sn(u),-r),g=co({left:f?v.left-(y.left-v.left):y.left,top:p?v.top-(y.top-v.top):y.top},r);u=sr(u,qs(g,Sn(u))),y=co(Sn(d),-r),d=Cn(d=sr(d,qs(g=co({left:f?v.left-(y.left-v.left):y.left,top:p?v.top-(y.top-v.top):y.top},r),Sn(d))),i({visibleArea:d,type:"move"}))}return{coordinates:u,visibleArea:d}}function u0(e){var t=e.directions,n=e.coordinates,r=e.positionRestrictions,i=r===void 0?{}:r,o=e.sizeRestrictions,s=e.preserveRatio,l=e.compensate,u=nt({},t),d=vi(n,u).width,f=vi(n,u).height;d<0&&(u.left<0&&u.right<0?(u.left=-(n.width-o.minWidth)/(u.left/u.right),u.right=-(n.width-o.minWidth)/(u.right/u.left)):u.left<0?u.left=-(n.width-o.minWidth):u.right<0&&(u.right=-(n.width-o.minWidth))),f<0&&(u.top<0&&u.bottom<0?(u.top=-(n.height-o.minHeight)/(u.top/u.bottom),u.bottom=-(n.height-o.minHeight)/(u.bottom/u.top)):u.top<0?u.top=-(n.height-o.minHeight):u.bottom<0&&(u.bottom=-(n.height-o.minHeight)));var p=Ha(vi(n,u),i);l&&(p.left&&p.left>0&&p.right===0?(u.right+=p.left,u.left-=p.left):p.right&&p.right>0&&p.left===0&&(u.left+=p.right,u.right-=p.right),p.top&&p.top>0&&p.bottom===0?(u.bottom+=p.top,u.top-=p.top):p.bottom&&p.bottom>0&&p.top===0&&(u.top+=p.bottom,u.bottom-=p.bottom),p=Ha(vi(n,u),i));var v={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(gi.forEach((function(m){var b=p[m];b&&u[m]&&(v[m]=Math.max(0,1-b/u[m]))})),s){var y=Math.min.apply(null,gi.map((function(m){return v[m]})));y!==1/0&&gi.forEach((function(m){u[m]*=y}))}else gi.forEach((function(m){v[m]!==1/0&&(u[m]*=v[m])}));if(d=vi(n,u).width,f=vi(n,u).height,u.right+u.left&&(d>o.maxWidth?v.width=(o.maxWidth-n.width)/(u.right+u.left):d<o.minWidth&&(v.width=(o.minWidth-n.width)/(u.right+u.left))),u.bottom+u.top&&(f>o.maxHeight?v.height=(o.maxHeight-n.height)/(u.bottom+u.top):f<o.minHeight&&(v.height=(o.minHeight-n.height)/(u.bottom+u.top))),s){var g=Math.min(v.width,v.height);g!==1/0&&gi.forEach((function(m){u[m]*=g}))}else v.width!==1/0&&zH.forEach((function(m){u[m]*=v.width})),v.height!==1/0&&BH.forEach((function(m){u[m]*=v.height}));return u}function Au(e,t,n){return t==0&&n==0?e/2:t==0?0:n==0?e:e*Math.abs(t/(t+n))}var r7=ai("vue-simple-handler"),i7=ai("vue-simple-handler-wrapper"),ym={name:"SimpleHandler",components:{HandlerWrapper:RS},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var e,t=(jr(e={},this.horizontalPosition,!!this.horizontalPosition),jr(e,this.verticalPosition,!!this.verticalPosition),jr(e,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),jr(e,"hover",this.hover),e);return{default:mn(r7(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:mn(i7(t),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};ym.render=function(e,t,n,r,i,o){var s=ft("HandlerWrapper");return C(),Ee(s,{class:o.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:Le((function(){return[Z("div",{class:o.classes.default},null,2)]})),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var o7=ai("vue-simple-line"),s7=ai("vue-simple-line-wrapper"),bm={name:"SimpleLine",components:{LineWrapper:PS},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:mn(o7(jr({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:mn(s7(jr({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};bm.render=function(e,t,n,r,i,o){var s=ft("LineWrapper");return C(),Ee(s,{class:o.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:Le((function(){return[Z("div",{class:o.classes.root},null,2)]})),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var cp=ai("vue-bounding-box"),a7=["east","west",null],l7=["south","north",null],FS={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return ym}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return bm}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var e=[];return a7.forEach((function(t){l7.forEach((function(n){if(t!==n){var r=kS(t,n),i=r.name,o=r.classname;e.push({name:i,classname:o,verticalDirection:n,horizontalDirection:t})}}))})),{points:e}},computed:{style:function(){var e={};return this.width&&this.height&&(e.width="".concat(this.width,"px"),e.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),e},classes:function(){var e=this.handlersClasses,t=this.handlersWrappersClasses,n=this.linesClasses,r=this.linesWrappersClasses;return{root:cp(),handlers:e,handlersWrappers:t,lines:n,linesWrappers:r}},lineNodes:function(){var e=this,t=[];return this.points.forEach((function(n){n.horizontalDirection&&n.verticalDirection||!e.lines[n.name]||t.push({name:n.name,component:e.linesComponent,class:mn(e.classes.lines.default,e.classes.lines[n.name],!e.resizable&&e.classes.lines.disabled),wrapperClass:mn(e.classes.linesWrappers.default,e.classes.linesWrappers[n.name],!e.resizable&&e.classes.linesWrappers.disabled),hoverClass:e.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!e.resizable})})),t},handlerNodes:function(){var e=this,t=[],n=this.width,r=this.height;return this.points.forEach((function(i){if(e.handlers[i.name]){var o={name:i.name,component:e.handlersComponent,class:mn(e.classes.handlers.default,e.classes.handlers[i.name]),wrapperClass:mn(e.classes.handlersWrappers.default,e.classes.handlersWrappers[i.name]),hoverClass:e.classes.handlers.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!e.resizable};if(n&&r){var s=i.horizontalDirection,l=i.verticalDirection,u=s==="east"?n:s==="west"?0:n/2,d=l==="south"?r:l==="north"?0:r/2;o.wrapperClass=cp("handler"),o.wrapperStyle={transform:"translate(".concat(u,"px, ").concat(d,"px)")},e.transitions&&e.transitions.enabled&&(o.wrapperStyle.transition="".concat(e.transitions.time,"ms ").concat(e.transitions.timingFunction))}else o.wrapperClass=cp("handler",jr({},i.classname,!0));t.push(o)}})),t}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(e,t,n){var r,i=e.shift(),o=i.left,s=i.top,l={left:0,right:0,top:0,bottom:0};t==="west"?l.left-=o:t==="east"&&(l.right+=o),n==="north"?l.top-=s:n==="south"&&(l.bottom+=s),!n&&t?r="width":n&&!t&&(r="height"),this.resizable&&this.$emit("resize",new jH(l,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:e.nativeEvent&&e.nativeEvent.shiftKey,respectDirection:r}))}},emits:["resize","resize-end"]};FS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"box",class:o.classes.root,style:o.style},[mt(e.$slots,"default"),Z("div",null,[(C(!0),Ee(We,null,ct(o.lineNodes,(function(s){return C(),Ee(Pn(s.component),{key:s.name,"default-class":s.class,"hover-class":s.hoverClass,"wrapper-class":s.wrapperClass,position:s.name,disabled:s.disabled,onDrag:function(l){return o.onHandlerDrag(l,s.horizontalDirection,s.verticalDirection)},onDragEnd:t[1]||(t[1]=function(l){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])})),128))]),(C(!0),Ee(We,null,ct(o.handlerNodes,(function(s){return C(),Ee("div",{key:s.name,style:s.wrapperStyle,class:s.wrapperClass},[(C(),Ee(Pn(s.component),{"default-class":s.class,"hover-class":s.hoverClass,"wrapper-class":s.wrapperClass,"horizontal-position":s.horizontalDirection,"vertical-position":s.verticalDirection,disabled:s.disabled,onDrag:function(l){return o.onHandlerDrag(l,s.horizontalDirection,s.verticalDirection)},onDragEnd:t[2]||(t[2]=function(l){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)})),128))],6)};var u7=ai("vue-draggable-area"),LS={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:u7()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(e){if(e.cancelable){var t=this.movable&&e.touches.length===1;t&&(this.touches=Zo(e.touches)),(this.touchStarted||t)&&(e.preventDefault(),e.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(e){this.touches.length>=1&&(this.touchStarted?(this.processMove(e,e.touches),e.preventDefault(),e.stopPropagation()):AS({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:e.touches[0].clientX,y:e.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(e){if(this.movable&&e.button===0){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.initAnchor(t),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.cancelable&&e.preventDefault(),e.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var t=this.$refs.container.getBoundingClientRect(),n=t.left,r=t.top;this.anchor={x:e.clientX-n,y:e.clientY-r}},processMove:function(e,t){var n=Zo(t);if(this.touches.length){var r=this.$refs.container.getBoundingClientRect(),i=r.left,o=r.top;this.touches.length===1&&n.length===1&&this.$emit("move",new gm({left:n[0].clientX-(i+this.anchor.x),top:n[0].clientY-(o+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};LS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:t[2]||(t[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)})},[mt(e.$slots,"default")],544)};function dp(e){var t,n;return{rotate:e.rotate||0,flip:{horizontal:((t=e?.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((n=e?.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function c7(e){return new Promise((function(t,n){try{if(e)if(/^data:/i.test(e))t((function(u){u=u.replace(/^data:([^;]+);base64,/gim,"");for(var d=atob(u),f=d.length,p=new ArrayBuffer(f),v=new Uint8Array(p),y=0;y<f;y++)v[y]=d.charCodeAt(y);return p})(e));else if(/^blob:/i.test(e)){var r=new FileReader;r.onload=function(u){t(u.target.result)},o=e,s=function(u){r.readAsArrayBuffer(u)},(l=new XMLHttpRequest).open("GET",o,!0),l.responseType="blob",l.onload=function(){this.status!=200&&this.status!==0||s(this.response)},l.send()}else{var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===4&&(i.status===200||i.status===0?t(i.response):n("Warning: could not load an image to parse its orientation"),i=null)},i.onprogress=function(){i.getResponseHeader("content-type")!=="image/jpeg"&&i.abort()},i.withCredentials=!1,i.open("GET",e,!0),i.responseType="arraybuffer",i.send(null)}else n("Error: the image is empty")}catch(u){n(u)}var o,s,l}))}function jS(e){var t=e.rotate,n=e.flip,r=e.scaleX,i=e.scaleY,o="";return o+=" rotate("+t+"deg) ",o+=" scaleX("+r*(n.horizontal?-1:1)+") ",o+=" scaleY("+i*(n.vertical?-1:1)+") "}function d7(e){try{var t,n=new DataView(e),r=void 0,i=void 0,o=void 0,s=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var l=n.byteLength,u=2;u+1<l;){if(n.getUint8(u)===255&&n.getUint8(u+1)===225){o=u;break}u++}if(o&&(r=o+10,(function(y,g,m){var b,x="";for(b=g,m+=g;b<m;b++)x+=String.fromCharCode(y.getUint8(b));return x})(n,o+4,4)==="Exif")){var d=n.getUint16(r);if(((i=d===18761)||d===19789)&&n.getUint16(r+2,i)===42){var f=n.getUint32(r+4,i);f>=8&&(s=r+f)}}if(s){for(var p=n.getUint16(s,i),v=0;v<p;v++)if(u=s+12*v+2,n.getUint16(u,i)===274){u+=8,t=n.getUint16(u,i),n.setUint16(u,1,i);break}}return t}catch{return null}}function c0(e,t){var n=t.getBoundingClientRect(),r=n.left,i=n.top,o={left:0,top:0},s=0;return e.forEach((function(l){o.left+=(l.clientX-r)/e.length,o.top+=(l.clientY-i)/e.length})),e.forEach((function(l){s+=AS({x:o.left,y:o.top},{x:l.clientX-r,y:l.clientY-i})})),{centerMass:o,spread:s,count:e.length}}var US={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=ih(this.processEnd),this.touches=[]},methods:{processMove:function(e,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new Pa({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=c0(t,this.$refs.container),r=this.oldGeometricProperties;r.count===n.count&&r.count>1&&this.$emit("resize",new Pa({left:r.centerMass.left-n.centerMass.left,top:r.centerMass.top-n.centerMass.top},{factor:r.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(e){return this.eventsFilter?this.eventsFilter(e,this.transforming)!==!1:(e.preventDefault(),e.stopPropagation(),!0)},onTouchStart:function(e){if(e.cancelable&&(this.touchMove||this.touchResize&&e.touches.length>1)&&this.processEvent(e)){var t=this.$refs.container,n=t.getBoundingClientRect(),r=n.left,i=n.top,o=n.bottom,s=n.right;this.touches=Zo(e.touches).filter((function(l){return l.clientX>r&&l.clientX<s&&l.clientY>i&&l.clientY<o})),this.oldGeometricProperties=c0(this.touches,t)}},onTouchEnd:function(e){e.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(e){var t=this;if(this.touches.length){var n=Zo(e.touches).filter((function(r){return!r.identifier||t.touches.find((function(i){return i.identifier===r.identifier}))}));this.processEvent(e)&&(this.processMove(e,n),this.processStart())}},onMouseDown:function(e){if(this.mouseMove&&"buttons"in e&&e.buttons===1&&this.processEvent(e)){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(e){this.touches.length&&this.processEvent(e)&&this.processMove(e,[{clientX:e.clientX,clientY:e.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(e){if(this.wheelResize&&this.processEvent(e)){var t=this.$refs.container.getBoundingClientRect(),n=t.left,r=t.top,i=1+this.wheelResize.ratio*(s=e.deltaY||e.detail||e.wheelDelta,(l=+s)==0||$S(l)?l:l>0?1:-1),o={left:e.clientX-n,top:e.clientY-r};this.$emit("resize",new Pa({},{factor:i,center:o})),this.touches.length||this.debouncedProcessEnd()}var s,l}},emits:["resize","move","transform-end"]};US.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:t[2]||(t[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onWheel:t[3]||(t[3]=function(){return o.onWheel&&o.onWheel.apply(o,arguments)})},[mt(e.$slots,"default")],544)};var lh={components:{TransformableImage:US},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};lh.render=function(e,t,n,r,i,o){var s=ft("transformable-image");return C(),Ee(s,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:t[1]||(t[1]=function(l){return e.$emit("move",l)}),onResize:t[2]||(t[2]=function(l){return e.$emit("resize",l)})},{default:Le((function(){return[mt(e.$slots,"default")]})),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Ru=ai("vue-preview"),NS={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Ru({fill:this.fill}),wrapper:Ru("wrapper"),imageWrapper:Ru("image-wrapper"),image:mn(Ru("image"),this.imageClass)}},style:function(){if(this.fill)return{};var e={};return this.width&&(e.width="".concat(this.size.width,"px")),this.height&&(e.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},wrapperStyle:function(){var e={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},imageStyle:function(){if(this.coordinates&&this.image){var e=this.coordinates.width/this.size.width,t=Mt(Mt({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/e,scaleY:1/e}),n=this.imageSize.width,r=this.imageSize.height,i=MS({width:n,height:r},t.rotate),o={width:"".concat(n,"px"),height:"".concat(r,"px"),left:"0px",top:"0px"},s={rotate:{left:(n-i.width)*t.scaleX/2,top:(r-i.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*n/2,top:(1-t.scaleY)*r/2}};return o.transform=`translate(
42
- `.concat(-this.coordinates.left/e-s.rotate.left-s.scale.left,"px,").concat(-this.coordinates.top/e-s.rotate.top-s.scale.top,"px) ")+jS(t),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(e){(e.width||e.height)&&this.onChangeImage()}},mounted:function(){var e=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){e.refreshImage()})),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var e=this.$refs.image;this.calculatedImageSize.height=e.naturalHeight,this.calculatedImageSize.width=e.naturalWidth},refresh:function(){var e=this.$refs.root;this.width||(this.calculatedSize.width=e.clientWidth),this.height||(this.calculatedSize.height=e.clientHeight)},onChangeImage:function(){var e=this.$refs.image;e&&e.complete&&this.refreshImage(),this.refresh()}}};NS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"root",class:o.classes.root,style:o.style},[Z("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[Ct(Z("img",{ref:"image",src:n.image&&n.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[Nr,n.image&&n.image.src]])],6)],6)};var zS={components:{Preview:NS},inheritAttrs:!1};zS.render=function(e,t,n,r,i,o){var s=ft("preview");return C(),Ee(s,Ot(e.$attrs,{fill:!0}),null,16)};var fp=ai("vue-rectangle-stencil"),BS={name:"RectangleStencil",components:{StencilPreview:zS,BoundingBox:FS,DraggableArea:LS},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return ym}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return bm}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:mn(fp({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:mn(fp("preview"),this.previewClass),boundingBox:mn(fp("bounding-box"),this.boundingBoxClass)}},style:function(){var e=this.stencilCoordinates,t=e.height,n=e.width,r=e.left,i=e.top,o={width:"".concat(n,"px"),height:"".concat(t,"px"),transform:"translate(".concat(r,"px, ").concat(i,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(e){this.$emit("move",e),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(e){this.$emit("resize",e),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};BS.render=function(e,t,n,r,i,o){var s=ft("stencil-preview"),l=ft("draggable-area"),u=ft("bounding-box");return C(),Ee("div",{class:o.classes.stencil,style:o.style},[Z(u,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:o.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:Le((function(){return[Z(l,{movable:n.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:Le((function(){return[Z(s,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:o.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]})),_:1},8,["movable","onMove","onMoveEnd"])]})),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var f7=["transitions"],Di=ai("vue-advanced-cropper"),VS={name:"Cropper",components:{BackgroundWrapper:lh},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return BS}},backgroundWrapperComponent:{type:[Object,String],default:function(){return lh}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(e){return HH.indexOf(e)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(e){return!(typeof e=="string"&&e!=="fill"&&e!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(e){var t=e.event,n=e.coordinates,r=e.aspectRatio,i=e.positionRestrictions,o=e.sizeRestrictions,s=nt(nt({},n),{right:n.left+n.width,bottom:n.top+n.height}),l=t.params||{},u=nt({},t.directions),d=l.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(u.left=0,u.right=0),o.heightFrozen&&(u.top=0,u.bottom=0),gi.forEach((function(T){d[T]||(u[T]=0)}));var f=vi(s,u=u0({coordinates:s,directions:u,sizeRestrictions:o,positionRestrictions:i})).width,p=vi(s,u).height,v=l.preserveRatio?Dt(s):up(f/p,r);if(v){var y=l.respectDirection;if(y||(y=s.width>=s.height||v===1?"width":"height"),y==="width"){var g=f/v-s.height;if(d.top&&d.bottom){var m=u.top,b=u.bottom;u.bottom=Au(g,b,m),u.top=Au(g,m,b)}else d.bottom?u.bottom=g:d.top?u.top=g:d.right?u.right=0:d.left&&(u.left=0)}else if(y==="height"){var x=s.width-p*v;if(d.left&&d.right){var S=u.left,O=u.right;u.left=-Au(x,S,O),u.right=-Au(x,O,S)}else d.left?u.left=-x:d.right?u.right=-x:d.top?u.top=0:d.bottom&&(u.bottom=0)}u=u0({directions:u,coordinates:s,sizeRestrictions:o,positionRestrictions:i,preserveRatio:!0,compensate:l.compensate})}return f=vi(s,u).width,p=vi(s,u).height,(v=l.preserveRatio?Dt(s):up(f/p,r))&&Math.abs(v-f/p)>.001&&gi.forEach((function(T){d[T]||(u[T]=0)})),ah({event:new gm({left:-u.left,top:-u.top}),coordinates:{width:n.width+u.right+u.left,height:n.height+u.top+u.bottom,left:n.left,top:n.top},positionRestrictions:i})}},moveAlgorithm:{type:Function,default:ah},initStretcher:{type:Function,default:function(e){var t=e.stretcher,n=e.imageSize,r=Dt(n);t.style.width=n.width+"px",t.style.height=t.clientWidth/r+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(e){var t=e.visibleArea,n=e.coordinates,r=e.aspectRatio,i=e.sizeRestrictions,o=e.positionRestrictions,s=nt(nt({},n),Bi({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,i.minHeight),minWidth:Math.min(t.width,i.minWidth)}}));return s=Cn(s=sr(s,qs(Sn(n),Sn(s))),Bc(Ei(t),o))}},fitVisibleArea:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.getAreaRestrictions,i=e.coordinates,o=nt({},t);o.height=o.width/Dt(n),o.top+=(t.height-o.height)/2,(i.height-o.height>0||i.width-o.width>0)&&(o=zr(o,Math.max(i.height/o.height,i.width/o.width)));var s=Nc(Ys(i,Ei(o=zr(o,zc(o,r({visibleArea:o,type:"resize"}))))));return o.width<i.width&&(s.left=0),o.height<i.height&&(s.top=0),o=Cn(o=sr(o,s),r({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.imageSize,i=e.imageRestriction,o=e.type,s={};return i==="fill-area"?s={left:0,top:0,right:r.width,bottom:r.height}:i==="fit-area"&&(Dt(n)>Dt(r)?(s={top:0,bottom:r.height},t&&o==="move"&&(t.width>r.width?(s.left=-(t.width-r.width)/2,s.right=r.width-s.left):(s.left=0,s.right=r.width))):(s={left:0,right:r.width},t&&o==="move"&&(t.height>r.height?(s.top=-(t.height-r.height)/2,s.bottom=r.height-s.top):(s.top=0,s.bottom=r.height)))),s}},sizeRestrictionsAlgorithm:{type:Function,default:function(e){return{minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.imageSize,n={};return e.imageRestriction!=="none"&&(n={left:0,top:0,right:t.width,bottom:t.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:Mt({},o0)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var e=(function(t){return t*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(e))+Math.abs(this.imageAttributes.height*Math.sin(e)),height:Math.abs(this.imageAttributes.width*Math.sin(e))+Math.abs(this.imageAttributes.height*Math.cos(e))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var e=oh(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:oh(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:e}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var e=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:gn(this.minWidth)?0:Ou(this.minWidth),minHeight:gn(this.minHeight)?0:Ou(this.minHeight),maxWidth:gn(this.maxWidth)?1/0:Ou(this.maxWidth),maxHeight:gn(this.maxHeight)?1/0:Ou(this.maxHeight)});if(e=(function(r){var i=r.areaRestrictions,o=r.sizeRestrictions,s=r.boundaries,l=r.positionRestrictions,u=nt(nt({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});l.left!==void 0&&l.right!==void 0&&(u.maxWidth=Math.min(u.maxWidth,l.right-l.left)),l.bottom!==void 0&&l.top!==void 0&&(u.maxHeight=Math.min(u.maxHeight,l.bottom-l.top));var d=sh(i),f=IS(s,d);return d.width<1/0&&(!u.maxWidth||u.maxWidth>f.width)&&(u.maxWidth=Math.min(u.maxWidth,f.width)),d.height<1/0&&(!u.maxHeight||u.maxHeight>f.height)&&(u.maxHeight=Math.min(u.maxHeight,f.height)),u.minWidth>u.maxWidth&&(u.minWidth=u.maxWidth,u.widthFrozen=!0),u.minHeight>u.maxHeight&&(u.minHeight=u.maxHeight,u.heightFrozen=!0),u})({sizeRestrictions:e,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),n=sh(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));e.maxWidth=Math.min(e.maxWidth,n.width*t.width/this.boundaries.width),e.maxHeight=Math.min(e.maxHeight,n.height*t.height/this.boundaries.height),e.maxWidth<e.minWidth&&(e.minWidth=e.maxWidth),e.maxHeight<e.minHeight&&(e.minHeight=e.maxHeight)}return e}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Di(),image:mn(Di("image"),this.imageClass),stencil:Di("stencil"),boundaries:mn(Di("boundaries"),this.boundariesClass),stretcher:mn(Di("stretcher")),background:mn(Di("background"),this.backgroundClass),foreground:mn(Di("foreground"),this.foregroundClass),imageWrapper:mn(Di("image-wrapper")),cropperWrapper:mn(Di("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var e=this.coordinates,t=e.width,n=e.height,r=e.left,i=e.top;return{width:t/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(i-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var e={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(e.opacity="0"),e},imageStyle:function(){var e=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(e.width-this.imageSize.width)/(2*this.coefficient),top:(e.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*e.width/2,top:(1-1/this.coefficient)*e.height/2},r=Mt(Mt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/e.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/e.height)}),i={width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-n.left-this.imageTransforms.translateX,"px, ").concat(-t.top-n.top-this.imageTransforms.translateY,"px)")+jS(r)};return this.transitionsOptions.enabled&&(i.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),i}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var e=this;this.$nextTick((function(){e.resetCoordinates(),e.runAutoZoom("setCoordinates"),e.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(e,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return e[n]!==t[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=ih(this.update,this.debounce),this.debouncedDisableTransitions=ih(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var e=this.initialized?this.prepareResult(Mt({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:Mt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Mt({},this.visibleArea):null,imageTransforms:t,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Mt({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Pa({},{factor:1/e,center:t}),{normalize:!1,transitions:i})},move:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Pa({left:e||0,top:t||0}),{normalize:!1,transitions:i})},setCoordinates:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,i=r===void 0||r,o=n.transitions,s=o===void 0||o;this.$nextTick((function(){t.imageLoaded?(t.transitionsActive||(s&&t.enableTransitions(),t.coordinates=t.applyTransform(e),i&&t.runAutoZoom("setCoordinates"),s&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=e}))},refresh:function(){var e=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then((function(){e.onChange()})):this.resetVisibleArea().then((function(){e.onChange()}))},reset:function(){var e=this;return this.resetVisibleArea().then((function(){e.onChange(!1)}))},awaitRender:function(e){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){e(),t.awaiting=!1})))},prepareResult:function(e){return this.roundResult?(function(t){var n=t.coordinates,r=t.sizeRestrictions,i=t.positionRestrictions,o={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return o.width>r.maxWidth?o.width=Math.floor(n.width):o.width<r.minWidth&&(o.width=Math.ceil(n.width)),o.height>r.maxHeight?o.height=Math.floor(n.height):o.height<r.minHeight&&(o.height=Math.ceil(n.height)),Cn(o,i)})(Mt(Mt({},this.getPublicProperties()),{},{positionRestrictions:$u(this.positionRestrictions,this.visibleArea),coordinates:e})):e},processAutoZoom:function(e,t,n,r){var i=this.autoZoomAlgorithm;i||(i=this.stencilSize?YH:this.autoZoom?KH:GH);var o=i({event:{type:e,params:r},visibleArea:t,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return Mt(Mt({},o),{},{changed:!s0(o.visibleArea,t)||!s0(o.coordinates,n)})},runAutoZoom:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n!==void 0&&n,i=FH(t,f7),o=this.processAutoZoom(e,this.visibleArea,this.coordinates,i),s=o.visibleArea,l=o.coordinates,u=o.changed;r&&u&&this.enableTransitions(),this.visibleArea=s,this.coordinates=l,r&&u&&this.debouncedDisableTransitions()},normalizeEvent:function(e){return(function(t){var n=t.event,r=t.visibleArea,i=t.coefficient;if(n.type==="manipulateImage")return nt(nt({},n),{move:{left:n.move&&n.move.left?i*n.move.left:0,top:n.move&&n.move.top?i*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*i+r.left,top:n.scale.center.top*i+r.top}:null}});if(n.type==="resize"){var o=nt(nt({},n),{directions:nt({},n.directions)});return gi.forEach((function(l){o.directions[l]*=i})),o}if(n.type==="move"){var s=nt(nt({},n),{directions:nt({},n.directions)});return VH.forEach((function(l){s.directions[l]*=i})),s}return n})(Mt(Mt({},this.getPublicProperties()),{},{event:e}))},getCanvas:function(){if(this.$refs.canvas){var e=this.$refs.canvas,t=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(l,u,d){var f=d.rotate,p=d.flip,v={width:u.naturalWidth,height:u.naturalHeight},y=MS(v,f),g=l.getContext("2d");l.height=y.height,l.width=y.width,g.save();var m=co(Sn(nt({left:0,top:0},v)),f);return g.translate(-(m.left-y.width/2),-(m.top-y.height/2)),g.rotate(f*Math.PI/180),g.translate(p.horizontal?v.width:0,p.vertical?v.height:0),g.scale(p.horizontal?-1:1,p.vertical?-1:1),g.drawImage(u,0,0,v.width,v.height),g.restore(),l})(this.$refs.sourceCanvas,t,this.imageTransforms):t,r=Mt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),i=function(l){return l.find((function(u){return d=u,!Number.isNaN(parseFloat(d))&&isFinite(d);var d}))},o=Bi({sizeRestrictions:{minWidth:i([r.width,r.minWidth])||0,minHeight:i([r.height,r.minHeight])||0,maxWidth:i([r.width,r.maxWidth])||1/0,maxHeight:i([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&o.width*o.height>r.maxArea){var s=Math.sqrt(r.maxArea/(o.width*o.height));o={width:Math.round(s*o.width),height:Math.round(s*o.height)}}return(function(l,u,d,f,p){l.width=f?f.width:d.width,l.height=f?f.height:d.height;var v=l.getContext("2d");v.clearRect(0,0,l.width,l.height),p&&(p.imageSmoothingEnabled&&(v.imageSmoothingEnabled=p.imageSmoothingEnabled),p.imageSmoothingQuality&&(v.imageSmoothingQuality=p.imageSmoothingQuality),p.fillColor&&(v.fillStyle=p.fillColor,v.fillRect(0,0,l.width,l.height),v.save()));var y=d.left<0?-d.left:0,g=d.top<0?-d.top:0;v.drawImage(u,d.left+y,d.top+g,d.width,d.height,y*(l.width/d.width),g*(l.height/d.height),l.width,l.height)})(e,n,this.coordinates,o,r),e}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&t?qH(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&t?$u(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return WH({transform:e,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var e=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?JH:XH);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=ws(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,i=this.defaultPosition||QH,o=[r,function(s){var l=s.coordinates;return Mt({},ws(i)?i({coordinates:l,imageSize:e.imageSize,visibleArea:e.visibleArea}):e.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,Zo(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var e=this;this.imageLoaded=!1,setTimeout((function(){var t=e.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),e.coordinates=e.defaultCoordinates(),e.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var e=this,t=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then((function(){var r={cropper:n,imageSize:e.imageSize};if(ws(e.defaultBoundaries)?e.boundaries=e.defaultBoundaries(r):e.defaultBoundaries==="fit"?e.boundaries=(function(i){var o=i.cropper,s=i.imageSize,l=o.clientHeight,u=o.clientWidth,d=l,f=s.width*l/s.height;return f>u&&(f=u,d=s.height*u/s.width),{width:f,height:d}})(r):e.boundaries=(function(i){var o=i.cropper;return{width:o.clientWidth,height:o.clientHeight}})(r),!e.boundaries.width||!e.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var e=this;return this.appliedImageTransforms=Mt(Mt({},this.defaultImageTransforms),{},{flip:Mt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){e.priority!=="visible-area"&&(e.visibleArea=null,e.resetCoordinates());var t,n,r,i,o,s,l=e.defaultVisibleArea||ZH;e.visibleArea=ws(l)?l({imageSize:e.imageSize,boundaries:e.boundaries,coordinates:e.priority!=="visible-area"?e.coordinates:null,getAreaRestrictions:e.getAreaRestrictions,stencilSize:e.getStencilSize()}):e.defaultVisibleArea,e.visibleArea=(t={visibleArea:e.visibleArea,boundaries:e.boundaries,getAreaRestrictions:e.getAreaRestrictions},n=t.visibleArea,r=t.boundaries,i=t.getAreaRestrictions,o=nt({},n),s=Dt(r),o.width/o.height!==s&&(o.height=o.width/s),Cn(o,i({visibleArea:o,type:"move"}))),e.priority==="visible-area"?e.resetCoordinates():e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("resetVisibleArea")})).catch((function(){e.visibleArea=null}))},updateVisibleArea:function(){var e=this;return this.updateBoundaries().then((function(){e.visibleArea=e.fitVisibleArea({imageSize:e.imageSize,boundaries:e.boundaries,visibleArea:e.visibleArea,coordinates:e.coordinates,getAreaRestrictions:e.getAreaRestrictions}),e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("updateVisibleArea")})).catch((function(){e.visibleArea=null}))},onChange:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var e,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(i){if(r0(i))return!1;var o=window.location,s=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i)||[],l={protocol:s[1]||"",host:s[2]||"",port:s[3]||""},u=function(d){return d.port||((d.protocol||o.protocol)==="http"?80:433)};return!(!l.protocol&&!l.host&&!l.port||l.protocol&&l.protocol==o.protocol&&l.host&&l.host==o.host&&l.host&&u(l)==u(o))})(this.src)){var n=gn(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(e=this.src,new Promise((function(i){c7(e).then((function(o){var s=d7(o);i(o?{source:e,arrayBuffer:o,orientation:s}:{source:e,arrayBuffer:null,orientation:null})})).catch((function(o){console.warn(o),i({source:e,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){r.then(t.onParseImage)}),this.transitionTime)}else setTimeout((function(){t.onParseImage({source:t.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var e=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){e.$emit("ready"),e.onChange(!1)})))},onParseImage:function(e){var t=this,n=e.source,r=e.arrayBuffer,i=e.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&i&&i>1?OS(n)||!r0(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(o){for(var s=[],l=new Uint8Array(o);l.length>0;){var u=l.subarray(0,8192);s.push(String.fromCharCode.apply(null,Array.from?Array.from(u):u.slice())),l=l.subarray(8192)}return"data:image/jpeg;base64,"+btoa(s.join(""))})(r):this.imageAttributes.src=n,ws(this.defaultTransforms)?this.appliedImageTransforms=dp(this.defaultTransforms()):Xu(this.defaultTransforms)?this.appliedImageTransforms=dp(this.defaultTransforms):this.appliedImageTransforms=(function(o){var s=dp({});if(o)switch(o){case 2:s.flip.horizontal=!0;break;case 3:s.rotate=-180;break;case 4:s.flip.vertical=!0;break;case 5:s.rotate=90,s.flip.vertical=!0;break;case 6:s.rotate=90;break;case 7:s.rotate=90,s.flip.horizontal=!0;break;case 8:s.rotate=-90}return s})(i),this.defaultImageTransforms=Mt(Mt({},this.appliedImageTransforms),{},{flip:Mt({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var o=t.$refs.image;o&&o.complete&&((function(s){return!!s.naturalWidth})(o)?t.onSuccessLoadImage():t.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(e){var t=this;this.transitionsOptions.enabled||this.awaitRender((function(){t.coordinates=t.moveAlgorithm(Mt(Mt({},t.getPublicProperties()),{},{positionRestrictions:$u(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(e)})),t.onChange()}))},onResize:function(e){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=t.sizeRestrictions,r=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(Mt(Mt({},t.getPublicProperties()),{},{positionRestrictions:$u(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,t.visibleArea.width),maxHeight:Math.min(n.maxHeight,t.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:t.normalizeEvent(e)})),t.onChange(),t.ticking=!1}))},onManipulateImage:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=t.transitions,r=n!==void 0&&n,i=t.normalize,o=i===void 0||i;r&&this.enableTransitions();var s=e7(Mt(Mt({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(e):e,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),l=s.visibleArea,u=s.coordinates;this.visibleArea=l,this.coordinates=u,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.visibleArea,n=e.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:r})},getAspectRatio:function(e){var t,n,r=this.stencilProps,i=r.aspectRatio,o=r.minAspectRatio,s=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var l=this.$refs.stencil.aspectRatios();t=l.minimum,n=l.maximum}if(gn(t)&&(t=gn(i)?o:i),gn(n)&&(n=gn(i)?s:i),!e&&(gn(t)||gn(n))){var u=this.getStencilSize(),d=u?Dt(u):null;gn(t)&&(t=i0(d)?d:void 0),gn(n)&&(n=i0(d)?d:void 0)}return{minimum:t,maximum:n}},getStencilSize:function(){if(this.stencilSize)return e={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=e.boundaries,n=e.stencilSize,r=e.aspectRatio,up(Dt(i=ws(n)?n({boundaries:t,aspectRatio:r}):n),r)&&(i=Bi({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(i.width>t.width||i.height>t.height)&&(i=Bi({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:Dt(i),maximum:Dt(i)}})),i;var e,t,n,r,i},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return Mt({},o0)},flip:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;if(!this.transitionsActive){i&&this.enableTransitions();var o=Mt({},this.imageTransforms.flip),s=n7({flip:{horizontal:e?!o.horizontal:o.horizontal,vertical:t?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),l=s.visibleArea,u=s.coordinates;e&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=l,this.coordinates=u,this.onChange(),i&&this.debouncedDisableTransitions()}},rotate:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var i=Mt({},this.imageSize);this.appliedImageTransforms.rotate+=e;var o=t7({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:i,imageSize:this.imageSize,angle:e,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=o.visibleArea,l=o.coordinates,u=this.processAutoZoom("rotateImage",s,l);s=u.visibleArea,l=u.coordinates,this.visibleArea=s,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},p7={key:0,ref:"canvas",style:{display:"none"}},h7={key:1,ref:"sourceCanvas",style:{display:"none"}};VS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"cropper",class:o.classes.cropper},[Z("div",{ref:"stretcher",class:o.classes.stretcher},null,2),Z("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(C(),Ee(Pn(n.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:Le((function(){return[Z("div",{class:o.classes.background,style:o.boundariesStyle},null,6),Z("div",{class:o.classes.imageWrapper},[Z("img",{ref:"image",crossorigin:i.imageAttributes.crossOrigin,src:i.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:t[1]||(t[1]=ht((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),Z("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),Ct((C(),Ee(Pn(n.stencilComponent),Ot({ref:"stencil",image:o.image,coordinates:i.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},n.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Nr,i.imageLoaded]]),n.canvas?(C(),Ee("canvas",p7,null,512)):Se("",!0),n.canvas?(C(),Ee("canvas",h7,null,512)):Se("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const wr=(e,t)=>{const{o:n,i:r,u:i}=e;let o=n,s;const l=(f,p)=>{const v=o,y=f,g=p||(r?!r(v,y):v!==y);return(g||i)&&(o=y,s=v),[o,g,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},m7=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,nr=m7?window:{},HS=Math.max,v7=Math.min,uh=Math.round,po=Math.abs,d0=Math.sign,wm=nr.cancelAnimationFrame,qa=nr.requestAnimationFrame,Em=nr.setTimeout,qS=nr.clearTimeout,Vc=e=>typeof nr[e]<"u"?nr[e]:void 0,g7=Vc("MutationObserver"),f0=Vc("IntersectionObserver"),Os=Vc("ResizeObserver"),Ra=Vc("ScrollTimeline"),Sm=e=>e===void 0,Hc=e=>e===null,vo=e=>typeof e=="number",na=e=>typeof e=="string",qc=e=>typeof e=="boolean",li=e=>typeof e=="function",Vr=e=>Array.isArray(e),hc=e=>typeof e=="object"&&!Vr(e)&&!Hc(e),Cm=e=>{const t=!!e&&e.length,n=vo(t)&&t>-1&&t%1==0;return Vr(e)||!li(e)&&n?t>0&&hc(e)?t-1 in e:!0:!1},Wa=e=>!!e&&e.constructor===Object,mc=e=>e instanceof HTMLElement,Wc=e=>e instanceof Element;function zt(e,t){if(Cm(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&zt(Object.keys(e),(n=>t(e[n],n,e)));return e}const WS=(e,t)=>e.indexOf(t)>=0,Ks=(e,t)=>e.concat(t),en=(e,t,n)=>(!na(t)&&Cm(t)?Array.prototype.push.apply(e,t):e.push(t),e),To=e=>Array.from(e||[]),xm=e=>Vr(e)?e:!na(e)&&Cm(e)?To(e):[e],vc=e=>!!e&&!e.length,gc=e=>To(new Set(e)),Sr=(e,t,n)=>{zt(e,i=>i?i.apply(void 0,t||[]):!0),n||(e.length=0)},YS="paddingTop",KS="paddingRight",GS="paddingLeft",QS="paddingBottom",XS="marginLeft",JS="marginRight",ZS="marginBottom",Tm="overflowX",km="overflowY",dl="width",fl="height",Ui="visible",ti="hidden",Ko="scroll",_7=e=>{const t=String(e||"");return t?t[0].toUpperCase()+t.slice(1):""},Yc=(e,t,n,r)=>{if(e&&t){let i=!0;return zt(n,(o=>{const s=e[o],l=t[o];s!==l&&(i=!1)})),i}return!1},Om=(e,t)=>Yc(e,t,["w","h"]),Ju=(e,t)=>Yc(e,t,["x","y"]),y7=(e,t)=>Yc(e,t,["t","r","b","l"]),dt=(e,...t)=>e.bind(0,...t),$s=e=>{let t;const n=e?Em:qa,r=e?qS:wm;return[i=>{r(t),t=n((()=>i()),li(e)?e():e)},()=>r(t)]},p0=e=>{const t=li(e)?e():e;if(vo(t)){const n=t?Em:qa,r=t?qS:wm;return i=>{const o=n((()=>i()),t);return()=>{r(o)}}}return t&&t._},eC=(e,t)=>{const{p:n,v:r,S:i,m:o}=t||{};let s,l,u,d;const f=function(m){l&&l(),s&&s(),d=l=s=u=void 0,e.apply(this,m)},p=g=>o&&u?o(u,g):g,v=()=>{l&&u&&f(p(u)||u)},y=function(){const m=To(arguments),b=p0(n);if(b){const x=typeof i=="function"?i():i,S=p0(r),T=p(m)||m,A=f.bind(0,T);l&&l(),x&&!d?(A(),d=!0,l=b((()=>d=void 0))):(l=b(A),S&&!s&&(s=S(v))),u=T}else f(m)};return y.O=v,y},tC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Zn=e=>e?Object.keys(e):[],Ft=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||Hc(e))&&!li(e)&&(e={}),zt(l,(u=>{zt(u,((d,f)=>{const p=u[f];if(e===p)return!0;const v=Vr(p);if(p&&Wa(p)){const y=e[f];let g=y;v&&!Vr(y)?g=[]:!v&&!Wa(y)&&(g={}),e[f]=Ft(g,p)}else e[f]=v?p.slice():p}))})),e},nC=(e,t)=>zt(Ft({},e),((n,r,i)=>{n===void 0?delete i[r]:n&&Wa(n)&&(i[r]=nC(n))})),$m=e=>!Zn(e).length,Ya=()=>{},rC=(e,t,n)=>HS(e,v7(t,n)),Go=e=>gc((Vr(e)?e:(e||"").split(" ")).filter((t=>t))),Am=(e,t)=>e&&e.getAttribute(t),h0=(e,t)=>e&&e.hasAttribute(t),Li=(e,t,n)=>{zt(Go(t),(r=>{e&&e.setAttribute(r,String(n||""))}))},pi=(e,t)=>{zt(Go(t),(n=>e&&e.removeAttribute(n)))},Kc=(e,t)=>{const n=Go(Am(e,t)),r=dt(Li,e,t),i=(o,s)=>{const l=new Set(n);return zt(Go(o),(u=>{l[s](u)})),To(l).join(" ")};return{C:o=>r(i(o,"delete")),$:o=>r(i(o,"add")),H:o=>{const s=Go(o);return s.reduce(((l,u)=>l&&n.includes(u)),s.length>0)}}},iC=(e,t,n)=>(Kc(e,t).C(n),dt(Rm,e,t,n)),Rm=(e,t,n)=>(Kc(e,t).$(n),dt(iC,e,t,n)),_c=(e,t,n,r)=>(r?Rm:iC)(e,t,n),Pm=(e,t,n)=>Kc(e,t).H(n),oC=e=>Kc(e,"class"),sC=(e,t)=>{oC(e).C(t)},Gc=(e,t)=>(oC(e).$(t),dt(sC,e,t)),aC=(e,t)=>{const n=t?Wc(t)&&t:document;return n?To(n.querySelectorAll(e)):[]},b7=(e,t)=>{const n=t?Wc(t)&&t:document;return n&&n.querySelector(e)},ch=(e,t)=>Wc(e)&&e.matches(t),lC=e=>ch(e,"body"),dh=e=>e?To(e.childNodes):[],Ka=e=>e&&e.parentElement,As=(e,t)=>Wc(e)&&e.closest(t),fh=e=>document.activeElement,w7=(e,t,n)=>{const r=As(e,t),i=e&&b7(n,r),o=As(i,t)===r;return r&&i?r===e||i===e||o&&As(As(e,n),t)!==r:!1},Gs=e=>{zt(xm(e),(t=>{const n=Ka(t);t&&n&&n.removeChild(t)}))},Vn=(e,t)=>dt(Gs,e&&t&&zt(xm(t),(n=>{n&&e.appendChild(n)})));let uC;const E7=()=>uC,S7=e=>{uC=e},Ms=e=>{const t=document.createElement("div");return Li(t,"class",e),t},Im=e=>{const t=Ms(),n=E7(),r=e.trim();return t.innerHTML=n?n.createHTML(r):r,zt(dh(t),(i=>Gs(i)))},m0=(e,t)=>e.getPropertyValue(t)||e[t]||"",cC=e=>{const t=e||0;return isFinite(t)?t:0},Pu=e=>cC(parseFloat(e||"")),ph=e=>Math.round(e*1e4)/1e4,dC=e=>`${ph(cC(e))}px`;function Qs(e,t){e&&t&&zt(t,((n,r)=>{try{const i=e.style,o=Hc(n)||qc(n)?"":vo(n)?dC(n):n;r.indexOf("--")===0?i.setProperty(r,o):i[r]=o}catch{}}))}function Si(e,t,n){const r=na(t);let i=r?"":{};if(e){const o=nr.getComputedStyle(e,n)||e.style;i=r?m0(o,t):To(t).reduce(((s,l)=>(s[l]=m0(o,l),s)),i)}return i}const v0=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,u=`${r}left${i}`,d=Si(e,[o,s,l,u]);return{t:Pu(d[o]),r:Pu(d[s]),b:Pu(d[l]),l:Pu(d[u])}},pp=(e,t)=>`translate${hc(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,C7=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),x7={w:0,h:0},Qc=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:x7,T7=e=>Qc("inner",e||nr),go=dt(Qc,"offset"),fC=dt(Qc,"client"),yc=dt(Qc,"scroll"),Mm=e=>{const t=parseFloat(Si(e,dl))||0,n=parseFloat(Si(e,fl))||0;return{w:t-uh(t),h:n-uh(n)}},hp=e=>e.getBoundingClientRect(),k7=e=>!!e&&C7(e),hh=e=>!!(e&&(e[fl]||e[dl])),pC=(e,t)=>{const n=hh(e);return!hh(t)&&n},g0=(e,t,n,r)=>{zt(Go(t),(i=>{e&&e.removeEventListener(i,n,r)}))},Ht=(e,t,n,r)=>{var i;const o=(i=r&&r.D)!=null?i:!0,s=r&&r.I||!1,l=r&&r.A||!1,u={passive:o,capture:s};return dt(Sr,Go(t).map((d=>{const f=l?p=>{g0(e,d,f,s),n&&n(p)}:n;return e&&e.addEventListener(d,f,u),dt(g0,e,d,f,s)})))},Dm=e=>e.stopPropagation(),mh=e=>e.preventDefault(),hC=e=>Dm(e)||mh(e),Ur=(e,t)=>{const{x:n,y:r}=vo(t)?{x:t,y:t}:t||{};vo(n)&&(e.scrollLeft=n),vo(r)&&(e.scrollTop=r)},Er=e=>({x:e.scrollLeft,y:e.scrollTop}),mC=()=>({T:{x:0,y:0},k:{x:0,y:0}}),O7=(e,t)=>{const{T:n,k:r}=e,{w:i,h:o}=t,s=(p,v,y)=>{let g=d0(p)*y,m=d0(v)*y;if(g===m){const b=po(p),x=po(v);m=b>x?0:m,g=b<x?0:g}return g=g===m?0:g,[g+0,m+0]},[l,u]=s(n.x,r.x,i),[d,f]=s(n.y,r.y,o);return{T:{x:l,y:d},k:{x:u,y:f}}},mp=({T:e,k:t})=>{const n=(r,i)=>r===0&&r<=i;return{x:n(e.x,t.x),y:n(e.y,t.y)}},_0=({T:e,k:t},n)=>{const r=(i,o,s)=>rC(0,1,(i-s)/(i-o)||0);return{x:r(e.x,t.x,n.x),y:r(e.y,t.y,n.y)}},vh=e=>{e&&e.focus&&e.focus({preventScroll:!0,focusVisible:!1})},y0=(e,t)=>{zt(xm(t),e)},gh=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);y0((u=>{l&&l[u?"delete":"clear"](u)}),s)}else t.forEach((l=>{l.clear()})),t.clear()},r=(o,s)=>{if(na(o)){const d=t.get(o)||new Set;return t.set(o,d),y0((f=>{li(f)&&d.add(f)}),s),dt(n,o,s)}qc(s)&&s&&n();const l=Zn(o),u=[];return zt(l,(d=>{const f=o[d];f&&en(u,r(d,f))})),dt(Sr,u)},i=(o,s)=>{zt(To(t.get(o)),(l=>{s&&!vc(s)?l.apply(0,s):l()}))};return r(e||{}),[r,n,i]},vC={},gC={},$7=e=>{zt(e,(t=>zt(t,((n,r)=>{vC[r]=t[r]}))))},_C=(e,t,n)=>Zn(e).map((r=>{const{static:i,instance:o}=e[r],[s,l,u]=n||[],d=n?o:i;if(d){const f=n?d(s,l,t):d(t);return(u||gC)[r]=f}})),A7=(e,t)=>e[t],ra=e=>A7(gC,e),R7="__osOptionsValidationPlugin",ia="data-overlayscrollbars",Zu="os-environment",Iu=`${Zu}-scrollbar-hidden`,vp=`${ia}-initialize`,ec="noClipping",b0=`${ia}-body`,_o=ia,P7="host",ji=`${ia}-viewport`,I7=Tm,M7=km,D7="arrange",yC="measuring",F7="scrolling",bC="scrollbarHidden",L7="noContent",_h=`${ia}-padding`,w0=`${ia}-content`,Fm="os-size-observer",j7=`${Fm}-appear`,Lm=`${Fm}-listener`,U7=`${Lm}-scroll`,tc=`${Lm}-item`,E0=`${tc}-final`,N7="os-trinsic-observer",z7="os-theme-none",Cr="os-scrollbar",B7=`${Cr}-rtl`,V7=`${Cr}-horizontal`,H7=`${Cr}-vertical`,wC=`${Cr}-track`,jm=`${Cr}-handle`,q7=`${Cr}-visible`,W7=`${Cr}-cornerless`,S0=`${Cr}-interaction`,C0=`${Cr}-unusable`,yh=`${Cr}-auto-hide`,Y7=`${yh}-hidden`,x0=`${Cr}-wheel`,K7=`${wC}-interactive`,G7=`${jm}-interactive`,EC="__osSizeObserverPlugin",Q7={[EC]:{static:()=>(e,t,n)=>{const i="scroll",o=Im(`<div class="${tc}" dir="ltr"><div class="${tc}"><div class="${E0}"></div></div><div class="${tc}"><div class="${E0}" style="width: 200%; height: 200%"></div></div></div>`),s=o[0],l=s.lastChild,u=s.firstChild,d=u?.firstChild;let f=go(s),p=f,v=!1,y;const g=()=>{Ur(u,3333333),Ur(l,3333333)},m=S=>{y=0,v&&(f=p,t(S===!0))},b=S=>{p=go(s),v=!S||!Om(p,f),S?(Dm(S),v&&!y&&(wm(y),y=qa(m))):m(S===!1),g()},x=[Vn(e,o),Ht(u,i,b),Ht(l,i,b)];return Gc(e,U7),Qs(d,{[dl]:3333333,[fl]:3333333}),qa(g),[n?dt(b,!1):g,x]}}},X7=(e,t)=>{const{M:n}=t,[r,i]=e("showNativeOverlaidScrollbars");return[r&&n.x&&n.y,i]},Rs=e=>e.indexOf(Ui)===0,J7=e=>e.replace(`${Ui}-`,""),bh=(e,t)=>{if(e==="auto")return t?Ko:ti;const n=e||ti;return[ti,Ko,Ui].includes(n)?n:ti},Z7=(e,t)=>{const{overflowX:n,overflowY:r}=Si(e,[Tm,km]);return{x:bh(n,t.x),y:bh(r,t.y)}},Um="__osScrollbarsHidingPlugin",e9="__osClickScrollPlugin",T0=e=>JSON.stringify(e,((t,n)=>{if(li(n))throw 0;return n})),k0=(e,t)=>e?`${t}`.split(".").reduce(((n,r)=>n&&tC(n,r)?n[r]:void 0),e):void 0,t9=[0,33],SC=[33,99],CC=[222,666,!0],n9={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:t9,resize:null,event:SC,env:CC},attributes:null,ignoreMutation:null,flowDirectionStyles:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},xC=(e,t)=>{const n={},r=Ks(Zn(t),Zn(e));return zt(r,(i=>{const o=e[i],s=t[i];if(hc(o)&&hc(s))Ft(n[i]={},xC(o,s)),$m(n[i])&&delete n[i];else if(tC(t,i)&&s!==o){let l=!0;if(Vr(o)||Vr(s))try{T0(o)===T0(s)&&(l=!1)}catch{}l&&(n[i]=s)}})),n},gp=(e,t,n)=>r=>[k0(e,r),n||k0(t,r)!==void 0];let TC;const r9=()=>TC,i9=e=>{TC=e};let _p;const o9=()=>{const e=(T,A,M)=>{Vn(document.body,T),Vn(document.body,T);const z=fC(T),Y=go(T),ve=Mm(A);return M&&Gs(T),{x:Y.h-z.h+ve.h,y:Y.w-z.w+ve.w}},t=T=>{let A=!1;const M=Gc(T,Iu);try{A=Si(T,"scrollbar-width")==="none"||Si(T,"display","::-webkit-scrollbar")==="none"}catch{}return M(),A},n=`.${Zu}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Zu} div{width:200%;height:200%;margin:10px 0}.${Iu}{scrollbar-width:none!important}.${Iu}::-webkit-scrollbar,.${Iu}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,i=Im(`<div class="${Zu}"><div></div><style>${n}</style></div>`)[0],o=i.firstChild,s=i.lastChild,l=r9();l&&(s.nonce=l);const[u,,d]=gh(),[f,p]=wr({o:e(i,o),i:Ju},dt(e,i,o,!0)),[v]=p(),y=t(i),g={x:v.x===0,y:v.y===0},m={elements:{host:null,padding:!y,viewport:T=>y&&lC(T)&&T,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},b=Ft({},n9),x=dt(Ft,{},b),S=dt(Ft,{},m),O={U:v,M:g,P:y,J:!!Ra,G:dt(u,"r"),K:S,Z:T=>Ft(m,T)&&S(),tt:x,nt:T=>Ft(b,T)&&x(),ot:Ft({},m),st:Ft({},b)};if(pi(i,"style"),Gs(i),Ht(nr,"resize",(()=>{d("r",[])})),li(nr.matchMedia)&&!y&&(!g.x||!g.y)){const T=A=>{const M=nr.matchMedia(`(resolution: ${nr.devicePixelRatio}dppx)`);Ht(M,"change",(()=>{A(),T(A)}),{A:!0})};T((()=>{const[A,M]=f();Ft(O.U,A),d("r",[M])}))}return O},xi=()=>(_p||(_p=o9()),_p),s9=(e,t,n)=>{let r=!1;const i=n?new WeakMap:!1,o=()=>{r=!0},s=l=>{if(i&&n){const u=n.map((d=>{const[f,p]=d||[];return[p&&f?(l||aC)(f,e):[],p]}));zt(u,(d=>zt(d[0],(f=>{const p=d[1],v=i.get(f)||[];if(e.contains(f)&&p){const g=Ht(f,p,(m=>{r?(g(),i.delete(f)):t(m)}));i.set(f,en(v,g))}else Sr(v),i.delete(f)}))))}};return s(),[o,s]},O0=(e,t,n,r)=>{let i=!1;const{et:o,ct:s,rt:l,it:u,lt:d,ut:f}=r||{},[p,v]=s9(e,(()=>i&&n(!0)),l),y=o||[],g=s||[],m=Ks(y,g),b=(S,O)=>{if(!vc(O)){const T=d||Ya,A=f||Ya,M=[],z=[];let Y=!1,ve=!1;if(zt(O,(W=>{const{attributeName:X,target:K,type:L,oldValue:D,addedNodes:ne,removedNodes:le}=W,je=L==="attributes",J=L==="childList",j=e===K,de=je&&X,U=de&&Am(K,X||""),ee=na(U)?U:null,Q=de&&D!==ee,B=WS(g,X)&&Q;if(t&&(J||!j)){const oe=je&&Q,V=oe&&u&&ch(K,u),F=(V?!T(K,X,D,ee):!je||oe)&&!A(W,!!V,e,r);zt(ne,(G=>en(M,G))),zt(le,(G=>en(M,G))),ve=ve||F}!t&&j&&Q&&!T(K,X,D,ee)&&(en(z,X),Y=Y||B)})),v((W=>gc(M).reduce(((X,K)=>(en(X,aC(W,K)),ch(K,W)?en(X,K):X)),[]))),t)return!S&&ve&&n(!1),[!1];if(!vc(z)||Y){const W=[gc(z),Y];return S||n.apply(0,W),W}}},x=new g7(dt(b,!1));return[()=>(x.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:m,subtree:t,childList:t,characterData:t}),i=!0,()=>{i&&(p(),x.disconnect(),i=!1)}),()=>{if(i)return b(!0,x.takeRecords())}]};let Uo=null;const kC=(e,t,n)=>{const{ft:r}=n||{},i=ra(EC),[o]=wr({o:!1,u:!0});return()=>{const s=[],u=Im(`<div class="${Fm}"><div class="${Lm}"></div></div>`)[0],d=u.firstChild,f=p=>{const v=Vr(p)&&!vc(p);let y=!1,g=!1;if(v){const m=p[0],[b,,x]=o(m.contentRect),S=hh(b);g=pC(b,x),y=!g&&!S}else g=p===!0;y||t({_t:!0,ft:g})};if(Os){if(!qc(Uo)){const g=new Os(Ya);g.observe(e,{get box(){Uo=!0}}),Uo=Uo||!1,g.disconnect()}const p=eC(f,{p:0,v:0}),v=g=>p(g),y=new Os(v);if(y.observe(Uo?e:d),en(s,[()=>{y.disconnect()},!Uo&&Vn(e,u)]),Uo){const g=new Os(v);g.observe(e,{box:"border-box"}),en(s,(()=>g.disconnect()))}}else if(i){const[p,v]=i(d,f,r);en(s,Ks([Gc(u,j7),Ht(u,"animationstart",p),Vn(e,u)],v))}else return Ya;return dt(Sr,s)}},a9=(e,t)=>{let n;const r=u=>u.h===0||u.isIntersecting||u.intersectionRatio>0,i=Ms(N7),[o]=wr({o:!1}),s=(u,d)=>{if(u){const f=o(r(u)),[,p]=f;return p&&!d&&t(f)&&[f]}},l=(u,d)=>s(d.pop(),u);return[()=>{const u=[];if(f0)n=new f0(dt(l,!1),{root:e}),n.observe(i),en(u,(()=>{n.disconnect()}));else{const d=()=>{const f=go(i);s(f)};en(u,kC(i,d)()),d()}return dt(Sr,en(u,Vn(e,i)))},()=>n&&l(!0,n.takeRecords())]},l9=(e,t,n,r)=>{let i,o,s,l,u,d,f,p;const v=`[${_o}]`,y=`[${ji}]`,g=["id","class","style","open","wrap","cols","rows"],{dt:m,vt:b,L:x,gt:S,ht:O,V:T,bt:A,yt:M,wt:z,St:Y}=e,ve=P=>Si(P,"direction")==="rtl",W=()=>{let P,F,G;const N=eC(r,{p:()=>P,v:()=>F,S:()=>G,m(ge,fe){const[pe]=ge,[Ce]=fe;return[Ks(Zn(pe),Zn(Ce)).reduce((($e,Ke)=>($e[Ke]=pe[Ke]||Ce[Ke],$e)),{})]}}),ie=(ge,fe)=>{if(Vr(fe)){const[pe,Ce,$e]=fe;P=pe,F=Ce,G=$e}else vo(fe)?(P=fe,F=!1,G=!1):(P=!1,F=!1,G=!1);N(ge)};return ie.O=N.O,ie},X={Ot:!1,B:ve(m)},K=xi(),L=ra(Um),[D]=wr({i:Om,o:{w:0,h:0}},(()=>{const P=L&&L.R(e,t,X,K,n).Y,G=!(A&&T)&&Pm(b,_o,ec),N=!T&&M(D7),ie=N&&Er(S),ge=ie&&Y(),fe=z(yC,G),pe=N&&P&&P(),Ce=yc(x),$e=Mm(x);return pe&&pe(),Ur(S,ie),ge&&ge(),G&&fe(),{w:Ce.w+$e.w,h:Ce.h+$e.h}})),ne=W(),le=P=>{const F=ve(m);Ft(P,{Ct:p!==F}),Ft(X,{B:F}),p=F},je=(P,F)=>{const[G,N]=P,ie={$t:N};return Ft(X,{Ot:G}),F||r(ie),ie},J=({_t:P,ft:F})=>{const G=F?r:ne,N={_t:P||F,ft:F};le(N),G(N,o)},j=(P,F)=>{const[,G]=D(),N={xt:G};return le(N),G&&!F&&ne(N,P?s:i),N},de=(P,F,G)=>{const N={Ht:F};return le(N),F&&!G&&ne(N,i),N},[U,ee]=O?a9(b,je):[],Q=!T&&kC(b,J,{ft:!0}),[B,oe]=O0(b,!1,de,{ct:g,et:g}),V=T&&Os&&new Os((P=>{const F=P[P.length-1].contentRect;J({_t:!0,ft:pC(F,f)}),f=F}));return[()=>{V&&V.observe(b);const P=Q&&Q(),F=U&&U(),G=B(),N=K.G((ie=>{const[,ge]=D();ne({Et:ie,xt:ge,_t:A},l)}));return()=>{V&&V.disconnect(),P&&P(),F&&F(),d&&d(),G(),N()}},({Dt:P,zt:F,It:G})=>{const N={},[ie]=P("update.ignoreMutation"),[ge,fe]=P("update.attributes"),[pe,Ce]=P("update.elementEvents"),[$e,Ke]=P("update.debounce"),Ne=Ce||fe,tt=F||G,Ge=Ze=>li(ie)&&!!ie(Ze);if(Ne){u&&u(),d&&d();const[Ze,Pt]=O0(O||x,!0,j,{et:Ks(g,ge||[]),rt:pe,it:v,ut:(St,Nt)=>{const{target:It,attributeName:qt}=St;return(!Nt&&qt&&!T?w7(It,v,y):!1)||!!As(It,`.${Cr}`)||Ge(St)}});d=Ze(),u=Pt}if(Ke&&(ne.O(),Vr($e)||vo($e)?(i=$e,o=!1,s=SC,l=CC):Wa($e)?(i=$e.mutation,o=$e.resize,s=$e.event,l=$e.env):(i=!1,o=!1,s=!1,l=!1)),tt){const Ze=oe(),Pt=ee&&ee(),St=u&&u();Ze&&Ft(N,de(Ze[0],Ze[1],tt)),Pt&&Ft(N,je(Pt[0],tt)),St&&Ft(N,j(St[0],tt))}return le(N),N},X]},OC=(e,t)=>li(t)?t.apply(0,e):t,u9=(e,t,n,r)=>{const i=Sm(r)?n:r;return OC(e,i)||t.apply(0,e)},$C=(e,t,n,r)=>{const i=Sm(r)?n:r,o=OC(e,i);return!!o&&(mc(o)?o:t.apply(0,e))},c9=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{M:i,P:o,K:s}=xi(),{nativeScrollbarsOverlaid:l,body:u}=s().cancel,d=n??l,f=Sm(r)?u:r,p=(i.x||i.y)&&d,v=e&&(Hc(f)?!o:f);return!!p||!!v},d9=(e,t,n,r)=>{const i="--os-viewport-percent",o="--os-scroll-percent",s="--os-scroll-direction",{K:l}=xi(),{scrollbars:u}=l(),{slot:d}=u,{dt:f,vt:p,L:v,At:y,gt:g,bt:m,V:b}=t,{scrollbars:x}=y?{}:e,{slot:S}=x||{},O=[],T=[],A=[],M=$C([f,p,v],(()=>b&&m?f:p),d,S),z=U=>{if(Ra){let ee=null,Q=[];const B=new Ra({source:g,axis:U}),oe=()=>{ee&&ee.cancel(),ee=null};return{Mt:P=>{const{Tt:F}=n,G=mp(F)[U],N=U==="x",ie=[pp(0,N),pp(`calc(-100% + 100cq${N?"w":"h"})`,N)],ge=G?ie:ie.reverse();return Q[0]===ge[0]&&Q[1]===ge[1]||(Q=ge,oe(),ee=P.kt.animate({clear:["left"],transform:ge},{timeline:B})),oe}}}},Y={x:z("x"),y:z("y")},ve=()=>{const{Rt:U,Vt:ee}=n,Q=(B,oe)=>rC(0,1,B/(B+oe)||0);return{x:Q(ee.x,U.x),y:Q(ee.y,U.y)}},W=(U,ee,Q)=>{const B=Q?Gc:sC;zt(U,(oe=>{B(oe.Lt,ee)}))},X=(U,ee)=>{zt(U,(Q=>{const[B,oe]=ee(Q);Qs(B,oe)}))},K=(U,ee,Q)=>{const B=qc(Q),oe=B?Q:!0,V=B?!Q:!0;oe&&W(T,U,ee),V&&W(A,U,ee)},L=()=>{const U=ve(),ee=Q=>B=>[B.Lt,{[i]:ph(Q)+""}];X(T,ee(U.x)),X(A,ee(U.y))},D=()=>{if(!Ra){const{Tt:U}=n,ee=_0(U,Er(g)),Q=B=>oe=>[oe.Lt,{[o]:ph(B)+""}];X(T,Q(ee.x)),X(A,Q(ee.y))}},ne=()=>{const{Tt:U}=n,ee=mp(U),Q=B=>oe=>[oe.Lt,{[s]:B?"0":"1"}];X(T,Q(ee.x)),X(A,Q(ee.y)),Ra&&(T.forEach(Y.x.Mt),A.forEach(Y.y.Mt))},le=()=>{if(b&&!m){const{Rt:U,Tt:ee}=n,Q=mp(ee),B=_0(ee,Er(g)),oe=V=>{const{Lt:P}=V,F=Ka(P)===v&&P,G=(N,ie,ge)=>{const fe=ie*N;return dC(ge?fe:-fe)};return[F,F&&{transform:pp({x:G(B.x,U.x,Q.x),y:G(B.y,U.y,Q.y)})}]};X(T,oe),X(A,oe)}},je=U=>{const ee=U?"x":"y",B=Ms(`${Cr} ${U?V7:H7}`),oe=Ms(wC),V=Ms(jm),P={Lt:B,Pt:oe,kt:V},F=Y[ee];return en(U?T:A,P),en(O,[Vn(B,oe),Vn(oe,V),dt(Gs,B),F&&F.Mt(P),r(P,K,U)]),P},J=dt(je,!0),j=dt(je,!1),de=()=>(Vn(M,T[0].Lt),Vn(M,A[0].Lt),dt(Sr,O));return J(),j(),[{Ut:L,Nt:D,qt:ne,Bt:le,Ft:K,jt:{Xt:T,Yt:J,Wt:dt(X,T)},Jt:{Xt:A,Yt:j,Wt:dt(X,A)}},de]},f9=(e,t,n,r,i)=>(o,s,l)=>{const{vt:u,L:d,V:f,gt:p,Gt:v,St:y}=t,{Lt:g,Pt:m,kt:b}=o,[x,S]=$s(333),[O,T]=$s(444),A=Y=>{li(p.scrollBy)&&p.scrollBy({behavior:"smooth",left:Y.x,top:Y.y})},M=()=>{const Y="pointerup pointercancel lostpointercapture",ve=`client${l?"X":"Y"}`,W=l?dl:fl,X=l?"left":"top",K=l?"w":"h",L=l?"x":"y",D=[];return Ht(m,"pointerdown",r((ne=>{const le=As(ne.target,`.${jm}`)===b,je=le?b:m,J=e.scrollbars,j=J[le?"dragScroll":"clickScroll"],{button:de,isPrimary:U,pointerType:ee}=ne,{pointers:Q}=J;if(de===0&&U&&j&&(Q||[]).includes(ee)){Sr(D),T();const oe=!le&&(ne.shiftKey||j==="instant"),V=dt(hp,b),P=dt(hp,m),F=(It,qt)=>(It||V())[X]-(qt||P())[X],G=uh(hp(p)[W])/go(p)[K]||1,N=Er(p)[L],ie=It=>{Ur(p,{[L]:N+It})},ge=It=>{const{Rt:qt}=n,Gt=go(m)[K]-go(b)[K],Wt=1/G*It/Gt;ie(Wt*qt[L])},fe=ne[ve],pe=V(),Ce=P(),$e=pe[W],Ke=F(pe,Ce)+$e/2,tt=fe-Ce[X]-Ke,Ge=le?0:tt,Ze=It=>{Sr(Nt),je.releasePointerCapture(It.pointerId)},Pt=le||oe,St=y(),Nt=[Ht(v,Y,Ze),Ht(v,"selectstart",(It=>mh(It)),{D:!1}),Ht(m,Y,Ze),Pt&&Ht(m,"pointermove",(It=>ge(Ge+It[ve]-fe))),Pt&&(()=>{const It=Er(p);St();const qt=Er(p),Gt={x:qt.x-It.x,y:qt.y-It.y};(po(Gt.x)>3||po(Gt.y)>3)&&(y(),Ur(p,It),A(Gt),O(St))})];if(je.setPointerCapture(ne.pointerId),oe)ge(tt);else if(!le){const It=ra(e9);if(It){const{Vt:qt}=n,Gt=It(ie,ge,dt(F),tt,qt[L],j,!!l,(Wt=>{Wt?St():en(Nt,St)}));en(Nt,Gt),en(D,dt(Gt,!0))}}}})))};let z=!0;return dt(Sr,[Ht(b,"pointermove pointerleave",r(i)),Ht(g,"pointerenter",r((()=>{s(S0,!0)}))),Ht(g,"pointerleave pointercancel",r((()=>{s(S0,!1)}))),Ht(g,"wheel",r((Y=>{const{deltaX:ve,deltaY:W,deltaMode:X}=Y;z&&X===0&&Ka(g)===u&&A({x:ve,y:W}),z=!1,s(x0,!0),x((()=>{z=!0,s(x0)})),mh(Y)})),{D:!1,I:!0}),!f&&Ht(g,"mousedown",r((()=>{const Y=fh();(h0(Y,ji)||h0(Y,_o)||Y===document.body)&&Em(dt(vh,d),25)}))),Ht(g,"pointerdown",(()=>{const Y=Ht(v,"click",(W=>{ve(),hC(W)}),{A:!0,I:!0,D:!1}),ve=Ht(v,"pointerup pointercancel",(()=>{ve(),setTimeout(Y,150)}),{I:!0,D:!0})}),{I:!0,D:!0}),M(),S,T])},p9=(e,t,n,r,i,o,s)=>{let l,u,d,f,p,v=Ya,y=0;const g=["mouse","pen"],m=V=>P=>{n.Kt||V(P)},b=V=>g.includes(V.pointerType),[x,S]=$s(),[O,T]=$s(100),[A,M]=$s(50),[z,Y]=$s((()=>y)),[ve,W]=d9(e,o,i,f9(t,o,i,m,(V=>b(V)&&de()))),{vt:X,Qt:K,bt:L}=o,{Ft:D,Ut:ne,Nt:le,qt:je,Bt:J}=ve,j=(V,P)=>{Y();const F=G=>{n.Kt||D(Y7,G)};if(V)F();else{const G=d?!l:!0;y>0&&!P?z(dt(F,G)):F(G)}},de=()=>{(d?!l:!f)&&(j(!0),O((()=>{j(!1)})))},U=V=>{b(V)&&(l=!0,!n.Kt&&d&&j(!0))},ee=V=>{b(V)&&(l=!1,!n.Kt&&d&&j(!1))},Q=V=>{D(yh,V,!0),D(yh,V,!1)},B=[Y,T,M,S,()=>v(),Ht(X,"pointerover",U,{A:!0}),Ht(X,"pointerenter",U),Ht(X,"pointerleave",ee),Ht(X,"pointermove",m((V=>{b(V)&&u&&de()}))),Ht(K,"scroll",m((V=>{x((()=>{le(),de()})),s(V),J()})))],oe=ra(Um);return[()=>dt(Sr,en(B,W())),({Dt:V,It:P,Zt:F,tn:G})=>{const{nn:N,sn:ie,en:ge,cn:fe}=G||{},{Ct:pe,ft:Ce}=F||{},{B:$e}=r,{M:Ke,P:Ne}=xi(),{rn:tt,j:Ge}=i,[Ze,Pt]=V("showNativeOverlaidScrollbars"),[St,Nt]=V("scrollbars.theme"),[It,qt]=V("scrollbars.visibility"),[Gt,Wt]=V("scrollbars.autoHide"),[nn,Dn]=V("scrollbars.autoHideSuspend"),[_e]=V("scrollbars.autoHideDelay"),[ue,ye]=V("scrollbars.dragScroll"),[Fe,qe]=V("scrollbars.clickScroll"),[xe,et]=V("overflow"),be=Ce&&!P,ke=N||ie||fe||pe||P,Ie=ge||qt||et,Oe=Ze&&Ke.x&&Ke.y,Ue=!Ne&&!oe,pr=Oe||Ue,Fn=(qn,kn,dn)=>{const ko=qn.includes(Ko)&&(It===Ui||It==="auto"&&kn===Ko);return D(q7,ko,dn),ko};if(y=_e,(Pt||Ue)&&D(z7,pr),Nt&&(D(p),D(St,!0),p=St),(Dn||be)&&(Q(!nn),be&&nn&&(Ge.x||Ge.y?(v(),A((()=>{v=Ht(K,Ko,m(dt(Q,!0)),{A:!0})}))):Q(!0))),Wt&&(u=Gt==="move",d=Gt==="leave",f=Gt==="never",j(f,!0)),ye&&D(G7,ue),qe&&D(K7,!!Fe),Ie){const qn=Fn(xe.x,tt.x,!0),kn=Fn(xe.y,tt.y,!1);D(W7,!(qn&&kn))}ke&&(le(),ne(),J(),fe&&je(),D(C0,!Ge.x,!0),D(C0,!Ge.y,!1),D(B7,$e&&!L))},{},ve]},h9=e=>{const t=xi(),{K:n,P:r}=t,{elements:i}=n(),{padding:o,viewport:s,content:l}=i,u=mc(e),d=u?{}:e,{elements:f}=d,{padding:p,viewport:v,content:y}=f||{},g=u?e:d.target,m=lC(g),b=g.ownerDocument,x=b.documentElement,S=()=>b.defaultView||nr,O=dt(u9,[g]),T=dt($C,[g]),A=dt(Ms,""),M=dt(O,A,s),z=dt(T,A,l),Y=pe=>{const Ce=go(pe),$e=yc(pe),Ke=Si(pe,Tm),Ne=Si(pe,km);return $e.w-Ce.w>0&&!Rs(Ke)||$e.h-Ce.h>0&&!Rs(Ne)},ve=M(v),W=ve===g,X=W&&m,K=!W&&z(y),L=!W&&ve===K,D=X?x:ve,ne=X?D:g,le=!W&&T(A,o,p),je=!L&&K,J=[je,D,le,ne].map((pe=>mc(pe)&&!Ka(pe)&&pe)),j=pe=>pe&&WS(J,pe),de=!j(D)&&Y(D)?D:g,U=X?x:D,Q={dt:g,vt:ne,L:D,ln:le,ht:je,gt:U,Qt:X?b:D,an:m?x:de,Gt:b,bt:m,At:u,V:W,un:S,yt:pe=>Pm(D,ji,pe),wt:(pe,Ce)=>_c(D,ji,pe,Ce),St:()=>_c(U,ji,F7,!0)},{dt:B,vt:oe,ln:V,L:P,ht:F}=Q,G=[()=>{pi(oe,[_o,vp]),pi(B,vp),m&&pi(x,[vp,_o])}];let N=dh([F,P,V,oe,B].find((pe=>pe&&!j(pe))));const ie=X?B:F||P,ge=dt(Sr,G);return[Q,()=>{const pe=S(),Ce=fh(),$e=Ze=>{Vn(Ka(Ze),dh(Ze)),Gs(Ze)},Ke=Ze=>Ht(Ze,"focusin focusout focus blur",hC,{I:!0,D:!1}),Ne="tabindex",tt=Am(P,Ne),Ge=Ke(Ce);return Li(oe,_o,W?"":P7),Li(V,_h,""),Li(P,ji,""),Li(F,w0,""),W||(Li(P,Ne,tt||"-1"),m&&Li(x,b0,"")),Vn(ie,N),Vn(oe,V),Vn(V||oe,!W&&P),Vn(P,F),en(G,[Ge,()=>{const Ze=fh(),Pt=j(P),St=Pt&&Ze===P?B:Ze,Nt=Ke(St);pi(V,_h),pi(F,w0),pi(P,ji),m&&pi(x,b0),tt?Li(P,Ne,tt):pi(P,Ne),j(F)&&$e(F),Pt&&$e(P),j(V)&&$e(V),vh(St),Nt()}]),r&&!W&&(Rm(P,ji,bC),en(G,dt(pi,P,ji))),vh(!W&&m&&Ce===B&&pe.top===pe?P:Ce),Ge(),N=0,ge},ge]},m9=({ht:e})=>({Zt:t,fn:n,It:r})=>{const{$t:i}=t||{},{Ot:o}=n;e&&(i||r)&&Qs(e,{[fl]:o&&"100%"})},v9=({vt:e,ln:t,L:n,V:r},i)=>{const[o,s]=wr({i:y7,o:v0()},dt(v0,e,"padding",""));return({Dt:l,Zt:u,fn:d,It:f})=>{let[p,v]=s(f);const{P:y}=xi(),{_t:g,xt:m,Ct:b}=u||{},{B:x}=d,[S,O]=l("paddingAbsolute");(g||v||(f||m))&&([p,v]=o(f));const A=!r&&(O||b||v);if(A){const M=!S||!t&&!y,z=p.r+p.l,Y=p.t+p.b,ve={[JS]:M&&!x?-z:0,[ZS]:M?-Y:0,[XS]:M&&x?-z:0,top:M?-p.t:0,right:M?x?-p.r:"auto":0,left:M?x?"auto":-p.l:0,[dl]:M&&`calc(100% + ${z}px)`},W={[YS]:M?p.t:0,[KS]:M?p.r:0,[QS]:M?p.b:0,[GS]:M?p.l:0};Qs(t||n,ve),Qs(n,W),Ft(i,{ln:p,_n:!M,F:t?W:Ft({},ve,W)})}return{dn:A}}},g9=(e,t)=>{const n=xi(),{vt:r,ln:i,L:o,V:s,Qt:l,gt:u,bt:d,wt:f,un:p}=e,{P:v}=n,y=d&&s,g=dt(HS,0),m={display:()=>!1,direction:B=>B!=="ltr",flexDirection:B=>B.endsWith("-reverse"),writingMode:B=>B!=="horizontal-tb"},b=Zn(m),x={i:Om,o:{w:0,h:0}},S={i:Ju,o:{}},O=B=>{f(yC,!y&&B)},T=()=>Si(o,b),A=(B,oe)=>{const V=!Zn(B).length,P=oe?!0:b.some((Ne=>{const tt=B[Ne];return na(tt)&&m[Ne](tt)}));if(V||!P||!k7(o))return{T:{x:0,y:0},k:{x:1,y:1}};O(!0);const F=Er(u),G=Ht(l,Ko,(Ne=>{const tt=Er(u);Ne.isTrusted&&tt.x===F.x&&tt.y===F.y&&Dm(Ne)}),{I:!0,A:!0}),N=f(L7,!0);Ur(u,{x:0,y:0}),N();const ie=Er(u),ge=yc(u);Ur(u,{x:ge.w,y:ge.h});const fe=Er(u),pe={x:fe.x-ie.x,y:fe.y-ie.y};Ur(u,{x:-ge.w,y:-ge.h});const Ce=Er(u),$e={x:Ce.x-ie.x,y:Ce.y-ie.y},Ke={x:po(pe.x)>=po($e.x)?fe.x:Ce.x,y:po(pe.y)>=po($e.y)?fe.y:Ce.y};return Ur(u,F),qa((()=>G())),{T:ie,k:Ke}},M=(B,oe)=>{const V=nr.devicePixelRatio%1!==0?1:0,P={w:g(B.w-oe.w),h:g(B.h-oe.h)};return{w:P.w>V?P.w:0,h:P.h>V?P.h:0}},z=(B,oe)=>{const V=(P,F,G,N)=>{const ie=P===Ui?ti:J7(P),ge=Rs(P),fe=Rs(G);return!F&&!N?ti:ge&&fe?Ui:ge?F&&N?ie:F?Ui:ti:F?ie:fe&&N?Ui:ti};return{x:V(oe.x,B.x,oe.y,B.y),y:V(oe.y,B.y,oe.x,B.x)}},Y=B=>{const oe=P=>[Ui,ti,Ko].map((F=>Q(bh(F),P))),V=oe(!0).concat(oe()).join(" ");f(V),f(Zn(B).map((P=>Q(B[P],P==="x"))).join(" "),!0)},[ve,W]=wr(x,dt(Mm,o)),[X,K]=wr(x,dt(yc,o)),[L,D]=wr(x),[ne]=wr(S),[le,je]=wr(x),[J]=wr(S),[j]=wr({i:(B,oe)=>Yc(B,oe,gc(Ks(Zn(B),Zn(oe)))),o:{}}),[de,U]=wr({i:(B,oe)=>Ju(B.T,oe.T)&&Ju(B.k,oe.k),o:mC()}),ee=ra(Um),Q=(B,oe)=>`${oe?I7:M7}${_7(B)}`;return({Dt:B,Zt:oe,fn:V,It:P},{dn:F})=>{const{_t:G,Ht:N,xt:ie,Ct:ge,ft:fe,Et:pe}=oe||{},Ce=ee&&ee.R(e,t,V,n,B),{X:$e,Y:Ke,W:Ne}=Ce||{},[tt,Ge]=X7(B,n),[Ze,Pt]=B("overflow"),St=Rs(Ze.x),Nt=Rs(Ze.y),It=G||F||ie||ge||pe||Ge;let qt=W(P),Gt=K(P),Wt=D(P),nn=je(P);if(Ge&&v&&f(bC,!tt),It){Pm(r,_o,ec)&&O(!0);const bl=Ke&&Ke(),[is]=qt=ve(P),[Yi]=Gt=X(P),os=fC(o),Ki=y&&T7(p()),dd={w:g(Yi.w+is.w),h:g(Yi.h+is.h)},wl={w:g((Ki?Ki.w:os.w+g(os.w-Yi.w))+is.w),h:g((Ki?Ki.h:os.h+g(os.h-Yi.h))+is.h)};bl&&bl(),nn=le(wl),Wt=L(M(dd,wl),P)}const[Dn,_e]=nn,[ue,ye]=Wt,[Fe,qe]=Gt,[xe,et]=qt,[be]=ne({x:ue.w>0,y:ue.h>0}),ke=St&&Nt&&(be.x||be.y)||St&&be.x&&!be.y||Nt&&be.y&&!be.x,Ie=F||ge||pe||et||qe||_e||ye||Pt||Ge||It||N&&y,[Oe]=B("update.flowDirectionStyles"),[Ue,pr]=j(Oe?Oe(o)||{}:T(),P),Fn=ge||fe||pr||P,[qn,kn]=Fn?de(A(Ue,!!Oe),P):U();let dn=z(be,Ze);O(!1),Ie&&(Y(dn),dn=Z7(o,be),Ne&&$e&&($e(dn,Fe,xe),Qs(o,Ne(dn))));const[ko,cd]=J(dn);return _c(r,_o,ec,ke),_c(i,_h,ec,ke),Ft(t,{rn:ko,Vt:{x:Dn.w,y:Dn.h},Rt:{x:ue.w,y:ue.h},j:be,Tt:O7(qn,ue)}),{en:cd,nn:_e,sn:ye,cn:kn||ye}}},_9=e=>{const[t,n,r]=h9(e),i={ln:{t:0,r:0,b:0,l:0},_n:!1,F:{[JS]:0,[ZS]:0,[XS]:0,[YS]:0,[KS]:0,[QS]:0,[GS]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},rn:{x:ti,y:ti},j:{x:!1,y:!1},Tt:mC()},{dt:o,gt:s,V:l,St:u}=t,{P:d,M:f}=xi(),p=!d&&(f.x||f.y),v=[m9(t),v9(t,i),g9(t,i)];return[n,y=>{const g={},b=p&&Er(s),x=b&&u();return zt(v,(S=>{Ft(g,S(y,g)||{})})),Ur(s,b),x&&x(),l||Ur(o,0),g},i,t,r]},y9=(e,t,n,r)=>{let i=!1;const o={Kt:!1,pn:!1},s=gp(t,{}),[l,u,d,f,p]=_9(e),[v,y,g]=l9(f,d,s,(T=>{O({},T)})),[m,b,,x]=p9(e,t,o,g,d,f,r),S=T=>Zn(T).some((A=>!!T[A])),O=(T,A)=>{const{Kt:M,pn:z}=o;if(z||M&&i)return!1;const{vn:Y,It:ve,zt:W}=T,X=Y||{},K=!!ve||!i,L={Dt:gp(t,X,K),vn:X,It:K},D=A||y(Ft({},L,{zt:W})),ne=u(Ft({},L,{fn:g,Zt:D}));b(Ft({},L,{Zt:D,tn:ne}));const le=S(D),je=S(ne),J=le||je||!$m(X)||K;return i=!0,J&&n(T,{Zt:D,tn:ne}),J};return[()=>{const{an:T,gt:A,St:M}=f,z=Er(T),Y=[v(),l(),m(),()=>{o.pn=!0}],ve=M();return Ur(A,z),ve(),dt(Sr,Y)},O,T=>{const A=o.Kt;o.Kt=T,!T&&A!==T&&O({It:!0,zt:!0})},()=>{b({Dt:gp(t,{},!1),vn:{},It:!1})},()=>({gn:o,hn:g,bn:d}),{yn:f,wn:x},p]},Nm=new WeakMap,b9=(e,t)=>{Nm.set(e,t)},w9=e=>{Nm.delete(e)},AC=e=>Nm.get(e),Hr=(e,t,n)=>{const{tt:r}=xi(),i=mc(e),o=i?e:e.target,s=AC(o);if(t&&!s){const l=[],u={},d=K=>{const L=nC(K),D=ra(R7);return D?D(L,!0):L},f=Ft({},r(),d(t)),[p,v,y]=gh(),[g,m,b]=gh(n),x=(K,L)=>{b(K,L),y(K,L)},[S,O,T,A,M,z,Y]=y9(e,f,(({vn:K,It:L},{Zt:D,tn:ne})=>{const{_t:le,Ct:je,$t:J,xt:j,Ht:de,ft:U}=D,{nn:ee,sn:Q,en:B,cn:oe}=ne;x("updated",[X,{updateHints:{sizeChanged:!!le,directionChanged:!!je,heightIntrinsicChanged:!!J,overflowEdgeChanged:!!ee,overflowAmountChanged:!!Q,overflowStyleChanged:!!B,scrollCoordinatesChanged:!!oe,contentMutation:!!j,hostMutation:!!de,appear:!!U},changedOptions:K||{},force:!!L}])}),(K=>x("scroll",[X,K]))),ve=K=>{const{gn:L}=M(),{pn:D}=L;D||(w9(o),Sr(l),x("destroyed",[X,K]),v(),m())},X={options(K,L){if(K){const D=L?r():{},ne=xC(f,Ft(D,d(K)));$m(ne)||(Ft(f,ne),O({vn:ne}))}return Ft({},f)},on:g,off:(K,L)=>{K&&L&&m(K,L)},state(){const{gn:K,hn:L,bn:D}=M(),{pn:ne,Kt:le}=K,{B:je}=L,{Vt:J,Rt:j,rn:de,j:U,ln:ee,_n:Q,Tt:B}=D;return Ft({},{overflowEdge:J,overflowAmount:j,overflowStyle:de,hasOverflow:U,scrollCoordinates:{start:B.T,end:B.k},padding:ee,paddingAbsolute:Q,directionRTL:je,sleeping:le,destroyed:ne})},elements(){const{dt:K,vt:L,ln:D,L:ne,ht:le,gt:je,Qt:J}=z.yn,{jt:j,Jt:de}=z.wn,U=Q=>{const{kt:B,Pt:oe,Lt:V}=Q;return{scrollbar:V,track:oe,handle:B}},ee=Q=>{const{Xt:B,Yt:oe}=Q,V=U(B[0]);return Ft({},V,{clone:()=>{const P=U(oe());return A(),P}})};return Ft({},{target:K,host:L,padding:D||ne,viewport:ne,content:le||ne,scrollOffsetElement:je,scrollEventElement:J,scrollbarHorizontal:ee(j),scrollbarVertical:ee(de)})},update:K=>O({It:K,zt:!0}),destroy:dt(ve,!1),sleep:T,plugin:K=>u[Zn(K)[0]]};return en(l,[Y]),b9(o,X),_C(vC,Hr,[X,p,u]),c9(z.yn.bt,!i&&e.cancel)?(ve(!0),X):(en(l,S()),x("initialized",[X]),X.update(),X)}return s};Hr.plugin=e=>{const t=Vr(e),n=t?e:[e],r=n.map((i=>_C(i,Hr)[0]));return $7(n),t?r:r[0]};Hr.valid=e=>{const t=e&&e.elements,n=li(t)&&t();return Wa(n)&&!!AC(n.target)};Hr.env=()=>{const{U:e,M:t,P:n,J:r,ot:i,st:o,K:s,Z:l,tt:u,nt:d}=xi();return Ft({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:r,staticDefaultInitialization:i,staticDefaultOptions:o,getDefaultInitialization:s,setDefaultInitialization:l,getDefaultOptions:u,setDefaultOptions:d})};Hr.nonce=i9;Hr.trustedTypePolicy=S7;class E9{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,n){const r=this._listeners.get(t)??new Set;return this._listeners.set(t,r),r.add(n),this}removeEventListener(t,n){var r;return(r=this._listeners.get(t))==null||r.delete(n),this}dispatchEvent(t,...n){let r=!0;for(const i of this._listeners.get(t)??[])r=i(...n)!==!1&&r;return r}unbindAllListeners(){this._listeners.clear()}}const $0=(e,t="px")=>typeof e=="number"?e+t:e,oo=({style:e},t,n)=>{if(typeof t=="object")for(const[r,i]of Object.entries(t))i!==void 0&&(e[r]=$0(i));else n!==void 0&&(e[t]=$0(n))},A0=(e=0,t=0,n=0,r=0)=>{const i={x:e,y:t,width:n,height:r,top:t,left:e,right:e+n,bottom:t+r};return{...i,toJSON:()=>JSON.stringify(i)}},S9=e=>{let t,n=-1,r=!1;return{next:(...i)=>{t=i,r||(r=!0,n=requestAnimationFrame(()=>{e(...t),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},R0=(e,t,n="touch")=>{switch(n){case"center":{const r=t.left+t.width/2,i=t.top+t.height/2;return r>=e.left&&r<=e.right&&i>=e.top&&i<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},C9=()=>matchMedia("(hover: none), (pointer: coarse)").matches,x9=()=>"safari"in window,wh=e=>Array.isArray(e)?e:[e],RC=e=>(t,n,r,i={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=wh(n),t=wh(t);for(const o of t)if(o)for(const s of n)o[e](s,r,{capture:!1,...i})},so=RC("addEventListener"),Qr=RC("removeEventListener"),Mu=e=>{var t;const{clientX:n,clientY:r,target:i}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:r,target:i}},Es=(e,t=document)=>wh(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),T9=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:No,max:P0,min:I0,ceil:M0}=Math,D0=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}}),PC=class extends E9{constructor(t){var n,r,i,o,s;super(),this._selection=D0(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=A0(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(r=t.behaviour)==null?void 0:r.scrolling,startScrollMargins:{x:0,y:0,...(o=(i=t.behaviour)==null?void 0:i.scrolling)==null?void 0:o.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(s=t.features)==null?void 0:s.singleTap}}};for(const f of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[f]=="function"&&(this[f]=this[f].bind(this));const{document:l,selectionAreaClass:u,selectionContainerClass:d}=this._options;this._area=l.createElement("div"),this._clippingElement=l.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(u),d&&this._clippingElement.classList.add(d),oo(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),oo(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=S9(f=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",f),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:r}=this._options,i=t?so:Qr;i(n,"mousedown",this._onTapStart),r.touch&&i(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:r,y:i,target:o}=Mu(t),{document:s,startAreas:l,boundaries:u,features:d,behaviour:f}=this._options,p=o.getBoundingClientRect();if(t instanceof MouseEvent&&!T9(t,f.triggers))return;const v=Es(l,s),y=Es(u,s);this._targetElement=y.find(x=>R0(x.getBoundingClientRect(),p));const g=t.composedPath(),m=v.find(x=>g.includes(x));if(this._targetBoundary=y.find(x=>g.includes(x)),!this._targetElement||!m||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:r,y1:i,x2:0,y2:0};const b=s.scrollingElement??s.body;this._scrollDelta={x:b.scrollLeft,y:b.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),so(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),so(s,["mouseup","touchcancel","touchend"],this._onTapStop),so(s,"scroll",this._onScroll),d.deselectOnBlur&&(this._targetBoundaryScrolled=!1,so(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:r}=this._options.features,i=Mu(t);let o;if(n==="native")o=i.target;else if(n==="touch"){this.resolveSelectables();const{x:l,y:u}=i;o=this._selectables.find(d=>{const{right:f,left:p,top:v,bottom:y}=d.getBoundingClientRect();return l<f&&l>p&&u<y&&u>v})}if(!o)return;for(this.resolveSelectables();!this._selectables.includes(o);)if(o.parentElement)o=o.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&r&&this._latestElement){const l=this._latestElement,[u,d]=l.compareDocumentPosition(o)&4?[o,l]:[l,o],f=[...this._selectables.filter(p=>p.compareDocumentPosition(u)&4&&p.compareDocumentPosition(d)&2),u,d];this.select(f),this._latestElement=l}else s.includes(o)&&(s.length===1||t.ctrlKey||s.every(l=>this._selection.stored.includes(l)))?this.deselect(o):(this.select(o),this._latestElement=o)}_delayedTapMove(t){const{container:n,document:r,behaviour:{startThreshold:i}}=this._options,{x1:o,y1:s}=this._areaLocation,{x:l,y:u}=Mu(t);if(typeof i=="number"&&No(l+u-(o+s))>=i||typeof i=="object"&&No(l-o)>=i.x||No(u-s)>=i.y){if(Qr(r,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){Qr(r,["mouseup","touchcancel","touchend"],this._onTapStop);return}so(r,["mousemove","touchmove"],this._onTapMove,{passive:!1}),oo(this._area,"display","block"),Es(n,r)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(so(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),so(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(d=>this._targetElement.contains(d))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:r}=this,i=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(oo(t,{top:i.top,left:i.left,width:i.width,height:i.height}),oo(r,{marginTop:-i.top,marginLeft:-i.left})):(oo(t,{top:0,left:0,width:"100%",height:"100%"}),oo(r,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:r,_options:i,_frame:o}=this,{speedDivider:s}=i.behaviour.scrolling,l=this._targetElement,{x:u,y:d}=Mu(t);if(r.x2=u,r.y2=d,this._lastMousePosition.x=u,this._lastMousePosition.y=d,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const f=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:p,scrollLeft:v}=l;n.y&&(l.scrollTop+=M0(n.y/s),r.y1-=l.scrollTop-p),n.x&&(l.scrollLeft+=M0(n.x/s),r.x1-=l.scrollLeft-v),o.next(t),requestAnimationFrame(f)};requestAnimationFrame(f)}else o.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&C9()||this._scrollAvailable&&x9())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:r,scrollLeft:i}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-i,this._areaLocation.y1+=t.y-r,t.x=i,t.y=r,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,Qr(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,r=t.deltaY?t.deltaY>0?1:-1:0,i=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=r*n,this._scrollSpeed.x+=i*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,r=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,i=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(r)*n,this._scrollSpeed.y+=Math.sign(i)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:r,_options:i}=this,{scrollTop:o,scrollHeight:s,clientHeight:l,scrollLeft:u,scrollWidth:d,clientWidth:f}=r,p=this._targetRect,{x1:v,y1:y}=n;let{x2:g,y2:m}=n;const{behaviour:{scrolling:{startScrollMargins:b}}}=i;g<p.left+b.x?(t.x=u?-No(p.left-g+b.x):0,g=g<p.left?p.left:g):g>p.right-b.x?(t.x=d-u-f?No(p.left+p.width-g-b.x):0,g=g>p.right?p.right:g):t.x=0,m<p.top+b.y?(t.y=o?-No(p.top-m+b.y):0,m=m<p.top?p.top:m):m>p.bottom-b.y?(t.y=s-o-l?No(p.top+p.height-m-b.y):0,m=m>p.bottom?p.bottom:m):t.y=0;const x=I0(v,g),S=I0(y,m),O=P0(v,g),T=P0(y,m);this._areaRect=A0(x,S,O-x,T-S)}_redrawSelectionArea(){const{x:t,y:n,width:r,height:i}=this._areaRect,{style:o}=this._area;o.left=`${t}px`,o.top=`${n}px`,o.width=`${r}px`,o.height=`${i}px`}_onTapStop(t,n){var r;const{document:i,features:o}=this._options,{_singleClick:s}=this;Qr(this._targetElement,"scroll",this._onStartAreaScroll),Qr(i,["mousemove","touchmove"],this._delayedTapMove),Qr(i,["touchmove","mousemove"],this._onTapMove),Qr(i,["mouseup","touchcancel","touchend"],this._onTapStop),Qr(i,"scroll",this._onScroll),this._keepSelection(),t&&s&&o.singleTap.allow?this._onSingleTap(t):!s&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Qr(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Qr(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(r=this._frame)==null||r.cancel(),oo(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:r,_areaRect:i}=this,{stored:o,selected:s,touched:l}=r,{intersect:u,overlap:d}=n.behaviour,f=d==="invert",p=[],v=[],y=[];for(let m=0;m<t.length;m++){const b=t[m];if(R0(i,b.getBoundingClientRect(),u)){if(s.includes(b))o.includes(b)&&!l.includes(b)&&l.push(b);else if(f&&o.includes(b)){y.push(b);continue}else v.push(b);p.push(b)}}f&&v.push(...o.filter(m=>!s.includes(m)));const g=d==="keep";for(let m=0;m<s.length;m++){const b=s[m];!p.includes(b)&&!(g&&o.includes(b))&&y.push(b)}r.selected=p,r.changed={added:v,removed:y},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:r,changed:i,touched:o,stored:s}=n,l=r.filter(u=>!s.includes(u));switch(t.behaviour.overlap){case"drop":{n.stored=[...l,...s.filter(u=>!o.includes(u))];break}case"invert":{n.stored=[...l,...s.filter(u=>!i.removed.includes(u))];break}case"keep":{n.stored=[...s,...r.filter(u=>!s.includes(u))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=Es(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:r,stored:i,changed:o}=this._selection;o.added=[],o.removed.push(...r,...t?i:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=D0(t?[]:i)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,n=!1){const{changed:r,selected:i,stored:o}=this._selection,s=Es(t,this._options.document).filter(l=>!i.includes(l)&&!o.includes(l));return o.push(...s),i.push(...s),r.added.push(...s),r.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(t,n=!1){const{selected:r,stored:i,changed:o}=this._selection,s=Es(t,this._options.document).filter(l=>r.includes(l)||i.includes(l));this._selection.stored=i.filter(l=>!s.includes(l)),this._selection.selected=r.filter(l=>!s.includes(l)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(l=>!o.removed.includes(l))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};PC.version="3.9.0";let k9=PC;const O9="5.2.0",$9={version:O9},A9={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function R9(e,t){let n=t;return n||(n=new Error("Upload error")),typeof n=="string"&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),YV(e)?(n=new Zp(n,e),n):(n.request=e,n)}function F0(e){return e.data.slice(0,e.data.size,e.meta.type)}const P9={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:""};class I9 extends XV{static VERSION=$9.version;#e;#t;uploaderEvents;constructor(t,n){if(super(t,{...P9,fieldName:n.bundle?"files[]":"file",...n}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=A9,this.i18nInit(),this.#t=new KV({concurrency:this.opts.limit}),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&typeof this.opts.headers=="function")throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(n?.allowedMetaFields===void 0&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null),this.#e=r=>async(i,o)=>{try{const s=await jV(i,{...o,onBeforeRequest:(d,f)=>this.opts.onBeforeRequest?.(d,f,r),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:d=>{const f=Math.ceil(d/1e3),p=new Error(this.i18n("uploadStalled",{seconds:f}));this.uppy.emit("upload-stalled",p,r)},onUploadProgress:d=>{if(d.lengthComputable)for(const{id:f}of r){const p=this.uppy.getFile(f);p!=null&&this.uppy.emit("upload-progress",p,{uploadStarted:p.progress.uploadStarted??0,bytesUploaded:d.loaded/d.total*p.size,bytesTotal:p.size})}}});let l=await this.opts.getResponseData?.(s);if(s.responseType==="json")l??=s.response;else try{l??=JSON.parse(s.responseText)}catch(d){throw new Error("@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.",{cause:d})}const u=typeof l?.url=="string"?l.url:void 0;for(const{id:d}of r)this.uppy.emit("upload-success",this.uppy.getFile(d),{status:s.status,body:l,uploadURL:u});return s}catch(s){if(s.name==="AbortError")return;const l=s.request;for(const u of r)this.uppy.emit("upload-error",this.uppy.getFile(u.id),R9(l,s),l);throw s}}}getOptions(t){const n=this.uppy.getState().xhrUpload,{headers:r}=this.opts,i={...this.opts,...n||{},...t.xhrUpload||{},headers:{}};return typeof r=="function"?i.headers=r(t):Object.assign(i.headers,this.opts.headers),n&&Object.assign(i.headers,n.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,n,r){$b(r.allowedMetaFields,n).forEach(o=>{const s=n[o];Array.isArray(s)?s.forEach(l=>t.append(o,l)):t.append(o,s)})}createFormDataUpload(t,n){const r=new FormData;this.addMetadata(r,t.meta,n);const i=F0(t);return t.name?r.append(n.fieldName,i,t.meta.name):r.append(n.fieldName,i),r}createBundledUpload(t,n){const r=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(r,i,n),t.forEach(o=>{const s=this.getOptions(o),l=F0(o);o.name?r.append(s.fieldName,l,o.name):r.append(s.fieldName,l)}),r}async#n(t){const n=new JV(this.uppy),r=new AbortController;n.onFileRemove(t.id,()=>r.abort()),n.onCancelAll(t.id,()=>r.abort());try{await this.#t.add(async i=>{const o=this.getOptions(t),s=this.#e([t]),l=o.formData?this.createFormDataUpload(t,o):t.data,u=typeof o.endpoint=="string"?o.endpoint:await o.endpoint(t);return s(u,{...o,body:l,signal:AbortSignal.any([i,r.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{n.remove()}}async#r(t){const n=new AbortController;function r(){n.abort()}this.uppy.once("cancel-all",r);try{await this.#t.add(async i=>{const o=this.uppy.getState().xhrUpload??{},s=this.#e(t),l=this.createBundledUpload(t,{...this.opts,...o}),u=typeof this.opts.endpoint=="string"?this.opts.endpoint:await this.opts.endpoint(t);return s(u,{...this.opts,body:l,signal:AbortSignal.any([i,n.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{this.uppy.off("cancel-all",r)}}#o(t){const n=this.getOptions(t),r=$b(n.allowedMetaFields,t.meta);return{...t.remote?.body,protocol:"multipart",endpoint:n.endpoint,size:t.data.size,fieldname:n.fieldName,metadata:Object.fromEntries(r.map(i=>[i,t.meta[i]])),httpMethod:n.method,useFormData:n.formData,headers:n.headers}}async#i(t){await Promise.allSettled(t.map(n=>{if(n.isRemote){const r=()=>this.#t,i=new AbortController,o=s=>{s.id===n.id&&i.abort()};return this.uppy.on("file-removed",o),this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,this.#o(n),{signal:i.signal,getQueue:r}).finally(()=>{this.uppy.off("file-removed",o)})}return this.#n(n)}))}#a=async t=>{if(t.length===0){this.uppy.log("[XHRUpload] No files to upload!");return}this.opts.limit===0&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const n=this.uppy.getFilesByIds(t),r=zV(n),i=BV(r);if(this.uppy.emit("upload-start",i),this.opts.bundle){if(r.some(s=>s.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await this.#r(r)}else await this.#i(r)};install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.#a)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.#a)}}const zm=new Map,Eh=Symbol("ServiceContainerId");function M9(e,t){zm.set(e,t)}function D9(e){zm.delete(e)}function rt(e){const t=e??Fs(Eh);if(!t)throw new Error("No VueFinder app instance found. Make sure VueFinder component is mounted and provide the id explicitly or use within a VueFinder component tree.");const n=zm.get(t);if(!n)throw new Error(`VueFinder app instance with id "${t}" was not found. Make sure the VueFinder component with id="${t}" is mounted.`);return n}function F9(e){const t=localStorage.getItem(e+"_storage"),n=Hn(JSON.parse(t??"{}"));He(n,r);function r(){Object.keys(n).length?localStorage.setItem(e+"_storage",JSON.stringify(n)):localStorage.removeItem(e+"_storage")}function i(l,u){n[l]=u}function o(l){delete n[l]}function s(){Object.keys(n).forEach(l=>o(l))}return{getStore:(l,u=null)=>l in n?n[l]:u,setStore:i,removeStore:o,clearStore:s}}function yn(e,t="An error occurred"){if(!e)return t;if(typeof e=="string")return e||t;if(e instanceof Error)return e.message||t;if(typeof e=="object"&&e!==null){const n=e;if(typeof n.message=="string"&&n.message)return n.message;if(typeof n.error=="string"&&n.error)return n.error}return t}function L9(e,t){return LE(e,t,{encode:JSON.stringify,decode:JSON.parse})}function j9(e){if(!e?.config?.get)return!0;try{return!!e.config.get("notificationsEnabled")}catch{return!0}}function ks(e,t,n){const r={type:t,message:n};if(e?.emitter?.emit?.("vf-notify",r),!!j9(e))switch(t){case"success":wu.success(n);break;case"error":wu.error(n);break;case"warning":wu.warning(n);break;default:wu.info(n);break}}function cr(e){return{success(t){ks(e,"success",t)},error(t){ks(e,"error",t)},info(t){ks(e,"info",t)},warning(t){ks(e,"warning",t)},emit(t,n){ks(e,t,n)}}}const yp=new Map;async function bp(e,t){const n=t[e];return typeof n=="function"?(await n()).default:n}function U9(e,t,n,r,i){const o=cr({emitter:n,config:i}),s="vuefinder_locale",l="global";let u;if(yp.has(l))u=yp.get(l),t&&t!==u.get()&&u.set(t);else{const T=localStorage.getItem(s)?JSON.parse(localStorage.getItem(s)):null;u=L9(s,t||T||"en"),yp.set(l,u)}const d="vuefinder_translations",f=T=>{try{const A=localStorage.getItem(d);if(A)return JSON.parse(A)[T]||null}catch{}return null},p=(T,A)=>{try{const M=localStorage.getItem(d),z=M?JSON.parse(M):{};z[T]=A,localStorage.setItem(d,JSON.stringify(z))}catch{}},v=Qe(u),y=String(v.value),g=f(y),m=re(g||{});let b=!1;!g&&Object.keys(r).length>0&&bp(y,r).then(T=>{m.value=T,p(y,T)}).catch(()=>{}),He(v,async(T,A)=>{if(A&&T===A)return;if(!b){b=!0;const z=f(String(T));if(z)m.value=z;else if(Object.keys(r).length>0)try{const Y=await bp(String(T),r);m.value=Y,p(String(T),Y)}catch{}return}const M=f(String(T));if(M)m.value=M;else try{const z=await bp(String(T),r);m.value=z,p(String(T),z)}catch(z){const Y=yn(z,"Locale cannot be loaded!");o.error(Y);return}Object.values(r).length>1&&(o.success("The language is set to "+T),n.emit("vf-language-saved"))},{immediate:!1});const x=(T,...A)=>A.length?x(T=T.replace("%s",String(A.shift())),...A):T;function S(T,...A){return m.value&&Object.prototype.hasOwnProperty.call(m.value,T)?x(m.value[T]||T,...A):x(T,...A)}const O=se({get:()=>v.value,set:T=>{u.set(T)}});return Hn({t:S,locale:O,localeAtom:u})}const N9=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],IC={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:N9.reduce((e,t)=>(e[t]=!0,e),{})};function L0(){return IC.advanced}function MC(e){return e?e==="simple"||e==="advanced"?{...IC[e]}:{...L0(),...e}:L0()}const z9="4.6.0";function Bm(e,t,n,r,i){return t=Math,n=t.log,r=1024,i=n(e)/n(r)|0,(e/t.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"iB":"B")}function DC(e,t,n,r,i){return t=Math,n=t.log,r=1e3,i=n(e)/n(r)|0,(e/t.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"B":"B")}function B9(e){if(typeof e=="number")return e;const t={k:1,m:2,g:3,t:4},n=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(e);if(!n)return 0;const r=parseFloat(n[1]||"0"),i=(n[2]||"").toLowerCase(),o=t[i]??0;return Math.round(r*Math.pow(1024,o))}function V9(e){const t=_n(null),n=re(!1),r=re(),i=re(!1),o=_n(null);return{visible:n,type:t,data:r,open:(s,l=null)=>{e.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),n.value=!0,t.value=s,r.value=l},close:()=>{e.get("fullScreen")||(document.querySelector("body").style.overflow=""),n.value=!1,t.value=null,i.value=!1,o.value=null},setEditMode:s=>{i.value=s},editMode:i,controls:o,registerControls:s=>{o.value=s},unregisterControls:s=>{o.value===s&&(o.value=null)}}}const bc={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},wc={initialPath:null,maxFileSize:null,loadingIndicator:"circular",showMenuBar:!0,showToolbar:!0,gridItemWidth:96,gridItemHeight:80,gridItemGap:8,gridIconSize:48,listItemHeight:32,listItemGap:2,listIconSize:16,notificationPosition:"bottom-center",notificationDuration:3e3,notificationVisibleToasts:4,notificationRichColors:!0},H9=new Set(Object.keys(wc));function q9(e){return e||"silver"}function FC(e){return H9.has(e)}function j0(e){const t={},n={},r=e;for(const i in r)if(FC(i))n[i]=r[i];else if(i in bc){const o=i;t[o]=r[i]}return{persistenceConfig:t,nonPersistenceConfig:n}}function U0(e,t){const n={...bc,...e,...t};return n.theme=q9(n.theme),n}function N0(e,t){return{...wc,...t,...e}}const W9=(e,t={})=>{const n=`vuefinder_config_${e}`,{persistenceConfig:r,nonPersistenceConfig:i}=j0(t),o=U0(r,bc),s=N0(i,wc),l=LE(n,o,{encode:JSON.stringify,decode:JSON.parse}),u=An(s),d=lo([l,u],(g,m)=>({...g,...m})),f=(g={})=>{const m=l.get(),b=u.get(),{persistenceConfig:x,nonPersistenceConfig:S}=j0(g),O=U0(x,m),T=N0(S,b);l.set(O),u.set(T)},p=g=>FC(g)?u.get()[g]:l.get()[g],v=()=>({...l.get(),...u.get()}),y=(g,m)=>{const b=l.get();typeof g=="object"&&g!==null?l.set({...b,...g}):l.set({...b,[g]:m})};return{state:d,init:f,get:p,set:y,toggle:g=>{const m=l.get();y(g,!m[g])},all:v,reset:()=>{l.set({...bc}),u.set({...wc})}}},Jt=e=>`${e.type}:${e.path}`;function LC(e,t){if(typeof e=="string"&&typeof t=="string")return e.toLowerCase().localeCompare(t.toLowerCase());const n=Number(e)||0,r=Number(t)||0;return n===r?0:n<r?-1:1}const Y9=()=>{const e=An(""),t=An([]),n=An(!1),r=An([]),i=An({active:!1,column:"",order:""}),o=An({kind:"all",showHidden:!1}),s=An(new Set),l=An({type:"copy",path:"",items:new Set}),u=An(null),d=An(0),f=An(!1),p=An([]),v=An(-1),y=lo([e],fe=>{const pe=(fe??"").trim(),Ce=pe.indexOf("://"),$e=Ce>=0?pe.slice(0,Ce):"",Ke=(Ce>=0?pe.slice(Ce+3):pe).split("/").filter(Boolean);let Ne="";const tt=Ke.map(Ge=>(Ne=Ne?`${Ne}/${Ge}`:Ge,{basename:Ge,name:Ge,path:$e?`${$e}://${Ne}`:Ne,type:"dir"}));return{storage:$e,breadcrumb:tt,path:pe}}),g=lo([r,i,o],(fe,pe,Ce)=>{let $e=fe;Ce.kind==="files"?$e=$e.filter(Ze=>Ze.type==="file"):Ce.kind==="folders"&&($e=$e.filter(Ze=>Ze.type==="dir")),Ce.showHidden||($e=$e.filter(Ze=>!Ze.basename.startsWith(".")));const{active:Ke,column:Ne,order:tt}=pe;if(!Ke||!Ne)return $e;const Ge=tt==="asc"?1:-1;return $e.slice().sort((Ze,Pt)=>LC(Ze[Ne],Pt[Ne])*Ge)}),m=lo([r,s],(fe,pe)=>pe.size===0?[]:fe.filter(Ce=>pe.has(Jt(Ce)))),b=(fe,pe)=>{const Ce=e.get();if((pe??!0)&&Ce!==fe){const $e=p.get(),Ke=v.get();Ke<$e.length-1&&$e.splice(Ke+1),$e.length===0&&Ce&&$e.push(Ce),$e.push(fe),p.set([...$e]),v.set($e.length-1)}e.set(fe)},x=fe=>{r.set(fe??[])},S=fe=>{t.set(fe??[])},O=(fe,pe)=>{i.set({active:!0,column:fe,order:pe})},T=fe=>{const pe=i.get();pe.active&&pe.column===fe?i.set({active:pe.order==="asc",column:fe,order:"desc"}):i.set({active:!0,column:fe,order:"asc"})},A=()=>{i.set({active:!1,column:"",order:""})},M=(fe,pe)=>{o.set({kind:fe,showHidden:pe})},z=()=>{o.set({kind:"all",showHidden:!1})},Y=(fe,pe="multiple")=>{const Ce=new Set(s.get());pe==="single"&&Ce.clear(),Ce.add(fe),s.set(Ce)},ve=(fe,pe="multiple")=>{const Ce=new Set(s.get());pe==="single"&&Ce.clear(),fe.forEach($e=>Ce.add($e)),s.set(Ce)},W=fe=>{const pe=new Set(s.get());pe.delete(fe),s.set(pe)},X=fe=>s.get().has(fe),K=(fe,pe="multiple")=>{const Ce=new Set(s.get());Ce.has(fe)?Ce.delete(fe):(pe==="single"&&Ce.clear(),Ce.add(fe)),s.set(Ce)},L=(fe="multiple",pe)=>{if(fe==="single"){const Ce=r.get()[0];if(Ce){const $e=Jt(Ce);s.set(new Set([$e])),d.set(1)}}else{if(pe?.selectionFilterType||pe?.selectionFilterMimeIncludes&&pe.selectionFilterMimeIncludes.length>0){const Ce=r.get().filter($e=>{const Ke=pe.selectionFilterType,Ne=pe.selectionFilterMimeIncludes;return Ke==="files"&&$e.type==="dir"||Ke==="dirs"&&$e.type==="file"?!1:Ne&&Array.isArray(Ne)&&Ne.length>0&&$e.type!=="dir"?$e.mime_type?Ne.some(tt=>$e.mime_type?.startsWith(tt)):!1:!0}).map($e=>Jt($e));s.set(new Set(Ce))}else{const Ce=new Set(r.get().map($e=>Jt($e)));s.set(Ce)}le(s.get().size)}},D=()=>{s.set(new Set),d.set(0)},ne=fe=>{const pe=new Set(fe??[]),Ce=new Set(r.get().filter($e=>pe.has($e.path)).map($e=>Jt($e)));s.set(Ce),d.set(Ce.size)},le=fe=>{d.set(fe)},je=fe=>{f.set(!!fe)},J=()=>f.get(),j=(fe,pe)=>{const Ce=r.get().filter($e=>pe.has(Jt($e)));l.set({type:fe,path:y.get().path,items:new Set(Ce)})},de=fe=>lo([l],pe=>pe.type==="cut"&&Array.from(pe.items).some(Ce=>Jt(Ce)===fe)),U=fe=>lo([l],pe=>pe.type==="copy"&&Array.from(pe.items).some(Ce=>Jt(Ce)===fe));return{files:r,storages:t,currentPath:e,sort:i,filter:o,selectedKeys:s,selectedCount:d,loading:f,draggedItem:u,clipboardItems:l,path:y,sortedFiles:g,selectedItems:m,setPath:b,setFiles:x,setStorages:S,setSort:O,toggleSort:T,clearSort:A,setFilter:M,clearFilter:z,select:Y,selectMultiple:ve,deselect:W,toggleSelect:K,selectAll:L,isSelected:X,clearSelection:D,setSelection:ne,setSelectedCount:le,setLoading:je,isLoading:J,setClipboard:j,createIsCut:de,createIsCopied:U,isCut:fe=>{const pe=de(fe);return Qe(pe).value??!1},isCopied:fe=>{const pe=U(fe);return Qe(pe).value??!1},clearClipboard:()=>{l.set({type:"copy",path:"",items:new Set})},getClipboard:()=>l.get(),setDraggedItem:fe=>{u.set(fe)},getDraggedItem:()=>u.get(),clearDraggedItem:()=>{u.set(null)},setReadOnly:fe=>{n.set(fe)},getReadOnly:()=>n.get(),isReadOnly:fe=>n.get()?!0:fe.read_only??!1,goBack:()=>{const fe=p.get(),pe=v.get();if(pe>0){const Ce=pe-1,$e=fe[Ce];$e&&(v.set(Ce),b($e,!1))}},goForward:()=>{const fe=p.get(),pe=v.get();if(pe<fe.length-1){const Ce=pe+1,$e=fe[Ce];$e&&(v.set(Ce),b($e,!1))}},canGoBack:lo([v],fe=>fe>0),canGoForward:lo([p,v],(fe,pe)=>pe<fe.length-1),navigationHistory:p,historyIndex:v}};class K9{validateParam(t,n){if(t==null)throw new Error(`${n} is required`)}validatePath(t){if(!t)throw new Error("Path must be a non-empty string")}parsePath(t){if(!t)return{};if(t.includes("://")){const[n,...r]=t.split("://");return{storage:n,path:r.join("://")}}return{path:t}}combinePath(t,n){return t&&n?`${t}://${n}`:n||""}}function z0(e,t,n){const r=`HTTP ${t}: ${n}`;if(!e)return r;try{const i=JSON.parse(e);if(i.message)return i.message;if(i.error){if(typeof i.error=="string")return i.error;if(i.error.message)return i.error.message}if(i.errors&&Array.isArray(i.errors)&&i.errors.length>0){const o=i.errors.map(s=>s.message).filter(s=>!!s);if(o.length>0)return o.join(", ")}return i.detail?i.detail:i.title?i.title:e}catch{return e||r}}class jC extends K9{config;static DEFAULT_URLS={list:"",upload:"/upload",delete:"/delete",rename:"/rename",copy:"/copy",move:"/move",archive:"/archive",unarchive:"/unarchive",createFile:"/create-file",createFolder:"/create-folder",preview:"/preview",download:"/download",search:"/search",save:"/save"};constructor(t){super();const n={...jC.DEFAULT_URLS,...t.url||{}};this.config={...t,baseURL:t.baseURL||"",url:n}}setBaseURL(t){this.config.baseURL=t||""}setToken(t){this.config.token=t}configureUploader(t,n){const r=this.getHeaders();delete r["Content-Type"],t.use(I9,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:r,formData:!0}),t.on("upload",()=>{const i=n.getTargetPath();t.getFiles().forEach(o=>{t.setFileMeta(o.id,{path:i})})})}getHeaders(){const t={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(t.Authorization=`Bearer ${this.config.token}`),t}async request(t,n={}){const r=`${this.config.baseURL}${t}`,i=await fetch(r,{...n,headers:{...this.getHeaders(),...n.headers}});if(!i.ok){const o=await i.text(),s=z0(o,i.status,i.statusText);throw new Error(s)}return i.status===204||i.status===304?{}:(i.headers.get("content-type")||"").includes("application/json")?await i.json():await i.text()}async list(t){const n=new URLSearchParams;t?.path&&n.append("path",t.path);const r=n.toString()?`${this.config.url.list}?${n.toString()}`:this.config.url.list;return await this.request(r,{method:"GET",signal:t?.signal})}async delete(t){return this.validateParam(t.items,"items"),this.validateParam(t.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:t.path,items:t.items})})}async rename(t){return this.validateParam(t.path,"path"),this.validateParam(t.item,"item"),this.validateParam(t.name,"name"),this.validatePath(t.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:t.path,item:t.item,name:t.name})})}async copy(t){return this.validateParam(t.sources,"sources"),this.validateParam(t.destination,"destination"),t.path&&this.validatePath(t.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:t.sources,destination:t.destination,path:t.path})})}async move(t){return this.validateParam(t.sources,"sources"),this.validateParam(t.destination,"destination"),t.path&&this.validatePath(t.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:t.sources,destination:t.destination,path:t.path})})}async archive(t){return this.validateParam(t.items,"items"),this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:t.items,path:t.path,name:t.name,...t.destination?{destination:t.destination}:{}})})}async unarchive(t){return this.validateParam(t.item,"item"),this.validateParam(t.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:t.item,path:t.path,...t.destination?{destination:t.destination}:{}})})}async createFile(t){return this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:t.path,name:t.name})})}async createFolder(t){return this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:t.path,name:t.name})})}getPreviewUrl(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path});return`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`}async getContent(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path}),r=`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`,i=await fetch(r,{headers:this.getHeaders(),signal:t.signal});if(!i.ok){const o=await i.text(),s=z0(o,i.status,i.statusText);throw new Error(s)}return{content:await i.text(),mimeType:i.headers.get("Content-Type")||void 0}}getDownloadUrl(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path});return`${this.config.baseURL}${this.config.url.download}?${n.toString()}`}async search(t){const n=this.config.url.search,r=new URLSearchParams;t.path&&r.set("path",t.path),t.filter&&r.set("filter",t.filter),t.deep&&r.set("deep","1"),t.size&&t.size!=="all"&&r.set("size",t.size);const i=r.toString()?`${n}?${r.toString()}`:n;return(await this.request(i,{method:"GET",signal:t.signal})).files||[]}async save(t){return this.validateParam(t.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:t.path,content:t.content}),headers:this.getHeaders(),signal:t.signal})}}const wp={list:e=>["adapter","list",e],search:(e,t,n,r)=>["adapter","search",e,t,n,r],delete:e=>["adapter","delete",e],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class G9{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(t,n={}){this.driver=t,this.onBeforeOpen=n.onBeforeOpen,this.onAfterOpen=n.onAfterOpen,this.queryClient=n.queryClient||new FV({defaultOptions:{queries:{refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,retry:n.retry??2},mutations:{retry:n.retry??1}}}),this.config={queryClient:this.queryClient,refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,cacheTime:n.cacheTime??600*1e3,retry:n.retry??2,onBeforeOpen:this.onBeforeOpen??(()=>{}),onAfterOpen:this.onAfterOpen??(()=>{})}}getDriver(){return this.driver}getQueryClient(){return this.queryClient}async list(t){const n=wp.list(t);return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.list({path:t,signal:r}),staleTime:this.config.staleTime})}async open(t){this.onBeforeOpen&&this.onBeforeOpen();try{const n=await this.list(t);return this.onAfterOpen&&this.onAfterOpen(n),n}catch(n){if(SV(n)||n?.name==="AbortError")return;throw n}}cancelOpen(t){const n=t===void 0?["adapter","list"]:wp.list(t);this.queryClient.cancelQueries({queryKey:n})}async delete(t){const n=await this.driver.delete(t);return this.invalidateListQueries(),n}async rename(t){const n=await this.driver.rename(t);return this.invalidateListQueries(),n}async copy(t){const n=await this.driver.copy(t);return this.invalidateListQueries(),n}async move(t){const n=await this.driver.move(t);return this.invalidateListQueries(),n}async archive(t){const n=await this.driver.archive(t);return this.invalidateListQueries(),n}async unarchive(t){const n=await this.driver.unarchive(t);return this.invalidateListQueries(),n}async createFile(t){const n=await this.driver.createFile(t);return this.invalidateListQueries(),n}async createFolder(t){const n=await this.driver.createFolder(t);return this.invalidateListQueries(),n}async getContent(t){const n=["adapter","content",t.path];return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.getContent({path:t.path,signal:t.signal??r}),staleTime:this.config.staleTime})}getPreviewUrl(t){return this.driver.getPreviewUrl(t)}getDownloadUrl(t){return this.driver.getDownloadUrl(t)}async search(t){const n=wp.search(t.path,t.filter,t.deep,t.size);return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.search({...t,signal:t.signal??r}),staleTime:this.config.staleTime})}async save(t){const n=await this.driver.save(t);return this.invalidateListQueries(),n}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(t){this.queryClient.invalidateQueries({queryKey:["adapter","list",t],exact:!0})}clearCache(){this.queryClient.clear()}}function Q9(e){const t=Qe(e.state);return{current:se(()=>t.value.theme||"silver"),set:n=>{e.set("theme",n)}}}const X9=(e,t)=>{const n=F9(e.id??"vf"),r=nB(),i=t.i18n,o=e.locale??t.locale,s=W9(e.id??"vf",e.config??{}),l=Y9();if(!e.driver)throw new Error("Driver is required for VueFinder");const u=new G9(e.driver);return Hn({version:z9,config:s,theme:(()=>{const d=Q9(s);return{current:d.current,set:d.set}})(),fs:l,root:null,debug:e.debug??!1,emitter:r,storage:n,i18n:U9(n,o,r,i,s),modal:V9(s),adapter:Ni(u),features:MC(e.features),selectionMode:e.selectionMode||"multiple",selectionFilterType:se(()=>e.selectionFilterType||"both"),selectionFilterMimeIncludes:se(()=>e.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:s.get("metricUnits")?DC:Bm,contextMenuItems:e.contextMenuItems,customUploader:e.customUploader})},J9=["data-theme"],Z9={class:"vuefinder__modal-layout__container"},eq={class:"vuefinder__modal-layout__content"},tq={key:0,class:"vuefinder__modal-layout__footer"},nq={key:0,class:"vuefinder__modal-drag-overlay"},rq={class:"vuefinder__modal-drag-message"},dr=ze({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{},onRequestClose:{type:Function},bodyStyle:{type:[Boolean,null,String,Object,Array]},bodyClass:{},onBodyTouchstart:{type:Function},onBodyTouchmove:{type:Function},onBodyTouchend:{type:Function},onBodyTouchcancel:{type:Function}},setup(e){const t=re(null),n=rt();n.config;const r=e,i=()=>{r.onRequestClose?r.onRequestClose():n.modal.close()};xt(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),gt(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&t.value){const l=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:l,left:0,behavior:"smooth"})}})});const o=s=>{s.target.classList.contains("vuefinder__modal-layout__wrapper")&&(s.preventDefault(),s.stopPropagation())};return(s,l)=>(C(),R("div",{"data-theme":w(n).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:l[5]||(l[5]=Lr(u=>i(),["esc"]))},[l[6]||(l[6]=_("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),_("div",Z9,[_("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:o,onMousedown:l[4]||(l[4]=ht(u=>i(),["self"]))},[_("div",{ref_key:"modalBody",ref:t,class:Be(["vuefinder__modal-layout__body",r.bodyClass]),style:an(r.bodyStyle),onTouchstart:l[0]||(l[0]=(...u)=>r.onBodyTouchstart&&r.onBodyTouchstart(...u)),onTouchmove:l[1]||(l[1]=(...u)=>r.onBodyTouchmove&&r.onBodyTouchmove(...u)),onTouchend:l[2]||(l[2]=(...u)=>r.onBodyTouchend&&r.onBodyTouchend(...u)),onTouchcancel:l[3]||(l[3]=(...u)=>r.onBodyTouchcancel&&r.onBodyTouchcancel(...u))},[_("div",eq,[mt(s.$slots,"default")]),s.$slots.buttons?(C(),R("div",tq,[mt(s.$slots,"buttons")])):Se("",!0)],38)],32)]),r.showDragOverlay?(C(),R("div",nq,[_("div",rq,q(r.dragOverlayText||"Drag and drop the files/folders to here."),1)])):Se("",!0)],40,J9))}}),iq={class:"vuefinder__modal-header"},oq={class:"vuefinder__modal-header__icon-container"},sq={id:"modal-title",class:"vuefinder__modal-header__title"},xr=ze({__name:"ModalHeader",props:{title:{},icon:{}},setup(e){return(t,n)=>(C(),R("div",iq,[_("div",oq,[(C(),Ee(Pn(e.icon),{class:"vuefinder__modal-header__icon"}))]),_("div",sq,q(e.title),1)]))}}),aq={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function lq(e,t){return C(),R("svg",aq,[...t[0]||(t[0]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8.2h.01M10.75 11.25H12v4.5m0 0h1.25m-1.25 0h-2"},null,-1)])])}const Vm={render:lq},uq={class:"vuefinder__about-modal__content"},cq={class:"vuefinder__about-modal__main"},dq={class:"vuefinder__about-modal__tab-content"},fq={class:"vuefinder__about-modal__lead"},pq={class:"vuefinder__about-modal__description"},hq={class:"vuefinder__about-modal__links"},mq={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},vq={class:"vuefinder__about-modal__meta"},gq={class:"vuefinder__about-modal__meta-item"},_q={class:"vuefinder__about-modal__meta-label"},yq={class:"vuefinder__about-modal__meta-value"},bq={class:"vuefinder__about-modal__meta-item"},wq={class:"vuefinder__about-modal__meta-label"},UC=ze({__name:"ModalAbout",setup(e){const t=rt(),{t:n}=t.i18n;return(r,i)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:i[0]||(i[0]=o=>w(t).modal.close())},q(w(n)("Close")),1)]),default:Le(()=>[_("div",uq,[Z(xr,{icon:w(Vm),title:"Vuefinder "+w(t).version},null,8,["icon","title"]),_("div",cq,[_("div",dq,[_("div",fq,q(w(n)("A modern, customizable file manager component built for Vue.")),1),_("div",pq,q(w(n)("If you like it, please follow and ⭐ star on GitHub.")),1),_("div",hq,[_("a",mq,q(w(n)("Project Home")),1),i[1]||(i[1]=_("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),_("div",vq,[_("div",gq,[_("span",_q,q(w(n)("Version")),1),_("span",yq,q(w(t).version),1)]),_("div",bq,[_("span",wq,q(w(n)("License")),1),i[2]||(i[2]=_("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),Eq={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Sq(e,t){return C(),R("svg",Eq,[...t[0]||(t[0]=[_("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const NC={render:Sq},Cq={class:"vuefinder__delete-modal__content"},xq={class:"vuefinder__delete-modal__form"},Tq={class:"vuefinder__delete-modal__description"},kq={class:"vuefinder__delete-modal__files vf-scrollbar"},Oq={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},$q={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Aq={class:"vuefinder__delete-modal__file-name"},Rq={class:"vuefinder__delete-modal__confirmation"},Pq={class:"vuefinder__delete-modal__confirmation-label"},Iq={class:"vuefinder__delete-modal__confirmation-text"},Mq=["disabled"],Xc=ze({__name:"ModalDelete",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(t.modal.data.items),l=re(!1),u=()=>{s.value.length&&l.value&&t.adapter.delete({path:o.value.path,items:s.value.map(({path:d,type:f})=>({path:d,type:f}))}).then(d=>{n.success(r("Files deleted.")),t.fs.setFiles(d.files),t.modal.close()}).catch(d=>{n.error(yn(d,r("Failed to delete files")))})};return(d,f)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("div",Rq,[_("label",Pq,[Ct(_("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>l.value=p),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[Zs,l.value]]),_("span",Iq,q(w(r)("I'm sure delete it, This action cannot be undone.")),1)])]),_("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!l.value,onClick:u},q(w(r)("Yes, Delete!")),9,Mq),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[1]||(f[1]=p=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(NC),title:w(r)("Delete files")},null,8,["icon","title"]),_("div",Cq,[_("div",xq,[_("p",Tq,q(w(r)("Are you sure you want to delete these files?")),1),_("div",kq,[(C(!0),R(We,null,ct(s.value,p=>(C(),R("p",{key:p.path,class:"vuefinder__delete-modal__file"},[p.type==="dir"?(C(),R("svg",Oq,[...f[2]||(f[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",$q,[...f[3]||(f[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",Aq,q(p.basename),1)]))),128))])])])])]),_:1}))}}),Dq={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Fq(e,t){return C(),R("svg",Dq,[...t[0]||(t[0]=[_("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1)])])}const zC={render:Fq},Lq={class:"vuefinder__rename-modal__content"},jq={class:"vuefinder__rename-modal__item"},Uq={class:"vuefinder__rename-modal__item-info"},Nq={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},zq={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Bq={class:"vuefinder__rename-modal__item-name"},Jc=ze({__name:"ModalRename",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(t.modal.data.items[0]),l=re(s.value.basename),u=()=>{l.value!=s.value.basename&&t.adapter.rename({path:o.value.path,item:s.value.path,name:l.value}).then(d=>{n.success(r("%s is renamed.",l.value)),t.fs.setFiles(d.files),t.modal.close()}).catch(d=>{n.error(yn(d,r("Failed to rename")))})};return(d,f)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:u},q(w(r)("Rename")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[1]||(f[1]=p=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(zC),title:w(r)("Rename")},null,8,["icon","title"]),_("div",Lq,[_("div",jq,[_("p",Uq,[s.value.type==="dir"?(C(),R("svg",Nq,[...f[2]||(f[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",zq,[...f[3]||(f[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",Bq,q(s.value.basename),1)]),Ct(_("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>l.value=p),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:Lr(u,["enter"])},null,544),[[oi,l.value]])])])])]),_:1}))}});function fr(){const e=rt(),t=se(()=>e.features);return{enabled:n=>t.value[n]??!1}}function Vq(e,t=null){return new Date(e*1e3).toLocaleString(t??navigator.language??"en-US")}const Hq={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"vuefinder__breadcrumb__close-icon",viewBox:"0 0 24 24"};function qq(e,t){return C(),R("svg",Hq,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const BC={render:qq},Wq={class:"vuefinder__preview-chrome"},Yq={class:"vuefinder__preview-chrome__popover-host vuefinder__preview-chrome__info-host"},Kq=["title","aria-label"],Gq={key:0,class:"vuefinder__preview-chrome__popover"},Qq={class:"vuefinder__preview-chrome__popover-label"},Xq={class:"vuefinder__preview-chrome__popover-value"},Jq=["title"],Zq={class:"vuefinder__preview-chrome__actions"},eW=["aria-label"],tW={key:1,class:"vuefinder__preview-chrome__popover-host"},nW=["title","aria-label"],rW={key:0,class:"vuefinder__preview-chrome__popover"},iW=["href","download"],oW={class:"vuefinder__preview-chrome__popover-hint"},sW=["title","aria-label"],aW=ze({name:"PreviewChrome",__name:"PreviewChrome",emits:["close-request"],setup(e,{emit:t}){const n=t,r=rt(),{enabled:i}=fr(),{t:o}=r.i18n,s=Qe(r.fs.sortedFiles),l=se(()=>s.value.filter(S=>S.type==="file")),u=se(()=>l.value.findIndex(S=>S.path===r.modal.data.item.path)),d=se(()=>l.value.length),f=se(()=>r.modal.controls??null),p=se(()=>!!w(f.value?.isEditing)),v=re(!1),y=re(!1),g=S=>{S==="info"?(v.value=!v.value,y.value=!1):(y.value=!y.value,v.value=!1)},m=S=>{S.target.closest(".vuefinder__preview-chrome__popover-host")||(v.value=!1,y.value=!1)};xt(()=>document.addEventListener("mousedown",m)),ts(()=>document.removeEventListener("mousedown",m));const b=se(()=>{const S=r.modal.data.item,O=[{label:o("File Size"),value:r.filesize(S.file_size??0)},{label:o("Last Modified"),value:Vq(S.last_modified??0)}];S.mime_type&&O.push({label:o("Type"),value:S.mime_type});const T=w(f.value?.extraInfo);if(Array.isArray(T))for(const A of T)O.push(A);return O.push({label:o("Path"),value:S.path}),O}),x=se(()=>r.adapter.getDownloadUrl(r.modal.data.item));return(S,O)=>(C(),R("div",Wq,[_("div",Yq,[_("button",{type:"button",class:Be(["vuefinder__preview-chrome__info-btn",{"vuefinder__preview-chrome__info-btn--active":v.value}]),title:w(o)("File info"),"aria-label":w(o)("File info"),onClick:O[0]||(O[0]=T=>g("info"))},[Z(w(Vm),{class:"vuefinder__preview-chrome__icon"})],10,Kq),v.value?(C(),R("div",Gq,[(C(!0),R(We,null,ct(b.value,T=>(C(),R("div",{key:T.label,class:"vuefinder__preview-chrome__popover-row"},[_("span",Qq,q(T.label),1),_("span",Xq,q(T.value),1)]))),128))])):Se("",!0)]),_("div",{id:"modal-title",class:"vuefinder__preview-chrome__title",title:w(r).modal.data.item.path},q(w(r).modal.data.item.basename),9,Jq),_("div",Zq,[d.value>1&&!p.value?(C(),R("span",{key:0,class:"vuefinder__preview-chrome__counter","aria-label":w(o)("File %s of %s",String(u.value+1),String(d.value))},q(u.value+1)+" / "+q(d.value),9,eW)):Se("",!0),w(i)("download")&&!p.value?(C(),R("div",tW,[_("button",{type:"button",class:Be(["vuefinder__preview-chrome__info-btn",{"vuefinder__preview-chrome__info-btn--active":y.value}]),title:w(o)("Download"),"aria-label":w(o)("Download"),onClick:O[1]||(O[1]=T=>g("download"))},[...O[3]||(O[3]=[_("svg",{class:"vuefinder__preview-chrome__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M12 3v12"}),_("path",{d:"M7 10l5 5 5-5"}),_("path",{d:"M5 21h14"})],-1)])],10,nW),y.value?(C(),R("div",rW,[_("a",{href:x.value,download:x.value,target:"_blank",class:"vuefinder__preview-chrome__popover-action"},[O[4]||(O[4]=_("svg",{class:"vuefinder__preview-chrome__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M12 3v12"}),_("path",{d:"M7 10l5 5 5-5"}),_("path",{d:"M5 21h14"})],-1)),_("span",null,q(w(o)("Download")),1)],8,iW),_("p",oW,q(w(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):Se("",!0)])):Se("",!0),_("button",{type:"button",class:"vuefinder__preview-chrome__btn vuefinder__preview-chrome__btn--icon vuefinder__preview-chrome__btn--close",title:w(o)("Close"),"aria-label":w(o)("Close"),onClick:O[2]||(O[2]=T=>n("close-request"))},[Z(w(BC),{class:"vuefinder__preview-chrome__icon vuefinder__preview-chrome__icon--lg"})],8,sW)])]))}});function Hm(e){const t=rt();xt(()=>{if(typeof t.modal.registerControls!="function"){console.warn("[vuefinder] PreviewControls registration skipped: app.modal.registerControls is missing. Hard refresh the page to pick up the latest modal API.");return}t.modal.registerControls(e)}),ts(()=>{typeof t.modal.unregisterControls=="function"&&t.modal.unregisterControls(e)})}const lW={class:"vuefinder__text-preview"},uW={class:"vuefinder__text-preview__body"},cW={key:0,class:"vuefinder__text-preview__content"},dW=ze({__name:"Text",emits:["success"],setup(e,{emit:t}){const n=Jr({loader:()=>Rt(()=>import("./CodeMirrorEditor-Cqow8ROO-DYjlZgX9.js"),__vite__mapDeps([93,2,1]),import.meta.url).then(S=>S.C),delay:100}),r=t,i=re(""),o=re(""),s=re(!1),l=re(!1),u=rt(),d=cr(u),{enabled:f}=fr(),{t:p}=u.i18n;xt(async()=>{try{const S=await u.adapter.getContent({path:u.modal.data.item.path});i.value=S.content,o.value=S.content,r("success")}catch(S){yn(S,"Failed to load text content"),r("success")}});const v=se(()=>f("edit")&&!u.fs.isReadOnly(u.modal.data.item)),y=se(()=>s.value),g=se(()=>s.value&&o.value!==i.value),m=()=>{o.value=i.value,s.value=!0,u.modal.setEditMode(!0)},b=()=>{s.value=!1,o.value=i.value,u.modal.setEditMode(!1)},x=async()=>{try{await u.adapter.save({path:u.modal.data.item.path,content:o.value}),i.value=o.value,d.success(p("Updated.")),s.value=!1,u.modal.setEditMode(!1),r("success")}catch(S){d.error(yn(S,p("Failed to save file")))}};return Hm({isEditable:v,isEditing:y,isDirty:g,primaryActionLabel:se(()=>p("Save")),enterEdit:m,commitEdit:x,cancelEdit:b}),(S,O)=>(C(),R("div",lW,[_("div",uW,[(C(),Ee(Ih,{onResolve:O[2]||(O[2]=T=>l.value=!0)},{fallback:Le(()=>[s.value?Ct((C(),R("textarea",{key:1,"onUpdate:modelValue":O[1]||(O[1]=T=>o.value=T),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512)),[[oi,o.value]]):(C(),R("pre",cW,q(i.value),1))]),default:Le(()=>[Z(w(n),{"model-value":s.value?o.value:i.value,readonly:!s.value,filename:w(u).modal.data.item.basename,"onUpdate:modelValue":O[0]||(O[0]=T=>s.value?o.value=T:null)},null,8,["model-value","readonly","filename"])]),_:1})),Ct(_("span",null,q(l.value),513),[[Nr,!1]])])]))}}),fW={class:"vuefinder__text-preview"},pW={class:"vuefinder__text-preview__body vuefinder__csv-preview__body"},hW={key:0,class:"vuefinder__text-preview__content"},mW={key:0,class:"vuefinder__csv-preview__error"},vW={key:1,class:"vuefinder__csv-preview__empty"},gW={key:2,class:"vuefinder__csv-preview__table-wrap"},_W={class:"vuefinder__csv-preview__table"},yW=["title"],bW={class:"vuefinder__csv-preview__row-num"},wW=["title"],EW={key:0,class:"vuefinder__csv-preview__truncated"},SW={key:2,class:"vuefinder__csv-preview__view-checkbox"},Ep=1e3,CW=ze({name:"CsvPreview",__name:"Csv",emits:["success"],setup(e,{emit:t}){const n=Jr({loader:()=>Rt(()=>import("./CodeMirrorEditor-Cqow8ROO-DYjlZgX9.js"),__vite__mapDeps([93,2,1]),import.meta.url).then(ve=>ve.C),delay:100}),r=t,i=re(""),o=re(""),s=_n([]),l=_n([]),u=re(null),d=re(!1),f=re(!1),p=se(()=>s.value.length>Ep),v=se(()=>p.value?s.value.slice(0,Ep):s.value),y=rt(),g=cr(y),{enabled:m}=fr(),{t:b}=y.i18n;async function x(ve){try{const{parse:W}=await Rt(()=>import("./papaparse.min-Brc8PWCw-BsyFjD51.js"),[],import.meta.url).then(D=>D.p),X=W(ve,{skipEmptyLines:!0,delimiter:""});if(!X.data.length){l.value=[],s.value=[];return}const[K,...L]=X.data;l.value=K??[],s.value=L,u.value=null}catch(W){u.value=yn(W,b("Failed to parse CSV")),l.value=[],s.value=[]}}xt(async()=>{try{const ve=await y.adapter.getContent({path:y.modal.data.item.path});i.value=ve.content,o.value=ve.content,await x(ve.content),r("success")}catch(ve){yn(ve,"Failed to load CSV content"),r("success")}});const S=se(()=>!d.value&&f.value),O=se(()=>m("edit")&&!y.fs.isReadOnly(y.modal.data.item)),T=se(()=>d.value),A=se(()=>d.value&&o.value!==i.value),M=()=>{o.value=i.value,d.value=!0,f.value=!1,y.modal.setEditMode(!0)},z=()=>{d.value=!1,o.value=i.value,y.modal.setEditMode(!1)},Y=async()=>{try{await y.adapter.save({path:y.modal.data.item.path,content:o.value}),i.value=o.value,await x(i.value),g.success(b("Updated.")),d.value=!1,y.modal.setEditMode(!1),r("success")}catch(ve){g.error(yn(ve,b("Failed to save file")))}};return Hm({isEditable:O,isEditing:T,isDirty:A,primaryActionLabel:se(()=>b("Save")),enterEdit:M,commitEdit:Y,cancelEdit:z}),(ve,W)=>(C(),R("div",fW,[_("div",pW,[S.value?(C(),R(We,{key:1},[u.value?(C(),R("div",mW,q(u.value),1)):!s.value.length&&!l.value.length?(C(),R("div",vW,q(w(b)("No rows to display")),1)):(C(),R("div",gW,[_("table",_W,[_("thead",null,[_("tr",null,[W[3]||(W[3]=_("th",{class:"vuefinder__csv-preview__row-num"},null,-1)),(C(!0),R(We,null,ct(l.value,(X,K)=>(C(),R("th",{key:K,title:X},q(X),9,yW))),128))])]),_("tbody",null,[(C(!0),R(We,null,ct(v.value,(X,K)=>(C(),R("tr",{key:K},[_("td",bW,q(K+1),1),(C(!0),R(We,null,ct(X,(L,D)=>(C(),R("td",{key:D,title:L},q(L),9,wW))),128))]))),128))])]),p.value?(C(),R("div",EW,q(w(b)("Showing first %s rows out of %s",Ep,s.value.length)),1)):Se("",!0)]))],64)):(C(),Ee(Ih,{key:0},{fallback:Le(()=>[d.value?Ct((C(),R("textarea",{key:1,"onUpdate:modelValue":W[1]||(W[1]=X=>o.value=X),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512)),[[oi,o.value]]):(C(),R("pre",hW,q(i.value),1))]),default:Le(()=>[Z(w(n),{"model-value":d.value?o.value:i.value,readonly:!d.value,filename:w(y).modal.data.item.basename,"onUpdate:modelValue":W[0]||(W[0]=X=>d.value?o.value=X:null)},null,8,["model-value","readonly","filename"])]),_:1})),d.value?Se("",!0):(C(),R("label",SW,[Ct(_("input",{"onUpdate:modelValue":W[2]||(W[2]=X=>f.value=X),type:"checkbox"},null,512),[[Zs,f.value]]),_("span",null,q(w(b)("Show as table")),1)]))])]))}}),qm=async(e,t)=>{if(t){if(t.isFile){const n=await new Promise(r=>{t.file(r)});e(t,n)}if(t.isDirectory){const n=t.createReader(),r=await new Promise(i=>{n.readEntries(i)});for(const i of r)await qm(e,i)}}},un={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function VC(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.path),o=t.config,s=re({QUEUE_ENTRY_STATUS:un}),l=re(null),u=re(null),d=re(null),f=re(null),p=re(null),v=re([]),y=re(""),g=re(!1),m=re(!1),b=re(null);let x;const S=j=>{j.preventDefault(),j.stopPropagation(),m.value=!0},O=j=>{j.preventDefault(),j.stopPropagation(),m.value=!0},T=j=>{j.preventDefault(),j.stopPropagation(),(!j.relatedTarget||j.relatedTarget===document.body)&&(m.value=!1)},A=j=>{j.preventDefault(),j.stopPropagation(),m.value=!1;const de=/^[/\\](.+)/,U=j.dataTransfer;U&&(U.items&&U.items.length?Array.from(U.items).forEach(ee=>{if(ee.kind==="file"){const Q=ee.webkitGetAsEntry?.();if(Q)qm((B,oe)=>{const V=de.exec(B?.fullPath||"");z(oe,V?V[1]:oe.name)},Q);else{const B=ee.getAsFile?.();B&&z(B)}}}):U.files&&U.files.length&&Array.from(U.files).forEach(ee=>z(ee)))},M=j=>v.value.findIndex(de=>de.id===j),z=(j,de)=>x.addFile({name:de||j.name,type:j.type,data:j,source:"Local"}),Y=j=>j.status===un.DONE?"text-green-600":j.status===un.ERROR||j.status===un.CANCELED?"text-red-600":"",ve=j=>j.status===un.DONE?"✓":j.status===un.ERROR||j.status===un.CANCELED?"!":"...",W=()=>f.value?.click(),X=()=>t.modal.close(),K=j=>{if(g.value||!v.value.filter(de=>de.status!==un.DONE).length){g.value||(y.value=n("Please select file to upload first."));return}y.value="",b.value=j||i.value,x.upload()},L=()=>{x.cancelAll(),v.value.forEach(j=>{j.status!==un.DONE&&(j.status=un.CANCELED,j.statusName=n("Canceled"))}),g.value=!1},D=j=>{g.value||(x.removeFile(j.id),v.value.splice(M(j.id),1))},ne=j=>{if(!g.value)if(x.cancelAll(),j){const de=v.value.filter(U=>U.status!==un.DONE);v.value=[],de.forEach(U=>z(U.originalFile,U.name))}else v.value=[]},le=j=>{j.forEach(de=>{z(de)})},je=(j,de)=>j.endsWith("://")||j.endsWith("/")?j+de:j+"/"+de,J=async(j,de)=>{const U=de.trim();if(g.value||!U)return;if(U.includes("/")||U.includes("\\")){y.value=n("Name cannot contain slashes.");return}const ee=j.name.split("/");ee[ee.length-1]=U;const Q=ee.join("/");if(Q===j.name)return;if(j.status===un.DONE){const G=b.value?.path||i.value.path,N=je(G,j.name),ie=j.name.split("/");ie.pop();const ge=ie.length?je(G,ie.join("/")):G;try{await t.adapter.rename({path:ge,item:N,name:U}),j.name=Q,t.adapter.invalidateListQuery(G),G===i.value.path&&t.adapter.open(G)}catch(fe){y.value=fe?.message||n("Failed to rename")}return}const B=M(j.id);if(B===-1)return;const oe=j.originalFile,V=j.name;x.removeFile(j.id),v.value.splice(B,1);let P;try{P=z(oe,Q)}catch(G){y.value=G?.message||n("Failed to rename");try{z(oe,V)}catch{}return}if(!P)return;const F=M(P);if(F!==-1&&F!==B){const G=v.value.splice(F,1)[0];G&&v.value.splice(B,0,G)}};return xt(()=>{x=new am({debug:t.debug,restrictions:{maxFileSize:B9(o.get("maxFileSize")??"10mb")},locale:t.i18n.t("uppy"),onBeforeFileAdded:(ee,Q)=>{if(Q[ee.id]!=null){const B=M(ee.id);v.value[B]?.status===un.PENDING&&(y.value=x.i18n("noDuplicates",{fileName:ee.name})),v.value=v.value.filter(oe=>oe.id!==ee.id)}return v.value.push({id:ee.id,name:ee.name,size:t.filesize(ee.size),status:un.PENDING,statusName:n("Pending upload"),percent:null,originalFile:ee.data}),!0}});const j={getTargetPath:()=>(b.value||i.value).path};if(e)e(x,j);else if(t.adapter.getDriver().configureUploader)t.adapter.getDriver().configureUploader(x,j);else throw new Error("No uploader configured");x.on("restriction-failed",(ee,Q)=>{const B=v.value[M(ee.id)];B&&D(B),y.value=Q.message}),x.on("upload-start",ee=>{ee.forEach(Q=>{const B=v.value[M(Q.id)];B&&(B.status=un.UPLOADING,B.statusName=n("Uploading"),B.percent="0%")})}),x.on("upload-progress",(ee,Q)=>{const B=Q.bytesTotal??1,oe=Math.floor(Q.bytesUploaded/B*100),V=M(ee.id);V!==-1&&v.value[V]&&(v.value[V].percent=`${oe}%`)}),x.on("upload-success",ee=>{const Q=v.value[M(ee.id)];Q&&(Q.status=un.DONE,Q.statusName=n("Done"))}),x.on("upload-error",(ee,Q)=>{const B=v.value[M(ee.id)];B&&(B.percent=null,B.status=un.ERROR,B.statusName=Q?.isNetworkError?n("Network Error, Unable establish connection to the server or interrupted."):Q?.message||n("Unknown Error"))}),x.on("error",ee=>{y.value=ee.message,g.value=!1}),x.on("complete",ee=>{g.value=!1;const Q=b.value||i.value;t.adapter.invalidateListQuery(Q.path),t.adapter.open(Q.path);const B=v.value.filter(oe=>oe.status===un.DONE&&ee.successful.includes(oe.id)).map(oe=>oe.name);t.emitter.emit("vf-upload-complete",B)}),f.value?.addEventListener("click",()=>u.value?.click()),p.value?.addEventListener("click",()=>d.value?.click());const de={capture:!0};document.addEventListener("dragover",S,de),document.addEventListener("dragenter",O,de),document.addEventListener("dragleave",T,de),document.addEventListener("drop",A,de);const U=ee=>{const Q=ee.target,B=Q.files;if(B){for(const oe of B)z(oe);Q.value=""}};u.value?.addEventListener("change",U),d.value?.addEventListener("change",U)}),xn(()=>{const j={capture:!0};document.removeEventListener("dragover",S,j),document.removeEventListener("dragenter",O,j),document.removeEventListener("dragleave",T,j),document.removeEventListener("drop",A,j)}),{container:l,internalFileInput:u,internalFolderInput:d,pickFiles:f,pickFolders:p,queue:v,message:y,uploading:g,hasFilesInDropArea:m,definitions:s,openFileSelector:W,upload:K,cancel:L,remove:D,clear:ne,close:X,getClassNameForEntry:Y,getIconForEntry:ve,addExternalFiles:le,renameEntry:J}}const B0="image/png",Wm="image/jpeg",xW="image/webp";function TW(e){const t=(e.split(".").pop()??"").toLowerCase();return t==="png"?B0:t==="webp"?xW:t==="gif"?B0:Wm}function HC(e){return new Promise((t,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>n(new Error("Failed to load image")),r.src=e})}function qC(e,t){const n=document.createElement("canvas");n.width=e,n.height=t;const r=n.getContext("2d");if(!r)throw new Error("Could not acquire 2D canvas context");return{canvas:n,ctx:r}}async function V0(e,t,n){const r=await HC(e),{canvas:i,ctx:o}=qC(r.naturalWidth,r.naturalHeight);return o.filter=t,o.drawImage(r,0,0),i.toDataURL(n,n===Wm?.92:void 0)}async function kW(e,t,n,r,i){const o=await HC(e),s=o.naturalWidth,l=o.naturalHeight,u=t===90||t===270,{canvas:d,ctx:f}=qC(u?l:s,u?s:l);return f.translate(d.width/2,d.height/2),t&&f.rotate(t*Math.PI/180),(n||r)&&f.scale(n?-1:1,r?-1:1),f.drawImage(o,-s/2,-l/2),d.toDataURL(i,i===Wm?.92:void 0)}function OW(e,t,n){const r=1+e/100,i=1+t/100,o=1+n/100;return`brightness(${r}) contrast(${i}) saturate(${o})`}async function $W(e){return await(await fetch(e)).blob()}const AW={class:"vuefinder__image-editor"},RW={class:"vuefinder__image-editor__strip",role:"tablist"},PW=["aria-selected","onClick"],IW={key:0,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},MW={key:1,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},DW={key:2,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},FW={key:3,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},LW={class:"vuefinder__image-editor__tab-label"},jW={key:0,class:"vuefinder__image-editor__panel"},UW={class:"vuefinder__image-editor__stage"},NW={class:"vuefinder__image-editor__controls"},zW={class:"vuefinder__image-editor__chips"},BW=["onClick"],VW=["disabled"],HW={key:1,class:"vuefinder__image-editor__panel"},qW={class:"vuefinder__image-editor__stage"},WW=["src","alt"],YW={class:"vuefinder__image-editor__controls"},KW={class:"vuefinder__image-editor__rotate-btns"},GW=["title"],QW=["title"],XW=["title"],JW=["title"],ZW=["disabled"],eY={key:2,class:"vuefinder__image-editor__panel"},tY={class:"vuefinder__image-editor__stage"},nY=["src","alt"],rY={class:"vuefinder__image-editor__controls"},iY={class:"vuefinder__image-editor__toggle"},oY=["disabled"],sY={key:3,class:"vuefinder__image-editor__panel"},aY={class:"vuefinder__image-editor__stage"},lY=["src","alt"],uY={class:"vuefinder__image-editor__controls vuefinder__image-editor__controls--stacked"},cY={class:"vuefinder__image-editor__slider"},dY={class:"vuefinder__image-editor__slider"},fY={class:"vuefinder__image-editor__slider"},pY={class:"vuefinder__image-editor__row"},hY=["disabled"],mY=ze({name:"ImageEditor",__name:"ImageEditor",props:{src:{},filename:{}},emits:["update:src"],setup(e,{emit:t}){const n=e,r=t,i=rt(),{t:o}=i.i18n,s=re("crop"),l=re(!1),u=re(null),d=[{label:"Original",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],f=_i("cropperRef"),p=re(0),v=re(!1),y=re(!1),g=re(!1),m=re(0),b=re(0),x=re(0),S=se(()=>OW(m.value,b.value,x.value));He([()=>n.src,s],()=>{p.value=0,v.value=!1,y.value=!1,g.value=!1,m.value=0,b.value=0,x.value=0});const O=se(()=>TW(n.filename)),T=se(()=>{const j=[];return p.value&&j.push(`rotate(${p.value}deg)`),v.value&&j.push("scaleX(-1)"),y.value&&j.push("scaleY(-1)"),j.length?{transform:j.join(" ")}:{}}),A=j=>{l.value||(s.value=j)},M=()=>{const j=f.value?.getResult()?.canvas;if(!j)return;const de=j.toDataURL(O.value,O.value==="image/jpeg"?.92:void 0);r("update:src",de)},z=async()=>{if(le.value){l.value=!0;try{const j=await kW(n.src,ne.value,v.value,y.value,O.value);r("update:src",j)}finally{l.value=!1}}},Y=async()=>{if(g.value){l.value=!0;try{const j=await V0(n.src,"grayscale(1)",O.value);r("update:src",j)}finally{l.value=!1}}},ve=async()=>{if(!(m.value===0&&b.value===0&&x.value===0)){l.value=!0;try{const j=await V0(n.src,S.value,O.value);r("update:src",j)}finally{l.value=!1}}},W=()=>{m.value=0,b.value=0,x.value=0},X=()=>{p.value-=90},K=()=>{p.value+=90},L=()=>{v.value=!v.value},D=()=>{y.value=!y.value},ne=se(()=>(p.value%360+360)%360),le=se(()=>ne.value!==0||v.value||y.value),je=se(()=>m.value!==0||b.value!==0||x.value!==0),J=se(()=>g.value);return(j,de)=>(C(),R("div",AW,[_("div",RW,[(C(),R(We,null,ct(["crop","rotate","grayscale","adjust"],U=>_("button",{key:U,type:"button",role:"tab","aria-selected":s.value===U,class:Be(["vuefinder__image-editor__tab",{"vuefinder__image-editor__tab--active":s.value===U}]),onClick:ee=>A(U)},[U==="crop"?(C(),R("svg",IW,[...de[4]||(de[4]=[_("path",{d:"M6 2v16a2 2 0 0 0 2 2h14"},null,-1),_("path",{d:"M2 6h16a2 2 0 0 1 2 2v14"},null,-1)])])):U==="rotate"?(C(),R("svg",MW,[...de[5]||(de[5]=[_("polyline",{points:"23 4 23 10 17 10"},null,-1),_("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"},null,-1)])])):U==="grayscale"?(C(),R("svg",DW,[...de[6]||(de[6]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{d:"M12 3v18"},null,-1),_("path",{d:"M12 3a9 9 0 0 0 0 18",fill:"currentColor"},null,-1)])])):(C(),R("svg",FW,[...de[7]||(de[7]=[Fu('<line x1="4" y1="6" x2="14" y2="6"></line><circle cx="17" cy="6" r="2"></circle><line x1="10" y1="12" x2="20" y2="12"></line><circle cx="7" cy="12" r="2"></circle><line x1="4" y1="18" x2="14" y2="18"></line><circle cx="17" cy="18" r="2"></circle>',6)])])),_("span",LW,q(U==="crop"?w(o)("Crop"):U==="rotate"?w(o)("Rotate"):U==="grayscale"?w(o)("Grayscale"):w(o)("Adjust")),1)],10,PW)),64))]),s.value==="crop"?(C(),R("div",jW,[_("div",UW,[Z(w(VS),{ref_key:"cropperRef",ref:f,class:"vuefinder__image-editor__cropper",crossorigin:"anonymous",src:n.src,"stencil-props":u.value===null?{}:{aspectRatio:u.value},"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src","stencil-props"])]),_("div",NW,[_("div",zW,[(C(),R(We,null,ct(d,U=>_("button",{key:U.label,type:"button",class:Be(["vuefinder__image-editor__chip",{"vuefinder__image-editor__chip--active":u.value===U.value}]),onClick:ee=>u.value=U.value},q(w(o)(U.label)),11,BW)),64))]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value,onClick:M},q(w(o)("Apply")),9,VW)])])):s.value==="rotate"?(C(),R("div",HW,[_("div",qW,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an(T.value),alt:n.filename},null,12,WW)]),_("div",YW,[_("div",KW,[_("button",{type:"button",class:"vuefinder__image-editor__icon-btn",title:w(o)("Rotate left 90°"),onClick:X},[...de[8]||(de[8]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("polyline",{points:"1 4 1 10 7 10"}),_("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})],-1)])],8,GW),_("button",{type:"button",class:"vuefinder__image-editor__icon-btn",title:w(o)("Rotate right 90°"),onClick:K},[...de[9]||(de[9]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("polyline",{points:"23 4 23 10 17 10"}),_("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})],-1)])],8,QW),_("button",{type:"button",class:Be(["vuefinder__image-editor__icon-btn",{"vuefinder__image-editor__icon-btn--active":v.value}]),title:w(o)("Flip horizontal"),onClick:L},[...de[10]||(de[10]=[Fu('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 3 4 7 8 11"></polyline><polyline points="16 3 20 7 16 11"></polyline><line x1="4" y1="7" x2="20" y2="7"></line><line x1="12" y1="13" x2="12" y2="21"></line></svg>',1)])],10,XW),_("button",{type:"button",class:Be(["vuefinder__image-editor__icon-btn",{"vuefinder__image-editor__icon-btn--active":y.value}]),title:w(o)("Flip vertical"),onClick:D},[...de[11]||(de[11]=[Fu('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 8 7 4 11 8"></polyline><polyline points="3 16 7 20 11 16"></polyline><line x1="7" y1="4" x2="7" y2="20"></line><line x1="13" y1="12" x2="21" y2="12"></line></svg>',1)])],10,JW)]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!le.value,onClick:z},q(w(o)("Apply")),9,ZW)])])):s.value==="grayscale"?(C(),R("div",eY,[_("div",tY,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an(g.value?{filter:"grayscale(1)"}:{}),alt:n.filename},null,12,nY)]),_("div",rY,[_("label",iY,[Ct(_("input",{"onUpdate:modelValue":de[0]||(de[0]=U=>g.value=U),type:"checkbox"},null,512),[[Zs,g.value]]),_("span",null,q(w(o)("Grayscale")),1)]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!J.value,onClick:Y},q(w(o)("Apply")),9,oY)])])):(C(),R("div",sY,[_("div",aY,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an({filter:S.value}),alt:n.filename},null,12,lY)]),_("div",uY,[_("div",cY,[_("label",null,[Et(q(w(o)("Brightness")),1),_("span",null,q(m.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[1]||(de[1]=U=>m.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,m.value,void 0,{number:!0}]])]),_("div",dY,[_("label",null,[Et(q(w(o)("Contrast")),1),_("span",null,q(b.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[2]||(de[2]=U=>b.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,b.value,void 0,{number:!0}]])]),_("div",fY,[_("label",null,[Et(q(w(o)("Saturation")),1),_("span",null,q(x.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[3]||(de[3]=U=>x.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,x.value,void 0,{number:!0}]])]),_("div",pY,[_("button",{type:"button",class:"vuefinder__image-editor__reset",onClick:W},q(w(o)("Reset")),1),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!je.value,onClick:ve},q(w(o)("Apply")),9,hY)])])]))]))}}),vY={class:"vuefinder__image-preview"},gY=["src"],_Y=["aria-label","title"],yY=["aria-label","title"],bY=["aria-label","title"],wY=.5,EY=3,H0=.25,SY=ze({name:"ImagePreview",__name:"Image",emits:["success"],setup(e,{emit:t}){const n=t,r=rt(),i=cr(r),{enabled:o}=fr(),{t:s}=r.i18n,l=re(!1),u=re(r.modal.data.item.previewUrl??r.adapter.getPreviewUrl({path:r.modal.data.item.path})),d=re(u.value),f=re(!1),p=re(1),v=re(null),y=re(0),g=re(0),m=re(1),b=re(!1),x=re(0),S=re(0);let O=null,T=0,A=0,M=0,z=0;const{addExternalFiles:Y,upload:ve,queue:W}=VC(r.customUploader),X=r.fs,K=Qe(X.path),L=se(()=>y.value*m.value),D=se(()=>g.value*m.value),ne=(N,ie)=>{const ge=v.value?.clientWidth??0,fe=v.value?.clientHeight??0,pe=Math.max(0,(L.value*p.value-ge)/2),Ce=Math.max(0,(D.value*p.value-fe)/2);return{x:Math.min(pe,Math.max(-pe,N)),y:Math.min(Ce,Math.max(-Ce,ie))}},le=se(()=>{if(!y.value||!g.value)return{};const{x:N,y:ie}=ne(x.value,S.value);return{width:`${L.value}px`,height:`${D.value}px`,transform:`translate(${N}px, ${ie}px) scale(${p.value})`,transformOrigin:"center center"}}),je=()=>{if(!v.value||!y.value||!g.value)return;const N=v.value.getBoundingClientRect();!N.width||!N.height||(m.value=Math.min(N.width/y.value,N.height/g.value))},J=N=>{const ie=N.target;ie instanceof HTMLImageElement&&(y.value=ie.naturalWidth||ie.clientWidth,g.value=ie.naturalHeight||ie.clientHeight,je())},j=N=>Math.min(EY,Math.max(wY,N)),de=()=>{p.value=j(Number((p.value+H0).toFixed(2)));const N=ne(x.value,S.value);x.value=N.x,S.value=N.y},U=()=>{p.value=j(Number((p.value-H0).toFixed(2)));const N=ne(x.value,S.value);x.value=N.x,S.value=N.y},ee=()=>{p.value=1,x.value=0,S.value=0},Q=N=>{l.value||(N.deltaY>0?U():N.deltaY<0&&de())},B=N=>{if(l.value)return;const ie=N.target;if(ie instanceof HTMLInputElement||ie instanceof HTMLTextAreaElement||ie?.isContentEditable)return;const ge=N.key==="="||N.key==="+",fe=N.key==="-"||N.key==="_",pe=N.key==="0";if(!(!ge&&!fe&&!pe)){if(N.preventDefault(),ge){de();return}if(fe){U();return}ee()}},oe=()=>{b.value=!1},V=N=>{l.value||p.value<=1||!v.value||(b.value=!0,T=N.clientX,A=N.clientY,M=x.value,z=S.value,N.currentTarget?.setPointerCapture?.(N.pointerId))},P=N=>{if(!b.value)return;const ie=N.clientX-T,ge=N.clientY-A,fe=ne(M+ie,z+ge);x.value=fe.x,S.value=fe.y};Hm({isEditable:se(()=>o("edit")&&!r.fs.isReadOnly(r.modal.data.item)),isEditing:se(()=>l.value),isDirty:se(()=>l.value&&f.value),primaryActionLabel:se(()=>s("Save")),enterEdit:()=>{d.value=u.value,f.value=!1,l.value=!0,r.modal.setEditMode(!0)},commitEdit:()=>G(),cancelEdit:()=>{l.value=!1,d.value=u.value,f.value=!1,r.modal.setEditMode(!1)},extraInfo:se(()=>!y.value||!g.value?[]:[{label:s("Dimensions"),value:`${y.value} × ${g.value}`}])});const F=N=>{d.value=N,f.value=!0},G=async()=>{if(!f.value)return;const N=r.modal.data.item.basename,ie=N.split(".").pop()?.toLowerCase()||"jpg",ge=ie==="png"?"image/png":ie==="gif"?"image/gif":"image/jpeg";try{const fe=await $W(d.value),pe=new File([fe],N,{type:ge}),Ce=r.modal.data.item.path.split("/");Ce.pop();const $e={path:Ce.join("/")||(K.value?.path??"")};Y([pe]),await new Promise(Ge=>setTimeout(Ge,100));const Ke=W.value.find(Ge=>Ge.name===pe.name);if(!Ke)throw new Error("File was not added to upload queue");ve($e);let Ne=0;for(;Ne<150;){await new Promise(Ze=>setTimeout(Ze,200));const Ge=W.value.find(Ze=>Ze.id===Ke.id);if(Ge?.status===un.DONE)break;if(Ge?.status===un.ERROR)throw new Error(Ge.statusName||"Upload failed");Ne++}i.success(s("Updated.")),await fetch(u.value,{cache:"reload",mode:"no-cors"});const tt=r.root?.querySelector?.('[data-src="'+u.value+'"]');tt&&tt instanceof HTMLElement&&Ho.resetStatus(tt),r.emitter.emit("vf-refresh-thumbnails"),l.value=!1,f.value=!1,d.value=u.value,r.modal.setEditMode(!1),n("success")}catch(fe){i.error(yn(fe,s("Failed to save image")))}};return xt(()=>{O=new ResizeObserver(()=>{je()}),v.value&&O.observe(v.value),window.addEventListener("keydown",B),n("success")}),ts(()=>{window.removeEventListener("keydown",B),O?.disconnect()}),(N,ie)=>(C(),R("div",vY,[_("div",{ref_key:"imageContainer",ref:v,class:"vuefinder__image-preview__image-container"},[l.value?(C(),Ee(mY,{key:1,src:d.value,filename:w(r).modal.data.item.basename,"onUpdate:src":F},null,8,["src","filename"])):(C(),R("div",{key:0,class:"vuefinder__image-preview__stage",onWheel:ht(Q,["prevent"])},[_("img",{style:an(le.value),src:w(r).modal.data.item.previewUrl??w(r).adapter.getPreviewUrl({path:w(r).modal.data.item.path}),class:Be(["vuefinder__image-preview__image",{"vuefinder__image-preview__image--zoomed":p.value>1,"vuefinder__image-preview__image--panning":b.value}]),draggable:!1,onLoad:J,onPointerdown:V,onPointermove:P,onPointerup:oe,onPointercancel:oe,onLostpointercapture:oe},null,46,gY),_("div",{class:"vuefinder__image-preview__zoom-controls",onPointerdown:ie[0]||(ie[0]=ht(()=>{},["stop"])),onWheel:ie[1]||(ie[1]=ht(()=>{},["stop"]))},[_("button",{type:"button",class:"vuefinder__image-preview__zoom-button","aria-label":w(s)("Zoom out"),title:w(s)("Zoom out"),onClick:U},[...ie[2]||(ie[2]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("circle",{cx:"11",cy:"11",r:"7"}),_("line",{x1:"8",y1:"11",x2:"14",y2:"11"}),_("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21"})],-1)])],8,_Y),_("button",{type:"button",class:"vuefinder__image-preview__zoom-reset","aria-label":w(s)("Reset zoom"),title:w(s)("Reset zoom"),onClick:ee},q(Math.round(p.value*100))+"% ",9,yY),_("button",{type:"button",class:"vuefinder__image-preview__zoom-button","aria-label":w(s)("Zoom in"),title:w(s)("Zoom in"),onClick:de},[...ie[3]||(ie[3]=[Fu('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"></circle><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line><line x1="16.5" y1="16.5" x2="21" y2="21"></line></svg>',1)])],8,bY)],32)],32))],512)]))}}),CY={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function xY(e,t){return C(),R("svg",CY,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const Ga={render:xY},TY={class:"vuefinder__default-preview"},kY={class:"vuefinder__default-preview__content"},OY={class:"vuefinder__default-preview__icon-container"},$Y=["title"],AY=ze({__name:"Default",emits:["success"],setup(e,{emit:t}){const n=rt(),r=t;return xt(()=>{r("success")}),(i,o)=>(C(),R("div",TY,[_("div",kY,[_("div",OY,[Z(w(Ga),{class:"vuefinder__default-preview__file-icon"}),_("div",{class:"vuefinder__default-preview__file-name",title:w(n).modal.data.item.path},q(w(n).modal.data.item.basename),9,$Y)])])]))}}),RY={class:"vuefinder__video-preview"},PY={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},IY=["src"],MY=ze({__name:"Video",emits:["success"],setup(e,{emit:t}){const n=rt(),r=t,i=()=>n.adapter.getPreviewUrl({path:n.modal.data.item.path});return xt(()=>{r("success")}),(o,s)=>(C(),R("div",RY,[_("div",null,[_("video",PY,[_("source",{src:i(),type:"video/mp4"},null,8,IY),s[0]||(s[0]=Et(" Your browser does not support the video tag. ",-1))])])]))}}),DY={class:"vuefinder__audio-preview"},FY={class:"vuefinder__audio-preview__audio",controls:""},LY=["src"],jY=ze({__name:"Audio",emits:["success"],setup(e,{emit:t}){const n=t;rt();const r=()=>{const i=rt();return i.adapter.getPreviewUrl({path:i.modal.data.item.path})};return xt(()=>{n("success")}),(i,o)=>(C(),R("div",DY,[_("div",null,[_("audio",FY,[_("source",{src:r(),type:"audio/mpeg"},null,8,LY),o[0]||(o[0]=Et(" Your browser does not support the audio element. ",-1))])])]))}}),UY={class:"vuefinder__pdf-preview"},NY=["data"],zY=["src"],BY=ze({__name:"Pdf",emits:["success"],setup(e,{emit:t}){rt();const n=t,r=()=>{const i=rt();return i.adapter.getPreviewUrl({path:i.modal.data.item.path})};return xt(()=>{n("success")}),(i,o)=>(C(),R("div",UY,[_("div",null,[_("object",{class:"vuefinder__pdf-preview__object",data:r(),type:"application/pdf",width:"100%",height:"100%"},[_("iframe",{class:"vuefinder__pdf-preview__iframe",src:r(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,zY)],8,NY)])]))}}),VY=["data-theme"],HY=["disabled","title"],qY=["disabled","title"],WY={class:"vuefinder__preview-modal__content"},YY={key:0},KY={key:1,class:"vuefinder__preview-modal__status-strip"},GY=["aria-label"],QY={class:"vuefinder__preview-modal__loading"},XY={key:0,class:"vuefinder__preview-modal__loading-indicator"},JY={class:"vuefinder__preview-modal__edit-actions"},ZY=["disabled"],q0=8,eK=1.4,tK=.22,Ta=220,nK=".vuefinder__preview-chrome__title, .vuefinder__preview-modal__status-strip",qi=ze({__name:"ModalPreview",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,i=re(!1),o=Q=>{const B=(Q||"").split("/").pop()||"",oe=B.lastIndexOf(".");return oe>=0?B.slice(oe+1).toLowerCase():""},s=(Q,B)=>B?Q==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(B):Q==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(B):Q==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(B):Q==="csv"?B==="csv"||B==="tsv":Q==="text"?new Set(["txt","md","markdown","json","jsonc","js","mjs","cjs","ts","tsx","jsx","vue","svelte","css","scss","sass","less","html","htm","xml","svg","csv","tsv","log","yml","yaml","toml","ini","conf","env","sh","bash","zsh","fish","py","rb","php","go","rs","java","kt","swift","c","h","cpp","hpp","cs","sql","graphql","gql","dockerfile","gitignore","gitattributes","editorconfig","prettierrc","eslintrc","lock"]).has(B):Q==="application/pdf"?B==="pdf":!1:!1,l=Q=>{const B=t.modal.data.forceType;if(B)return B===Q;const oe=t.modal.data.item.mime_type;if(oe&&typeof oe=="string"&&oe.startsWith(Q))return!0;const V=o(t.modal.data.item.path);return s(Q,V)},u=n("preview");u||(i.value=!0);const d=se(()=>t.modal.data.item),f=Qe(t.fs.sortedFiles),p=se(()=>f.value.filter(Q=>Q.type==="file")),v=se(()=>p.value.findIndex(Q=>Q.path===d.value.path)),y=se(()=>!!w(t.modal.controls?.isEditable)),g=se(()=>!!w(t.modal.controls?.isEditing)),m=se(()=>!!w(t.modal.controls?.isDirty)),b=se(()=>w(t.modal.controls?.primaryActionLabel)??r("Save")),x=async()=>{await t.modal.controls?.enterEdit?.()},S=async()=>{await t.modal.controls?.commitEdit?.()},O=async()=>{m.value&&!window.confirm(r("Discard unsaved changes?"))||await t.modal.controls?.cancelEdit?.()},T=se(()=>!g.value&&v.value>0),A=se(()=>!g.value&&v.value<p.value.length-1),M=()=>{if(!T.value)return;const Q=p.value[v.value-1];Q&&(t.fs.clearSelection(),t.fs.select(Q.path),t.modal.data.item=Q,i.value=!1)},z=()=>{if(!A.value)return;const Q=p.value[v.value+1];Q&&(t.fs.clearSelection(),t.fs.select(Q.path),t.modal.data.item=Q,i.value=!1)},Y=()=>{g.value&&m.value&&!window.confirm(r("Discard unsaved changes?"))||t.modal.close()},ve=re(0),W=re(!1);let X=0,K=0,L=!1,D=!1;const ne=se(()=>({transform:`translate3d(${ve.value}px, 0, 0)`,transition:W.value?`transform ${Ta}ms ease-out`:"none"})),le=(Q,B)=>{setTimeout(B,Q)},je=Q=>{if(g.value||Q.touches.length!==1||!Q.target?.closest?.(nK))return;const B=Q.touches[0];B&&(L=!0,D=!1,X=B.clientX,K=B.clientY,W.value=!1)},J=Q=>{if(!L)return;const B=Q.touches[0];if(!B)return;const oe=B.clientX-X,V=B.clientY-K;if(!D){if(Math.abs(oe)<q0&&Math.abs(V)<q0)return;if(Math.abs(oe)<Math.abs(V)*eK){L=!1;return}D=!0}let P=oe;oe>0&&!T.value&&(P=oe*.3),oe<0&&!A.value&&(P=oe*.3),ve.value=P,Q.cancelable&&Q.preventDefault()},j=Q=>{const B=window.innerWidth||1,oe=Q==="prev"?B:-B,V=Q==="prev"?-B:B,P=Q==="prev"?M:z;W.value=!0,ve.value=oe,le(Ta,()=>{P(),W.value=!1,ve.value=V,requestAnimationFrame(()=>{requestAnimationFrame(()=>{W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})})})})},de=()=>{if(!L||(L=!1,!D))return;const Q=window.innerWidth||1,B=ve.value,oe=Math.abs(B)>=Q*tK;if(oe&&B>0&&T.value){j("prev");return}if(oe&&B<0&&A.value){j("next");return}W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})},U=()=>{L&&(L=!1,D&&(W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})))},ee=Q=>{if(Q.key==="Escape"){Q.preventDefault(),Q.stopPropagation(),Y();return}if((Q.metaKey||Q.ctrlKey)&&Q.key.toLowerCase()==="s"){const B=t.modal.controls;if(B&&w(B.isEditing)){Q.preventDefault(),B.commitEdit();return}}g.value||(Q.key==="ArrowLeft"||Q.key==="ArrowRight")&&(Q.preventDefault(),Q.stopPropagation(),Q.key==="ArrowLeft"?M():z())};return xt(()=>{const Q=document.querySelector(".vuefinder__preview-modal");Q&&Q.focus()}),(Q,B)=>(C(),Ee(dr,{"on-request-close":Y,"body-style":ne.value,"body-class":"vuefinder__modal-layout__body--swipeable "+(g.value?"vuefinder__modal-layout__body--editing":""),"on-body-touchstart":je,"on-body-touchmove":J,"on-body-touchend":de,"on-body-touchcancel":U},Tw({default:Le(()=>[_("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:ee},[Z(aW,{onCloseRequest:Y}),(C(),Ee(el,{to:"body"},[g.value?Se("",!0):(C(),R("div",{key:0,class:"vuefinder__themer vuefinder__preview-modal__nav-overlay","data-theme":w(t).theme.current},[_("button",{disabled:!T.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:w(r)("Previous file"),onClick:M},[...B[7]||(B[7]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,HY),_("button",{disabled:!A.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:w(r)("Next file"),onClick:z},[...B[8]||(B[8]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,qY)],8,VY))])),_("div",WY,[w(u)?(C(),R("div",YY,[l("csv")?(C(),Ee(CW,{key:`csv-${d.value.path}`,onSuccess:B[0]||(B[0]=oe=>i.value=!0)})):l("text")?(C(),Ee(dW,{key:`text-${d.value.path}`,onSuccess:B[1]||(B[1]=oe=>i.value=!0)})):l("image")?(C(),Ee(SY,{key:`image-${d.value.path}`,onSuccess:B[2]||(B[2]=oe=>i.value=!0)})):l("video")?(C(),Ee(MY,{key:`video-${d.value.path}`,onSuccess:B[3]||(B[3]=oe=>i.value=!0)})):l("audio")?(C(),Ee(jY,{key:`audio-${d.value.path}`,onSuccess:B[4]||(B[4]=oe=>i.value=!0)})):l("application/pdf")?(C(),Ee(BY,{key:`pdf-${d.value.path}`,onSuccess:B[5]||(B[5]=oe=>i.value=!0)})):(C(),Ee(AY,{key:`default-${d.value.path}`,onSuccess:B[6]||(B[6]=oe=>i.value=!0)}))])):Se("",!0),g.value||p.value.length>1?(C(),R("div",KY,[g.value?(C(),R("span",{key:0,class:Be(["vuefinder__preview-modal__edit-chip",{"vuefinder__preview-modal__edit-chip--dirty":m.value}])},q(m.value?w(r)("Unsaved"):w(r)("Editing")),3)):(C(),R("span",{key:1,class:"vuefinder__preview-modal__pagination-text","aria-label":w(r)("File %s of %s",String(v.value+1),String(p.value.length))},q(v.value+1)+" / "+q(p.value.length),9,GY))])):Se("",!0),_("div",QY,[i.value===!1?(C(),R("div",XY,[B[9]||(B[9]=_("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[_("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),_("path",{class:"vuefinder__preview-modal__spinner-path",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),_("span",null,q(w(r)("Loading")),1)])):Se("",!0)])])],32)]),_:2},[y.value?{name:"buttons",fn:Le(()=>[_("div",JY,[g.value?(C(),R(We,{key:1},[_("button",{type:"button",class:"vf-btn vf-btn-primary vuefinder__preview-modal__edit-btn",disabled:!m.value,onClick:S},q(b.value),9,ZY),_("button",{type:"button",class:"vf-btn vf-btn-secondary vuefinder__preview-modal__edit-btn",onClick:O},q(w(r)("Cancel")),1)],64)):(C(),R("button",{key:0,type:"button",class:"vf-btn vf-btn-primary vuefinder__preview-modal__edit-btn",onClick:x},q(w(r)("Edit")),1))])]),key:"0"}:void 0]),1032,["body-style","body-class"]))}}),rK={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"};function iK(e,t){return C(),R("svg",rK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M13 19H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v4M16 22l5-5M21 21.5V17h-4.5"},null,-1)])])}const oK={render:iK},sK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function aK(e,t){return C(),R("svg",sK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 16H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2m-6 12h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2"},null,-1)])])}const Ym={render:aK},lK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function uK(e,t){return C(),R("svg",lK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1)])])}const ar={render:uK},cK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function dK(e,t){return C(),R("svg",cK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const Zc={render:dK},fK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function pK(e,t){return C(),R("svg",fK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M5 12h14"},null,-1)])])}const ed={render:pK},hK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"};function mK(e,t){return C(),R("svg",hK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1)])])}const Qa={render:mK},vK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function gK(e,t){return C(),R("svg",vK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1)])])}const Km={render:gK},_K={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function yK(e,t){return C(),R("svg",_K,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1)])])}const td={render:yK},bK={class:"vuefinder__modal-tree__folder-item"},wK={class:"vuefinder__modal-tree__folder-content"},EK={key:1,class:"vuefinder__modal-tree__folder-spacer"},SK={class:"vuefinder__modal-tree__folder-text"},CK={key:0,class:"vuefinder__modal-tree__subfolders"},xK={key:0,class:"vuefinder__modal-tree__more-note"},TK=300,kK=ze({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(e,{emit:t}){const n=rt(),{t:r}=n.i18n,i=n.fs,o=re({}),s=e,l=t;Qe(i.path);const u=se(()=>{const z=`${s.storage}:${s.folder.path}`;return s.expandedFolders[z]||!1}),d=se(()=>s.modelValue?.path===s.folder.path),f=se(()=>s.currentPath?.path===s.folder.path),p=se(()=>s.modalTreeData[s.folder.path]||[]),v=se(()=>{const z=p.value,Y=o.value[s.folder.path]||50;return z.length>Y?z.slice(0,Y):z}),y=se(()=>p.value.length),g=se(()=>o.value[s.folder.path]||50),m=se(()=>y.value>g.value),b=()=>{o.value[s.folder.path]=(g.value||50)+50},x=se(()=>p.value.length>0||s.folder.type==="dir"),S=()=>{l("toggleFolder",s.storage,s.folder.path)},O=()=>{l("update:modelValue",s.folder)},T=()=>{l("update:modelValue",s.folder),l("selectAndClose",s.folder)};let A=0;const M=()=>{const z=Date.now();z-A<TK?T():O(),A=z};return(z,Y)=>{const ve=ft("ModalTreeFolderItem",!0);return C(),R("div",bK,[_("div",wK,[x.value?(C(),R("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:S},[u.value?(C(),Ee(w(ed),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(C(),Ee(w(Zc),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(C(),R("div",EK)),_("div",{class:Be(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":d.value,"vuefinder__modal-tree__folder-link--current":f.value}]),onClick:O,onDblclick:T,onTouchend:M},[u.value?(C(),Ee(w(td),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(C(),Ee(w(ar),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),_("span",SK,q(e.folder.basename),1)],34)]),u.value&&x.value?(C(),R("div",CK,[(C(!0),R(We,null,ct(v.value,W=>(C(),Ee(ve,{key:W.path,folder:W,storage:e.storage,"model-value":e.modelValue,"expanded-folders":e.expandedFolders,"modal-tree-data":e.modalTreeData,"current-path":e.currentPath,"onUpdate:modelValue":Y[0]||(Y[0]=X=>z.$emit("update:modelValue",X)),onSelectAndClose:Y[1]||(Y[1]=X=>z.$emit("selectAndClose",X)),onToggleFolder:Y[2]||(Y[2]=(X,K)=>z.$emit("toggleFolder",X,K))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),m.value?(C(),R("div",xK,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:b},q(w(r)("load more")),1)])):Se("",!0)])):Se("",!0)])}}}),OK={class:"vuefinder__modal-tree"},$K={class:"vuefinder__modal-tree__header"},AK={class:"vuefinder__modal-tree__title"},RK={key:0,class:"vuefinder__modal-tree__section"},PK={class:"vuefinder__modal-tree__section-title"},IK={class:"vuefinder__modal-tree__list"},MK=["onClick","onDblclick","onTouchend"],DK={class:"vuefinder__modal-tree__text"},FK={class:"vuefinder__modal-tree__text-storage"},LK={class:"vuefinder__modal-tree__section-title"},jK={class:"vuefinder__modal-tree__list"},UK={class:"vuefinder__modal-tree__storage-item"},NK={class:"vuefinder__modal-tree__storage-content"},zK=["onClick"],BK=["onClick","onDblclick","onTouchend"],VK={class:"vuefinder__modal-tree__storage-text"},HK={key:0,class:"vuefinder__modal-tree__subfolders"},qK={key:0,class:"vuefinder__modal-tree__more-note"},WK=["onClick"],W0=300,pl=ze({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(e,{emit:t}){const n=rt(),{t:r}=n.i18n,i=n.fs,o=n.config,s=t,l=Qe(i.sortedFiles),u=Qe(i.storages),d=se(()=>u.value||[]),f=Qe(i.path),p=re(null),v=re({}),y=re({}),g=re({});He(l,L=>{const D=L.filter(le=>le.type==="dir"),ne=f.value?.path||"";ne&&(y.value[ne]=D.map(le=>({...le,type:"dir"})))});const m=(L,D)=>{const ne=`${L}:${D}`;v.value={...v.value,[ne]:!v.value[ne]},v.value[ne]&&!y.value[D]&&n.adapter.list(D).then(le=>{const je=(le.files||[]).filter(J=>J.type==="dir");y.value[D]=je.map(J=>({...J,type:"dir"}))})},b=L=>y.value[L]||[],x=L=>g.value[L]||50,S=L=>{const D=b(L),ne=x(L);return D.length>ne?D.slice(0,ne):D},O=L=>b(L).length,T=L=>O(L)>x(L),A=L=>{g.value[L]=x(L)+50},M=L=>{L&&s("update:modelValue",L)},z=L=>{L&&(s("update:modelValue",L),s("selectAndClose",L))},Y=L=>{const D={storage:L,path:L+"://",basename:L,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:L+"://"};s("update:modelValue",D)},ve=L=>{const D={storage:L,path:L+"://",basename:L,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:L+"://"};s("update:modelValue",D),s("selectAndClose",D)};let W=0;const X=L=>{if(!L)return;const D=Date.now();D-W<W0?z(L):M(L),W=D},K=L=>{const D=Date.now();D-W<W0?ve(L):Y(L),W=D};return xt(()=>{p.value&&Hr(p.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(L,D)=>(C(),R("div",OK,[_("div",$K,[_("div",AK,q(w(r)("Select Target Folder")),1)]),_("div",{ref_key:"modalContentElement",ref:p,class:"vuefinder__modal-tree__content"},[e.showPinnedFolders&&w(n).features.pinned&&w(o).get("pinnedFolders").length?(C(),R("div",RK,[_("div",PK,q(w(r)("Pinned Folders")),1),_("div",IK,[(C(!0),R(We,null,ct(w(o).get("pinnedFolders"),ne=>(C(),R("div",{key:ne.path,class:Be(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":e.modelValue?.path===ne.path}]),onClick:le=>M(ne),onDblclick:le=>z(ne),onTouchend:le=>X(ne)},[Z(w(ar),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),_("div",DK,q(ne.basename),1),_("div",FK,q(ne.storage),1),Z(w(Qa),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,MK))),128))])])):Se("",!0),_("div",LK,q(w(r)("Storages")),1),(C(!0),R(We,null,ct(d.value,ne=>(C(),R("div",{key:ne,class:"vuefinder__modal-tree__section"},[_("div",jK,[_("div",UK,[_("div",NK,[_("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:ht(le=>m(ne,ne+"://"),["stop"])},[v.value[`${ne}:${ne}://`]?(C(),Ee(w(ed),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(C(),Ee(w(Zc),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,zK),_("div",{class:Be(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":e.modelValue?.path===ne+"://"}]),onClick:le=>Y(ne),onDblclick:le=>ve(ne),onTouchend:le=>K(ne)},[Z(w(Km),{class:"vuefinder__modal-tree__storage-icon"}),_("span",VK,q(ne),1)],42,BK)]),v.value[`${ne}:${ne}://`]?(C(),R("div",HK,[(C(!0),R(We,null,ct(S(ne+"://"),le=>(C(),Ee(kK,{key:le.path,folder:le,storage:ne,"model-value":e.modelValue,"expanded-folders":v.value,"modal-tree-data":y.value,"current-path":e.currentPath,"onUpdate:modelValue":M,onSelectAndClose:z,onToggleFolder:m},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),T(ne+"://")?(C(),R("div",qK,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:le=>A(ne+"://")},q(w(r)("load more")),9,WK)])):Se("",!0)])):Se("",!0)])])]))),128))],512)]))}}),YK=["title"],Sh=ze({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(e,{emit:t}){const n=t,r=rt(),{t:i}=r.i18n,o=re(!1),s=re(null),l=re(s.value?.innerHTML);He(l,()=>o.value=!1);const u=()=>{n("hidden"),o.value=!0};return(d,f)=>(C(),R("div",null,[o.value?Se("",!0):(C(),R("div",{key:0,ref_key:"strMessage",ref:s,class:Be(["vuefinder__message",e.error?"vuefinder__message--error":"vuefinder__message--success"])},[mt(d.$slots,"default"),_("div",{class:"vuefinder__message__close",title:w(i)("Close"),onClick:u},[...f[0]||(f[0]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,YK)],2))]))}}),KK={class:"vuefinder__move-modal__content"},GK={class:"vuefinder__move-modal__description"},QK={class:"vuefinder__move-modal__files vf-scrollbar"},XK={class:"vuefinder__move-modal__file-name"},JK={class:"vuefinder__move-modal__target-title"},ZK={class:"vuefinder__move-modal__target-container"},eG={class:"vuefinder__move-modal__target-path"},tG={class:"vuefinder__move-modal__target-storage"},nG={key:0,class:"vuefinder__move-modal__destination-folder"},rG={class:"vuefinder__move-modal__target-badge"},iG={key:0,class:"vuefinder__move-modal__options"},oG={class:"vuefinder__move-modal__checkbox-label"},sG={class:"vuefinder__move-modal__checkbox-text"},aG=["disabled"],lG={class:"vuefinder__move-modal__selected-items"},WC=ze({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(e){const t=rt(),n=cr(t),{enabled:r}=fr(),{t:i}=t.i18n,o=e,s=re(t.modal.data.items.from),l=re(t.modal.data.items.to),u=re(""),d=re(o.copy||!r("move")),f=se(()=>d.value?"copy":"move"),p=re(!1),v=Qe(t.fs.path),y=se(()=>d.value?i("Copy files"):i("Move files")),g=se(()=>d.value?i("Are you sure you want to copy these files?"):i("Are you sure you want to move these files?")),m=se(()=>d.value?i("Yes, Copy!"):i("Yes, Move!")),b=M=>{M&&(l.value=M)},x=M=>{M&&(l.value=M,p.value=!1)},S=se(()=>{const M=l.value;return M?s.value.some(z=>!!(M.path===z.path||z.type==="dir"&&M.path.startsWith(z.path+"/"))):!0}),O=se(()=>{if(!S.value)return"";const M=l.value;return M?s.value.find(z=>M.path===z.path||z.type==="dir"&&M.path.startsWith(z.path+"/"))?i("Cannot move/copy item to itself or its own subfolder"):i("Invalid destination directory"):i("Please select a destination directory")}),T=()=>{const M=l.value.path;if(!M)return{storage:"local",path:""};if(M.endsWith("://"))return{storage:M.replace("://",""),path:""};const z=M.split("://");return{storage:z[0]||"local",path:z[1]||""}},A=async()=>{if(s.value.length)try{const{files:M}=await t.adapter[f.value]({path:v.value.path,sources:s.value.map(({path:z})=>z),destination:l.value.path});t.fs.setFiles(M),t.modal.close()}catch(M){n.error(yn(M,i("Failed to transfer files")))}};return(M,z)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:S.value,onClick:A},q(m.value),9,aG),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:z[4]||(z[4]=Y=>w(t).modal.close())},q(w(i)("Cancel")),1),_("div",lG,q(w(i)("%s item(s) selected.",s.value.length)),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:d.value?w(Ym):w(oK),title:y.value},null,8,["icon","title"]),_("div",KK,[_("p",GK,q(g.value),1),_("div",QK,[(C(!0),R(We,null,ct(s.value,Y=>(C(),R("div",{key:Y.path,class:"vuefinder__move-modal__file"},[_("div",null,[Y.type==="dir"?(C(),Ee(w(ar),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(C(),Ee(w(Ga),{key:1,class:"vuefinder__move-modal__icon"}))]),_("div",XK,q(Y.path),1)]))),128))]),_("h4",JK,q(w(i)("Target Directory")),1),_("div",ZK,[_("div",{class:"vuefinder__move-modal__target-display",onClick:z[0]||(z[0]=Y=>p.value=!p.value)},[_("div",eG,[_("span",tG,q(T().storage)+"://",1),T().path?(C(),R("span",nG,q(T().path),1)):Se("",!0)]),_("span",rG,q(w(i)("Browse")),1)])]),_("div",{class:Be(["vuefinder__move-modal__tree-selector",p.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[Z(pl,{modelValue:l.value,"onUpdate:modelValue":[z[1]||(z[1]=Y=>l.value=Y),b],"show-pinned-folders":!0,onSelectAndClose:x},null,8,["modelValue"])],2),w(r)("copy")&&w(r)("move")?(C(),R("div",iG,[_("label",oG,[Ct(_("input",{"onUpdate:modelValue":z[2]||(z[2]=Y=>d.value=Y),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[Zs,d.value]]),_("span",sG,q(w(i)("Create a copy instead of moving")),1)])])):Se("",!0),O.value?(C(),Ee(Sh,{key:1,error:""},{default:Le(()=>[Et(q(O.value),1)]),_:1})):Se("",!0),u.value.length&&!O.value?(C(),Ee(Sh,{key:2,error:"",onHidden:z[3]||(z[3]=Y=>u.value="")},{default:Le(()=>[Et(q(u.value),1)]),_:1})):Se("",!0)])])]),_:1}))}}),Xs=ze({__name:"ModalMove",setup(e){return(t,n)=>(C(),Ee(WC,{copy:!1}))}}),Gm=ze({__name:"ModalCopy",setup(e){return(t,n)=>(C(),Ee(WC,{copy:!0}))}}),uG=(e,t=0,n=!1)=>{let r;return(...i)=>{n&&!r&&e(...i),clearTimeout(r),r=setTimeout(()=>{e(...i)},t)}},YC=(e,t,n)=>{const r=re(e);return Ew((i,o)=>({get(){return i(),r.value},set:uG(s=>{r.value=s,o()},t,!1)}))},cG={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function dG(e,t){return C(),R("svg",cG,[...t[0]||(t[0]=[_("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1)])])}const Qm={render:dG},fG={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"};function pG(e,t){return C(),R("svg",fG,[...t[0]||(t[0]=[_("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),_("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1)])])}const nd={render:pG},hG={class:"vuefinder__search-modal__search-input"},mG=["value","placeholder","disabled"],vG={key:0,class:"vuefinder__search-modal__loading"},gG=ze({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(e,{expose:t,emit:n}){const r=n,i=rt(),{t:o}=i.i18n,s=re(null),l=d=>{const f=d.target;r("update:modelValue",f.value)},u=d=>{r("keydown",d)};return t({focus:()=>{s.value&&s.value.focus()}}),(d,f)=>(C(),R("div",hG,[Z(w(Qm),{class:"vuefinder__search-modal__search-icon"}),_("input",{ref_key:"searchInput",ref:s,value:e.modelValue,type:"text",placeholder:w(o)("Search files"),disabled:e.disabled,class:"vuefinder__search-modal__input",onKeydown:u,onKeyup:f[0]||(f[0]=ht(()=>{},["stop"])),onInput:l},null,40,mG),e.isSearching?(C(),R("div",vG,[Z(w(nd),{class:"vuefinder__search-modal__loading-icon"})])):Se("",!0)]))}}),_G={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function yG(e,t){return C(),R("svg",_G,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1)])])}const KC={render:yG},bG=["disabled","title"],wG=["data-theme"],EG={class:"vuefinder__search-modal__dropdown-content"},SG={class:"vuefinder__search-modal__dropdown-section"},CG={class:"vuefinder__search-modal__dropdown-title"},xG={class:"vuefinder__search-modal__dropdown-options"},TG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},kG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},OG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},$G={key:0,class:"vuefinder__search-modal__dropdown-option-check"},AG={class:"vuefinder__search-modal__dropdown-section"},RG={class:"vuefinder__search-modal__dropdown-title"},PG={class:"vuefinder__search-modal__dropdown-options"},IG=["onClick"],MG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},DG=ze({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{},sortBy:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","update:sortBy","keydown"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=rt(),{t:s}=o.i18n,l=re(null),u=re(null);let d=null;const f=[{value:"name-asc",key:"Name (A-Z)"},{value:"name-desc",key:"Name (Z-A)"},{value:"size-asc",key:"Size (smallest)"},{value:"size-desc",key:"Size (largest)"},{value:"date-desc",key:"Date (newest)"},{value:"date-asc",key:"Date (oldest)"}],p=x=>{if(i("update:selectedOption",x),x.startsWith("size-")){const S=x.split("-")[1];i("update:sizeFilter",S)}},v=x=>{i("update:sortBy",x)},y=async()=>{r.disabled||(r.visible?(i("update:visible",!1),d&&(d(),d=null)):(i("update:visible",!0),await gt(),await g()))},g=async()=>{if(!(!l.value||!u.value)&&(await gt(),!(!l.value||!u.value))){Object.assign(u.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x,y:S}=await js(l.value,u.value,{placement:"bottom-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(u.value.style,{left:`${x}px`,top:`${S}px`}),requestAnimationFrame(()=>{u.value&&Object.assign(u.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(x){console.warn("Floating UI initial positioning error:",x);return}try{d=Dh(l.value,u.value,async()=>{if(!(!l.value||!u.value))try{const{x,y:S}=await js(l.value,u.value,{placement:"bottom-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(u.value.style,{left:`${x}px`,top:`${S}px`})}catch(x){console.warn("Floating UI positioning error:",x)}})}catch(x){console.warn("Floating UI autoUpdate setup error:",x),d=null}}},m=x=>{if(!r.visible)return;const S=["size-all","size-small","size-medium","size-large"],O=S.findIndex(T=>T===r.selectedOption);if(x.key==="ArrowDown"){x.preventDefault();const T=(O+1)%S.length;i("update:selectedOption",S[T]||null)}else if(x.key==="ArrowUp"){x.preventDefault();const T=O<=0?S.length-1:O-1;i("update:selectedOption",S[T]||null)}else x.key==="Enter"?(x.preventDefault(),r.selectedOption?.startsWith("size-")&&i("update:sizeFilter",r.selectedOption.split("-")[1])):x.key==="Escape"&&(x.preventDefault(),i("update:visible",!1),d&&(d(),d=null))},b=()=>{d&&(d(),d=null)};return He(()=>r.visible,x=>{!x&&d&&(d(),d=null)}),xn(()=>{b()}),t({cleanup:b}),(x,S)=>(C(),R(We,null,[_("button",{ref_key:"dropdownBtn",ref:l,class:Be(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":e.visible}]),disabled:e.disabled,title:w(s)("Search Options"),onClick:ht(y,["stop"])},[Z(w(KC),{class:"vuefinder__search-modal__dropdown-icon"})],10,bG),(C(),Ee(el,{to:"body"},[e.visible?(C(),R("div",{key:0,ref_key:"dropdownContent",ref:u,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":w(o).theme.current,tabindex:"-1",onClick:S[4]||(S[4]=ht(()=>{},["stop"])),onKeydown:m},[_("div",EG,[_("div",SG,[_("div",CG,q(w(s)("File Size")),1),_("div",xG,[_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="all"}]),onClick:S[0]||(S[0]=ht(O=>p("size-all"),["stop"]))},[_("span",null,q(w(s)("All Files")),1),e.sizeFilter==="all"?(C(),R("div",TG,[...S[5]||(S[5]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="small"}]),onClick:S[1]||(S[1]=ht(O=>p("size-small"),["stop"]))},[_("span",null,q(w(s)("Small (< 1MB)")),1),e.sizeFilter==="small"?(C(),R("div",kG,[...S[6]||(S[6]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="medium"}]),onClick:S[2]||(S[2]=ht(O=>p("size-medium"),["stop"]))},[_("span",null,q(w(s)("Medium (1-10MB)")),1),e.sizeFilter==="medium"?(C(),R("div",OG,[...S[7]||(S[7]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="large"}]),onClick:S[3]||(S[3]=ht(O=>p("size-large"),["stop"]))},[_("span",null,q(w(s)("Large (> 10MB)")),1),e.sizeFilter==="large"?(C(),R("div",$G,[...S[8]||(S[8]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2)])]),_("div",AG,[_("div",RG,q(w(s)("Sort by")),1),_("div",PG,[(C(),R(We,null,ct(f,O=>_("div",{key:O.value,class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sortBy===O.value}]),onClick:ht(T=>v(O.value),["stop"])},[_("span",null,q(w(s)(O.key)),1),e.sortBy===O.value?(C(),R("div",MG,[...S[9]||(S[9]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],10,IG)),64))])])])],40,wG)):Se("",!0)]))],64))}});function rd(e,t=40){const n=e.match(/^([^:]+:\/\/)(.*)$/);if(!n)return e;const r=n[1],i=n[2]??"",o=i.split("/").filter(Boolean),s=o.pop();if(!s)return r+i;let l=`${r}${o.join("/")}${o.length?"/":""}${s}`;if(l.length<=t)return l;const u=s.split(/\.(?=[^\.]+$)/),d=u[0]??"",f=u[1]??"",p=d.length>10?`${d.slice(0,6)}...${d.slice(-5)}`:d,v=f?`${p}.${f}`:p;return l=`${r}${o.join("/")}${o.length?"/":""}${v}`,l.length>t&&(l=`${r}.../${v}`),l}async function GC(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Xa(e){await GC(e)}async function FG(e){await GC(e)}const LG={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function jG(e,t){return C(),R("svg",LG,[...t[0]||(t[0]=[_("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1)])])}const QC={render:jG},UG=["title"],NG={class:"vuefinder__search-modal__result-icon"},zG={class:"vuefinder__search-modal__result-content"},BG={class:"vuefinder__search-modal__result-name"},VG={key:1,class:"vuefinder__search-modal__result-size"},HG=["title"],qG=["title"],WG=["data-item-dropdown","data-theme"],YG={class:"vuefinder__search-modal__item-dropdown-content"},KG=ze({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","open","preview","activate"],setup(e,{emit:t}){const n=e,r=t,i=rt(),{t:o}=i.i18n,{enabled:s}=fr(),l=Qe(i.config.state),u=se(()=>s("pinned")),d=se(()=>l.value.pinnedFolders.some(L=>L.path===n.item.path)),f=L=>{const D=i.config.get("pinnedFolders");D.some(ne=>ne.path===L.path)?i.config.set("pinnedFolders",D.filter(ne=>ne.path!==L.path)):i.config.set("pinnedFolders",[...D,L])},p=re(null);let v=null,y=null,g=[],m=null;He(()=>n.activeDropdown,L=>{v&&(v(),v=null),y&&(g.forEach(D=>{D===window?window.removeEventListener("scroll",y,!0):D.removeEventListener("scroll",y,!0)}),y=null,g=[]),m&&(document.removeEventListener("mousedown",m,!0),document.removeEventListener("touchstart",m,!0),m=null),L===n.item.path&&p.value&&gt(()=>{M(n.item.path,p.value),x(),S()})});const b=L=>{const D=[];let ne=L;for(;ne&&ne!==document.body&&ne!==document.documentElement;){const le=window.getComputedStyle(ne),je=le.overflow+le.overflowX+le.overflowY;(je.includes("scroll")||je.includes("auto"))&&D.push(ne),ne=ne.parentElement}return D},x=()=>{if(n.activeDropdown!==n.item.path)return;const L=b(p.value);g=[window,...L],y=()=>{n.activeDropdown===n.item.path&&r("toggleItemDropdown",n.item.path,new MouseEvent("click"))};const D=y;D&&g.forEach(ne=>{ne===window?window.addEventListener("scroll",D,!0):ne.addEventListener("scroll",D,!0)})},S=()=>{n.activeDropdown===n.item.path&&(m=L=>{if(n.activeDropdown!==n.item.path)return;const D=L.target;if(!D)return;const ne=document.querySelector(`[data-item-dropdown="${n.item.path}"]`);if(ne&&ne.contains(D)||p.value&&p.value.contains(D))return;const le=i.root;if(le&&le.contains(D)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}const je=document.querySelector(".vuefinder__modal-layout");if(je&&je.contains(D)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}r("toggleItemDropdown",n.item.path,new MouseEvent("click"))},setTimeout(()=>{m&&(document.addEventListener("mousedown",m,!0),document.addEventListener("touchstart",m,!0))},100))};xn(()=>{v&&(v(),v=null),y&&(g.forEach(L=>{L===window?window.removeEventListener("scroll",y,!0):L.removeEventListener("scroll",y,!0)}),y=null,g=[]),m&&(document.removeEventListener("mousedown",m,!0),document.removeEventListener("touchstart",m,!0),m=null)});const O=L=>n.expandedPaths.has(L),T=L=>L.type==="dir"||!L.file_size?"":Bm(L.file_size),A=(L,D)=>{D.stopPropagation(),r("toggleItemDropdown",L,D)},M=async(L,D)=>{const ne=document.querySelector(`[data-item-dropdown="${L}"]`);if(!(!ne||!D)&&(await gt(),!(!ne||!D))){Object.assign(ne.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:le,y:je}=await js(D,ne,{placement:"left-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(ne.style,{left:`${le}px`,top:`${je}px`}),requestAnimationFrame(()=>{ne&&Object.assign(ne.style,{opacity:"1",transform:"translateY(0)"})})}catch(le){console.warn("Floating UI initial positioning error:",le);return}try{v=Dh(D,ne,async()=>{if(!(!D||!ne))try{const{x:le,y:je}=await js(D,ne,{placement:"left-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(ne.style,{left:`${le}px`,top:`${je}px`})}catch(le){console.warn("Floating UI positioning error:",le)}})}catch(le){console.warn("Floating UI autoUpdate setup error:",le),v=null}}},z=L=>{r("update:selectedItemDropdownOption",L)},Y=async L=>{await Xa(L.path),r("copyPath",L)},ve=L=>{r("openContainingFolder",L)},W=L=>{r("preview",L)},X=L=>{r("open",L)},K=L=>{if(!n.activeDropdown)return;const D=["copy-path","open-folder","preview"],ne=n.selectedItemDropdownOption,le=D.findIndex(je=>ne?.includes(je));if(L.key==="ArrowDown"){L.preventDefault();const je=(le+1)%D.length;r("update:selectedItemDropdownOption",`${D[je]||""}-${n.activeDropdown}`)}else if(L.key==="ArrowUp"){L.preventDefault();const je=le<=0?D.length-1:le-1;r("update:selectedItemDropdownOption",`${D[je]||""}-${n.activeDropdown}`)}else L.key==="Enter"?(L.preventDefault(),ne&&(ne.includes("copy-path")?Y(n.item):ne.includes("open-folder")?ve(n.item):ne.includes("preview")&&W(n.item))):L.key==="Escape"&&(L.preventDefault(),r("update:selectedItemDropdownOption",null))};return(L,D)=>(C(),R("div",{class:Be(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":e.index===e.selectedIndex}]),title:e.item.basename,onClick:D[13]||(D[13]=ne=>r("select",e.index)),onDblclick:D[14]||(D[14]=ht(ne=>r("activate",e.item),["stop"]))},[_("div",NG,[e.item.type==="dir"?(C(),Ee(w(ar),{key:0})):(C(),Ee(w(Ga),{key:1}))]),_("div",zG,[_("div",BG,[e.item.type==="dir"&&u.value&&d.value?(C(),Ee(w(Qa),{key:0,class:"vuefinder__search-modal__result-pin",title:w(o)("Pinned")},null,8,["title"])):Se("",!0),Et(" "+q(e.item.basename)+" ",1),T(e.item)?(C(),R("span",VG,q(T(e.item)),1)):Se("",!0)]),_("div",{class:"vuefinder__search-modal__result-path",title:e.item.path,onClick:D[0]||(D[0]=ht(ne=>{r("select",e.index),r("togglePathExpansion",e.item.path)},["stop"]))},q(O(e.item.path)?e.item.path:w(rd)(e.item.path)),9,HG)]),_("button",{ref_key:"buttonElementRef",ref:p,class:"vuefinder__search-modal__result-actions",title:w(o)("More actions"),onClick:D[1]||(D[1]=ne=>{r("selectWithDropdown",e.index),A(e.item.path,ne)})},[Z(w(QC),{class:"vuefinder__search-modal__result-actions-icon"})],8,qG),(C(),Ee(el,{to:"body"},[e.activeDropdown===e.item.path?(C(),R("div",{key:0,"data-item-dropdown":e.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":w(i).theme.current,tabindex:"-1",onClick:D[12]||(D[12]=ht(()=>{},["stop"])),onKeydown:K},[_("div",YG,[_("div",{class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`copy-path-${e.item.path}`}]),onClick:D[2]||(D[2]=ne=>{z(`copy-path-${e.item.path}`),Y(e.item)}),onFocus:D[3]||(D[3]=ne=>z(`copy-path-${e.item.path}`))},[Z(w(Ym),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Copy Path")),1)],34),_("div",{class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`open-folder-${e.item.path}`}]),onClick:D[4]||(D[4]=ne=>{z(`open-folder-${e.item.path}`),ve(e.item)}),onFocus:D[5]||(D[5]=ne=>z(`open-folder-${e.item.path}`))},[Z(w(ar),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Open Containing Folder")),1)],34),e.item.type==="dir"?(C(),R("div",{key:0,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`open-${e.item.path}`}]),onClick:D[6]||(D[6]=ne=>{z(`open-${e.item.path}`),X(e.item)}),onFocus:D[7]||(D[7]=ne=>z(`open-${e.item.path}`))},[Z(w(ar),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Open")),1)],34)):Se("",!0),e.item.type==="dir"&&u.value?(C(),R("div",{key:1,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`pin-${e.item.path}`}]),onClick:D[8]||(D[8]=ne=>{z(`pin-${e.item.path}`),f(e.item)}),onFocus:D[9]||(D[9]=ne=>z(`pin-${e.item.path}`))},[Z(w(Qa),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(d.value?w(o)("Unpin Folder"):w(o)("Pin Folder")),1)],34)):(C(),R("div",{key:2,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`preview-${e.item.path}`}]),onClick:D[10]||(D[10]=ne=>{z(`preview-${e.item.path}`),W(e.item)}),onFocus:D[11]||(D[11]=ne=>z(`preview-${e.item.path}`))},[Z(w(Ga),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Preview")),1)],34))])],40,WG)):Se("",!0)]))],42,UG))}}),GG={key:0,class:"vuefinder__search-modal__searching"},QG={class:"vuefinder__search-modal__loading-icon"},XG={key:1,class:"vuefinder__search-modal__no-results"},JG={key:2,class:"vuefinder__search-modal__results-list"},ZG={class:"vuefinder__search-modal__results-header"},zo=60,Y0=5,eQ=ze({name:"SearchResultsList",__name:"SearchResultsList",props:{searchResults:{},isSearching:{type:Boolean},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{},resultsEnter:{type:Boolean}},emits:["selectResultItem","selectResultItemWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","open","preview","activate"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=rt(),{t:s}=o.i18n,l=_i("scrollableContainer"),u=se(()=>r.searchResults.length>0),d=se(()=>r.searchResults.length),f=re(0),p=re(600),v=se(()=>r.searchResults.length*zo),y=se(()=>{const O=Math.max(0,Math.floor(f.value/zo)-Y0),T=Math.min(r.searchResults.length,Math.ceil((f.value+p.value)/zo)+Y0);return{start:O,end:T}}),g=se(()=>{const{start:O,end:T}=y.value;return r.searchResults.slice(O,T).map((A,M)=>({item:A,index:O+M,top:(O+M)*zo}))}),m=O=>{const T=O.target;f.value=T.scrollTop},b=()=>{l.value&&(p.value=l.value.clientHeight)},x=()=>{if(r.selectedIndex>=0&&l.value){const O=r.selectedIndex*zo,T=O+zo,A=l.value.scrollTop,M=l.value.clientHeight,z=A+M;let Y=A;O<A?Y=O:T>z&&(Y=T-M),Y!==A&&l.value.scrollTo({top:Y,behavior:"smooth"})}},S=()=>{l.value&&(l.value.scrollTop=0,f.value=0)};return xt(()=>{b(),window.addEventListener("resize",b)}),xn(()=>{window.removeEventListener("resize",b)}),He(()=>l.value,()=>{b()}),t({scrollSelectedIntoView:x,resetScroll:S,getContainerHeight:()=>p.value,scrollTop:()=>f.value}),(O,T)=>(C(),R("div",{class:Be(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":e.resultsEnter}])},[e.isSearching?(C(),R("div",GG,[_("div",QG,[Z(w(nd),{class:"vuefinder__search-modal__loading-icon"})]),_("span",null,q(w(s)("Searching...")),1)])):u.value?(C(),R("div",JG,[_("div",ZG,[_("span",null,q(w(s)("Found %s results",d.value)),1)]),_("div",{ref_key:"scrollableContainer",ref:l,class:"vuefinder__search-modal__results-scrollable",onScroll:m},[_("div",{class:"vuefinder__search-modal__results-items",style:an({height:`${v.value}px`,position:"relative"})},[(C(!0),R(We,null,ct(g.value,A=>(C(),R("div",{key:A.item.path,style:an({position:"absolute",top:`${A.top}px`,left:"0",width:"100%",height:`${zo}px`})},[Z(KG,{item:A.item,index:A.index,"selected-index":e.selectedIndex,"expanded-paths":e.expandedPaths,"active-dropdown":e.activeDropdown,"selected-item-dropdown-option":e.selectedItemDropdownOption,onSelect:T[0]||(T[0]=M=>i("selectResultItem",M)),onSelectWithDropdown:T[1]||(T[1]=M=>i("selectResultItemWithDropdown",M)),onTogglePathExpansion:T[2]||(T[2]=M=>i("togglePathExpansion",M)),onToggleItemDropdown:T[3]||(T[3]=(M,z)=>i("toggleItemDropdown",M,z)),"onUpdate:selectedItemDropdownOption":T[4]||(T[4]=M=>i("update:selectedItemDropdownOption",M)),onCopyPath:T[5]||(T[5]=M=>i("copyPath",M)),onOpenContainingFolder:T[6]||(T[6]=M=>i("openContainingFolder",M)),onOpen:T[7]||(T[7]=M=>i("open",M)),onPreview:T[8]||(T[8]=M=>i("preview",M)),onActivate:T[9]||(T[9]=M=>i("activate",M))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(C(),R("div",XG,[_("span",null,q(w(s)("No results found")),1)]))],2))}}),tQ={class:"vuefinder__search-modal"},nQ={class:"vuefinder__search-modal__content"},rQ={class:"vuefinder__search-modal__search-bar"},iQ={class:"vuefinder__search-modal__search-location"},oQ=["title"],sQ=["disabled"],aQ={key:0,class:"vuefinder__search-modal__folder-selector"},lQ={class:"vuefinder__search-modal__folder-selector-content"},uQ={key:1,class:"vuefinder__search-modal__instructions"},cQ={class:"vuefinder__search-modal__instructions-text"},Xm=ze({name:"ModalSearch",__name:"ModalSearch",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=re(null),s=re(null),l=re(null),u=YC("",300),d=re([]),f=re(!1),p=re(-1);let v=null;const y=re(!1),g=re(!1),m=re(null),b=re("all"),x=re(!1),S=re("name-asc"),O={"name-asc":{column:"basename",direction:1},"name-desc":{column:"basename",direction:-1},"size-asc":{column:"file_size",direction:1},"size-desc":{column:"file_size",direction:-1},"date-asc":{column:"last_modified",direction:1},"date-desc":{column:"last_modified",direction:-1}},T=se(()=>{const{column:V,direction:P}=O[S.value];return d.value.slice().sort((F,G)=>LC(F[V],G[V])*P)}),A=re(`size-${b.value}`),M=re(null),z=re(new Set),Y=re(null),ve=Qe(i.path),W=V=>{z.value.has(V)?z.value.delete(V):z.value.add(V)},X=(V,P)=>{P&&typeof P.stopPropagation=="function"&&P.stopPropagation(),Y.value===V?Y.value=null:Y.value=V},K=()=>{Y.value=null},L=V=>{try{const P=V.dir||`${V.storage}://`;t.adapter.open(P),t.modal.close(),K()}catch{n.error(r("Failed to open containing folder"))}},D=V=>{t.modal.open(qi,{storage:ve?.value?.storage??"local",item:V}),K()},ne=V=>{t.adapter.open(V.path),t.modal.close(),K()},le=V=>{V.type==="dir"?ne(V):D(V)},je=V=>{p.value=V,K()},J=V=>{p.value=V},j=async V=>{await Xa(V.path),K()};He(u,async V=>{V.trim()?(await U(V.trim()),p.value=0):(v&&(v.abort(),v=null),d.value=[],f.value=!1,p.value=-1)}),He(b,async V=>{A.value=`size-${V}`,u.value.trim()&&!g.value&&(await U(u.value.trim()),p.value=0)}),He(x,async()=>{u.value.trim()&&!g.value&&(await U(u.value.trim()),p.value=0)});const de=V=>{if(!V||typeof V!="object")return!1;const P=V.name;return P==="AbortError"||P==="CanceledError"},U=async V=>{if(!V)return;v&&v.abort();const P=new AbortController;v=P,f.value=!0;try{const F=m.value?.path||ve?.value?.path,G=await t.adapter.search({path:F,filter:V,deep:x.value,size:b.value,signal:P.signal});if(P.signal.aborted)return;d.value=G||[],f.value=!1}catch(F){if(de(F)||P.signal.aborted)return;n.error(yn(F,r("Search failed"))),d.value=[],f.value=!1}};xt(()=>{document.addEventListener("click",oe),A.value=`size-${b.value}`});const ee=()=>{g.value?(g.value=!1,u.value.trim()&&(U(u.value.trim()),p.value=0)):(y.value=!1,g.value=!0)},Q=V=>{V&&(m.value=V)},B=V=>{V&&(Q(V),g.value=!1,u.value.trim()&&(U(u.value.trim()),p.value=0))};xn(()=>{document.removeEventListener("click",oe),v&&(v.abort(),v=null),s.value&&s.value.cleanup()});const oe=V=>{const P=V.target;if(y.value&&(P.closest(".vuefinder__search-modal__dropdown")||(y.value=!1,gt(()=>{o.value&&o.value.focus()}))),Y.value){const F=P.closest(".vuefinder__search-modal__item-dropdown"),G=P.closest(".vuefinder__search-modal__result-item");!F&&!G&&K()}};return(V,P)=>(C(),Ee(dr,{class:"vuefinder__search-modal-layout"},{default:Le(()=>[_("div",tQ,[Z(xr,{icon:w(Qm),title:w(r)("Search files")},null,8,["icon","title"]),_("div",nQ,[_("div",rQ,[Z(gG,{ref_key:"searchInputRef",ref:o,modelValue:w(u),"onUpdate:modelValue":P[0]||(P[0]=F=>Za(u)?u.value=F:null),"is-searching":f.value,disabled:g.value},null,8,["modelValue","is-searching","disabled"]),Z(DG,{ref_key:"searchOptionsDropdownRef",ref:s,visible:y.value,"onUpdate:visible":P[1]||(P[1]=F=>y.value=F),"size-filter":b.value,"onUpdate:sizeFilter":P[2]||(P[2]=F=>b.value=F),"selected-option":A.value,"onUpdate:selectedOption":P[3]||(P[3]=F=>A.value=F),"sort-by":S.value,"onUpdate:sortBy":P[4]||(P[4]=F=>S.value=F),disabled:g.value},null,8,["visible","size-filter","selected-option","sort-by","disabled"])]),_("div",{class:"vuefinder__search-modal__options",onClick:P[8]||(P[8]=ht(()=>{},["stop"]))},[_("div",iQ,[_("button",{class:Be(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":g.value}]),onClick:ht(ee,["stop"])},[Z(w(ar),{class:"vuefinder__search-modal__location-icon"}),_("span",{class:"vuefinder__search-modal__location-text",title:m.value?.path||w(ve).path},q(w(rd)(m.value?.path||w(ve).path)),9,oQ),P[11]||(P[11]=_("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2)]),_("label",{class:"vuefinder__search-modal__deep-search",onClick:P[7]||(P[7]=ht(()=>{},["stop"]))},[Ct(_("input",{"onUpdate:modelValue":P[5]||(P[5]=F=>x.value=F),type:"checkbox",disabled:g.value,class:"vuefinder__search-modal__checkbox",onClick:P[6]||(P[6]=ht(()=>{},["stop"]))},null,8,sQ),[[Zs,x.value]]),_("span",null,q(w(r)("Include subfolders")),1)])]),g.value?(C(),R("div",aQ,[_("div",lQ,[Z(pl,{modelValue:m.value,"onUpdate:modelValue":[P[9]||(P[9]=F=>m.value=F),Q],"show-pinned-folders":!0,"current-path":w(ve),onSelectAndClose:B},null,8,["modelValue","current-path"])])])):Se("",!0),!w(u).trim()&&!g.value?(C(),R("div",uQ,[_("p",cQ,q(w(r)("Start typing to search files. Use options to filter or include subfolders.")),1)])):Se("",!0),w(u).trim()&&!g.value?(C(),Ee(eQ,{key:2,ref_key:"searchResultsListRef",ref:l,"search-results":T.value,"is-searching":f.value,"selected-index":p.value,"expanded-paths":z.value,"active-dropdown":Y.value,"selected-item-dropdown-option":M.value,"results-enter":!0,onSelectResultItem:je,onSelectResultItemWithDropdown:J,onTogglePathExpansion:W,onToggleItemDropdown:X,"onUpdate:selectedItemDropdownOption":P[10]||(P[10]=F=>M.value=F),onCopyPath:j,onOpenContainingFolder:L,onOpen:ne,onPreview:D,onActivate:le},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):Se("",!0)])])]),_:1}))}}),dQ={props:{on:{type:String,required:!0}},setup(e,{emit:t,slots:n}){const r=rt(),i=re(!1),{t:o}=r.i18n;let s=null;const l=()=>{s&&clearTimeout(s),i.value=!0,s=setTimeout(()=>{i.value=!1},2e3)};return xt(()=>{r.emitter.on(e.on,l)}),xn(()=>{s&&clearTimeout(s)}),{shown:i,t:o}}},fQ=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},pQ={key:1};function hQ(e,t,n,r,i,o){return C(),R("div",{class:Be(["vuefinder__action-message",{"vuefinder__action-message--hidden":!r.shown}])},[e.$slots.default?mt(e.$slots,"default",{key:0}):(C(),R("span",pQ,q(r.t("Saved.")),1))],2)}const K0=fQ(dQ,[["render",hQ]]),mQ=[{name:"silver",displayName:"Silver"},{name:"valorite",displayName:"Valorite"},{name:"midnight",displayName:"Midnight"},{name:"latte",displayName:"Latte"},{name:"rose",displayName:"Rose"},{name:"mythril",displayName:"Mythril"},{name:"lime",displayName:"lime"},{name:"sky",displayName:"Sky"},{name:"ocean",displayName:"Oceanic"},{name:"palenight",displayName:"Palenight"},{name:"arctic",displayName:"Arctic"},{name:"code",displayName:"Code"}],vQ={class:"vuefinder__settings-modal__content"},gQ={class:"vuefinder__settings-modal__main"},_Q={class:"vuefinder__settings-modal__sections"},yQ={key:0,class:"vuefinder__settings-modal__section"},bQ={for:"theme",class:"vuefinder__settings-modal__label"},wQ={class:"vuefinder__settings-modal__input-group"},EQ=["value"],SQ=["value"],CQ={key:1,class:"vuefinder__settings-modal__section"},xQ={for:"language",class:"vuefinder__settings-modal__label"},TQ={class:"vuefinder__settings-modal__input-group"},kQ=["value"],OQ={class:"vuefinder__settings-modal__reset-section"},$Q={class:"vuefinder__settings-modal__reset-content"},AQ={class:"vuefinder__settings-modal__reset-title"},RQ={class:"vuefinder__settings-modal__reset-description"},XC=ze({__name:"ModalSettings",setup(e){const t=rt(),{enabled:n}=fr(),r=t.config,{clearStore:i}=t.storage,{t:o,localeAtom:s}=t.i18n,l=Qe(s),u=se({get:()=>String(l.value||"en"),set:m=>s.set(m||"en")}),d=Qe(r.state),f=se(()=>d.value.theme||"silver"),p=async()=>{r.reset(),i(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},v=m=>{r.set("theme",m),t.emitter.emit("vf-theme-saved")},{i18n:y}=Fs("VueFinderOptions"),g=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",zhCN:"Chinese-Simplified (简体中文)",zhTW:"Chinese-Traditional (繁體中文)",nl:"Dutch (Nederlands)",en:"English",fr:"French (Français)",de:"German (Deutsch)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",it:"Italian (Italiano)",ja:"Japanese (日本語)",fa:"Persian (فارسی)",pl:"Polish (Polski)",pt:"Portuguese (Português)",ru:"Russian (Pусский)",es:"Spanish (Español)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)"}).filter(([m])=>Object.keys(y).includes(m)));return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=x=>w(t).modal.close())},q(w(o)("Close")),1)]),default:Le(()=>[_("div",vQ,[Z(xr,{icon:w(KC),title:w(o)("Settings")},null,8,["icon","title"]),_("div",gQ,[_("div",_Q,[w(n)("theme")?(C(),R("div",yQ,[_("label",bQ,[Et(q(w(o)("Theme"))+" ",1),Z(K0,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:Le(()=>[Et(q(w(o)("Saved.")),1)]),_:1})]),_("div",wQ,[_("select",{id:"theme",value:f.value,class:"vuefinder__settings-modal__select",onChange:b[0]||(b[0]=x=>v(x.target?.value))},[(C(!0),R(We,null,ct(w(mQ),x=>(C(),R("option",{key:x.name,value:x.name},q(x.displayName),9,SQ))),128))],40,EQ)])])):Se("",!0),Object.keys(w(g)).length>1?(C(),R("div",CQ,[_("label",xQ,[Et(q(w(o)("Language"))+" ",1),Z(K0,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:Le(()=>[Et(q(w(o)("Saved.")),1)]),_:1})]),_("div",TQ,[Ct(_("select",{id:"language","onUpdate:modelValue":b[1]||(b[1]=x=>u.value=x),class:"vuefinder__settings-modal__select"},[(C(!0),R(We,null,ct(w(g),(x,S)=>(C(),R("option",{key:S,value:S},q(x),9,kQ))),128))],512),[[Op,u.value]])])])):Se("",!0)]),_("div",OQ,[_("div",$Q,[_("div",AQ,q(w(o)("Reset")),1),_("div",RQ,q(w(o)("Reset all settings to default")),1)]),_("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:p},q(w(o)("Reset Settings")),1)])])])]),_:1}))}}),Qn={ESCAPE:"Escape",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF",SPACE:"Space",KEY_C:"KeyC",KEY_X:"KeyX",KEY_V:"KeyV",KEY_S:"KeyS",KEY_R:"KeyR"};function PQ(){const e=rt(),t=cr(e),n=e.fs,r=e.config,{enabled:i}=fr(),o=Qe(n.path),s=Qe(n.selectedItems),l=u=>{if(u.code===Qn.ESCAPE&&(e.modal.close(),e.root.focus()),!e.modal.visible){if(u.metaKey&&u.code===Qn.KEY_R&&!u.shiftKey&&(e.adapter.invalidateListQuery(o.value.path),e.adapter.open(o.value.path),u.preventDefault()),u.metaKey&&u.shiftKey&&u.code===Qn.KEY_R&&i("rename")&&s.value.length===1&&(e.modal.open(Jc,{items:s.value}),u.preventDefault()),u.code===Qn.DELETE&&s.value.length!==0&&e.modal.open(Xc,{items:s.value}),u.metaKey&&u.code===Qn.BACKSLASH&&e.modal.open(UC),u.metaKey&&u.code===Qn.KEY_F&&i("search")&&(e.modal.open(Xm),u.preventDefault()),u.metaKey&&u.code===Qn.KEY_E&&(r.toggle("showTreeView"),u.preventDefault()),u.metaKey&&u.code===Qn.KEY_S&&(e.modal.open(XC),u.preventDefault()),u.metaKey&&u.code===Qn.ENTER&&(r.toggle("fullScreen"),e.root.focus()),u.metaKey&&u.code===Qn.KEY_A&&(n.selectAll(e.selectionMode||"multiple",e),u.preventDefault()),u.code===Qn.SPACE&&s.value.length===1&&s.value[0]?.type!=="dir"&&e.modal.open(qi,{storage:n.path.get().storage,item:s.value[0]}),u.metaKey&&u.code===Qn.KEY_C&&i("copy")){if(s.value.length===0){t.error(e.i18n.t("No items selected"));return}n.setClipboard("copy",new Set(s.value.map(d=>Jt(d)))),t.success(s.value.length===1?e.i18n.t("Item copied to clipboard"):e.i18n.t("%s items copied to clipboard",s.value.length)),u.preventDefault()}if(u.metaKey&&u.code===Qn.KEY_X&&i("copy")){if(s.value.length===0){t.error(e.i18n.t("No items selected"));return}n.setClipboard("cut",new Set(s.value.map(d=>Jt(d)))),t.success(s.value.length===1?e.i18n.t("Item cut to clipboard"):e.i18n.t("%s items cut to clipboard",s.value.length)),u.preventDefault()}if(u.metaKey&&u.code===Qn.KEY_V&&i("copy")){if(n.getClipboard().items.size===0){t.error(e.i18n.t("No items in clipboard"));return}if(n.getClipboard().path===n.path.get().path){t.error(e.i18n.t("Cannot paste items to the same directory"));return}if(n.getClipboard().type==="cut"){e.modal.open(Xs,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}}),n.clearClipboard();return}if(n.getClipboard().type==="copy"){e.modal.open(Gm,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}});return}u.preventDefault()}}};xt(async()=>{if(await gt(),!e.root){console.warn("app.root is not available. Event listeners will not be attached.");return}e.root.addEventListener("keydown",l)}),ts(()=>{e.root&&e.root.removeEventListener("keydown",l)})}function IQ(){const e=re(!1),t=re([]);return{isDraggingExternal:e,externalFiles:t,handleDragEnter:n=>{n.preventDefault(),n.stopPropagation();const r=n.dataTransfer?.items;r&&Array.from(r).some(i=>i.kind==="file")&&(e.value=!0,n.isExternalDrag=!0)},handleDragOver:n=>{e.value&&n.dataTransfer&&(n.dataTransfer.dropEffect="copy",n.preventDefault(),n.stopPropagation())},handleDragLeave:n=>{n.preventDefault();const r=n.currentTarget.getBoundingClientRect(),i=n.clientX,o=n.clientY;(i<r.left||i>r.right||o<r.top||o>r.bottom)&&(e.value=!1)},handleDrop:async n=>{n.preventDefault(),n.stopPropagation(),e.value=!1;const r=n.dataTransfer?.items;if(r){const i=Array.from(r).filter(o=>o.kind==="file");if(i.length>0){t.value=[];for(const o of i){const s=o.webkitGetAsEntry?.();if(s)await qm((l,u)=>{t.value.push({name:u.name,size:u.size,type:u.type,lastModified:new Date(u.lastModified),file:u})},s);else{const l=o.getAsFile();l&&t.value.push({name:l.name,size:l.size,type:l.type,lastModified:new Date(l.lastModified),file:l})}}return t.value}}return[]},clearExternalFiles:()=>{t.value=[]}}}const MQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function DQ(e,t){return C(),R("svg",MQ,[...t[0]||(t[0]=[_("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1)])])}const JC={render:DQ},FQ={class:"vuefinder__new-folder-modal__content"},LQ={class:"vuefinder__new-folder-modal__form"},jQ={class:"vuefinder__new-folder-modal__description"},UQ=["placeholder"],Jm=ze({__name:"ModalNewFolder",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=()=>{s.value!==""&&t.adapter.createFolder({path:o.value.path,name:s.value}).then(u=>{n.success(r("%s is created.",s.value)),t.fs.setFiles(u.files),t.modal.close()}).catch(u=>{n.error(yn(u,r("Failed to create folder")))})};return(u,d)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},q(w(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:d[1]||(d[1]=f=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(JC),title:w(r)("New Folder")},null,8,["icon","title"]),_("div",FQ,[_("div",LQ,[_("p",jQ,q(w(r)("Create a new folder")),1),Ct(_("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),class:"vuefinder__new-folder-modal__input",placeholder:w(r)("Folder Name"),type:"text",autofocus:"",onKeyup:Lr(l,["enter"])},null,40,UQ),[[oi,s.value]])])])])]),_:1}))}}),NQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function zQ(e,t){return C(),R("svg",NQ,[...t[0]||(t[0]=[_("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1)])])}const ZC={render:zQ},BQ={class:"vuefinder__new-file-modal__content"},VQ={class:"vuefinder__new-file-modal__form"},HQ={class:"vuefinder__new-file-modal__description"},qQ=["placeholder"],e2=ze({__name:"ModalNewFile",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=()=>{s.value!==""&&t.adapter.createFile({path:o.value.path,name:s.value}).then(u=>{n.success(r("%s is created.",s.value)),t.fs.setFiles(u.files),t.modal.close()}).catch(u=>{n.error(yn(u,r("Failed to create file")))})};return(u,d)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},q(w(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:d[1]||(d[1]=f=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(ZC),title:w(r)("New File")},null,8,["icon","title"]),_("div",BQ,[_("div",VQ,[_("p",HQ,q(w(r)("Create a new file")),1),Ct(_("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),class:"vuefinder__new-file-modal__input",placeholder:w(r)("File Name"),type:"text",onKeyup:Lr(l,["enter"])},null,40,qQ),[[oi,s.value]])])])])]),_:1}))}}),WQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function YQ(e,t){return C(),R("svg",WQ,[...t[0]||(t[0]=[_("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1)])])}const t2={render:YQ};function Ch(e,t=14){const n=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return e.replace(new RegExp(n),"$2..$4")}const KQ={class:"vuefinder__upload-modal__content relative"},GQ={class:"vuefinder__upload-modal__target-section"},QQ={class:"vuefinder__upload-modal__target-label"},XQ={class:"vuefinder__upload-modal__target-container"},JQ={class:"vuefinder__upload-modal__target-path"},ZQ={class:"vuefinder__upload-modal__target-storage"},eX={key:0,class:"vuefinder__upload-modal__target-folder"},tX={class:"vuefinder__upload-modal__target-badge"},nX={class:"vuefinder__upload-modal__drag-hint"},rX={class:"vuefinder__upload-modal__file-list vf-scrollbar"},iX=["textContent"],oX={class:"vuefinder__upload-modal__file-info"},sX={key:0,class:"vuefinder__upload-modal__file-rename"},aX=["placeholder","onKeyup"],lX=["title","onClick"],uX=["title"],cX={class:"vuefinder__upload-modal__file-name hidden md:block"},dX={class:"vuefinder__upload-modal__file-name md:hidden"},fX={key:0,class:"ml-auto"},pX=["title","disabled","onClick"],hX=["title","disabled","onClick"],mX={key:0,class:"py-2"},vX=["aria-expanded"],gX={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},_X=["disabled"],yX=["aria-expanded"],bX={key:0,class:"vuefinder__upload-actions__menu"},Zm=ze({__name:"ModalUpload",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.path),o=re(i.value),s=re(!1),l=()=>{const oe=o.value.path;if(!oe)return{storage:"local",path:""};if(oe.endsWith("://"))return{storage:oe.replace("://",""),path:""};const V=oe.split("://");return{storage:V[0]||"local",path:V[1]||""}},u=oe=>{oe&&(o.value=oe)},d=oe=>{oe&&(o.value=oe,s.value=!1)},{container:f,internalFileInput:p,internalFolderInput:v,pickFiles:y,queue:g,message:m,uploading:b,hasFilesInDropArea:x,definitions:S,openFileSelector:O,upload:T,cancel:A,remove:M,clear:z,close:Y,getClassNameForEntry:ve,getIconForEntry:W,addExternalFiles:X,renameEntry:K}=VC(t.customUploader),L=re(null),D=re(""),ne=re(null),le=oe=>{const V=oe.lastIndexOf("/");return V===-1?oe:oe.slice(V+1)},je=oe=>{b.value||oe.status!==S.value.QUEUE_ENTRY_STATUS.UPLOADING&&(L.value=oe.id,D.value=le(oe.name),gt(()=>{const V=ne.value;if(V){V.focus();const P=D.value.lastIndexOf(".");P>0?V.setSelectionRange(0,P):V.select()}}))},J=()=>{L.value=null,D.value=""},j=async oe=>{const V=D.value.trim();if(!V||V===le(oe.name)){J();return}await K(oe,V),J()},de=()=>{T(o.value)};xt(()=>{t.emitter.on("vf-external-files-dropped",oe=>{X(oe)})}),xn(()=>{t.emitter.off("vf-external-files-dropped")});const U=re(!1),ee=re(null),Q=re(null),B=oe=>{if(!U.value)return;const V=oe.target,P=ee.value?.contains(V)??!1,F=Q.value?.contains(V)??!1;!P&&!F&&(U.value=!1)};return xt(()=>document.addEventListener("click",B)),xn(()=>document.removeEventListener("click",B)),(oe,V)=>(C(),Ee(dr,{"show-drag-overlay":w(x),"drag-overlay-text":w(n)("Drag and drop the files/folders to here.")},{buttons:Le(()=>[_("div",{ref_key:"actionsMenuMobileRef",ref:ee,class:"relative mb-2 w-full sm:hidden"},[_("div",{class:Be(["vuefinder__upload-actions","vuefinder__upload-actions--block",U.value?"vuefinder__upload-actions--ring":""])},[_("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:V[4]||(V[4]=P=>w(O)())},q(w(n)("Select Files")),1),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":U.value?"true":"false",onClick:V[5]||(V[5]=ht(P=>U.value=!U.value,["stop"]))},[...V[21]||(V[21]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,vX)],2),U.value?(C(),R("div",gX,[_("div",{class:"vuefinder__upload-actions__item",onClick:V[6]||(V[6]=P=>{w(O)(),U.value=!1})},q(w(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:V[7]||(V[7]=P=>{w(v)?.click(),U.value=!1})},q(w(n)("Select Folders")),1),V[22]||(V[22]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[8]||(V[8]=P=>w(b)?null:(w(z)(!1),U.value=!1))},q(w(n)("Clear all")),3),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[9]||(V[9]=P=>w(b)?null:(w(z)(!0),U.value=!1))},q(w(n)("Clear only successful")),3)])):Se("",!0)],512),_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:w(b)||!w(g).length,onClick:ht(de,["prevent"])},q(w(n)("Upload")),9,_X),w(b)?(C(),R("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:V[10]||(V[10]=ht((...P)=>w(A)&&w(A)(...P),["prevent"]))},q(w(n)("Cancel")),1)):(C(),R("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:V[11]||(V[11]=ht((...P)=>w(Y)&&w(Y)(...P),["prevent"]))},q(w(n)("Close")),1)),_("div",{ref_key:"actionsMenuDesktopRef",ref:Q,class:"relative mr-auto hidden sm:block"},[_("div",{class:Be(["vuefinder__upload-actions",U.value?"vuefinder__upload-actions--ring":""])},[_("button",{ref_key:"pickFiles",ref:y,type:"button",class:"vuefinder__upload-actions__main"},q(w(n)("Select Files")),513),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":U.value?"true":"false",onClick:V[12]||(V[12]=ht(P=>U.value=!U.value,["stop"]))},[...V[23]||(V[23]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,yX)],2),U.value?(C(),R("div",bX,[_("div",{class:"vuefinder__upload-actions__item",onClick:V[13]||(V[13]=P=>{w(O)(),U.value=!1})},q(w(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:V[14]||(V[14]=P=>{w(v)?.click(),U.value=!1})},q(w(n)("Select Folders")),1),V[24]||(V[24]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[15]||(V[15]=P=>w(b)?null:(w(z)(!1),U.value=!1))},q(w(n)("Clear all")),3),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[16]||(V[16]=P=>w(b)?null:(w(z)(!0),U.value=!1))},q(w(n)("Clear only successful")),3)])):Se("",!0)],512)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(t2),title:w(n)("Upload Files")},null,8,["icon","title"]),_("div",KQ,[_("div",GQ,[_("div",QQ,q(w(n)("Target Directory")),1),_("div",XQ,[_("div",{class:"vuefinder__upload-modal__target-display",onClick:V[0]||(V[0]=P=>s.value=!s.value)},[_("div",JQ,[_("span",ZQ,q(l().storage)+"://",1),l().path?(C(),R("span",eX,q(l().path),1)):Se("",!0)]),_("span",tX,q(w(n)("Browse")),1)])]),_("div",{class:Be(["vuefinder__upload-modal__tree-selector",s.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[Z(pl,{modelValue:o.value,"onUpdate:modelValue":[V[1]||(V[1]=P=>o.value=P),u],"show-pinned-folders":!0,onSelectAndClose:d},null,8,["modelValue"])],2)]),_("div",nX,q(w(n)("You can drag & drop files anywhere while this modal is open.")),1),_("div",{ref_key:"container",ref:f,class:"hidden"},null,512),_("div",rX,[(C(!0),R(We,null,ct(w(g),P=>(C(),R("div",{key:P.id,class:"vuefinder__upload-modal__file-entry"},[_("span",{class:Be(["vuefinder__upload-modal__file-icon",w(ve)(P)])},[_("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:q(w(W)(P))},null,8,iX)],2),_("div",oX,[L.value===P.id?(C(),R("div",sX,[Ct(_("input",{ref_for:!0,ref_key:"renameInputRef",ref:ne,"onUpdate:modelValue":V[2]||(V[2]=F=>D.value=F),type:"text",class:"vuefinder__upload-modal__file-rename-input",placeholder:w(n)("Rename"),onKeyup:[Lr(F=>j(P),["enter"]),Lr(J,["esc"])]},null,40,aX),[[oi,D.value]]),_("button",{type:"button",class:"vuefinder__upload-modal__file-rename-btn vuefinder__upload-modal__file-rename-btn--save",title:w(n)("Save"),onClick:F=>j(P)},[...V[17]||(V[17]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})],-1)])],8,lX),_("button",{type:"button",class:"vuefinder__upload-modal__file-rename-btn",title:w(n)("Cancel"),onClick:J},[...V[18]||(V[18]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,uX)])):(C(),R(We,{key:1},[_("div",cX,q(w(Ch)(P.name,40))+" ("+q(P.size)+") ",1),_("div",dX,q(w(Ch)(P.name,16))+" ("+q(P.size)+") ",1),_("div",{class:Be(["vuefinder__upload-modal__file-status",w(ve)(P)])},[Et(q(P.statusName)+" ",1),P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING?(C(),R("b",fX,q(P.percent),1)):Se("",!0)],2)],64))]),L.value!==P.id?(C(),R("button",{key:0,type:"button",class:Be(["vuefinder__upload-modal__file-rename-action",w(b)||P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING?"disabled":""]),title:w(n)("Rename"),disabled:w(b)||P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING,onClick:F=>je(P)},[...V[19]||(V[19]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125"})],-1)])],10,pX)):Se("",!0),L.value!==P.id?(C(),R("button",{key:1,type:"button",class:Be(["vuefinder__upload-modal__file-remove",w(b)?"disabled":""]),title:w(n)("Delete"),disabled:w(b),onClick:F=>w(M)(P)},[...V[20]||(V[20]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,hX)):Se("",!0)]))),128)),w(g).length?Se("",!0):(C(),R("div",mX,q(w(n)("No files selected!")),1))]),w(m).length?(C(),Ee(Sh,{key:0,error:"",onHidden:V[3]||(V[3]=P=>m.value="")},{default:Le(()=>[Et(q(w(m)),1)]),_:1})):Se("",!0)])]),_("input",{ref_key:"internalFileInput",ref:p,type:"file",multiple:"",class:"hidden"},null,512),_("input",{ref_key:"internalFolderInput",ref:v,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),wX={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function EX(e,t){return C(),R("svg",wX,[...t[0]||(t[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const n2={render:EX},SX={class:"vuefinder__unarchive-modal__content"},CX={class:"vuefinder__unarchive-modal__items"},xX={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},TX={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},kX={class:"vuefinder__unarchive-modal__item-name"},OX={class:"vuefinder__unarchive-modal__info"},$X={class:"vuefinder__unarchive-modal__target"},AX={class:"vuefinder__unarchive-modal__target-label"},RX=["title"],PX={key:0,class:"vuefinder__unarchive-modal__target-selector"},ev=ze({__name:"ModalUnarchive",setup(e){const t=rt(),n=cr(t),r=t.fs,i=Qe(r.path),{t:o}=t.i18n,s=re(t.modal.data.items[0]),l=re([]),u=re(null),d=re(!1),f=se(()=>u.value?.path||i.value.path),p=()=>{d.value=!d.value},v=m=>{m&&(u.value=m)},y=m=>{m&&(u.value=m,d.value=!1)},g=()=>{const m=u.value?.path;t.adapter.unarchive({item:s.value.path,path:i.value.path,...m&&m!==i.value.path?{destination:m}:{}}).then(b=>{n.success(o("The file unarchived.")),t.fs.setFiles(b.files),t.modal.close()}).catch(b=>{n.error(yn(b,o("Failed to unarchive")))})};return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:g},q(w(o)("Unarchive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[1]||(b[1]=x=>w(t).modal.close())},q(w(o)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(n2),title:w(o)("Unarchive")},null,8,["icon","title"]),_("div",SX,[_("div",CX,[(C(!0),R(We,null,ct(l.value,x=>(C(),R("p",{key:x.path,class:"vuefinder__unarchive-modal__item"},[x.type==="dir"?(C(),R("svg",xX,[...b[2]||(b[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",TX,[...b[3]||(b[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",kX,q(x.basename),1)]))),128)),_("p",OX,q(w(o)("The archive will be unarchived at"))+" ("+q(f.value)+") ",1),_("div",$X,[_("div",AX,q(w(o)("Target folder")),1),_("button",{type:"button",class:Be(["vuefinder__unarchive-modal__target-btn",{"vuefinder__unarchive-modal__target-btn--open":d.value}]),onClick:p},[Z(w(ar),{class:"vuefinder__unarchive-modal__target-icon"}),_("span",{class:"vuefinder__unarchive-modal__target-text",title:f.value},q(w(rd)(f.value)),9,RX),b[4]||(b[4]=_("svg",{class:"vuefinder__unarchive-modal__target-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2),d.value?(C(),R("div",PX,[Z(pl,{modelValue:u.value,"onUpdate:modelValue":[b[0]||(b[0]=x=>u.value=x),v],"show-pinned-folders":!0,"current-path":w(i),onSelectAndClose:y},null,8,["modelValue","current-path"])])):Se("",!0)])])])])]),_:1}))}}),IX={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function MX(e,t){return C(),R("svg",IX,[...t[0]||(t[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const r2={render:MX},DX={class:"vuefinder__archive-modal__content"},FX={class:"vuefinder__archive-modal__form"},LX={class:"vuefinder__archive-modal__files vf-scrollbar"},jX={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},UX={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},NX={class:"vuefinder__archive-modal__file-name"},zX=["placeholder"],BX={class:"vuefinder__archive-modal__target"},VX={class:"vuefinder__archive-modal__target-label"},HX=["title"],qX={key:0,class:"vuefinder__archive-modal__target-selector"},tv=ze({__name:"ModalArchive",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=re(t.modal.data.items),u=re(null),d=re(!1),f=se(()=>u.value?.path||o.value.path),p=()=>{d.value=!d.value},v=m=>{m&&(u.value=m)},y=m=>{m&&(u.value=m,d.value=!1)},g=()=>{if(l.value.length){const m=u.value?.path;t.adapter.archive({path:o.value.path,items:l.value.map(({path:b,type:x})=>({path:b,type:x})),name:s.value,...m&&m!==o.value.path?{destination:m}:{}}).then(b=>{n.success(r("The file(s) archived.")),t.fs.setFiles(b.files),t.modal.close()}).catch(b=>{n.error(yn(b,r("Failed to archive files")))})}};return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:g},q(w(r)("Archive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=x=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(r2),title:w(r)("Archive the files")},null,8,["icon","title"]),_("div",DX,[_("div",FX,[_("div",LX,[(C(!0),R(We,null,ct(l.value,x=>(C(),R("p",{key:x.path,class:"vuefinder__archive-modal__file"},[x.type==="dir"?(C(),R("svg",jX,[...b[3]||(b[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",UX,[...b[4]||(b[4]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",NX,q(x.basename),1)]))),128))]),Ct(_("input",{"onUpdate:modelValue":b[0]||(b[0]=x=>s.value=x),class:"vuefinder__archive-modal__input",placeholder:w(r)("Archive name. (.zip file will be created)"),type:"text",onKeyup:Lr(g,["enter"])},null,40,zX),[[oi,s.value]]),_("div",BX,[_("div",VX,q(w(r)("Target folder")),1),_("button",{type:"button",class:Be(["vuefinder__archive-modal__target-btn",{"vuefinder__archive-modal__target-btn--open":d.value}]),onClick:p},[Z(w(ar),{class:"vuefinder__archive-modal__target-icon"}),_("span",{class:"vuefinder__archive-modal__target-text",title:f.value},q(w(rd)(f.value)),9,HX),b[5]||(b[5]=_("svg",{class:"vuefinder__archive-modal__target-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2),d.value?(C(),R("div",qX,[Z(pl,{modelValue:u.value,"onUpdate:modelValue":[b[1]||(b[1]=x=>u.value=x),v],"show-pinned-folders":!0,"current-path":w(o),onSelectAndClose:y},null,8,["modelValue","current-path"])])):Se("",!0)])])])])]),_:1}))}}),WX={class:"vuefinder__about-modal__content"},YX={class:"vuefinder__about-modal__main"},KX={class:"vuefinder__about-modal__shortcuts"},GX={class:"vuefinder__about-modal__shortcut"},QX={key:0,class:"vuefinder__about-modal__shortcut"},XX={key:1,class:"vuefinder__about-modal__shortcut"},JX={class:"vuefinder__about-modal__shortcut"},ZX={class:"vuefinder__about-modal__shortcut"},eJ={key:2,class:"vuefinder__about-modal__shortcut"},tJ={key:3,class:"vuefinder__about-modal__shortcut"},nJ={key:4,class:"vuefinder__about-modal__shortcut"},rJ={key:5,class:"vuefinder__about-modal__shortcut"},iJ={class:"vuefinder__about-modal__shortcut"},oJ={class:"vuefinder__about-modal__shortcut"},sJ={key:6,class:"vuefinder__about-modal__shortcut"},aJ={key:7,class:"vuefinder__about-modal__shortcut"},lJ=ze({__name:"ModalShortcuts",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n;return(i,o)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:o[0]||(o[0]=s=>w(t).modal.close())},q(w(r)("Close")),1)]),default:Le(()=>[_("div",WX,[Z(xr,{icon:w(Vm),title:w(r)("Shortcuts")},null,8,["icon","title"]),_("div",YX,[_("div",KX,[_("div",GX,[_("div",null,q(w(r)("Refresh")),1),o[1]||(o[1]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"R")],-1))]),w(n)("rename")?(C(),R("div",QX,[_("div",null,q(w(r)("Rename")),1),o[2]||(o[2]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"Shift"),Et(" + "),_("kbd",null,"R")],-1))])):Se("",!0),w(n)("delete")?(C(),R("div",XX,[_("div",null,q(w(r)("Delete")),1),o[3]||(o[3]=_("kbd",null,"Del",-1))])):Se("",!0),_("div",JX,[_("div",null,q(w(r)("Escape")),1),o[4]||(o[4]=_("kbd",null,"Esc",-1))]),_("div",ZX,[_("div",null,q(w(r)("Select All")),1),o[5]||(o[5]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"A")],-1))]),w(n)("copy")?(C(),R("div",eJ,[_("div",null,q(w(r)("Cut")),1),o[6]||(o[6]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"X")],-1))])):Se("",!0),w(n)("copy")?(C(),R("div",tJ,[_("div",null,q(w(r)("Copy")),1),o[7]||(o[7]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"C")],-1))])):Se("",!0),w(n)("copy")?(C(),R("div",nJ,[_("div",null,q(w(r)("Paste")),1),o[8]||(o[8]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"V")],-1))])):Se("",!0),w(n)("search")?(C(),R("div",rJ,[_("div",null,q(w(r)("Search")),1),o[9]||(o[9]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"F")],-1))])):Se("",!0),_("div",iJ,[_("div",null,q(w(r)("Toggle Sidebar")),1),o[10]||(o[10]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"E")],-1))]),_("div",oJ,[_("div",null,q(w(r)("Open Settings")),1),o[11]||(o[11]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"S")],-1))]),w(n)("fullscreen")?(C(),R("div",sJ,[_("div",null,q(w(r)("Toggle Full Screen")),1),o[12]||(o[12]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"Enter")],-1))])):Se("",!0),w(n)("preview")?(C(),R("div",aJ,[_("div",null,q(w(r)("Preview")),1),o[13]||(o[13]=_("kbd",null,"Space",-1))])):Se("",!0)])])])]),_:1}))}}),uJ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function cJ(e,t){return C(),R("svg",uJ,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1)])])}const i2={render:cJ},nv="vuefinder:recent-paths",o2=4,rv=typeof window<"u"&&typeof window.localStorage<"u";function iv(){if(!rv)return[];try{const e=window.localStorage.getItem(nv);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string").slice(0,o2):[]}catch{return[]}}function dJ(e){if(!(!rv||!e))try{const t=iv().filter(n=>n!==e);t.unshift(e),window.localStorage.setItem(nv,JSON.stringify(t.slice(0,o2)))}catch{}}function fJ(e){if(!(!rv||!e))try{const t=iv().filter(n=>n!==e);window.localStorage.setItem(nv,JSON.stringify(t))}catch{}}const pJ={class:"vuefinder__go-to-folder-modal"},hJ={class:"vuefinder__go-to-folder-modal__content"},mJ=["placeholder","onKeydown"],vJ={key:0,class:"vuefinder__go-to-folder-modal__error"},gJ=["onMouseenter","onClick","onDblclick"],_J={class:"vuefinder__go-to-folder-modal__suggestion-label"},yJ={key:0,class:"vuefinder__go-to-folder-modal__suggestion-tag"},bJ=["title","onClick"],wJ=["title","onClick"],EJ={key:2,class:"vuefinder__go-to-folder-modal__empty"},SJ={key:3,class:"vuefinder__go-to-folder-modal__loading"},CJ=["disabled"],xJ=ze({name:"ModalGoToFolder",__name:"ModalGoToFolder",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.storages),o=re(""),s=re([]),l=re(0),u=re(!1),d=re(!1),f=re(""),p=re(null),v=re(null);let y=0;const g=se(()=>i.value??[]),m=J=>{const j=J??"",de=j.indexOf("://");if(de===-1)return{storage:null,parent:"",filter:j.trim(),hasProtocol:!1};const U=j.slice(0,de),ee=j.slice(de+3),Q=ee.lastIndexOf("/"),B=Q===-1?`${U}://`:`${U}://${ee.slice(0,Q).replace(/^\/+/,"")}`,oe=Q===-1?ee:ee.slice(Q+1);return{storage:U,parent:B,filter:oe,hasProtocol:!0}},b=J=>{const j=J.toLowerCase();s.value=g.value.filter(de=>!j||de.toLowerCase().includes(j)).map(de=>({path:`${de}://`,label:`${de}://`,kind:"storage"})),l.value=s.value.length?0:-1,f.value=""},x=()=>{const J=iv();s.value=J.map(j=>({path:j,label:j,kind:"recent"})),l.value=s.value.length?0:-1,f.value=""},S=async(J,j)=>{const de=++y;u.value=!0,f.value="";try{const U=await t.adapter.list(J);if(de!==y)return;const ee=j.toLowerCase(),Q=(U?.files??[]).filter(B=>B.type==="dir"&&(!ee||B.basename.toLowerCase().startsWith(ee)));s.value=Q.map(B=>({path:B.path,label:B.basename,kind:"dir"})),l.value=s.value.length?0:-1}catch(U){if(de!==y)return;s.value=[],l.value=-1,f.value=yn(U,n("Folder not found"))}finally{de===y&&(u.value=!1)}};let O=null;const T=J=>{O&&clearTimeout(O),O=setTimeout(()=>A(J),150)},A=J=>{const j=J.trim();if(!j){y++,u.value=!1,x();return}const{hasProtocol:de,parent:U,filter:ee}=m(j);if(!de){y++,u.value=!1,b(j);return}S(U,ee)};He(o,J=>T(J)),xt(()=>{x(),gt(()=>p.value?.focus())});const M=()=>{gt(()=>{const J=v.value;if(!J)return;const j=J.children[l.value];if(!j)return;const de=J.scrollTop,U=de+J.clientHeight,ee=j.offsetTop,Q=ee+j.offsetHeight;ee<de?J.scrollTop=ee:Q>U&&(J.scrollTop=Q-J.clientHeight)})},z=J=>{if(!s.value.length)return;const j=s.value.length;l.value=((l.value+J)%j+j)%j,M()},Y=J=>{o.value=J.kind==="dir"?`${J.path}/`:J.path,gt(()=>{p.value?.setSelectionRange(o.value.length,o.value.length)})},ve=J=>{if(!J.includes("://"))return{ok:!1,reason:n("Invalid path format. Path must be in format: storage://path/to/folder")};const j=J.slice(0,J.indexOf("://"));return g.value.includes(j)?{ok:!0}:{ok:!1,reason:n('Invalid storage. Storage "%s" is not available.',j)}},W=async J=>{if(d.value)return;const j=J.trim();if(!j)return;const de=ve(j);if(!de.ok){f.value=de.reason??"";return}d.value=!0;try{if(await t.adapter.open(j)===void 0)return;dJ(j),t.modal.close()}catch(U){f.value=yn(U,n("Failed to navigate to folder")),r.setLoading(!1)}finally{d.value=!1}},X=()=>{const J=s.value[l.value];W(J?J.path:o.value)},K=J=>{if(!s.value.length)return;J.preventDefault();const j=s.value[l.value];j&&Y(j)},L=J=>{if(J.kind==="dir"){Y(J);return}W(J.path)},D=J=>{W(J.path)},ne=(J,j)=>{J.stopPropagation(),J.preventDefault(),fJ(j),x()},le=(J,j)=>{J.stopPropagation(),J.preventDefault(),o.value=j,gt(()=>{p.value?.focus(),p.value?.setSelectionRange(o.value.length,o.value.length)})},je=se(()=>{const J=g.value[0];return J?`${J}://path/to/folder`:"storage://path/to/folder"});return(J,j)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:d.value,onClick:X},q(w(n)("Go")),9,CJ),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:j[3]||(j[3]=de=>w(t).modal.close())},q(w(n)("Cancel")),1)]),default:Le(()=>[_("div",pJ,[Z(xr,{icon:w(td),title:w(n)("Go to Folder")},null,8,["icon","title"]),_("div",hJ,[Ct(_("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":j[0]||(j[0]=de=>o.value=de),class:"vuefinder__go-to-folder-modal__input",type:"text",autocomplete:"off",spellcheck:"false",placeholder:je.value,onKeydown:[j[1]||(j[1]=Lr(ht(de=>z(1),["prevent"]),["down"])),j[2]||(j[2]=Lr(ht(de=>z(-1),["prevent"]),["up"])),Lr(ht(X,["prevent"]),["enter"]),Lr(K,["tab"])]},null,40,mJ),[[oi,o.value]]),f.value?(C(),R("div",vJ,q(f.value),1)):Se("",!0),s.value.length?(C(),R("div",{key:1,ref_key:"suggestionListRef",ref:v,class:"vuefinder__go-to-folder-modal__suggestions"},[(C(!0),R(We,null,ct(s.value,(de,U)=>(C(),R("div",{key:`${de.kind}:${de.path}`,class:Be(["vuefinder__go-to-folder-modal__suggestion",{"vuefinder__go-to-folder-modal__suggestion--active":U===l.value}]),onMouseenter:ee=>l.value=U,onClick:ee=>L(de),onDblclick:ee=>D(de)},[Z(w(ar),{class:"vuefinder__go-to-folder-modal__suggestion-icon"}),_("span",_J,q(de.label),1),de.kind==="recent"?(C(),R("span",yJ,q(w(n)("Recent")),1)):Se("",!0),de.kind==="recent"?(C(),R("button",{key:1,type:"button",class:"vuefinder__go-to-folder-modal__suggestion-fill",title:w(n)("Edit this path"),onClick:ee=>le(ee,de.path)},[Z(w(i2),{class:"vuefinder__go-to-folder-modal__suggestion-fill-icon"})],8,bJ)):Se("",!0),de.kind==="recent"?(C(),R("button",{key:2,type:"button",class:"vuefinder__go-to-folder-modal__suggestion-remove",title:w(n)("Remove from recent"),onClick:ee=>ne(ee,de.path)}," × ",8,wJ)):Se("",!0)],42,gJ))),128))],512)):u.value?Se("",!0):(C(),R("div",EJ,[o.value.trim()?(C(),R(We,{key:1},[Et(q(w(n)("No matching folders.")),1)],64)):(C(),R(We,{key:0},[Et(q(w(n)("No recent folders yet.")),1)],64))])),u.value?(C(),R("div",SJ,q(w(n)("Loading…")),1)):Se("",!0)])])]),_:1}))}}),TJ={class:"vuefinder__menubar__container"},kJ=["onClick","onMouseenter"],OJ={class:"vuefinder__menubar__label"},$J=["onMouseenter"],AJ=["onClick"],RJ={key:0,class:"vuefinder__menubar__dropdown__label"},PJ={key:1,class:"vuefinder__menubar__dropdown__checkmark"},IJ={key:2,class:"vuefinder__menubar__dropdown__chevron",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},MJ={key:3,class:"vuefinder__menubar__dropdown__submenu"},DJ=["onClick"],FJ={class:"vuefinder__menubar__dropdown__label"},LJ=ze({__name:"MenuBar",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t?.i18n||{t:S=>S},i=t?.fs,o=t?.config,s=Qe(o.state),l=Qe(i.selectedItems),u=Qe(i?.storages||[]),d=re(null),f=re(!1),p=se(()=>window.opener!==null||window.name!==""||window.history.length<=1),v=se(()=>[{id:"file",label:r("File"),items:[{id:"new-folder",label:r("New Folder"),action:()=>t?.modal?.open(Jm,{items:l.value}),hidden:()=>!n("newfolder")},{id:"new-file",label:r("New File"),action:()=>t?.modal?.open(e2,{items:l.value}),hidden:()=>!n("newfile")},{type:"separator",hidden:()=>!n("newfolder")&&!n("newfile")||!n("upload")},{id:"upload",label:r("Upload"),action:()=>t?.modal?.open(Zm,{items:l.value}),hidden:()=>!n("upload")},{type:"separator",hidden:()=>!n("search")},{id:"search",label:r("Search"),action:()=>t.modal.open(Xm),hidden:()=>!n("search")},{type:"separator",hidden:()=>!n("archive")&&!n("unarchive")},{id:"archive",label:r("Archive"),action:()=>{l.value.length>0&&t?.modal?.open(tv,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!n("archive")},{id:"unarchive",label:r("Unarchive"),action:()=>{l.value.length===1&&l.value[0]?.mime_type==="application/zip"&&t?.modal?.open(ev,{items:l.value})},enabled:()=>l.value.length===1&&l.value[0]?.mime_type==="application/zip",hidden:()=>!n("unarchive")},{type:"separator",hidden:()=>!n("preview")},{id:"preview",label:r("Preview"),action:()=>{l.value.length===1&&l.value[0]?.type!=="dir"&&t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0]})},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!n("preview")},{id:"open-as",label:r("Preview as"),items:[{id:"open-as-text",label:r("Text"),action:()=>t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0],forceType:"text"}),enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{id:"open-as-image",label:r("Image"),action:()=>t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0],forceType:"image"}),enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"}],enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!n("preview")},...p.value?[{type:"separator"},{id:"exit",label:r("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:r("Edit"),items:[...t?.selectionMode==="multiple"?[{id:"select-all",label:r("Select All"),action:()=>i?.selectAll(t?.selectionMode||"multiple",t),enabled:()=>!0},{id:"deselect",label:r("Deselect All"),action:()=>i?.clearSelection(),enabled:()=>l.value.length>0},{type:"separator"}]:[],...n("copy")?[{id:"cut",label:r("Cut"),action:()=>{l.value.length>0&&i?.setClipboard("cut",new Set(l.value.map(S=>Jt(S))))},enabled:()=>l.value.length>0},{id:"copy",label:r("Copy"),action:()=>{l.value.length>0&&i?.setClipboard("copy",new Set(l.value.map(S=>Jt(S))))},enabled:()=>l.value.length>0},{id:"paste",label:r("Paste"),action:()=>{const S=i?.getClipboard();S?.items?.size>0&&t?.modal?.open(S.type==="cut"?Xs:Gm,{items:{from:Array.from(S.items),to:i?.path?.get()}})},enabled:()=>i?.getClipboard()?.items?.size>0}]:[],...n("move")?[{id:"move",label:r("Move files"),action:()=>{if(l.value.length>0){const S=t?.fs,O={storage:S?.path?.get()?.storage||"",path:S?.path?.get()?.path||"",type:"dir"};t?.modal?.open(Xs,{items:{from:l.value,to:O}})}},enabled:()=>l.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:r("Copy Path"),action:async()=>{if(l.value.length===1){const S=l.value[0];await Xa(S.path)}else{const S=i?.path?.get();S?.path&&await Xa(S.path)}},enabled:()=>!0},{id:"copy-download-url",label:r("Copy Download URL"),action:async()=>{if(l.value.length===1){const S=l.value[0];i?.path?.get()?.storage;const O=t?.adapter?.getDownloadUrl({path:S.path});O&&await FG(O)}},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!n("rename")&&!n("delete")},{id:"rename",label:r("Rename"),action:()=>{l.value.length===1&&t?.modal?.open(Jc,{items:l.value})},enabled:()=>l.value.length===1,hidden:()=>!n("rename")},{id:"delete",label:r("Delete"),action:()=>{l.value.length>0&&t?.modal?.open(Xc,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!n("delete")}]},{id:"view",label:r("View"),items:[{id:"refresh",label:r("Refresh"),action:()=>{t.adapter.invalidateListQuery(i.path.get().path),t.adapter.open(i.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:r("Grid View"),action:()=>o?.set("view","grid"),enabled:()=>!0,checked:()=>s.value?.view==="grid"},{id:"list-view",label:r("List View"),action:()=>o?.set("view","list"),enabled:()=>!0,checked:()=>s.value?.view==="list"},{type:"separator"},{id:"tree-view",label:r("Tree View"),action:()=>o?.toggle("showTreeView"),enabled:()=>!0,checked:()=>s.value?.showTreeView},{id:"thumbnails",label:r("Show Thumbnails"),action:()=>o?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>s.value?.showThumbnails},{id:"show-hidden-files",label:r("Show Hidden Files"),action:()=>o?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>s.value?.showHiddenFiles},{type:"separator",hidden:()=>!n("fullscreen")},{id:"fullscreen",label:r("Full Screen"),action:()=>o?.toggle("fullScreen"),enabled:()=>n("fullscreen"),checked:()=>s.value?.fullScreen,hidden:()=>!n("fullscreen")},{type:"separator"},{id:"persist-path",label:r("Persist Path"),action:()=>{o?.toggle("persist"),t.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>s.value?.persist},{id:"metric-units",label:r("Metric Units"),action:()=>{o?.toggle("metricUnits"),t.filesize=o?.get("metricUnits")?DC:Bm,t.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>s.value?.metricUnits}]},{id:"go",label:r("Go"),items:[...n("history")?[{id:"forward",label:r("Forward"),action:()=>{i?.goForward();const S=i?.path?.get();S?.path&&t?.adapter.open(S.path)},enabled:()=>i?.canGoForward?.get()??!1},{id:"back",label:r("Back"),action:()=>{i?.goBack();const S=i?.path?.get();S?.path&&t?.adapter.open(S.path)},enabled:()=>i?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:r("Open containing folder"),action:()=>{const S=i?.path?.get();if(S?.breadcrumb&&S.breadcrumb.length>1){const O=S.breadcrumb[S.breadcrumb.length-2]?.path??`${S.storage}://`;t?.adapter.open(O)}},enabled:()=>{const S=i?.path?.get();return S?.breadcrumb&&S.breadcrumb.length>1}},{type:"separator"},...(u.value||[]).map(S=>({id:`storage-${S}`,label:S,action:()=>{const O=`${S}://`;t?.adapter.open(O)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:r("Go to Folder"),action:()=>t?.modal?.open(xJ),enabled:()=>!0}]},{id:"help",label:r("Help"),items:[{id:"settings",label:r("Settings"),action:()=>t?.modal?.open(XC),enabled:()=>!0},{id:"shortcuts",label:r("Shortcuts"),action:()=>t?.modal?.open(lJ),enabled:()=>!0},{id:"about",label:r("About"),action:()=>t?.modal?.open(UC),enabled:()=>!0}]}]),y=S=>{d.value===S?m():(d.value=S,f.value=!0)},g=S=>{f.value&&(d.value=S)},m=()=>{d.value=null,f.value=!1},b=S=>{m(),S()},x=S=>{S.target.closest(".vuefinder__menubar")||m()};return xt(()=>{document.addEventListener("click",x)}),xn(()=>{document.removeEventListener("click",x)}),(S,O)=>(C(),R("div",{class:"vuefinder__menubar",onClick:O[0]||(O[0]=ht(()=>{},["stop"]))},[_("div",TJ,[(C(!0),R(We,null,ct(v.value,T=>(C(),R("div",{key:T.id,class:Be(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":d.value===T.id}]),onClick:A=>y(T.id),onMouseenter:A=>g(T.id)},[_("span",OJ,q(T.label),1),d.value===T.id?(C(),R("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:A=>g(T.id)},[(C(!0),R(We,null,ct(T.items,A=>(C(),R("div",{key:A.id||A.type,class:Be(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":A.type==="separator","vuefinder__menubar__dropdown__item--disabled":A.enabled&&!A.enabled(),"vuefinder__menubar__dropdown__item--checked":A.checked&&A.checked(),"vuefinder__menubar__dropdown__item--hidden":A.hidden&&A.hidden(),"vuefinder__menubar__dropdown__item--has-children":A.items?.length}]),onClick:ht(M=>A.type!=="separator"&&!A.items?.length&&(!A.enabled||A.enabled())?b(A.action):null,["stop"])},[A.type!=="separator"?(C(),R("span",RJ,q(A.label),1)):Se("",!0),A.checked&&A.checked()?(C(),R("span",PJ," ✓ ")):Se("",!0),A.items?.length?(C(),R("svg",IJ,[...O[1]||(O[1]=[_("path",{d:"M6 4l4 4-4 4z"},null,-1)])])):Se("",!0),A.items?.length?(C(),R("div",MJ,[(C(!0),R(We,null,ct(A.items,M=>(C(),R("div",{key:M.id,class:Be(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--disabled":M.enabled&&!M.enabled()}]),onClick:ht(z=>!M.enabled||M.enabled()?b(M.action):null,["stop"])},[_("span",FJ,q(M.label),1)],10,DJ))),128))])):Se("",!0)],10,AJ))),128))],40,$J)):Se("",!0)],42,kJ))),128))])]))}}),jJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function UJ(e,t){return C(),R("svg",jJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1)])])}const NJ={render:UJ},zJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function BJ(e,t){return C(),R("svg",zJ,[...t[0]||(t[0]=[_("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1)])])}const VJ={render:BJ},HJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function qJ(e,t){return C(),R("svg",HJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1)])])}const WJ={render:qJ},YJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function KJ(e,t){return C(),R("svg",YJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1)])])}const GJ={render:KJ},QJ={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function XJ(e,t){return C(),R("svg",QJ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586z"},null,-1)])])}const JJ={render:XJ},ZJ={class:"vuefinder__toolbar"},eZ={class:"vuefinder__toolbar__actions"},tZ=["title"],nZ=["title"],rZ=["title"],iZ=["title"],oZ=["title"],sZ=["title"],aZ=["title"],lZ={class:"vuefinder__toolbar__controls"},uZ=["title"],cZ={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},dZ=["title"],fZ={class:"relative"},pZ={key:0,class:"vuefinder__toolbar__filter-indicator"},hZ={key:0,class:"vuefinder__toolbar__dropdown"},mZ={class:"vuefinder__toolbar__dropdown-content"},vZ={class:"vuefinder__toolbar__dropdown-section"},gZ={class:"vuefinder__toolbar__dropdown-label"},_Z={class:"vuefinder__toolbar__dropdown-row"},yZ={value:"name"},bZ={value:"size"},wZ={value:"modified"},EZ={value:""},SZ={value:"asc"},CZ={value:"desc"},xZ={class:"vuefinder__toolbar__dropdown-section"},TZ={class:"vuefinder__toolbar__dropdown-label"},kZ={class:"vuefinder__toolbar__dropdown-options"},OZ={class:"vuefinder__toolbar__dropdown-option"},$Z={class:"vuefinder__toolbar__option-text"},AZ={class:"vuefinder__toolbar__dropdown-option"},RZ={class:"vuefinder__toolbar__option-text"},PZ={class:"vuefinder__toolbar__dropdown-option"},IZ={class:"vuefinder__toolbar__option-text"},MZ={class:"vuefinder__toolbar__dropdown-toggle"},DZ={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},FZ={class:"vuefinder__toolbar__dropdown-reset"},LZ=["title"],jZ=["title"],UZ=ze({name:"VfToolbar",__name:"Toolbar",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,i=t.fs,o=t.config,s=Qe(o.state),l=Qe(i.selectedItems),u=Qe(i.sort),d=Qe(i.filter);He(()=>s.value.fullScreen,()=>{const b=document.querySelector("body");b&&(b.style.overflow=s.value.fullScreen?"hidden":"")},{immediate:!0});const f=re(!1),p=b=>{b.target.closest(".vuefinder__toolbar__dropdown-container")||(f.value=!1)};xt(()=>{const b=document.querySelector("body");b&&s.value.fullScreen&&setTimeout(()=>b.style.overflow="hidden"),document.addEventListener("click",p)}),xn(()=>{document.removeEventListener("click",p)});const v=re({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:s.value.showHiddenFiles});He(()=>v.value.sortBy,b=>{if(!v.value.sortOrder){i.clearSort();return}b==="name"?i.setSort("basename",v.value.sortOrder):b==="size"?i.setSort("file_size",v.value.sortOrder):b==="modified"&&i.setSort("last_modified",v.value.sortOrder)}),He(()=>v.value.sortOrder,b=>{if(!b){i.clearSort();return}v.value.sortBy==="name"?i.setSort("basename",b):v.value.sortBy==="size"?i.setSort("file_size",b):v.value.sortBy==="modified"&&i.setSort("last_modified",b)}),He(u,b=>{b.active?(b.column==="basename"?v.value.sortBy="name":b.column==="file_size"?v.value.sortBy="size":b.column==="last_modified"&&(v.value.sortBy="modified"),v.value.sortOrder=b.order):v.value.sortOrder=""},{immediate:!0}),He(()=>v.value.filterKind,b=>{i.setFilter(b,s.value.showHiddenFiles)}),He(()=>v.value.showHidden,b=>{o.set("showHiddenFiles",b),i.setFilter(v.value.filterKind,b)}),He(d,b=>{v.value.filterKind=b.kind},{immediate:!0}),He(()=>s.value.showHiddenFiles,b=>{v.value.showHidden=b,i.setFilter(v.value.filterKind,b)},{immediate:!0});const y=()=>o.set("view",s.value.view==="grid"?"list":"grid"),g=se(()=>d.value.kind!=="all"||!s.value.showHiddenFiles||u.value.active),m=()=>{v.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},o.set("showHiddenFiles",!0),i.clearSort(),i.clearFilter()};return(b,x)=>(C(),R("div",ZJ,[_("div",eZ,[w(n)("newfolder")?(C(),R("div",{key:0,class:"mx-1.5",title:w(r)("New Folder"),onClick:x[0]||(x[0]=S=>w(t).modal.open(Jm,{items:w(l)}))},[Z(w(JC))],8,tZ)):Se("",!0),w(n)("newfile")?(C(),R("div",{key:1,class:"mx-1.5",title:w(r)("New File"),onClick:x[1]||(x[1]=S=>w(t).modal.open(e2,{items:w(l)}))},[Z(w(ZC))],8,nZ)):Se("",!0),w(n)("rename")?(C(),R("div",{key:2,class:"mx-1.5",title:w(r)("Rename"),onClick:x[2]||(x[2]=S=>w(l).length!==1||w(t).modal.open(Jc,{items:w(l)}))},[Z(w(zC),{class:Be(w(l).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,rZ)):Se("",!0),w(n)("delete")?(C(),R("div",{key:3,class:"mx-1.5",title:w(r)("Delete"),onClick:x[3]||(x[3]=S=>!w(l).length||w(t).modal.open(Xc,{items:w(l)}))},[Z(w(NC),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,iZ)):Se("",!0),w(n)("upload")?(C(),R("div",{key:4,class:"mx-1.5",title:w(r)("Upload"),onClick:x[4]||(x[4]=S=>w(t).modal.open(Zm,{items:w(l)}))},[Z(w(t2))],8,oZ)):Se("",!0),w(n)("unarchive")&&w(l).length===1&&w(l)[0].mime_type==="application/zip"?(C(),R("div",{key:5,class:"mx-1.5",title:w(r)("Unarchive"),onClick:x[5]||(x[5]=S=>!w(l).length||w(t).modal.open(ev,{items:w(l)}))},[Z(w(n2),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,sZ)):Se("",!0),w(n)("archive")?(C(),R("div",{key:6,class:"mx-1.5",title:w(r)("Archive"),onClick:x[6]||(x[6]=S=>!w(l).length||w(t).modal.open(tv,{items:w(l)}))},[Z(w(r2),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,aZ)):Se("",!0)]),_("div",lZ,[w(n)("search")?(C(),R("div",{key:0,class:"mx-1.5",title:w(r)("Search Files"),onClick:x[7]||(x[7]=S=>w(t).modal.open(Xm))},[Z(w(Qm),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,uZ)):Se("",!0),_("div",cZ,[_("div",{title:w(r)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:x[8]||(x[8]=S=>f.value=!f.value)},[_("div",fZ,[Z(w(JJ),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),g.value?(C(),R("div",pZ)):Se("",!0)])],8,dZ),f.value?(C(),R("div",hZ,[_("div",mZ,[_("div",vZ,[_("div",gZ,q(w(r)("Sorting")),1),_("div",_Z,[Ct(_("select",{"onUpdate:modelValue":x[9]||(x[9]=S=>v.value.sortBy=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",yZ,q(w(r)("Name")),1),_("option",bZ,q(w(r)("Size")),1),_("option",wZ,q(w(r)("Date")),1)],512),[[Op,v.value.sortBy]]),Ct(_("select",{"onUpdate:modelValue":x[10]||(x[10]=S=>v.value.sortOrder=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",EZ,q(w(r)("None")),1),_("option",SZ,q(w(r)("Asc")),1),_("option",CZ,q(w(r)("Desc")),1)],512),[[Op,v.value.sortOrder]])])]),_("div",xZ,[_("div",TZ,q(w(r)("Show")),1),_("div",kZ,[_("label",OZ,[Ct(_("input",{"onUpdate:modelValue":x[11]||(x[11]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[Cf,v.value.filterKind]]),_("span",$Z,q(w(r)("All items")),1)]),_("label",AZ,[Ct(_("input",{"onUpdate:modelValue":x[12]||(x[12]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[Cf,v.value.filterKind]]),_("span",RZ,q(w(r)("Files only")),1)]),_("label",PZ,[Ct(_("input",{"onUpdate:modelValue":x[13]||(x[13]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[Cf,v.value.filterKind]]),_("span",IZ,q(w(r)("Folders only")),1)])])]),_("div",MZ,[_("label",DZ,q(w(r)("Show hidden files")),1),Ct(_("input",{id:"showHidden","onUpdate:modelValue":x[14]||(x[14]=S=>v.value.showHidden=S),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[Zs,v.value.showHidden]])]),_("div",FZ,[_("button",{class:"vuefinder__toolbar__reset-button",onClick:m},q(w(r)("Reset")),1)])])])):Se("",!0)]),w(n)("fullscreen")?(C(),R("div",{key:1,class:"mx-1.5",title:w(r)("Toggle Full Screen"),onClick:x[15]||(x[15]=S=>w(o).toggle("fullScreen"))},[w(s).fullScreen?(C(),Ee(w(VJ),{key:0,class:"vf-toolbar-icon"})):(C(),Ee(w(NJ),{key:1,class:"vf-toolbar-icon"}))],8,LZ)):Se("",!0),_("div",{class:"mx-1.5",title:w(r)("Change View"),onClick:x[16]||(x[16]=S=>y())},[w(s).view==="grid"?(C(),Ee(w(WJ),{key:0,class:"vf-toolbar-icon"})):Se("",!0),w(s).view==="list"?(C(),Ee(w(GJ),{key:1,class:"vf-toolbar-icon"})):Se("",!0)],8,jZ)])]))}}),NZ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function zZ(e,t){return C(),R("svg",NZ,[...t[0]||(t[0]=[_("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1)])])}const BZ={render:zZ},VZ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function HZ(e,t){return C(),R("svg",VZ,[...t[0]||(t[0]=[_("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1)])])}const qZ={render:HZ},WZ={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"};function YZ(e,t){return C(),R("svg",WZ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const KZ={render:YZ},GZ={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function QZ(e,t){return C(),R("svg",GZ,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const XZ={render:QZ},JZ={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function ZZ(e,t){return C(),R("svg",JZ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0-4-4m4 4-4 4m0 6H4m0 0 4 4m-4-4 4-4"},null,-1)])])}const eee={render:ZZ};function hl(e,t=[]){const n="vfDragEnterCounter",r=e.fs,i=Qe(r.selectedItems);function o(p,v){return!!(!p||p.type!=="dir"||p.path===v||p.path.startsWith(`${v}/`)||i.value.some(y=>y.path===v?!1:!!(p.path===y.path||p.path.startsWith(`${y.path}/`))))}function s(p,v){if(p.isExternalDrag)return;if(!(e.features?.move??!1)){p.dataTransfer&&(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none");return}p.preventDefault();const y=r.getDraggedItem(),g=r.sortedFiles.get().find(m=>Jt(m)===y)?.path??"";o(v,g)?p.dataTransfer&&(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none"):(p.dataTransfer&&(p.dataTransfer.dropEffect="copy",p.dataTransfer.effectAllowed="all"),p.currentTarget.classList.add(...t))}function l(p){if(p.isExternalDrag||!(e.features?.move??!1))return;p.preventDefault();const v=p.currentTarget,y=Number(v.dataset[n]||0);v.dataset[n]=String(y+1)}function u(p){if(p.isExternalDrag||!(e.features?.move??!1))return;p.preventDefault();const v=p.currentTarget,y=Number(v.dataset[n]||0)-1;y<=0?(delete v.dataset[n],v.classList.remove(...t)):v.dataset[n]=String(y)}function d(p,v){if(p.isExternalDrag||!(e.features?.move??!1)||!v)return;p.preventDefault();const y=p.currentTarget;delete y.dataset[n],y.classList.remove(...t);const g=p.dataTransfer?.getData("items")||"[]",m=JSON.parse(g).map(b=>r.sortedFiles.get().find(x=>Jt(x)===b)).filter(b=>!!b);r.clearDraggedItem(),e.modal.open(Xs,{items:{from:m,to:v}})}function f(p){return{dragover:v=>s(v,p),dragenter:l,dragleave:u,drop:v=>d(v,p)}}return{events:f}}const tee={class:"vuefinder__breadcrumb__container"},nee=["title"],ree=["title"],iee=["title"],oee=["title"],see={class:"vuefinder__breadcrumb__path-container"},aee={class:"vuefinder__breadcrumb__list"},lee={key:0,class:"vuefinder__breadcrumb__hidden-list"},uee={class:"relative"},cee=["title","onClick"],dee=["title"],fee={class:"vuefinder__breadcrumb__path-mode"},pee={class:"vuefinder__breadcrumb__path-mode-content"},hee=["title"],mee={class:"vuefinder__breadcrumb__path-text"},vee=["title"],gee=["data-theme"],_ee=["onClick"],yee={class:"vuefinder__breadcrumb__hidden-item-content"},bee={class:"vuefinder__breadcrumb__hidden-item-text"},ka=5,G0=1,wee=40,Eee=ze({__name:"Breadcrumb",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=t.config,s=Qe(o.state),l=Qe(i.path),u=Qe(i.loading),d=re(null),f=YC(0,100),p=re(5),v=re(!1),y=re(!1),g=se(()=>l.value?.breadcrumb??[]),m=new Map;function b(U,ee){return U.length>ee?[U.slice(-ee),U.slice(0,-ee)]:[U,[]]}const x=se(()=>b(g.value,p.value)[0]),S=se(()=>b(g.value,p.value)[1]);function O(){const U=g.value,ee=f.value;if(!U.length||ee<=0)return null;let Q=0,B=0;for(let oe=U.length-1;oe>=0;oe--){const V=U[oe]?.name;if(!V)continue;const P=m.get(V);if(P===void 0)return null;if(Q+P>ee-wee||(Q+=P,B++,B>=ka))break}return B<G0&&(B=G0),B>ka&&(B=ka),B}function T(){if(!d.value)return;const U=d.value.children,ee=x.value;for(let Q=0;Q<U.length;Q++){const B=ee[Q]?.name;if(!B)continue;const oe=U[Q].offsetWidth;oe>0&&m.set(B,oe)}}async function A(){if(!g.value.length){p.value=ka;return}const U=O();if(U!==null){p.value=U;return}p.value=ka,await gt(),T();const ee=O();ee!==null&&(p.value=ee)}He(f,A),He(g,A,{immediate:!0});const M=()=>{d.value&&(f.value=d.value.offsetWidth)},z=re(null);xt(()=>{z.value=new ResizeObserver(M),d.value&&z.value.observe(d.value)}),xn(()=>{z.value&&z.value.disconnect()});const Y=hl(t,["vuefinder__drag-over"]);function ve(U=null){U??=g.value.length-2;const ee={basename:l.value?.storage??"local",extension:"",path:(l.value?.storage??"local")+"://",storage:l.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return g.value[U]??ee}const W=()=>{t.adapter.invalidateListQuery(l.value.path),t.adapter.open(l.value.path)},X=()=>{x.value.length>0&&t.adapter.open(g.value[g.value.length-2]?.path??(l.value?.storage??"local")+"://")},K=U=>{t.adapter.open(U.path),v.value=!1},L=()=>{v.value&&(v.value=!1)},D={mounted(U,ee){U.clickOutsideEvent=function(Q){U===Q.target||U.contains(Q.target)||ee.value()},document.body.addEventListener("click",U.clickOutsideEvent)},beforeUnmount(U){document.body.removeEventListener("click",U.clickOutsideEvent)}},ne=()=>{o.toggle("showTreeView")},le=re({x:0,y:0}),je=(U,ee=null)=>{if(U.currentTarget instanceof HTMLElement){const{x:Q,y:B,height:oe}=U.currentTarget.getBoundingClientRect();le.value={x:Q,y:B+oe}}v.value=ee??!v.value},J=()=>{y.value=!y.value},j=async()=>{await Xa(l.value?.path||""),n.success(r("Path copied to clipboard"))},de=()=>{y.value=!1};return(U,ee)=>(C(),R("div",tee,[_("span",{title:w(r)("Toggle Tree View")},[Z(w(XZ),{class:Be(["vuefinder__breadcrumb__toggle-tree",w(s).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:ne},null,8,["class"])],8,nee),_("span",{title:w(r)("Go up a directory")},[Z(w(i2),Ot({class:g.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},ni(g.value.length?w(Y).events(ve()):{}),{onClick:X}),null,16,["class"])],8,ree),w(i).isLoading()?(C(),R("span",{key:1,title:w(r)("Cancel")},[Z(w(BC),{onClick:ee[0]||(ee[0]=Q=>w(t).emitter.emit("vf-fetch-abort"))})],8,oee)):(C(),R("span",{key:0,title:w(r)("Refresh")},[Z(w(BZ),{onClick:W})],8,iee)),Ct(_("div",see,[_("div",null,[Z(w(qZ),Ot({class:"vuefinder__breadcrumb__home-icon"},ni(w(Y).events(ve(-1))),{onClick:ee[1]||(ee[1]=ht(Q=>w(t).adapter.open(w(l).storage+"://"),["stop"]))}),null,16)]),_("div",aee,[S.value.length?Ct((C(),R("div",lee,[ee[3]||(ee[3]=_("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("div",uee,[_("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:ee[2]||(ee[2]=Q=>je(Q,!0)),onClick:ht(je,["stop"])},[Z(w(QC),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[D,L]]):Se("",!0)]),_("div",{ref_key:"breadcrumbContainer",ref:d,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(C(!0),R(We,null,ct(x.value,(Q,B)=>(C(),R("div",{key:B},[ee[4]||(ee[4]=_("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("span",Ot({class:"vuefinder__breadcrumb__item pointer-events-auto",title:Q.basename},ni(w(Y).events(Q),!0),{onClick:ht(oe=>w(t).adapter.open(Q.path),["stop"])}),q(Q.name),17,cee)]))),128))],512),w(o).get("loadingIndicator")==="circular"&&w(u)?(C(),Ee(w(nd),{key:0})):Se("",!0),_("span",{title:w(r)("Toggle Path Copy Mode"),onClick:J},[Z(w(eee),{class:"vuefinder__breadcrumb__toggle-icon"})],8,dee)],512),[[Nr,!y.value]]),Ct(_("div",fee,[_("div",pee,[_("div",{title:w(r)("Copy Path")},[Z(w(Ym),{class:"vuefinder__breadcrumb__copy-icon",onClick:j})],8,hee),_("div",mee,q(w(l).path),1),_("div",{title:w(r)("Exit")},[Z(w(KZ),{class:"vuefinder__breadcrumb__exit-icon",onClick:de})],8,vee)])],512),[[Nr,y.value]]),(C(),Ee(el,{to:"body"},[_("div",null,[Ct(_("div",{style:an({position:"absolute",top:le.value.y+"px",left:le.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":w(t).theme.current},[(C(!0),R(We,null,ct(S.value,(Q,B)=>(C(),R("div",Ot({key:B,class:"vuefinder__breadcrumb__hidden-item"},ni(w(Y).events(Q),!0),{onClick:oe=>K(Q)}),[_("div",yee,[_("span",null,[Z(w(ar),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),_("span",bee,q(Q.name),1)])],16,_ee))),128))],12,gee),[[Nr,v.value]])])]))]))}}),See={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Cee(e,t){return C(),R("svg",See,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const Q0={render:Cee},xee={class:"vuefinder__drag-item__container"},Tee={class:"vuefinder__drag-item__count"},kee=ze({__name:"DragItem",props:{count:{}},setup(e){const t=e;return(n,r)=>(C(),R("div",xee,[t.count>1?(C(),Ee(w(Q0),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):Se("",!0),Z(w(Q0),{class:"vuefinder__drag-item__icon"}),_("div",Tee,q(t.count),1)]))}}),Oee={key:2,class:"vuefinder__item-icon__extension"},X0=ze({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(e){const t=e,n=rt(),r=Qe(n.config.state),i=se(()=>t.small!==void 0?t.small?"small":"large":t.view==="list"?"small":"large"),o=se(()=>{const l=i.value,u=r.value?.listIconSize,d=r.value?.gridIconSize;return r.value?.gridItemWidth,r.value?.gridItemHeight,t.view==="list"||l==="small"?{"--vf-icon-size":`${u??16}px`}:{"--vf-icon-size":`${d??48}px`}}),s={app:n,config:r.value,item:t.item,view:t.view};return(l,u)=>(C(),R("div",{class:Be(["vuefinder__item-icon",{"vuefinder__item-icon--small":i.value==="small","vuefinder__item-icon--large":i.value==="large","vuefinder__item-icon--grid":e.view==="grid","vuefinder__item-icon--list":e.view==="list"}]),style:an(o.value)},[mt(l.$slots,"icon",ii(Vi(s)),()=>[e.item.type==="dir"?(C(),Ee(w(ar),{key:0,class:"vuefinder__item-icon__folder"})):(C(),Ee(w(Ga),{key:1,class:"vuefinder__item-icon__file"})),e.ext&&e.item.type!=="dir"&&e.item.extension?(C(),R("div",Oee,q(e.item.extension.substring(0,3)),1)):Se("",!0)])],6))}}),$ee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function Aee(e,t){return C(),R("svg",$ee,[...t[0]||(t[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3V7a5 5 0 0 1 5-5m0 12a2 2 0 0 0-1.995 1.85L10 16a2 2 0 1 0 2-2m0-10a3 3 0 0 0-3 3v3h6V7a3 3 0 0 0-3-3"},null,-1)])])}const J0={render:Aee},Ree=["data-key","data-row","data-col","draggable"],Pee={key:0},Iee={class:"vuefinder__explorer__item-grid-content"},Mee=["data-src","alt"],Dee={class:"vuefinder__explorer__item-title"},Fee={key:1,class:"vuefinder__explorer__item-list-content"},Lee={class:"vuefinder__explorer__item-list-name"},jee={class:"vuefinder__explorer__item-list-icon"},Uee={class:"vuefinder__explorer__item-name"},Nee={key:0,class:"vuefinder__explorer__item-path"},zee={key:1,class:"vuefinder__explorer__item-size"},Bee={key:0},Vee={key:2,class:"vuefinder__explorer__item-date"},Hee=ze({__name:"FileItem",props:{item:{},view:{},showThumbnails:{type:Boolean},isSelected:{type:Boolean},isDragging:{type:Boolean},rowIndex:{},colIndex:{},showPath:{type:Boolean},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,i=rt(),o=i.fs,s=i.config,l=se(()=>{const K=i.selectionFilterType;return!K||K==="both"?!0:K==="files"&&n.item.type==="file"||K==="dirs"&&n.item.type==="dir"}),u=se(()=>{const K=i.selectionFilterMimeIncludes;return!K||!K.length||n.item.type==="dir"?!0:n.item.mime_type?K.some(L=>n.item.mime_type?.startsWith(L)):!1}),d=se(()=>l.value&&u.value),f=se(()=>n.item.type==="dir"||d.value),p=se(()=>["file-item-"+n.explorerId,n.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",n.isSelected?"vf-explorer-selected":"",f.value?"":"vf-explorer-item--unselectable",f.value&&!d.value?"vf-explorer-item--no-select":""]),v=se(()=>({opacity:n.isDragging||o.isCut(Jt(n.item))||!f.value?.5:""})),y=re(null);let g=!1,m=null,b=null,x=!1;const{enabled:S}=fr(),O=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),T=se(()=>O?!1:S("move")),A=()=>{m&&(clearTimeout(m),m=null),b=null},M=K=>{A(),b=K,x=!1,K.stopPropagation(),m=setTimeout(()=>{!b||m===null||(x=!0,b.cancelable&&b.preventDefault(),b.stopPropagation(),r("contextmenu",b),A())},500)},z=K=>{if(x){K.preventDefault(),K.stopPropagation(),A();return}setTimeout(()=>{x||(A(),X(K))},100)},Y=K=>{if(!b)return;const L=b.touches[0]||b.changedTouches[0],D=K.touches[0]||K.changedTouches[0];if(L&&D){const ne=Math.abs(D.clientX-L.clientX),le=Math.abs(D.clientY-L.clientY);(ne>15||le>15)&&A()}},ve=K=>{O&&K.type!=="click"||r("click",K)},W=K=>{if(x)return K.preventDefault(),K.stopPropagation(),!1;r("dragstart",K)},X=K=>{if(!g)g=!0,r("click",K),y.value=setTimeout(()=>{g=!1},300);else return g=!1,r("dblclick",K),!1};return(K,L)=>(C(),R("div",{class:Be(p.value),style:an(v.value),"data-key":w(Jt)(e.item),"data-row":e.rowIndex,"data-col":e.colIndex,draggable:T.value,onTouchstartCapture:L[1]||(L[1]=D=>M(D)),onTouchendCapture:L[2]||(L[2]=D=>z(D)),onTouchmoveCapture:Y,onTouchcancelCapture:L[3]||(L[3]=()=>A()),onClick:ve,onDblclick:L[4]||(L[4]=D=>r("dblclick",D)),onContextmenu:L[5]||(L[5]=ht(D=>r("contextmenu",D),["prevent","stop"])),onDragstart:W,onDragend:L[6]||(L[6]=D=>r("dragend",D))},[e.view==="grid"?(C(),R("div",Pee,[w(o).isReadOnly(e.item)?(C(),Ee(w(J0),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):Se("",!0),_("div",Iee,[(e.item.mime_type??"").startsWith("image")&&e.showThumbnails?(C(),R("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":e.item.previewUrl??w(i).adapter.getPreviewUrl({path:e.item.path}),alt:e.item.basename,onTouchstart:L[0]||(L[0]=D=>D.preventDefault())},null,40,Mee)):(C(),Ee(X0,{key:1,item:e.item,ext:!0,view:e.view},{icon:Le(D=>[mt(K.$slots,"icon",ii(Vi(D)))]),_:3},8,["item","view"]))]),_("span",Dee,q(w(Ch)(e.item.basename)),1)])):(C(),R("div",Fee,[_("div",Lee,[_("div",jee,[Z(X0,{item:e.item,view:e.view},{icon:Le(D=>[mt(K.$slots,"icon",ii(Vi(D)))]),_:3},8,["item","view"])]),_("span",Uee,q(e.item.basename),1),_("div",null,[w(o).isReadOnly(e.item)?(C(),Ee(w(J0),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):Se("",!0)])]),e.showPath?(C(),R("div",Nee,q(e.item.path),1)):Se("",!0),e.showPath?Se("",!0):(C(),R("div",zee,[e.item.file_size?(C(),R("div",Bee,q(w(i).filesize(e.item.file_size)),1)):Se("",!0)])),!e.showPath&&e.item.last_modified?(C(),R("div",Vee,q(new Date(e.item.last_modified*1e3).toLocaleString()),1)):Se("",!0)])),w(S)("pinned")&&w(s).get("pinnedFolders").find(D=>D.path===e.item.path)?(C(),Ee(w(Qa),{key:2,class:"vuefinder__item--pinned"})):Se("",!0)],46,Ree))}}),qee=["data-row"],Z0=ze({__name:"FileRow",props:{rowIndex:{},rowHeight:{},view:{},itemsPerRow:{},items:{},showThumbnails:{type:Boolean},showPath:{type:Boolean},isDraggingItem:{type:Function},isSelected:{type:Function},dragNDropEvents:{type:Function},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,i=se(()=>[n.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),o=se(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${n.rowHeight}px`,transform:`translateY(${n.rowIndex*n.rowHeight}px)`})),s=se(()=>n.view==="grid"?{gridTemplateColumns:`repeat(${n.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(l,u)=>(C(),R("div",{class:Be(i.value),"data-row":e.rowIndex,style:an(o.value)},[_("div",{class:Be(["grid justify-self-start",{"w-full":e.view==="list"}]),style:an(s.value)},[(C(!0),R(We,null,ct(e.items,(d,f)=>(C(),Ee(Hee,Ot({key:w(Jt)(d),item:d,view:e.view,"show-thumbnails":e.showThumbnails,"show-path":e.showPath,"is-selected":e.isSelected(w(Jt)(d)),"is-dragging":e.isDraggingItem(w(Jt)(d)),"row-index":e.rowIndex,"col-index":f,"explorer-id":e.explorerId},ni(e.dragNDropEvents(d)),{onClick:u[0]||(u[0]=p=>r("click",p)),onDblclick:u[1]||(u[1]=p=>r("dblclick",p)),onContextmenu:u[2]||(u[2]=p=>r("contextmenu",p)),onDragstart:u[3]||(u[3]=p=>r("dragstart",p)),onDragend:u[4]||(u[4]=p=>r("dragend",p))}),{icon:Le(p=>[mt(l.$slots,"icon",Ot({ref_for:!0},p))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,qee))}}),Wee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Yee(e,t){return C(),R("svg",Wee,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1)])])}const Kee={render:Yee},Gee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Qee(e,t){return C(),R("svg",Gee,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1)])])}const Xee={render:Qee},Sp=ze({__name:"SortIcon",props:{direction:{}},setup(e){return(t,n)=>(C(),R("div",null,[e.direction==="asc"?(C(),Ee(w(Kee),{key:0,class:"vuefinder__explorer__sort-icon"})):Se("",!0),e.direction==="desc"?(C(),Ee(w(Xee),{key:1,class:"vuefinder__explorer__sort-icon"})):Se("",!0)]))}}),Jee={class:"vuefinder__explorer__header"},Zee=ze({__name:"ExplorerHeader",setup(e){const t=rt(),n=t.fs,{t:r}=t.i18n,i=Qe(n.sort);return(o,s)=>(C(),R("div",Jee,[_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:s[0]||(s[0]=l=>w(n).toggleSort("basename"))},[Et(q(w(r)("Name"))+" ",1),Ct(Z(Sp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="basename"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:s[1]||(s[1]=l=>w(n).toggleSort("file_size"))},[Et(q(w(r)("Size"))+" ",1),Ct(Z(Sp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="file_size"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:s[2]||(s[2]=l=>w(n).toggleSort("last_modified"))},[Et(q(w(r)("Date"))+" ",1),Ct(Z(Sp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="last_modified"]])])]))}});function ete(e,t){const{scrollContainer:n,itemWidth:r=100,rowHeight:i,overscan:o=2,containerPadding:s=48,lockItemsPerRow:l}=t,u=e,d=()=>typeof i=="number"?i:i.value,f=()=>r?typeof r=="number"?r:r.value:100,p=()=>s?typeof s=="number"?s:s.value:0,v=re(0),y=re(6),g=re(600);let m=null;const b=se(()=>Math.ceil(u.value.length/y.value)),x=se(()=>b.value*d()),S=se(()=>{const X=d(),K=Math.max(0,Math.floor(v.value/X)-o),L=Math.min(b.value,Math.ceil((v.value+g.value)/X)+o);return{start:K,end:L}}),O=se(()=>{const{start:X,end:K}=S.value;return Array.from({length:K-X},(L,D)=>X+D)}),T=()=>g.value,A=()=>typeof l=="object"?l.value:!1,M=()=>{if(A()){y.value=1;return}if(n.value){const X=p(),K=n.value.clientWidth-X,L=f();L>0&&(y.value=Math.max(Math.floor(K/L),2))}},z=X=>{const K=X.target;v.value=K.scrollTop};He(()=>u.value.length,()=>{M()}),r&&typeof r!="number"&&He(r,()=>{M()}),s&&typeof s!="number"&&He(s,()=>{M()}),i&&typeof i!="number"&&He(i,()=>{});const Y=(X,K)=>{if(!X||!Array.isArray(X))return[];const L=K*y.value;return X.slice(L,L+y.value)},ve=(X,K,L,D,ne)=>{if(!X||!Array.isArray(X))return[];const le=[];for(let je=K;je<=L;je++)for(let J=D;J<=ne;J++){const j=je*y.value+J;j<X.length&&X[j]&&le.push(X[j])}return le},W=X=>({row:Math.floor(X/y.value),col:X%y.value});return xt(async()=>{await gt(),n.value&&(g.value=n.value.clientHeight||600),M(),window.addEventListener("resize",()=>{n.value&&(g.value=n.value.clientHeight||600),M()}),n.value&&"ResizeObserver"in window&&(m=new ResizeObserver(X=>{const K=X[0];K&&(g.value=Math.round(K.contentRect.height)),M()}),m.observe(n.value))}),xn(()=>{window.removeEventListener("resize",M),m&&(m.disconnect(),m=null)}),{scrollTop:v,itemsPerRow:y,totalRows:b,totalHeight:x,visibleRange:S,visibleRows:O,updateItemsPerRow:M,handleScroll:z,getRowItems:Y,getItemsInRange:ve,getItemPosition:W,getContainerHeight:T}}function tte(e){const{itemsPerRow:t,totalHeight:n,getItemsInRange:r,getKey:i,selectionObject:o,rowHeight:s,itemWidth:l,osInstance:u}=e,d=()=>typeof l=="number"?l:l.value,f=Math.floor(Math.random()*2**32).toString(),p=rt(),v=p.fs,y=Qe(v.selectedKeys),g=Qe(v.sortedFiles),m=se(()=>{const J=new Map;return g.value&&g.value.forEach(j=>{J.set(i(j),j)}),J}),b=re(new Set),x=re(!1),S=re(!1),O=J=>J.map(j=>j.getAttribute("data-key")).filter(j=>!!j),T=J=>{J.selection.clearSelection(!0,!0)},A=J=>{if(y.value&&y.value.size>0){const j=document.querySelectorAll(`.file-item-${f}[data-key]`),de=new Map;j.forEach(ee=>{const Q=ee.getAttribute("data-key");Q&&de.set(Q,ee)});const U=[];y.value.forEach(ee=>{const Q=de.get(ee);Q&&M(ee)&&U.push(Q)}),U.forEach(ee=>{J.selection.select(ee,!0)})}},M=J=>{const j=m.value.get(J);if(!j)return!1;const de=p.selectionFilterType,U=p.selectionFilterMimeIncludes;return de==="files"&&j.type==="dir"||de==="dirs"&&j.type==="file"?!1:U&&Array.isArray(U)&&U.length>0?j.type==="dir"?!0:j.mime_type?U.some(ee=>j.mime_type?.startsWith(ee)):!1:!0},z=J=>{if(p.selectionMode==="single")return!1;x.value=!1,!J.event?.metaKey&&!J.event?.ctrlKey&&(S.value=!0),J.selection.resolveSelectables(),T(J),A(J)},Y=re(0),ve=({event:J,selection:j})=>{Y.value=(o.value?.getAreaLocation().y1??0)-(p.root.getBoundingClientRect().top??0);const de=document.querySelector(".selection-area-container");if(de&&(de.dataset.theme=p.theme.current),p.selectionMode==="single")return;const U=J;U&&"type"in U&&U.type==="touchend"&&U.preventDefault();const ee=J;!ee?.ctrlKey&&!ee?.metaKey&&(v.clearSelection(),j.clearSelection(!0,!0)),b.value.clear()},W=J=>{if(p.selectionMode==="single")return;const j=O(J.store.changed.added),de=O(J.store.changed.removed);S.value=!1,x.value=!0,j.forEach(U=>{y.value&&!y.value.has(U)&&M(U)&&(b.value.add(U),v.select(U,p.selectionMode||"multiple"))}),de.forEach(U=>{document.querySelector(`[data-key="${U}"]`)&&m.value.has(U)&&b.value.delete(U),v.deselect(U)}),J.selection.resolveSelectables(),A(J)},X=()=>{b.value.clear()},K=J=>{if(!J.event)return;const j=document.querySelector(".scroller-"+f);if(!j)return;const de=j.getBoundingClientRect(),U=de.left,ee=de.top;let Q=j.scrollTop;if(u?.value){const{viewport:Wt}=u.value.elements();Wt&&(Q=Wt.scrollTop)}const B=o.value?.getAreaLocation();if(!B)return;const oe=Math.min(B.x1,B.x2),V=Q+Math.min(B.y1,B.y2),P=Math.max(B.x1,B.x2),F=Q+Math.max(B.y1,B.y2),G=4,N=d();let ie=Math.floor((oe-U-G)/N),ge=Math.floor((P-U-G)/N);const fe=oe-U-G-ie*N,pe=P-U-G-ge*N;fe>N-G&&(ie=ie+1),pe<G&&(ge=ge-1);const Ce=Math.max(0,ie),$e=Math.min(t.value-1,ge);let Ke=Math.floor((V-ee-G)/s.value),Ne=Math.floor((F-ee-G)/s.value);const tt=V-ee-G-Ke*s.value,Ge=F-ee-G-Ne*s.value,Ze=Math.floor((n.value-G)/s.value);tt>s.value-G&&(Ke=Ke+1),Ge<G&&(Ne=Ne-1);const Pt=Math.max(0,Ke),St=Math.min(Ne,Ze),Nt=r(g.value,Pt,St,Ce,$e),It=document.querySelectorAll(`.file-item-${f}[data-key]`),qt=new Map;It.forEach(Wt=>{const nn=Wt.getAttribute("data-key");nn&&qt.set(nn,Wt)});const Gt=[];if(Nt.forEach(Wt=>{const nn=i(Wt);qt.get(nn)||Gt.push(nn)}),Gt.length>0){const Wt=p.selectionMode||"multiple";v.selectMultiple(Gt,Wt)}},L=J=>{K(J),T(J),A(J),v.setSelectedCount(y.value?.size||0),x.value=!1},D=()=>{let J=[".scroller-"+f];if(u?.value){const{viewport:j}=u.value.elements();j&&(J=j)}o.value=new k9({selectables:[".file-item-"+f+":not(.vf-explorer-item--unselectable):not(.vf-explorer-item--no-select)"],boundaries:J,selectionContainerClass:"selection-area-container",behaviour:{overlap:"invert",intersect:"touch",startThreshold:0,triggers:[0],scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:10}}},features:{touch:!0,range:!0,deselectOnBlur:!0,singleTap:{allow:!1,intersect:"native"}}}),o.value.on("beforestart",z),o.value.on("start",ve),o.value.on("move",W),o.value.on("stop",L)},ne=()=>{o.value&&(o.value.destroy(),o.value=null)},le=()=>{o.value&&(Array.from(y.value??new Set).forEach(J=>{M(J)||v.deselect(J)}),ne(),D())},je=J=>{S.value&&(o.value?.clearSelection(),X(),S.value=!1);const j=J;!b.value.size&&!S.value&&!j?.ctrlKey&&!j?.metaKey&&(v.clearSelection(),o.value?.clearSelection())};return xt(()=>{const J=j=>{!j.buttons&&x.value&&(x.value=!1)};document.addEventListener("dragleave",J),xn(()=>{document.removeEventListener("dragleave",J)})}),{explorerId:f,isDragging:x,initializeSelectionArea:D,updateSelectionArea:le,handleContentClick:je}}function nte(e){const t=n=>{if(!n)return{typeAllowed:!1,mimeAllowed:!1};const r=e.selectionFilterType,i=e.selectionFilterMimeIncludes,o=!r||r==="both"||r==="files"&&n.type==="file"||r==="dirs"&&n.type==="dir";let s=!0;return i&&Array.isArray(i)&&i.length>0&&(n.type==="dir"?s=!0:n.mime_type?s=i.some(l=>n.mime_type.startsWith(l)):s=!1),{typeAllowed:o,mimeAllowed:s}};return{isItemSelectable:t,canSelectItem:n=>{const{typeAllowed:r,mimeAllowed:i}=t(n);return r&&i}}}function rte(e){const t=n=>({item:n,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:t,openItem:(n,r,i)=>{const o=t(n);if(n.type==="file"&&r){if(e.emitter.emit("vf-file-dclick",o),o.defaultPrevented)return}else if(n.type==="dir"&&i&&(e.emitter.emit("vf-folder-dclick",o),o.defaultPrevented))return;const s=e.contextMenuItems?.find(l=>l.show(e,{items:[n],target:n,searchQuery:""}));s&&s.action(e,[n])}}}function ite(e,t,n,r,i,o,s){const l=e.fs,{canSelectItem:u}=nte(e),{openItem:d}=rte(e),f=v=>{const y=v.target?.closest(".file-item-"+t);if(!y)return null;const g=String(y.getAttribute("data-key")),m=n.value?.find(b=>Jt(b)===g);return{key:g,item:m}},p=()=>{const v=r.value;return n.value?.filter(y=>v?.has(Jt(y)))||[]};return{handleItemClick:v=>{const y=f(v);if(!y)return;const{key:g,item:m}=y,b=v;if(!u(m)){m?.type==="dir"&&(l.clearSelection(),i.value?.clearSelection(!0,!0),l.setSelectedCount(0));return}const x=e.selectionMode||"multiple";!b?.ctrlKey&&!b?.metaKey&&(v.type!=="touchstart"||!l.isSelected(g))&&(l.clearSelection(),i.value?.clearSelection(!0,!0)),i.value?.resolveSelectables(),v.type==="touchstart"&&l.isSelected(g)?l.select(g,x):l.toggleSelect(g,x),l.setSelectedCount(r.value?.size||0)},handleItemDblClick:v=>{const y=f(v);if(!y)return;const{item:g}=y;g&&(g.type==="file"&&!u(g)||d(g,o,s))},handleItemContextMenu:v=>{v.preventDefault(),v.stopPropagation();const y=f(v);if(!y)return;const{key:g,item:m}=y;u(m)&&(r.value?.has(g)||(l.clearSelection(),l.select(g)),e.emitter.emit("vf-contextmenu-show",{event:v,items:p(),target:m}))},handleContentContextMenu:v=>{v.preventDefault(),e.emitter.emit("vf-contextmenu-show",{event:v,items:p()})},getSelectedItems:p}}function ote(e,t){const n=re(null);return xt(()=>{if(Hr.plugin([Q7]),e.value){const r=Hr(e.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:i=>{n.value=i;const{viewport:o}=i.elements();o&&o.addEventListener("scroll",t)},updated:i=>{const{viewport:o}=i.elements()}});n.value=r}}),xn(()=>{if(n.value){const{viewport:r}=n.value.elements();r&&r.removeEventListener("scroll",t),n.value.destroy(),n.value=null}}),{osInstance:n}}const ste=4,ate=600;function lte(e,t){const n=re(null),r=new WeakMap,i=new WeakMap;return xt(()=>{e.value&&(n.value=new Ho({elements_selector:".lazy",container:e.value,restore_on_error:!0,callback_error:(o,s)=>{const l=(r.get(o)??0)+1;if(l>ste)return;r.set(o,l);const u=ate*2**(l-1)+Math.random()*250,d=i.get(o);d&&clearTimeout(d),i.set(o,setTimeout(()=>{o.isConnected&&(Ho.resetStatus(o),s.update())},u))}})),t?.emitter&&t.emitter.on("vf-refresh-thumbnails",()=>{n.value&&n.value.update()})}),kw(()=>{n.value&&n.value.update()}),xn(()=>{n.value&&(n.value.destroy(),n.value=null)}),{vfLazyLoad:n}}const ute={class:"vuefinder__explorer__container"},cte={key:0,class:"vuefinder__linear-loader"},dte=ze({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(e){const t=e,n=rt(),r=hl(n,["vuefinder__drag-over"]),i=_i("dragImage"),o=_n(null),s=_i("scrollContainer"),l=_i("scrollContent"),u=n.fs,d=n.config,f=Qe(d.state),p=Qe(u.sortedFiles),v=Qe(u.selectedKeys),y=Qe(u.loading),g=N=>v.value?.has(N)??!1,m=se(()=>{if(f.value?.view==="grid"){const ge=f.value?.gridItemHeight??80,fe=f.value?.gridItemGap??8;return ge+fe*2}const N=f.value?.listItemHeight??32,ie=f.value?.listItemGap??2;return N+ie*2}),b=se(()=>{if(f.value?.view==="grid"){const N=f.value?.gridItemWidth??96,ie=f.value?.gridItemGap??8;return N+ie*2}return 104}),x=se(()=>f.value?.view==="grid"?(f.value?.gridItemGap??8)*2:0),{t:S}=n.i18n,{itemsPerRow:O,totalHeight:T,visibleRows:A,handleScroll:M,getRowItems:z,getItemsInRange:Y,updateItemsPerRow:ve}=ete(se(()=>p.value??[]),{scrollContainer:s,itemWidth:b,rowHeight:m,overscan:2,containerPadding:x,lockItemsPerRow:se(()=>f.value.view==="list")}),{osInstance:W}=ote(s,M),{explorerId:X,isDragging:K,initializeSelectionArea:L,updateSelectionArea:D,handleContentClick:ne}=tte({itemsPerRow:O,totalHeight:T,getItemsInRange:Y,getKey:N=>Jt(N),selectionObject:o,rowHeight:m,itemWidth:b,osInstance:W}),le=re(null),je=N=>{if(!N||!le.value)return!1;const ie=v.value?.has(le.value)??!1;return K.value&&(ie?v.value?.has(N)??!1:N===le.value)};He(()=>d.get("view"),N=>{N==="list"?O.value=1:ve()},{immediate:!0}),He(O,N=>{d.get("view")==="list"&&N!==1&&(O.value=1)});const J=N=>p.value?.[N];lte(s,n);const{handleItemClick:j,handleItemDblClick:de,handleItemContextMenu:U,handleContentContextMenu:ee}=ite(n,X,p,v,o,t.onFileDclick,t.onFolderDclick);xt(()=>{const N=()=>{o.value||L(),o.value&&o.value.on("beforestart",({event:ie})=>{const ge=ie?.target===l.value;if(!ie?.metaKey&&!ie?.ctrlKey&&!ie?.altKey&&!ge)return!1})};if(W.value)N();else{const ie=setInterval(()=>{W.value&&(clearInterval(ie),N())},50);setTimeout(()=>{clearInterval(ie),o.value||N()},500)}He(()=>[n.selectionFilterType,n.selectionFilterMimeIncludes],D,{deep:!0})});const Q=N=>{if(!(n.features?.move??!1)||N.altKey||N.ctrlKey||N.metaKey)return N.preventDefault(),!1;K.value=!0;const ie=N.target?.closest(".file-item-"+X);if(le.value=ie?String(ie.dataset.key):null,N.dataTransfer&&le.value){N.dataTransfer.setDragImage(i.value,0,15),N.dataTransfer.effectAllowed="all",N.dataTransfer.dropEffect="copy";const ge=v.value?.has(le.value)?Array.from(v.value):[le.value];N.dataTransfer.setData("items",JSON.stringify(ge)),u.setDraggedItem(le.value)}},B=()=>{le.value=null};let oe=null,V=null;const P=N=>{N.target?.closest(".file-item-"+X)||(V=N,oe&&clearTimeout(oe),oe=setTimeout(()=>{V&&(V.cancelable&&V.preventDefault(),V.stopPropagation(),ee(V)),V=null,oe=null},500))},F=N=>{oe&&(clearTimeout(oe),oe=null),V=null},G=N=>{if(!V)return;const ie=V.touches[0]||V.changedTouches[0],ge=N.touches[0]||N.changedTouches[0];if(ie&&ge){const fe=Math.abs(ge.clientX-ie.clientX),pe=Math.abs(ge.clientY-ie.clientY);(fe>15||pe>15)&&(oe&&(clearTimeout(oe),oe=null),V=null)}};return(N,ie)=>(C(),R("div",ute,[w(f).view==="list"?(C(),Ee(Zee,{key:0})):Se("",!0),_("div",{ref_key:"scrollContainer",ref:s,class:Be(["vuefinder__explorer__selector-area","scroller-"+w(X)])},[w(d).get("loadingIndicator")==="linear"&&w(y)?(C(),R("div",cte)):Se("",!0),_("div",{ref_key:"scrollContent",ref:l,class:"scrollContent vuefinder__explorer__scroll-content",style:an({height:`${w(T)}px`,position:"relative",width:"100%"}),onContextmenu:ie[0]||(ie[0]=ht((...ge)=>w(ee)&&w(ee)(...ge),["self","prevent"])),onClick:ie[1]||(ie[1]=ht((...ge)=>w(ne)&&w(ne)(...ge),["self"])),onTouchstartCapture:ht(P,["self"]),onTouchendCapture:ht(F,["self"]),onTouchmoveCapture:ht(G,["self"]),onTouchcancelCapture:ht(F,["self"])},[_("div",{ref_key:"dragImage",ref:i,class:"vuefinder__explorer__drag-item"},[Z(kee,{count:le.value&&w(v).has(le.value)?w(v).size:1},null,8,["count"])],512),w(f).view==="grid"?(C(!0),R(We,{key:0},ct(w(A),ge=>(C(),Ee(Z0,{key:ge,"row-index":ge,"row-height":m.value,view:"grid","items-per-row":w(O),items:w(z)(w(p),ge),"show-thumbnails":w(f).showThumbnails,"is-dragging-item":je,"is-selected":g,"drag-n-drop-events":fe=>w(r).events(fe),"explorer-id":w(X),onClick:w(j),onDblclick:w(de),onContextmenu:w(U),onDragstart:Q,onDragend:B},{icon:Le(fe=>[mt(N.$slots,"icon",Ot({ref_for:!0},fe))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(C(!0),R(We,{key:1},ct(w(A),ge=>(C(),Ee(Z0,{key:ge,"row-index":ge,"row-height":m.value,view:"list",items:J(ge)?[J(ge)]:[],"is-dragging-item":je,"is-selected":g,"drag-n-drop-events":fe=>w(r).events(fe),"explorer-id":w(X),onClick:w(j),onDblclick:w(de),onContextmenu:w(U),onDragstart:Q,onDragend:B},{icon:Le(fe=>[mt(N.$slots,"icon",Ot({ref_for:!0},fe))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),fte=["href","download"],pte={class:"vuefinder__context-menu__action vuefinder__context-menu__action--parent"},hte={class:"vuefinder__context-menu vuefinder__context-menu__submenu"},mte=["onClick"],vte=["onClick"],gte=ze({__name:"ContextMenu",setup(e){const t=rt(),n=re(null),r=re([]);let i=null,o=null,s=null,l=[],u=null;const d=Hn({active:!1,items:[],positions:{}});t.emitter.on("vf-context-selected",y=>{r.value=y});const f=y=>y.link(t,r.value),p=y=>{t.emitter.emit("vf-contextmenu-hide"),y.action(t,r.value)};t.emitter.on("vf-contextmenu-show",y=>{const{event:g,items:m,target:b=null}=y||{};d.items=(t.contextMenuItems||[]).filter(x=>x.show(t,{items:m,target:b})).sort((x,S)=>{const O=x.order??1/0,T=S.order??1/0;return O-T}),b?m.length>1&&m.some(x=>x.path===b.path)?t.emitter.emit("vf-context-selected",m):t.emitter.emit("vf-context-selected",[b]):t.emitter.emit("vf-context-selected",[]),v(g)}),t.emitter.on("vf-contextmenu-hide",()=>{d.active=!1,i&&(i(),i=null),s&&(l.forEach(y=>{y===window?window.removeEventListener("scroll",s,!0):y.removeEventListener("scroll",s,!0)}),s=null,l=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null),o=null,d.positions={}});const v=async y=>{i&&(i(),i=null);const g=(T=>{if("clientX"in T&&"clientY"in T)return{x:T.clientX,y:T.clientY};const A="touches"in T&&T.touches[0]||"changedTouches"in T&&T.changedTouches[0];return A?{x:A.clientX,y:A.clientY}:{x:0,y:0}})(y);if(o={getBoundingClientRect:()=>({width:0,height:0,x:g.x,y:g.y,top:g.y,left:g.x,right:g.x,bottom:g.y})},d.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},d.active=!0,await gt(),!n.value||!o)return;await new Promise(T=>{requestAnimationFrame(()=>{requestAnimationFrame(T)})});const m=[Da(8),Fa({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),La({padding:16})];let b=0,x=0;try{const T=await js(o,n.value,{placement:"right-start",strategy:"fixed",middleware:m});b=T.x,x=T.y}catch(T){console.warn("[ContextMenu] Floating UI initial positioning error:",T);return}d.positions={position:"fixed",zIndex:"10001",left:`${b}px`,top:`${x}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{n.value&&(d.positions={...d.positions,opacity:"1",transform:"translateY(0)"})});const S=(T=>{const A=[];let M=T;for(;M&&M!==document.body&&M!==document.documentElement;){const z=window.getComputedStyle(M),Y=z.overflow+z.overflowX+z.overflowY;(Y.includes("scroll")||Y.includes("auto"))&&A.push(M),M=M.parentElement}return A})(n.value);l=[window,...S],s=()=>{d.active&&t.emitter.emit("vf-contextmenu-hide")};const O=s;O&&l.forEach(T=>{T===window?window.addEventListener("scroll",O,!0):T.addEventListener("scroll",O,!0)}),u=T=>{if(!d.active)return;const A=T.target;if(!A||n.value&&n.value.contains(A))return;const M=t.root;M&&M.contains(A)||t.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{u&&(document.addEventListener("mousedown",u,!0),document.addEventListener("touchstart",u,!0))},100),setTimeout(()=>{if(!(!n.value||!o))try{i=Dh(o,n.value,async()=>{if(!(!o||!n.value))try{const{x:T,y:A}=await js(o,n.value,{placement:"right-start",strategy:"fixed",middleware:m});d.positions={...d.positions,left:`${T}px`,top:`${A}px`}}catch(T){console.warn("Floating UI positioning error:",T)}})}catch(T){console.warn("Floating UI autoUpdate setup error:",T),i=null}},200)};return xn(()=>{i&&(i(),i=null),s&&(l.forEach(y=>{y===window?window.removeEventListener("scroll",s,!0):y.removeEventListener("scroll",s,!0)}),s=null,l=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null),o=null}),(y,g)=>Ct((C(),R("ul",{ref_key:"contextmenu",ref:n,class:Be([{"vuefinder__context-menu--active":d.active,"vuefinder__context-menu--inactive":!d.active},"vuefinder__context-menu"]),style:an(d.positions)},[(C(!0),R(We,null,ct(d.items,m=>(C(),R("li",{key:m.title,class:Be(["vuefinder__context-menu__item",{"vuefinder__context-menu__item--has-children":m.children?.length}])},[m.link?(C(),R("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:f(m),download:f(m),onClick:g[0]||(g[0]=b=>w(t).emitter.emit("vf-contextmenu-hide"))},[_("span",null,q(m.title(w(t).i18n)),1)],8,fte)):m.children?.length?(C(),R(We,{key:1},[_("div",pte,[_("span",null,q(m.title(w(t).i18n)),1),g[1]||(g[1]=_("svg",{class:"vuefinder__context-menu__chevron",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},[_("path",{d:"M6 4l4 4-4 4z"})],-1))]),_("ul",hte,[(C(!0),R(We,null,ct(m.children,b=>(C(),R("li",{key:b.id,class:"vuefinder__context-menu__item"},[_("div",{class:"vuefinder__context-menu__action",onClick:x=>p(b)},[_("span",null,q(b.title(w(t).i18n)),1)],8,mte)]))),128))])],64)):(C(),R("div",{key:2,class:"vuefinder__context-menu__action",onClick:b=>p(m)},[_("span",null,q(m.title(w(t).i18n)),1)],8,vte))],2))),128))],6)),[[Nr,d.active]])}}),_te={class:"vuefinder__status-bar__wrapper"},yte={class:"vuefinder__status-bar__storage"},bte=["title"],wte={class:"vuefinder__status-bar__storage-icon"},Ete=["value"],Ste=["value"],Cte={class:"vuefinder__status-bar__info space-x-2"},xte={key:0},Tte={key:1},kte={key:0,class:"vuefinder__status-bar__size"},Ote={class:"vuefinder__status-bar__actions"},$te=ze({__name:"Statusbar",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.sortedFiles),o=Qe(r.path),s=Qe(r.selectedCount),l=Qe(r.storages),u=Qe(r.selectedItems),d=Qe(r.path),f=b=>{const x=b.target.value;t.adapter.open(x+"://")},p=se(()=>!u.value||u.value.length===0?0:u.value.reduce((b,x)=>b+(x.file_size||0),0)),v=se(()=>l.value),y=se(()=>i.value),g=se(()=>s.value||0),m=se(()=>u.value||[]);return(b,x)=>(C(),R("div",_te,[_("div",yte,[_("div",{class:"vuefinder__status-bar__storage-container",title:w(n)("Storage")},[_("div",wte,[Z(w(Km))]),_("select",{name:"vuefinder-media-selector",value:w(o).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:f},[(C(!0),R(We,null,ct(v.value,S=>(C(),R("option",{key:S,value:S},q(S),9,Ste))),128))],40,Ete),x[0]||(x[0]=_("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,bte),_("div",Cte,[g.value===0?(C(),R("span",xte,q(y.value.length)+" "+q(w(n)("items")),1)):(C(),R("span",Tte,[Et(q(g.value)+" "+q(w(n)("selected"))+" ",1),p.value?(C(),R("span",kte,q(w(t).filesize(p.value)),1)):Se("",!0)]))])]),_("div",Ote,[mt(b.$slots,"actions",{path:w(d).path,count:g.value||0,selected:m.value})])]))}}),Ate={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function Rte(e,t){return C(),R("svg",Ate,[...t[0]||(t[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1)])])}const Pte={render:Rte};function s2(e,t){const n=e.findIndex(r=>r.path===t.path);n>-1?e[n]=t:e.push(t)}const Ite={class:"vuefinder__folder-loader-indicator"},Mte={key:1,class:"vuefinder__folder-loader-indicator--icon"},a2=ze({__name:"FolderLoaderIndicator",props:xw({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=rt(),r=Ah(e,"modelValue"),i=re(!1);He(()=>r.value,()=>o());const o=async()=>{i.value=!0;try{const s=(await n.adapter.list(t.path)).files.filter(l=>l.type==="dir");s2(n.treeViewData,{path:t.path,type:"dir",folders:s})}catch(s){yn(s,"Failed to fetch subfolders")}finally{i.value=!1}};return(s,l)=>(C(),R("div",Ite,[i.value?(C(),Ee(w(nd),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(C(),R("div",Mte,[r.value?(C(),Ee(w(ed),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):Se("",!0),r.value?Se("",!0):(C(),Ee(w(Zc),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),Dte={key:0},Fte={class:"vuefinder__treesubfolderlist__no-folders"},Lte={class:"vuefinder__treesubfolderlist__item-content"},jte=["onClick"],Ute=["title","onDblclick","onClick"],Nte={class:"vuefinder__treesubfolderlist__item-icon"},zte={class:"vuefinder__treesubfolderlist__subfolder"},Bte={key:1,class:"vuefinder__treesubfolderlist__more-note"},Vte=ze({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(e){const t=rt(),n=t.fs,r=hl(t,["vuefinder__drag-over"]),i=re({}),o=t.config,s=Qe(o.state),{t:l}=t.i18n,u=Qe(n.path),d=e,f=re(null),p=re(50);xt(()=>{d.path===d.storage+"://"&&f.value&&Hr(f.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const v=se(()=>{const S=t.treeViewData.find(O=>O.path===d.path)?.folders||[];return S.length>p.value?S.slice(0,p.value):S}),y=se(()=>t.treeViewData.find(S=>S.path===d.path)?.folders?.length||0),g=se(()=>y.value>p.value),m=se(()=>`${d.storage}://`),b=(S,O)=>S===O||S.startsWith(`${O}/`);He(v,S=>{const O=s.value.expandTreeByDefault&&d.path===m.value,T=s.value.expandedTreePaths||[];S.forEach(A=>{const M=T.some(z=>b(z,A.path));(O||M)&&i.value[A.path]===void 0&&(i.value[A.path]=!0)})},{immediate:!0});const x=()=>{p.value+=50};return(S,O)=>{const T=ft("TreeSubfolderList",!0);return C(),R("ul",{ref_key:"parentSubfolderList",ref:f,class:"vuefinder__treesubfolderlist__container"},[v.value.length?Se("",!0):(C(),R("li",Dte,[_("div",Fte,q(w(l)("No folders")),1)])),(C(!0),R(We,null,ct(v.value,A=>(C(),R("li",{key:A.path,class:"vuefinder__treesubfolderlist__item"},[_("div",Lte,[_("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:M=>i.value[A.path]=!i.value[A.path]},[Z(a2,{modelValue:i.value[A.path],"onUpdate:modelValue":M=>i.value[A.path]=M,storage:e.storage,path:A.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,jte),_("div",Ot({class:"vuefinder__treesubfolderlist__item-link",title:A.path},ni(w(r).events({...A,dir:A.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:M=>i.value[A.path]=!i.value[A.path],onClick:M=>w(t).adapter.open(A.path)}),[_("div",Nte,[w(u)?.path===A.path?(C(),Ee(w(td),{key:0,class:"vuefinder__item-icon__folder--open"})):(C(),Ee(w(ar),{key:1,class:"vuefinder__item-icon__folder"}))]),_("div",{class:Be(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":w(u).path===A.path}])},q(A.basename),3)],16,Ute)]),_("div",zte,[Ct(Z(T,{storage:d.storage,path:A.path},null,8,["storage","path"]),[[Nr,i.value[A.path]]])])]))),128)),g.value?(C(),R("li",Bte,[_("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:x},q(w(l)("load more")),1)])):Se("",!0)],512)}}}),Hte=ze({__name:"TreeStorageItem",props:{storage:{}},setup(e){const t=rt(),n=t.fs,r=t.config,i=e,o=Qe(r.state),s=se(()=>{const y=o.value.expandedTreePaths||[],g=`${i.storage}://`;return y.some(m=>m===g||m.startsWith(`${g}`))}),l=re(o.value.expandTreeByDefault||s.value),u=hl(t,["vuefinder__drag-over"]),d=Qe(n.path),f=se(()=>i.storage===d.value?.storage);He(()=>({expandTreeByDefault:o.value.expandTreeByDefault,hasExpandedPathInStorage:s.value}),y=>{(y.expandTreeByDefault||y.hasExpandedPathInStorage)&&(l.value=!0)});const p={storage:i.storage,path:i.storage+"://",dir:i.storage+"://",type:"dir",basename:i.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function v(y){y===d.value?.storage?l.value=!l.value:t.adapter.open(y+"://")}return(y,g)=>(C(),R(We,null,[_("div",{class:"vuefinder__treestorageitem__header",onClick:g[2]||(g[2]=m=>v(e.storage))},[_("div",Ot({class:["vuefinder__treestorageitem__info",f.value?"vuefinder__treestorageitem__info--active":""]},ni(w(u).events(p),!0)),[_("div",{class:Be(["vuefinder__treestorageitem__icon",f.value?"vuefinder__treestorageitem__icon--active":""])},[Z(w(Km))],2),_("div",null,q(e.storage),1)],16),_("div",{class:"vuefinder__treestorageitem__loader",onClick:g[1]||(g[1]=ht(m=>l.value=!l.value,["stop"]))},[Z(a2,{modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),storage:e.storage,path:e.storage+"://"},null,8,["modelValue","storage","path"])])]),Ct(Z(Vte,{storage:e.storage,path:e.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[Nr,l.value]])],64))}}),qte={class:"vuefinder__folder-indicator"},Wte={class:"vuefinder__folder-indicator--icon"},Yte=ze({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ah(e,"modelValue");return(n,r)=>(C(),R("div",qte,[_("div",Wte,[t.value?(C(),Ee(w(ed),{key:0,class:"vuefinder__folder-indicator--minus"})):Se("",!0),t.value?Se("",!0):(C(),Ee(w(Zc),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),Kte={key:0,class:"vuefinder__treeview__header"},Gte={class:"vuefinder__treeview__pinned-label"},Qte={class:"vuefinder__treeview__pin-text text-nowrap"},Xte={key:0,class:"vuefinder__treeview__pinned-list"},Jte=["onClick"],Zte=["title"],ene=["onClick"],tne={key:0},nne={class:"vuefinder__treeview__no-pinned"},rne=ze({__name:"TreeView",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,{getStore:i,setStore:o}=t.storage,s=t.fs,l=t.config,u=Qe(l.state),d=Qe(s.sortedFiles),f=Qe(s.storages),p=se(()=>f.value||[]),v=Qe(s.path),y=hl(t,["vuefinder__drag-over"]),g=re(190),m=re(i("pinned-folders-opened",!0));He(m,O=>o("pinned-folders-opened",O));const b=O=>{const T=l.get("pinnedFolders");l.set("pinnedFolders",T.filter(A=>A.path!==O.path))},x=O=>{const T=O.clientX,A=O.target.parentElement;if(!A)return;const M=A.getBoundingClientRect().width;A.classList.remove("transition-[width]"),A.classList.add("transition-none");const z=ve=>{g.value=M+ve.clientX-T,g.value<50&&(g.value=0,l.set("showTreeView",!1)),g.value>50&&l.set("showTreeView",!0)},Y=()=>{const ve=A.getBoundingClientRect();g.value=ve.width,A.classList.add("transition-[width]"),A.classList.remove("transition-none"),window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",Y)};window.addEventListener("mousemove",z),window.addEventListener("mouseup",Y)},S=re(null);return xt(()=>{S.value&&Hr(S.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),He(d,O=>{const T=O.filter(A=>A.type==="dir");s2(t.treeViewData,{path:v.value.path||"",folders:T.map(A=>({storage:A.storage,path:A.path,basename:A.basename,type:"dir"}))})}),(O,T)=>(C(),R(We,null,[_("div",{class:Be(["vuefinder__treeview__overlay",w(u).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:T[0]||(T[0]=A=>w(l).toggle("showTreeView"))},null,2),_("div",{style:an(w(u).showTreeView?"min-width:100px;max-width:75%; width: "+g.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[_("div",{ref_key:"treeViewScrollElement",ref:S,class:"vuefinder__treeview__scroll"},[w(n)("pinned")?(C(),R("div",Kte,[_("div",{class:"vuefinder__treeview__pinned-toggle",onClick:T[2]||(T[2]=A=>m.value=!m.value)},[_("div",Gte,[Z(w(Qa),{class:"vuefinder__treeview__pin-icon"}),_("div",Qte,q(w(r)("Pinned Folders")),1)]),Z(Yte,{modelValue:m.value,"onUpdate:modelValue":T[1]||(T[1]=A=>m.value=A)},null,8,["modelValue"])]),m.value?(C(),R("ul",Xte,[(C(!0),R(We,null,ct(w(u).pinnedFolders,A=>(C(),R("li",{key:A.path,class:"vuefinder__treeview__pinned-item"},[_("div",Ot({class:"vuefinder__treeview__pinned-folder"},ni(w(y).events(A),!0),{onClick:M=>w(t).adapter.open(A.path)}),[w(v).path!==A.path?(C(),Ee(w(ar),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):Se("",!0),w(v).path===A.path?(C(),Ee(w(td),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):Se("",!0),_("div",{title:A.path,class:Be(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":w(v).path===A.path}])},q(A.basename),11,Zte)],16,Jte),_("div",{class:"vuefinder__treeview__remove-folder",onClick:M=>b(A)},[Z(w(Pte),{class:"vuefinder__treeview__remove-icon"})],8,ene)]))),128)),w(u).pinnedFolders.length?Se("",!0):(C(),R("li",tne,[_("div",nne,q(w(r)("No folders pinned")),1)]))])):Se("",!0)])):Se("",!0),(C(!0),R(We,null,ct(p.value,A=>(C(),R("div",{key:A,class:"vuefinder__treeview__storage"},[Z(Hte,{storage:A},null,8,["storage"])]))),128))],512),_("div",{class:"vuefinder__treeview__resize-handle",onMousedown:x},null,32)],4)],64))}}),hn={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",openAs:"openAs",openAsText:"openAsText",openAsImage:"openAsImage",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function ine(e){return e.items.length>1&&e.items.some(t=>t.path===e.target?.path)?"many":e.target?"one":"none"}function sn(e){const t=Object.assign({needsSearchQuery:!1},e);return(n,r)=>!(t.needsSearchQuery!==!!r.searchQuery||t.target!==void 0&&t.target!==ine(r)||t.targetType!==void 0&&t.targetType!==r.target?.type||t.mimeType!==void 0&&t.mimeType!==r.target?.mime_type||t.feature!==void 0&&!(n.features[t.feature]??!1))}function Oa(...e){return(t,n)=>e.some(r=>r(t,n))}function Ss(...e){return(t,n)=>e.every(r=>r(t,n))}const l2=[{id:hn.openDir,title:({t:e})=>e("Open containing folder"),action:(e,t)=>{const n=t[0];n&&e.adapter.open(n.dir)},show:sn({target:"one",needsSearchQuery:!0}),order:10},{id:hn.refresh,title:({t:e})=>e("Refresh"),action:e=>{const t=e.fs;e.adapter.invalidateListQuery(t.path.get().path),e.adapter.open(t.path.get().path)},show:Oa(sn({target:"none"}),sn({target:"many"})),order:20},{id:hn.selectAll,title:({t:e})=>e("Select All"),action:e=>{e.fs.selectAll(e.selectionMode||"multiple")},show:(e,t)=>e.selectionMode==="multiple"&&sn({target:"none"})(e,t),order:30},{id:hn.new_folder,title:({t:e})=>e("New Folder"),action:e=>e.modal.open(Jm),show:sn({target:"none",feature:"newfolder"}),order:40},{id:hn.open,title:({t:e})=>e("Open"),action:(e,t)=>{t[0]&&e.adapter.open(t[0].path)},show:sn({target:"one",targetType:"dir"}),order:50},{id:hn.pinFolder,title:({t:e})=>e("Pin Folder"),action:(e,t)=>{const n=e.config,r=n.get("pinnedFolders"),i=r.concat(t.filter(o=>r.findIndex(s=>s.path===o.path)===-1));n.set("pinnedFolders",i)},show:Ss(sn({target:"one",targetType:"dir",feature:"pinned"}),(e,t)=>e.config.get("pinnedFolders").findIndex(n=>n.path===t.target?.path)===-1),order:60},{id:hn.unpinFolder,title:({t:e})=>e("Unpin Folder"),action:(e,t)=>{const n=e.config,r=n.get("pinnedFolders");n.set("pinnedFolders",r.filter(i=>!t.find(o=>o.path===i.path)))},show:Ss(sn({target:"one",targetType:"dir",feature:"pinned"}),(e,t)=>e.config.get("pinnedFolders").findIndex(n=>n.path===t.target?.path)!==-1),order:70},{id:hn.preview,title:({t:e})=>e("Preview"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0]}),show:Ss(sn({target:"one",feature:"preview"}),(e,t)=>t.target?.type!=="dir"),order:80},{id:hn.openAs,title:({t:e})=>e("Preview as"),action:()=>{},children:[{id:hn.openAsText,title:({t:e})=>e("Text"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0],forceType:"text"}),show:()=>!0},{id:hn.openAsImage,title:({t:e})=>e("Image"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0],forceType:"image"}),show:()=>!0}],show:Ss(sn({target:"one",feature:"preview"}),(e,t)=>t.target?.type!=="dir"),order:81},{id:hn.download,link:(e,t)=>{if(t[0])return e.adapter.getDownloadUrl(t[0])},title:({t:e})=>e("Download"),action:()=>{},show:Ss(sn({target:"one",feature:"download"}),(e,t)=>t.target?.type!=="dir"),order:90},{id:hn.rename,title:({t:e})=>e("Rename"),action:(e,t)=>e.modal.open(Jc,{items:t}),show:sn({target:"one",feature:"rename"}),order:100},{id:hn.move,title:({t:e})=>e("Move files"),action:(e,t)=>{const n=e.fs,r={storage:n.path.get().storage||"",path:n.path.get().path||"",type:"dir"};e.modal.open(Xs,{items:{from:t,to:r}})},show:Oa(sn({target:"one",feature:"move"}),sn({target:"many",feature:"move"})),order:110},{id:hn.copy,title:({t:e})=>e("Copy"),action:(e,t)=>{t.length>0&&e.fs.setClipboard("copy",new Set(t.map(n=>Jt(n))))},show:Oa(sn({target:"one",feature:"copy"}),sn({target:"many",feature:"copy"})),order:120},{id:hn.paste,title:({t:e})=>e("Paste"),action:(e,t)=>{const n=e.fs.getClipboard();if(n?.items?.size>0){const r=e.fs.path.get();let i=r.path,o=r.storage;t.length===1&&t[0]?.type==="dir"&&(i=t[0].path,o=t[0].storage);const s={storage:o||"",path:i||"",type:"dir"};e.modal.open(n.type==="cut"?Xs:Gm,{items:{from:Array.from(n.items),to:s}})}},show:(e,t)=>e.features?.copy??!1?e.fs.getClipboard()?.items?.size>0:!1,order:130},{id:hn.archive,title:({t:e})=>e("Archive"),action:(e,t)=>e.modal.open(tv,{items:t}),show:Oa(sn({target:"many",feature:"archive"}),Ss(sn({target:"one",feature:"archive"}),(e,t)=>t.target?.mime_type!=="application/zip")),order:140},{id:hn.unarchive,title:({t:e})=>e("Unarchive"),action:(e,t)=>e.modal.open(ev,{items:t}),show:sn({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:hn.delete,title:({t:e})=>e("Delete"),action:(e,t)=>{e.modal.open(Xc,{items:t})},show:Oa(sn({feature:"delete",target:"one"}),sn({feature:"delete",target:"many"})),order:160}],one=["data-theme"],sne={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},ane={class:"vuefinder__external-drop-message"},lne={class:"vuefinder__main__content"},une=ze({__name:"VueFinderView",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean},locale:{},contextMenuItems:{},selectionMode:{},selectionFilterType:{},selectionFilterMimeIncludes:{},onError:{type:Function},onSelect:{type:Function},onPathChange:{type:Function},onUploadComplete:{type:Function},onDeleteComplete:{type:Function},onNotify:{type:Function},onReady:{type:Function},onFileDclick:{type:Function},onFolderDclick:{type:Function},customUploader:{type:Function}},emits:["select","path-change","upload-complete","delete-complete","notify","error","ready","file-dclick","folder-dclick","update:locale"],setup(e,{emit:t}){const n=t,r=e,i=rt(),o=_i("root"),s=i.config;He(()=>r.features,S=>{const O=MC(S);Object.keys(i.features).forEach(T=>{delete i.features[T]}),Object.assign(i.features,O)},{deep:!0});const l=i.fs,u=Qe(i.i18n.localeAtom),d=Qe(s.state),f=se(()=>{const S=d.value;return{"--vf-grid-item-width":`${S.gridItemWidth}px`,"--vf-grid-item-height":`${S.gridItemHeight}px`,"--vf-grid-item-gap":`${S.gridItemGap}px`,"--vf-grid-icon-size":`${S.gridIconSize}px`,"--vf-list-item-height":`${S.listItemHeight}px`,"--vf-list-item-gap":`${S.listItemGap}px`,"--vf-list-icon-size":`${S.listIconSize}px`}});PQ();const{isDraggingExternal:p,handleDragEnter:v,handleDragOver:y,handleDragLeave:g,handleDrop:m}=IQ();function b(S){l.setPath(S.dirname),s.get("persist")&&s.set("path",S.dirname),l.setReadOnly(S.read_only??!1),i.modal.close(),l.setFiles(S.files),l.clearSelection(),l.setSelectedCount(0),l.setStorages(S.storages)}i.adapter.onBeforeOpen=()=>{l.setLoading(!0)},i.adapter.onAfterOpen=S=>{b(S),l.setLoading(!1)},i.emitter.on("vf-fetch-abort",()=>{i.adapter.cancelOpen(),l.setLoading(!1)}),i.emitter.on("vf-upload-complete",S=>{n("upload-complete",S)}),i.emitter.on("vf-delete-complete",S=>{n("delete-complete",S)}),i.emitter.on("vf-notify",S=>{n("notify",S);const{type:O,message:T}=S??{};O==="error"&&n("error",T)}),i.emitter.on("vf-file-dclick",S=>{n("file-dclick",S)}),i.emitter.on("vf-folder-dclick",S=>{n("folder-dclick",S)}),He(()=>r.config?.theme,S=>{S&&s.set("theme",w(S))},{immediate:!0}),He(u,(S,O)=>{S!==O&&n("update:locale",String(S))},{immediate:!1}),xt(()=>{i.root=o.value,He(()=>s.get("path"),O=>{i.adapter.open(O)});const S=s.get("persist")?s.get("path"):s.get("initialPath")??"";l.setPath(S),i.adapter.open(S),l.path.listen(O=>{n("path-change",O.path)}),l.selectedItems.listen(O=>{n("select",O)}),n("ready")});const x=async S=>{const O=await m(S);O.length>0&&(i.modal.open(Zm),setTimeout(()=>{i.emitter.emit("vf-external-files-dropped",O.map(T=>T.file))},100))};return(S,O)=>(C(),R("div",{ref_key:"root",ref:o,tabindex:"0",class:Be(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":w(p)}]),"data-theme":w(i).theme.current,style:an(f.value),onDragenter:O[2]||(O[2]=(...T)=>w(v)&&w(v)(...T)),onDragover:O[3]||(O[3]=(...T)=>w(y)&&w(y)(...T)),onDragleave:O[4]||(O[4]=(...T)=>w(g)&&w(g)(...T)),onDrop:x},[_("div",{class:Be(w(i).theme.current),style:{height:"100%",width:"100%"}},[_("div",{class:Be([w(d)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:O[0]||(O[0]=T=>w(i).emitter.emit("vf-contextmenu-hide")),onTouchstart:O[1]||(O[1]=T=>w(i).emitter.emit("vf-contextmenu-hide"))},[w(p)?(C(),R("div",sne,[_("div",ane,q(w(i).i18n.t("Drag and drop the files/folders to here.")),1)])):Se("",!0),w(d).showMenuBar?(C(),Ee(LJ,{key:1})):Se("",!0),w(d).showToolbar?(C(),Ee(UZ,{key:2})):Se("",!0),Z(Eee),_("div",lne,[Z(rne),Z(dte,{"on-file-dclick":r.onFileDclick,"on-folder-dclick":r.onFolderDclick},{icon:Le(T=>[mt(S.$slots,"icon",ii(Vi(T)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),Z($te,null,{actions:Le(T=>[mt(S.$slots,"status-bar",ii(Vi(T)))]),_:3})],34),(C(),Ee(el,{to:"body"},[Z(Cw,{name:"fade"},{default:Le(()=>[w(i).modal.visible?(C(),Ee(Pn(w(i).modal.type),{key:0})):Se("",!0)]),_:1})])),Z(gte,{items:w(l2)},null,8,["items"]),w(d).notificationsEnabled?(C(),Ee(w(nV),{key:0,position:w(d).notificationPosition,duration:w(d).notificationDuration,"visible-toasts":w(d).notificationVisibleToasts,"rich-colors":w(d).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):Se("",!0)],2)],46,one))}}),cne=ze({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>l2},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(e){const t=e,n=t.id??Fs(Eh);if(!n)throw new Error('VueFinderProvider requires an "id" prop.');const r=X9(t,Fs("VueFinderOptions")||{});return He(()=>t.config,i=>{if(i){const o={};for(const s in i){const l=w(i[s]);l!==void 0&&(o[s]=l)}r.config.init(o)}},{deep:!0,immediate:!0}),He(()=>t.locale,i=>{i&&r.i18n.localeAtom&&r.i18n.localeAtom.get()!==i&&r.i18n.localeAtom.set(i)},{immediate:!0}),M9(n,r),Ow(Eh,n),ts(()=>{D9(n)}),(i,o)=>(C(),Ee(une,ii(Vi(t)),{icon:Le(s=>[mt(i.$slots,"icon",ii(Vi(s)))]),"status-bar":Le(s=>[mt(i.$slots,"status-bar",ii(Vi(s)))]),_:3},16))}});function Zie(e){const t=rt(e),n=Qe(t.fs.path),r=se(()=>n.value?.path??""),i=s=>s||t.fs.path.get().path||"",o=s=>{Array.isArray(s.files)&&t.fs.setFiles(s.files)};return{async refresh(){const s=t.fs.path.get().path||"";t.adapter.invalidateListQuery(s),await t.adapter.open(s)},async open(s){await t.adapter.open(s)},preview(s){const l=(t.fs.files.get()||[]).find(u=>u.path===s);!l||l.type!=="file"||t.modal.open(qi,{storage:l.storage,item:l})},notify(s,l){ks(t,s,l)},getPath(){return t.fs.path.get().path||""},path:r,select(s){const l=new Set((t.fs.files.get()||[]).map(d=>d.path)),u=(s||[]).filter(d=>l.has(d));t.fs.setSelection(u)},selectOne(s){new Set((t.fs.files.get()||[]).map(l=>l.path)).has(s)&&t.fs.setSelection([s])},clearSelection(){t.fs.clearSelection()},getSelectedPaths(){return(t.fs.selectedItems.get()||[]).map(s=>s.path)},async createFolder(s,l){const u=await t.adapter.createFolder({path:i(l),name:s});o(u)},async createFile(s,l){const u=await t.adapter.createFile({path:i(l),name:s});o(u)},async delete(s,l){const u=i(l),d=new Map((t.fs.files.get()||[]).map(v=>[v.path,v])),f=(s||[]).map(v=>d.get(v)).filter(v=>!!v).map(v=>({path:v.path,type:v.type})),p=await t.adapter.delete({path:u,items:f});o(p)},async rename(s,l,u){const d=await t.adapter.rename({path:i(u),item:s,name:l});o(d)},async copy(s,l,u){const d=await t.adapter.copy({path:i(u),sources:s,destination:l});o(d)},async move(s,l,u){const d=await t.adapter.move({path:i(u),sources:s,destination:l});o(d)},getFiles(){return t.fs.files.get()||[]},getStorages(){return t.fs.storages.get()||[]},isLoading(){return t.fs.isLoading()},isReadOnly(){return t.fs.getReadOnly()}}}const dne={install(e,t={}){t.i18n=t.i18n??{};const[n]=Object.keys(t.i18n);t.locale=t.locale??n??"en",e.provide("VueFinderOptions",t),e.component("VueFinder",cne)}};function fne(e){e.use(dne,{i18n:{zhCN:()=>Rt(()=>import("./zhCN-VSAW5gZn.js"),[],import.meta.url),en:()=>Rt(()=>import("./en-DJCBTPEu.js"),[],import.meta.url)}})}function u2(e,t){return function(){return e.apply(t,arguments)}}const{toString:pne}=Object.prototype,{getPrototypeOf:id}=Object,{iterator:od,toStringTag:c2}=Symbol,sd=(e=>t=>{const n=pne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ui=e=>(e=e.toLowerCase(),t=>sd(t)===e),ad=e=>t=>typeof t===e,{isArray:oa}=Array,Js=ad("undefined");function ml(e){return e!==null&&!Js(e)&&e.constructor!==null&&!Js(e.constructor)&&lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d2=ui("ArrayBuffer");function hne(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&d2(e.buffer),t}const mne=ad("string"),lr=ad("function"),f2=ad("number"),vl=e=>e!==null&&typeof e=="object",vne=e=>e===!0||e===!1,nc=e=>{if(sd(e)!=="object")return!1;const t=id(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(c2 in e)&&!(od in e)},gne=e=>{if(!vl(e)||ml(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_ne=ui("Date"),yne=ui("File"),bne=e=>!!(e&&typeof e.uri<"u"),wne=e=>e&&typeof e.getParts<"u",Ene=ui("Blob"),Sne=ui("FileList"),Cne=e=>vl(e)&&lr(e.pipe);function xne(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ew=xne(),tw=typeof ew.FormData<"u"?ew.FormData:void 0,Tne=e=>{if(!e)return!1;if(tw&&e instanceof tw)return!0;const t=id(e);if(!t||t===Object.prototype||!lr(e.append))return!1;const n=sd(e);return n==="formdata"||n==="object"&&lr(e.toString)&&e.toString()==="[object FormData]"},kne=ui("URLSearchParams"),[One,$ne,Ane,Rne]=["ReadableStream","Request","Response","Headers"].map(ui),Pne=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oa(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ml(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let l;for(r=0;r<s;r++)l=o[r],t.call(null,e[l],l,e)}}function p2(e,t){if(ml(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const qo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,h2=e=>!Js(e)&&e!==qo;function xh(){const{caseless:e,skipUndefined:t}=h2(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&p2(n,o)||o;nc(n[s])&&nc(i)?n[s]=xh(n[s],i):nc(i)?n[s]=xh({},i):oa(i)?n[s]=i.slice():(!t||!Js(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&gl(arguments[i],r);return n}const Ine=(e,t,n,{allOwnKeys:r}={})=>(gl(t,(i,o)=>{n&&lr(i)?Object.defineProperty(e,o,{value:u2(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Mne=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dne=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Fne=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&id(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Lne=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},jne=e=>{if(!e)return null;if(oa(e))return e;let t=e.length;if(!f2(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Une=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&id(Uint8Array)),Nne=(e,t)=>{const r=(e&&e[od]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},zne=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Bne=ui("HTMLFormElement"),Vne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),nw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hne=ui("RegExp"),m2=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};gl(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},qne=e=>{m2(e,(t,n)=>{if(lr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(lr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wne=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return oa(e)?r(e):r(String(e).split(t)),n},Yne=()=>{},Kne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Gne(e){return!!(e&&lr(e.append)&&e[c2]==="FormData"&&e[od])}const Qne=e=>{const t=new Array(10),n=(r,i)=>{if(vl(r)){if(t.indexOf(r)>=0)return;if(ml(r))return r;if(!("toJSON"in r)){t[i]=r;const o=oa(r)?[]:{};return gl(r,(s,l)=>{const u=n(s,i+1);!Js(u)&&(o[l]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Xne=ui("AsyncFunction"),Jne=e=>e&&(vl(e)||lr(e))&&lr(e.then)&&lr(e.catch),v2=((e,t)=>e?setImmediate:t?((n,r)=>(qo.addEventListener("message",({source:i,data:o})=>{i===qo&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),qo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",lr(qo.postMessage)),Zne=typeof queueMicrotask<"u"?queueMicrotask.bind(qo):typeof process<"u"&&process.nextTick||v2,ere=e=>e!=null&&lr(e[od]),me={isArray:oa,isArrayBuffer:d2,isBuffer:ml,isFormData:Tne,isArrayBufferView:hne,isString:mne,isNumber:f2,isBoolean:vne,isObject:vl,isPlainObject:nc,isEmptyObject:gne,isReadableStream:One,isRequest:$ne,isResponse:Ane,isHeaders:Rne,isUndefined:Js,isDate:_ne,isFile:yne,isReactNativeBlob:bne,isReactNative:wne,isBlob:Ene,isRegExp:Hne,isFunction:lr,isStream:Cne,isURLSearchParams:kne,isTypedArray:Une,isFileList:Sne,forEach:gl,merge:xh,extend:Ine,trim:Pne,stripBOM:Mne,inherits:Dne,toFlatObject:Fne,kindOf:sd,kindOfTest:ui,endsWith:Lne,toArray:jne,forEachEntry:Nne,matchAll:zne,isHTMLForm:Bne,hasOwnProperty:nw,hasOwnProp:nw,reduceDescriptors:m2,freezeMethods:qne,toObjectSet:Wne,toCamelCase:Vne,noop:Yne,toFiniteNumber:Kne,findKey:p2,global:qo,isContextDefined:h2,isSpecCompliantForm:Gne,toJSONObject:Qne,isAsyncFn:Xne,isThenable:Jne,setImmediate:v2,asap:Zne,isIterable:ere};let lt=class g2 extends Error{static from(t,n,r,i,o,s){const l=new g2(t.message,n||t.code,r,i,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:me.toJSONObject(this.config),code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";lt.ERR_BAD_OPTION="ERR_BAD_OPTION";lt.ECONNABORTED="ECONNABORTED";lt.ETIMEDOUT="ETIMEDOUT";lt.ERR_NETWORK="ERR_NETWORK";lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";lt.ERR_DEPRECATED="ERR_DEPRECATED";lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";lt.ERR_CANCELED="ERR_CANCELED";lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";lt.ERR_INVALID_URL="ERR_INVALID_URL";lt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const tre=null;function Th(e){return me.isPlainObject(e)||me.isArray(e)}function _2(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function Cp(e,t,n){return e?e.concat(t).map(function(i,o){return i=_2(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function nre(e){return me.isArray(e)&&!e.some(Th)}const rre=me.toFlatObject(me,{},null,function(t){return/^is[A-Z]/.test(t)});function ld(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=me.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!me.isUndefined(x[b])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?100:n.maxDepth,d=l&&me.isSpecCompliantForm(t);if(!me.isFunction(i))throw new TypeError("visitor must be a function");function f(m){if(m===null)return"";if(me.isDate(m))return m.toISOString();if(me.isBoolean(m))return m.toString();if(!d&&me.isBlob(m))throw new lt("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(m)||me.isTypedArray(m)?d&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,b,x){let S=m;if(me.isReactNative(t)&&me.isReactNativeBlob(m))return t.append(Cp(x,b,o),f(m)),!1;if(m&&!x&&typeof m=="object"){if(me.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=JSON.stringify(m);else if(me.isArray(m)&&nre(m)||(me.isFileList(m)||me.endsWith(b,"[]"))&&(S=me.toArray(m)))return b=_2(b),S.forEach(function(T,A){!(me.isUndefined(T)||T===null)&&t.append(s===!0?Cp([b],A,o):s===null?b:b+"[]",f(T))}),!1}return Th(m)?!0:(t.append(Cp(x,b,o),f(m)),!1)}const v=[],y=Object.assign(rre,{defaultVisitor:p,convertValue:f,isVisitable:Th});function g(m,b,x=0){if(!me.isUndefined(m)){if(x>u)throw new lt("Object is too deeply nested ("+x+" levels). Max depth: "+u,lt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(v.indexOf(m)!==-1)throw Error("Circular reference detected in "+b.join("."));v.push(m),me.forEach(m,function(O,T){(!(me.isUndefined(O)||O===null)&&i.call(t,O,me.isString(T)?T.trim():T,b,y))===!0&&g(O,b?b.concat(T):[T],x+1)}),v.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return g(e),t}function rw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ov(e,t){this._pairs=[],e&&ld(e,this,t)}const y2=ov.prototype;y2.append=function(t,n){this._pairs.push([t,n])};y2.toString=function(t){const n=t?function(r){return t.call(this,r,rw)}:rw;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function ire(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function b2(e,t,n){if(!t)return e;const r=n&&n.encode||ire,i=me.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let s;if(o?s=o(t,i):s=me.isURLSearchParams(t)?t.toString():new ov(t,i).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class iw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){me.forEach(this.handlers,function(r){r!==null&&t(r)})}}const sv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ore=typeof URLSearchParams<"u"?URLSearchParams:ov,sre=typeof FormData<"u"?FormData:null,are=typeof Blob<"u"?Blob:null,lre={isBrowser:!0,classes:{URLSearchParams:ore,FormData:sre,Blob:are},protocols:["http","https","file","blob","url","data"]},av=typeof window<"u"&&typeof document<"u",kh=typeof navigator=="object"&&navigator||void 0,ure=av&&(!kh||["ReactNative","NativeScript","NS"].indexOf(kh.product)<0),cre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dre=av&&window.location.href||"http://localhost",fre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:av,hasStandardBrowserEnv:ure,hasStandardBrowserWebWorkerEnv:cre,navigator:kh,origin:dre},Symbol.toStringTag,{value:"Module"})),Mn={...fre,...lre};function pre(e,t){return ld(e,new Mn.classes.URLSearchParams,{visitor:function(n,r,i,o){return Mn.isNode&&me.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hre(e){return me.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mre(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function w2(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),u=o>=n.length;return s=!s&&me.isArray(i)?i.length:s,u?(me.hasOwnProp(i,s)?i[s]=me.isArray(i[s])?i[s].concat(r):[i[s],r]:i[s]=r,!l):((!i[s]||!me.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&me.isArray(i[s])&&(i[s]=mre(i[s])),!l)}if(me.isFormData(e)&&me.isFunction(e.entries)){const n={};return me.forEachEntry(e,(r,i)=>{t(hre(r),i,n,0)}),n}return null}const Cs=(e,t)=>e!=null&&me.hasOwnProp(e,t)?e[t]:void 0;function vre(e,t,n){if(me.isString(e))try{return(t||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _l={transitional:sv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=me.isObject(t);if(o&&me.isHTMLForm(t)&&(t=new FormData(t)),me.isFormData(t))return i?JSON.stringify(w2(t)):t;if(me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t)||me.isReadableStream(t))return t;if(me.isArrayBufferView(t))return t.buffer;if(me.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const u=Cs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return pre(t,u).toString();if((l=me.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=Cs(this,"env"),f=d&&d.FormData;return ld(l?{"files[]":t}:t,f&&new f,u)}}return o||i?(n.setContentType("application/json",!1),vre(t)):t}],transformResponse:[function(t){const n=Cs(this,"transitional")||_l.transitional,r=n&&n.forcedJSONParsing,i=Cs(this,"responseType"),o=i==="json";if(me.isResponse(t)||me.isReadableStream(t))return t;if(t&&me.isString(t)&&(r&&!i||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Cs(this,"parseReviver"))}catch(u){if(l)throw u.name==="SyntaxError"?lt.from(u,lt.ERR_BAD_RESPONSE,this,null,Cs(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mn.classes.FormData,Blob:Mn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],e=>{_l.headers[e]={}});const gre=me.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_re=e=>{const t={};let n,r,i;return e&&e.split(`
42
+ `.concat(-this.coordinates.left/e-s.rotate.left-s.scale.left,"px,").concat(-this.coordinates.top/e-s.rotate.top-s.scale.top,"px) ")+jS(t),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(e){(e.width||e.height)&&this.onChangeImage()}},mounted:function(){var e=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){e.refreshImage()})),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var e=this.$refs.image;this.calculatedImageSize.height=e.naturalHeight,this.calculatedImageSize.width=e.naturalWidth},refresh:function(){var e=this.$refs.root;this.width||(this.calculatedSize.width=e.clientWidth),this.height||(this.calculatedSize.height=e.clientHeight)},onChangeImage:function(){var e=this.$refs.image;e&&e.complete&&this.refreshImage(),this.refresh()}}};NS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"root",class:o.classes.root,style:o.style},[Z("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[Ct(Z("img",{ref:"image",src:n.image&&n.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[Nr,n.image&&n.image.src]])],6)],6)};var zS={components:{Preview:NS},inheritAttrs:!1};zS.render=function(e,t,n,r,i,o){var s=ft("preview");return C(),Ee(s,Ot(e.$attrs,{fill:!0}),null,16)};var fp=ai("vue-rectangle-stencil"),BS={name:"RectangleStencil",components:{StencilPreview:zS,BoundingBox:FS,DraggableArea:LS},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return ym}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return bm}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:mn(fp({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:mn(fp("preview"),this.previewClass),boundingBox:mn(fp("bounding-box"),this.boundingBoxClass)}},style:function(){var e=this.stencilCoordinates,t=e.height,n=e.width,r=e.left,i=e.top,o={width:"".concat(n,"px"),height:"".concat(t,"px"),transform:"translate(".concat(r,"px, ").concat(i,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(e){this.$emit("move",e),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(e){this.$emit("resize",e),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};BS.render=function(e,t,n,r,i,o){var s=ft("stencil-preview"),l=ft("draggable-area"),u=ft("bounding-box");return C(),Ee("div",{class:o.classes.stencil,style:o.style},[Z(u,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:o.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:Le((function(){return[Z(l,{movable:n.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:Le((function(){return[Z(s,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:o.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]})),_:1},8,["movable","onMove","onMoveEnd"])]})),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var f7=["transitions"],Di=ai("vue-advanced-cropper"),VS={name:"Cropper",components:{BackgroundWrapper:lh},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return BS}},backgroundWrapperComponent:{type:[Object,String],default:function(){return lh}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(e){return HH.indexOf(e)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(e){return!(typeof e=="string"&&e!=="fill"&&e!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(e){var t=e.event,n=e.coordinates,r=e.aspectRatio,i=e.positionRestrictions,o=e.sizeRestrictions,s=nt(nt({},n),{right:n.left+n.width,bottom:n.top+n.height}),l=t.params||{},u=nt({},t.directions),d=l.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(u.left=0,u.right=0),o.heightFrozen&&(u.top=0,u.bottom=0),gi.forEach((function(T){d[T]||(u[T]=0)}));var f=vi(s,u=u0({coordinates:s,directions:u,sizeRestrictions:o,positionRestrictions:i})).width,p=vi(s,u).height,v=l.preserveRatio?Dt(s):up(f/p,r);if(v){var y=l.respectDirection;if(y||(y=s.width>=s.height||v===1?"width":"height"),y==="width"){var g=f/v-s.height;if(d.top&&d.bottom){var m=u.top,b=u.bottom;u.bottom=Au(g,b,m),u.top=Au(g,m,b)}else d.bottom?u.bottom=g:d.top?u.top=g:d.right?u.right=0:d.left&&(u.left=0)}else if(y==="height"){var x=s.width-p*v;if(d.left&&d.right){var S=u.left,O=u.right;u.left=-Au(x,S,O),u.right=-Au(x,O,S)}else d.left?u.left=-x:d.right?u.right=-x:d.top?u.top=0:d.bottom&&(u.bottom=0)}u=u0({directions:u,coordinates:s,sizeRestrictions:o,positionRestrictions:i,preserveRatio:!0,compensate:l.compensate})}return f=vi(s,u).width,p=vi(s,u).height,(v=l.preserveRatio?Dt(s):up(f/p,r))&&Math.abs(v-f/p)>.001&&gi.forEach((function(T){d[T]||(u[T]=0)})),ah({event:new gm({left:-u.left,top:-u.top}),coordinates:{width:n.width+u.right+u.left,height:n.height+u.top+u.bottom,left:n.left,top:n.top},positionRestrictions:i})}},moveAlgorithm:{type:Function,default:ah},initStretcher:{type:Function,default:function(e){var t=e.stretcher,n=e.imageSize,r=Dt(n);t.style.width=n.width+"px",t.style.height=t.clientWidth/r+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(e){var t=e.visibleArea,n=e.coordinates,r=e.aspectRatio,i=e.sizeRestrictions,o=e.positionRestrictions,s=nt(nt({},n),Bi({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,i.minHeight),minWidth:Math.min(t.width,i.minWidth)}}));return s=Cn(s=sr(s,qs(Sn(n),Sn(s))),Bc(Ei(t),o))}},fitVisibleArea:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.getAreaRestrictions,i=e.coordinates,o=nt({},t);o.height=o.width/Dt(n),o.top+=(t.height-o.height)/2,(i.height-o.height>0||i.width-o.width>0)&&(o=zr(o,Math.max(i.height/o.height,i.width/o.width)));var s=Nc(Ys(i,Ei(o=zr(o,zc(o,r({visibleArea:o,type:"resize"}))))));return o.width<i.width&&(s.left=0),o.height<i.height&&(s.top=0),o=Cn(o=sr(o,s),r({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.imageSize,i=e.imageRestriction,o=e.type,s={};return i==="fill-area"?s={left:0,top:0,right:r.width,bottom:r.height}:i==="fit-area"&&(Dt(n)>Dt(r)?(s={top:0,bottom:r.height},t&&o==="move"&&(t.width>r.width?(s.left=-(t.width-r.width)/2,s.right=r.width-s.left):(s.left=0,s.right=r.width))):(s={left:0,right:r.width},t&&o==="move"&&(t.height>r.height?(s.top=-(t.height-r.height)/2,s.bottom=r.height-s.top):(s.top=0,s.bottom=r.height)))),s}},sizeRestrictionsAlgorithm:{type:Function,default:function(e){return{minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.imageSize,n={};return e.imageRestriction!=="none"&&(n={left:0,top:0,right:t.width,bottom:t.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:Mt({},o0)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var e=(function(t){return t*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(e))+Math.abs(this.imageAttributes.height*Math.sin(e)),height:Math.abs(this.imageAttributes.width*Math.sin(e))+Math.abs(this.imageAttributes.height*Math.cos(e))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var e=oh(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:oh(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:e}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var e=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:gn(this.minWidth)?0:Ou(this.minWidth),minHeight:gn(this.minHeight)?0:Ou(this.minHeight),maxWidth:gn(this.maxWidth)?1/0:Ou(this.maxWidth),maxHeight:gn(this.maxHeight)?1/0:Ou(this.maxHeight)});if(e=(function(r){var i=r.areaRestrictions,o=r.sizeRestrictions,s=r.boundaries,l=r.positionRestrictions,u=nt(nt({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});l.left!==void 0&&l.right!==void 0&&(u.maxWidth=Math.min(u.maxWidth,l.right-l.left)),l.bottom!==void 0&&l.top!==void 0&&(u.maxHeight=Math.min(u.maxHeight,l.bottom-l.top));var d=sh(i),f=IS(s,d);return d.width<1/0&&(!u.maxWidth||u.maxWidth>f.width)&&(u.maxWidth=Math.min(u.maxWidth,f.width)),d.height<1/0&&(!u.maxHeight||u.maxHeight>f.height)&&(u.maxHeight=Math.min(u.maxHeight,f.height)),u.minWidth>u.maxWidth&&(u.minWidth=u.maxWidth,u.widthFrozen=!0),u.minHeight>u.maxHeight&&(u.minHeight=u.maxHeight,u.heightFrozen=!0),u})({sizeRestrictions:e,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),n=sh(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));e.maxWidth=Math.min(e.maxWidth,n.width*t.width/this.boundaries.width),e.maxHeight=Math.min(e.maxHeight,n.height*t.height/this.boundaries.height),e.maxWidth<e.minWidth&&(e.minWidth=e.maxWidth),e.maxHeight<e.minHeight&&(e.minHeight=e.maxHeight)}return e}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Di(),image:mn(Di("image"),this.imageClass),stencil:Di("stencil"),boundaries:mn(Di("boundaries"),this.boundariesClass),stretcher:mn(Di("stretcher")),background:mn(Di("background"),this.backgroundClass),foreground:mn(Di("foreground"),this.foregroundClass),imageWrapper:mn(Di("image-wrapper")),cropperWrapper:mn(Di("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var e=this.coordinates,t=e.width,n=e.height,r=e.left,i=e.top;return{width:t/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(i-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var e={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(e.opacity="0"),e},imageStyle:function(){var e=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(e.width-this.imageSize.width)/(2*this.coefficient),top:(e.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*e.width/2,top:(1-1/this.coefficient)*e.height/2},r=Mt(Mt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/e.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/e.height)}),i={width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-n.left-this.imageTransforms.translateX,"px, ").concat(-t.top-n.top-this.imageTransforms.translateY,"px)")+jS(r)};return this.transitionsOptions.enabled&&(i.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),i}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var e=this;this.$nextTick((function(){e.resetCoordinates(),e.runAutoZoom("setCoordinates"),e.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(e,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return e[n]!==t[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=ih(this.update,this.debounce),this.debouncedDisableTransitions=ih(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var e=this.initialized?this.prepareResult(Mt({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:Mt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Mt({},this.visibleArea):null,imageTransforms:t,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Mt({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Pa({},{factor:1/e,center:t}),{normalize:!1,transitions:i})},move:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Pa({left:e||0,top:t||0}),{normalize:!1,transitions:i})},setCoordinates:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,i=r===void 0||r,o=n.transitions,s=o===void 0||o;this.$nextTick((function(){t.imageLoaded?(t.transitionsActive||(s&&t.enableTransitions(),t.coordinates=t.applyTransform(e),i&&t.runAutoZoom("setCoordinates"),s&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=e}))},refresh:function(){var e=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then((function(){e.onChange()})):this.resetVisibleArea().then((function(){e.onChange()}))},reset:function(){var e=this;return this.resetVisibleArea().then((function(){e.onChange(!1)}))},awaitRender:function(e){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){e(),t.awaiting=!1})))},prepareResult:function(e){return this.roundResult?(function(t){var n=t.coordinates,r=t.sizeRestrictions,i=t.positionRestrictions,o={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return o.width>r.maxWidth?o.width=Math.floor(n.width):o.width<r.minWidth&&(o.width=Math.ceil(n.width)),o.height>r.maxHeight?o.height=Math.floor(n.height):o.height<r.minHeight&&(o.height=Math.ceil(n.height)),Cn(o,i)})(Mt(Mt({},this.getPublicProperties()),{},{positionRestrictions:$u(this.positionRestrictions,this.visibleArea),coordinates:e})):e},processAutoZoom:function(e,t,n,r){var i=this.autoZoomAlgorithm;i||(i=this.stencilSize?YH:this.autoZoom?KH:GH);var o=i({event:{type:e,params:r},visibleArea:t,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return Mt(Mt({},o),{},{changed:!s0(o.visibleArea,t)||!s0(o.coordinates,n)})},runAutoZoom:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n!==void 0&&n,i=FH(t,f7),o=this.processAutoZoom(e,this.visibleArea,this.coordinates,i),s=o.visibleArea,l=o.coordinates,u=o.changed;r&&u&&this.enableTransitions(),this.visibleArea=s,this.coordinates=l,r&&u&&this.debouncedDisableTransitions()},normalizeEvent:function(e){return(function(t){var n=t.event,r=t.visibleArea,i=t.coefficient;if(n.type==="manipulateImage")return nt(nt({},n),{move:{left:n.move&&n.move.left?i*n.move.left:0,top:n.move&&n.move.top?i*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*i+r.left,top:n.scale.center.top*i+r.top}:null}});if(n.type==="resize"){var o=nt(nt({},n),{directions:nt({},n.directions)});return gi.forEach((function(l){o.directions[l]*=i})),o}if(n.type==="move"){var s=nt(nt({},n),{directions:nt({},n.directions)});return VH.forEach((function(l){s.directions[l]*=i})),s}return n})(Mt(Mt({},this.getPublicProperties()),{},{event:e}))},getCanvas:function(){if(this.$refs.canvas){var e=this.$refs.canvas,t=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(l,u,d){var f=d.rotate,p=d.flip,v={width:u.naturalWidth,height:u.naturalHeight},y=MS(v,f),g=l.getContext("2d");l.height=y.height,l.width=y.width,g.save();var m=co(Sn(nt({left:0,top:0},v)),f);return g.translate(-(m.left-y.width/2),-(m.top-y.height/2)),g.rotate(f*Math.PI/180),g.translate(p.horizontal?v.width:0,p.vertical?v.height:0),g.scale(p.horizontal?-1:1,p.vertical?-1:1),g.drawImage(u,0,0,v.width,v.height),g.restore(),l})(this.$refs.sourceCanvas,t,this.imageTransforms):t,r=Mt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),i=function(l){return l.find((function(u){return d=u,!Number.isNaN(parseFloat(d))&&isFinite(d);var d}))},o=Bi({sizeRestrictions:{minWidth:i([r.width,r.minWidth])||0,minHeight:i([r.height,r.minHeight])||0,maxWidth:i([r.width,r.maxWidth])||1/0,maxHeight:i([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&o.width*o.height>r.maxArea){var s=Math.sqrt(r.maxArea/(o.width*o.height));o={width:Math.round(s*o.width),height:Math.round(s*o.height)}}return(function(l,u,d,f,p){l.width=f?f.width:d.width,l.height=f?f.height:d.height;var v=l.getContext("2d");v.clearRect(0,0,l.width,l.height),p&&(p.imageSmoothingEnabled&&(v.imageSmoothingEnabled=p.imageSmoothingEnabled),p.imageSmoothingQuality&&(v.imageSmoothingQuality=p.imageSmoothingQuality),p.fillColor&&(v.fillStyle=p.fillColor,v.fillRect(0,0,l.width,l.height),v.save()));var y=d.left<0?-d.left:0,g=d.top<0?-d.top:0;v.drawImage(u,d.left+y,d.top+g,d.width,d.height,y*(l.width/d.width),g*(l.height/d.height),l.width,l.height)})(e,n,this.coordinates,o,r),e}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&t?qH(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&t?$u(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return WH({transform:e,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var e=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?JH:XH);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=ws(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,i=this.defaultPosition||QH,o=[r,function(s){var l=s.coordinates;return Mt({},ws(i)?i({coordinates:l,imageSize:e.imageSize,visibleArea:e.visibleArea}):e.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,Zo(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var e=this;this.imageLoaded=!1,setTimeout((function(){var t=e.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),e.coordinates=e.defaultCoordinates(),e.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var e=this,t=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then((function(){var r={cropper:n,imageSize:e.imageSize};if(ws(e.defaultBoundaries)?e.boundaries=e.defaultBoundaries(r):e.defaultBoundaries==="fit"?e.boundaries=(function(i){var o=i.cropper,s=i.imageSize,l=o.clientHeight,u=o.clientWidth,d=l,f=s.width*l/s.height;return f>u&&(f=u,d=s.height*u/s.width),{width:f,height:d}})(r):e.boundaries=(function(i){var o=i.cropper;return{width:o.clientWidth,height:o.clientHeight}})(r),!e.boundaries.width||!e.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var e=this;return this.appliedImageTransforms=Mt(Mt({},this.defaultImageTransforms),{},{flip:Mt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){e.priority!=="visible-area"&&(e.visibleArea=null,e.resetCoordinates());var t,n,r,i,o,s,l=e.defaultVisibleArea||ZH;e.visibleArea=ws(l)?l({imageSize:e.imageSize,boundaries:e.boundaries,coordinates:e.priority!=="visible-area"?e.coordinates:null,getAreaRestrictions:e.getAreaRestrictions,stencilSize:e.getStencilSize()}):e.defaultVisibleArea,e.visibleArea=(t={visibleArea:e.visibleArea,boundaries:e.boundaries,getAreaRestrictions:e.getAreaRestrictions},n=t.visibleArea,r=t.boundaries,i=t.getAreaRestrictions,o=nt({},n),s=Dt(r),o.width/o.height!==s&&(o.height=o.width/s),Cn(o,i({visibleArea:o,type:"move"}))),e.priority==="visible-area"?e.resetCoordinates():e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("resetVisibleArea")})).catch((function(){e.visibleArea=null}))},updateVisibleArea:function(){var e=this;return this.updateBoundaries().then((function(){e.visibleArea=e.fitVisibleArea({imageSize:e.imageSize,boundaries:e.boundaries,visibleArea:e.visibleArea,coordinates:e.coordinates,getAreaRestrictions:e.getAreaRestrictions}),e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("updateVisibleArea")})).catch((function(){e.visibleArea=null}))},onChange:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var e,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(i){if(r0(i))return!1;var o=window.location,s=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i)||[],l={protocol:s[1]||"",host:s[2]||"",port:s[3]||""},u=function(d){return d.port||((d.protocol||o.protocol)==="http"?80:433)};return!(!l.protocol&&!l.host&&!l.port||l.protocol&&l.protocol==o.protocol&&l.host&&l.host==o.host&&l.host&&u(l)==u(o))})(this.src)){var n=gn(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(e=this.src,new Promise((function(i){c7(e).then((function(o){var s=d7(o);i(o?{source:e,arrayBuffer:o,orientation:s}:{source:e,arrayBuffer:null,orientation:null})})).catch((function(o){console.warn(o),i({source:e,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){r.then(t.onParseImage)}),this.transitionTime)}else setTimeout((function(){t.onParseImage({source:t.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var e=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){e.$emit("ready"),e.onChange(!1)})))},onParseImage:function(e){var t=this,n=e.source,r=e.arrayBuffer,i=e.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&i&&i>1?OS(n)||!r0(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(o){for(var s=[],l=new Uint8Array(o);l.length>0;){var u=l.subarray(0,8192);s.push(String.fromCharCode.apply(null,Array.from?Array.from(u):u.slice())),l=l.subarray(8192)}return"data:image/jpeg;base64,"+btoa(s.join(""))})(r):this.imageAttributes.src=n,ws(this.defaultTransforms)?this.appliedImageTransforms=dp(this.defaultTransforms()):Xu(this.defaultTransforms)?this.appliedImageTransforms=dp(this.defaultTransforms):this.appliedImageTransforms=(function(o){var s=dp({});if(o)switch(o){case 2:s.flip.horizontal=!0;break;case 3:s.rotate=-180;break;case 4:s.flip.vertical=!0;break;case 5:s.rotate=90,s.flip.vertical=!0;break;case 6:s.rotate=90;break;case 7:s.rotate=90,s.flip.horizontal=!0;break;case 8:s.rotate=-90}return s})(i),this.defaultImageTransforms=Mt(Mt({},this.appliedImageTransforms),{},{flip:Mt({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var o=t.$refs.image;o&&o.complete&&((function(s){return!!s.naturalWidth})(o)?t.onSuccessLoadImage():t.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(e){var t=this;this.transitionsOptions.enabled||this.awaitRender((function(){t.coordinates=t.moveAlgorithm(Mt(Mt({},t.getPublicProperties()),{},{positionRestrictions:$u(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(e)})),t.onChange()}))},onResize:function(e){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=t.sizeRestrictions,r=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(Mt(Mt({},t.getPublicProperties()),{},{positionRestrictions:$u(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,t.visibleArea.width),maxHeight:Math.min(n.maxHeight,t.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:t.normalizeEvent(e)})),t.onChange(),t.ticking=!1}))},onManipulateImage:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=t.transitions,r=n!==void 0&&n,i=t.normalize,o=i===void 0||i;r&&this.enableTransitions();var s=e7(Mt(Mt({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(e):e,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),l=s.visibleArea,u=s.coordinates;this.visibleArea=l,this.coordinates=u,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.visibleArea,n=e.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:r})},getAspectRatio:function(e){var t,n,r=this.stencilProps,i=r.aspectRatio,o=r.minAspectRatio,s=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var l=this.$refs.stencil.aspectRatios();t=l.minimum,n=l.maximum}if(gn(t)&&(t=gn(i)?o:i),gn(n)&&(n=gn(i)?s:i),!e&&(gn(t)||gn(n))){var u=this.getStencilSize(),d=u?Dt(u):null;gn(t)&&(t=i0(d)?d:void 0),gn(n)&&(n=i0(d)?d:void 0)}return{minimum:t,maximum:n}},getStencilSize:function(){if(this.stencilSize)return e={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=e.boundaries,n=e.stencilSize,r=e.aspectRatio,up(Dt(i=ws(n)?n({boundaries:t,aspectRatio:r}):n),r)&&(i=Bi({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(i.width>t.width||i.height>t.height)&&(i=Bi({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:Dt(i),maximum:Dt(i)}})),i;var e,t,n,r,i},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return Mt({},o0)},flip:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;if(!this.transitionsActive){i&&this.enableTransitions();var o=Mt({},this.imageTransforms.flip),s=n7({flip:{horizontal:e?!o.horizontal:o.horizontal,vertical:t?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),l=s.visibleArea,u=s.coordinates;e&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=l,this.coordinates=u,this.onChange(),i&&this.debouncedDisableTransitions()}},rotate:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var i=Mt({},this.imageSize);this.appliedImageTransforms.rotate+=e;var o=t7({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:i,imageSize:this.imageSize,angle:e,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=o.visibleArea,l=o.coordinates,u=this.processAutoZoom("rotateImage",s,l);s=u.visibleArea,l=u.coordinates,this.visibleArea=s,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},p7={key:0,ref:"canvas",style:{display:"none"}},h7={key:1,ref:"sourceCanvas",style:{display:"none"}};VS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"cropper",class:o.classes.cropper},[Z("div",{ref:"stretcher",class:o.classes.stretcher},null,2),Z("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(C(),Ee(Pn(n.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:Le((function(){return[Z("div",{class:o.classes.background,style:o.boundariesStyle},null,6),Z("div",{class:o.classes.imageWrapper},[Z("img",{ref:"image",crossorigin:i.imageAttributes.crossOrigin,src:i.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:t[1]||(t[1]=ht((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),Z("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),Ct((C(),Ee(Pn(n.stencilComponent),Ot({ref:"stencil",image:o.image,coordinates:i.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},n.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Nr,i.imageLoaded]]),n.canvas?(C(),Ee("canvas",p7,null,512)):Se("",!0),n.canvas?(C(),Ee("canvas",h7,null,512)):Se("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const wr=(e,t)=>{const{o:n,i:r,u:i}=e;let o=n,s;const l=(f,p)=>{const v=o,y=f,g=p||(r?!r(v,y):v!==y);return(g||i)&&(o=y,s=v),[o,g,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},m7=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,nr=m7?window:{},HS=Math.max,v7=Math.min,uh=Math.round,po=Math.abs,d0=Math.sign,wm=nr.cancelAnimationFrame,qa=nr.requestAnimationFrame,Em=nr.setTimeout,qS=nr.clearTimeout,Vc=e=>typeof nr[e]<"u"?nr[e]:void 0,g7=Vc("MutationObserver"),f0=Vc("IntersectionObserver"),Os=Vc("ResizeObserver"),Ra=Vc("ScrollTimeline"),Sm=e=>e===void 0,Hc=e=>e===null,vo=e=>typeof e=="number",na=e=>typeof e=="string",qc=e=>typeof e=="boolean",li=e=>typeof e=="function",Vr=e=>Array.isArray(e),hc=e=>typeof e=="object"&&!Vr(e)&&!Hc(e),Cm=e=>{const t=!!e&&e.length,n=vo(t)&&t>-1&&t%1==0;return Vr(e)||!li(e)&&n?t>0&&hc(e)?t-1 in e:!0:!1},Wa=e=>!!e&&e.constructor===Object,mc=e=>e instanceof HTMLElement,Wc=e=>e instanceof Element;function zt(e,t){if(Cm(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&zt(Object.keys(e),(n=>t(e[n],n,e)));return e}const WS=(e,t)=>e.indexOf(t)>=0,Ks=(e,t)=>e.concat(t),en=(e,t,n)=>(!na(t)&&Cm(t)?Array.prototype.push.apply(e,t):e.push(t),e),To=e=>Array.from(e||[]),xm=e=>Vr(e)?e:!na(e)&&Cm(e)?To(e):[e],vc=e=>!!e&&!e.length,gc=e=>To(new Set(e)),Sr=(e,t,n)=>{zt(e,i=>i?i.apply(void 0,t||[]):!0),n||(e.length=0)},YS="paddingTop",KS="paddingRight",GS="paddingLeft",QS="paddingBottom",XS="marginLeft",JS="marginRight",ZS="marginBottom",Tm="overflowX",km="overflowY",dl="width",fl="height",Ui="visible",ti="hidden",Ko="scroll",_7=e=>{const t=String(e||"");return t?t[0].toUpperCase()+t.slice(1):""},Yc=(e,t,n,r)=>{if(e&&t){let i=!0;return zt(n,(o=>{const s=e[o],l=t[o];s!==l&&(i=!1)})),i}return!1},Om=(e,t)=>Yc(e,t,["w","h"]),Ju=(e,t)=>Yc(e,t,["x","y"]),y7=(e,t)=>Yc(e,t,["t","r","b","l"]),dt=(e,...t)=>e.bind(0,...t),$s=e=>{let t;const n=e?Em:qa,r=e?qS:wm;return[i=>{r(t),t=n((()=>i()),li(e)?e():e)},()=>r(t)]},p0=e=>{const t=li(e)?e():e;if(vo(t)){const n=t?Em:qa,r=t?qS:wm;return i=>{const o=n((()=>i()),t);return()=>{r(o)}}}return t&&t._},eC=(e,t)=>{const{p:n,v:r,S:i,m:o}=t||{};let s,l,u,d;const f=function(m){l&&l(),s&&s(),d=l=s=u=void 0,e.apply(this,m)},p=g=>o&&u?o(u,g):g,v=()=>{l&&u&&f(p(u)||u)},y=function(){const m=To(arguments),b=p0(n);if(b){const x=typeof i=="function"?i():i,S=p0(r),T=p(m)||m,A=f.bind(0,T);l&&l(),x&&!d?(A(),d=!0,l=b((()=>d=void 0))):(l=b(A),S&&!s&&(s=S(v))),u=T}else f(m)};return y.O=v,y},tC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Zn=e=>e?Object.keys(e):[],Ft=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||Hc(e))&&!li(e)&&(e={}),zt(l,(u=>{zt(u,((d,f)=>{const p=u[f];if(e===p)return!0;const v=Vr(p);if(p&&Wa(p)){const y=e[f];let g=y;v&&!Vr(y)?g=[]:!v&&!Wa(y)&&(g={}),e[f]=Ft(g,p)}else e[f]=v?p.slice():p}))})),e},nC=(e,t)=>zt(Ft({},e),((n,r,i)=>{n===void 0?delete i[r]:n&&Wa(n)&&(i[r]=nC(n))})),$m=e=>!Zn(e).length,Ya=()=>{},rC=(e,t,n)=>HS(e,v7(t,n)),Go=e=>gc((Vr(e)?e:(e||"").split(" ")).filter((t=>t))),Am=(e,t)=>e&&e.getAttribute(t),h0=(e,t)=>e&&e.hasAttribute(t),Li=(e,t,n)=>{zt(Go(t),(r=>{e&&e.setAttribute(r,String(n||""))}))},pi=(e,t)=>{zt(Go(t),(n=>e&&e.removeAttribute(n)))},Kc=(e,t)=>{const n=Go(Am(e,t)),r=dt(Li,e,t),i=(o,s)=>{const l=new Set(n);return zt(Go(o),(u=>{l[s](u)})),To(l).join(" ")};return{C:o=>r(i(o,"delete")),$:o=>r(i(o,"add")),H:o=>{const s=Go(o);return s.reduce(((l,u)=>l&&n.includes(u)),s.length>0)}}},iC=(e,t,n)=>(Kc(e,t).C(n),dt(Rm,e,t,n)),Rm=(e,t,n)=>(Kc(e,t).$(n),dt(iC,e,t,n)),_c=(e,t,n,r)=>(r?Rm:iC)(e,t,n),Pm=(e,t,n)=>Kc(e,t).H(n),oC=e=>Kc(e,"class"),sC=(e,t)=>{oC(e).C(t)},Gc=(e,t)=>(oC(e).$(t),dt(sC,e,t)),aC=(e,t)=>{const n=t?Wc(t)&&t:document;return n?To(n.querySelectorAll(e)):[]},b7=(e,t)=>{const n=t?Wc(t)&&t:document;return n&&n.querySelector(e)},ch=(e,t)=>Wc(e)&&e.matches(t),lC=e=>ch(e,"body"),dh=e=>e?To(e.childNodes):[],Ka=e=>e&&e.parentElement,As=(e,t)=>Wc(e)&&e.closest(t),fh=e=>document.activeElement,w7=(e,t,n)=>{const r=As(e,t),i=e&&b7(n,r),o=As(i,t)===r;return r&&i?r===e||i===e||o&&As(As(e,n),t)!==r:!1},Gs=e=>{zt(xm(e),(t=>{const n=Ka(t);t&&n&&n.removeChild(t)}))},Vn=(e,t)=>dt(Gs,e&&t&&zt(xm(t),(n=>{n&&e.appendChild(n)})));let uC;const E7=()=>uC,S7=e=>{uC=e},Ms=e=>{const t=document.createElement("div");return Li(t,"class",e),t},Im=e=>{const t=Ms(),n=E7(),r=e.trim();return t.innerHTML=n?n.createHTML(r):r,zt(dh(t),(i=>Gs(i)))},m0=(e,t)=>e.getPropertyValue(t)||e[t]||"",cC=e=>{const t=e||0;return isFinite(t)?t:0},Pu=e=>cC(parseFloat(e||"")),ph=e=>Math.round(e*1e4)/1e4,dC=e=>`${ph(cC(e))}px`;function Qs(e,t){e&&t&&zt(t,((n,r)=>{try{const i=e.style,o=Hc(n)||qc(n)?"":vo(n)?dC(n):n;r.indexOf("--")===0?i.setProperty(r,o):i[r]=o}catch{}}))}function Si(e,t,n){const r=na(t);let i=r?"":{};if(e){const o=nr.getComputedStyle(e,n)||e.style;i=r?m0(o,t):To(t).reduce(((s,l)=>(s[l]=m0(o,l),s)),i)}return i}const v0=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,u=`${r}left${i}`,d=Si(e,[o,s,l,u]);return{t:Pu(d[o]),r:Pu(d[s]),b:Pu(d[l]),l:Pu(d[u])}},pp=(e,t)=>`translate${hc(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,C7=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),x7={w:0,h:0},Qc=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:x7,T7=e=>Qc("inner",e||nr),go=dt(Qc,"offset"),fC=dt(Qc,"client"),yc=dt(Qc,"scroll"),Mm=e=>{const t=parseFloat(Si(e,dl))||0,n=parseFloat(Si(e,fl))||0;return{w:t-uh(t),h:n-uh(n)}},hp=e=>e.getBoundingClientRect(),k7=e=>!!e&&C7(e),hh=e=>!!(e&&(e[fl]||e[dl])),pC=(e,t)=>{const n=hh(e);return!hh(t)&&n},g0=(e,t,n,r)=>{zt(Go(t),(i=>{e&&e.removeEventListener(i,n,r)}))},Ht=(e,t,n,r)=>{var i;const o=(i=r&&r.D)!=null?i:!0,s=r&&r.I||!1,l=r&&r.A||!1,u={passive:o,capture:s};return dt(Sr,Go(t).map((d=>{const f=l?p=>{g0(e,d,f,s),n&&n(p)}:n;return e&&e.addEventListener(d,f,u),dt(g0,e,d,f,s)})))},Dm=e=>e.stopPropagation(),mh=e=>e.preventDefault(),hC=e=>Dm(e)||mh(e),Ur=(e,t)=>{const{x:n,y:r}=vo(t)?{x:t,y:t}:t||{};vo(n)&&(e.scrollLeft=n),vo(r)&&(e.scrollTop=r)},Er=e=>({x:e.scrollLeft,y:e.scrollTop}),mC=()=>({T:{x:0,y:0},k:{x:0,y:0}}),O7=(e,t)=>{const{T:n,k:r}=e,{w:i,h:o}=t,s=(p,v,y)=>{let g=d0(p)*y,m=d0(v)*y;if(g===m){const b=po(p),x=po(v);m=b>x?0:m,g=b<x?0:g}return g=g===m?0:g,[g+0,m+0]},[l,u]=s(n.x,r.x,i),[d,f]=s(n.y,r.y,o);return{T:{x:l,y:d},k:{x:u,y:f}}},mp=({T:e,k:t})=>{const n=(r,i)=>r===0&&r<=i;return{x:n(e.x,t.x),y:n(e.y,t.y)}},_0=({T:e,k:t},n)=>{const r=(i,o,s)=>rC(0,1,(i-s)/(i-o)||0);return{x:r(e.x,t.x,n.x),y:r(e.y,t.y,n.y)}},vh=e=>{e&&e.focus&&e.focus({preventScroll:!0,focusVisible:!1})},y0=(e,t)=>{zt(xm(t),e)},gh=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);y0((u=>{l&&l[u?"delete":"clear"](u)}),s)}else t.forEach((l=>{l.clear()})),t.clear()},r=(o,s)=>{if(na(o)){const d=t.get(o)||new Set;return t.set(o,d),y0((f=>{li(f)&&d.add(f)}),s),dt(n,o,s)}qc(s)&&s&&n();const l=Zn(o),u=[];return zt(l,(d=>{const f=o[d];f&&en(u,r(d,f))})),dt(Sr,u)},i=(o,s)=>{zt(To(t.get(o)),(l=>{s&&!vc(s)?l.apply(0,s):l()}))};return r(e||{}),[r,n,i]},vC={},gC={},$7=e=>{zt(e,(t=>zt(t,((n,r)=>{vC[r]=t[r]}))))},_C=(e,t,n)=>Zn(e).map((r=>{const{static:i,instance:o}=e[r],[s,l,u]=n||[],d=n?o:i;if(d){const f=n?d(s,l,t):d(t);return(u||gC)[r]=f}})),A7=(e,t)=>e[t],ra=e=>A7(gC,e),R7="__osOptionsValidationPlugin",ia="data-overlayscrollbars",Zu="os-environment",Iu=`${Zu}-scrollbar-hidden`,vp=`${ia}-initialize`,ec="noClipping",b0=`${ia}-body`,_o=ia,P7="host",ji=`${ia}-viewport`,I7=Tm,M7=km,D7="arrange",yC="measuring",F7="scrolling",bC="scrollbarHidden",L7="noContent",_h=`${ia}-padding`,w0=`${ia}-content`,Fm="os-size-observer",j7=`${Fm}-appear`,Lm=`${Fm}-listener`,U7=`${Lm}-scroll`,tc=`${Lm}-item`,E0=`${tc}-final`,N7="os-trinsic-observer",z7="os-theme-none",Cr="os-scrollbar",B7=`${Cr}-rtl`,V7=`${Cr}-horizontal`,H7=`${Cr}-vertical`,wC=`${Cr}-track`,jm=`${Cr}-handle`,q7=`${Cr}-visible`,W7=`${Cr}-cornerless`,S0=`${Cr}-interaction`,C0=`${Cr}-unusable`,yh=`${Cr}-auto-hide`,Y7=`${yh}-hidden`,x0=`${Cr}-wheel`,K7=`${wC}-interactive`,G7=`${jm}-interactive`,EC="__osSizeObserverPlugin",Q7={[EC]:{static:()=>(e,t,n)=>{const i="scroll",o=Im(`<div class="${tc}" dir="ltr"><div class="${tc}"><div class="${E0}"></div></div><div class="${tc}"><div class="${E0}" style="width: 200%; height: 200%"></div></div></div>`),s=o[0],l=s.lastChild,u=s.firstChild,d=u?.firstChild;let f=go(s),p=f,v=!1,y;const g=()=>{Ur(u,3333333),Ur(l,3333333)},m=S=>{y=0,v&&(f=p,t(S===!0))},b=S=>{p=go(s),v=!S||!Om(p,f),S?(Dm(S),v&&!y&&(wm(y),y=qa(m))):m(S===!1),g()},x=[Vn(e,o),Ht(u,i,b),Ht(l,i,b)];return Gc(e,U7),Qs(d,{[dl]:3333333,[fl]:3333333}),qa(g),[n?dt(b,!1):g,x]}}},X7=(e,t)=>{const{M:n}=t,[r,i]=e("showNativeOverlaidScrollbars");return[r&&n.x&&n.y,i]},Rs=e=>e.indexOf(Ui)===0,J7=e=>e.replace(`${Ui}-`,""),bh=(e,t)=>{if(e==="auto")return t?Ko:ti;const n=e||ti;return[ti,Ko,Ui].includes(n)?n:ti},Z7=(e,t)=>{const{overflowX:n,overflowY:r}=Si(e,[Tm,km]);return{x:bh(n,t.x),y:bh(r,t.y)}},Um="__osScrollbarsHidingPlugin",e9="__osClickScrollPlugin",T0=e=>JSON.stringify(e,((t,n)=>{if(li(n))throw 0;return n})),k0=(e,t)=>e?`${t}`.split(".").reduce(((n,r)=>n&&tC(n,r)?n[r]:void 0),e):void 0,t9=[0,33],SC=[33,99],CC=[222,666,!0],n9={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:t9,resize:null,event:SC,env:CC},attributes:null,ignoreMutation:null,flowDirectionStyles:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},xC=(e,t)=>{const n={},r=Ks(Zn(t),Zn(e));return zt(r,(i=>{const o=e[i],s=t[i];if(hc(o)&&hc(s))Ft(n[i]={},xC(o,s)),$m(n[i])&&delete n[i];else if(tC(t,i)&&s!==o){let l=!0;if(Vr(o)||Vr(s))try{T0(o)===T0(s)&&(l=!1)}catch{}l&&(n[i]=s)}})),n},gp=(e,t,n)=>r=>[k0(e,r),n||k0(t,r)!==void 0];let TC;const r9=()=>TC,i9=e=>{TC=e};let _p;const o9=()=>{const e=(T,A,M)=>{Vn(document.body,T),Vn(document.body,T);const z=fC(T),Y=go(T),ve=Mm(A);return M&&Gs(T),{x:Y.h-z.h+ve.h,y:Y.w-z.w+ve.w}},t=T=>{let A=!1;const M=Gc(T,Iu);try{A=Si(T,"scrollbar-width")==="none"||Si(T,"display","::-webkit-scrollbar")==="none"}catch{}return M(),A},n=`.${Zu}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Zu} div{width:200%;height:200%;margin:10px 0}.${Iu}{scrollbar-width:none!important}.${Iu}::-webkit-scrollbar,.${Iu}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,i=Im(`<div class="${Zu}"><div></div><style>${n}</style></div>`)[0],o=i.firstChild,s=i.lastChild,l=r9();l&&(s.nonce=l);const[u,,d]=gh(),[f,p]=wr({o:e(i,o),i:Ju},dt(e,i,o,!0)),[v]=p(),y=t(i),g={x:v.x===0,y:v.y===0},m={elements:{host:null,padding:!y,viewport:T=>y&&lC(T)&&T,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},b=Ft({},n9),x=dt(Ft,{},b),S=dt(Ft,{},m),O={U:v,M:g,P:y,J:!!Ra,G:dt(u,"r"),K:S,Z:T=>Ft(m,T)&&S(),tt:x,nt:T=>Ft(b,T)&&x(),ot:Ft({},m),st:Ft({},b)};if(pi(i,"style"),Gs(i),Ht(nr,"resize",(()=>{d("r",[])})),li(nr.matchMedia)&&!y&&(!g.x||!g.y)){const T=A=>{const M=nr.matchMedia(`(resolution: ${nr.devicePixelRatio}dppx)`);Ht(M,"change",(()=>{A(),T(A)}),{A:!0})};T((()=>{const[A,M]=f();Ft(O.U,A),d("r",[M])}))}return O},xi=()=>(_p||(_p=o9()),_p),s9=(e,t,n)=>{let r=!1;const i=n?new WeakMap:!1,o=()=>{r=!0},s=l=>{if(i&&n){const u=n.map((d=>{const[f,p]=d||[];return[p&&f?(l||aC)(f,e):[],p]}));zt(u,(d=>zt(d[0],(f=>{const p=d[1],v=i.get(f)||[];if(e.contains(f)&&p){const g=Ht(f,p,(m=>{r?(g(),i.delete(f)):t(m)}));i.set(f,en(v,g))}else Sr(v),i.delete(f)}))))}};return s(),[o,s]},O0=(e,t,n,r)=>{let i=!1;const{et:o,ct:s,rt:l,it:u,lt:d,ut:f}=r||{},[p,v]=s9(e,(()=>i&&n(!0)),l),y=o||[],g=s||[],m=Ks(y,g),b=(S,O)=>{if(!vc(O)){const T=d||Ya,A=f||Ya,M=[],z=[];let Y=!1,ve=!1;if(zt(O,(W=>{const{attributeName:X,target:K,type:L,oldValue:D,addedNodes:ne,removedNodes:le}=W,je=L==="attributes",J=L==="childList",j=e===K,de=je&&X,U=de&&Am(K,X||""),ee=na(U)?U:null,Q=de&&D!==ee,B=WS(g,X)&&Q;if(t&&(J||!j)){const oe=je&&Q,V=oe&&u&&ch(K,u),F=(V?!T(K,X,D,ee):!je||oe)&&!A(W,!!V,e,r);zt(ne,(G=>en(M,G))),zt(le,(G=>en(M,G))),ve=ve||F}!t&&j&&Q&&!T(K,X,D,ee)&&(en(z,X),Y=Y||B)})),v((W=>gc(M).reduce(((X,K)=>(en(X,aC(W,K)),ch(K,W)?en(X,K):X)),[]))),t)return!S&&ve&&n(!1),[!1];if(!vc(z)||Y){const W=[gc(z),Y];return S||n.apply(0,W),W}}},x=new g7(dt(b,!1));return[()=>(x.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:m,subtree:t,childList:t,characterData:t}),i=!0,()=>{i&&(p(),x.disconnect(),i=!1)}),()=>{if(i)return b(!0,x.takeRecords())}]};let Uo=null;const kC=(e,t,n)=>{const{ft:r}=n||{},i=ra(EC),[o]=wr({o:!1,u:!0});return()=>{const s=[],u=Im(`<div class="${Fm}"><div class="${Lm}"></div></div>`)[0],d=u.firstChild,f=p=>{const v=Vr(p)&&!vc(p);let y=!1,g=!1;if(v){const m=p[0],[b,,x]=o(m.contentRect),S=hh(b);g=pC(b,x),y=!g&&!S}else g=p===!0;y||t({_t:!0,ft:g})};if(Os){if(!qc(Uo)){const g=new Os(Ya);g.observe(e,{get box(){Uo=!0}}),Uo=Uo||!1,g.disconnect()}const p=eC(f,{p:0,v:0}),v=g=>p(g),y=new Os(v);if(y.observe(Uo?e:d),en(s,[()=>{y.disconnect()},!Uo&&Vn(e,u)]),Uo){const g=new Os(v);g.observe(e,{box:"border-box"}),en(s,(()=>g.disconnect()))}}else if(i){const[p,v]=i(d,f,r);en(s,Ks([Gc(u,j7),Ht(u,"animationstart",p),Vn(e,u)],v))}else return Ya;return dt(Sr,s)}},a9=(e,t)=>{let n;const r=u=>u.h===0||u.isIntersecting||u.intersectionRatio>0,i=Ms(N7),[o]=wr({o:!1}),s=(u,d)=>{if(u){const f=o(r(u)),[,p]=f;return p&&!d&&t(f)&&[f]}},l=(u,d)=>s(d.pop(),u);return[()=>{const u=[];if(f0)n=new f0(dt(l,!1),{root:e}),n.observe(i),en(u,(()=>{n.disconnect()}));else{const d=()=>{const f=go(i);s(f)};en(u,kC(i,d)()),d()}return dt(Sr,en(u,Vn(e,i)))},()=>n&&l(!0,n.takeRecords())]},l9=(e,t,n,r)=>{let i,o,s,l,u,d,f,p;const v=`[${_o}]`,y=`[${ji}]`,g=["id","class","style","open","wrap","cols","rows"],{dt:m,vt:b,L:x,gt:S,ht:O,V:T,bt:A,yt:M,wt:z,St:Y}=e,ve=P=>Si(P,"direction")==="rtl",W=()=>{let P,F,G;const N=eC(r,{p:()=>P,v:()=>F,S:()=>G,m(ge,fe){const[pe]=ge,[Ce]=fe;return[Ks(Zn(pe),Zn(Ce)).reduce((($e,Ke)=>($e[Ke]=pe[Ke]||Ce[Ke],$e)),{})]}}),ie=(ge,fe)=>{if(Vr(fe)){const[pe,Ce,$e]=fe;P=pe,F=Ce,G=$e}else vo(fe)?(P=fe,F=!1,G=!1):(P=!1,F=!1,G=!1);N(ge)};return ie.O=N.O,ie},X={Ot:!1,B:ve(m)},K=xi(),L=ra(Um),[D]=wr({i:Om,o:{w:0,h:0}},(()=>{const P=L&&L.R(e,t,X,K,n).Y,G=!(A&&T)&&Pm(b,_o,ec),N=!T&&M(D7),ie=N&&Er(S),ge=ie&&Y(),fe=z(yC,G),pe=N&&P&&P(),Ce=yc(x),$e=Mm(x);return pe&&pe(),Ur(S,ie),ge&&ge(),G&&fe(),{w:Ce.w+$e.w,h:Ce.h+$e.h}})),ne=W(),le=P=>{const F=ve(m);Ft(P,{Ct:p!==F}),Ft(X,{B:F}),p=F},je=(P,F)=>{const[G,N]=P,ie={$t:N};return Ft(X,{Ot:G}),F||r(ie),ie},J=({_t:P,ft:F})=>{const G=F?r:ne,N={_t:P||F,ft:F};le(N),G(N,o)},j=(P,F)=>{const[,G]=D(),N={xt:G};return le(N),G&&!F&&ne(N,P?s:i),N},de=(P,F,G)=>{const N={Ht:F};return le(N),F&&!G&&ne(N,i),N},[U,ee]=O?a9(b,je):[],Q=!T&&kC(b,J,{ft:!0}),[B,oe]=O0(b,!1,de,{ct:g,et:g}),V=T&&Os&&new Os((P=>{const F=P[P.length-1].contentRect;J({_t:!0,ft:pC(F,f)}),f=F}));return[()=>{V&&V.observe(b);const P=Q&&Q(),F=U&&U(),G=B(),N=K.G((ie=>{const[,ge]=D();ne({Et:ie,xt:ge,_t:A},l)}));return()=>{V&&V.disconnect(),P&&P(),F&&F(),d&&d(),G(),N()}},({Dt:P,zt:F,It:G})=>{const N={},[ie]=P("update.ignoreMutation"),[ge,fe]=P("update.attributes"),[pe,Ce]=P("update.elementEvents"),[$e,Ke]=P("update.debounce"),Ne=Ce||fe,tt=F||G,Ge=Ze=>li(ie)&&!!ie(Ze);if(Ne){u&&u(),d&&d();const[Ze,Pt]=O0(O||x,!0,j,{et:Ks(g,ge||[]),rt:pe,it:v,ut:(St,Nt)=>{const{target:It,attributeName:qt}=St;return(!Nt&&qt&&!T?w7(It,v,y):!1)||!!As(It,`.${Cr}`)||Ge(St)}});d=Ze(),u=Pt}if(Ke&&(ne.O(),Vr($e)||vo($e)?(i=$e,o=!1,s=SC,l=CC):Wa($e)?(i=$e.mutation,o=$e.resize,s=$e.event,l=$e.env):(i=!1,o=!1,s=!1,l=!1)),tt){const Ze=oe(),Pt=ee&&ee(),St=u&&u();Ze&&Ft(N,de(Ze[0],Ze[1],tt)),Pt&&Ft(N,je(Pt[0],tt)),St&&Ft(N,j(St[0],tt))}return le(N),N},X]},OC=(e,t)=>li(t)?t.apply(0,e):t,u9=(e,t,n,r)=>{const i=Sm(r)?n:r;return OC(e,i)||t.apply(0,e)},$C=(e,t,n,r)=>{const i=Sm(r)?n:r,o=OC(e,i);return!!o&&(mc(o)?o:t.apply(0,e))},c9=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{M:i,P:o,K:s}=xi(),{nativeScrollbarsOverlaid:l,body:u}=s().cancel,d=n??l,f=Sm(r)?u:r,p=(i.x||i.y)&&d,v=e&&(Hc(f)?!o:f);return!!p||!!v},d9=(e,t,n,r)=>{const i="--os-viewport-percent",o="--os-scroll-percent",s="--os-scroll-direction",{K:l}=xi(),{scrollbars:u}=l(),{slot:d}=u,{dt:f,vt:p,L:v,At:y,gt:g,bt:m,V:b}=t,{scrollbars:x}=y?{}:e,{slot:S}=x||{},O=[],T=[],A=[],M=$C([f,p,v],(()=>b&&m?f:p),d,S),z=U=>{if(Ra){let ee=null,Q=[];const B=new Ra({source:g,axis:U}),oe=()=>{ee&&ee.cancel(),ee=null};return{Mt:P=>{const{Tt:F}=n,G=mp(F)[U],N=U==="x",ie=[pp(0,N),pp(`calc(-100% + 100cq${N?"w":"h"})`,N)],ge=G?ie:ie.reverse();return Q[0]===ge[0]&&Q[1]===ge[1]||(Q=ge,oe(),ee=P.kt.animate({clear:["left"],transform:ge},{timeline:B})),oe}}}},Y={x:z("x"),y:z("y")},ve=()=>{const{Rt:U,Vt:ee}=n,Q=(B,oe)=>rC(0,1,B/(B+oe)||0);return{x:Q(ee.x,U.x),y:Q(ee.y,U.y)}},W=(U,ee,Q)=>{const B=Q?Gc:sC;zt(U,(oe=>{B(oe.Lt,ee)}))},X=(U,ee)=>{zt(U,(Q=>{const[B,oe]=ee(Q);Qs(B,oe)}))},K=(U,ee,Q)=>{const B=qc(Q),oe=B?Q:!0,V=B?!Q:!0;oe&&W(T,U,ee),V&&W(A,U,ee)},L=()=>{const U=ve(),ee=Q=>B=>[B.Lt,{[i]:ph(Q)+""}];X(T,ee(U.x)),X(A,ee(U.y))},D=()=>{if(!Ra){const{Tt:U}=n,ee=_0(U,Er(g)),Q=B=>oe=>[oe.Lt,{[o]:ph(B)+""}];X(T,Q(ee.x)),X(A,Q(ee.y))}},ne=()=>{const{Tt:U}=n,ee=mp(U),Q=B=>oe=>[oe.Lt,{[s]:B?"0":"1"}];X(T,Q(ee.x)),X(A,Q(ee.y)),Ra&&(T.forEach(Y.x.Mt),A.forEach(Y.y.Mt))},le=()=>{if(b&&!m){const{Rt:U,Tt:ee}=n,Q=mp(ee),B=_0(ee,Er(g)),oe=V=>{const{Lt:P}=V,F=Ka(P)===v&&P,G=(N,ie,ge)=>{const fe=ie*N;return dC(ge?fe:-fe)};return[F,F&&{transform:pp({x:G(B.x,U.x,Q.x),y:G(B.y,U.y,Q.y)})}]};X(T,oe),X(A,oe)}},je=U=>{const ee=U?"x":"y",B=Ms(`${Cr} ${U?V7:H7}`),oe=Ms(wC),V=Ms(jm),P={Lt:B,Pt:oe,kt:V},F=Y[ee];return en(U?T:A,P),en(O,[Vn(B,oe),Vn(oe,V),dt(Gs,B),F&&F.Mt(P),r(P,K,U)]),P},J=dt(je,!0),j=dt(je,!1),de=()=>(Vn(M,T[0].Lt),Vn(M,A[0].Lt),dt(Sr,O));return J(),j(),[{Ut:L,Nt:D,qt:ne,Bt:le,Ft:K,jt:{Xt:T,Yt:J,Wt:dt(X,T)},Jt:{Xt:A,Yt:j,Wt:dt(X,A)}},de]},f9=(e,t,n,r,i)=>(o,s,l)=>{const{vt:u,L:d,V:f,gt:p,Gt:v,St:y}=t,{Lt:g,Pt:m,kt:b}=o,[x,S]=$s(333),[O,T]=$s(444),A=Y=>{li(p.scrollBy)&&p.scrollBy({behavior:"smooth",left:Y.x,top:Y.y})},M=()=>{const Y="pointerup pointercancel lostpointercapture",ve=`client${l?"X":"Y"}`,W=l?dl:fl,X=l?"left":"top",K=l?"w":"h",L=l?"x":"y",D=[];return Ht(m,"pointerdown",r((ne=>{const le=As(ne.target,`.${jm}`)===b,je=le?b:m,J=e.scrollbars,j=J[le?"dragScroll":"clickScroll"],{button:de,isPrimary:U,pointerType:ee}=ne,{pointers:Q}=J;if(de===0&&U&&j&&(Q||[]).includes(ee)){Sr(D),T();const oe=!le&&(ne.shiftKey||j==="instant"),V=dt(hp,b),P=dt(hp,m),F=(It,qt)=>(It||V())[X]-(qt||P())[X],G=uh(hp(p)[W])/go(p)[K]||1,N=Er(p)[L],ie=It=>{Ur(p,{[L]:N+It})},ge=It=>{const{Rt:qt}=n,Gt=go(m)[K]-go(b)[K],Wt=1/G*It/Gt;ie(Wt*qt[L])},fe=ne[ve],pe=V(),Ce=P(),$e=pe[W],Ke=F(pe,Ce)+$e/2,tt=fe-Ce[X]-Ke,Ge=le?0:tt,Ze=It=>{Sr(Nt),je.releasePointerCapture(It.pointerId)},Pt=le||oe,St=y(),Nt=[Ht(v,Y,Ze),Ht(v,"selectstart",(It=>mh(It)),{D:!1}),Ht(m,Y,Ze),Pt&&Ht(m,"pointermove",(It=>ge(Ge+It[ve]-fe))),Pt&&(()=>{const It=Er(p);St();const qt=Er(p),Gt={x:qt.x-It.x,y:qt.y-It.y};(po(Gt.x)>3||po(Gt.y)>3)&&(y(),Ur(p,It),A(Gt),O(St))})];if(je.setPointerCapture(ne.pointerId),oe)ge(tt);else if(!le){const It=ra(e9);if(It){const{Vt:qt}=n,Gt=It(ie,ge,dt(F),tt,qt[L],j,!!l,(Wt=>{Wt?St():en(Nt,St)}));en(Nt,Gt),en(D,dt(Gt,!0))}}}})))};let z=!0;return dt(Sr,[Ht(b,"pointermove pointerleave",r(i)),Ht(g,"pointerenter",r((()=>{s(S0,!0)}))),Ht(g,"pointerleave pointercancel",r((()=>{s(S0,!1)}))),Ht(g,"wheel",r((Y=>{const{deltaX:ve,deltaY:W,deltaMode:X}=Y;z&&X===0&&Ka(g)===u&&A({x:ve,y:W}),z=!1,s(x0,!0),x((()=>{z=!0,s(x0)})),mh(Y)})),{D:!1,I:!0}),!f&&Ht(g,"mousedown",r((()=>{const Y=fh();(h0(Y,ji)||h0(Y,_o)||Y===document.body)&&Em(dt(vh,d),25)}))),Ht(g,"pointerdown",(()=>{const Y=Ht(v,"click",(W=>{ve(),hC(W)}),{A:!0,I:!0,D:!1}),ve=Ht(v,"pointerup pointercancel",(()=>{ve(),setTimeout(Y,150)}),{I:!0,D:!0})}),{I:!0,D:!0}),M(),S,T])},p9=(e,t,n,r,i,o,s)=>{let l,u,d,f,p,v=Ya,y=0;const g=["mouse","pen"],m=V=>P=>{n.Kt||V(P)},b=V=>g.includes(V.pointerType),[x,S]=$s(),[O,T]=$s(100),[A,M]=$s(50),[z,Y]=$s((()=>y)),[ve,W]=d9(e,o,i,f9(t,o,i,m,(V=>b(V)&&de()))),{vt:X,Qt:K,bt:L}=o,{Ft:D,Ut:ne,Nt:le,qt:je,Bt:J}=ve,j=(V,P)=>{Y();const F=G=>{n.Kt||D(Y7,G)};if(V)F();else{const G=d?!l:!0;y>0&&!P?z(dt(F,G)):F(G)}},de=()=>{(d?!l:!f)&&(j(!0),O((()=>{j(!1)})))},U=V=>{b(V)&&(l=!0,!n.Kt&&d&&j(!0))},ee=V=>{b(V)&&(l=!1,!n.Kt&&d&&j(!1))},Q=V=>{D(yh,V,!0),D(yh,V,!1)},B=[Y,T,M,S,()=>v(),Ht(X,"pointerover",U,{A:!0}),Ht(X,"pointerenter",U),Ht(X,"pointerleave",ee),Ht(X,"pointermove",m((V=>{b(V)&&u&&de()}))),Ht(K,"scroll",m((V=>{x((()=>{le(),de()})),s(V),J()})))],oe=ra(Um);return[()=>dt(Sr,en(B,W())),({Dt:V,It:P,Zt:F,tn:G})=>{const{nn:N,sn:ie,en:ge,cn:fe}=G||{},{Ct:pe,ft:Ce}=F||{},{B:$e}=r,{M:Ke,P:Ne}=xi(),{rn:tt,j:Ge}=i,[Ze,Pt]=V("showNativeOverlaidScrollbars"),[St,Nt]=V("scrollbars.theme"),[It,qt]=V("scrollbars.visibility"),[Gt,Wt]=V("scrollbars.autoHide"),[nn,Dn]=V("scrollbars.autoHideSuspend"),[_e]=V("scrollbars.autoHideDelay"),[ue,ye]=V("scrollbars.dragScroll"),[Fe,qe]=V("scrollbars.clickScroll"),[xe,et]=V("overflow"),be=Ce&&!P,ke=N||ie||fe||pe||P,Ie=ge||qt||et,Oe=Ze&&Ke.x&&Ke.y,Ue=!Ne&&!oe,pr=Oe||Ue,Fn=(qn,kn,dn)=>{const ko=qn.includes(Ko)&&(It===Ui||It==="auto"&&kn===Ko);return D(q7,ko,dn),ko};if(y=_e,(Pt||Ue)&&D(z7,pr),Nt&&(D(p),D(St,!0),p=St),(Dn||be)&&(Q(!nn),be&&nn&&(Ge.x||Ge.y?(v(),A((()=>{v=Ht(K,Ko,m(dt(Q,!0)),{A:!0})}))):Q(!0))),Wt&&(u=Gt==="move",d=Gt==="leave",f=Gt==="never",j(f,!0)),ye&&D(G7,ue),qe&&D(K7,!!Fe),Ie){const qn=Fn(xe.x,tt.x,!0),kn=Fn(xe.y,tt.y,!1);D(W7,!(qn&&kn))}ke&&(le(),ne(),J(),fe&&je(),D(C0,!Ge.x,!0),D(C0,!Ge.y,!1),D(B7,$e&&!L))},{},ve]},h9=e=>{const t=xi(),{K:n,P:r}=t,{elements:i}=n(),{padding:o,viewport:s,content:l}=i,u=mc(e),d=u?{}:e,{elements:f}=d,{padding:p,viewport:v,content:y}=f||{},g=u?e:d.target,m=lC(g),b=g.ownerDocument,x=b.documentElement,S=()=>b.defaultView||nr,O=dt(u9,[g]),T=dt($C,[g]),A=dt(Ms,""),M=dt(O,A,s),z=dt(T,A,l),Y=pe=>{const Ce=go(pe),$e=yc(pe),Ke=Si(pe,Tm),Ne=Si(pe,km);return $e.w-Ce.w>0&&!Rs(Ke)||$e.h-Ce.h>0&&!Rs(Ne)},ve=M(v),W=ve===g,X=W&&m,K=!W&&z(y),L=!W&&ve===K,D=X?x:ve,ne=X?D:g,le=!W&&T(A,o,p),je=!L&&K,J=[je,D,le,ne].map((pe=>mc(pe)&&!Ka(pe)&&pe)),j=pe=>pe&&WS(J,pe),de=!j(D)&&Y(D)?D:g,U=X?x:D,Q={dt:g,vt:ne,L:D,ln:le,ht:je,gt:U,Qt:X?b:D,an:m?x:de,Gt:b,bt:m,At:u,V:W,un:S,yt:pe=>Pm(D,ji,pe),wt:(pe,Ce)=>_c(D,ji,pe,Ce),St:()=>_c(U,ji,F7,!0)},{dt:B,vt:oe,ln:V,L:P,ht:F}=Q,G=[()=>{pi(oe,[_o,vp]),pi(B,vp),m&&pi(x,[vp,_o])}];let N=dh([F,P,V,oe,B].find((pe=>pe&&!j(pe))));const ie=X?B:F||P,ge=dt(Sr,G);return[Q,()=>{const pe=S(),Ce=fh(),$e=Ze=>{Vn(Ka(Ze),dh(Ze)),Gs(Ze)},Ke=Ze=>Ht(Ze,"focusin focusout focus blur",hC,{I:!0,D:!1}),Ne="tabindex",tt=Am(P,Ne),Ge=Ke(Ce);return Li(oe,_o,W?"":P7),Li(V,_h,""),Li(P,ji,""),Li(F,w0,""),W||(Li(P,Ne,tt||"-1"),m&&Li(x,b0,"")),Vn(ie,N),Vn(oe,V),Vn(V||oe,!W&&P),Vn(P,F),en(G,[Ge,()=>{const Ze=fh(),Pt=j(P),St=Pt&&Ze===P?B:Ze,Nt=Ke(St);pi(V,_h),pi(F,w0),pi(P,ji),m&&pi(x,b0),tt?Li(P,Ne,tt):pi(P,Ne),j(F)&&$e(F),Pt&&$e(P),j(V)&&$e(V),vh(St),Nt()}]),r&&!W&&(Rm(P,ji,bC),en(G,dt(pi,P,ji))),vh(!W&&m&&Ce===B&&pe.top===pe?P:Ce),Ge(),N=0,ge},ge]},m9=({ht:e})=>({Zt:t,fn:n,It:r})=>{const{$t:i}=t||{},{Ot:o}=n;e&&(i||r)&&Qs(e,{[fl]:o&&"100%"})},v9=({vt:e,ln:t,L:n,V:r},i)=>{const[o,s]=wr({i:y7,o:v0()},dt(v0,e,"padding",""));return({Dt:l,Zt:u,fn:d,It:f})=>{let[p,v]=s(f);const{P:y}=xi(),{_t:g,xt:m,Ct:b}=u||{},{B:x}=d,[S,O]=l("paddingAbsolute");(g||v||(f||m))&&([p,v]=o(f));const A=!r&&(O||b||v);if(A){const M=!S||!t&&!y,z=p.r+p.l,Y=p.t+p.b,ve={[JS]:M&&!x?-z:0,[ZS]:M?-Y:0,[XS]:M&&x?-z:0,top:M?-p.t:0,right:M?x?-p.r:"auto":0,left:M?x?"auto":-p.l:0,[dl]:M&&`calc(100% + ${z}px)`},W={[YS]:M?p.t:0,[KS]:M?p.r:0,[QS]:M?p.b:0,[GS]:M?p.l:0};Qs(t||n,ve),Qs(n,W),Ft(i,{ln:p,_n:!M,F:t?W:Ft({},ve,W)})}return{dn:A}}},g9=(e,t)=>{const n=xi(),{vt:r,ln:i,L:o,V:s,Qt:l,gt:u,bt:d,wt:f,un:p}=e,{P:v}=n,y=d&&s,g=dt(HS,0),m={display:()=>!1,direction:B=>B!=="ltr",flexDirection:B=>B.endsWith("-reverse"),writingMode:B=>B!=="horizontal-tb"},b=Zn(m),x={i:Om,o:{w:0,h:0}},S={i:Ju,o:{}},O=B=>{f(yC,!y&&B)},T=()=>Si(o,b),A=(B,oe)=>{const V=!Zn(B).length,P=oe?!0:b.some((Ne=>{const tt=B[Ne];return na(tt)&&m[Ne](tt)}));if(V||!P||!k7(o))return{T:{x:0,y:0},k:{x:1,y:1}};O(!0);const F=Er(u),G=Ht(l,Ko,(Ne=>{const tt=Er(u);Ne.isTrusted&&tt.x===F.x&&tt.y===F.y&&Dm(Ne)}),{I:!0,A:!0}),N=f(L7,!0);Ur(u,{x:0,y:0}),N();const ie=Er(u),ge=yc(u);Ur(u,{x:ge.w,y:ge.h});const fe=Er(u),pe={x:fe.x-ie.x,y:fe.y-ie.y};Ur(u,{x:-ge.w,y:-ge.h});const Ce=Er(u),$e={x:Ce.x-ie.x,y:Ce.y-ie.y},Ke={x:po(pe.x)>=po($e.x)?fe.x:Ce.x,y:po(pe.y)>=po($e.y)?fe.y:Ce.y};return Ur(u,F),qa((()=>G())),{T:ie,k:Ke}},M=(B,oe)=>{const V=nr.devicePixelRatio%1!==0?1:0,P={w:g(B.w-oe.w),h:g(B.h-oe.h)};return{w:P.w>V?P.w:0,h:P.h>V?P.h:0}},z=(B,oe)=>{const V=(P,F,G,N)=>{const ie=P===Ui?ti:J7(P),ge=Rs(P),fe=Rs(G);return!F&&!N?ti:ge&&fe?Ui:ge?F&&N?ie:F?Ui:ti:F?ie:fe&&N?Ui:ti};return{x:V(oe.x,B.x,oe.y,B.y),y:V(oe.y,B.y,oe.x,B.x)}},Y=B=>{const oe=P=>[Ui,ti,Ko].map((F=>Q(bh(F),P))),V=oe(!0).concat(oe()).join(" ");f(V),f(Zn(B).map((P=>Q(B[P],P==="x"))).join(" "),!0)},[ve,W]=wr(x,dt(Mm,o)),[X,K]=wr(x,dt(yc,o)),[L,D]=wr(x),[ne]=wr(S),[le,je]=wr(x),[J]=wr(S),[j]=wr({i:(B,oe)=>Yc(B,oe,gc(Ks(Zn(B),Zn(oe)))),o:{}}),[de,U]=wr({i:(B,oe)=>Ju(B.T,oe.T)&&Ju(B.k,oe.k),o:mC()}),ee=ra(Um),Q=(B,oe)=>`${oe?I7:M7}${_7(B)}`;return({Dt:B,Zt:oe,fn:V,It:P},{dn:F})=>{const{_t:G,Ht:N,xt:ie,Ct:ge,ft:fe,Et:pe}=oe||{},Ce=ee&&ee.R(e,t,V,n,B),{X:$e,Y:Ke,W:Ne}=Ce||{},[tt,Ge]=X7(B,n),[Ze,Pt]=B("overflow"),St=Rs(Ze.x),Nt=Rs(Ze.y),It=G||F||ie||ge||pe||Ge;let qt=W(P),Gt=K(P),Wt=D(P),nn=je(P);if(Ge&&v&&f(bC,!tt),It){Pm(r,_o,ec)&&O(!0);const bl=Ke&&Ke(),[is]=qt=ve(P),[Yi]=Gt=X(P),os=fC(o),Ki=y&&T7(p()),dd={w:g(Yi.w+is.w),h:g(Yi.h+is.h)},wl={w:g((Ki?Ki.w:os.w+g(os.w-Yi.w))+is.w),h:g((Ki?Ki.h:os.h+g(os.h-Yi.h))+is.h)};bl&&bl(),nn=le(wl),Wt=L(M(dd,wl),P)}const[Dn,_e]=nn,[ue,ye]=Wt,[Fe,qe]=Gt,[xe,et]=qt,[be]=ne({x:ue.w>0,y:ue.h>0}),ke=St&&Nt&&(be.x||be.y)||St&&be.x&&!be.y||Nt&&be.y&&!be.x,Ie=F||ge||pe||et||qe||_e||ye||Pt||Ge||It||N&&y,[Oe]=B("update.flowDirectionStyles"),[Ue,pr]=j(Oe?Oe(o)||{}:T(),P),Fn=ge||fe||pr||P,[qn,kn]=Fn?de(A(Ue,!!Oe),P):U();let dn=z(be,Ze);O(!1),Ie&&(Y(dn),dn=Z7(o,be),Ne&&$e&&($e(dn,Fe,xe),Qs(o,Ne(dn))));const[ko,cd]=J(dn);return _c(r,_o,ec,ke),_c(i,_h,ec,ke),Ft(t,{rn:ko,Vt:{x:Dn.w,y:Dn.h},Rt:{x:ue.w,y:ue.h},j:be,Tt:O7(qn,ue)}),{en:cd,nn:_e,sn:ye,cn:kn||ye}}},_9=e=>{const[t,n,r]=h9(e),i={ln:{t:0,r:0,b:0,l:0},_n:!1,F:{[JS]:0,[ZS]:0,[XS]:0,[YS]:0,[KS]:0,[QS]:0,[GS]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},rn:{x:ti,y:ti},j:{x:!1,y:!1},Tt:mC()},{dt:o,gt:s,V:l,St:u}=t,{P:d,M:f}=xi(),p=!d&&(f.x||f.y),v=[m9(t),v9(t,i),g9(t,i)];return[n,y=>{const g={},b=p&&Er(s),x=b&&u();return zt(v,(S=>{Ft(g,S(y,g)||{})})),Ur(s,b),x&&x(),l||Ur(o,0),g},i,t,r]},y9=(e,t,n,r)=>{let i=!1;const o={Kt:!1,pn:!1},s=gp(t,{}),[l,u,d,f,p]=_9(e),[v,y,g]=l9(f,d,s,(T=>{O({},T)})),[m,b,,x]=p9(e,t,o,g,d,f,r),S=T=>Zn(T).some((A=>!!T[A])),O=(T,A)=>{const{Kt:M,pn:z}=o;if(z||M&&i)return!1;const{vn:Y,It:ve,zt:W}=T,X=Y||{},K=!!ve||!i,L={Dt:gp(t,X,K),vn:X,It:K},D=A||y(Ft({},L,{zt:W})),ne=u(Ft({},L,{fn:g,Zt:D}));b(Ft({},L,{Zt:D,tn:ne}));const le=S(D),je=S(ne),J=le||je||!$m(X)||K;return i=!0,J&&n(T,{Zt:D,tn:ne}),J};return[()=>{const{an:T,gt:A,St:M}=f,z=Er(T),Y=[v(),l(),m(),()=>{o.pn=!0}],ve=M();return Ur(A,z),ve(),dt(Sr,Y)},O,T=>{const A=o.Kt;o.Kt=T,!T&&A!==T&&O({It:!0,zt:!0})},()=>{b({Dt:gp(t,{},!1),vn:{},It:!1})},()=>({gn:o,hn:g,bn:d}),{yn:f,wn:x},p]},Nm=new WeakMap,b9=(e,t)=>{Nm.set(e,t)},w9=e=>{Nm.delete(e)},AC=e=>Nm.get(e),Hr=(e,t,n)=>{const{tt:r}=xi(),i=mc(e),o=i?e:e.target,s=AC(o);if(t&&!s){const l=[],u={},d=K=>{const L=nC(K),D=ra(R7);return D?D(L,!0):L},f=Ft({},r(),d(t)),[p,v,y]=gh(),[g,m,b]=gh(n),x=(K,L)=>{b(K,L),y(K,L)},[S,O,T,A,M,z,Y]=y9(e,f,(({vn:K,It:L},{Zt:D,tn:ne})=>{const{_t:le,Ct:je,$t:J,xt:j,Ht:de,ft:U}=D,{nn:ee,sn:Q,en:B,cn:oe}=ne;x("updated",[X,{updateHints:{sizeChanged:!!le,directionChanged:!!je,heightIntrinsicChanged:!!J,overflowEdgeChanged:!!ee,overflowAmountChanged:!!Q,overflowStyleChanged:!!B,scrollCoordinatesChanged:!!oe,contentMutation:!!j,hostMutation:!!de,appear:!!U},changedOptions:K||{},force:!!L}])}),(K=>x("scroll",[X,K]))),ve=K=>{const{gn:L}=M(),{pn:D}=L;D||(w9(o),Sr(l),x("destroyed",[X,K]),v(),m())},X={options(K,L){if(K){const D=L?r():{},ne=xC(f,Ft(D,d(K)));$m(ne)||(Ft(f,ne),O({vn:ne}))}return Ft({},f)},on:g,off:(K,L)=>{K&&L&&m(K,L)},state(){const{gn:K,hn:L,bn:D}=M(),{pn:ne,Kt:le}=K,{B:je}=L,{Vt:J,Rt:j,rn:de,j:U,ln:ee,_n:Q,Tt:B}=D;return Ft({},{overflowEdge:J,overflowAmount:j,overflowStyle:de,hasOverflow:U,scrollCoordinates:{start:B.T,end:B.k},padding:ee,paddingAbsolute:Q,directionRTL:je,sleeping:le,destroyed:ne})},elements(){const{dt:K,vt:L,ln:D,L:ne,ht:le,gt:je,Qt:J}=z.yn,{jt:j,Jt:de}=z.wn,U=Q=>{const{kt:B,Pt:oe,Lt:V}=Q;return{scrollbar:V,track:oe,handle:B}},ee=Q=>{const{Xt:B,Yt:oe}=Q,V=U(B[0]);return Ft({},V,{clone:()=>{const P=U(oe());return A(),P}})};return Ft({},{target:K,host:L,padding:D||ne,viewport:ne,content:le||ne,scrollOffsetElement:je,scrollEventElement:J,scrollbarHorizontal:ee(j),scrollbarVertical:ee(de)})},update:K=>O({It:K,zt:!0}),destroy:dt(ve,!1),sleep:T,plugin:K=>u[Zn(K)[0]]};return en(l,[Y]),b9(o,X),_C(vC,Hr,[X,p,u]),c9(z.yn.bt,!i&&e.cancel)?(ve(!0),X):(en(l,S()),x("initialized",[X]),X.update(),X)}return s};Hr.plugin=e=>{const t=Vr(e),n=t?e:[e],r=n.map((i=>_C(i,Hr)[0]));return $7(n),t?r:r[0]};Hr.valid=e=>{const t=e&&e.elements,n=li(t)&&t();return Wa(n)&&!!AC(n.target)};Hr.env=()=>{const{U:e,M:t,P:n,J:r,ot:i,st:o,K:s,Z:l,tt:u,nt:d}=xi();return Ft({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:r,staticDefaultInitialization:i,staticDefaultOptions:o,getDefaultInitialization:s,setDefaultInitialization:l,getDefaultOptions:u,setDefaultOptions:d})};Hr.nonce=i9;Hr.trustedTypePolicy=S7;class E9{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,n){const r=this._listeners.get(t)??new Set;return this._listeners.set(t,r),r.add(n),this}removeEventListener(t,n){var r;return(r=this._listeners.get(t))==null||r.delete(n),this}dispatchEvent(t,...n){let r=!0;for(const i of this._listeners.get(t)??[])r=i(...n)!==!1&&r;return r}unbindAllListeners(){this._listeners.clear()}}const $0=(e,t="px")=>typeof e=="number"?e+t:e,oo=({style:e},t,n)=>{if(typeof t=="object")for(const[r,i]of Object.entries(t))i!==void 0&&(e[r]=$0(i));else n!==void 0&&(e[t]=$0(n))},A0=(e=0,t=0,n=0,r=0)=>{const i={x:e,y:t,width:n,height:r,top:t,left:e,right:e+n,bottom:t+r};return{...i,toJSON:()=>JSON.stringify(i)}},S9=e=>{let t,n=-1,r=!1;return{next:(...i)=>{t=i,r||(r=!0,n=requestAnimationFrame(()=>{e(...t),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},R0=(e,t,n="touch")=>{switch(n){case"center":{const r=t.left+t.width/2,i=t.top+t.height/2;return r>=e.left&&r<=e.right&&i>=e.top&&i<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},C9=()=>matchMedia("(hover: none), (pointer: coarse)").matches,x9=()=>"safari"in window,wh=e=>Array.isArray(e)?e:[e],RC=e=>(t,n,r,i={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=wh(n),t=wh(t);for(const o of t)if(o)for(const s of n)o[e](s,r,{capture:!1,...i})},so=RC("addEventListener"),Qr=RC("removeEventListener"),Mu=e=>{var t;const{clientX:n,clientY:r,target:i}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:r,target:i}},Es=(e,t=document)=>wh(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),T9=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:No,max:P0,min:I0,ceil:M0}=Math,D0=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}}),PC=class extends E9{constructor(t){var n,r,i,o,s;super(),this._selection=D0(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=A0(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(r=t.behaviour)==null?void 0:r.scrolling,startScrollMargins:{x:0,y:0,...(o=(i=t.behaviour)==null?void 0:i.scrolling)==null?void 0:o.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(s=t.features)==null?void 0:s.singleTap}}};for(const f of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[f]=="function"&&(this[f]=this[f].bind(this));const{document:l,selectionAreaClass:u,selectionContainerClass:d}=this._options;this._area=l.createElement("div"),this._clippingElement=l.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(u),d&&this._clippingElement.classList.add(d),oo(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),oo(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=S9(f=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",f),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:r}=this._options,i=t?so:Qr;i(n,"mousedown",this._onTapStart),r.touch&&i(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:r,y:i,target:o}=Mu(t),{document:s,startAreas:l,boundaries:u,features:d,behaviour:f}=this._options,p=o.getBoundingClientRect();if(t instanceof MouseEvent&&!T9(t,f.triggers))return;const v=Es(l,s),y=Es(u,s);this._targetElement=y.find(x=>R0(x.getBoundingClientRect(),p));const g=t.composedPath(),m=v.find(x=>g.includes(x));if(this._targetBoundary=y.find(x=>g.includes(x)),!this._targetElement||!m||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:r,y1:i,x2:0,y2:0};const b=s.scrollingElement??s.body;this._scrollDelta={x:b.scrollLeft,y:b.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),so(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),so(s,["mouseup","touchcancel","touchend"],this._onTapStop),so(s,"scroll",this._onScroll),d.deselectOnBlur&&(this._targetBoundaryScrolled=!1,so(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:r}=this._options.features,i=Mu(t);let o;if(n==="native")o=i.target;else if(n==="touch"){this.resolveSelectables();const{x:l,y:u}=i;o=this._selectables.find(d=>{const{right:f,left:p,top:v,bottom:y}=d.getBoundingClientRect();return l<f&&l>p&&u<y&&u>v})}if(!o)return;for(this.resolveSelectables();!this._selectables.includes(o);)if(o.parentElement)o=o.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&r&&this._latestElement){const l=this._latestElement,[u,d]=l.compareDocumentPosition(o)&4?[o,l]:[l,o],f=[...this._selectables.filter(p=>p.compareDocumentPosition(u)&4&&p.compareDocumentPosition(d)&2),u,d];this.select(f),this._latestElement=l}else s.includes(o)&&(s.length===1||t.ctrlKey||s.every(l=>this._selection.stored.includes(l)))?this.deselect(o):(this.select(o),this._latestElement=o)}_delayedTapMove(t){const{container:n,document:r,behaviour:{startThreshold:i}}=this._options,{x1:o,y1:s}=this._areaLocation,{x:l,y:u}=Mu(t);if(typeof i=="number"&&No(l+u-(o+s))>=i||typeof i=="object"&&No(l-o)>=i.x||No(u-s)>=i.y){if(Qr(r,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){Qr(r,["mouseup","touchcancel","touchend"],this._onTapStop);return}so(r,["mousemove","touchmove"],this._onTapMove,{passive:!1}),oo(this._area,"display","block"),Es(n,r)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(so(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),so(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(d=>this._targetElement.contains(d))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:r}=this,i=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(oo(t,{top:i.top,left:i.left,width:i.width,height:i.height}),oo(r,{marginTop:-i.top,marginLeft:-i.left})):(oo(t,{top:0,left:0,width:"100%",height:"100%"}),oo(r,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:r,_options:i,_frame:o}=this,{speedDivider:s}=i.behaviour.scrolling,l=this._targetElement,{x:u,y:d}=Mu(t);if(r.x2=u,r.y2=d,this._lastMousePosition.x=u,this._lastMousePosition.y=d,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const f=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:p,scrollLeft:v}=l;n.y&&(l.scrollTop+=M0(n.y/s),r.y1-=l.scrollTop-p),n.x&&(l.scrollLeft+=M0(n.x/s),r.x1-=l.scrollLeft-v),o.next(t),requestAnimationFrame(f)};requestAnimationFrame(f)}else o.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&C9()||this._scrollAvailable&&x9())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:r,scrollLeft:i}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-i,this._areaLocation.y1+=t.y-r,t.x=i,t.y=r,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,Qr(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,r=t.deltaY?t.deltaY>0?1:-1:0,i=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=r*n,this._scrollSpeed.x+=i*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,r=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,i=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(r)*n,this._scrollSpeed.y+=Math.sign(i)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:r,_options:i}=this,{scrollTop:o,scrollHeight:s,clientHeight:l,scrollLeft:u,scrollWidth:d,clientWidth:f}=r,p=this._targetRect,{x1:v,y1:y}=n;let{x2:g,y2:m}=n;const{behaviour:{scrolling:{startScrollMargins:b}}}=i;g<p.left+b.x?(t.x=u?-No(p.left-g+b.x):0,g=g<p.left?p.left:g):g>p.right-b.x?(t.x=d-u-f?No(p.left+p.width-g-b.x):0,g=g>p.right?p.right:g):t.x=0,m<p.top+b.y?(t.y=o?-No(p.top-m+b.y):0,m=m<p.top?p.top:m):m>p.bottom-b.y?(t.y=s-o-l?No(p.top+p.height-m-b.y):0,m=m>p.bottom?p.bottom:m):t.y=0;const x=I0(v,g),S=I0(y,m),O=P0(v,g),T=P0(y,m);this._areaRect=A0(x,S,O-x,T-S)}_redrawSelectionArea(){const{x:t,y:n,width:r,height:i}=this._areaRect,{style:o}=this._area;o.left=`${t}px`,o.top=`${n}px`,o.width=`${r}px`,o.height=`${i}px`}_onTapStop(t,n){var r;const{document:i,features:o}=this._options,{_singleClick:s}=this;Qr(this._targetElement,"scroll",this._onStartAreaScroll),Qr(i,["mousemove","touchmove"],this._delayedTapMove),Qr(i,["touchmove","mousemove"],this._onTapMove),Qr(i,["mouseup","touchcancel","touchend"],this._onTapStop),Qr(i,"scroll",this._onScroll),this._keepSelection(),t&&s&&o.singleTap.allow?this._onSingleTap(t):!s&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Qr(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Qr(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(r=this._frame)==null||r.cancel(),oo(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:r,_areaRect:i}=this,{stored:o,selected:s,touched:l}=r,{intersect:u,overlap:d}=n.behaviour,f=d==="invert",p=[],v=[],y=[];for(let m=0;m<t.length;m++){const b=t[m];if(R0(i,b.getBoundingClientRect(),u)){if(s.includes(b))o.includes(b)&&!l.includes(b)&&l.push(b);else if(f&&o.includes(b)){y.push(b);continue}else v.push(b);p.push(b)}}f&&v.push(...o.filter(m=>!s.includes(m)));const g=d==="keep";for(let m=0;m<s.length;m++){const b=s[m];!p.includes(b)&&!(g&&o.includes(b))&&y.push(b)}r.selected=p,r.changed={added:v,removed:y},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:r,changed:i,touched:o,stored:s}=n,l=r.filter(u=>!s.includes(u));switch(t.behaviour.overlap){case"drop":{n.stored=[...l,...s.filter(u=>!o.includes(u))];break}case"invert":{n.stored=[...l,...s.filter(u=>!i.removed.includes(u))];break}case"keep":{n.stored=[...s,...r.filter(u=>!s.includes(u))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=Es(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:r,stored:i,changed:o}=this._selection;o.added=[],o.removed.push(...r,...t?i:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=D0(t?[]:i)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,n=!1){const{changed:r,selected:i,stored:o}=this._selection,s=Es(t,this._options.document).filter(l=>!i.includes(l)&&!o.includes(l));return o.push(...s),i.push(...s),r.added.push(...s),r.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(t,n=!1){const{selected:r,stored:i,changed:o}=this._selection,s=Es(t,this._options.document).filter(l=>r.includes(l)||i.includes(l));this._selection.stored=i.filter(l=>!s.includes(l)),this._selection.selected=r.filter(l=>!s.includes(l)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(l=>!o.removed.includes(l))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};PC.version="3.9.0";let k9=PC;const O9="5.2.0",$9={version:O9},A9={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function R9(e,t){let n=t;return n||(n=new Error("Upload error")),typeof n=="string"&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),YV(e)?(n=new Zp(n,e),n):(n.request=e,n)}function F0(e){return e.data.slice(0,e.data.size,e.meta.type)}const P9={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:""};class I9 extends XV{static VERSION=$9.version;#e;#t;uploaderEvents;constructor(t,n){if(super(t,{...P9,fieldName:n.bundle?"files[]":"file",...n}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=A9,this.i18nInit(),this.#t=new KV({concurrency:this.opts.limit}),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&typeof this.opts.headers=="function")throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(n?.allowedMetaFields===void 0&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null),this.#e=r=>async(i,o)=>{try{const s=await jV(i,{...o,onBeforeRequest:(d,f)=>this.opts.onBeforeRequest?.(d,f,r),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:d=>{const f=Math.ceil(d/1e3),p=new Error(this.i18n("uploadStalled",{seconds:f}));this.uppy.emit("upload-stalled",p,r)},onUploadProgress:d=>{if(d.lengthComputable)for(const{id:f}of r){const p=this.uppy.getFile(f);p!=null&&this.uppy.emit("upload-progress",p,{uploadStarted:p.progress.uploadStarted??0,bytesUploaded:d.loaded/d.total*p.size,bytesTotal:p.size})}}});let l=await this.opts.getResponseData?.(s);if(s.responseType==="json")l??=s.response;else try{l??=JSON.parse(s.responseText)}catch(d){throw new Error("@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.",{cause:d})}const u=typeof l?.url=="string"?l.url:void 0;for(const{id:d}of r)this.uppy.emit("upload-success",this.uppy.getFile(d),{status:s.status,body:l,uploadURL:u});return s}catch(s){if(s.name==="AbortError")return;const l=s.request;for(const u of r)this.uppy.emit("upload-error",this.uppy.getFile(u.id),R9(l,s),l);throw s}}}getOptions(t){const n=this.uppy.getState().xhrUpload,{headers:r}=this.opts,i={...this.opts,...n||{},...t.xhrUpload||{},headers:{}};return typeof r=="function"?i.headers=r(t):Object.assign(i.headers,this.opts.headers),n&&Object.assign(i.headers,n.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,n,r){$b(r.allowedMetaFields,n).forEach(o=>{const s=n[o];Array.isArray(s)?s.forEach(l=>t.append(o,l)):t.append(o,s)})}createFormDataUpload(t,n){const r=new FormData;this.addMetadata(r,t.meta,n);const i=F0(t);return t.name?r.append(n.fieldName,i,t.meta.name):r.append(n.fieldName,i),r}createBundledUpload(t,n){const r=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(r,i,n),t.forEach(o=>{const s=this.getOptions(o),l=F0(o);o.name?r.append(s.fieldName,l,o.name):r.append(s.fieldName,l)}),r}async#n(t){const n=new JV(this.uppy),r=new AbortController;n.onFileRemove(t.id,()=>r.abort()),n.onCancelAll(t.id,()=>r.abort());try{await this.#t.add(async i=>{const o=this.getOptions(t),s=this.#e([t]),l=o.formData?this.createFormDataUpload(t,o):t.data,u=typeof o.endpoint=="string"?o.endpoint:await o.endpoint(t);return s(u,{...o,body:l,signal:AbortSignal.any([i,r.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{n.remove()}}async#r(t){const n=new AbortController;function r(){n.abort()}this.uppy.once("cancel-all",r);try{await this.#t.add(async i=>{const o=this.uppy.getState().xhrUpload??{},s=this.#e(t),l=this.createBundledUpload(t,{...this.opts,...o}),u=typeof this.opts.endpoint=="string"?this.opts.endpoint:await this.opts.endpoint(t);return s(u,{...this.opts,body:l,signal:AbortSignal.any([i,n.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{this.uppy.off("cancel-all",r)}}#o(t){const n=this.getOptions(t),r=$b(n.allowedMetaFields,t.meta);return{...t.remote?.body,protocol:"multipart",endpoint:n.endpoint,size:t.data.size,fieldname:n.fieldName,metadata:Object.fromEntries(r.map(i=>[i,t.meta[i]])),httpMethod:n.method,useFormData:n.formData,headers:n.headers}}async#i(t){await Promise.allSettled(t.map(n=>{if(n.isRemote){const r=()=>this.#t,i=new AbortController,o=s=>{s.id===n.id&&i.abort()};return this.uppy.on("file-removed",o),this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,this.#o(n),{signal:i.signal,getQueue:r}).finally(()=>{this.uppy.off("file-removed",o)})}return this.#n(n)}))}#a=async t=>{if(t.length===0){this.uppy.log("[XHRUpload] No files to upload!");return}this.opts.limit===0&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const n=this.uppy.getFilesByIds(t),r=zV(n),i=BV(r);if(this.uppy.emit("upload-start",i),this.opts.bundle){if(r.some(s=>s.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await this.#r(r)}else await this.#i(r)};install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.#a)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.#a)}}const zm=new Map,Eh=Symbol("ServiceContainerId");function M9(e,t){zm.set(e,t)}function D9(e){zm.delete(e)}function rt(e){const t=e??Fs(Eh);if(!t)throw new Error("No VueFinder app instance found. Make sure VueFinder component is mounted and provide the id explicitly or use within a VueFinder component tree.");const n=zm.get(t);if(!n)throw new Error(`VueFinder app instance with id "${t}" was not found. Make sure the VueFinder component with id="${t}" is mounted.`);return n}function F9(e){const t=localStorage.getItem(e+"_storage"),n=Hn(JSON.parse(t??"{}"));He(n,r);function r(){Object.keys(n).length?localStorage.setItem(e+"_storage",JSON.stringify(n)):localStorage.removeItem(e+"_storage")}function i(l,u){n[l]=u}function o(l){delete n[l]}function s(){Object.keys(n).forEach(l=>o(l))}return{getStore:(l,u=null)=>l in n?n[l]:u,setStore:i,removeStore:o,clearStore:s}}function yn(e,t="An error occurred"){if(!e)return t;if(typeof e=="string")return e||t;if(e instanceof Error)return e.message||t;if(typeof e=="object"&&e!==null){const n=e;if(typeof n.message=="string"&&n.message)return n.message;if(typeof n.error=="string"&&n.error)return n.error}return t}function L9(e,t){return LE(e,t,{encode:JSON.stringify,decode:JSON.parse})}function j9(e){if(!e?.config?.get)return!0;try{return!!e.config.get("notificationsEnabled")}catch{return!0}}function ks(e,t,n){const r={type:t,message:n};if(e?.emitter?.emit?.("vf-notify",r),!!j9(e))switch(t){case"success":wu.success(n);break;case"error":wu.error(n);break;case"warning":wu.warning(n);break;default:wu.info(n);break}}function cr(e){return{success(t){ks(e,"success",t)},error(t){ks(e,"error",t)},info(t){ks(e,"info",t)},warning(t){ks(e,"warning",t)},emit(t,n){ks(e,t,n)}}}const yp=new Map;async function bp(e,t){const n=t[e];return typeof n=="function"?(await n()).default:n}function U9(e,t,n,r,i){const o=cr({emitter:n,config:i}),s="vuefinder_locale",l="global";let u;if(yp.has(l))u=yp.get(l),t&&t!==u.get()&&u.set(t);else{const T=localStorage.getItem(s)?JSON.parse(localStorage.getItem(s)):null;u=L9(s,t||T||"en"),yp.set(l,u)}const d="vuefinder_translations",f=T=>{try{const A=localStorage.getItem(d);if(A)return JSON.parse(A)[T]||null}catch{}return null},p=(T,A)=>{try{const M=localStorage.getItem(d),z=M?JSON.parse(M):{};z[T]=A,localStorage.setItem(d,JSON.stringify(z))}catch{}},v=Qe(u),y=String(v.value),g=f(y),m=re(g||{});let b=!1;!g&&Object.keys(r).length>0&&bp(y,r).then(T=>{m.value=T,p(y,T)}).catch(()=>{}),He(v,async(T,A)=>{if(A&&T===A)return;if(!b){b=!0;const z=f(String(T));if(z)m.value=z;else if(Object.keys(r).length>0)try{const Y=await bp(String(T),r);m.value=Y,p(String(T),Y)}catch{}return}const M=f(String(T));if(M)m.value=M;else try{const z=await bp(String(T),r);m.value=z,p(String(T),z)}catch(z){const Y=yn(z,"Locale cannot be loaded!");o.error(Y);return}Object.values(r).length>1&&(o.success("The language is set to "+T),n.emit("vf-language-saved"))},{immediate:!1});const x=(T,...A)=>A.length?x(T=T.replace("%s",String(A.shift())),...A):T;function S(T,...A){return m.value&&Object.prototype.hasOwnProperty.call(m.value,T)?x(m.value[T]||T,...A):x(T,...A)}const O=se({get:()=>v.value,set:T=>{u.set(T)}});return Hn({t:S,locale:O,localeAtom:u})}const N9=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],IC={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:N9.reduce((e,t)=>(e[t]=!0,e),{})};function L0(){return IC.advanced}function MC(e){return e?e==="simple"||e==="advanced"?{...IC[e]}:{...L0(),...e}:L0()}const z9="4.6.0";function Bm(e,t,n,r,i){return t=Math,n=t.log,r=1024,i=n(e)/n(r)|0,(e/t.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"iB":"B")}function DC(e,t,n,r,i){return t=Math,n=t.log,r=1e3,i=n(e)/n(r)|0,(e/t.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"B":"B")}function B9(e){if(typeof e=="number")return e;const t={k:1,m:2,g:3,t:4},n=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(e);if(!n)return 0;const r=parseFloat(n[1]||"0"),i=(n[2]||"").toLowerCase(),o=t[i]??0;return Math.round(r*Math.pow(1024,o))}function V9(e){const t=_n(null),n=re(!1),r=re(),i=re(!1),o=_n(null);return{visible:n,type:t,data:r,open:(s,l=null)=>{e.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),n.value=!0,t.value=s,r.value=l},close:()=>{e.get("fullScreen")||(document.querySelector("body").style.overflow=""),n.value=!1,t.value=null,i.value=!1,o.value=null},setEditMode:s=>{i.value=s},editMode:i,controls:o,registerControls:s=>{o.value=s},unregisterControls:s=>{o.value===s&&(o.value=null)}}}const bc={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},wc={initialPath:null,maxFileSize:null,loadingIndicator:"circular",showMenuBar:!0,showToolbar:!0,gridItemWidth:96,gridItemHeight:80,gridItemGap:8,gridIconSize:48,listItemHeight:32,listItemGap:2,listIconSize:16,notificationPosition:"bottom-center",notificationDuration:3e3,notificationVisibleToasts:4,notificationRichColors:!0},H9=new Set(Object.keys(wc));function q9(e){return e||"silver"}function FC(e){return H9.has(e)}function j0(e){const t={},n={},r=e;for(const i in r)if(FC(i))n[i]=r[i];else if(i in bc){const o=i;t[o]=r[i]}return{persistenceConfig:t,nonPersistenceConfig:n}}function U0(e,t){const n={...bc,...e,...t};return n.theme=q9(n.theme),n}function N0(e,t){return{...wc,...t,...e}}const W9=(e,t={})=>{const n=`vuefinder_config_${e}`,{persistenceConfig:r,nonPersistenceConfig:i}=j0(t),o=U0(r,bc),s=N0(i,wc),l=LE(n,o,{encode:JSON.stringify,decode:JSON.parse}),u=An(s),d=lo([l,u],(g,m)=>({...g,...m})),f=(g={})=>{const m=l.get(),b=u.get(),{persistenceConfig:x,nonPersistenceConfig:S}=j0(g),O=U0(x,m),T=N0(S,b);l.set(O),u.set(T)},p=g=>FC(g)?u.get()[g]:l.get()[g],v=()=>({...l.get(),...u.get()}),y=(g,m)=>{const b=l.get();typeof g=="object"&&g!==null?l.set({...b,...g}):l.set({...b,[g]:m})};return{state:d,init:f,get:p,set:y,toggle:g=>{const m=l.get();y(g,!m[g])},all:v,reset:()=>{l.set({...bc}),u.set({...wc})}}},Jt=e=>`${e.type}:${e.path}`;function LC(e,t){if(typeof e=="string"&&typeof t=="string")return e.toLowerCase().localeCompare(t.toLowerCase());const n=Number(e)||0,r=Number(t)||0;return n===r?0:n<r?-1:1}const Y9=()=>{const e=An(""),t=An([]),n=An(!1),r=An([]),i=An({active:!1,column:"",order:""}),o=An({kind:"all",showHidden:!1}),s=An(new Set),l=An({type:"copy",path:"",items:new Set}),u=An(null),d=An(0),f=An(!1),p=An([]),v=An(-1),y=lo([e],fe=>{const pe=(fe??"").trim(),Ce=pe.indexOf("://"),$e=Ce>=0?pe.slice(0,Ce):"",Ke=(Ce>=0?pe.slice(Ce+3):pe).split("/").filter(Boolean);let Ne="";const tt=Ke.map(Ge=>(Ne=Ne?`${Ne}/${Ge}`:Ge,{basename:Ge,name:Ge,path:$e?`${$e}://${Ne}`:Ne,type:"dir"}));return{storage:$e,breadcrumb:tt,path:pe}}),g=lo([r,i,o],(fe,pe,Ce)=>{let $e=fe;Ce.kind==="files"?$e=$e.filter(Ze=>Ze.type==="file"):Ce.kind==="folders"&&($e=$e.filter(Ze=>Ze.type==="dir")),Ce.showHidden||($e=$e.filter(Ze=>!Ze.basename.startsWith(".")));const{active:Ke,column:Ne,order:tt}=pe;if(!Ke||!Ne)return $e;const Ge=tt==="asc"?1:-1;return $e.slice().sort((Ze,Pt)=>LC(Ze[Ne],Pt[Ne])*Ge)}),m=lo([r,s],(fe,pe)=>pe.size===0?[]:fe.filter(Ce=>pe.has(Jt(Ce)))),b=(fe,pe)=>{const Ce=e.get();if((pe??!0)&&Ce!==fe){const $e=p.get(),Ke=v.get();Ke<$e.length-1&&$e.splice(Ke+1),$e.length===0&&Ce&&$e.push(Ce),$e.push(fe),p.set([...$e]),v.set($e.length-1)}e.set(fe)},x=fe=>{r.set(fe??[])},S=fe=>{t.set(fe??[])},O=(fe,pe)=>{i.set({active:!0,column:fe,order:pe})},T=fe=>{const pe=i.get();pe.active&&pe.column===fe?i.set({active:pe.order==="asc",column:fe,order:"desc"}):i.set({active:!0,column:fe,order:"asc"})},A=()=>{i.set({active:!1,column:"",order:""})},M=(fe,pe)=>{o.set({kind:fe,showHidden:pe})},z=()=>{o.set({kind:"all",showHidden:!1})},Y=(fe,pe="multiple")=>{const Ce=new Set(s.get());pe==="single"&&Ce.clear(),Ce.add(fe),s.set(Ce)},ve=(fe,pe="multiple")=>{const Ce=new Set(s.get());pe==="single"&&Ce.clear(),fe.forEach($e=>Ce.add($e)),s.set(Ce)},W=fe=>{const pe=new Set(s.get());pe.delete(fe),s.set(pe)},X=fe=>s.get().has(fe),K=(fe,pe="multiple")=>{const Ce=new Set(s.get());Ce.has(fe)?Ce.delete(fe):(pe==="single"&&Ce.clear(),Ce.add(fe)),s.set(Ce)},L=(fe="multiple",pe)=>{if(fe==="single"){const Ce=r.get()[0];if(Ce){const $e=Jt(Ce);s.set(new Set([$e])),d.set(1)}}else{if(pe?.selectionFilterType||pe?.selectionFilterMimeIncludes&&pe.selectionFilterMimeIncludes.length>0){const Ce=r.get().filter($e=>{const Ke=pe.selectionFilterType,Ne=pe.selectionFilterMimeIncludes;return Ke==="files"&&$e.type==="dir"||Ke==="dirs"&&$e.type==="file"?!1:Ne&&Array.isArray(Ne)&&Ne.length>0&&$e.type!=="dir"?$e.mime_type?Ne.some(tt=>$e.mime_type?.startsWith(tt)):!1:!0}).map($e=>Jt($e));s.set(new Set(Ce))}else{const Ce=new Set(r.get().map($e=>Jt($e)));s.set(Ce)}le(s.get().size)}},D=()=>{s.set(new Set),d.set(0)},ne=fe=>{const pe=new Set(fe??[]),Ce=new Set(r.get().filter($e=>pe.has($e.path)).map($e=>Jt($e)));s.set(Ce),d.set(Ce.size)},le=fe=>{d.set(fe)},je=fe=>{f.set(!!fe)},J=()=>f.get(),j=(fe,pe)=>{const Ce=r.get().filter($e=>pe.has(Jt($e)));l.set({type:fe,path:y.get().path,items:new Set(Ce)})},de=fe=>lo([l],pe=>pe.type==="cut"&&Array.from(pe.items).some(Ce=>Jt(Ce)===fe)),U=fe=>lo([l],pe=>pe.type==="copy"&&Array.from(pe.items).some(Ce=>Jt(Ce)===fe));return{files:r,storages:t,currentPath:e,sort:i,filter:o,selectedKeys:s,selectedCount:d,loading:f,draggedItem:u,clipboardItems:l,path:y,sortedFiles:g,selectedItems:m,setPath:b,setFiles:x,setStorages:S,setSort:O,toggleSort:T,clearSort:A,setFilter:M,clearFilter:z,select:Y,selectMultiple:ve,deselect:W,toggleSelect:K,selectAll:L,isSelected:X,clearSelection:D,setSelection:ne,setSelectedCount:le,setLoading:je,isLoading:J,setClipboard:j,createIsCut:de,createIsCopied:U,isCut:fe=>{const pe=de(fe);return Qe(pe).value??!1},isCopied:fe=>{const pe=U(fe);return Qe(pe).value??!1},clearClipboard:()=>{l.set({type:"copy",path:"",items:new Set})},getClipboard:()=>l.get(),setDraggedItem:fe=>{u.set(fe)},getDraggedItem:()=>u.get(),clearDraggedItem:()=>{u.set(null)},setReadOnly:fe=>{n.set(fe)},getReadOnly:()=>n.get(),isReadOnly:fe=>n.get()?!0:fe.read_only??!1,goBack:()=>{const fe=p.get(),pe=v.get();if(pe>0){const Ce=pe-1,$e=fe[Ce];$e&&(v.set(Ce),b($e,!1))}},goForward:()=>{const fe=p.get(),pe=v.get();if(pe<fe.length-1){const Ce=pe+1,$e=fe[Ce];$e&&(v.set(Ce),b($e,!1))}},canGoBack:lo([v],fe=>fe>0),canGoForward:lo([p,v],(fe,pe)=>pe<fe.length-1),navigationHistory:p,historyIndex:v}};class K9{validateParam(t,n){if(t==null)throw new Error(`${n} is required`)}validatePath(t){if(!t)throw new Error("Path must be a non-empty string")}parsePath(t){if(!t)return{};if(t.includes("://")){const[n,...r]=t.split("://");return{storage:n,path:r.join("://")}}return{path:t}}combinePath(t,n){return t&&n?`${t}://${n}`:n||""}}function z0(e,t,n){const r=`HTTP ${t}: ${n}`;if(!e)return r;try{const i=JSON.parse(e);if(i.message)return i.message;if(i.error){if(typeof i.error=="string")return i.error;if(i.error.message)return i.error.message}if(i.errors&&Array.isArray(i.errors)&&i.errors.length>0){const o=i.errors.map(s=>s.message).filter(s=>!!s);if(o.length>0)return o.join(", ")}return i.detail?i.detail:i.title?i.title:e}catch{return e||r}}class jC extends K9{config;static DEFAULT_URLS={list:"",upload:"/upload",delete:"/delete",rename:"/rename",copy:"/copy",move:"/move",archive:"/archive",unarchive:"/unarchive",createFile:"/create-file",createFolder:"/create-folder",preview:"/preview",download:"/download",search:"/search",save:"/save"};constructor(t){super();const n={...jC.DEFAULT_URLS,...t.url||{}};this.config={...t,baseURL:t.baseURL||"",url:n}}setBaseURL(t){this.config.baseURL=t||""}setToken(t){this.config.token=t}configureUploader(t,n){const r=this.getHeaders();delete r["Content-Type"],t.use(I9,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:r,formData:!0}),t.on("upload",()=>{const i=n.getTargetPath();t.getFiles().forEach(o=>{t.setFileMeta(o.id,{path:i})})})}getHeaders(){const t={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(t.Authorization=`Bearer ${this.config.token}`),t}async request(t,n={}){const r=`${this.config.baseURL}${t}`,i=await fetch(r,{...n,headers:{...this.getHeaders(),...n.headers}});if(!i.ok){const o=await i.text(),s=z0(o,i.status,i.statusText);throw new Error(s)}return i.status===204||i.status===304?{}:(i.headers.get("content-type")||"").includes("application/json")?await i.json():await i.text()}async list(t){const n=new URLSearchParams;t?.path&&n.append("path",t.path);const r=n.toString()?`${this.config.url.list}?${n.toString()}`:this.config.url.list;return await this.request(r,{method:"GET",signal:t?.signal})}async delete(t){return this.validateParam(t.items,"items"),this.validateParam(t.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:t.path,items:t.items})})}async rename(t){return this.validateParam(t.path,"path"),this.validateParam(t.item,"item"),this.validateParam(t.name,"name"),this.validatePath(t.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:t.path,item:t.item,name:t.name})})}async copy(t){return this.validateParam(t.sources,"sources"),this.validateParam(t.destination,"destination"),t.path&&this.validatePath(t.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:t.sources,destination:t.destination,path:t.path})})}async move(t){return this.validateParam(t.sources,"sources"),this.validateParam(t.destination,"destination"),t.path&&this.validatePath(t.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:t.sources,destination:t.destination,path:t.path})})}async archive(t){return this.validateParam(t.items,"items"),this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:t.items,path:t.path,name:t.name,...t.destination?{destination:t.destination}:{}})})}async unarchive(t){return this.validateParam(t.item,"item"),this.validateParam(t.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:t.item,path:t.path,...t.destination?{destination:t.destination}:{}})})}async createFile(t){return this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:t.path,name:t.name})})}async createFolder(t){return this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:t.path,name:t.name})})}getPreviewUrl(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path});return`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`}async getContent(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path}),r=`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`,i=await fetch(r,{headers:this.getHeaders(),signal:t.signal});if(!i.ok){const o=await i.text(),s=z0(o,i.status,i.statusText);throw new Error(s)}return{content:await i.text(),mimeType:i.headers.get("Content-Type")||void 0}}getDownloadUrl(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path});return`${this.config.baseURL}${this.config.url.download}?${n.toString()}`}async search(t){const n=this.config.url.search,r=new URLSearchParams;t.path&&r.set("path",t.path),t.filter&&r.set("filter",t.filter),t.deep&&r.set("deep","1"),t.size&&t.size!=="all"&&r.set("size",t.size);const i=r.toString()?`${n}?${r.toString()}`:n;return(await this.request(i,{method:"GET",signal:t.signal})).files||[]}async save(t){return this.validateParam(t.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:t.path,content:t.content}),headers:this.getHeaders(),signal:t.signal})}}const wp={list:e=>["adapter","list",e],search:(e,t,n,r)=>["adapter","search",e,t,n,r],delete:e=>["adapter","delete",e],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class G9{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(t,n={}){this.driver=t,this.onBeforeOpen=n.onBeforeOpen,this.onAfterOpen=n.onAfterOpen,this.queryClient=n.queryClient||new FV({defaultOptions:{queries:{refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,retry:n.retry??2},mutations:{retry:n.retry??1}}}),this.config={queryClient:this.queryClient,refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,cacheTime:n.cacheTime??600*1e3,retry:n.retry??2,onBeforeOpen:this.onBeforeOpen??(()=>{}),onAfterOpen:this.onAfterOpen??(()=>{})}}getDriver(){return this.driver}getQueryClient(){return this.queryClient}async list(t){const n=wp.list(t);return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.list({path:t,signal:r}),staleTime:this.config.staleTime})}async open(t){this.onBeforeOpen&&this.onBeforeOpen();try{const n=await this.list(t);return this.onAfterOpen&&this.onAfterOpen(n),n}catch(n){if(SV(n)||n?.name==="AbortError")return;throw n}}cancelOpen(t){const n=t===void 0?["adapter","list"]:wp.list(t);this.queryClient.cancelQueries({queryKey:n})}async delete(t){const n=await this.driver.delete(t);return this.invalidateListQueries(),n}async rename(t){const n=await this.driver.rename(t);return this.invalidateListQueries(),n}async copy(t){const n=await this.driver.copy(t);return this.invalidateListQueries(),n}async move(t){const n=await this.driver.move(t);return this.invalidateListQueries(),n}async archive(t){const n=await this.driver.archive(t);return this.invalidateListQueries(),n}async unarchive(t){const n=await this.driver.unarchive(t);return this.invalidateListQueries(),n}async createFile(t){const n=await this.driver.createFile(t);return this.invalidateListQueries(),n}async createFolder(t){const n=await this.driver.createFolder(t);return this.invalidateListQueries(),n}async getContent(t){const n=["adapter","content",t.path];return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.getContent({path:t.path,signal:t.signal??r}),staleTime:this.config.staleTime})}getPreviewUrl(t){return this.driver.getPreviewUrl(t)}getDownloadUrl(t){return this.driver.getDownloadUrl(t)}async search(t){const n=wp.search(t.path,t.filter,t.deep,t.size);return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.search({...t,signal:t.signal??r}),staleTime:this.config.staleTime})}async save(t){const n=await this.driver.save(t);return this.invalidateListQueries(),n}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(t){this.queryClient.invalidateQueries({queryKey:["adapter","list",t],exact:!0})}clearCache(){this.queryClient.clear()}}function Q9(e){const t=Qe(e.state);return{current:se(()=>t.value.theme||"silver"),set:n=>{e.set("theme",n)}}}const X9=(e,t)=>{const n=F9(e.id??"vf"),r=nB(),i=t.i18n,o=e.locale??t.locale,s=W9(e.id??"vf",e.config??{}),l=Y9();if(!e.driver)throw new Error("Driver is required for VueFinder");const u=new G9(e.driver);return Hn({version:z9,config:s,theme:(()=>{const d=Q9(s);return{current:d.current,set:d.set}})(),fs:l,root:null,debug:e.debug??!1,emitter:r,storage:n,i18n:U9(n,o,r,i,s),modal:V9(s),adapter:Ni(u),features:MC(e.features),selectionMode:e.selectionMode||"multiple",selectionFilterType:se(()=>e.selectionFilterType||"both"),selectionFilterMimeIncludes:se(()=>e.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:s.get("metricUnits")?DC:Bm,contextMenuItems:e.contextMenuItems,customUploader:e.customUploader})},J9=["data-theme"],Z9={class:"vuefinder__modal-layout__container"},eq={class:"vuefinder__modal-layout__content"},tq={key:0,class:"vuefinder__modal-layout__footer"},nq={key:0,class:"vuefinder__modal-drag-overlay"},rq={class:"vuefinder__modal-drag-message"},dr=ze({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{},onRequestClose:{type:Function},bodyStyle:{type:[Boolean,null,String,Object,Array]},bodyClass:{},onBodyTouchstart:{type:Function},onBodyTouchmove:{type:Function},onBodyTouchend:{type:Function},onBodyTouchcancel:{type:Function}},setup(e){const t=re(null),n=rt();n.config;const r=e,i=()=>{r.onRequestClose?r.onRequestClose():n.modal.close()};xt(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),gt(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&t.value){const l=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:l,left:0,behavior:"smooth"})}})});const o=s=>{s.target.classList.contains("vuefinder__modal-layout__wrapper")&&(s.preventDefault(),s.stopPropagation())};return(s,l)=>(C(),R("div",{"data-theme":w(n).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:l[5]||(l[5]=Lr(u=>i(),["esc"]))},[l[6]||(l[6]=_("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),_("div",Z9,[_("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:o,onMousedown:l[4]||(l[4]=ht(u=>i(),["self"]))},[_("div",{ref_key:"modalBody",ref:t,class:Be(["vuefinder__modal-layout__body",r.bodyClass]),style:an(r.bodyStyle),onTouchstart:l[0]||(l[0]=(...u)=>r.onBodyTouchstart&&r.onBodyTouchstart(...u)),onTouchmove:l[1]||(l[1]=(...u)=>r.onBodyTouchmove&&r.onBodyTouchmove(...u)),onTouchend:l[2]||(l[2]=(...u)=>r.onBodyTouchend&&r.onBodyTouchend(...u)),onTouchcancel:l[3]||(l[3]=(...u)=>r.onBodyTouchcancel&&r.onBodyTouchcancel(...u))},[_("div",eq,[mt(s.$slots,"default")]),s.$slots.buttons?(C(),R("div",tq,[mt(s.$slots,"buttons")])):Se("",!0)],38)],32)]),r.showDragOverlay?(C(),R("div",nq,[_("div",rq,q(r.dragOverlayText||"Drag and drop the files/folders to here."),1)])):Se("",!0)],40,J9))}}),iq={class:"vuefinder__modal-header"},oq={class:"vuefinder__modal-header__icon-container"},sq={id:"modal-title",class:"vuefinder__modal-header__title"},xr=ze({__name:"ModalHeader",props:{title:{},icon:{}},setup(e){return(t,n)=>(C(),R("div",iq,[_("div",oq,[(C(),Ee(Pn(e.icon),{class:"vuefinder__modal-header__icon"}))]),_("div",sq,q(e.title),1)]))}}),aq={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function lq(e,t){return C(),R("svg",aq,[...t[0]||(t[0]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8.2h.01M10.75 11.25H12v4.5m0 0h1.25m-1.25 0h-2"},null,-1)])])}const Vm={render:lq},uq={class:"vuefinder__about-modal__content"},cq={class:"vuefinder__about-modal__main"},dq={class:"vuefinder__about-modal__tab-content"},fq={class:"vuefinder__about-modal__lead"},pq={class:"vuefinder__about-modal__description"},hq={class:"vuefinder__about-modal__links"},mq={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},vq={class:"vuefinder__about-modal__meta"},gq={class:"vuefinder__about-modal__meta-item"},_q={class:"vuefinder__about-modal__meta-label"},yq={class:"vuefinder__about-modal__meta-value"},bq={class:"vuefinder__about-modal__meta-item"},wq={class:"vuefinder__about-modal__meta-label"},UC=ze({__name:"ModalAbout",setup(e){const t=rt(),{t:n}=t.i18n;return(r,i)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:i[0]||(i[0]=o=>w(t).modal.close())},q(w(n)("Close")),1)]),default:Le(()=>[_("div",uq,[Z(xr,{icon:w(Vm),title:"Vuefinder "+w(t).version},null,8,["icon","title"]),_("div",cq,[_("div",dq,[_("div",fq,q(w(n)("A modern, customizable file manager component built for Vue.")),1),_("div",pq,q(w(n)("If you like it, please follow and ⭐ star on GitHub.")),1),_("div",hq,[_("a",mq,q(w(n)("Project Home")),1),i[1]||(i[1]=_("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),_("div",vq,[_("div",gq,[_("span",_q,q(w(n)("Version")),1),_("span",yq,q(w(t).version),1)]),_("div",bq,[_("span",wq,q(w(n)("License")),1),i[2]||(i[2]=_("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),Eq={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Sq(e,t){return C(),R("svg",Eq,[...t[0]||(t[0]=[_("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const NC={render:Sq},Cq={class:"vuefinder__delete-modal__content"},xq={class:"vuefinder__delete-modal__form"},Tq={class:"vuefinder__delete-modal__description"},kq={class:"vuefinder__delete-modal__files vf-scrollbar"},Oq={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},$q={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Aq={class:"vuefinder__delete-modal__file-name"},Rq={class:"vuefinder__delete-modal__confirmation"},Pq={class:"vuefinder__delete-modal__confirmation-label"},Iq={class:"vuefinder__delete-modal__confirmation-text"},Mq=["disabled"],Xc=ze({__name:"ModalDelete",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(t.modal.data.items),l=re(!1),u=()=>{s.value.length&&l.value&&t.adapter.delete({path:o.value.path,items:s.value.map(({path:d,type:f})=>({path:d,type:f}))}).then(d=>{n.success(r("Files deleted.")),t.fs.setFiles(d.files),t.modal.close()}).catch(d=>{n.error(yn(d,r("Failed to delete files")))})};return(d,f)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("div",Rq,[_("label",Pq,[Ct(_("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>l.value=p),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[Zs,l.value]]),_("span",Iq,q(w(r)("I'm sure delete it, This action cannot be undone.")),1)])]),_("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!l.value,onClick:u},q(w(r)("Yes, Delete!")),9,Mq),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[1]||(f[1]=p=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(NC),title:w(r)("Delete files")},null,8,["icon","title"]),_("div",Cq,[_("div",xq,[_("p",Tq,q(w(r)("Are you sure you want to delete these files?")),1),_("div",kq,[(C(!0),R(We,null,ct(s.value,p=>(C(),R("p",{key:p.path,class:"vuefinder__delete-modal__file"},[p.type==="dir"?(C(),R("svg",Oq,[...f[2]||(f[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",$q,[...f[3]||(f[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",Aq,q(p.basename),1)]))),128))])])])])]),_:1}))}}),Dq={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Fq(e,t){return C(),R("svg",Dq,[...t[0]||(t[0]=[_("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1)])])}const zC={render:Fq},Lq={class:"vuefinder__rename-modal__content"},jq={class:"vuefinder__rename-modal__item"},Uq={class:"vuefinder__rename-modal__item-info"},Nq={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},zq={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Bq={class:"vuefinder__rename-modal__item-name"},Jc=ze({__name:"ModalRename",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(t.modal.data.items[0]),l=re(s.value.basename),u=()=>{l.value!=s.value.basename&&t.adapter.rename({path:o.value.path,item:s.value.path,name:l.value}).then(d=>{n.success(r("%s is renamed.",l.value)),t.fs.setFiles(d.files),t.modal.close()}).catch(d=>{n.error(yn(d,r("Failed to rename")))})};return(d,f)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:u},q(w(r)("Rename")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[1]||(f[1]=p=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(zC),title:w(r)("Rename")},null,8,["icon","title"]),_("div",Lq,[_("div",jq,[_("p",Uq,[s.value.type==="dir"?(C(),R("svg",Nq,[...f[2]||(f[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",zq,[...f[3]||(f[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",Bq,q(s.value.basename),1)]),Ct(_("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>l.value=p),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:Lr(u,["enter"])},null,544),[[oi,l.value]])])])])]),_:1}))}});function fr(){const e=rt(),t=se(()=>e.features);return{enabled:n=>t.value[n]??!1}}function Vq(e,t=null){return new Date(e*1e3).toLocaleString(t??navigator.language??"en-US")}const Hq={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"vuefinder__breadcrumb__close-icon",viewBox:"0 0 24 24"};function qq(e,t){return C(),R("svg",Hq,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const BC={render:qq},Wq={class:"vuefinder__preview-chrome"},Yq={class:"vuefinder__preview-chrome__popover-host vuefinder__preview-chrome__info-host"},Kq=["title","aria-label"],Gq={key:0,class:"vuefinder__preview-chrome__popover"},Qq={class:"vuefinder__preview-chrome__popover-label"},Xq={class:"vuefinder__preview-chrome__popover-value"},Jq=["title"],Zq={class:"vuefinder__preview-chrome__actions"},eW=["aria-label"],tW={key:1,class:"vuefinder__preview-chrome__popover-host"},nW=["title","aria-label"],rW={key:0,class:"vuefinder__preview-chrome__popover"},iW=["href","download"],oW={class:"vuefinder__preview-chrome__popover-hint"},sW=["title","aria-label"],aW=ze({name:"PreviewChrome",__name:"PreviewChrome",emits:["close-request"],setup(e,{emit:t}){const n=t,r=rt(),{enabled:i}=fr(),{t:o}=r.i18n,s=Qe(r.fs.sortedFiles),l=se(()=>s.value.filter(S=>S.type==="file")),u=se(()=>l.value.findIndex(S=>S.path===r.modal.data.item.path)),d=se(()=>l.value.length),f=se(()=>r.modal.controls??null),p=se(()=>!!w(f.value?.isEditing)),v=re(!1),y=re(!1),g=S=>{S==="info"?(v.value=!v.value,y.value=!1):(y.value=!y.value,v.value=!1)},m=S=>{S.target.closest(".vuefinder__preview-chrome__popover-host")||(v.value=!1,y.value=!1)};xt(()=>document.addEventListener("mousedown",m)),ts(()=>document.removeEventListener("mousedown",m));const b=se(()=>{const S=r.modal.data.item,O=[{label:o("File Size"),value:r.filesize(S.file_size??0)},{label:o("Last Modified"),value:Vq(S.last_modified??0)}];S.mime_type&&O.push({label:o("Type"),value:S.mime_type});const T=w(f.value?.extraInfo);if(Array.isArray(T))for(const A of T)O.push(A);return O.push({label:o("Path"),value:S.path}),O}),x=se(()=>r.adapter.getDownloadUrl(r.modal.data.item));return(S,O)=>(C(),R("div",Wq,[_("div",Yq,[_("button",{type:"button",class:Be(["vuefinder__preview-chrome__info-btn",{"vuefinder__preview-chrome__info-btn--active":v.value}]),title:w(o)("File info"),"aria-label":w(o)("File info"),onClick:O[0]||(O[0]=T=>g("info"))},[Z(w(Vm),{class:"vuefinder__preview-chrome__icon"})],10,Kq),v.value?(C(),R("div",Gq,[(C(!0),R(We,null,ct(b.value,T=>(C(),R("div",{key:T.label,class:"vuefinder__preview-chrome__popover-row"},[_("span",Qq,q(T.label),1),_("span",Xq,q(T.value),1)]))),128))])):Se("",!0)]),_("div",{id:"modal-title",class:"vuefinder__preview-chrome__title",title:w(r).modal.data.item.path},q(w(r).modal.data.item.basename),9,Jq),_("div",Zq,[d.value>1&&!p.value?(C(),R("span",{key:0,class:"vuefinder__preview-chrome__counter","aria-label":w(o)("File %s of %s",String(u.value+1),String(d.value))},q(u.value+1)+" / "+q(d.value),9,eW)):Se("",!0),w(i)("download")&&!p.value?(C(),R("div",tW,[_("button",{type:"button",class:Be(["vuefinder__preview-chrome__info-btn",{"vuefinder__preview-chrome__info-btn--active":y.value}]),title:w(o)("Download"),"aria-label":w(o)("Download"),onClick:O[1]||(O[1]=T=>g("download"))},[...O[3]||(O[3]=[_("svg",{class:"vuefinder__preview-chrome__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M12 3v12"}),_("path",{d:"M7 10l5 5 5-5"}),_("path",{d:"M5 21h14"})],-1)])],10,nW),y.value?(C(),R("div",rW,[_("a",{href:x.value,download:x.value,target:"_blank",class:"vuefinder__preview-chrome__popover-action"},[O[4]||(O[4]=_("svg",{class:"vuefinder__preview-chrome__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M12 3v12"}),_("path",{d:"M7 10l5 5 5-5"}),_("path",{d:"M5 21h14"})],-1)),_("span",null,q(w(o)("Download")),1)],8,iW),_("p",oW,q(w(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):Se("",!0)])):Se("",!0),_("button",{type:"button",class:"vuefinder__preview-chrome__btn vuefinder__preview-chrome__btn--icon vuefinder__preview-chrome__btn--close",title:w(o)("Close"),"aria-label":w(o)("Close"),onClick:O[2]||(O[2]=T=>n("close-request"))},[Z(w(BC),{class:"vuefinder__preview-chrome__icon vuefinder__preview-chrome__icon--lg"})],8,sW)])]))}});function Hm(e){const t=rt();xt(()=>{if(typeof t.modal.registerControls!="function"){console.warn("[vuefinder] PreviewControls registration skipped: app.modal.registerControls is missing. Hard refresh the page to pick up the latest modal API.");return}t.modal.registerControls(e)}),ts(()=>{typeof t.modal.unregisterControls=="function"&&t.modal.unregisterControls(e)})}const lW={class:"vuefinder__text-preview"},uW={class:"vuefinder__text-preview__body"},cW={key:0,class:"vuefinder__text-preview__content"},dW=ze({__name:"Text",emits:["success"],setup(e,{emit:t}){const n=Jr({loader:()=>Rt(()=>import("./CodeMirrorEditor-Cqow8ROO-AryRubtp.js"),__vite__mapDeps([93,2,1]),import.meta.url).then(S=>S.C),delay:100}),r=t,i=re(""),o=re(""),s=re(!1),l=re(!1),u=rt(),d=cr(u),{enabled:f}=fr(),{t:p}=u.i18n;xt(async()=>{try{const S=await u.adapter.getContent({path:u.modal.data.item.path});i.value=S.content,o.value=S.content,r("success")}catch(S){yn(S,"Failed to load text content"),r("success")}});const v=se(()=>f("edit")&&!u.fs.isReadOnly(u.modal.data.item)),y=se(()=>s.value),g=se(()=>s.value&&o.value!==i.value),m=()=>{o.value=i.value,s.value=!0,u.modal.setEditMode(!0)},b=()=>{s.value=!1,o.value=i.value,u.modal.setEditMode(!1)},x=async()=>{try{await u.adapter.save({path:u.modal.data.item.path,content:o.value}),i.value=o.value,d.success(p("Updated.")),s.value=!1,u.modal.setEditMode(!1),r("success")}catch(S){d.error(yn(S,p("Failed to save file")))}};return Hm({isEditable:v,isEditing:y,isDirty:g,primaryActionLabel:se(()=>p("Save")),enterEdit:m,commitEdit:x,cancelEdit:b}),(S,O)=>(C(),R("div",lW,[_("div",uW,[(C(),Ee(Ih,{onResolve:O[2]||(O[2]=T=>l.value=!0)},{fallback:Le(()=>[s.value?Ct((C(),R("textarea",{key:1,"onUpdate:modelValue":O[1]||(O[1]=T=>o.value=T),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512)),[[oi,o.value]]):(C(),R("pre",cW,q(i.value),1))]),default:Le(()=>[Z(w(n),{"model-value":s.value?o.value:i.value,readonly:!s.value,filename:w(u).modal.data.item.basename,"onUpdate:modelValue":O[0]||(O[0]=T=>s.value?o.value=T:null)},null,8,["model-value","readonly","filename"])]),_:1})),Ct(_("span",null,q(l.value),513),[[Nr,!1]])])]))}}),fW={class:"vuefinder__text-preview"},pW={class:"vuefinder__text-preview__body vuefinder__csv-preview__body"},hW={key:0,class:"vuefinder__text-preview__content"},mW={key:0,class:"vuefinder__csv-preview__error"},vW={key:1,class:"vuefinder__csv-preview__empty"},gW={key:2,class:"vuefinder__csv-preview__table-wrap"},_W={class:"vuefinder__csv-preview__table"},yW=["title"],bW={class:"vuefinder__csv-preview__row-num"},wW=["title"],EW={key:0,class:"vuefinder__csv-preview__truncated"},SW={key:2,class:"vuefinder__csv-preview__view-checkbox"},Ep=1e3,CW=ze({name:"CsvPreview",__name:"Csv",emits:["success"],setup(e,{emit:t}){const n=Jr({loader:()=>Rt(()=>import("./CodeMirrorEditor-Cqow8ROO-AryRubtp.js"),__vite__mapDeps([93,2,1]),import.meta.url).then(ve=>ve.C),delay:100}),r=t,i=re(""),o=re(""),s=_n([]),l=_n([]),u=re(null),d=re(!1),f=re(!1),p=se(()=>s.value.length>Ep),v=se(()=>p.value?s.value.slice(0,Ep):s.value),y=rt(),g=cr(y),{enabled:m}=fr(),{t:b}=y.i18n;async function x(ve){try{const{parse:W}=await Rt(()=>import("./papaparse.min-Brc8PWCw-BsyFjD51.js"),[],import.meta.url).then(D=>D.p),X=W(ve,{skipEmptyLines:!0,delimiter:""});if(!X.data.length){l.value=[],s.value=[];return}const[K,...L]=X.data;l.value=K??[],s.value=L,u.value=null}catch(W){u.value=yn(W,b("Failed to parse CSV")),l.value=[],s.value=[]}}xt(async()=>{try{const ve=await y.adapter.getContent({path:y.modal.data.item.path});i.value=ve.content,o.value=ve.content,await x(ve.content),r("success")}catch(ve){yn(ve,"Failed to load CSV content"),r("success")}});const S=se(()=>!d.value&&f.value),O=se(()=>m("edit")&&!y.fs.isReadOnly(y.modal.data.item)),T=se(()=>d.value),A=se(()=>d.value&&o.value!==i.value),M=()=>{o.value=i.value,d.value=!0,f.value=!1,y.modal.setEditMode(!0)},z=()=>{d.value=!1,o.value=i.value,y.modal.setEditMode(!1)},Y=async()=>{try{await y.adapter.save({path:y.modal.data.item.path,content:o.value}),i.value=o.value,await x(i.value),g.success(b("Updated.")),d.value=!1,y.modal.setEditMode(!1),r("success")}catch(ve){g.error(yn(ve,b("Failed to save file")))}};return Hm({isEditable:O,isEditing:T,isDirty:A,primaryActionLabel:se(()=>b("Save")),enterEdit:M,commitEdit:Y,cancelEdit:z}),(ve,W)=>(C(),R("div",fW,[_("div",pW,[S.value?(C(),R(We,{key:1},[u.value?(C(),R("div",mW,q(u.value),1)):!s.value.length&&!l.value.length?(C(),R("div",vW,q(w(b)("No rows to display")),1)):(C(),R("div",gW,[_("table",_W,[_("thead",null,[_("tr",null,[W[3]||(W[3]=_("th",{class:"vuefinder__csv-preview__row-num"},null,-1)),(C(!0),R(We,null,ct(l.value,(X,K)=>(C(),R("th",{key:K,title:X},q(X),9,yW))),128))])]),_("tbody",null,[(C(!0),R(We,null,ct(v.value,(X,K)=>(C(),R("tr",{key:K},[_("td",bW,q(K+1),1),(C(!0),R(We,null,ct(X,(L,D)=>(C(),R("td",{key:D,title:L},q(L),9,wW))),128))]))),128))])]),p.value?(C(),R("div",EW,q(w(b)("Showing first %s rows out of %s",Ep,s.value.length)),1)):Se("",!0)]))],64)):(C(),Ee(Ih,{key:0},{fallback:Le(()=>[d.value?Ct((C(),R("textarea",{key:1,"onUpdate:modelValue":W[1]||(W[1]=X=>o.value=X),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512)),[[oi,o.value]]):(C(),R("pre",hW,q(i.value),1))]),default:Le(()=>[Z(w(n),{"model-value":d.value?o.value:i.value,readonly:!d.value,filename:w(y).modal.data.item.basename,"onUpdate:modelValue":W[0]||(W[0]=X=>d.value?o.value=X:null)},null,8,["model-value","readonly","filename"])]),_:1})),d.value?Se("",!0):(C(),R("label",SW,[Ct(_("input",{"onUpdate:modelValue":W[2]||(W[2]=X=>f.value=X),type:"checkbox"},null,512),[[Zs,f.value]]),_("span",null,q(w(b)("Show as table")),1)]))])]))}}),qm=async(e,t)=>{if(t){if(t.isFile){const n=await new Promise(r=>{t.file(r)});e(t,n)}if(t.isDirectory){const n=t.createReader(),r=await new Promise(i=>{n.readEntries(i)});for(const i of r)await qm(e,i)}}},un={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function VC(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.path),o=t.config,s=re({QUEUE_ENTRY_STATUS:un}),l=re(null),u=re(null),d=re(null),f=re(null),p=re(null),v=re([]),y=re(""),g=re(!1),m=re(!1),b=re(null);let x;const S=j=>{j.preventDefault(),j.stopPropagation(),m.value=!0},O=j=>{j.preventDefault(),j.stopPropagation(),m.value=!0},T=j=>{j.preventDefault(),j.stopPropagation(),(!j.relatedTarget||j.relatedTarget===document.body)&&(m.value=!1)},A=j=>{j.preventDefault(),j.stopPropagation(),m.value=!1;const de=/^[/\\](.+)/,U=j.dataTransfer;U&&(U.items&&U.items.length?Array.from(U.items).forEach(ee=>{if(ee.kind==="file"){const Q=ee.webkitGetAsEntry?.();if(Q)qm((B,oe)=>{const V=de.exec(B?.fullPath||"");z(oe,V?V[1]:oe.name)},Q);else{const B=ee.getAsFile?.();B&&z(B)}}}):U.files&&U.files.length&&Array.from(U.files).forEach(ee=>z(ee)))},M=j=>v.value.findIndex(de=>de.id===j),z=(j,de)=>x.addFile({name:de||j.name,type:j.type,data:j,source:"Local"}),Y=j=>j.status===un.DONE?"text-green-600":j.status===un.ERROR||j.status===un.CANCELED?"text-red-600":"",ve=j=>j.status===un.DONE?"✓":j.status===un.ERROR||j.status===un.CANCELED?"!":"...",W=()=>f.value?.click(),X=()=>t.modal.close(),K=j=>{if(g.value||!v.value.filter(de=>de.status!==un.DONE).length){g.value||(y.value=n("Please select file to upload first."));return}y.value="",b.value=j||i.value,x.upload()},L=()=>{x.cancelAll(),v.value.forEach(j=>{j.status!==un.DONE&&(j.status=un.CANCELED,j.statusName=n("Canceled"))}),g.value=!1},D=j=>{g.value||(x.removeFile(j.id),v.value.splice(M(j.id),1))},ne=j=>{if(!g.value)if(x.cancelAll(),j){const de=v.value.filter(U=>U.status!==un.DONE);v.value=[],de.forEach(U=>z(U.originalFile,U.name))}else v.value=[]},le=j=>{j.forEach(de=>{z(de)})},je=(j,de)=>j.endsWith("://")||j.endsWith("/")?j+de:j+"/"+de,J=async(j,de)=>{const U=de.trim();if(g.value||!U)return;if(U.includes("/")||U.includes("\\")){y.value=n("Name cannot contain slashes.");return}const ee=j.name.split("/");ee[ee.length-1]=U;const Q=ee.join("/");if(Q===j.name)return;if(j.status===un.DONE){const G=b.value?.path||i.value.path,N=je(G,j.name),ie=j.name.split("/");ie.pop();const ge=ie.length?je(G,ie.join("/")):G;try{await t.adapter.rename({path:ge,item:N,name:U}),j.name=Q,t.adapter.invalidateListQuery(G),G===i.value.path&&t.adapter.open(G)}catch(fe){y.value=fe?.message||n("Failed to rename")}return}const B=M(j.id);if(B===-1)return;const oe=j.originalFile,V=j.name;x.removeFile(j.id),v.value.splice(B,1);let P;try{P=z(oe,Q)}catch(G){y.value=G?.message||n("Failed to rename");try{z(oe,V)}catch{}return}if(!P)return;const F=M(P);if(F!==-1&&F!==B){const G=v.value.splice(F,1)[0];G&&v.value.splice(B,0,G)}};return xt(()=>{x=new am({debug:t.debug,restrictions:{maxFileSize:B9(o.get("maxFileSize")??"10mb")},locale:t.i18n.t("uppy"),onBeforeFileAdded:(ee,Q)=>{if(Q[ee.id]!=null){const B=M(ee.id);v.value[B]?.status===un.PENDING&&(y.value=x.i18n("noDuplicates",{fileName:ee.name})),v.value=v.value.filter(oe=>oe.id!==ee.id)}return v.value.push({id:ee.id,name:ee.name,size:t.filesize(ee.size),status:un.PENDING,statusName:n("Pending upload"),percent:null,originalFile:ee.data}),!0}});const j={getTargetPath:()=>(b.value||i.value).path};if(e)e(x,j);else if(t.adapter.getDriver().configureUploader)t.adapter.getDriver().configureUploader(x,j);else throw new Error("No uploader configured");x.on("restriction-failed",(ee,Q)=>{const B=v.value[M(ee.id)];B&&D(B),y.value=Q.message}),x.on("upload-start",ee=>{ee.forEach(Q=>{const B=v.value[M(Q.id)];B&&(B.status=un.UPLOADING,B.statusName=n("Uploading"),B.percent="0%")})}),x.on("upload-progress",(ee,Q)=>{const B=Q.bytesTotal??1,oe=Math.floor(Q.bytesUploaded/B*100),V=M(ee.id);V!==-1&&v.value[V]&&(v.value[V].percent=`${oe}%`)}),x.on("upload-success",ee=>{const Q=v.value[M(ee.id)];Q&&(Q.status=un.DONE,Q.statusName=n("Done"))}),x.on("upload-error",(ee,Q)=>{const B=v.value[M(ee.id)];B&&(B.percent=null,B.status=un.ERROR,B.statusName=Q?.isNetworkError?n("Network Error, Unable establish connection to the server or interrupted."):Q?.message||n("Unknown Error"))}),x.on("error",ee=>{y.value=ee.message,g.value=!1}),x.on("complete",ee=>{g.value=!1;const Q=b.value||i.value;t.adapter.invalidateListQuery(Q.path),t.adapter.open(Q.path);const B=v.value.filter(oe=>oe.status===un.DONE&&ee.successful.includes(oe.id)).map(oe=>oe.name);t.emitter.emit("vf-upload-complete",B)}),f.value?.addEventListener("click",()=>u.value?.click()),p.value?.addEventListener("click",()=>d.value?.click());const de={capture:!0};document.addEventListener("dragover",S,de),document.addEventListener("dragenter",O,de),document.addEventListener("dragleave",T,de),document.addEventListener("drop",A,de);const U=ee=>{const Q=ee.target,B=Q.files;if(B){for(const oe of B)z(oe);Q.value=""}};u.value?.addEventListener("change",U),d.value?.addEventListener("change",U)}),xn(()=>{const j={capture:!0};document.removeEventListener("dragover",S,j),document.removeEventListener("dragenter",O,j),document.removeEventListener("dragleave",T,j),document.removeEventListener("drop",A,j)}),{container:l,internalFileInput:u,internalFolderInput:d,pickFiles:f,pickFolders:p,queue:v,message:y,uploading:g,hasFilesInDropArea:m,definitions:s,openFileSelector:W,upload:K,cancel:L,remove:D,clear:ne,close:X,getClassNameForEntry:Y,getIconForEntry:ve,addExternalFiles:le,renameEntry:J}}const B0="image/png",Wm="image/jpeg",xW="image/webp";function TW(e){const t=(e.split(".").pop()??"").toLowerCase();return t==="png"?B0:t==="webp"?xW:t==="gif"?B0:Wm}function HC(e){return new Promise((t,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>n(new Error("Failed to load image")),r.src=e})}function qC(e,t){const n=document.createElement("canvas");n.width=e,n.height=t;const r=n.getContext("2d");if(!r)throw new Error("Could not acquire 2D canvas context");return{canvas:n,ctx:r}}async function V0(e,t,n){const r=await HC(e),{canvas:i,ctx:o}=qC(r.naturalWidth,r.naturalHeight);return o.filter=t,o.drawImage(r,0,0),i.toDataURL(n,n===Wm?.92:void 0)}async function kW(e,t,n,r,i){const o=await HC(e),s=o.naturalWidth,l=o.naturalHeight,u=t===90||t===270,{canvas:d,ctx:f}=qC(u?l:s,u?s:l);return f.translate(d.width/2,d.height/2),t&&f.rotate(t*Math.PI/180),(n||r)&&f.scale(n?-1:1,r?-1:1),f.drawImage(o,-s/2,-l/2),d.toDataURL(i,i===Wm?.92:void 0)}function OW(e,t,n){const r=1+e/100,i=1+t/100,o=1+n/100;return`brightness(${r}) contrast(${i}) saturate(${o})`}async function $W(e){return await(await fetch(e)).blob()}const AW={class:"vuefinder__image-editor"},RW={class:"vuefinder__image-editor__strip",role:"tablist"},PW=["aria-selected","onClick"],IW={key:0,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},MW={key:1,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},DW={key:2,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},FW={key:3,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},LW={class:"vuefinder__image-editor__tab-label"},jW={key:0,class:"vuefinder__image-editor__panel"},UW={class:"vuefinder__image-editor__stage"},NW={class:"vuefinder__image-editor__controls"},zW={class:"vuefinder__image-editor__chips"},BW=["onClick"],VW=["disabled"],HW={key:1,class:"vuefinder__image-editor__panel"},qW={class:"vuefinder__image-editor__stage"},WW=["src","alt"],YW={class:"vuefinder__image-editor__controls"},KW={class:"vuefinder__image-editor__rotate-btns"},GW=["title"],QW=["title"],XW=["title"],JW=["title"],ZW=["disabled"],eY={key:2,class:"vuefinder__image-editor__panel"},tY={class:"vuefinder__image-editor__stage"},nY=["src","alt"],rY={class:"vuefinder__image-editor__controls"},iY={class:"vuefinder__image-editor__toggle"},oY=["disabled"],sY={key:3,class:"vuefinder__image-editor__panel"},aY={class:"vuefinder__image-editor__stage"},lY=["src","alt"],uY={class:"vuefinder__image-editor__controls vuefinder__image-editor__controls--stacked"},cY={class:"vuefinder__image-editor__slider"},dY={class:"vuefinder__image-editor__slider"},fY={class:"vuefinder__image-editor__slider"},pY={class:"vuefinder__image-editor__row"},hY=["disabled"],mY=ze({name:"ImageEditor",__name:"ImageEditor",props:{src:{},filename:{}},emits:["update:src"],setup(e,{emit:t}){const n=e,r=t,i=rt(),{t:o}=i.i18n,s=re("crop"),l=re(!1),u=re(null),d=[{label:"Original",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],f=_i("cropperRef"),p=re(0),v=re(!1),y=re(!1),g=re(!1),m=re(0),b=re(0),x=re(0),S=se(()=>OW(m.value,b.value,x.value));He([()=>n.src,s],()=>{p.value=0,v.value=!1,y.value=!1,g.value=!1,m.value=0,b.value=0,x.value=0});const O=se(()=>TW(n.filename)),T=se(()=>{const j=[];return p.value&&j.push(`rotate(${p.value}deg)`),v.value&&j.push("scaleX(-1)"),y.value&&j.push("scaleY(-1)"),j.length?{transform:j.join(" ")}:{}}),A=j=>{l.value||(s.value=j)},M=()=>{const j=f.value?.getResult()?.canvas;if(!j)return;const de=j.toDataURL(O.value,O.value==="image/jpeg"?.92:void 0);r("update:src",de)},z=async()=>{if(le.value){l.value=!0;try{const j=await kW(n.src,ne.value,v.value,y.value,O.value);r("update:src",j)}finally{l.value=!1}}},Y=async()=>{if(g.value){l.value=!0;try{const j=await V0(n.src,"grayscale(1)",O.value);r("update:src",j)}finally{l.value=!1}}},ve=async()=>{if(!(m.value===0&&b.value===0&&x.value===0)){l.value=!0;try{const j=await V0(n.src,S.value,O.value);r("update:src",j)}finally{l.value=!1}}},W=()=>{m.value=0,b.value=0,x.value=0},X=()=>{p.value-=90},K=()=>{p.value+=90},L=()=>{v.value=!v.value},D=()=>{y.value=!y.value},ne=se(()=>(p.value%360+360)%360),le=se(()=>ne.value!==0||v.value||y.value),je=se(()=>m.value!==0||b.value!==0||x.value!==0),J=se(()=>g.value);return(j,de)=>(C(),R("div",AW,[_("div",RW,[(C(),R(We,null,ct(["crop","rotate","grayscale","adjust"],U=>_("button",{key:U,type:"button",role:"tab","aria-selected":s.value===U,class:Be(["vuefinder__image-editor__tab",{"vuefinder__image-editor__tab--active":s.value===U}]),onClick:ee=>A(U)},[U==="crop"?(C(),R("svg",IW,[...de[4]||(de[4]=[_("path",{d:"M6 2v16a2 2 0 0 0 2 2h14"},null,-1),_("path",{d:"M2 6h16a2 2 0 0 1 2 2v14"},null,-1)])])):U==="rotate"?(C(),R("svg",MW,[...de[5]||(de[5]=[_("polyline",{points:"23 4 23 10 17 10"},null,-1),_("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"},null,-1)])])):U==="grayscale"?(C(),R("svg",DW,[...de[6]||(de[6]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{d:"M12 3v18"},null,-1),_("path",{d:"M12 3a9 9 0 0 0 0 18",fill:"currentColor"},null,-1)])])):(C(),R("svg",FW,[...de[7]||(de[7]=[Fu('<line x1="4" y1="6" x2="14" y2="6"></line><circle cx="17" cy="6" r="2"></circle><line x1="10" y1="12" x2="20" y2="12"></line><circle cx="7" cy="12" r="2"></circle><line x1="4" y1="18" x2="14" y2="18"></line><circle cx="17" cy="18" r="2"></circle>',6)])])),_("span",LW,q(U==="crop"?w(o)("Crop"):U==="rotate"?w(o)("Rotate"):U==="grayscale"?w(o)("Grayscale"):w(o)("Adjust")),1)],10,PW)),64))]),s.value==="crop"?(C(),R("div",jW,[_("div",UW,[Z(w(VS),{ref_key:"cropperRef",ref:f,class:"vuefinder__image-editor__cropper",crossorigin:"anonymous",src:n.src,"stencil-props":u.value===null?{}:{aspectRatio:u.value},"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src","stencil-props"])]),_("div",NW,[_("div",zW,[(C(),R(We,null,ct(d,U=>_("button",{key:U.label,type:"button",class:Be(["vuefinder__image-editor__chip",{"vuefinder__image-editor__chip--active":u.value===U.value}]),onClick:ee=>u.value=U.value},q(w(o)(U.label)),11,BW)),64))]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value,onClick:M},q(w(o)("Apply")),9,VW)])])):s.value==="rotate"?(C(),R("div",HW,[_("div",qW,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an(T.value),alt:n.filename},null,12,WW)]),_("div",YW,[_("div",KW,[_("button",{type:"button",class:"vuefinder__image-editor__icon-btn",title:w(o)("Rotate left 90°"),onClick:X},[...de[8]||(de[8]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("polyline",{points:"1 4 1 10 7 10"}),_("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})],-1)])],8,GW),_("button",{type:"button",class:"vuefinder__image-editor__icon-btn",title:w(o)("Rotate right 90°"),onClick:K},[...de[9]||(de[9]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("polyline",{points:"23 4 23 10 17 10"}),_("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})],-1)])],8,QW),_("button",{type:"button",class:Be(["vuefinder__image-editor__icon-btn",{"vuefinder__image-editor__icon-btn--active":v.value}]),title:w(o)("Flip horizontal"),onClick:L},[...de[10]||(de[10]=[Fu('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 3 4 7 8 11"></polyline><polyline points="16 3 20 7 16 11"></polyline><line x1="4" y1="7" x2="20" y2="7"></line><line x1="12" y1="13" x2="12" y2="21"></line></svg>',1)])],10,XW),_("button",{type:"button",class:Be(["vuefinder__image-editor__icon-btn",{"vuefinder__image-editor__icon-btn--active":y.value}]),title:w(o)("Flip vertical"),onClick:D},[...de[11]||(de[11]=[Fu('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 8 7 4 11 8"></polyline><polyline points="3 16 7 20 11 16"></polyline><line x1="7" y1="4" x2="7" y2="20"></line><line x1="13" y1="12" x2="21" y2="12"></line></svg>',1)])],10,JW)]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!le.value,onClick:z},q(w(o)("Apply")),9,ZW)])])):s.value==="grayscale"?(C(),R("div",eY,[_("div",tY,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an(g.value?{filter:"grayscale(1)"}:{}),alt:n.filename},null,12,nY)]),_("div",rY,[_("label",iY,[Ct(_("input",{"onUpdate:modelValue":de[0]||(de[0]=U=>g.value=U),type:"checkbox"},null,512),[[Zs,g.value]]),_("span",null,q(w(o)("Grayscale")),1)]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!J.value,onClick:Y},q(w(o)("Apply")),9,oY)])])):(C(),R("div",sY,[_("div",aY,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an({filter:S.value}),alt:n.filename},null,12,lY)]),_("div",uY,[_("div",cY,[_("label",null,[Et(q(w(o)("Brightness")),1),_("span",null,q(m.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[1]||(de[1]=U=>m.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,m.value,void 0,{number:!0}]])]),_("div",dY,[_("label",null,[Et(q(w(o)("Contrast")),1),_("span",null,q(b.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[2]||(de[2]=U=>b.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,b.value,void 0,{number:!0}]])]),_("div",fY,[_("label",null,[Et(q(w(o)("Saturation")),1),_("span",null,q(x.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[3]||(de[3]=U=>x.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,x.value,void 0,{number:!0}]])]),_("div",pY,[_("button",{type:"button",class:"vuefinder__image-editor__reset",onClick:W},q(w(o)("Reset")),1),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!je.value,onClick:ve},q(w(o)("Apply")),9,hY)])])]))]))}}),vY={class:"vuefinder__image-preview"},gY=["src"],_Y=["aria-label","title"],yY=["aria-label","title"],bY=["aria-label","title"],wY=.5,EY=3,H0=.25,SY=ze({name:"ImagePreview",__name:"Image",emits:["success"],setup(e,{emit:t}){const n=t,r=rt(),i=cr(r),{enabled:o}=fr(),{t:s}=r.i18n,l=re(!1),u=re(r.modal.data.item.previewUrl??r.adapter.getPreviewUrl({path:r.modal.data.item.path})),d=re(u.value),f=re(!1),p=re(1),v=re(null),y=re(0),g=re(0),m=re(1),b=re(!1),x=re(0),S=re(0);let O=null,T=0,A=0,M=0,z=0;const{addExternalFiles:Y,upload:ve,queue:W}=VC(r.customUploader),X=r.fs,K=Qe(X.path),L=se(()=>y.value*m.value),D=se(()=>g.value*m.value),ne=(N,ie)=>{const ge=v.value?.clientWidth??0,fe=v.value?.clientHeight??0,pe=Math.max(0,(L.value*p.value-ge)/2),Ce=Math.max(0,(D.value*p.value-fe)/2);return{x:Math.min(pe,Math.max(-pe,N)),y:Math.min(Ce,Math.max(-Ce,ie))}},le=se(()=>{if(!y.value||!g.value)return{};const{x:N,y:ie}=ne(x.value,S.value);return{width:`${L.value}px`,height:`${D.value}px`,transform:`translate(${N}px, ${ie}px) scale(${p.value})`,transformOrigin:"center center"}}),je=()=>{if(!v.value||!y.value||!g.value)return;const N=v.value.getBoundingClientRect();!N.width||!N.height||(m.value=Math.min(N.width/y.value,N.height/g.value))},J=N=>{const ie=N.target;ie instanceof HTMLImageElement&&(y.value=ie.naturalWidth||ie.clientWidth,g.value=ie.naturalHeight||ie.clientHeight,je())},j=N=>Math.min(EY,Math.max(wY,N)),de=()=>{p.value=j(Number((p.value+H0).toFixed(2)));const N=ne(x.value,S.value);x.value=N.x,S.value=N.y},U=()=>{p.value=j(Number((p.value-H0).toFixed(2)));const N=ne(x.value,S.value);x.value=N.x,S.value=N.y},ee=()=>{p.value=1,x.value=0,S.value=0},Q=N=>{l.value||(N.deltaY>0?U():N.deltaY<0&&de())},B=N=>{if(l.value)return;const ie=N.target;if(ie instanceof HTMLInputElement||ie instanceof HTMLTextAreaElement||ie?.isContentEditable)return;const ge=N.key==="="||N.key==="+",fe=N.key==="-"||N.key==="_",pe=N.key==="0";if(!(!ge&&!fe&&!pe)){if(N.preventDefault(),ge){de();return}if(fe){U();return}ee()}},oe=()=>{b.value=!1},V=N=>{l.value||p.value<=1||!v.value||(b.value=!0,T=N.clientX,A=N.clientY,M=x.value,z=S.value,N.currentTarget?.setPointerCapture?.(N.pointerId))},P=N=>{if(!b.value)return;const ie=N.clientX-T,ge=N.clientY-A,fe=ne(M+ie,z+ge);x.value=fe.x,S.value=fe.y};Hm({isEditable:se(()=>o("edit")&&!r.fs.isReadOnly(r.modal.data.item)),isEditing:se(()=>l.value),isDirty:se(()=>l.value&&f.value),primaryActionLabel:se(()=>s("Save")),enterEdit:()=>{d.value=u.value,f.value=!1,l.value=!0,r.modal.setEditMode(!0)},commitEdit:()=>G(),cancelEdit:()=>{l.value=!1,d.value=u.value,f.value=!1,r.modal.setEditMode(!1)},extraInfo:se(()=>!y.value||!g.value?[]:[{label:s("Dimensions"),value:`${y.value} × ${g.value}`}])});const F=N=>{d.value=N,f.value=!0},G=async()=>{if(!f.value)return;const N=r.modal.data.item.basename,ie=N.split(".").pop()?.toLowerCase()||"jpg",ge=ie==="png"?"image/png":ie==="gif"?"image/gif":"image/jpeg";try{const fe=await $W(d.value),pe=new File([fe],N,{type:ge}),Ce=r.modal.data.item.path.split("/");Ce.pop();const $e={path:Ce.join("/")||(K.value?.path??"")};Y([pe]),await new Promise(Ge=>setTimeout(Ge,100));const Ke=W.value.find(Ge=>Ge.name===pe.name);if(!Ke)throw new Error("File was not added to upload queue");ve($e);let Ne=0;for(;Ne<150;){await new Promise(Ze=>setTimeout(Ze,200));const Ge=W.value.find(Ze=>Ze.id===Ke.id);if(Ge?.status===un.DONE)break;if(Ge?.status===un.ERROR)throw new Error(Ge.statusName||"Upload failed");Ne++}i.success(s("Updated.")),await fetch(u.value,{cache:"reload",mode:"no-cors"});const tt=r.root?.querySelector?.('[data-src="'+u.value+'"]');tt&&tt instanceof HTMLElement&&Ho.resetStatus(tt),r.emitter.emit("vf-refresh-thumbnails"),l.value=!1,f.value=!1,d.value=u.value,r.modal.setEditMode(!1),n("success")}catch(fe){i.error(yn(fe,s("Failed to save image")))}};return xt(()=>{O=new ResizeObserver(()=>{je()}),v.value&&O.observe(v.value),window.addEventListener("keydown",B),n("success")}),ts(()=>{window.removeEventListener("keydown",B),O?.disconnect()}),(N,ie)=>(C(),R("div",vY,[_("div",{ref_key:"imageContainer",ref:v,class:"vuefinder__image-preview__image-container"},[l.value?(C(),Ee(mY,{key:1,src:d.value,filename:w(r).modal.data.item.basename,"onUpdate:src":F},null,8,["src","filename"])):(C(),R("div",{key:0,class:"vuefinder__image-preview__stage",onWheel:ht(Q,["prevent"])},[_("img",{style:an(le.value),src:w(r).modal.data.item.previewUrl??w(r).adapter.getPreviewUrl({path:w(r).modal.data.item.path}),class:Be(["vuefinder__image-preview__image",{"vuefinder__image-preview__image--zoomed":p.value>1,"vuefinder__image-preview__image--panning":b.value}]),draggable:!1,onLoad:J,onPointerdown:V,onPointermove:P,onPointerup:oe,onPointercancel:oe,onLostpointercapture:oe},null,46,gY),_("div",{class:"vuefinder__image-preview__zoom-controls",onPointerdown:ie[0]||(ie[0]=ht(()=>{},["stop"])),onWheel:ie[1]||(ie[1]=ht(()=>{},["stop"]))},[_("button",{type:"button",class:"vuefinder__image-preview__zoom-button","aria-label":w(s)("Zoom out"),title:w(s)("Zoom out"),onClick:U},[...ie[2]||(ie[2]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("circle",{cx:"11",cy:"11",r:"7"}),_("line",{x1:"8",y1:"11",x2:"14",y2:"11"}),_("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21"})],-1)])],8,_Y),_("button",{type:"button",class:"vuefinder__image-preview__zoom-reset","aria-label":w(s)("Reset zoom"),title:w(s)("Reset zoom"),onClick:ee},q(Math.round(p.value*100))+"% ",9,yY),_("button",{type:"button",class:"vuefinder__image-preview__zoom-button","aria-label":w(s)("Zoom in"),title:w(s)("Zoom in"),onClick:de},[...ie[3]||(ie[3]=[Fu('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"></circle><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line><line x1="16.5" y1="16.5" x2="21" y2="21"></line></svg>',1)])],8,bY)],32)],32))],512)]))}}),CY={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function xY(e,t){return C(),R("svg",CY,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const Ga={render:xY},TY={class:"vuefinder__default-preview"},kY={class:"vuefinder__default-preview__content"},OY={class:"vuefinder__default-preview__icon-container"},$Y=["title"],AY=ze({__name:"Default",emits:["success"],setup(e,{emit:t}){const n=rt(),r=t;return xt(()=>{r("success")}),(i,o)=>(C(),R("div",TY,[_("div",kY,[_("div",OY,[Z(w(Ga),{class:"vuefinder__default-preview__file-icon"}),_("div",{class:"vuefinder__default-preview__file-name",title:w(n).modal.data.item.path},q(w(n).modal.data.item.basename),9,$Y)])])]))}}),RY={class:"vuefinder__video-preview"},PY={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},IY=["src"],MY=ze({__name:"Video",emits:["success"],setup(e,{emit:t}){const n=rt(),r=t,i=()=>n.adapter.getPreviewUrl({path:n.modal.data.item.path});return xt(()=>{r("success")}),(o,s)=>(C(),R("div",RY,[_("div",null,[_("video",PY,[_("source",{src:i(),type:"video/mp4"},null,8,IY),s[0]||(s[0]=Et(" Your browser does not support the video tag. ",-1))])])]))}}),DY={class:"vuefinder__audio-preview"},FY={class:"vuefinder__audio-preview__audio",controls:""},LY=["src"],jY=ze({__name:"Audio",emits:["success"],setup(e,{emit:t}){const n=t;rt();const r=()=>{const i=rt();return i.adapter.getPreviewUrl({path:i.modal.data.item.path})};return xt(()=>{n("success")}),(i,o)=>(C(),R("div",DY,[_("div",null,[_("audio",FY,[_("source",{src:r(),type:"audio/mpeg"},null,8,LY),o[0]||(o[0]=Et(" Your browser does not support the audio element. ",-1))])])]))}}),UY={class:"vuefinder__pdf-preview"},NY=["data"],zY=["src"],BY=ze({__name:"Pdf",emits:["success"],setup(e,{emit:t}){rt();const n=t,r=()=>{const i=rt();return i.adapter.getPreviewUrl({path:i.modal.data.item.path})};return xt(()=>{n("success")}),(i,o)=>(C(),R("div",UY,[_("div",null,[_("object",{class:"vuefinder__pdf-preview__object",data:r(),type:"application/pdf",width:"100%",height:"100%"},[_("iframe",{class:"vuefinder__pdf-preview__iframe",src:r(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,zY)],8,NY)])]))}}),VY=["data-theme"],HY=["disabled","title"],qY=["disabled","title"],WY={class:"vuefinder__preview-modal__content"},YY={key:0},KY={key:1,class:"vuefinder__preview-modal__status-strip"},GY=["aria-label"],QY={class:"vuefinder__preview-modal__loading"},XY={key:0,class:"vuefinder__preview-modal__loading-indicator"},JY={class:"vuefinder__preview-modal__edit-actions"},ZY=["disabled"],q0=8,eK=1.4,tK=.22,Ta=220,nK=".vuefinder__preview-chrome__title, .vuefinder__preview-modal__status-strip",qi=ze({__name:"ModalPreview",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,i=re(!1),o=Q=>{const B=(Q||"").split("/").pop()||"",oe=B.lastIndexOf(".");return oe>=0?B.slice(oe+1).toLowerCase():""},s=(Q,B)=>B?Q==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(B):Q==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(B):Q==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(B):Q==="csv"?B==="csv"||B==="tsv":Q==="text"?new Set(["txt","md","markdown","json","jsonc","js","mjs","cjs","ts","tsx","jsx","vue","svelte","css","scss","sass","less","html","htm","xml","svg","csv","tsv","log","yml","yaml","toml","ini","conf","env","sh","bash","zsh","fish","py","rb","php","go","rs","java","kt","swift","c","h","cpp","hpp","cs","sql","graphql","gql","dockerfile","gitignore","gitattributes","editorconfig","prettierrc","eslintrc","lock"]).has(B):Q==="application/pdf"?B==="pdf":!1:!1,l=Q=>{const B=t.modal.data.forceType;if(B)return B===Q;const oe=t.modal.data.item.mime_type;if(oe&&typeof oe=="string"&&oe.startsWith(Q))return!0;const V=o(t.modal.data.item.path);return s(Q,V)},u=n("preview");u||(i.value=!0);const d=se(()=>t.modal.data.item),f=Qe(t.fs.sortedFiles),p=se(()=>f.value.filter(Q=>Q.type==="file")),v=se(()=>p.value.findIndex(Q=>Q.path===d.value.path)),y=se(()=>!!w(t.modal.controls?.isEditable)),g=se(()=>!!w(t.modal.controls?.isEditing)),m=se(()=>!!w(t.modal.controls?.isDirty)),b=se(()=>w(t.modal.controls?.primaryActionLabel)??r("Save")),x=async()=>{await t.modal.controls?.enterEdit?.()},S=async()=>{await t.modal.controls?.commitEdit?.()},O=async()=>{m.value&&!window.confirm(r("Discard unsaved changes?"))||await t.modal.controls?.cancelEdit?.()},T=se(()=>!g.value&&v.value>0),A=se(()=>!g.value&&v.value<p.value.length-1),M=()=>{if(!T.value)return;const Q=p.value[v.value-1];Q&&(t.fs.clearSelection(),t.fs.select(Q.path),t.modal.data.item=Q,i.value=!1)},z=()=>{if(!A.value)return;const Q=p.value[v.value+1];Q&&(t.fs.clearSelection(),t.fs.select(Q.path),t.modal.data.item=Q,i.value=!1)},Y=()=>{g.value&&m.value&&!window.confirm(r("Discard unsaved changes?"))||t.modal.close()},ve=re(0),W=re(!1);let X=0,K=0,L=!1,D=!1;const ne=se(()=>({transform:`translate3d(${ve.value}px, 0, 0)`,transition:W.value?`transform ${Ta}ms ease-out`:"none"})),le=(Q,B)=>{setTimeout(B,Q)},je=Q=>{if(g.value||Q.touches.length!==1||!Q.target?.closest?.(nK))return;const B=Q.touches[0];B&&(L=!0,D=!1,X=B.clientX,K=B.clientY,W.value=!1)},J=Q=>{if(!L)return;const B=Q.touches[0];if(!B)return;const oe=B.clientX-X,V=B.clientY-K;if(!D){if(Math.abs(oe)<q0&&Math.abs(V)<q0)return;if(Math.abs(oe)<Math.abs(V)*eK){L=!1;return}D=!0}let P=oe;oe>0&&!T.value&&(P=oe*.3),oe<0&&!A.value&&(P=oe*.3),ve.value=P,Q.cancelable&&Q.preventDefault()},j=Q=>{const B=window.innerWidth||1,oe=Q==="prev"?B:-B,V=Q==="prev"?-B:B,P=Q==="prev"?M:z;W.value=!0,ve.value=oe,le(Ta,()=>{P(),W.value=!1,ve.value=V,requestAnimationFrame(()=>{requestAnimationFrame(()=>{W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})})})})},de=()=>{if(!L||(L=!1,!D))return;const Q=window.innerWidth||1,B=ve.value,oe=Math.abs(B)>=Q*tK;if(oe&&B>0&&T.value){j("prev");return}if(oe&&B<0&&A.value){j("next");return}W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})},U=()=>{L&&(L=!1,D&&(W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})))},ee=Q=>{if(Q.key==="Escape"){Q.preventDefault(),Q.stopPropagation(),Y();return}if((Q.metaKey||Q.ctrlKey)&&Q.key.toLowerCase()==="s"){const B=t.modal.controls;if(B&&w(B.isEditing)){Q.preventDefault(),B.commitEdit();return}}g.value||(Q.key==="ArrowLeft"||Q.key==="ArrowRight")&&(Q.preventDefault(),Q.stopPropagation(),Q.key==="ArrowLeft"?M():z())};return xt(()=>{const Q=document.querySelector(".vuefinder__preview-modal");Q&&Q.focus()}),(Q,B)=>(C(),Ee(dr,{"on-request-close":Y,"body-style":ne.value,"body-class":"vuefinder__modal-layout__body--swipeable "+(g.value?"vuefinder__modal-layout__body--editing":""),"on-body-touchstart":je,"on-body-touchmove":J,"on-body-touchend":de,"on-body-touchcancel":U},Tw({default:Le(()=>[_("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:ee},[Z(aW,{onCloseRequest:Y}),(C(),Ee(el,{to:"body"},[g.value?Se("",!0):(C(),R("div",{key:0,class:"vuefinder__themer vuefinder__preview-modal__nav-overlay","data-theme":w(t).theme.current},[_("button",{disabled:!T.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:w(r)("Previous file"),onClick:M},[...B[7]||(B[7]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,HY),_("button",{disabled:!A.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:w(r)("Next file"),onClick:z},[...B[8]||(B[8]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,qY)],8,VY))])),_("div",WY,[w(u)?(C(),R("div",YY,[l("csv")?(C(),Ee(CW,{key:`csv-${d.value.path}`,onSuccess:B[0]||(B[0]=oe=>i.value=!0)})):l("text")?(C(),Ee(dW,{key:`text-${d.value.path}`,onSuccess:B[1]||(B[1]=oe=>i.value=!0)})):l("image")?(C(),Ee(SY,{key:`image-${d.value.path}`,onSuccess:B[2]||(B[2]=oe=>i.value=!0)})):l("video")?(C(),Ee(MY,{key:`video-${d.value.path}`,onSuccess:B[3]||(B[3]=oe=>i.value=!0)})):l("audio")?(C(),Ee(jY,{key:`audio-${d.value.path}`,onSuccess:B[4]||(B[4]=oe=>i.value=!0)})):l("application/pdf")?(C(),Ee(BY,{key:`pdf-${d.value.path}`,onSuccess:B[5]||(B[5]=oe=>i.value=!0)})):(C(),Ee(AY,{key:`default-${d.value.path}`,onSuccess:B[6]||(B[6]=oe=>i.value=!0)}))])):Se("",!0),g.value||p.value.length>1?(C(),R("div",KY,[g.value?(C(),R("span",{key:0,class:Be(["vuefinder__preview-modal__edit-chip",{"vuefinder__preview-modal__edit-chip--dirty":m.value}])},q(m.value?w(r)("Unsaved"):w(r)("Editing")),3)):(C(),R("span",{key:1,class:"vuefinder__preview-modal__pagination-text","aria-label":w(r)("File %s of %s",String(v.value+1),String(p.value.length))},q(v.value+1)+" / "+q(p.value.length),9,GY))])):Se("",!0),_("div",QY,[i.value===!1?(C(),R("div",XY,[B[9]||(B[9]=_("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[_("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),_("path",{class:"vuefinder__preview-modal__spinner-path",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),_("span",null,q(w(r)("Loading")),1)])):Se("",!0)])])],32)]),_:2},[y.value?{name:"buttons",fn:Le(()=>[_("div",JY,[g.value?(C(),R(We,{key:1},[_("button",{type:"button",class:"vf-btn vf-btn-primary vuefinder__preview-modal__edit-btn",disabled:!m.value,onClick:S},q(b.value),9,ZY),_("button",{type:"button",class:"vf-btn vf-btn-secondary vuefinder__preview-modal__edit-btn",onClick:O},q(w(r)("Cancel")),1)],64)):(C(),R("button",{key:0,type:"button",class:"vf-btn vf-btn-primary vuefinder__preview-modal__edit-btn",onClick:x},q(w(r)("Edit")),1))])]),key:"0"}:void 0]),1032,["body-style","body-class"]))}}),rK={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"};function iK(e,t){return C(),R("svg",rK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M13 19H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v4M16 22l5-5M21 21.5V17h-4.5"},null,-1)])])}const oK={render:iK},sK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function aK(e,t){return C(),R("svg",sK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 16H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2m-6 12h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2"},null,-1)])])}const Ym={render:aK},lK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function uK(e,t){return C(),R("svg",lK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1)])])}const ar={render:uK},cK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function dK(e,t){return C(),R("svg",cK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const Zc={render:dK},fK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function pK(e,t){return C(),R("svg",fK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M5 12h14"},null,-1)])])}const ed={render:pK},hK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"};function mK(e,t){return C(),R("svg",hK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1)])])}const Qa={render:mK},vK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function gK(e,t){return C(),R("svg",vK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1)])])}const Km={render:gK},_K={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function yK(e,t){return C(),R("svg",_K,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1)])])}const td={render:yK},bK={class:"vuefinder__modal-tree__folder-item"},wK={class:"vuefinder__modal-tree__folder-content"},EK={key:1,class:"vuefinder__modal-tree__folder-spacer"},SK={class:"vuefinder__modal-tree__folder-text"},CK={key:0,class:"vuefinder__modal-tree__subfolders"},xK={key:0,class:"vuefinder__modal-tree__more-note"},TK=300,kK=ze({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(e,{emit:t}){const n=rt(),{t:r}=n.i18n,i=n.fs,o=re({}),s=e,l=t;Qe(i.path);const u=se(()=>{const z=`${s.storage}:${s.folder.path}`;return s.expandedFolders[z]||!1}),d=se(()=>s.modelValue?.path===s.folder.path),f=se(()=>s.currentPath?.path===s.folder.path),p=se(()=>s.modalTreeData[s.folder.path]||[]),v=se(()=>{const z=p.value,Y=o.value[s.folder.path]||50;return z.length>Y?z.slice(0,Y):z}),y=se(()=>p.value.length),g=se(()=>o.value[s.folder.path]||50),m=se(()=>y.value>g.value),b=()=>{o.value[s.folder.path]=(g.value||50)+50},x=se(()=>p.value.length>0||s.folder.type==="dir"),S=()=>{l("toggleFolder",s.storage,s.folder.path)},O=()=>{l("update:modelValue",s.folder)},T=()=>{l("update:modelValue",s.folder),l("selectAndClose",s.folder)};let A=0;const M=()=>{const z=Date.now();z-A<TK?T():O(),A=z};return(z,Y)=>{const ve=ft("ModalTreeFolderItem",!0);return C(),R("div",bK,[_("div",wK,[x.value?(C(),R("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:S},[u.value?(C(),Ee(w(ed),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(C(),Ee(w(Zc),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(C(),R("div",EK)),_("div",{class:Be(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":d.value,"vuefinder__modal-tree__folder-link--current":f.value}]),onClick:O,onDblclick:T,onTouchend:M},[u.value?(C(),Ee(w(td),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(C(),Ee(w(ar),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),_("span",SK,q(e.folder.basename),1)],34)]),u.value&&x.value?(C(),R("div",CK,[(C(!0),R(We,null,ct(v.value,W=>(C(),Ee(ve,{key:W.path,folder:W,storage:e.storage,"model-value":e.modelValue,"expanded-folders":e.expandedFolders,"modal-tree-data":e.modalTreeData,"current-path":e.currentPath,"onUpdate:modelValue":Y[0]||(Y[0]=X=>z.$emit("update:modelValue",X)),onSelectAndClose:Y[1]||(Y[1]=X=>z.$emit("selectAndClose",X)),onToggleFolder:Y[2]||(Y[2]=(X,K)=>z.$emit("toggleFolder",X,K))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),m.value?(C(),R("div",xK,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:b},q(w(r)("load more")),1)])):Se("",!0)])):Se("",!0)])}}}),OK={class:"vuefinder__modal-tree"},$K={class:"vuefinder__modal-tree__header"},AK={class:"vuefinder__modal-tree__title"},RK={key:0,class:"vuefinder__modal-tree__section"},PK={class:"vuefinder__modal-tree__section-title"},IK={class:"vuefinder__modal-tree__list"},MK=["onClick","onDblclick","onTouchend"],DK={class:"vuefinder__modal-tree__text"},FK={class:"vuefinder__modal-tree__text-storage"},LK={class:"vuefinder__modal-tree__section-title"},jK={class:"vuefinder__modal-tree__list"},UK={class:"vuefinder__modal-tree__storage-item"},NK={class:"vuefinder__modal-tree__storage-content"},zK=["onClick"],BK=["onClick","onDblclick","onTouchend"],VK={class:"vuefinder__modal-tree__storage-text"},HK={key:0,class:"vuefinder__modal-tree__subfolders"},qK={key:0,class:"vuefinder__modal-tree__more-note"},WK=["onClick"],W0=300,pl=ze({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(e,{emit:t}){const n=rt(),{t:r}=n.i18n,i=n.fs,o=n.config,s=t,l=Qe(i.sortedFiles),u=Qe(i.storages),d=se(()=>u.value||[]),f=Qe(i.path),p=re(null),v=re({}),y=re({}),g=re({});He(l,L=>{const D=L.filter(le=>le.type==="dir"),ne=f.value?.path||"";ne&&(y.value[ne]=D.map(le=>({...le,type:"dir"})))});const m=(L,D)=>{const ne=`${L}:${D}`;v.value={...v.value,[ne]:!v.value[ne]},v.value[ne]&&!y.value[D]&&n.adapter.list(D).then(le=>{const je=(le.files||[]).filter(J=>J.type==="dir");y.value[D]=je.map(J=>({...J,type:"dir"}))})},b=L=>y.value[L]||[],x=L=>g.value[L]||50,S=L=>{const D=b(L),ne=x(L);return D.length>ne?D.slice(0,ne):D},O=L=>b(L).length,T=L=>O(L)>x(L),A=L=>{g.value[L]=x(L)+50},M=L=>{L&&s("update:modelValue",L)},z=L=>{L&&(s("update:modelValue",L),s("selectAndClose",L))},Y=L=>{const D={storage:L,path:L+"://",basename:L,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:L+"://"};s("update:modelValue",D)},ve=L=>{const D={storage:L,path:L+"://",basename:L,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:L+"://"};s("update:modelValue",D),s("selectAndClose",D)};let W=0;const X=L=>{if(!L)return;const D=Date.now();D-W<W0?z(L):M(L),W=D},K=L=>{const D=Date.now();D-W<W0?ve(L):Y(L),W=D};return xt(()=>{p.value&&Hr(p.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(L,D)=>(C(),R("div",OK,[_("div",$K,[_("div",AK,q(w(r)("Select Target Folder")),1)]),_("div",{ref_key:"modalContentElement",ref:p,class:"vuefinder__modal-tree__content"},[e.showPinnedFolders&&w(n).features.pinned&&w(o).get("pinnedFolders").length?(C(),R("div",RK,[_("div",PK,q(w(r)("Pinned Folders")),1),_("div",IK,[(C(!0),R(We,null,ct(w(o).get("pinnedFolders"),ne=>(C(),R("div",{key:ne.path,class:Be(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":e.modelValue?.path===ne.path}]),onClick:le=>M(ne),onDblclick:le=>z(ne),onTouchend:le=>X(ne)},[Z(w(ar),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),_("div",DK,q(ne.basename),1),_("div",FK,q(ne.storage),1),Z(w(Qa),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,MK))),128))])])):Se("",!0),_("div",LK,q(w(r)("Storages")),1),(C(!0),R(We,null,ct(d.value,ne=>(C(),R("div",{key:ne,class:"vuefinder__modal-tree__section"},[_("div",jK,[_("div",UK,[_("div",NK,[_("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:ht(le=>m(ne,ne+"://"),["stop"])},[v.value[`${ne}:${ne}://`]?(C(),Ee(w(ed),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(C(),Ee(w(Zc),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,zK),_("div",{class:Be(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":e.modelValue?.path===ne+"://"}]),onClick:le=>Y(ne),onDblclick:le=>ve(ne),onTouchend:le=>K(ne)},[Z(w(Km),{class:"vuefinder__modal-tree__storage-icon"}),_("span",VK,q(ne),1)],42,BK)]),v.value[`${ne}:${ne}://`]?(C(),R("div",HK,[(C(!0),R(We,null,ct(S(ne+"://"),le=>(C(),Ee(kK,{key:le.path,folder:le,storage:ne,"model-value":e.modelValue,"expanded-folders":v.value,"modal-tree-data":y.value,"current-path":e.currentPath,"onUpdate:modelValue":M,onSelectAndClose:z,onToggleFolder:m},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),T(ne+"://")?(C(),R("div",qK,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:le=>A(ne+"://")},q(w(r)("load more")),9,WK)])):Se("",!0)])):Se("",!0)])])]))),128))],512)]))}}),YK=["title"],Sh=ze({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(e,{emit:t}){const n=t,r=rt(),{t:i}=r.i18n,o=re(!1),s=re(null),l=re(s.value?.innerHTML);He(l,()=>o.value=!1);const u=()=>{n("hidden"),o.value=!0};return(d,f)=>(C(),R("div",null,[o.value?Se("",!0):(C(),R("div",{key:0,ref_key:"strMessage",ref:s,class:Be(["vuefinder__message",e.error?"vuefinder__message--error":"vuefinder__message--success"])},[mt(d.$slots,"default"),_("div",{class:"vuefinder__message__close",title:w(i)("Close"),onClick:u},[...f[0]||(f[0]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,YK)],2))]))}}),KK={class:"vuefinder__move-modal__content"},GK={class:"vuefinder__move-modal__description"},QK={class:"vuefinder__move-modal__files vf-scrollbar"},XK={class:"vuefinder__move-modal__file-name"},JK={class:"vuefinder__move-modal__target-title"},ZK={class:"vuefinder__move-modal__target-container"},eG={class:"vuefinder__move-modal__target-path"},tG={class:"vuefinder__move-modal__target-storage"},nG={key:0,class:"vuefinder__move-modal__destination-folder"},rG={class:"vuefinder__move-modal__target-badge"},iG={key:0,class:"vuefinder__move-modal__options"},oG={class:"vuefinder__move-modal__checkbox-label"},sG={class:"vuefinder__move-modal__checkbox-text"},aG=["disabled"],lG={class:"vuefinder__move-modal__selected-items"},WC=ze({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(e){const t=rt(),n=cr(t),{enabled:r}=fr(),{t:i}=t.i18n,o=e,s=re(t.modal.data.items.from),l=re(t.modal.data.items.to),u=re(""),d=re(o.copy||!r("move")),f=se(()=>d.value?"copy":"move"),p=re(!1),v=Qe(t.fs.path),y=se(()=>d.value?i("Copy files"):i("Move files")),g=se(()=>d.value?i("Are you sure you want to copy these files?"):i("Are you sure you want to move these files?")),m=se(()=>d.value?i("Yes, Copy!"):i("Yes, Move!")),b=M=>{M&&(l.value=M)},x=M=>{M&&(l.value=M,p.value=!1)},S=se(()=>{const M=l.value;return M?s.value.some(z=>!!(M.path===z.path||z.type==="dir"&&M.path.startsWith(z.path+"/"))):!0}),O=se(()=>{if(!S.value)return"";const M=l.value;return M?s.value.find(z=>M.path===z.path||z.type==="dir"&&M.path.startsWith(z.path+"/"))?i("Cannot move/copy item to itself or its own subfolder"):i("Invalid destination directory"):i("Please select a destination directory")}),T=()=>{const M=l.value.path;if(!M)return{storage:"local",path:""};if(M.endsWith("://"))return{storage:M.replace("://",""),path:""};const z=M.split("://");return{storage:z[0]||"local",path:z[1]||""}},A=async()=>{if(s.value.length)try{const{files:M}=await t.adapter[f.value]({path:v.value.path,sources:s.value.map(({path:z})=>z),destination:l.value.path});t.fs.setFiles(M),t.modal.close()}catch(M){n.error(yn(M,i("Failed to transfer files")))}};return(M,z)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:S.value,onClick:A},q(m.value),9,aG),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:z[4]||(z[4]=Y=>w(t).modal.close())},q(w(i)("Cancel")),1),_("div",lG,q(w(i)("%s item(s) selected.",s.value.length)),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:d.value?w(Ym):w(oK),title:y.value},null,8,["icon","title"]),_("div",KK,[_("p",GK,q(g.value),1),_("div",QK,[(C(!0),R(We,null,ct(s.value,Y=>(C(),R("div",{key:Y.path,class:"vuefinder__move-modal__file"},[_("div",null,[Y.type==="dir"?(C(),Ee(w(ar),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(C(),Ee(w(Ga),{key:1,class:"vuefinder__move-modal__icon"}))]),_("div",XK,q(Y.path),1)]))),128))]),_("h4",JK,q(w(i)("Target Directory")),1),_("div",ZK,[_("div",{class:"vuefinder__move-modal__target-display",onClick:z[0]||(z[0]=Y=>p.value=!p.value)},[_("div",eG,[_("span",tG,q(T().storage)+"://",1),T().path?(C(),R("span",nG,q(T().path),1)):Se("",!0)]),_("span",rG,q(w(i)("Browse")),1)])]),_("div",{class:Be(["vuefinder__move-modal__tree-selector",p.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[Z(pl,{modelValue:l.value,"onUpdate:modelValue":[z[1]||(z[1]=Y=>l.value=Y),b],"show-pinned-folders":!0,onSelectAndClose:x},null,8,["modelValue"])],2),w(r)("copy")&&w(r)("move")?(C(),R("div",iG,[_("label",oG,[Ct(_("input",{"onUpdate:modelValue":z[2]||(z[2]=Y=>d.value=Y),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[Zs,d.value]]),_("span",sG,q(w(i)("Create a copy instead of moving")),1)])])):Se("",!0),O.value?(C(),Ee(Sh,{key:1,error:""},{default:Le(()=>[Et(q(O.value),1)]),_:1})):Se("",!0),u.value.length&&!O.value?(C(),Ee(Sh,{key:2,error:"",onHidden:z[3]||(z[3]=Y=>u.value="")},{default:Le(()=>[Et(q(u.value),1)]),_:1})):Se("",!0)])])]),_:1}))}}),Xs=ze({__name:"ModalMove",setup(e){return(t,n)=>(C(),Ee(WC,{copy:!1}))}}),Gm=ze({__name:"ModalCopy",setup(e){return(t,n)=>(C(),Ee(WC,{copy:!0}))}}),uG=(e,t=0,n=!1)=>{let r;return(...i)=>{n&&!r&&e(...i),clearTimeout(r),r=setTimeout(()=>{e(...i)},t)}},YC=(e,t,n)=>{const r=re(e);return Ew((i,o)=>({get(){return i(),r.value},set:uG(s=>{r.value=s,o()},t,!1)}))},cG={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function dG(e,t){return C(),R("svg",cG,[...t[0]||(t[0]=[_("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1)])])}const Qm={render:dG},fG={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"};function pG(e,t){return C(),R("svg",fG,[...t[0]||(t[0]=[_("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),_("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1)])])}const nd={render:pG},hG={class:"vuefinder__search-modal__search-input"},mG=["value","placeholder","disabled"],vG={key:0,class:"vuefinder__search-modal__loading"},gG=ze({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(e,{expose:t,emit:n}){const r=n,i=rt(),{t:o}=i.i18n,s=re(null),l=d=>{const f=d.target;r("update:modelValue",f.value)},u=d=>{r("keydown",d)};return t({focus:()=>{s.value&&s.value.focus()}}),(d,f)=>(C(),R("div",hG,[Z(w(Qm),{class:"vuefinder__search-modal__search-icon"}),_("input",{ref_key:"searchInput",ref:s,value:e.modelValue,type:"text",placeholder:w(o)("Search files"),disabled:e.disabled,class:"vuefinder__search-modal__input",onKeydown:u,onKeyup:f[0]||(f[0]=ht(()=>{},["stop"])),onInput:l},null,40,mG),e.isSearching?(C(),R("div",vG,[Z(w(nd),{class:"vuefinder__search-modal__loading-icon"})])):Se("",!0)]))}}),_G={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function yG(e,t){return C(),R("svg",_G,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1)])])}const KC={render:yG},bG=["disabled","title"],wG=["data-theme"],EG={class:"vuefinder__search-modal__dropdown-content"},SG={class:"vuefinder__search-modal__dropdown-section"},CG={class:"vuefinder__search-modal__dropdown-title"},xG={class:"vuefinder__search-modal__dropdown-options"},TG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},kG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},OG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},$G={key:0,class:"vuefinder__search-modal__dropdown-option-check"},AG={class:"vuefinder__search-modal__dropdown-section"},RG={class:"vuefinder__search-modal__dropdown-title"},PG={class:"vuefinder__search-modal__dropdown-options"},IG=["onClick"],MG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},DG=ze({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{},sortBy:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","update:sortBy","keydown"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=rt(),{t:s}=o.i18n,l=re(null),u=re(null);let d=null;const f=[{value:"name-asc",key:"Name (A-Z)"},{value:"name-desc",key:"Name (Z-A)"},{value:"size-asc",key:"Size (smallest)"},{value:"size-desc",key:"Size (largest)"},{value:"date-desc",key:"Date (newest)"},{value:"date-asc",key:"Date (oldest)"}],p=x=>{if(i("update:selectedOption",x),x.startsWith("size-")){const S=x.split("-")[1];i("update:sizeFilter",S)}},v=x=>{i("update:sortBy",x)},y=async()=>{r.disabled||(r.visible?(i("update:visible",!1),d&&(d(),d=null)):(i("update:visible",!0),await gt(),await g()))},g=async()=>{if(!(!l.value||!u.value)&&(await gt(),!(!l.value||!u.value))){Object.assign(u.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x,y:S}=await js(l.value,u.value,{placement:"bottom-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(u.value.style,{left:`${x}px`,top:`${S}px`}),requestAnimationFrame(()=>{u.value&&Object.assign(u.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(x){console.warn("Floating UI initial positioning error:",x);return}try{d=Dh(l.value,u.value,async()=>{if(!(!l.value||!u.value))try{const{x,y:S}=await js(l.value,u.value,{placement:"bottom-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(u.value.style,{left:`${x}px`,top:`${S}px`})}catch(x){console.warn("Floating UI positioning error:",x)}})}catch(x){console.warn("Floating UI autoUpdate setup error:",x),d=null}}},m=x=>{if(!r.visible)return;const S=["size-all","size-small","size-medium","size-large"],O=S.findIndex(T=>T===r.selectedOption);if(x.key==="ArrowDown"){x.preventDefault();const T=(O+1)%S.length;i("update:selectedOption",S[T]||null)}else if(x.key==="ArrowUp"){x.preventDefault();const T=O<=0?S.length-1:O-1;i("update:selectedOption",S[T]||null)}else x.key==="Enter"?(x.preventDefault(),r.selectedOption?.startsWith("size-")&&i("update:sizeFilter",r.selectedOption.split("-")[1])):x.key==="Escape"&&(x.preventDefault(),i("update:visible",!1),d&&(d(),d=null))},b=()=>{d&&(d(),d=null)};return He(()=>r.visible,x=>{!x&&d&&(d(),d=null)}),xn(()=>{b()}),t({cleanup:b}),(x,S)=>(C(),R(We,null,[_("button",{ref_key:"dropdownBtn",ref:l,class:Be(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":e.visible}]),disabled:e.disabled,title:w(s)("Search Options"),onClick:ht(y,["stop"])},[Z(w(KC),{class:"vuefinder__search-modal__dropdown-icon"})],10,bG),(C(),Ee(el,{to:"body"},[e.visible?(C(),R("div",{key:0,ref_key:"dropdownContent",ref:u,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":w(o).theme.current,tabindex:"-1",onClick:S[4]||(S[4]=ht(()=>{},["stop"])),onKeydown:m},[_("div",EG,[_("div",SG,[_("div",CG,q(w(s)("File Size")),1),_("div",xG,[_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="all"}]),onClick:S[0]||(S[0]=ht(O=>p("size-all"),["stop"]))},[_("span",null,q(w(s)("All Files")),1),e.sizeFilter==="all"?(C(),R("div",TG,[...S[5]||(S[5]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="small"}]),onClick:S[1]||(S[1]=ht(O=>p("size-small"),["stop"]))},[_("span",null,q(w(s)("Small (< 1MB)")),1),e.sizeFilter==="small"?(C(),R("div",kG,[...S[6]||(S[6]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="medium"}]),onClick:S[2]||(S[2]=ht(O=>p("size-medium"),["stop"]))},[_("span",null,q(w(s)("Medium (1-10MB)")),1),e.sizeFilter==="medium"?(C(),R("div",OG,[...S[7]||(S[7]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="large"}]),onClick:S[3]||(S[3]=ht(O=>p("size-large"),["stop"]))},[_("span",null,q(w(s)("Large (> 10MB)")),1),e.sizeFilter==="large"?(C(),R("div",$G,[...S[8]||(S[8]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2)])]),_("div",AG,[_("div",RG,q(w(s)("Sort by")),1),_("div",PG,[(C(),R(We,null,ct(f,O=>_("div",{key:O.value,class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sortBy===O.value}]),onClick:ht(T=>v(O.value),["stop"])},[_("span",null,q(w(s)(O.key)),1),e.sortBy===O.value?(C(),R("div",MG,[...S[9]||(S[9]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],10,IG)),64))])])])],40,wG)):Se("",!0)]))],64))}});function rd(e,t=40){const n=e.match(/^([^:]+:\/\/)(.*)$/);if(!n)return e;const r=n[1],i=n[2]??"",o=i.split("/").filter(Boolean),s=o.pop();if(!s)return r+i;let l=`${r}${o.join("/")}${o.length?"/":""}${s}`;if(l.length<=t)return l;const u=s.split(/\.(?=[^\.]+$)/),d=u[0]??"",f=u[1]??"",p=d.length>10?`${d.slice(0,6)}...${d.slice(-5)}`:d,v=f?`${p}.${f}`:p;return l=`${r}${o.join("/")}${o.length?"/":""}${v}`,l.length>t&&(l=`${r}.../${v}`),l}async function GC(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Xa(e){await GC(e)}async function FG(e){await GC(e)}const LG={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function jG(e,t){return C(),R("svg",LG,[...t[0]||(t[0]=[_("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1)])])}const QC={render:jG},UG=["title"],NG={class:"vuefinder__search-modal__result-icon"},zG={class:"vuefinder__search-modal__result-content"},BG={class:"vuefinder__search-modal__result-name"},VG={key:1,class:"vuefinder__search-modal__result-size"},HG=["title"],qG=["title"],WG=["data-item-dropdown","data-theme"],YG={class:"vuefinder__search-modal__item-dropdown-content"},KG=ze({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","open","preview","activate"],setup(e,{emit:t}){const n=e,r=t,i=rt(),{t:o}=i.i18n,{enabled:s}=fr(),l=Qe(i.config.state),u=se(()=>s("pinned")),d=se(()=>l.value.pinnedFolders.some(L=>L.path===n.item.path)),f=L=>{const D=i.config.get("pinnedFolders");D.some(ne=>ne.path===L.path)?i.config.set("pinnedFolders",D.filter(ne=>ne.path!==L.path)):i.config.set("pinnedFolders",[...D,L])},p=re(null);let v=null,y=null,g=[],m=null;He(()=>n.activeDropdown,L=>{v&&(v(),v=null),y&&(g.forEach(D=>{D===window?window.removeEventListener("scroll",y,!0):D.removeEventListener("scroll",y,!0)}),y=null,g=[]),m&&(document.removeEventListener("mousedown",m,!0),document.removeEventListener("touchstart",m,!0),m=null),L===n.item.path&&p.value&&gt(()=>{M(n.item.path,p.value),x(),S()})});const b=L=>{const D=[];let ne=L;for(;ne&&ne!==document.body&&ne!==document.documentElement;){const le=window.getComputedStyle(ne),je=le.overflow+le.overflowX+le.overflowY;(je.includes("scroll")||je.includes("auto"))&&D.push(ne),ne=ne.parentElement}return D},x=()=>{if(n.activeDropdown!==n.item.path)return;const L=b(p.value);g=[window,...L],y=()=>{n.activeDropdown===n.item.path&&r("toggleItemDropdown",n.item.path,new MouseEvent("click"))};const D=y;D&&g.forEach(ne=>{ne===window?window.addEventListener("scroll",D,!0):ne.addEventListener("scroll",D,!0)})},S=()=>{n.activeDropdown===n.item.path&&(m=L=>{if(n.activeDropdown!==n.item.path)return;const D=L.target;if(!D)return;const ne=document.querySelector(`[data-item-dropdown="${n.item.path}"]`);if(ne&&ne.contains(D)||p.value&&p.value.contains(D))return;const le=i.root;if(le&&le.contains(D)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}const je=document.querySelector(".vuefinder__modal-layout");if(je&&je.contains(D)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}r("toggleItemDropdown",n.item.path,new MouseEvent("click"))},setTimeout(()=>{m&&(document.addEventListener("mousedown",m,!0),document.addEventListener("touchstart",m,!0))},100))};xn(()=>{v&&(v(),v=null),y&&(g.forEach(L=>{L===window?window.removeEventListener("scroll",y,!0):L.removeEventListener("scroll",y,!0)}),y=null,g=[]),m&&(document.removeEventListener("mousedown",m,!0),document.removeEventListener("touchstart",m,!0),m=null)});const O=L=>n.expandedPaths.has(L),T=L=>L.type==="dir"||!L.file_size?"":Bm(L.file_size),A=(L,D)=>{D.stopPropagation(),r("toggleItemDropdown",L,D)},M=async(L,D)=>{const ne=document.querySelector(`[data-item-dropdown="${L}"]`);if(!(!ne||!D)&&(await gt(),!(!ne||!D))){Object.assign(ne.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:le,y:je}=await js(D,ne,{placement:"left-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(ne.style,{left:`${le}px`,top:`${je}px`}),requestAnimationFrame(()=>{ne&&Object.assign(ne.style,{opacity:"1",transform:"translateY(0)"})})}catch(le){console.warn("Floating UI initial positioning error:",le);return}try{v=Dh(D,ne,async()=>{if(!(!D||!ne))try{const{x:le,y:je}=await js(D,ne,{placement:"left-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(ne.style,{left:`${le}px`,top:`${je}px`})}catch(le){console.warn("Floating UI positioning error:",le)}})}catch(le){console.warn("Floating UI autoUpdate setup error:",le),v=null}}},z=L=>{r("update:selectedItemDropdownOption",L)},Y=async L=>{await Xa(L.path),r("copyPath",L)},ve=L=>{r("openContainingFolder",L)},W=L=>{r("preview",L)},X=L=>{r("open",L)},K=L=>{if(!n.activeDropdown)return;const D=["copy-path","open-folder","preview"],ne=n.selectedItemDropdownOption,le=D.findIndex(je=>ne?.includes(je));if(L.key==="ArrowDown"){L.preventDefault();const je=(le+1)%D.length;r("update:selectedItemDropdownOption",`${D[je]||""}-${n.activeDropdown}`)}else if(L.key==="ArrowUp"){L.preventDefault();const je=le<=0?D.length-1:le-1;r("update:selectedItemDropdownOption",`${D[je]||""}-${n.activeDropdown}`)}else L.key==="Enter"?(L.preventDefault(),ne&&(ne.includes("copy-path")?Y(n.item):ne.includes("open-folder")?ve(n.item):ne.includes("preview")&&W(n.item))):L.key==="Escape"&&(L.preventDefault(),r("update:selectedItemDropdownOption",null))};return(L,D)=>(C(),R("div",{class:Be(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":e.index===e.selectedIndex}]),title:e.item.basename,onClick:D[13]||(D[13]=ne=>r("select",e.index)),onDblclick:D[14]||(D[14]=ht(ne=>r("activate",e.item),["stop"]))},[_("div",NG,[e.item.type==="dir"?(C(),Ee(w(ar),{key:0})):(C(),Ee(w(Ga),{key:1}))]),_("div",zG,[_("div",BG,[e.item.type==="dir"&&u.value&&d.value?(C(),Ee(w(Qa),{key:0,class:"vuefinder__search-modal__result-pin",title:w(o)("Pinned")},null,8,["title"])):Se("",!0),Et(" "+q(e.item.basename)+" ",1),T(e.item)?(C(),R("span",VG,q(T(e.item)),1)):Se("",!0)]),_("div",{class:"vuefinder__search-modal__result-path",title:e.item.path,onClick:D[0]||(D[0]=ht(ne=>{r("select",e.index),r("togglePathExpansion",e.item.path)},["stop"]))},q(O(e.item.path)?e.item.path:w(rd)(e.item.path)),9,HG)]),_("button",{ref_key:"buttonElementRef",ref:p,class:"vuefinder__search-modal__result-actions",title:w(o)("More actions"),onClick:D[1]||(D[1]=ne=>{r("selectWithDropdown",e.index),A(e.item.path,ne)})},[Z(w(QC),{class:"vuefinder__search-modal__result-actions-icon"})],8,qG),(C(),Ee(el,{to:"body"},[e.activeDropdown===e.item.path?(C(),R("div",{key:0,"data-item-dropdown":e.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":w(i).theme.current,tabindex:"-1",onClick:D[12]||(D[12]=ht(()=>{},["stop"])),onKeydown:K},[_("div",YG,[_("div",{class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`copy-path-${e.item.path}`}]),onClick:D[2]||(D[2]=ne=>{z(`copy-path-${e.item.path}`),Y(e.item)}),onFocus:D[3]||(D[3]=ne=>z(`copy-path-${e.item.path}`))},[Z(w(Ym),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Copy Path")),1)],34),_("div",{class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`open-folder-${e.item.path}`}]),onClick:D[4]||(D[4]=ne=>{z(`open-folder-${e.item.path}`),ve(e.item)}),onFocus:D[5]||(D[5]=ne=>z(`open-folder-${e.item.path}`))},[Z(w(ar),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Open Containing Folder")),1)],34),e.item.type==="dir"?(C(),R("div",{key:0,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`open-${e.item.path}`}]),onClick:D[6]||(D[6]=ne=>{z(`open-${e.item.path}`),X(e.item)}),onFocus:D[7]||(D[7]=ne=>z(`open-${e.item.path}`))},[Z(w(ar),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Open")),1)],34)):Se("",!0),e.item.type==="dir"&&u.value?(C(),R("div",{key:1,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`pin-${e.item.path}`}]),onClick:D[8]||(D[8]=ne=>{z(`pin-${e.item.path}`),f(e.item)}),onFocus:D[9]||(D[9]=ne=>z(`pin-${e.item.path}`))},[Z(w(Qa),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(d.value?w(o)("Unpin Folder"):w(o)("Pin Folder")),1)],34)):(C(),R("div",{key:2,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`preview-${e.item.path}`}]),onClick:D[10]||(D[10]=ne=>{z(`preview-${e.item.path}`),W(e.item)}),onFocus:D[11]||(D[11]=ne=>z(`preview-${e.item.path}`))},[Z(w(Ga),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Preview")),1)],34))])],40,WG)):Se("",!0)]))],42,UG))}}),GG={key:0,class:"vuefinder__search-modal__searching"},QG={class:"vuefinder__search-modal__loading-icon"},XG={key:1,class:"vuefinder__search-modal__no-results"},JG={key:2,class:"vuefinder__search-modal__results-list"},ZG={class:"vuefinder__search-modal__results-header"},zo=60,Y0=5,eQ=ze({name:"SearchResultsList",__name:"SearchResultsList",props:{searchResults:{},isSearching:{type:Boolean},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{},resultsEnter:{type:Boolean}},emits:["selectResultItem","selectResultItemWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","open","preview","activate"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=rt(),{t:s}=o.i18n,l=_i("scrollableContainer"),u=se(()=>r.searchResults.length>0),d=se(()=>r.searchResults.length),f=re(0),p=re(600),v=se(()=>r.searchResults.length*zo),y=se(()=>{const O=Math.max(0,Math.floor(f.value/zo)-Y0),T=Math.min(r.searchResults.length,Math.ceil((f.value+p.value)/zo)+Y0);return{start:O,end:T}}),g=se(()=>{const{start:O,end:T}=y.value;return r.searchResults.slice(O,T).map((A,M)=>({item:A,index:O+M,top:(O+M)*zo}))}),m=O=>{const T=O.target;f.value=T.scrollTop},b=()=>{l.value&&(p.value=l.value.clientHeight)},x=()=>{if(r.selectedIndex>=0&&l.value){const O=r.selectedIndex*zo,T=O+zo,A=l.value.scrollTop,M=l.value.clientHeight,z=A+M;let Y=A;O<A?Y=O:T>z&&(Y=T-M),Y!==A&&l.value.scrollTo({top:Y,behavior:"smooth"})}},S=()=>{l.value&&(l.value.scrollTop=0,f.value=0)};return xt(()=>{b(),window.addEventListener("resize",b)}),xn(()=>{window.removeEventListener("resize",b)}),He(()=>l.value,()=>{b()}),t({scrollSelectedIntoView:x,resetScroll:S,getContainerHeight:()=>p.value,scrollTop:()=>f.value}),(O,T)=>(C(),R("div",{class:Be(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":e.resultsEnter}])},[e.isSearching?(C(),R("div",GG,[_("div",QG,[Z(w(nd),{class:"vuefinder__search-modal__loading-icon"})]),_("span",null,q(w(s)("Searching...")),1)])):u.value?(C(),R("div",JG,[_("div",ZG,[_("span",null,q(w(s)("Found %s results",d.value)),1)]),_("div",{ref_key:"scrollableContainer",ref:l,class:"vuefinder__search-modal__results-scrollable",onScroll:m},[_("div",{class:"vuefinder__search-modal__results-items",style:an({height:`${v.value}px`,position:"relative"})},[(C(!0),R(We,null,ct(g.value,A=>(C(),R("div",{key:A.item.path,style:an({position:"absolute",top:`${A.top}px`,left:"0",width:"100%",height:`${zo}px`})},[Z(KG,{item:A.item,index:A.index,"selected-index":e.selectedIndex,"expanded-paths":e.expandedPaths,"active-dropdown":e.activeDropdown,"selected-item-dropdown-option":e.selectedItemDropdownOption,onSelect:T[0]||(T[0]=M=>i("selectResultItem",M)),onSelectWithDropdown:T[1]||(T[1]=M=>i("selectResultItemWithDropdown",M)),onTogglePathExpansion:T[2]||(T[2]=M=>i("togglePathExpansion",M)),onToggleItemDropdown:T[3]||(T[3]=(M,z)=>i("toggleItemDropdown",M,z)),"onUpdate:selectedItemDropdownOption":T[4]||(T[4]=M=>i("update:selectedItemDropdownOption",M)),onCopyPath:T[5]||(T[5]=M=>i("copyPath",M)),onOpenContainingFolder:T[6]||(T[6]=M=>i("openContainingFolder",M)),onOpen:T[7]||(T[7]=M=>i("open",M)),onPreview:T[8]||(T[8]=M=>i("preview",M)),onActivate:T[9]||(T[9]=M=>i("activate",M))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(C(),R("div",XG,[_("span",null,q(w(s)("No results found")),1)]))],2))}}),tQ={class:"vuefinder__search-modal"},nQ={class:"vuefinder__search-modal__content"},rQ={class:"vuefinder__search-modal__search-bar"},iQ={class:"vuefinder__search-modal__search-location"},oQ=["title"],sQ=["disabled"],aQ={key:0,class:"vuefinder__search-modal__folder-selector"},lQ={class:"vuefinder__search-modal__folder-selector-content"},uQ={key:1,class:"vuefinder__search-modal__instructions"},cQ={class:"vuefinder__search-modal__instructions-text"},Xm=ze({name:"ModalSearch",__name:"ModalSearch",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=re(null),s=re(null),l=re(null),u=YC("",300),d=re([]),f=re(!1),p=re(-1);let v=null;const y=re(!1),g=re(!1),m=re(null),b=re("all"),x=re(!1),S=re("name-asc"),O={"name-asc":{column:"basename",direction:1},"name-desc":{column:"basename",direction:-1},"size-asc":{column:"file_size",direction:1},"size-desc":{column:"file_size",direction:-1},"date-asc":{column:"last_modified",direction:1},"date-desc":{column:"last_modified",direction:-1}},T=se(()=>{const{column:V,direction:P}=O[S.value];return d.value.slice().sort((F,G)=>LC(F[V],G[V])*P)}),A=re(`size-${b.value}`),M=re(null),z=re(new Set),Y=re(null),ve=Qe(i.path),W=V=>{z.value.has(V)?z.value.delete(V):z.value.add(V)},X=(V,P)=>{P&&typeof P.stopPropagation=="function"&&P.stopPropagation(),Y.value===V?Y.value=null:Y.value=V},K=()=>{Y.value=null},L=V=>{try{const P=V.dir||`${V.storage}://`;t.adapter.open(P),t.modal.close(),K()}catch{n.error(r("Failed to open containing folder"))}},D=V=>{t.modal.open(qi,{storage:ve?.value?.storage??"local",item:V}),K()},ne=V=>{t.adapter.open(V.path),t.modal.close(),K()},le=V=>{V.type==="dir"?ne(V):D(V)},je=V=>{p.value=V,K()},J=V=>{p.value=V},j=async V=>{await Xa(V.path),K()};He(u,async V=>{V.trim()?(await U(V.trim()),p.value=0):(v&&(v.abort(),v=null),d.value=[],f.value=!1,p.value=-1)}),He(b,async V=>{A.value=`size-${V}`,u.value.trim()&&!g.value&&(await U(u.value.trim()),p.value=0)}),He(x,async()=>{u.value.trim()&&!g.value&&(await U(u.value.trim()),p.value=0)});const de=V=>{if(!V||typeof V!="object")return!1;const P=V.name;return P==="AbortError"||P==="CanceledError"},U=async V=>{if(!V)return;v&&v.abort();const P=new AbortController;v=P,f.value=!0;try{const F=m.value?.path||ve?.value?.path,G=await t.adapter.search({path:F,filter:V,deep:x.value,size:b.value,signal:P.signal});if(P.signal.aborted)return;d.value=G||[],f.value=!1}catch(F){if(de(F)||P.signal.aborted)return;n.error(yn(F,r("Search failed"))),d.value=[],f.value=!1}};xt(()=>{document.addEventListener("click",oe),A.value=`size-${b.value}`});const ee=()=>{g.value?(g.value=!1,u.value.trim()&&(U(u.value.trim()),p.value=0)):(y.value=!1,g.value=!0)},Q=V=>{V&&(m.value=V)},B=V=>{V&&(Q(V),g.value=!1,u.value.trim()&&(U(u.value.trim()),p.value=0))};xn(()=>{document.removeEventListener("click",oe),v&&(v.abort(),v=null),s.value&&s.value.cleanup()});const oe=V=>{const P=V.target;if(y.value&&(P.closest(".vuefinder__search-modal__dropdown")||(y.value=!1,gt(()=>{o.value&&o.value.focus()}))),Y.value){const F=P.closest(".vuefinder__search-modal__item-dropdown"),G=P.closest(".vuefinder__search-modal__result-item");!F&&!G&&K()}};return(V,P)=>(C(),Ee(dr,{class:"vuefinder__search-modal-layout"},{default:Le(()=>[_("div",tQ,[Z(xr,{icon:w(Qm),title:w(r)("Search files")},null,8,["icon","title"]),_("div",nQ,[_("div",rQ,[Z(gG,{ref_key:"searchInputRef",ref:o,modelValue:w(u),"onUpdate:modelValue":P[0]||(P[0]=F=>Za(u)?u.value=F:null),"is-searching":f.value,disabled:g.value},null,8,["modelValue","is-searching","disabled"]),Z(DG,{ref_key:"searchOptionsDropdownRef",ref:s,visible:y.value,"onUpdate:visible":P[1]||(P[1]=F=>y.value=F),"size-filter":b.value,"onUpdate:sizeFilter":P[2]||(P[2]=F=>b.value=F),"selected-option":A.value,"onUpdate:selectedOption":P[3]||(P[3]=F=>A.value=F),"sort-by":S.value,"onUpdate:sortBy":P[4]||(P[4]=F=>S.value=F),disabled:g.value},null,8,["visible","size-filter","selected-option","sort-by","disabled"])]),_("div",{class:"vuefinder__search-modal__options",onClick:P[8]||(P[8]=ht(()=>{},["stop"]))},[_("div",iQ,[_("button",{class:Be(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":g.value}]),onClick:ht(ee,["stop"])},[Z(w(ar),{class:"vuefinder__search-modal__location-icon"}),_("span",{class:"vuefinder__search-modal__location-text",title:m.value?.path||w(ve).path},q(w(rd)(m.value?.path||w(ve).path)),9,oQ),P[11]||(P[11]=_("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2)]),_("label",{class:"vuefinder__search-modal__deep-search",onClick:P[7]||(P[7]=ht(()=>{},["stop"]))},[Ct(_("input",{"onUpdate:modelValue":P[5]||(P[5]=F=>x.value=F),type:"checkbox",disabled:g.value,class:"vuefinder__search-modal__checkbox",onClick:P[6]||(P[6]=ht(()=>{},["stop"]))},null,8,sQ),[[Zs,x.value]]),_("span",null,q(w(r)("Include subfolders")),1)])]),g.value?(C(),R("div",aQ,[_("div",lQ,[Z(pl,{modelValue:m.value,"onUpdate:modelValue":[P[9]||(P[9]=F=>m.value=F),Q],"show-pinned-folders":!0,"current-path":w(ve),onSelectAndClose:B},null,8,["modelValue","current-path"])])])):Se("",!0),!w(u).trim()&&!g.value?(C(),R("div",uQ,[_("p",cQ,q(w(r)("Start typing to search files. Use options to filter or include subfolders.")),1)])):Se("",!0),w(u).trim()&&!g.value?(C(),Ee(eQ,{key:2,ref_key:"searchResultsListRef",ref:l,"search-results":T.value,"is-searching":f.value,"selected-index":p.value,"expanded-paths":z.value,"active-dropdown":Y.value,"selected-item-dropdown-option":M.value,"results-enter":!0,onSelectResultItem:je,onSelectResultItemWithDropdown:J,onTogglePathExpansion:W,onToggleItemDropdown:X,"onUpdate:selectedItemDropdownOption":P[10]||(P[10]=F=>M.value=F),onCopyPath:j,onOpenContainingFolder:L,onOpen:ne,onPreview:D,onActivate:le},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):Se("",!0)])])]),_:1}))}}),dQ={props:{on:{type:String,required:!0}},setup(e,{emit:t,slots:n}){const r=rt(),i=re(!1),{t:o}=r.i18n;let s=null;const l=()=>{s&&clearTimeout(s),i.value=!0,s=setTimeout(()=>{i.value=!1},2e3)};return xt(()=>{r.emitter.on(e.on,l)}),xn(()=>{s&&clearTimeout(s)}),{shown:i,t:o}}},fQ=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},pQ={key:1};function hQ(e,t,n,r,i,o){return C(),R("div",{class:Be(["vuefinder__action-message",{"vuefinder__action-message--hidden":!r.shown}])},[e.$slots.default?mt(e.$slots,"default",{key:0}):(C(),R("span",pQ,q(r.t("Saved.")),1))],2)}const K0=fQ(dQ,[["render",hQ]]),mQ=[{name:"silver",displayName:"Silver"},{name:"valorite",displayName:"Valorite"},{name:"midnight",displayName:"Midnight"},{name:"latte",displayName:"Latte"},{name:"rose",displayName:"Rose"},{name:"mythril",displayName:"Mythril"},{name:"lime",displayName:"lime"},{name:"sky",displayName:"Sky"},{name:"ocean",displayName:"Oceanic"},{name:"palenight",displayName:"Palenight"},{name:"arctic",displayName:"Arctic"},{name:"code",displayName:"Code"}],vQ={class:"vuefinder__settings-modal__content"},gQ={class:"vuefinder__settings-modal__main"},_Q={class:"vuefinder__settings-modal__sections"},yQ={key:0,class:"vuefinder__settings-modal__section"},bQ={for:"theme",class:"vuefinder__settings-modal__label"},wQ={class:"vuefinder__settings-modal__input-group"},EQ=["value"],SQ=["value"],CQ={key:1,class:"vuefinder__settings-modal__section"},xQ={for:"language",class:"vuefinder__settings-modal__label"},TQ={class:"vuefinder__settings-modal__input-group"},kQ=["value"],OQ={class:"vuefinder__settings-modal__reset-section"},$Q={class:"vuefinder__settings-modal__reset-content"},AQ={class:"vuefinder__settings-modal__reset-title"},RQ={class:"vuefinder__settings-modal__reset-description"},XC=ze({__name:"ModalSettings",setup(e){const t=rt(),{enabled:n}=fr(),r=t.config,{clearStore:i}=t.storage,{t:o,localeAtom:s}=t.i18n,l=Qe(s),u=se({get:()=>String(l.value||"en"),set:m=>s.set(m||"en")}),d=Qe(r.state),f=se(()=>d.value.theme||"silver"),p=async()=>{r.reset(),i(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},v=m=>{r.set("theme",m),t.emitter.emit("vf-theme-saved")},{i18n:y}=Fs("VueFinderOptions"),g=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",zhCN:"Chinese-Simplified (简体中文)",zhTW:"Chinese-Traditional (繁體中文)",nl:"Dutch (Nederlands)",en:"English",fr:"French (Français)",de:"German (Deutsch)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",it:"Italian (Italiano)",ja:"Japanese (日本語)",fa:"Persian (فارسی)",pl:"Polish (Polski)",pt:"Portuguese (Português)",ru:"Russian (Pусский)",es:"Spanish (Español)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)"}).filter(([m])=>Object.keys(y).includes(m)));return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=x=>w(t).modal.close())},q(w(o)("Close")),1)]),default:Le(()=>[_("div",vQ,[Z(xr,{icon:w(KC),title:w(o)("Settings")},null,8,["icon","title"]),_("div",gQ,[_("div",_Q,[w(n)("theme")?(C(),R("div",yQ,[_("label",bQ,[Et(q(w(o)("Theme"))+" ",1),Z(K0,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:Le(()=>[Et(q(w(o)("Saved.")),1)]),_:1})]),_("div",wQ,[_("select",{id:"theme",value:f.value,class:"vuefinder__settings-modal__select",onChange:b[0]||(b[0]=x=>v(x.target?.value))},[(C(!0),R(We,null,ct(w(mQ),x=>(C(),R("option",{key:x.name,value:x.name},q(x.displayName),9,SQ))),128))],40,EQ)])])):Se("",!0),Object.keys(w(g)).length>1?(C(),R("div",CQ,[_("label",xQ,[Et(q(w(o)("Language"))+" ",1),Z(K0,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:Le(()=>[Et(q(w(o)("Saved.")),1)]),_:1})]),_("div",TQ,[Ct(_("select",{id:"language","onUpdate:modelValue":b[1]||(b[1]=x=>u.value=x),class:"vuefinder__settings-modal__select"},[(C(!0),R(We,null,ct(w(g),(x,S)=>(C(),R("option",{key:S,value:S},q(x),9,kQ))),128))],512),[[Op,u.value]])])])):Se("",!0)]),_("div",OQ,[_("div",$Q,[_("div",AQ,q(w(o)("Reset")),1),_("div",RQ,q(w(o)("Reset all settings to default")),1)]),_("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:p},q(w(o)("Reset Settings")),1)])])])]),_:1}))}}),Qn={ESCAPE:"Escape",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF",SPACE:"Space",KEY_C:"KeyC",KEY_X:"KeyX",KEY_V:"KeyV",KEY_S:"KeyS",KEY_R:"KeyR"};function PQ(){const e=rt(),t=cr(e),n=e.fs,r=e.config,{enabled:i}=fr(),o=Qe(n.path),s=Qe(n.selectedItems),l=u=>{if(u.code===Qn.ESCAPE&&(e.modal.close(),e.root.focus()),!e.modal.visible){if(u.metaKey&&u.code===Qn.KEY_R&&!u.shiftKey&&(e.adapter.invalidateListQuery(o.value.path),e.adapter.open(o.value.path),u.preventDefault()),u.metaKey&&u.shiftKey&&u.code===Qn.KEY_R&&i("rename")&&s.value.length===1&&(e.modal.open(Jc,{items:s.value}),u.preventDefault()),u.code===Qn.DELETE&&s.value.length!==0&&e.modal.open(Xc,{items:s.value}),u.metaKey&&u.code===Qn.BACKSLASH&&e.modal.open(UC),u.metaKey&&u.code===Qn.KEY_F&&i("search")&&(e.modal.open(Xm),u.preventDefault()),u.metaKey&&u.code===Qn.KEY_E&&(r.toggle("showTreeView"),u.preventDefault()),u.metaKey&&u.code===Qn.KEY_S&&(e.modal.open(XC),u.preventDefault()),u.metaKey&&u.code===Qn.ENTER&&(r.toggle("fullScreen"),e.root.focus()),u.metaKey&&u.code===Qn.KEY_A&&(n.selectAll(e.selectionMode||"multiple",e),u.preventDefault()),u.code===Qn.SPACE&&s.value.length===1&&s.value[0]?.type!=="dir"&&e.modal.open(qi,{storage:n.path.get().storage,item:s.value[0]}),u.metaKey&&u.code===Qn.KEY_C&&i("copy")){if(s.value.length===0){t.error(e.i18n.t("No items selected"));return}n.setClipboard("copy",new Set(s.value.map(d=>Jt(d)))),t.success(s.value.length===1?e.i18n.t("Item copied to clipboard"):e.i18n.t("%s items copied to clipboard",s.value.length)),u.preventDefault()}if(u.metaKey&&u.code===Qn.KEY_X&&i("copy")){if(s.value.length===0){t.error(e.i18n.t("No items selected"));return}n.setClipboard("cut",new Set(s.value.map(d=>Jt(d)))),t.success(s.value.length===1?e.i18n.t("Item cut to clipboard"):e.i18n.t("%s items cut to clipboard",s.value.length)),u.preventDefault()}if(u.metaKey&&u.code===Qn.KEY_V&&i("copy")){if(n.getClipboard().items.size===0){t.error(e.i18n.t("No items in clipboard"));return}if(n.getClipboard().path===n.path.get().path){t.error(e.i18n.t("Cannot paste items to the same directory"));return}if(n.getClipboard().type==="cut"){e.modal.open(Xs,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}}),n.clearClipboard();return}if(n.getClipboard().type==="copy"){e.modal.open(Gm,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}});return}u.preventDefault()}}};xt(async()=>{if(await gt(),!e.root){console.warn("app.root is not available. Event listeners will not be attached.");return}e.root.addEventListener("keydown",l)}),ts(()=>{e.root&&e.root.removeEventListener("keydown",l)})}function IQ(){const e=re(!1),t=re([]);return{isDraggingExternal:e,externalFiles:t,handleDragEnter:n=>{n.preventDefault(),n.stopPropagation();const r=n.dataTransfer?.items;r&&Array.from(r).some(i=>i.kind==="file")&&(e.value=!0,n.isExternalDrag=!0)},handleDragOver:n=>{e.value&&n.dataTransfer&&(n.dataTransfer.dropEffect="copy",n.preventDefault(),n.stopPropagation())},handleDragLeave:n=>{n.preventDefault();const r=n.currentTarget.getBoundingClientRect(),i=n.clientX,o=n.clientY;(i<r.left||i>r.right||o<r.top||o>r.bottom)&&(e.value=!1)},handleDrop:async n=>{n.preventDefault(),n.stopPropagation(),e.value=!1;const r=n.dataTransfer?.items;if(r){const i=Array.from(r).filter(o=>o.kind==="file");if(i.length>0){t.value=[];for(const o of i){const s=o.webkitGetAsEntry?.();if(s)await qm((l,u)=>{t.value.push({name:u.name,size:u.size,type:u.type,lastModified:new Date(u.lastModified),file:u})},s);else{const l=o.getAsFile();l&&t.value.push({name:l.name,size:l.size,type:l.type,lastModified:new Date(l.lastModified),file:l})}}return t.value}}return[]},clearExternalFiles:()=>{t.value=[]}}}const MQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function DQ(e,t){return C(),R("svg",MQ,[...t[0]||(t[0]=[_("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1)])])}const JC={render:DQ},FQ={class:"vuefinder__new-folder-modal__content"},LQ={class:"vuefinder__new-folder-modal__form"},jQ={class:"vuefinder__new-folder-modal__description"},UQ=["placeholder"],Jm=ze({__name:"ModalNewFolder",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=()=>{s.value!==""&&t.adapter.createFolder({path:o.value.path,name:s.value}).then(u=>{n.success(r("%s is created.",s.value)),t.fs.setFiles(u.files),t.modal.close()}).catch(u=>{n.error(yn(u,r("Failed to create folder")))})};return(u,d)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},q(w(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:d[1]||(d[1]=f=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(JC),title:w(r)("New Folder")},null,8,["icon","title"]),_("div",FQ,[_("div",LQ,[_("p",jQ,q(w(r)("Create a new folder")),1),Ct(_("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),class:"vuefinder__new-folder-modal__input",placeholder:w(r)("Folder Name"),type:"text",autofocus:"",onKeyup:Lr(l,["enter"])},null,40,UQ),[[oi,s.value]])])])])]),_:1}))}}),NQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function zQ(e,t){return C(),R("svg",NQ,[...t[0]||(t[0]=[_("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1)])])}const ZC={render:zQ},BQ={class:"vuefinder__new-file-modal__content"},VQ={class:"vuefinder__new-file-modal__form"},HQ={class:"vuefinder__new-file-modal__description"},qQ=["placeholder"],e2=ze({__name:"ModalNewFile",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=()=>{s.value!==""&&t.adapter.createFile({path:o.value.path,name:s.value}).then(u=>{n.success(r("%s is created.",s.value)),t.fs.setFiles(u.files),t.modal.close()}).catch(u=>{n.error(yn(u,r("Failed to create file")))})};return(u,d)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},q(w(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:d[1]||(d[1]=f=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(ZC),title:w(r)("New File")},null,8,["icon","title"]),_("div",BQ,[_("div",VQ,[_("p",HQ,q(w(r)("Create a new file")),1),Ct(_("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),class:"vuefinder__new-file-modal__input",placeholder:w(r)("File Name"),type:"text",onKeyup:Lr(l,["enter"])},null,40,qQ),[[oi,s.value]])])])])]),_:1}))}}),WQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function YQ(e,t){return C(),R("svg",WQ,[...t[0]||(t[0]=[_("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1)])])}const t2={render:YQ};function Ch(e,t=14){const n=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return e.replace(new RegExp(n),"$2..$4")}const KQ={class:"vuefinder__upload-modal__content relative"},GQ={class:"vuefinder__upload-modal__target-section"},QQ={class:"vuefinder__upload-modal__target-label"},XQ={class:"vuefinder__upload-modal__target-container"},JQ={class:"vuefinder__upload-modal__target-path"},ZQ={class:"vuefinder__upload-modal__target-storage"},eX={key:0,class:"vuefinder__upload-modal__target-folder"},tX={class:"vuefinder__upload-modal__target-badge"},nX={class:"vuefinder__upload-modal__drag-hint"},rX={class:"vuefinder__upload-modal__file-list vf-scrollbar"},iX=["textContent"],oX={class:"vuefinder__upload-modal__file-info"},sX={key:0,class:"vuefinder__upload-modal__file-rename"},aX=["placeholder","onKeyup"],lX=["title","onClick"],uX=["title"],cX={class:"vuefinder__upload-modal__file-name hidden md:block"},dX={class:"vuefinder__upload-modal__file-name md:hidden"},fX={key:0,class:"ml-auto"},pX=["title","disabled","onClick"],hX=["title","disabled","onClick"],mX={key:0,class:"py-2"},vX=["aria-expanded"],gX={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},_X=["disabled"],yX=["aria-expanded"],bX={key:0,class:"vuefinder__upload-actions__menu"},Zm=ze({__name:"ModalUpload",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.path),o=re(i.value),s=re(!1),l=()=>{const oe=o.value.path;if(!oe)return{storage:"local",path:""};if(oe.endsWith("://"))return{storage:oe.replace("://",""),path:""};const V=oe.split("://");return{storage:V[0]||"local",path:V[1]||""}},u=oe=>{oe&&(o.value=oe)},d=oe=>{oe&&(o.value=oe,s.value=!1)},{container:f,internalFileInput:p,internalFolderInput:v,pickFiles:y,queue:g,message:m,uploading:b,hasFilesInDropArea:x,definitions:S,openFileSelector:O,upload:T,cancel:A,remove:M,clear:z,close:Y,getClassNameForEntry:ve,getIconForEntry:W,addExternalFiles:X,renameEntry:K}=VC(t.customUploader),L=re(null),D=re(""),ne=re(null),le=oe=>{const V=oe.lastIndexOf("/");return V===-1?oe:oe.slice(V+1)},je=oe=>{b.value||oe.status!==S.value.QUEUE_ENTRY_STATUS.UPLOADING&&(L.value=oe.id,D.value=le(oe.name),gt(()=>{const V=ne.value;if(V){V.focus();const P=D.value.lastIndexOf(".");P>0?V.setSelectionRange(0,P):V.select()}}))},J=()=>{L.value=null,D.value=""},j=async oe=>{const V=D.value.trim();if(!V||V===le(oe.name)){J();return}await K(oe,V),J()},de=()=>{T(o.value)};xt(()=>{t.emitter.on("vf-external-files-dropped",oe=>{X(oe)})}),xn(()=>{t.emitter.off("vf-external-files-dropped")});const U=re(!1),ee=re(null),Q=re(null),B=oe=>{if(!U.value)return;const V=oe.target,P=ee.value?.contains(V)??!1,F=Q.value?.contains(V)??!1;!P&&!F&&(U.value=!1)};return xt(()=>document.addEventListener("click",B)),xn(()=>document.removeEventListener("click",B)),(oe,V)=>(C(),Ee(dr,{"show-drag-overlay":w(x),"drag-overlay-text":w(n)("Drag and drop the files/folders to here.")},{buttons:Le(()=>[_("div",{ref_key:"actionsMenuMobileRef",ref:ee,class:"relative mb-2 w-full sm:hidden"},[_("div",{class:Be(["vuefinder__upload-actions","vuefinder__upload-actions--block",U.value?"vuefinder__upload-actions--ring":""])},[_("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:V[4]||(V[4]=P=>w(O)())},q(w(n)("Select Files")),1),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":U.value?"true":"false",onClick:V[5]||(V[5]=ht(P=>U.value=!U.value,["stop"]))},[...V[21]||(V[21]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,vX)],2),U.value?(C(),R("div",gX,[_("div",{class:"vuefinder__upload-actions__item",onClick:V[6]||(V[6]=P=>{w(O)(),U.value=!1})},q(w(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:V[7]||(V[7]=P=>{w(v)?.click(),U.value=!1})},q(w(n)("Select Folders")),1),V[22]||(V[22]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[8]||(V[8]=P=>w(b)?null:(w(z)(!1),U.value=!1))},q(w(n)("Clear all")),3),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[9]||(V[9]=P=>w(b)?null:(w(z)(!0),U.value=!1))},q(w(n)("Clear only successful")),3)])):Se("",!0)],512),_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:w(b)||!w(g).length,onClick:ht(de,["prevent"])},q(w(n)("Upload")),9,_X),w(b)?(C(),R("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:V[10]||(V[10]=ht((...P)=>w(A)&&w(A)(...P),["prevent"]))},q(w(n)("Cancel")),1)):(C(),R("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:V[11]||(V[11]=ht((...P)=>w(Y)&&w(Y)(...P),["prevent"]))},q(w(n)("Close")),1)),_("div",{ref_key:"actionsMenuDesktopRef",ref:Q,class:"relative mr-auto hidden sm:block"},[_("div",{class:Be(["vuefinder__upload-actions",U.value?"vuefinder__upload-actions--ring":""])},[_("button",{ref_key:"pickFiles",ref:y,type:"button",class:"vuefinder__upload-actions__main"},q(w(n)("Select Files")),513),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":U.value?"true":"false",onClick:V[12]||(V[12]=ht(P=>U.value=!U.value,["stop"]))},[...V[23]||(V[23]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,yX)],2),U.value?(C(),R("div",bX,[_("div",{class:"vuefinder__upload-actions__item",onClick:V[13]||(V[13]=P=>{w(O)(),U.value=!1})},q(w(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:V[14]||(V[14]=P=>{w(v)?.click(),U.value=!1})},q(w(n)("Select Folders")),1),V[24]||(V[24]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[15]||(V[15]=P=>w(b)?null:(w(z)(!1),U.value=!1))},q(w(n)("Clear all")),3),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[16]||(V[16]=P=>w(b)?null:(w(z)(!0),U.value=!1))},q(w(n)("Clear only successful")),3)])):Se("",!0)],512)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(t2),title:w(n)("Upload Files")},null,8,["icon","title"]),_("div",KQ,[_("div",GQ,[_("div",QQ,q(w(n)("Target Directory")),1),_("div",XQ,[_("div",{class:"vuefinder__upload-modal__target-display",onClick:V[0]||(V[0]=P=>s.value=!s.value)},[_("div",JQ,[_("span",ZQ,q(l().storage)+"://",1),l().path?(C(),R("span",eX,q(l().path),1)):Se("",!0)]),_("span",tX,q(w(n)("Browse")),1)])]),_("div",{class:Be(["vuefinder__upload-modal__tree-selector",s.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[Z(pl,{modelValue:o.value,"onUpdate:modelValue":[V[1]||(V[1]=P=>o.value=P),u],"show-pinned-folders":!0,onSelectAndClose:d},null,8,["modelValue"])],2)]),_("div",nX,q(w(n)("You can drag & drop files anywhere while this modal is open.")),1),_("div",{ref_key:"container",ref:f,class:"hidden"},null,512),_("div",rX,[(C(!0),R(We,null,ct(w(g),P=>(C(),R("div",{key:P.id,class:"vuefinder__upload-modal__file-entry"},[_("span",{class:Be(["vuefinder__upload-modal__file-icon",w(ve)(P)])},[_("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:q(w(W)(P))},null,8,iX)],2),_("div",oX,[L.value===P.id?(C(),R("div",sX,[Ct(_("input",{ref_for:!0,ref_key:"renameInputRef",ref:ne,"onUpdate:modelValue":V[2]||(V[2]=F=>D.value=F),type:"text",class:"vuefinder__upload-modal__file-rename-input",placeholder:w(n)("Rename"),onKeyup:[Lr(F=>j(P),["enter"]),Lr(J,["esc"])]},null,40,aX),[[oi,D.value]]),_("button",{type:"button",class:"vuefinder__upload-modal__file-rename-btn vuefinder__upload-modal__file-rename-btn--save",title:w(n)("Save"),onClick:F=>j(P)},[...V[17]||(V[17]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})],-1)])],8,lX),_("button",{type:"button",class:"vuefinder__upload-modal__file-rename-btn",title:w(n)("Cancel"),onClick:J},[...V[18]||(V[18]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,uX)])):(C(),R(We,{key:1},[_("div",cX,q(w(Ch)(P.name,40))+" ("+q(P.size)+") ",1),_("div",dX,q(w(Ch)(P.name,16))+" ("+q(P.size)+") ",1),_("div",{class:Be(["vuefinder__upload-modal__file-status",w(ve)(P)])},[Et(q(P.statusName)+" ",1),P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING?(C(),R("b",fX,q(P.percent),1)):Se("",!0)],2)],64))]),L.value!==P.id?(C(),R("button",{key:0,type:"button",class:Be(["vuefinder__upload-modal__file-rename-action",w(b)||P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING?"disabled":""]),title:w(n)("Rename"),disabled:w(b)||P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING,onClick:F=>je(P)},[...V[19]||(V[19]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125"})],-1)])],10,pX)):Se("",!0),L.value!==P.id?(C(),R("button",{key:1,type:"button",class:Be(["vuefinder__upload-modal__file-remove",w(b)?"disabled":""]),title:w(n)("Delete"),disabled:w(b),onClick:F=>w(M)(P)},[...V[20]||(V[20]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,hX)):Se("",!0)]))),128)),w(g).length?Se("",!0):(C(),R("div",mX,q(w(n)("No files selected!")),1))]),w(m).length?(C(),Ee(Sh,{key:0,error:"",onHidden:V[3]||(V[3]=P=>m.value="")},{default:Le(()=>[Et(q(w(m)),1)]),_:1})):Se("",!0)])]),_("input",{ref_key:"internalFileInput",ref:p,type:"file",multiple:"",class:"hidden"},null,512),_("input",{ref_key:"internalFolderInput",ref:v,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),wX={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function EX(e,t){return C(),R("svg",wX,[...t[0]||(t[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const n2={render:EX},SX={class:"vuefinder__unarchive-modal__content"},CX={class:"vuefinder__unarchive-modal__items"},xX={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},TX={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},kX={class:"vuefinder__unarchive-modal__item-name"},OX={class:"vuefinder__unarchive-modal__info"},$X={class:"vuefinder__unarchive-modal__target"},AX={class:"vuefinder__unarchive-modal__target-label"},RX=["title"],PX={key:0,class:"vuefinder__unarchive-modal__target-selector"},ev=ze({__name:"ModalUnarchive",setup(e){const t=rt(),n=cr(t),r=t.fs,i=Qe(r.path),{t:o}=t.i18n,s=re(t.modal.data.items[0]),l=re([]),u=re(null),d=re(!1),f=se(()=>u.value?.path||i.value.path),p=()=>{d.value=!d.value},v=m=>{m&&(u.value=m)},y=m=>{m&&(u.value=m,d.value=!1)},g=()=>{const m=u.value?.path;t.adapter.unarchive({item:s.value.path,path:i.value.path,...m&&m!==i.value.path?{destination:m}:{}}).then(b=>{n.success(o("The file unarchived.")),t.fs.setFiles(b.files),t.modal.close()}).catch(b=>{n.error(yn(b,o("Failed to unarchive")))})};return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:g},q(w(o)("Unarchive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[1]||(b[1]=x=>w(t).modal.close())},q(w(o)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(n2),title:w(o)("Unarchive")},null,8,["icon","title"]),_("div",SX,[_("div",CX,[(C(!0),R(We,null,ct(l.value,x=>(C(),R("p",{key:x.path,class:"vuefinder__unarchive-modal__item"},[x.type==="dir"?(C(),R("svg",xX,[...b[2]||(b[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",TX,[...b[3]||(b[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",kX,q(x.basename),1)]))),128)),_("p",OX,q(w(o)("The archive will be unarchived at"))+" ("+q(f.value)+") ",1),_("div",$X,[_("div",AX,q(w(o)("Target folder")),1),_("button",{type:"button",class:Be(["vuefinder__unarchive-modal__target-btn",{"vuefinder__unarchive-modal__target-btn--open":d.value}]),onClick:p},[Z(w(ar),{class:"vuefinder__unarchive-modal__target-icon"}),_("span",{class:"vuefinder__unarchive-modal__target-text",title:f.value},q(w(rd)(f.value)),9,RX),b[4]||(b[4]=_("svg",{class:"vuefinder__unarchive-modal__target-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2),d.value?(C(),R("div",PX,[Z(pl,{modelValue:u.value,"onUpdate:modelValue":[b[0]||(b[0]=x=>u.value=x),v],"show-pinned-folders":!0,"current-path":w(i),onSelectAndClose:y},null,8,["modelValue","current-path"])])):Se("",!0)])])])])]),_:1}))}}),IX={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function MX(e,t){return C(),R("svg",IX,[...t[0]||(t[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const r2={render:MX},DX={class:"vuefinder__archive-modal__content"},FX={class:"vuefinder__archive-modal__form"},LX={class:"vuefinder__archive-modal__files vf-scrollbar"},jX={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},UX={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},NX={class:"vuefinder__archive-modal__file-name"},zX=["placeholder"],BX={class:"vuefinder__archive-modal__target"},VX={class:"vuefinder__archive-modal__target-label"},HX=["title"],qX={key:0,class:"vuefinder__archive-modal__target-selector"},tv=ze({__name:"ModalArchive",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=re(t.modal.data.items),u=re(null),d=re(!1),f=se(()=>u.value?.path||o.value.path),p=()=>{d.value=!d.value},v=m=>{m&&(u.value=m)},y=m=>{m&&(u.value=m,d.value=!1)},g=()=>{if(l.value.length){const m=u.value?.path;t.adapter.archive({path:o.value.path,items:l.value.map(({path:b,type:x})=>({path:b,type:x})),name:s.value,...m&&m!==o.value.path?{destination:m}:{}}).then(b=>{n.success(r("The file(s) archived.")),t.fs.setFiles(b.files),t.modal.close()}).catch(b=>{n.error(yn(b,r("Failed to archive files")))})}};return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:g},q(w(r)("Archive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=x=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(r2),title:w(r)("Archive the files")},null,8,["icon","title"]),_("div",DX,[_("div",FX,[_("div",LX,[(C(!0),R(We,null,ct(l.value,x=>(C(),R("p",{key:x.path,class:"vuefinder__archive-modal__file"},[x.type==="dir"?(C(),R("svg",jX,[...b[3]||(b[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",UX,[...b[4]||(b[4]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",NX,q(x.basename),1)]))),128))]),Ct(_("input",{"onUpdate:modelValue":b[0]||(b[0]=x=>s.value=x),class:"vuefinder__archive-modal__input",placeholder:w(r)("Archive name. (.zip file will be created)"),type:"text",onKeyup:Lr(g,["enter"])},null,40,zX),[[oi,s.value]]),_("div",BX,[_("div",VX,q(w(r)("Target folder")),1),_("button",{type:"button",class:Be(["vuefinder__archive-modal__target-btn",{"vuefinder__archive-modal__target-btn--open":d.value}]),onClick:p},[Z(w(ar),{class:"vuefinder__archive-modal__target-icon"}),_("span",{class:"vuefinder__archive-modal__target-text",title:f.value},q(w(rd)(f.value)),9,HX),b[5]||(b[5]=_("svg",{class:"vuefinder__archive-modal__target-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2),d.value?(C(),R("div",qX,[Z(pl,{modelValue:u.value,"onUpdate:modelValue":[b[1]||(b[1]=x=>u.value=x),v],"show-pinned-folders":!0,"current-path":w(o),onSelectAndClose:y},null,8,["modelValue","current-path"])])):Se("",!0)])])])])]),_:1}))}}),WX={class:"vuefinder__about-modal__content"},YX={class:"vuefinder__about-modal__main"},KX={class:"vuefinder__about-modal__shortcuts"},GX={class:"vuefinder__about-modal__shortcut"},QX={key:0,class:"vuefinder__about-modal__shortcut"},XX={key:1,class:"vuefinder__about-modal__shortcut"},JX={class:"vuefinder__about-modal__shortcut"},ZX={class:"vuefinder__about-modal__shortcut"},eJ={key:2,class:"vuefinder__about-modal__shortcut"},tJ={key:3,class:"vuefinder__about-modal__shortcut"},nJ={key:4,class:"vuefinder__about-modal__shortcut"},rJ={key:5,class:"vuefinder__about-modal__shortcut"},iJ={class:"vuefinder__about-modal__shortcut"},oJ={class:"vuefinder__about-modal__shortcut"},sJ={key:6,class:"vuefinder__about-modal__shortcut"},aJ={key:7,class:"vuefinder__about-modal__shortcut"},lJ=ze({__name:"ModalShortcuts",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n;return(i,o)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:o[0]||(o[0]=s=>w(t).modal.close())},q(w(r)("Close")),1)]),default:Le(()=>[_("div",WX,[Z(xr,{icon:w(Vm),title:w(r)("Shortcuts")},null,8,["icon","title"]),_("div",YX,[_("div",KX,[_("div",GX,[_("div",null,q(w(r)("Refresh")),1),o[1]||(o[1]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"R")],-1))]),w(n)("rename")?(C(),R("div",QX,[_("div",null,q(w(r)("Rename")),1),o[2]||(o[2]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"Shift"),Et(" + "),_("kbd",null,"R")],-1))])):Se("",!0),w(n)("delete")?(C(),R("div",XX,[_("div",null,q(w(r)("Delete")),1),o[3]||(o[3]=_("kbd",null,"Del",-1))])):Se("",!0),_("div",JX,[_("div",null,q(w(r)("Escape")),1),o[4]||(o[4]=_("kbd",null,"Esc",-1))]),_("div",ZX,[_("div",null,q(w(r)("Select All")),1),o[5]||(o[5]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"A")],-1))]),w(n)("copy")?(C(),R("div",eJ,[_("div",null,q(w(r)("Cut")),1),o[6]||(o[6]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"X")],-1))])):Se("",!0),w(n)("copy")?(C(),R("div",tJ,[_("div",null,q(w(r)("Copy")),1),o[7]||(o[7]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"C")],-1))])):Se("",!0),w(n)("copy")?(C(),R("div",nJ,[_("div",null,q(w(r)("Paste")),1),o[8]||(o[8]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"V")],-1))])):Se("",!0),w(n)("search")?(C(),R("div",rJ,[_("div",null,q(w(r)("Search")),1),o[9]||(o[9]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"F")],-1))])):Se("",!0),_("div",iJ,[_("div",null,q(w(r)("Toggle Sidebar")),1),o[10]||(o[10]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"E")],-1))]),_("div",oJ,[_("div",null,q(w(r)("Open Settings")),1),o[11]||(o[11]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"S")],-1))]),w(n)("fullscreen")?(C(),R("div",sJ,[_("div",null,q(w(r)("Toggle Full Screen")),1),o[12]||(o[12]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"Enter")],-1))])):Se("",!0),w(n)("preview")?(C(),R("div",aJ,[_("div",null,q(w(r)("Preview")),1),o[13]||(o[13]=_("kbd",null,"Space",-1))])):Se("",!0)])])])]),_:1}))}}),uJ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function cJ(e,t){return C(),R("svg",uJ,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1)])])}const i2={render:cJ},nv="vuefinder:recent-paths",o2=4,rv=typeof window<"u"&&typeof window.localStorage<"u";function iv(){if(!rv)return[];try{const e=window.localStorage.getItem(nv);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string").slice(0,o2):[]}catch{return[]}}function dJ(e){if(!(!rv||!e))try{const t=iv().filter(n=>n!==e);t.unshift(e),window.localStorage.setItem(nv,JSON.stringify(t.slice(0,o2)))}catch{}}function fJ(e){if(!(!rv||!e))try{const t=iv().filter(n=>n!==e);window.localStorage.setItem(nv,JSON.stringify(t))}catch{}}const pJ={class:"vuefinder__go-to-folder-modal"},hJ={class:"vuefinder__go-to-folder-modal__content"},mJ=["placeholder","onKeydown"],vJ={key:0,class:"vuefinder__go-to-folder-modal__error"},gJ=["onMouseenter","onClick","onDblclick"],_J={class:"vuefinder__go-to-folder-modal__suggestion-label"},yJ={key:0,class:"vuefinder__go-to-folder-modal__suggestion-tag"},bJ=["title","onClick"],wJ=["title","onClick"],EJ={key:2,class:"vuefinder__go-to-folder-modal__empty"},SJ={key:3,class:"vuefinder__go-to-folder-modal__loading"},CJ=["disabled"],xJ=ze({name:"ModalGoToFolder",__name:"ModalGoToFolder",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.storages),o=re(""),s=re([]),l=re(0),u=re(!1),d=re(!1),f=re(""),p=re(null),v=re(null);let y=0;const g=se(()=>i.value??[]),m=J=>{const j=J??"",de=j.indexOf("://");if(de===-1)return{storage:null,parent:"",filter:j.trim(),hasProtocol:!1};const U=j.slice(0,de),ee=j.slice(de+3),Q=ee.lastIndexOf("/"),B=Q===-1?`${U}://`:`${U}://${ee.slice(0,Q).replace(/^\/+/,"")}`,oe=Q===-1?ee:ee.slice(Q+1);return{storage:U,parent:B,filter:oe,hasProtocol:!0}},b=J=>{const j=J.toLowerCase();s.value=g.value.filter(de=>!j||de.toLowerCase().includes(j)).map(de=>({path:`${de}://`,label:`${de}://`,kind:"storage"})),l.value=s.value.length?0:-1,f.value=""},x=()=>{const J=iv();s.value=J.map(j=>({path:j,label:j,kind:"recent"})),l.value=s.value.length?0:-1,f.value=""},S=async(J,j)=>{const de=++y;u.value=!0,f.value="";try{const U=await t.adapter.list(J);if(de!==y)return;const ee=j.toLowerCase(),Q=(U?.files??[]).filter(B=>B.type==="dir"&&(!ee||B.basename.toLowerCase().startsWith(ee)));s.value=Q.map(B=>({path:B.path,label:B.basename,kind:"dir"})),l.value=s.value.length?0:-1}catch(U){if(de!==y)return;s.value=[],l.value=-1,f.value=yn(U,n("Folder not found"))}finally{de===y&&(u.value=!1)}};let O=null;const T=J=>{O&&clearTimeout(O),O=setTimeout(()=>A(J),150)},A=J=>{const j=J.trim();if(!j){y++,u.value=!1,x();return}const{hasProtocol:de,parent:U,filter:ee}=m(j);if(!de){y++,u.value=!1,b(j);return}S(U,ee)};He(o,J=>T(J)),xt(()=>{x(),gt(()=>p.value?.focus())});const M=()=>{gt(()=>{const J=v.value;if(!J)return;const j=J.children[l.value];if(!j)return;const de=J.scrollTop,U=de+J.clientHeight,ee=j.offsetTop,Q=ee+j.offsetHeight;ee<de?J.scrollTop=ee:Q>U&&(J.scrollTop=Q-J.clientHeight)})},z=J=>{if(!s.value.length)return;const j=s.value.length;l.value=((l.value+J)%j+j)%j,M()},Y=J=>{o.value=J.kind==="dir"?`${J.path}/`:J.path,gt(()=>{p.value?.setSelectionRange(o.value.length,o.value.length)})},ve=J=>{if(!J.includes("://"))return{ok:!1,reason:n("Invalid path format. Path must be in format: storage://path/to/folder")};const j=J.slice(0,J.indexOf("://"));return g.value.includes(j)?{ok:!0}:{ok:!1,reason:n('Invalid storage. Storage "%s" is not available.',j)}},W=async J=>{if(d.value)return;const j=J.trim();if(!j)return;const de=ve(j);if(!de.ok){f.value=de.reason??"";return}d.value=!0;try{if(await t.adapter.open(j)===void 0)return;dJ(j),t.modal.close()}catch(U){f.value=yn(U,n("Failed to navigate to folder")),r.setLoading(!1)}finally{d.value=!1}},X=()=>{const J=s.value[l.value];W(J?J.path:o.value)},K=J=>{if(!s.value.length)return;J.preventDefault();const j=s.value[l.value];j&&Y(j)},L=J=>{if(J.kind==="dir"){Y(J);return}W(J.path)},D=J=>{W(J.path)},ne=(J,j)=>{J.stopPropagation(),J.preventDefault(),fJ(j),x()},le=(J,j)=>{J.stopPropagation(),J.preventDefault(),o.value=j,gt(()=>{p.value?.focus(),p.value?.setSelectionRange(o.value.length,o.value.length)})},je=se(()=>{const J=g.value[0];return J?`${J}://path/to/folder`:"storage://path/to/folder"});return(J,j)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:d.value,onClick:X},q(w(n)("Go")),9,CJ),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:j[3]||(j[3]=de=>w(t).modal.close())},q(w(n)("Cancel")),1)]),default:Le(()=>[_("div",pJ,[Z(xr,{icon:w(td),title:w(n)("Go to Folder")},null,8,["icon","title"]),_("div",hJ,[Ct(_("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":j[0]||(j[0]=de=>o.value=de),class:"vuefinder__go-to-folder-modal__input",type:"text",autocomplete:"off",spellcheck:"false",placeholder:je.value,onKeydown:[j[1]||(j[1]=Lr(ht(de=>z(1),["prevent"]),["down"])),j[2]||(j[2]=Lr(ht(de=>z(-1),["prevent"]),["up"])),Lr(ht(X,["prevent"]),["enter"]),Lr(K,["tab"])]},null,40,mJ),[[oi,o.value]]),f.value?(C(),R("div",vJ,q(f.value),1)):Se("",!0),s.value.length?(C(),R("div",{key:1,ref_key:"suggestionListRef",ref:v,class:"vuefinder__go-to-folder-modal__suggestions"},[(C(!0),R(We,null,ct(s.value,(de,U)=>(C(),R("div",{key:`${de.kind}:${de.path}`,class:Be(["vuefinder__go-to-folder-modal__suggestion",{"vuefinder__go-to-folder-modal__suggestion--active":U===l.value}]),onMouseenter:ee=>l.value=U,onClick:ee=>L(de),onDblclick:ee=>D(de)},[Z(w(ar),{class:"vuefinder__go-to-folder-modal__suggestion-icon"}),_("span",_J,q(de.label),1),de.kind==="recent"?(C(),R("span",yJ,q(w(n)("Recent")),1)):Se("",!0),de.kind==="recent"?(C(),R("button",{key:1,type:"button",class:"vuefinder__go-to-folder-modal__suggestion-fill",title:w(n)("Edit this path"),onClick:ee=>le(ee,de.path)},[Z(w(i2),{class:"vuefinder__go-to-folder-modal__suggestion-fill-icon"})],8,bJ)):Se("",!0),de.kind==="recent"?(C(),R("button",{key:2,type:"button",class:"vuefinder__go-to-folder-modal__suggestion-remove",title:w(n)("Remove from recent"),onClick:ee=>ne(ee,de.path)}," × ",8,wJ)):Se("",!0)],42,gJ))),128))],512)):u.value?Se("",!0):(C(),R("div",EJ,[o.value.trim()?(C(),R(We,{key:1},[Et(q(w(n)("No matching folders.")),1)],64)):(C(),R(We,{key:0},[Et(q(w(n)("No recent folders yet.")),1)],64))])),u.value?(C(),R("div",SJ,q(w(n)("Loading…")),1)):Se("",!0)])])]),_:1}))}}),TJ={class:"vuefinder__menubar__container"},kJ=["onClick","onMouseenter"],OJ={class:"vuefinder__menubar__label"},$J=["onMouseenter"],AJ=["onClick"],RJ={key:0,class:"vuefinder__menubar__dropdown__label"},PJ={key:1,class:"vuefinder__menubar__dropdown__checkmark"},IJ={key:2,class:"vuefinder__menubar__dropdown__chevron",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},MJ={key:3,class:"vuefinder__menubar__dropdown__submenu"},DJ=["onClick"],FJ={class:"vuefinder__menubar__dropdown__label"},LJ=ze({__name:"MenuBar",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t?.i18n||{t:S=>S},i=t?.fs,o=t?.config,s=Qe(o.state),l=Qe(i.selectedItems),u=Qe(i?.storages||[]),d=re(null),f=re(!1),p=se(()=>window.opener!==null||window.name!==""||window.history.length<=1),v=se(()=>[{id:"file",label:r("File"),items:[{id:"new-folder",label:r("New Folder"),action:()=>t?.modal?.open(Jm,{items:l.value}),hidden:()=>!n("newfolder")},{id:"new-file",label:r("New File"),action:()=>t?.modal?.open(e2,{items:l.value}),hidden:()=>!n("newfile")},{type:"separator",hidden:()=>!n("newfolder")&&!n("newfile")||!n("upload")},{id:"upload",label:r("Upload"),action:()=>t?.modal?.open(Zm,{items:l.value}),hidden:()=>!n("upload")},{type:"separator",hidden:()=>!n("search")},{id:"search",label:r("Search"),action:()=>t.modal.open(Xm),hidden:()=>!n("search")},{type:"separator",hidden:()=>!n("archive")&&!n("unarchive")},{id:"archive",label:r("Archive"),action:()=>{l.value.length>0&&t?.modal?.open(tv,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!n("archive")},{id:"unarchive",label:r("Unarchive"),action:()=>{l.value.length===1&&l.value[0]?.mime_type==="application/zip"&&t?.modal?.open(ev,{items:l.value})},enabled:()=>l.value.length===1&&l.value[0]?.mime_type==="application/zip",hidden:()=>!n("unarchive")},{type:"separator",hidden:()=>!n("preview")},{id:"preview",label:r("Preview"),action:()=>{l.value.length===1&&l.value[0]?.type!=="dir"&&t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0]})},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!n("preview")},{id:"open-as",label:r("Preview as"),items:[{id:"open-as-text",label:r("Text"),action:()=>t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0],forceType:"text"}),enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{id:"open-as-image",label:r("Image"),action:()=>t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0],forceType:"image"}),enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"}],enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!n("preview")},...p.value?[{type:"separator"},{id:"exit",label:r("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:r("Edit"),items:[...t?.selectionMode==="multiple"?[{id:"select-all",label:r("Select All"),action:()=>i?.selectAll(t?.selectionMode||"multiple",t),enabled:()=>!0},{id:"deselect",label:r("Deselect All"),action:()=>i?.clearSelection(),enabled:()=>l.value.length>0},{type:"separator"}]:[],...n("copy")?[{id:"cut",label:r("Cut"),action:()=>{l.value.length>0&&i?.setClipboard("cut",new Set(l.value.map(S=>Jt(S))))},enabled:()=>l.value.length>0},{id:"copy",label:r("Copy"),action:()=>{l.value.length>0&&i?.setClipboard("copy",new Set(l.value.map(S=>Jt(S))))},enabled:()=>l.value.length>0},{id:"paste",label:r("Paste"),action:()=>{const S=i?.getClipboard();S?.items?.size>0&&t?.modal?.open(S.type==="cut"?Xs:Gm,{items:{from:Array.from(S.items),to:i?.path?.get()}})},enabled:()=>i?.getClipboard()?.items?.size>0}]:[],...n("move")?[{id:"move",label:r("Move files"),action:()=>{if(l.value.length>0){const S=t?.fs,O={storage:S?.path?.get()?.storage||"",path:S?.path?.get()?.path||"",type:"dir"};t?.modal?.open(Xs,{items:{from:l.value,to:O}})}},enabled:()=>l.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:r("Copy Path"),action:async()=>{if(l.value.length===1){const S=l.value[0];await Xa(S.path)}else{const S=i?.path?.get();S?.path&&await Xa(S.path)}},enabled:()=>!0},{id:"copy-download-url",label:r("Copy Download URL"),action:async()=>{if(l.value.length===1){const S=l.value[0];i?.path?.get()?.storage;const O=t?.adapter?.getDownloadUrl({path:S.path});O&&await FG(O)}},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!n("rename")&&!n("delete")},{id:"rename",label:r("Rename"),action:()=>{l.value.length===1&&t?.modal?.open(Jc,{items:l.value})},enabled:()=>l.value.length===1,hidden:()=>!n("rename")},{id:"delete",label:r("Delete"),action:()=>{l.value.length>0&&t?.modal?.open(Xc,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!n("delete")}]},{id:"view",label:r("View"),items:[{id:"refresh",label:r("Refresh"),action:()=>{t.adapter.invalidateListQuery(i.path.get().path),t.adapter.open(i.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:r("Grid View"),action:()=>o?.set("view","grid"),enabled:()=>!0,checked:()=>s.value?.view==="grid"},{id:"list-view",label:r("List View"),action:()=>o?.set("view","list"),enabled:()=>!0,checked:()=>s.value?.view==="list"},{type:"separator"},{id:"tree-view",label:r("Tree View"),action:()=>o?.toggle("showTreeView"),enabled:()=>!0,checked:()=>s.value?.showTreeView},{id:"thumbnails",label:r("Show Thumbnails"),action:()=>o?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>s.value?.showThumbnails},{id:"show-hidden-files",label:r("Show Hidden Files"),action:()=>o?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>s.value?.showHiddenFiles},{type:"separator",hidden:()=>!n("fullscreen")},{id:"fullscreen",label:r("Full Screen"),action:()=>o?.toggle("fullScreen"),enabled:()=>n("fullscreen"),checked:()=>s.value?.fullScreen,hidden:()=>!n("fullscreen")},{type:"separator"},{id:"persist-path",label:r("Persist Path"),action:()=>{o?.toggle("persist"),t.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>s.value?.persist},{id:"metric-units",label:r("Metric Units"),action:()=>{o?.toggle("metricUnits"),t.filesize=o?.get("metricUnits")?DC:Bm,t.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>s.value?.metricUnits}]},{id:"go",label:r("Go"),items:[...n("history")?[{id:"forward",label:r("Forward"),action:()=>{i?.goForward();const S=i?.path?.get();S?.path&&t?.adapter.open(S.path)},enabled:()=>i?.canGoForward?.get()??!1},{id:"back",label:r("Back"),action:()=>{i?.goBack();const S=i?.path?.get();S?.path&&t?.adapter.open(S.path)},enabled:()=>i?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:r("Open containing folder"),action:()=>{const S=i?.path?.get();if(S?.breadcrumb&&S.breadcrumb.length>1){const O=S.breadcrumb[S.breadcrumb.length-2]?.path??`${S.storage}://`;t?.adapter.open(O)}},enabled:()=>{const S=i?.path?.get();return S?.breadcrumb&&S.breadcrumb.length>1}},{type:"separator"},...(u.value||[]).map(S=>({id:`storage-${S}`,label:S,action:()=>{const O=`${S}://`;t?.adapter.open(O)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:r("Go to Folder"),action:()=>t?.modal?.open(xJ),enabled:()=>!0}]},{id:"help",label:r("Help"),items:[{id:"settings",label:r("Settings"),action:()=>t?.modal?.open(XC),enabled:()=>!0},{id:"shortcuts",label:r("Shortcuts"),action:()=>t?.modal?.open(lJ),enabled:()=>!0},{id:"about",label:r("About"),action:()=>t?.modal?.open(UC),enabled:()=>!0}]}]),y=S=>{d.value===S?m():(d.value=S,f.value=!0)},g=S=>{f.value&&(d.value=S)},m=()=>{d.value=null,f.value=!1},b=S=>{m(),S()},x=S=>{S.target.closest(".vuefinder__menubar")||m()};return xt(()=>{document.addEventListener("click",x)}),xn(()=>{document.removeEventListener("click",x)}),(S,O)=>(C(),R("div",{class:"vuefinder__menubar",onClick:O[0]||(O[0]=ht(()=>{},["stop"]))},[_("div",TJ,[(C(!0),R(We,null,ct(v.value,T=>(C(),R("div",{key:T.id,class:Be(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":d.value===T.id}]),onClick:A=>y(T.id),onMouseenter:A=>g(T.id)},[_("span",OJ,q(T.label),1),d.value===T.id?(C(),R("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:A=>g(T.id)},[(C(!0),R(We,null,ct(T.items,A=>(C(),R("div",{key:A.id||A.type,class:Be(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":A.type==="separator","vuefinder__menubar__dropdown__item--disabled":A.enabled&&!A.enabled(),"vuefinder__menubar__dropdown__item--checked":A.checked&&A.checked(),"vuefinder__menubar__dropdown__item--hidden":A.hidden&&A.hidden(),"vuefinder__menubar__dropdown__item--has-children":A.items?.length}]),onClick:ht(M=>A.type!=="separator"&&!A.items?.length&&(!A.enabled||A.enabled())?b(A.action):null,["stop"])},[A.type!=="separator"?(C(),R("span",RJ,q(A.label),1)):Se("",!0),A.checked&&A.checked()?(C(),R("span",PJ," ✓ ")):Se("",!0),A.items?.length?(C(),R("svg",IJ,[...O[1]||(O[1]=[_("path",{d:"M6 4l4 4-4 4z"},null,-1)])])):Se("",!0),A.items?.length?(C(),R("div",MJ,[(C(!0),R(We,null,ct(A.items,M=>(C(),R("div",{key:M.id,class:Be(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--disabled":M.enabled&&!M.enabled()}]),onClick:ht(z=>!M.enabled||M.enabled()?b(M.action):null,["stop"])},[_("span",FJ,q(M.label),1)],10,DJ))),128))])):Se("",!0)],10,AJ))),128))],40,$J)):Se("",!0)],42,kJ))),128))])]))}}),jJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function UJ(e,t){return C(),R("svg",jJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1)])])}const NJ={render:UJ},zJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function BJ(e,t){return C(),R("svg",zJ,[...t[0]||(t[0]=[_("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1)])])}const VJ={render:BJ},HJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function qJ(e,t){return C(),R("svg",HJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1)])])}const WJ={render:qJ},YJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function KJ(e,t){return C(),R("svg",YJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1)])])}const GJ={render:KJ},QJ={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function XJ(e,t){return C(),R("svg",QJ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586z"},null,-1)])])}const JJ={render:XJ},ZJ={class:"vuefinder__toolbar"},eZ={class:"vuefinder__toolbar__actions"},tZ=["title"],nZ=["title"],rZ=["title"],iZ=["title"],oZ=["title"],sZ=["title"],aZ=["title"],lZ={class:"vuefinder__toolbar__controls"},uZ=["title"],cZ={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},dZ=["title"],fZ={class:"relative"},pZ={key:0,class:"vuefinder__toolbar__filter-indicator"},hZ={key:0,class:"vuefinder__toolbar__dropdown"},mZ={class:"vuefinder__toolbar__dropdown-content"},vZ={class:"vuefinder__toolbar__dropdown-section"},gZ={class:"vuefinder__toolbar__dropdown-label"},_Z={class:"vuefinder__toolbar__dropdown-row"},yZ={value:"name"},bZ={value:"size"},wZ={value:"modified"},EZ={value:""},SZ={value:"asc"},CZ={value:"desc"},xZ={class:"vuefinder__toolbar__dropdown-section"},TZ={class:"vuefinder__toolbar__dropdown-label"},kZ={class:"vuefinder__toolbar__dropdown-options"},OZ={class:"vuefinder__toolbar__dropdown-option"},$Z={class:"vuefinder__toolbar__option-text"},AZ={class:"vuefinder__toolbar__dropdown-option"},RZ={class:"vuefinder__toolbar__option-text"},PZ={class:"vuefinder__toolbar__dropdown-option"},IZ={class:"vuefinder__toolbar__option-text"},MZ={class:"vuefinder__toolbar__dropdown-toggle"},DZ={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},FZ={class:"vuefinder__toolbar__dropdown-reset"},LZ=["title"],jZ=["title"],UZ=ze({name:"VfToolbar",__name:"Toolbar",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,i=t.fs,o=t.config,s=Qe(o.state),l=Qe(i.selectedItems),u=Qe(i.sort),d=Qe(i.filter);He(()=>s.value.fullScreen,()=>{const b=document.querySelector("body");b&&(b.style.overflow=s.value.fullScreen?"hidden":"")},{immediate:!0});const f=re(!1),p=b=>{b.target.closest(".vuefinder__toolbar__dropdown-container")||(f.value=!1)};xt(()=>{const b=document.querySelector("body");b&&s.value.fullScreen&&setTimeout(()=>b.style.overflow="hidden"),document.addEventListener("click",p)}),xn(()=>{document.removeEventListener("click",p)});const v=re({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:s.value.showHiddenFiles});He(()=>v.value.sortBy,b=>{if(!v.value.sortOrder){i.clearSort();return}b==="name"?i.setSort("basename",v.value.sortOrder):b==="size"?i.setSort("file_size",v.value.sortOrder):b==="modified"&&i.setSort("last_modified",v.value.sortOrder)}),He(()=>v.value.sortOrder,b=>{if(!b){i.clearSort();return}v.value.sortBy==="name"?i.setSort("basename",b):v.value.sortBy==="size"?i.setSort("file_size",b):v.value.sortBy==="modified"&&i.setSort("last_modified",b)}),He(u,b=>{b.active?(b.column==="basename"?v.value.sortBy="name":b.column==="file_size"?v.value.sortBy="size":b.column==="last_modified"&&(v.value.sortBy="modified"),v.value.sortOrder=b.order):v.value.sortOrder=""},{immediate:!0}),He(()=>v.value.filterKind,b=>{i.setFilter(b,s.value.showHiddenFiles)}),He(()=>v.value.showHidden,b=>{o.set("showHiddenFiles",b),i.setFilter(v.value.filterKind,b)}),He(d,b=>{v.value.filterKind=b.kind},{immediate:!0}),He(()=>s.value.showHiddenFiles,b=>{v.value.showHidden=b,i.setFilter(v.value.filterKind,b)},{immediate:!0});const y=()=>o.set("view",s.value.view==="grid"?"list":"grid"),g=se(()=>d.value.kind!=="all"||!s.value.showHiddenFiles||u.value.active),m=()=>{v.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},o.set("showHiddenFiles",!0),i.clearSort(),i.clearFilter()};return(b,x)=>(C(),R("div",ZJ,[_("div",eZ,[w(n)("newfolder")?(C(),R("div",{key:0,class:"mx-1.5",title:w(r)("New Folder"),onClick:x[0]||(x[0]=S=>w(t).modal.open(Jm,{items:w(l)}))},[Z(w(JC))],8,tZ)):Se("",!0),w(n)("newfile")?(C(),R("div",{key:1,class:"mx-1.5",title:w(r)("New File"),onClick:x[1]||(x[1]=S=>w(t).modal.open(e2,{items:w(l)}))},[Z(w(ZC))],8,nZ)):Se("",!0),w(n)("rename")?(C(),R("div",{key:2,class:"mx-1.5",title:w(r)("Rename"),onClick:x[2]||(x[2]=S=>w(l).length!==1||w(t).modal.open(Jc,{items:w(l)}))},[Z(w(zC),{class:Be(w(l).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,rZ)):Se("",!0),w(n)("delete")?(C(),R("div",{key:3,class:"mx-1.5",title:w(r)("Delete"),onClick:x[3]||(x[3]=S=>!w(l).length||w(t).modal.open(Xc,{items:w(l)}))},[Z(w(NC),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,iZ)):Se("",!0),w(n)("upload")?(C(),R("div",{key:4,class:"mx-1.5",title:w(r)("Upload"),onClick:x[4]||(x[4]=S=>w(t).modal.open(Zm,{items:w(l)}))},[Z(w(t2))],8,oZ)):Se("",!0),w(n)("unarchive")&&w(l).length===1&&w(l)[0].mime_type==="application/zip"?(C(),R("div",{key:5,class:"mx-1.5",title:w(r)("Unarchive"),onClick:x[5]||(x[5]=S=>!w(l).length||w(t).modal.open(ev,{items:w(l)}))},[Z(w(n2),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,sZ)):Se("",!0),w(n)("archive")?(C(),R("div",{key:6,class:"mx-1.5",title:w(r)("Archive"),onClick:x[6]||(x[6]=S=>!w(l).length||w(t).modal.open(tv,{items:w(l)}))},[Z(w(r2),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,aZ)):Se("",!0)]),_("div",lZ,[w(n)("search")?(C(),R("div",{key:0,class:"mx-1.5",title:w(r)("Search Files"),onClick:x[7]||(x[7]=S=>w(t).modal.open(Xm))},[Z(w(Qm),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,uZ)):Se("",!0),_("div",cZ,[_("div",{title:w(r)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:x[8]||(x[8]=S=>f.value=!f.value)},[_("div",fZ,[Z(w(JJ),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),g.value?(C(),R("div",pZ)):Se("",!0)])],8,dZ),f.value?(C(),R("div",hZ,[_("div",mZ,[_("div",vZ,[_("div",gZ,q(w(r)("Sorting")),1),_("div",_Z,[Ct(_("select",{"onUpdate:modelValue":x[9]||(x[9]=S=>v.value.sortBy=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",yZ,q(w(r)("Name")),1),_("option",bZ,q(w(r)("Size")),1),_("option",wZ,q(w(r)("Date")),1)],512),[[Op,v.value.sortBy]]),Ct(_("select",{"onUpdate:modelValue":x[10]||(x[10]=S=>v.value.sortOrder=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",EZ,q(w(r)("None")),1),_("option",SZ,q(w(r)("Asc")),1),_("option",CZ,q(w(r)("Desc")),1)],512),[[Op,v.value.sortOrder]])])]),_("div",xZ,[_("div",TZ,q(w(r)("Show")),1),_("div",kZ,[_("label",OZ,[Ct(_("input",{"onUpdate:modelValue":x[11]||(x[11]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[Cf,v.value.filterKind]]),_("span",$Z,q(w(r)("All items")),1)]),_("label",AZ,[Ct(_("input",{"onUpdate:modelValue":x[12]||(x[12]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[Cf,v.value.filterKind]]),_("span",RZ,q(w(r)("Files only")),1)]),_("label",PZ,[Ct(_("input",{"onUpdate:modelValue":x[13]||(x[13]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[Cf,v.value.filterKind]]),_("span",IZ,q(w(r)("Folders only")),1)])])]),_("div",MZ,[_("label",DZ,q(w(r)("Show hidden files")),1),Ct(_("input",{id:"showHidden","onUpdate:modelValue":x[14]||(x[14]=S=>v.value.showHidden=S),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[Zs,v.value.showHidden]])]),_("div",FZ,[_("button",{class:"vuefinder__toolbar__reset-button",onClick:m},q(w(r)("Reset")),1)])])])):Se("",!0)]),w(n)("fullscreen")?(C(),R("div",{key:1,class:"mx-1.5",title:w(r)("Toggle Full Screen"),onClick:x[15]||(x[15]=S=>w(o).toggle("fullScreen"))},[w(s).fullScreen?(C(),Ee(w(VJ),{key:0,class:"vf-toolbar-icon"})):(C(),Ee(w(NJ),{key:1,class:"vf-toolbar-icon"}))],8,LZ)):Se("",!0),_("div",{class:"mx-1.5",title:w(r)("Change View"),onClick:x[16]||(x[16]=S=>y())},[w(s).view==="grid"?(C(),Ee(w(WJ),{key:0,class:"vf-toolbar-icon"})):Se("",!0),w(s).view==="list"?(C(),Ee(w(GJ),{key:1,class:"vf-toolbar-icon"})):Se("",!0)],8,jZ)])]))}}),NZ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function zZ(e,t){return C(),R("svg",NZ,[...t[0]||(t[0]=[_("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1)])])}const BZ={render:zZ},VZ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function HZ(e,t){return C(),R("svg",VZ,[...t[0]||(t[0]=[_("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1)])])}const qZ={render:HZ},WZ={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"};function YZ(e,t){return C(),R("svg",WZ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const KZ={render:YZ},GZ={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function QZ(e,t){return C(),R("svg",GZ,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const XZ={render:QZ},JZ={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function ZZ(e,t){return C(),R("svg",JZ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0-4-4m4 4-4 4m0 6H4m0 0 4 4m-4-4 4-4"},null,-1)])])}const eee={render:ZZ};function hl(e,t=[]){const n="vfDragEnterCounter",r=e.fs,i=Qe(r.selectedItems);function o(p,v){return!!(!p||p.type!=="dir"||p.path===v||p.path.startsWith(`${v}/`)||i.value.some(y=>y.path===v?!1:!!(p.path===y.path||p.path.startsWith(`${y.path}/`))))}function s(p,v){if(p.isExternalDrag)return;if(!(e.features?.move??!1)){p.dataTransfer&&(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none");return}p.preventDefault();const y=r.getDraggedItem(),g=r.sortedFiles.get().find(m=>Jt(m)===y)?.path??"";o(v,g)?p.dataTransfer&&(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none"):(p.dataTransfer&&(p.dataTransfer.dropEffect="copy",p.dataTransfer.effectAllowed="all"),p.currentTarget.classList.add(...t))}function l(p){if(p.isExternalDrag||!(e.features?.move??!1))return;p.preventDefault();const v=p.currentTarget,y=Number(v.dataset[n]||0);v.dataset[n]=String(y+1)}function u(p){if(p.isExternalDrag||!(e.features?.move??!1))return;p.preventDefault();const v=p.currentTarget,y=Number(v.dataset[n]||0)-1;y<=0?(delete v.dataset[n],v.classList.remove(...t)):v.dataset[n]=String(y)}function d(p,v){if(p.isExternalDrag||!(e.features?.move??!1)||!v)return;p.preventDefault();const y=p.currentTarget;delete y.dataset[n],y.classList.remove(...t);const g=p.dataTransfer?.getData("items")||"[]",m=JSON.parse(g).map(b=>r.sortedFiles.get().find(x=>Jt(x)===b)).filter(b=>!!b);r.clearDraggedItem(),e.modal.open(Xs,{items:{from:m,to:v}})}function f(p){return{dragover:v=>s(v,p),dragenter:l,dragleave:u,drop:v=>d(v,p)}}return{events:f}}const tee={class:"vuefinder__breadcrumb__container"},nee=["title"],ree=["title"],iee=["title"],oee=["title"],see={class:"vuefinder__breadcrumb__path-container"},aee={class:"vuefinder__breadcrumb__list"},lee={key:0,class:"vuefinder__breadcrumb__hidden-list"},uee={class:"relative"},cee=["title","onClick"],dee=["title"],fee={class:"vuefinder__breadcrumb__path-mode"},pee={class:"vuefinder__breadcrumb__path-mode-content"},hee=["title"],mee={class:"vuefinder__breadcrumb__path-text"},vee=["title"],gee=["data-theme"],_ee=["onClick"],yee={class:"vuefinder__breadcrumb__hidden-item-content"},bee={class:"vuefinder__breadcrumb__hidden-item-text"},ka=5,G0=1,wee=40,Eee=ze({__name:"Breadcrumb",setup(e){const t=rt(),n=cr(t),{t:r}=t.i18n,i=t.fs,o=t.config,s=Qe(o.state),l=Qe(i.path),u=Qe(i.loading),d=re(null),f=YC(0,100),p=re(5),v=re(!1),y=re(!1),g=se(()=>l.value?.breadcrumb??[]),m=new Map;function b(U,ee){return U.length>ee?[U.slice(-ee),U.slice(0,-ee)]:[U,[]]}const x=se(()=>b(g.value,p.value)[0]),S=se(()=>b(g.value,p.value)[1]);function O(){const U=g.value,ee=f.value;if(!U.length||ee<=0)return null;let Q=0,B=0;for(let oe=U.length-1;oe>=0;oe--){const V=U[oe]?.name;if(!V)continue;const P=m.get(V);if(P===void 0)return null;if(Q+P>ee-wee||(Q+=P,B++,B>=ka))break}return B<G0&&(B=G0),B>ka&&(B=ka),B}function T(){if(!d.value)return;const U=d.value.children,ee=x.value;for(let Q=0;Q<U.length;Q++){const B=ee[Q]?.name;if(!B)continue;const oe=U[Q].offsetWidth;oe>0&&m.set(B,oe)}}async function A(){if(!g.value.length){p.value=ka;return}const U=O();if(U!==null){p.value=U;return}p.value=ka,await gt(),T();const ee=O();ee!==null&&(p.value=ee)}He(f,A),He(g,A,{immediate:!0});const M=()=>{d.value&&(f.value=d.value.offsetWidth)},z=re(null);xt(()=>{z.value=new ResizeObserver(M),d.value&&z.value.observe(d.value)}),xn(()=>{z.value&&z.value.disconnect()});const Y=hl(t,["vuefinder__drag-over"]);function ve(U=null){U??=g.value.length-2;const ee={basename:l.value?.storage??"local",extension:"",path:(l.value?.storage??"local")+"://",storage:l.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return g.value[U]??ee}const W=()=>{t.adapter.invalidateListQuery(l.value.path),t.adapter.open(l.value.path)},X=()=>{x.value.length>0&&t.adapter.open(g.value[g.value.length-2]?.path??(l.value?.storage??"local")+"://")},K=U=>{t.adapter.open(U.path),v.value=!1},L=()=>{v.value&&(v.value=!1)},D={mounted(U,ee){U.clickOutsideEvent=function(Q){U===Q.target||U.contains(Q.target)||ee.value()},document.body.addEventListener("click",U.clickOutsideEvent)},beforeUnmount(U){document.body.removeEventListener("click",U.clickOutsideEvent)}},ne=()=>{o.toggle("showTreeView")},le=re({x:0,y:0}),je=(U,ee=null)=>{if(U.currentTarget instanceof HTMLElement){const{x:Q,y:B,height:oe}=U.currentTarget.getBoundingClientRect();le.value={x:Q,y:B+oe}}v.value=ee??!v.value},J=()=>{y.value=!y.value},j=async()=>{await Xa(l.value?.path||""),n.success(r("Path copied to clipboard"))},de=()=>{y.value=!1};return(U,ee)=>(C(),R("div",tee,[_("span",{title:w(r)("Toggle Tree View")},[Z(w(XZ),{class:Be(["vuefinder__breadcrumb__toggle-tree",w(s).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:ne},null,8,["class"])],8,nee),_("span",{title:w(r)("Go up a directory")},[Z(w(i2),Ot({class:g.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},ni(g.value.length?w(Y).events(ve()):{}),{onClick:X}),null,16,["class"])],8,ree),w(i).isLoading()?(C(),R("span",{key:1,title:w(r)("Cancel")},[Z(w(BC),{onClick:ee[0]||(ee[0]=Q=>w(t).emitter.emit("vf-fetch-abort"))})],8,oee)):(C(),R("span",{key:0,title:w(r)("Refresh")},[Z(w(BZ),{onClick:W})],8,iee)),Ct(_("div",see,[_("div",null,[Z(w(qZ),Ot({class:"vuefinder__breadcrumb__home-icon"},ni(w(Y).events(ve(-1))),{onClick:ee[1]||(ee[1]=ht(Q=>w(t).adapter.open(w(l).storage+"://"),["stop"]))}),null,16)]),_("div",aee,[S.value.length?Ct((C(),R("div",lee,[ee[3]||(ee[3]=_("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("div",uee,[_("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:ee[2]||(ee[2]=Q=>je(Q,!0)),onClick:ht(je,["stop"])},[Z(w(QC),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[D,L]]):Se("",!0)]),_("div",{ref_key:"breadcrumbContainer",ref:d,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(C(!0),R(We,null,ct(x.value,(Q,B)=>(C(),R("div",{key:B},[ee[4]||(ee[4]=_("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("span",Ot({class:"vuefinder__breadcrumb__item pointer-events-auto",title:Q.basename},ni(w(Y).events(Q),!0),{onClick:ht(oe=>w(t).adapter.open(Q.path),["stop"])}),q(Q.name),17,cee)]))),128))],512),w(o).get("loadingIndicator")==="circular"&&w(u)?(C(),Ee(w(nd),{key:0})):Se("",!0),_("span",{title:w(r)("Toggle Path Copy Mode"),onClick:J},[Z(w(eee),{class:"vuefinder__breadcrumb__toggle-icon"})],8,dee)],512),[[Nr,!y.value]]),Ct(_("div",fee,[_("div",pee,[_("div",{title:w(r)("Copy Path")},[Z(w(Ym),{class:"vuefinder__breadcrumb__copy-icon",onClick:j})],8,hee),_("div",mee,q(w(l).path),1),_("div",{title:w(r)("Exit")},[Z(w(KZ),{class:"vuefinder__breadcrumb__exit-icon",onClick:de})],8,vee)])],512),[[Nr,y.value]]),(C(),Ee(el,{to:"body"},[_("div",null,[Ct(_("div",{style:an({position:"absolute",top:le.value.y+"px",left:le.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":w(t).theme.current},[(C(!0),R(We,null,ct(S.value,(Q,B)=>(C(),R("div",Ot({key:B,class:"vuefinder__breadcrumb__hidden-item"},ni(w(Y).events(Q),!0),{onClick:oe=>K(Q)}),[_("div",yee,[_("span",null,[Z(w(ar),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),_("span",bee,q(Q.name),1)])],16,_ee))),128))],12,gee),[[Nr,v.value]])])]))]))}}),See={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Cee(e,t){return C(),R("svg",See,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const Q0={render:Cee},xee={class:"vuefinder__drag-item__container"},Tee={class:"vuefinder__drag-item__count"},kee=ze({__name:"DragItem",props:{count:{}},setup(e){const t=e;return(n,r)=>(C(),R("div",xee,[t.count>1?(C(),Ee(w(Q0),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):Se("",!0),Z(w(Q0),{class:"vuefinder__drag-item__icon"}),_("div",Tee,q(t.count),1)]))}}),Oee={key:2,class:"vuefinder__item-icon__extension"},X0=ze({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(e){const t=e,n=rt(),r=Qe(n.config.state),i=se(()=>t.small!==void 0?t.small?"small":"large":t.view==="list"?"small":"large"),o=se(()=>{const l=i.value,u=r.value?.listIconSize,d=r.value?.gridIconSize;return r.value?.gridItemWidth,r.value?.gridItemHeight,t.view==="list"||l==="small"?{"--vf-icon-size":`${u??16}px`}:{"--vf-icon-size":`${d??48}px`}}),s={app:n,config:r.value,item:t.item,view:t.view};return(l,u)=>(C(),R("div",{class:Be(["vuefinder__item-icon",{"vuefinder__item-icon--small":i.value==="small","vuefinder__item-icon--large":i.value==="large","vuefinder__item-icon--grid":e.view==="grid","vuefinder__item-icon--list":e.view==="list"}]),style:an(o.value)},[mt(l.$slots,"icon",ii(Vi(s)),()=>[e.item.type==="dir"?(C(),Ee(w(ar),{key:0,class:"vuefinder__item-icon__folder"})):(C(),Ee(w(Ga),{key:1,class:"vuefinder__item-icon__file"})),e.ext&&e.item.type!=="dir"&&e.item.extension?(C(),R("div",Oee,q(e.item.extension.substring(0,3)),1)):Se("",!0)])],6))}}),$ee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function Aee(e,t){return C(),R("svg",$ee,[...t[0]||(t[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3V7a5 5 0 0 1 5-5m0 12a2 2 0 0 0-1.995 1.85L10 16a2 2 0 1 0 2-2m0-10a3 3 0 0 0-3 3v3h6V7a3 3 0 0 0-3-3"},null,-1)])])}const J0={render:Aee},Ree=["data-key","data-row","data-col","draggable"],Pee={key:0},Iee={class:"vuefinder__explorer__item-grid-content"},Mee=["data-src","alt"],Dee={class:"vuefinder__explorer__item-title"},Fee={key:1,class:"vuefinder__explorer__item-list-content"},Lee={class:"vuefinder__explorer__item-list-name"},jee={class:"vuefinder__explorer__item-list-icon"},Uee={class:"vuefinder__explorer__item-name"},Nee={key:0,class:"vuefinder__explorer__item-path"},zee={key:1,class:"vuefinder__explorer__item-size"},Bee={key:0},Vee={key:2,class:"vuefinder__explorer__item-date"},Hee=ze({__name:"FileItem",props:{item:{},view:{},showThumbnails:{type:Boolean},isSelected:{type:Boolean},isDragging:{type:Boolean},rowIndex:{},colIndex:{},showPath:{type:Boolean},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,i=rt(),o=i.fs,s=i.config,l=se(()=>{const K=i.selectionFilterType;return!K||K==="both"?!0:K==="files"&&n.item.type==="file"||K==="dirs"&&n.item.type==="dir"}),u=se(()=>{const K=i.selectionFilterMimeIncludes;return!K||!K.length||n.item.type==="dir"?!0:n.item.mime_type?K.some(L=>n.item.mime_type?.startsWith(L)):!1}),d=se(()=>l.value&&u.value),f=se(()=>n.item.type==="dir"||d.value),p=se(()=>["file-item-"+n.explorerId,n.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",n.isSelected?"vf-explorer-selected":"",f.value?"":"vf-explorer-item--unselectable",f.value&&!d.value?"vf-explorer-item--no-select":""]),v=se(()=>({opacity:n.isDragging||o.isCut(Jt(n.item))||!f.value?.5:""})),y=re(null);let g=!1,m=null,b=null,x=!1;const{enabled:S}=fr(),O=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),T=se(()=>O?!1:S("move")),A=()=>{m&&(clearTimeout(m),m=null),b=null},M=K=>{A(),b=K,x=!1,K.stopPropagation(),m=setTimeout(()=>{!b||m===null||(x=!0,b.cancelable&&b.preventDefault(),b.stopPropagation(),r("contextmenu",b),A())},500)},z=K=>{if(x){K.preventDefault(),K.stopPropagation(),A();return}setTimeout(()=>{x||(A(),X(K))},100)},Y=K=>{if(!b)return;const L=b.touches[0]||b.changedTouches[0],D=K.touches[0]||K.changedTouches[0];if(L&&D){const ne=Math.abs(D.clientX-L.clientX),le=Math.abs(D.clientY-L.clientY);(ne>15||le>15)&&A()}},ve=K=>{O&&K.type!=="click"||r("click",K)},W=K=>{if(x)return K.preventDefault(),K.stopPropagation(),!1;r("dragstart",K)},X=K=>{if(!g)g=!0,r("click",K),y.value=setTimeout(()=>{g=!1},300);else return g=!1,r("dblclick",K),!1};return(K,L)=>(C(),R("div",{class:Be(p.value),style:an(v.value),"data-key":w(Jt)(e.item),"data-row":e.rowIndex,"data-col":e.colIndex,draggable:T.value,onTouchstartCapture:L[1]||(L[1]=D=>M(D)),onTouchendCapture:L[2]||(L[2]=D=>z(D)),onTouchmoveCapture:Y,onTouchcancelCapture:L[3]||(L[3]=()=>A()),onClick:ve,onDblclick:L[4]||(L[4]=D=>r("dblclick",D)),onContextmenu:L[5]||(L[5]=ht(D=>r("contextmenu",D),["prevent","stop"])),onDragstart:W,onDragend:L[6]||(L[6]=D=>r("dragend",D))},[e.view==="grid"?(C(),R("div",Pee,[w(o).isReadOnly(e.item)?(C(),Ee(w(J0),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):Se("",!0),_("div",Iee,[(e.item.mime_type??"").startsWith("image")&&e.showThumbnails?(C(),R("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":e.item.previewUrl??w(i).adapter.getPreviewUrl({path:e.item.path}),alt:e.item.basename,onTouchstart:L[0]||(L[0]=D=>D.preventDefault())},null,40,Mee)):(C(),Ee(X0,{key:1,item:e.item,ext:!0,view:e.view},{icon:Le(D=>[mt(K.$slots,"icon",ii(Vi(D)))]),_:3},8,["item","view"]))]),_("span",Dee,q(w(Ch)(e.item.basename)),1)])):(C(),R("div",Fee,[_("div",Lee,[_("div",jee,[Z(X0,{item:e.item,view:e.view},{icon:Le(D=>[mt(K.$slots,"icon",ii(Vi(D)))]),_:3},8,["item","view"])]),_("span",Uee,q(e.item.basename),1),_("div",null,[w(o).isReadOnly(e.item)?(C(),Ee(w(J0),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):Se("",!0)])]),e.showPath?(C(),R("div",Nee,q(e.item.path),1)):Se("",!0),e.showPath?Se("",!0):(C(),R("div",zee,[e.item.file_size?(C(),R("div",Bee,q(w(i).filesize(e.item.file_size)),1)):Se("",!0)])),!e.showPath&&e.item.last_modified?(C(),R("div",Vee,q(new Date(e.item.last_modified*1e3).toLocaleString()),1)):Se("",!0)])),w(S)("pinned")&&w(s).get("pinnedFolders").find(D=>D.path===e.item.path)?(C(),Ee(w(Qa),{key:2,class:"vuefinder__item--pinned"})):Se("",!0)],46,Ree))}}),qee=["data-row"],Z0=ze({__name:"FileRow",props:{rowIndex:{},rowHeight:{},view:{},itemsPerRow:{},items:{},showThumbnails:{type:Boolean},showPath:{type:Boolean},isDraggingItem:{type:Function},isSelected:{type:Function},dragNDropEvents:{type:Function},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,i=se(()=>[n.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),o=se(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${n.rowHeight}px`,transform:`translateY(${n.rowIndex*n.rowHeight}px)`})),s=se(()=>n.view==="grid"?{gridTemplateColumns:`repeat(${n.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(l,u)=>(C(),R("div",{class:Be(i.value),"data-row":e.rowIndex,style:an(o.value)},[_("div",{class:Be(["grid justify-self-start",{"w-full":e.view==="list"}]),style:an(s.value)},[(C(!0),R(We,null,ct(e.items,(d,f)=>(C(),Ee(Hee,Ot({key:w(Jt)(d),item:d,view:e.view,"show-thumbnails":e.showThumbnails,"show-path":e.showPath,"is-selected":e.isSelected(w(Jt)(d)),"is-dragging":e.isDraggingItem(w(Jt)(d)),"row-index":e.rowIndex,"col-index":f,"explorer-id":e.explorerId},ni(e.dragNDropEvents(d)),{onClick:u[0]||(u[0]=p=>r("click",p)),onDblclick:u[1]||(u[1]=p=>r("dblclick",p)),onContextmenu:u[2]||(u[2]=p=>r("contextmenu",p)),onDragstart:u[3]||(u[3]=p=>r("dragstart",p)),onDragend:u[4]||(u[4]=p=>r("dragend",p))}),{icon:Le(p=>[mt(l.$slots,"icon",Ot({ref_for:!0},p))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,qee))}}),Wee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Yee(e,t){return C(),R("svg",Wee,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1)])])}const Kee={render:Yee},Gee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Qee(e,t){return C(),R("svg",Gee,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1)])])}const Xee={render:Qee},Sp=ze({__name:"SortIcon",props:{direction:{}},setup(e){return(t,n)=>(C(),R("div",null,[e.direction==="asc"?(C(),Ee(w(Kee),{key:0,class:"vuefinder__explorer__sort-icon"})):Se("",!0),e.direction==="desc"?(C(),Ee(w(Xee),{key:1,class:"vuefinder__explorer__sort-icon"})):Se("",!0)]))}}),Jee={class:"vuefinder__explorer__header"},Zee=ze({__name:"ExplorerHeader",setup(e){const t=rt(),n=t.fs,{t:r}=t.i18n,i=Qe(n.sort);return(o,s)=>(C(),R("div",Jee,[_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:s[0]||(s[0]=l=>w(n).toggleSort("basename"))},[Et(q(w(r)("Name"))+" ",1),Ct(Z(Sp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="basename"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:s[1]||(s[1]=l=>w(n).toggleSort("file_size"))},[Et(q(w(r)("Size"))+" ",1),Ct(Z(Sp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="file_size"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:s[2]||(s[2]=l=>w(n).toggleSort("last_modified"))},[Et(q(w(r)("Date"))+" ",1),Ct(Z(Sp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="last_modified"]])])]))}});function ete(e,t){const{scrollContainer:n,itemWidth:r=100,rowHeight:i,overscan:o=2,containerPadding:s=48,lockItemsPerRow:l}=t,u=e,d=()=>typeof i=="number"?i:i.value,f=()=>r?typeof r=="number"?r:r.value:100,p=()=>s?typeof s=="number"?s:s.value:0,v=re(0),y=re(6),g=re(600);let m=null;const b=se(()=>Math.ceil(u.value.length/y.value)),x=se(()=>b.value*d()),S=se(()=>{const X=d(),K=Math.max(0,Math.floor(v.value/X)-o),L=Math.min(b.value,Math.ceil((v.value+g.value)/X)+o);return{start:K,end:L}}),O=se(()=>{const{start:X,end:K}=S.value;return Array.from({length:K-X},(L,D)=>X+D)}),T=()=>g.value,A=()=>typeof l=="object"?l.value:!1,M=()=>{if(A()){y.value=1;return}if(n.value){const X=p(),K=n.value.clientWidth-X,L=f();L>0&&(y.value=Math.max(Math.floor(K/L),2))}},z=X=>{const K=X.target;v.value=K.scrollTop};He(()=>u.value.length,()=>{M()}),r&&typeof r!="number"&&He(r,()=>{M()}),s&&typeof s!="number"&&He(s,()=>{M()}),i&&typeof i!="number"&&He(i,()=>{});const Y=(X,K)=>{if(!X||!Array.isArray(X))return[];const L=K*y.value;return X.slice(L,L+y.value)},ve=(X,K,L,D,ne)=>{if(!X||!Array.isArray(X))return[];const le=[];for(let je=K;je<=L;je++)for(let J=D;J<=ne;J++){const j=je*y.value+J;j<X.length&&X[j]&&le.push(X[j])}return le},W=X=>({row:Math.floor(X/y.value),col:X%y.value});return xt(async()=>{await gt(),n.value&&(g.value=n.value.clientHeight||600),M(),window.addEventListener("resize",()=>{n.value&&(g.value=n.value.clientHeight||600),M()}),n.value&&"ResizeObserver"in window&&(m=new ResizeObserver(X=>{const K=X[0];K&&(g.value=Math.round(K.contentRect.height)),M()}),m.observe(n.value))}),xn(()=>{window.removeEventListener("resize",M),m&&(m.disconnect(),m=null)}),{scrollTop:v,itemsPerRow:y,totalRows:b,totalHeight:x,visibleRange:S,visibleRows:O,updateItemsPerRow:M,handleScroll:z,getRowItems:Y,getItemsInRange:ve,getItemPosition:W,getContainerHeight:T}}function tte(e){const{itemsPerRow:t,totalHeight:n,getItemsInRange:r,getKey:i,selectionObject:o,rowHeight:s,itemWidth:l,osInstance:u}=e,d=()=>typeof l=="number"?l:l.value,f=Math.floor(Math.random()*2**32).toString(),p=rt(),v=p.fs,y=Qe(v.selectedKeys),g=Qe(v.sortedFiles),m=se(()=>{const J=new Map;return g.value&&g.value.forEach(j=>{J.set(i(j),j)}),J}),b=re(new Set),x=re(!1),S=re(!1),O=J=>J.map(j=>j.getAttribute("data-key")).filter(j=>!!j),T=J=>{J.selection.clearSelection(!0,!0)},A=J=>{if(y.value&&y.value.size>0){const j=document.querySelectorAll(`.file-item-${f}[data-key]`),de=new Map;j.forEach(ee=>{const Q=ee.getAttribute("data-key");Q&&de.set(Q,ee)});const U=[];y.value.forEach(ee=>{const Q=de.get(ee);Q&&M(ee)&&U.push(Q)}),U.forEach(ee=>{J.selection.select(ee,!0)})}},M=J=>{const j=m.value.get(J);if(!j)return!1;const de=p.selectionFilterType,U=p.selectionFilterMimeIncludes;return de==="files"&&j.type==="dir"||de==="dirs"&&j.type==="file"?!1:U&&Array.isArray(U)&&U.length>0?j.type==="dir"?!0:j.mime_type?U.some(ee=>j.mime_type?.startsWith(ee)):!1:!0},z=J=>{if(p.selectionMode==="single")return!1;x.value=!1,!J.event?.metaKey&&!J.event?.ctrlKey&&(S.value=!0),J.selection.resolveSelectables(),T(J),A(J)},Y=re(0),ve=({event:J,selection:j})=>{Y.value=(o.value?.getAreaLocation().y1??0)-(p.root.getBoundingClientRect().top??0);const de=document.querySelector(".selection-area-container");if(de&&(de.dataset.theme=p.theme.current),p.selectionMode==="single")return;const U=J;U&&"type"in U&&U.type==="touchend"&&U.preventDefault();const ee=J;!ee?.ctrlKey&&!ee?.metaKey&&(v.clearSelection(),j.clearSelection(!0,!0)),b.value.clear()},W=J=>{if(p.selectionMode==="single")return;const j=O(J.store.changed.added),de=O(J.store.changed.removed);S.value=!1,x.value=!0,j.forEach(U=>{y.value&&!y.value.has(U)&&M(U)&&(b.value.add(U),v.select(U,p.selectionMode||"multiple"))}),de.forEach(U=>{document.querySelector(`[data-key="${U}"]`)&&m.value.has(U)&&b.value.delete(U),v.deselect(U)}),J.selection.resolveSelectables(),A(J)},X=()=>{b.value.clear()},K=J=>{if(!J.event)return;const j=document.querySelector(".scroller-"+f);if(!j)return;const de=j.getBoundingClientRect(),U=de.left,ee=de.top;let Q=j.scrollTop;if(u?.value){const{viewport:Wt}=u.value.elements();Wt&&(Q=Wt.scrollTop)}const B=o.value?.getAreaLocation();if(!B)return;const oe=Math.min(B.x1,B.x2),V=Q+Math.min(B.y1,B.y2),P=Math.max(B.x1,B.x2),F=Q+Math.max(B.y1,B.y2),G=4,N=d();let ie=Math.floor((oe-U-G)/N),ge=Math.floor((P-U-G)/N);const fe=oe-U-G-ie*N,pe=P-U-G-ge*N;fe>N-G&&(ie=ie+1),pe<G&&(ge=ge-1);const Ce=Math.max(0,ie),$e=Math.min(t.value-1,ge);let Ke=Math.floor((V-ee-G)/s.value),Ne=Math.floor((F-ee-G)/s.value);const tt=V-ee-G-Ke*s.value,Ge=F-ee-G-Ne*s.value,Ze=Math.floor((n.value-G)/s.value);tt>s.value-G&&(Ke=Ke+1),Ge<G&&(Ne=Ne-1);const Pt=Math.max(0,Ke),St=Math.min(Ne,Ze),Nt=r(g.value,Pt,St,Ce,$e),It=document.querySelectorAll(`.file-item-${f}[data-key]`),qt=new Map;It.forEach(Wt=>{const nn=Wt.getAttribute("data-key");nn&&qt.set(nn,Wt)});const Gt=[];if(Nt.forEach(Wt=>{const nn=i(Wt);qt.get(nn)||Gt.push(nn)}),Gt.length>0){const Wt=p.selectionMode||"multiple";v.selectMultiple(Gt,Wt)}},L=J=>{K(J),T(J),A(J),v.setSelectedCount(y.value?.size||0),x.value=!1},D=()=>{let J=[".scroller-"+f];if(u?.value){const{viewport:j}=u.value.elements();j&&(J=j)}o.value=new k9({selectables:[".file-item-"+f+":not(.vf-explorer-item--unselectable):not(.vf-explorer-item--no-select)"],boundaries:J,selectionContainerClass:"selection-area-container",behaviour:{overlap:"invert",intersect:"touch",startThreshold:0,triggers:[0],scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:10}}},features:{touch:!0,range:!0,deselectOnBlur:!0,singleTap:{allow:!1,intersect:"native"}}}),o.value.on("beforestart",z),o.value.on("start",ve),o.value.on("move",W),o.value.on("stop",L)},ne=()=>{o.value&&(o.value.destroy(),o.value=null)},le=()=>{o.value&&(Array.from(y.value??new Set).forEach(J=>{M(J)||v.deselect(J)}),ne(),D())},je=J=>{S.value&&(o.value?.clearSelection(),X(),S.value=!1);const j=J;!b.value.size&&!S.value&&!j?.ctrlKey&&!j?.metaKey&&(v.clearSelection(),o.value?.clearSelection())};return xt(()=>{const J=j=>{!j.buttons&&x.value&&(x.value=!1)};document.addEventListener("dragleave",J),xn(()=>{document.removeEventListener("dragleave",J)})}),{explorerId:f,isDragging:x,initializeSelectionArea:D,updateSelectionArea:le,handleContentClick:je}}function nte(e){const t=n=>{if(!n)return{typeAllowed:!1,mimeAllowed:!1};const r=e.selectionFilterType,i=e.selectionFilterMimeIncludes,o=!r||r==="both"||r==="files"&&n.type==="file"||r==="dirs"&&n.type==="dir";let s=!0;return i&&Array.isArray(i)&&i.length>0&&(n.type==="dir"?s=!0:n.mime_type?s=i.some(l=>n.mime_type.startsWith(l)):s=!1),{typeAllowed:o,mimeAllowed:s}};return{isItemSelectable:t,canSelectItem:n=>{const{typeAllowed:r,mimeAllowed:i}=t(n);return r&&i}}}function rte(e){const t=n=>({item:n,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:t,openItem:(n,r,i)=>{const o=t(n);if(n.type==="file"&&r){if(e.emitter.emit("vf-file-dclick",o),o.defaultPrevented)return}else if(n.type==="dir"&&i&&(e.emitter.emit("vf-folder-dclick",o),o.defaultPrevented))return;const s=e.contextMenuItems?.find(l=>l.show(e,{items:[n],target:n,searchQuery:""}));s&&s.action(e,[n])}}}function ite(e,t,n,r,i,o,s){const l=e.fs,{canSelectItem:u}=nte(e),{openItem:d}=rte(e),f=v=>{const y=v.target?.closest(".file-item-"+t);if(!y)return null;const g=String(y.getAttribute("data-key")),m=n.value?.find(b=>Jt(b)===g);return{key:g,item:m}},p=()=>{const v=r.value;return n.value?.filter(y=>v?.has(Jt(y)))||[]};return{handleItemClick:v=>{const y=f(v);if(!y)return;const{key:g,item:m}=y,b=v;if(!u(m)){m?.type==="dir"&&(l.clearSelection(),i.value?.clearSelection(!0,!0),l.setSelectedCount(0));return}const x=e.selectionMode||"multiple";!b?.ctrlKey&&!b?.metaKey&&(v.type!=="touchstart"||!l.isSelected(g))&&(l.clearSelection(),i.value?.clearSelection(!0,!0)),i.value?.resolveSelectables(),v.type==="touchstart"&&l.isSelected(g)?l.select(g,x):l.toggleSelect(g,x),l.setSelectedCount(r.value?.size||0)},handleItemDblClick:v=>{const y=f(v);if(!y)return;const{item:g}=y;g&&(g.type==="file"&&!u(g)||d(g,o,s))},handleItemContextMenu:v=>{v.preventDefault(),v.stopPropagation();const y=f(v);if(!y)return;const{key:g,item:m}=y;u(m)&&(r.value?.has(g)||(l.clearSelection(),l.select(g)),e.emitter.emit("vf-contextmenu-show",{event:v,items:p(),target:m}))},handleContentContextMenu:v=>{v.preventDefault(),e.emitter.emit("vf-contextmenu-show",{event:v,items:p()})},getSelectedItems:p}}function ote(e,t){const n=re(null);return xt(()=>{if(Hr.plugin([Q7]),e.value){const r=Hr(e.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:i=>{n.value=i;const{viewport:o}=i.elements();o&&o.addEventListener("scroll",t)},updated:i=>{const{viewport:o}=i.elements()}});n.value=r}}),xn(()=>{if(n.value){const{viewport:r}=n.value.elements();r&&r.removeEventListener("scroll",t),n.value.destroy(),n.value=null}}),{osInstance:n}}const ste=4,ate=600;function lte(e,t){const n=re(null),r=new WeakMap,i=new WeakMap;return xt(()=>{e.value&&(n.value=new Ho({elements_selector:".lazy",container:e.value,restore_on_error:!0,callback_error:(o,s)=>{const l=(r.get(o)??0)+1;if(l>ste)return;r.set(o,l);const u=ate*2**(l-1)+Math.random()*250,d=i.get(o);d&&clearTimeout(d),i.set(o,setTimeout(()=>{o.isConnected&&(Ho.resetStatus(o),s.update())},u))}})),t?.emitter&&t.emitter.on("vf-refresh-thumbnails",()=>{n.value&&n.value.update()})}),kw(()=>{n.value&&n.value.update()}),xn(()=>{n.value&&(n.value.destroy(),n.value=null)}),{vfLazyLoad:n}}const ute={class:"vuefinder__explorer__container"},cte={key:0,class:"vuefinder__linear-loader"},dte=ze({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(e){const t=e,n=rt(),r=hl(n,["vuefinder__drag-over"]),i=_i("dragImage"),o=_n(null),s=_i("scrollContainer"),l=_i("scrollContent"),u=n.fs,d=n.config,f=Qe(d.state),p=Qe(u.sortedFiles),v=Qe(u.selectedKeys),y=Qe(u.loading),g=N=>v.value?.has(N)??!1,m=se(()=>{if(f.value?.view==="grid"){const ge=f.value?.gridItemHeight??80,fe=f.value?.gridItemGap??8;return ge+fe*2}const N=f.value?.listItemHeight??32,ie=f.value?.listItemGap??2;return N+ie*2}),b=se(()=>{if(f.value?.view==="grid"){const N=f.value?.gridItemWidth??96,ie=f.value?.gridItemGap??8;return N+ie*2}return 104}),x=se(()=>f.value?.view==="grid"?(f.value?.gridItemGap??8)*2:0),{t:S}=n.i18n,{itemsPerRow:O,totalHeight:T,visibleRows:A,handleScroll:M,getRowItems:z,getItemsInRange:Y,updateItemsPerRow:ve}=ete(se(()=>p.value??[]),{scrollContainer:s,itemWidth:b,rowHeight:m,overscan:2,containerPadding:x,lockItemsPerRow:se(()=>f.value.view==="list")}),{osInstance:W}=ote(s,M),{explorerId:X,isDragging:K,initializeSelectionArea:L,updateSelectionArea:D,handleContentClick:ne}=tte({itemsPerRow:O,totalHeight:T,getItemsInRange:Y,getKey:N=>Jt(N),selectionObject:o,rowHeight:m,itemWidth:b,osInstance:W}),le=re(null),je=N=>{if(!N||!le.value)return!1;const ie=v.value?.has(le.value)??!1;return K.value&&(ie?v.value?.has(N)??!1:N===le.value)};He(()=>d.get("view"),N=>{N==="list"?O.value=1:ve()},{immediate:!0}),He(O,N=>{d.get("view")==="list"&&N!==1&&(O.value=1)});const J=N=>p.value?.[N];lte(s,n);const{handleItemClick:j,handleItemDblClick:de,handleItemContextMenu:U,handleContentContextMenu:ee}=ite(n,X,p,v,o,t.onFileDclick,t.onFolderDclick);xt(()=>{const N=()=>{o.value||L(),o.value&&o.value.on("beforestart",({event:ie})=>{const ge=ie?.target===l.value;if(!ie?.metaKey&&!ie?.ctrlKey&&!ie?.altKey&&!ge)return!1})};if(W.value)N();else{const ie=setInterval(()=>{W.value&&(clearInterval(ie),N())},50);setTimeout(()=>{clearInterval(ie),o.value||N()},500)}He(()=>[n.selectionFilterType,n.selectionFilterMimeIncludes],D,{deep:!0})});const Q=N=>{if(!(n.features?.move??!1)||N.altKey||N.ctrlKey||N.metaKey)return N.preventDefault(),!1;K.value=!0;const ie=N.target?.closest(".file-item-"+X);if(le.value=ie?String(ie.dataset.key):null,N.dataTransfer&&le.value){N.dataTransfer.setDragImage(i.value,0,15),N.dataTransfer.effectAllowed="all",N.dataTransfer.dropEffect="copy";const ge=v.value?.has(le.value)?Array.from(v.value):[le.value];N.dataTransfer.setData("items",JSON.stringify(ge)),u.setDraggedItem(le.value)}},B=()=>{le.value=null};let oe=null,V=null;const P=N=>{N.target?.closest(".file-item-"+X)||(V=N,oe&&clearTimeout(oe),oe=setTimeout(()=>{V&&(V.cancelable&&V.preventDefault(),V.stopPropagation(),ee(V)),V=null,oe=null},500))},F=N=>{oe&&(clearTimeout(oe),oe=null),V=null},G=N=>{if(!V)return;const ie=V.touches[0]||V.changedTouches[0],ge=N.touches[0]||N.changedTouches[0];if(ie&&ge){const fe=Math.abs(ge.clientX-ie.clientX),pe=Math.abs(ge.clientY-ie.clientY);(fe>15||pe>15)&&(oe&&(clearTimeout(oe),oe=null),V=null)}};return(N,ie)=>(C(),R("div",ute,[w(f).view==="list"?(C(),Ee(Zee,{key:0})):Se("",!0),_("div",{ref_key:"scrollContainer",ref:s,class:Be(["vuefinder__explorer__selector-area","scroller-"+w(X)])},[w(d).get("loadingIndicator")==="linear"&&w(y)?(C(),R("div",cte)):Se("",!0),_("div",{ref_key:"scrollContent",ref:l,class:"scrollContent vuefinder__explorer__scroll-content",style:an({height:`${w(T)}px`,position:"relative",width:"100%"}),onContextmenu:ie[0]||(ie[0]=ht((...ge)=>w(ee)&&w(ee)(...ge),["self","prevent"])),onClick:ie[1]||(ie[1]=ht((...ge)=>w(ne)&&w(ne)(...ge),["self"])),onTouchstartCapture:ht(P,["self"]),onTouchendCapture:ht(F,["self"]),onTouchmoveCapture:ht(G,["self"]),onTouchcancelCapture:ht(F,["self"])},[_("div",{ref_key:"dragImage",ref:i,class:"vuefinder__explorer__drag-item"},[Z(kee,{count:le.value&&w(v).has(le.value)?w(v).size:1},null,8,["count"])],512),w(f).view==="grid"?(C(!0),R(We,{key:0},ct(w(A),ge=>(C(),Ee(Z0,{key:ge,"row-index":ge,"row-height":m.value,view:"grid","items-per-row":w(O),items:w(z)(w(p),ge),"show-thumbnails":w(f).showThumbnails,"is-dragging-item":je,"is-selected":g,"drag-n-drop-events":fe=>w(r).events(fe),"explorer-id":w(X),onClick:w(j),onDblclick:w(de),onContextmenu:w(U),onDragstart:Q,onDragend:B},{icon:Le(fe=>[mt(N.$slots,"icon",Ot({ref_for:!0},fe))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(C(!0),R(We,{key:1},ct(w(A),ge=>(C(),Ee(Z0,{key:ge,"row-index":ge,"row-height":m.value,view:"list",items:J(ge)?[J(ge)]:[],"is-dragging-item":je,"is-selected":g,"drag-n-drop-events":fe=>w(r).events(fe),"explorer-id":w(X),onClick:w(j),onDblclick:w(de),onContextmenu:w(U),onDragstart:Q,onDragend:B},{icon:Le(fe=>[mt(N.$slots,"icon",Ot({ref_for:!0},fe))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),fte=["href","download"],pte={class:"vuefinder__context-menu__action vuefinder__context-menu__action--parent"},hte={class:"vuefinder__context-menu vuefinder__context-menu__submenu"},mte=["onClick"],vte=["onClick"],gte=ze({__name:"ContextMenu",setup(e){const t=rt(),n=re(null),r=re([]);let i=null,o=null,s=null,l=[],u=null;const d=Hn({active:!1,items:[],positions:{}});t.emitter.on("vf-context-selected",y=>{r.value=y});const f=y=>y.link(t,r.value),p=y=>{t.emitter.emit("vf-contextmenu-hide"),y.action(t,r.value)};t.emitter.on("vf-contextmenu-show",y=>{const{event:g,items:m,target:b=null}=y||{};d.items=(t.contextMenuItems||[]).filter(x=>x.show(t,{items:m,target:b})).sort((x,S)=>{const O=x.order??1/0,T=S.order??1/0;return O-T}),b?m.length>1&&m.some(x=>x.path===b.path)?t.emitter.emit("vf-context-selected",m):t.emitter.emit("vf-context-selected",[b]):t.emitter.emit("vf-context-selected",[]),v(g)}),t.emitter.on("vf-contextmenu-hide",()=>{d.active=!1,i&&(i(),i=null),s&&(l.forEach(y=>{y===window?window.removeEventListener("scroll",s,!0):y.removeEventListener("scroll",s,!0)}),s=null,l=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null),o=null,d.positions={}});const v=async y=>{i&&(i(),i=null);const g=(T=>{if("clientX"in T&&"clientY"in T)return{x:T.clientX,y:T.clientY};const A="touches"in T&&T.touches[0]||"changedTouches"in T&&T.changedTouches[0];return A?{x:A.clientX,y:A.clientY}:{x:0,y:0}})(y);if(o={getBoundingClientRect:()=>({width:0,height:0,x:g.x,y:g.y,top:g.y,left:g.x,right:g.x,bottom:g.y})},d.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},d.active=!0,await gt(),!n.value||!o)return;await new Promise(T=>{requestAnimationFrame(()=>{requestAnimationFrame(T)})});const m=[Da(8),Fa({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),La({padding:16})];let b=0,x=0;try{const T=await js(o,n.value,{placement:"right-start",strategy:"fixed",middleware:m});b=T.x,x=T.y}catch(T){console.warn("[ContextMenu] Floating UI initial positioning error:",T);return}d.positions={position:"fixed",zIndex:"10001",left:`${b}px`,top:`${x}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{n.value&&(d.positions={...d.positions,opacity:"1",transform:"translateY(0)"})});const S=(T=>{const A=[];let M=T;for(;M&&M!==document.body&&M!==document.documentElement;){const z=window.getComputedStyle(M),Y=z.overflow+z.overflowX+z.overflowY;(Y.includes("scroll")||Y.includes("auto"))&&A.push(M),M=M.parentElement}return A})(n.value);l=[window,...S],s=()=>{d.active&&t.emitter.emit("vf-contextmenu-hide")};const O=s;O&&l.forEach(T=>{T===window?window.addEventListener("scroll",O,!0):T.addEventListener("scroll",O,!0)}),u=T=>{if(!d.active)return;const A=T.target;if(!A||n.value&&n.value.contains(A))return;const M=t.root;M&&M.contains(A)||t.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{u&&(document.addEventListener("mousedown",u,!0),document.addEventListener("touchstart",u,!0))},100),setTimeout(()=>{if(!(!n.value||!o))try{i=Dh(o,n.value,async()=>{if(!(!o||!n.value))try{const{x:T,y:A}=await js(o,n.value,{placement:"right-start",strategy:"fixed",middleware:m});d.positions={...d.positions,left:`${T}px`,top:`${A}px`}}catch(T){console.warn("Floating UI positioning error:",T)}})}catch(T){console.warn("Floating UI autoUpdate setup error:",T),i=null}},200)};return xn(()=>{i&&(i(),i=null),s&&(l.forEach(y=>{y===window?window.removeEventListener("scroll",s,!0):y.removeEventListener("scroll",s,!0)}),s=null,l=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null),o=null}),(y,g)=>Ct((C(),R("ul",{ref_key:"contextmenu",ref:n,class:Be([{"vuefinder__context-menu--active":d.active,"vuefinder__context-menu--inactive":!d.active},"vuefinder__context-menu"]),style:an(d.positions)},[(C(!0),R(We,null,ct(d.items,m=>(C(),R("li",{key:m.title,class:Be(["vuefinder__context-menu__item",{"vuefinder__context-menu__item--has-children":m.children?.length}])},[m.link?(C(),R("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:f(m),download:f(m),onClick:g[0]||(g[0]=b=>w(t).emitter.emit("vf-contextmenu-hide"))},[_("span",null,q(m.title(w(t).i18n)),1)],8,fte)):m.children?.length?(C(),R(We,{key:1},[_("div",pte,[_("span",null,q(m.title(w(t).i18n)),1),g[1]||(g[1]=_("svg",{class:"vuefinder__context-menu__chevron",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},[_("path",{d:"M6 4l4 4-4 4z"})],-1))]),_("ul",hte,[(C(!0),R(We,null,ct(m.children,b=>(C(),R("li",{key:b.id,class:"vuefinder__context-menu__item"},[_("div",{class:"vuefinder__context-menu__action",onClick:x=>p(b)},[_("span",null,q(b.title(w(t).i18n)),1)],8,mte)]))),128))])],64)):(C(),R("div",{key:2,class:"vuefinder__context-menu__action",onClick:b=>p(m)},[_("span",null,q(m.title(w(t).i18n)),1)],8,vte))],2))),128))],6)),[[Nr,d.active]])}}),_te={class:"vuefinder__status-bar__wrapper"},yte={class:"vuefinder__status-bar__storage"},bte=["title"],wte={class:"vuefinder__status-bar__storage-icon"},Ete=["value"],Ste=["value"],Cte={class:"vuefinder__status-bar__info space-x-2"},xte={key:0},Tte={key:1},kte={key:0,class:"vuefinder__status-bar__size"},Ote={class:"vuefinder__status-bar__actions"},$te=ze({__name:"Statusbar",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.sortedFiles),o=Qe(r.path),s=Qe(r.selectedCount),l=Qe(r.storages),u=Qe(r.selectedItems),d=Qe(r.path),f=b=>{const x=b.target.value;t.adapter.open(x+"://")},p=se(()=>!u.value||u.value.length===0?0:u.value.reduce((b,x)=>b+(x.file_size||0),0)),v=se(()=>l.value),y=se(()=>i.value),g=se(()=>s.value||0),m=se(()=>u.value||[]);return(b,x)=>(C(),R("div",_te,[_("div",yte,[_("div",{class:"vuefinder__status-bar__storage-container",title:w(n)("Storage")},[_("div",wte,[Z(w(Km))]),_("select",{name:"vuefinder-media-selector",value:w(o).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:f},[(C(!0),R(We,null,ct(v.value,S=>(C(),R("option",{key:S,value:S},q(S),9,Ste))),128))],40,Ete),x[0]||(x[0]=_("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,bte),_("div",Cte,[g.value===0?(C(),R("span",xte,q(y.value.length)+" "+q(w(n)("items")),1)):(C(),R("span",Tte,[Et(q(g.value)+" "+q(w(n)("selected"))+" ",1),p.value?(C(),R("span",kte,q(w(t).filesize(p.value)),1)):Se("",!0)]))])]),_("div",Ote,[mt(b.$slots,"actions",{path:w(d).path,count:g.value||0,selected:m.value})])]))}}),Ate={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function Rte(e,t){return C(),R("svg",Ate,[...t[0]||(t[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1)])])}const Pte={render:Rte};function s2(e,t){const n=e.findIndex(r=>r.path===t.path);n>-1?e[n]=t:e.push(t)}const Ite={class:"vuefinder__folder-loader-indicator"},Mte={key:1,class:"vuefinder__folder-loader-indicator--icon"},a2=ze({__name:"FolderLoaderIndicator",props:xw({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=rt(),r=Ah(e,"modelValue"),i=re(!1);He(()=>r.value,()=>o());const o=async()=>{i.value=!0;try{const s=(await n.adapter.list(t.path)).files.filter(l=>l.type==="dir");s2(n.treeViewData,{path:t.path,type:"dir",folders:s})}catch(s){yn(s,"Failed to fetch subfolders")}finally{i.value=!1}};return(s,l)=>(C(),R("div",Ite,[i.value?(C(),Ee(w(nd),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(C(),R("div",Mte,[r.value?(C(),Ee(w(ed),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):Se("",!0),r.value?Se("",!0):(C(),Ee(w(Zc),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),Dte={key:0},Fte={class:"vuefinder__treesubfolderlist__no-folders"},Lte={class:"vuefinder__treesubfolderlist__item-content"},jte=["onClick"],Ute=["title","onDblclick","onClick"],Nte={class:"vuefinder__treesubfolderlist__item-icon"},zte={class:"vuefinder__treesubfolderlist__subfolder"},Bte={key:1,class:"vuefinder__treesubfolderlist__more-note"},Vte=ze({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(e){const t=rt(),n=t.fs,r=hl(t,["vuefinder__drag-over"]),i=re({}),o=t.config,s=Qe(o.state),{t:l}=t.i18n,u=Qe(n.path),d=e,f=re(null),p=re(50);xt(()=>{d.path===d.storage+"://"&&f.value&&Hr(f.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const v=se(()=>{const S=t.treeViewData.find(O=>O.path===d.path)?.folders||[];return S.length>p.value?S.slice(0,p.value):S}),y=se(()=>t.treeViewData.find(S=>S.path===d.path)?.folders?.length||0),g=se(()=>y.value>p.value),m=se(()=>`${d.storage}://`),b=(S,O)=>S===O||S.startsWith(`${O}/`);He(v,S=>{const O=s.value.expandTreeByDefault&&d.path===m.value,T=s.value.expandedTreePaths||[];S.forEach(A=>{const M=T.some(z=>b(z,A.path));(O||M)&&i.value[A.path]===void 0&&(i.value[A.path]=!0)})},{immediate:!0});const x=()=>{p.value+=50};return(S,O)=>{const T=ft("TreeSubfolderList",!0);return C(),R("ul",{ref_key:"parentSubfolderList",ref:f,class:"vuefinder__treesubfolderlist__container"},[v.value.length?Se("",!0):(C(),R("li",Dte,[_("div",Fte,q(w(l)("No folders")),1)])),(C(!0),R(We,null,ct(v.value,A=>(C(),R("li",{key:A.path,class:"vuefinder__treesubfolderlist__item"},[_("div",Lte,[_("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:M=>i.value[A.path]=!i.value[A.path]},[Z(a2,{modelValue:i.value[A.path],"onUpdate:modelValue":M=>i.value[A.path]=M,storage:e.storage,path:A.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,jte),_("div",Ot({class:"vuefinder__treesubfolderlist__item-link",title:A.path},ni(w(r).events({...A,dir:A.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:M=>i.value[A.path]=!i.value[A.path],onClick:M=>w(t).adapter.open(A.path)}),[_("div",Nte,[w(u)?.path===A.path?(C(),Ee(w(td),{key:0,class:"vuefinder__item-icon__folder--open"})):(C(),Ee(w(ar),{key:1,class:"vuefinder__item-icon__folder"}))]),_("div",{class:Be(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":w(u).path===A.path}])},q(A.basename),3)],16,Ute)]),_("div",zte,[Ct(Z(T,{storage:d.storage,path:A.path},null,8,["storage","path"]),[[Nr,i.value[A.path]]])])]))),128)),g.value?(C(),R("li",Bte,[_("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:x},q(w(l)("load more")),1)])):Se("",!0)],512)}}}),Hte=ze({__name:"TreeStorageItem",props:{storage:{}},setup(e){const t=rt(),n=t.fs,r=t.config,i=e,o=Qe(r.state),s=se(()=>{const y=o.value.expandedTreePaths||[],g=`${i.storage}://`;return y.some(m=>m===g||m.startsWith(`${g}`))}),l=re(o.value.expandTreeByDefault||s.value),u=hl(t,["vuefinder__drag-over"]),d=Qe(n.path),f=se(()=>i.storage===d.value?.storage);He(()=>({expandTreeByDefault:o.value.expandTreeByDefault,hasExpandedPathInStorage:s.value}),y=>{(y.expandTreeByDefault||y.hasExpandedPathInStorage)&&(l.value=!0)});const p={storage:i.storage,path:i.storage+"://",dir:i.storage+"://",type:"dir",basename:i.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function v(y){y===d.value?.storage?l.value=!l.value:t.adapter.open(y+"://")}return(y,g)=>(C(),R(We,null,[_("div",{class:"vuefinder__treestorageitem__header",onClick:g[2]||(g[2]=m=>v(e.storage))},[_("div",Ot({class:["vuefinder__treestorageitem__info",f.value?"vuefinder__treestorageitem__info--active":""]},ni(w(u).events(p),!0)),[_("div",{class:Be(["vuefinder__treestorageitem__icon",f.value?"vuefinder__treestorageitem__icon--active":""])},[Z(w(Km))],2),_("div",null,q(e.storage),1)],16),_("div",{class:"vuefinder__treestorageitem__loader",onClick:g[1]||(g[1]=ht(m=>l.value=!l.value,["stop"]))},[Z(a2,{modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),storage:e.storage,path:e.storage+"://"},null,8,["modelValue","storage","path"])])]),Ct(Z(Vte,{storage:e.storage,path:e.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[Nr,l.value]])],64))}}),qte={class:"vuefinder__folder-indicator"},Wte={class:"vuefinder__folder-indicator--icon"},Yte=ze({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ah(e,"modelValue");return(n,r)=>(C(),R("div",qte,[_("div",Wte,[t.value?(C(),Ee(w(ed),{key:0,class:"vuefinder__folder-indicator--minus"})):Se("",!0),t.value?Se("",!0):(C(),Ee(w(Zc),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),Kte={key:0,class:"vuefinder__treeview__header"},Gte={class:"vuefinder__treeview__pinned-label"},Qte={class:"vuefinder__treeview__pin-text text-nowrap"},Xte={key:0,class:"vuefinder__treeview__pinned-list"},Jte=["onClick"],Zte=["title"],ene=["onClick"],tne={key:0},nne={class:"vuefinder__treeview__no-pinned"},rne=ze({__name:"TreeView",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,{getStore:i,setStore:o}=t.storage,s=t.fs,l=t.config,u=Qe(l.state),d=Qe(s.sortedFiles),f=Qe(s.storages),p=se(()=>f.value||[]),v=Qe(s.path),y=hl(t,["vuefinder__drag-over"]),g=re(190),m=re(i("pinned-folders-opened",!0));He(m,O=>o("pinned-folders-opened",O));const b=O=>{const T=l.get("pinnedFolders");l.set("pinnedFolders",T.filter(A=>A.path!==O.path))},x=O=>{const T=O.clientX,A=O.target.parentElement;if(!A)return;const M=A.getBoundingClientRect().width;A.classList.remove("transition-[width]"),A.classList.add("transition-none");const z=ve=>{g.value=M+ve.clientX-T,g.value<50&&(g.value=0,l.set("showTreeView",!1)),g.value>50&&l.set("showTreeView",!0)},Y=()=>{const ve=A.getBoundingClientRect();g.value=ve.width,A.classList.add("transition-[width]"),A.classList.remove("transition-none"),window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",Y)};window.addEventListener("mousemove",z),window.addEventListener("mouseup",Y)},S=re(null);return xt(()=>{S.value&&Hr(S.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),He(d,O=>{const T=O.filter(A=>A.type==="dir");s2(t.treeViewData,{path:v.value.path||"",folders:T.map(A=>({storage:A.storage,path:A.path,basename:A.basename,type:"dir"}))})}),(O,T)=>(C(),R(We,null,[_("div",{class:Be(["vuefinder__treeview__overlay",w(u).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:T[0]||(T[0]=A=>w(l).toggle("showTreeView"))},null,2),_("div",{style:an(w(u).showTreeView?"min-width:100px;max-width:75%; width: "+g.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[_("div",{ref_key:"treeViewScrollElement",ref:S,class:"vuefinder__treeview__scroll"},[w(n)("pinned")?(C(),R("div",Kte,[_("div",{class:"vuefinder__treeview__pinned-toggle",onClick:T[2]||(T[2]=A=>m.value=!m.value)},[_("div",Gte,[Z(w(Qa),{class:"vuefinder__treeview__pin-icon"}),_("div",Qte,q(w(r)("Pinned Folders")),1)]),Z(Yte,{modelValue:m.value,"onUpdate:modelValue":T[1]||(T[1]=A=>m.value=A)},null,8,["modelValue"])]),m.value?(C(),R("ul",Xte,[(C(!0),R(We,null,ct(w(u).pinnedFolders,A=>(C(),R("li",{key:A.path,class:"vuefinder__treeview__pinned-item"},[_("div",Ot({class:"vuefinder__treeview__pinned-folder"},ni(w(y).events(A),!0),{onClick:M=>w(t).adapter.open(A.path)}),[w(v).path!==A.path?(C(),Ee(w(ar),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):Se("",!0),w(v).path===A.path?(C(),Ee(w(td),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):Se("",!0),_("div",{title:A.path,class:Be(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":w(v).path===A.path}])},q(A.basename),11,Zte)],16,Jte),_("div",{class:"vuefinder__treeview__remove-folder",onClick:M=>b(A)},[Z(w(Pte),{class:"vuefinder__treeview__remove-icon"})],8,ene)]))),128)),w(u).pinnedFolders.length?Se("",!0):(C(),R("li",tne,[_("div",nne,q(w(r)("No folders pinned")),1)]))])):Se("",!0)])):Se("",!0),(C(!0),R(We,null,ct(p.value,A=>(C(),R("div",{key:A,class:"vuefinder__treeview__storage"},[Z(Hte,{storage:A},null,8,["storage"])]))),128))],512),_("div",{class:"vuefinder__treeview__resize-handle",onMousedown:x},null,32)],4)],64))}}),hn={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",openAs:"openAs",openAsText:"openAsText",openAsImage:"openAsImage",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function ine(e){return e.items.length>1&&e.items.some(t=>t.path===e.target?.path)?"many":e.target?"one":"none"}function sn(e){const t=Object.assign({needsSearchQuery:!1},e);return(n,r)=>!(t.needsSearchQuery!==!!r.searchQuery||t.target!==void 0&&t.target!==ine(r)||t.targetType!==void 0&&t.targetType!==r.target?.type||t.mimeType!==void 0&&t.mimeType!==r.target?.mime_type||t.feature!==void 0&&!(n.features[t.feature]??!1))}function Oa(...e){return(t,n)=>e.some(r=>r(t,n))}function Ss(...e){return(t,n)=>e.every(r=>r(t,n))}const l2=[{id:hn.openDir,title:({t:e})=>e("Open containing folder"),action:(e,t)=>{const n=t[0];n&&e.adapter.open(n.dir)},show:sn({target:"one",needsSearchQuery:!0}),order:10},{id:hn.refresh,title:({t:e})=>e("Refresh"),action:e=>{const t=e.fs;e.adapter.invalidateListQuery(t.path.get().path),e.adapter.open(t.path.get().path)},show:Oa(sn({target:"none"}),sn({target:"many"})),order:20},{id:hn.selectAll,title:({t:e})=>e("Select All"),action:e=>{e.fs.selectAll(e.selectionMode||"multiple")},show:(e,t)=>e.selectionMode==="multiple"&&sn({target:"none"})(e,t),order:30},{id:hn.new_folder,title:({t:e})=>e("New Folder"),action:e=>e.modal.open(Jm),show:sn({target:"none",feature:"newfolder"}),order:40},{id:hn.open,title:({t:e})=>e("Open"),action:(e,t)=>{t[0]&&e.adapter.open(t[0].path)},show:sn({target:"one",targetType:"dir"}),order:50},{id:hn.pinFolder,title:({t:e})=>e("Pin Folder"),action:(e,t)=>{const n=e.config,r=n.get("pinnedFolders"),i=r.concat(t.filter(o=>r.findIndex(s=>s.path===o.path)===-1));n.set("pinnedFolders",i)},show:Ss(sn({target:"one",targetType:"dir",feature:"pinned"}),(e,t)=>e.config.get("pinnedFolders").findIndex(n=>n.path===t.target?.path)===-1),order:60},{id:hn.unpinFolder,title:({t:e})=>e("Unpin Folder"),action:(e,t)=>{const n=e.config,r=n.get("pinnedFolders");n.set("pinnedFolders",r.filter(i=>!t.find(o=>o.path===i.path)))},show:Ss(sn({target:"one",targetType:"dir",feature:"pinned"}),(e,t)=>e.config.get("pinnedFolders").findIndex(n=>n.path===t.target?.path)!==-1),order:70},{id:hn.preview,title:({t:e})=>e("Preview"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0]}),show:Ss(sn({target:"one",feature:"preview"}),(e,t)=>t.target?.type!=="dir"),order:80},{id:hn.openAs,title:({t:e})=>e("Preview as"),action:()=>{},children:[{id:hn.openAsText,title:({t:e})=>e("Text"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0],forceType:"text"}),show:()=>!0},{id:hn.openAsImage,title:({t:e})=>e("Image"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0],forceType:"image"}),show:()=>!0}],show:Ss(sn({target:"one",feature:"preview"}),(e,t)=>t.target?.type!=="dir"),order:81},{id:hn.download,link:(e,t)=>{if(t[0])return e.adapter.getDownloadUrl(t[0])},title:({t:e})=>e("Download"),action:()=>{},show:Ss(sn({target:"one",feature:"download"}),(e,t)=>t.target?.type!=="dir"),order:90},{id:hn.rename,title:({t:e})=>e("Rename"),action:(e,t)=>e.modal.open(Jc,{items:t}),show:sn({target:"one",feature:"rename"}),order:100},{id:hn.move,title:({t:e})=>e("Move files"),action:(e,t)=>{const n=e.fs,r={storage:n.path.get().storage||"",path:n.path.get().path||"",type:"dir"};e.modal.open(Xs,{items:{from:t,to:r}})},show:Oa(sn({target:"one",feature:"move"}),sn({target:"many",feature:"move"})),order:110},{id:hn.copy,title:({t:e})=>e("Copy"),action:(e,t)=>{t.length>0&&e.fs.setClipboard("copy",new Set(t.map(n=>Jt(n))))},show:Oa(sn({target:"one",feature:"copy"}),sn({target:"many",feature:"copy"})),order:120},{id:hn.paste,title:({t:e})=>e("Paste"),action:(e,t)=>{const n=e.fs.getClipboard();if(n?.items?.size>0){const r=e.fs.path.get();let i=r.path,o=r.storage;t.length===1&&t[0]?.type==="dir"&&(i=t[0].path,o=t[0].storage);const s={storage:o||"",path:i||"",type:"dir"};e.modal.open(n.type==="cut"?Xs:Gm,{items:{from:Array.from(n.items),to:s}})}},show:(e,t)=>e.features?.copy??!1?e.fs.getClipboard()?.items?.size>0:!1,order:130},{id:hn.archive,title:({t:e})=>e("Archive"),action:(e,t)=>e.modal.open(tv,{items:t}),show:Oa(sn({target:"many",feature:"archive"}),Ss(sn({target:"one",feature:"archive"}),(e,t)=>t.target?.mime_type!=="application/zip")),order:140},{id:hn.unarchive,title:({t:e})=>e("Unarchive"),action:(e,t)=>e.modal.open(ev,{items:t}),show:sn({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:hn.delete,title:({t:e})=>e("Delete"),action:(e,t)=>{e.modal.open(Xc,{items:t})},show:Oa(sn({feature:"delete",target:"one"}),sn({feature:"delete",target:"many"})),order:160}],one=["data-theme"],sne={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},ane={class:"vuefinder__external-drop-message"},lne={class:"vuefinder__main__content"},une=ze({__name:"VueFinderView",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean},locale:{},contextMenuItems:{},selectionMode:{},selectionFilterType:{},selectionFilterMimeIncludes:{},onError:{type:Function},onSelect:{type:Function},onPathChange:{type:Function},onUploadComplete:{type:Function},onDeleteComplete:{type:Function},onNotify:{type:Function},onReady:{type:Function},onFileDclick:{type:Function},onFolderDclick:{type:Function},customUploader:{type:Function}},emits:["select","path-change","upload-complete","delete-complete","notify","error","ready","file-dclick","folder-dclick","update:locale"],setup(e,{emit:t}){const n=t,r=e,i=rt(),o=_i("root"),s=i.config;He(()=>r.features,S=>{const O=MC(S);Object.keys(i.features).forEach(T=>{delete i.features[T]}),Object.assign(i.features,O)},{deep:!0});const l=i.fs,u=Qe(i.i18n.localeAtom),d=Qe(s.state),f=se(()=>{const S=d.value;return{"--vf-grid-item-width":`${S.gridItemWidth}px`,"--vf-grid-item-height":`${S.gridItemHeight}px`,"--vf-grid-item-gap":`${S.gridItemGap}px`,"--vf-grid-icon-size":`${S.gridIconSize}px`,"--vf-list-item-height":`${S.listItemHeight}px`,"--vf-list-item-gap":`${S.listItemGap}px`,"--vf-list-icon-size":`${S.listIconSize}px`}});PQ();const{isDraggingExternal:p,handleDragEnter:v,handleDragOver:y,handleDragLeave:g,handleDrop:m}=IQ();function b(S){l.setPath(S.dirname),s.get("persist")&&s.set("path",S.dirname),l.setReadOnly(S.read_only??!1),i.modal.close(),l.setFiles(S.files),l.clearSelection(),l.setSelectedCount(0),l.setStorages(S.storages)}i.adapter.onBeforeOpen=()=>{l.setLoading(!0)},i.adapter.onAfterOpen=S=>{b(S),l.setLoading(!1)},i.emitter.on("vf-fetch-abort",()=>{i.adapter.cancelOpen(),l.setLoading(!1)}),i.emitter.on("vf-upload-complete",S=>{n("upload-complete",S)}),i.emitter.on("vf-delete-complete",S=>{n("delete-complete",S)}),i.emitter.on("vf-notify",S=>{n("notify",S);const{type:O,message:T}=S??{};O==="error"&&n("error",T)}),i.emitter.on("vf-file-dclick",S=>{n("file-dclick",S)}),i.emitter.on("vf-folder-dclick",S=>{n("folder-dclick",S)}),He(()=>r.config?.theme,S=>{S&&s.set("theme",w(S))},{immediate:!0}),He(u,(S,O)=>{S!==O&&n("update:locale",String(S))},{immediate:!1}),xt(()=>{i.root=o.value,He(()=>s.get("path"),O=>{i.adapter.open(O)});const S=s.get("persist")?s.get("path"):s.get("initialPath")??"";l.setPath(S),i.adapter.open(S),l.path.listen(O=>{n("path-change",O.path)}),l.selectedItems.listen(O=>{n("select",O)}),n("ready")});const x=async S=>{const O=await m(S);O.length>0&&(i.modal.open(Zm),setTimeout(()=>{i.emitter.emit("vf-external-files-dropped",O.map(T=>T.file))},100))};return(S,O)=>(C(),R("div",{ref_key:"root",ref:o,tabindex:"0",class:Be(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":w(p)}]),"data-theme":w(i).theme.current,style:an(f.value),onDragenter:O[2]||(O[2]=(...T)=>w(v)&&w(v)(...T)),onDragover:O[3]||(O[3]=(...T)=>w(y)&&w(y)(...T)),onDragleave:O[4]||(O[4]=(...T)=>w(g)&&w(g)(...T)),onDrop:x},[_("div",{class:Be(w(i).theme.current),style:{height:"100%",width:"100%"}},[_("div",{class:Be([w(d)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:O[0]||(O[0]=T=>w(i).emitter.emit("vf-contextmenu-hide")),onTouchstart:O[1]||(O[1]=T=>w(i).emitter.emit("vf-contextmenu-hide"))},[w(p)?(C(),R("div",sne,[_("div",ane,q(w(i).i18n.t("Drag and drop the files/folders to here.")),1)])):Se("",!0),w(d).showMenuBar?(C(),Ee(LJ,{key:1})):Se("",!0),w(d).showToolbar?(C(),Ee(UZ,{key:2})):Se("",!0),Z(Eee),_("div",lne,[Z(rne),Z(dte,{"on-file-dclick":r.onFileDclick,"on-folder-dclick":r.onFolderDclick},{icon:Le(T=>[mt(S.$slots,"icon",ii(Vi(T)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),Z($te,null,{actions:Le(T=>[mt(S.$slots,"status-bar",ii(Vi(T)))]),_:3})],34),(C(),Ee(el,{to:"body"},[Z(Cw,{name:"fade"},{default:Le(()=>[w(i).modal.visible?(C(),Ee(Pn(w(i).modal.type),{key:0})):Se("",!0)]),_:1})])),Z(gte,{items:w(l2)},null,8,["items"]),w(d).notificationsEnabled?(C(),Ee(w(nV),{key:0,position:w(d).notificationPosition,duration:w(d).notificationDuration,"visible-toasts":w(d).notificationVisibleToasts,"rich-colors":w(d).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):Se("",!0)],2)],46,one))}}),cne=ze({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>l2},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(e){const t=e,n=t.id??Fs(Eh);if(!n)throw new Error('VueFinderProvider requires an "id" prop.');const r=X9(t,Fs("VueFinderOptions")||{});return He(()=>t.config,i=>{if(i){const o={};for(const s in i){const l=w(i[s]);l!==void 0&&(o[s]=l)}r.config.init(o)}},{deep:!0,immediate:!0}),He(()=>t.locale,i=>{i&&r.i18n.localeAtom&&r.i18n.localeAtom.get()!==i&&r.i18n.localeAtom.set(i)},{immediate:!0}),M9(n,r),Ow(Eh,n),ts(()=>{D9(n)}),(i,o)=>(C(),Ee(une,ii(Vi(t)),{icon:Le(s=>[mt(i.$slots,"icon",ii(Vi(s)))]),"status-bar":Le(s=>[mt(i.$slots,"status-bar",ii(Vi(s)))]),_:3},16))}});function Zie(e){const t=rt(e),n=Qe(t.fs.path),r=se(()=>n.value?.path??""),i=s=>s||t.fs.path.get().path||"",o=s=>{Array.isArray(s.files)&&t.fs.setFiles(s.files)};return{async refresh(){const s=t.fs.path.get().path||"";t.adapter.invalidateListQuery(s),await t.adapter.open(s)},async open(s){await t.adapter.open(s)},preview(s){const l=(t.fs.files.get()||[]).find(u=>u.path===s);!l||l.type!=="file"||t.modal.open(qi,{storage:l.storage,item:l})},notify(s,l){ks(t,s,l)},getPath(){return t.fs.path.get().path||""},path:r,select(s){const l=new Set((t.fs.files.get()||[]).map(d=>d.path)),u=(s||[]).filter(d=>l.has(d));t.fs.setSelection(u)},selectOne(s){new Set((t.fs.files.get()||[]).map(l=>l.path)).has(s)&&t.fs.setSelection([s])},clearSelection(){t.fs.clearSelection()},getSelectedPaths(){return(t.fs.selectedItems.get()||[]).map(s=>s.path)},async createFolder(s,l){const u=await t.adapter.createFolder({path:i(l),name:s});o(u)},async createFile(s,l){const u=await t.adapter.createFile({path:i(l),name:s});o(u)},async delete(s,l){const u=i(l),d=new Map((t.fs.files.get()||[]).map(v=>[v.path,v])),f=(s||[]).map(v=>d.get(v)).filter(v=>!!v).map(v=>({path:v.path,type:v.type})),p=await t.adapter.delete({path:u,items:f});o(p)},async rename(s,l,u){const d=await t.adapter.rename({path:i(u),item:s,name:l});o(d)},async copy(s,l,u){const d=await t.adapter.copy({path:i(u),sources:s,destination:l});o(d)},async move(s,l,u){const d=await t.adapter.move({path:i(u),sources:s,destination:l});o(d)},getFiles(){return t.fs.files.get()||[]},getStorages(){return t.fs.storages.get()||[]},isLoading(){return t.fs.isLoading()},isReadOnly(){return t.fs.getReadOnly()}}}const dne={install(e,t={}){t.i18n=t.i18n??{};const[n]=Object.keys(t.i18n);t.locale=t.locale??n??"en",e.provide("VueFinderOptions",t),e.component("VueFinder",cne)}};function fne(e){e.use(dne,{i18n:{zhCN:()=>Rt(()=>import("./zhCN-VSAW5gZn.js"),[],import.meta.url),en:()=>Rt(()=>import("./en-DJCBTPEu.js"),[],import.meta.url)}})}function u2(e,t){return function(){return e.apply(t,arguments)}}const{toString:pne}=Object.prototype,{getPrototypeOf:id}=Object,{iterator:od,toStringTag:c2}=Symbol,sd=(e=>t=>{const n=pne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ui=e=>(e=e.toLowerCase(),t=>sd(t)===e),ad=e=>t=>typeof t===e,{isArray:oa}=Array,Js=ad("undefined");function ml(e){return e!==null&&!Js(e)&&e.constructor!==null&&!Js(e.constructor)&&lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d2=ui("ArrayBuffer");function hne(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&d2(e.buffer),t}const mne=ad("string"),lr=ad("function"),f2=ad("number"),vl=e=>e!==null&&typeof e=="object",vne=e=>e===!0||e===!1,nc=e=>{if(sd(e)!=="object")return!1;const t=id(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(c2 in e)&&!(od in e)},gne=e=>{if(!vl(e)||ml(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_ne=ui("Date"),yne=ui("File"),bne=e=>!!(e&&typeof e.uri<"u"),wne=e=>e&&typeof e.getParts<"u",Ene=ui("Blob"),Sne=ui("FileList"),Cne=e=>vl(e)&&lr(e.pipe);function xne(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ew=xne(),tw=typeof ew.FormData<"u"?ew.FormData:void 0,Tne=e=>{if(!e)return!1;if(tw&&e instanceof tw)return!0;const t=id(e);if(!t||t===Object.prototype||!lr(e.append))return!1;const n=sd(e);return n==="formdata"||n==="object"&&lr(e.toString)&&e.toString()==="[object FormData]"},kne=ui("URLSearchParams"),[One,$ne,Ane,Rne]=["ReadableStream","Request","Response","Headers"].map(ui),Pne=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oa(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ml(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let l;for(r=0;r<s;r++)l=o[r],t.call(null,e[l],l,e)}}function p2(e,t){if(ml(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const qo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,h2=e=>!Js(e)&&e!==qo;function xh(){const{caseless:e,skipUndefined:t}=h2(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&p2(n,o)||o;nc(n[s])&&nc(i)?n[s]=xh(n[s],i):nc(i)?n[s]=xh({},i):oa(i)?n[s]=i.slice():(!t||!Js(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&gl(arguments[i],r);return n}const Ine=(e,t,n,{allOwnKeys:r}={})=>(gl(t,(i,o)=>{n&&lr(i)?Object.defineProperty(e,o,{value:u2(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Mne=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dne=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Fne=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&id(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Lne=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},jne=e=>{if(!e)return null;if(oa(e))return e;let t=e.length;if(!f2(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Une=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&id(Uint8Array)),Nne=(e,t)=>{const r=(e&&e[od]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},zne=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Bne=ui("HTMLFormElement"),Vne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),nw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hne=ui("RegExp"),m2=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};gl(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},qne=e=>{m2(e,(t,n)=>{if(lr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(lr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wne=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return oa(e)?r(e):r(String(e).split(t)),n},Yne=()=>{},Kne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Gne(e){return!!(e&&lr(e.append)&&e[c2]==="FormData"&&e[od])}const Qne=e=>{const t=new Array(10),n=(r,i)=>{if(vl(r)){if(t.indexOf(r)>=0)return;if(ml(r))return r;if(!("toJSON"in r)){t[i]=r;const o=oa(r)?[]:{};return gl(r,(s,l)=>{const u=n(s,i+1);!Js(u)&&(o[l]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Xne=ui("AsyncFunction"),Jne=e=>e&&(vl(e)||lr(e))&&lr(e.then)&&lr(e.catch),v2=((e,t)=>e?setImmediate:t?((n,r)=>(qo.addEventListener("message",({source:i,data:o})=>{i===qo&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),qo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",lr(qo.postMessage)),Zne=typeof queueMicrotask<"u"?queueMicrotask.bind(qo):typeof process<"u"&&process.nextTick||v2,ere=e=>e!=null&&lr(e[od]),me={isArray:oa,isArrayBuffer:d2,isBuffer:ml,isFormData:Tne,isArrayBufferView:hne,isString:mne,isNumber:f2,isBoolean:vne,isObject:vl,isPlainObject:nc,isEmptyObject:gne,isReadableStream:One,isRequest:$ne,isResponse:Ane,isHeaders:Rne,isUndefined:Js,isDate:_ne,isFile:yne,isReactNativeBlob:bne,isReactNative:wne,isBlob:Ene,isRegExp:Hne,isFunction:lr,isStream:Cne,isURLSearchParams:kne,isTypedArray:Une,isFileList:Sne,forEach:gl,merge:xh,extend:Ine,trim:Pne,stripBOM:Mne,inherits:Dne,toFlatObject:Fne,kindOf:sd,kindOfTest:ui,endsWith:Lne,toArray:jne,forEachEntry:Nne,matchAll:zne,isHTMLForm:Bne,hasOwnProperty:nw,hasOwnProp:nw,reduceDescriptors:m2,freezeMethods:qne,toObjectSet:Wne,toCamelCase:Vne,noop:Yne,toFiniteNumber:Kne,findKey:p2,global:qo,isContextDefined:h2,isSpecCompliantForm:Gne,toJSONObject:Qne,isAsyncFn:Xne,isThenable:Jne,setImmediate:v2,asap:Zne,isIterable:ere};let lt=class g2 extends Error{static from(t,n,r,i,o,s){const l=new g2(t.message,n||t.code,r,i,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:me.toJSONObject(this.config),code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";lt.ERR_BAD_OPTION="ERR_BAD_OPTION";lt.ECONNABORTED="ECONNABORTED";lt.ETIMEDOUT="ETIMEDOUT";lt.ERR_NETWORK="ERR_NETWORK";lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";lt.ERR_DEPRECATED="ERR_DEPRECATED";lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";lt.ERR_CANCELED="ERR_CANCELED";lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";lt.ERR_INVALID_URL="ERR_INVALID_URL";lt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const tre=null;function Th(e){return me.isPlainObject(e)||me.isArray(e)}function _2(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function Cp(e,t,n){return e?e.concat(t).map(function(i,o){return i=_2(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function nre(e){return me.isArray(e)&&!e.some(Th)}const rre=me.toFlatObject(me,{},null,function(t){return/^is[A-Z]/.test(t)});function ld(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=me.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!me.isUndefined(x[b])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?100:n.maxDepth,d=l&&me.isSpecCompliantForm(t);if(!me.isFunction(i))throw new TypeError("visitor must be a function");function f(m){if(m===null)return"";if(me.isDate(m))return m.toISOString();if(me.isBoolean(m))return m.toString();if(!d&&me.isBlob(m))throw new lt("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(m)||me.isTypedArray(m)?d&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,b,x){let S=m;if(me.isReactNative(t)&&me.isReactNativeBlob(m))return t.append(Cp(x,b,o),f(m)),!1;if(m&&!x&&typeof m=="object"){if(me.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=JSON.stringify(m);else if(me.isArray(m)&&nre(m)||(me.isFileList(m)||me.endsWith(b,"[]"))&&(S=me.toArray(m)))return b=_2(b),S.forEach(function(T,A){!(me.isUndefined(T)||T===null)&&t.append(s===!0?Cp([b],A,o):s===null?b:b+"[]",f(T))}),!1}return Th(m)?!0:(t.append(Cp(x,b,o),f(m)),!1)}const v=[],y=Object.assign(rre,{defaultVisitor:p,convertValue:f,isVisitable:Th});function g(m,b,x=0){if(!me.isUndefined(m)){if(x>u)throw new lt("Object is too deeply nested ("+x+" levels). Max depth: "+u,lt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(v.indexOf(m)!==-1)throw Error("Circular reference detected in "+b.join("."));v.push(m),me.forEach(m,function(O,T){(!(me.isUndefined(O)||O===null)&&i.call(t,O,me.isString(T)?T.trim():T,b,y))===!0&&g(O,b?b.concat(T):[T],x+1)}),v.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return g(e),t}function rw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ov(e,t){this._pairs=[],e&&ld(e,this,t)}const y2=ov.prototype;y2.append=function(t,n){this._pairs.push([t,n])};y2.toString=function(t){const n=t?function(r){return t.call(this,r,rw)}:rw;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function ire(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function b2(e,t,n){if(!t)return e;const r=n&&n.encode||ire,i=me.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let s;if(o?s=o(t,i):s=me.isURLSearchParams(t)?t.toString():new ov(t,i).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class iw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){me.forEach(this.handlers,function(r){r!==null&&t(r)})}}const sv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ore=typeof URLSearchParams<"u"?URLSearchParams:ov,sre=typeof FormData<"u"?FormData:null,are=typeof Blob<"u"?Blob:null,lre={isBrowser:!0,classes:{URLSearchParams:ore,FormData:sre,Blob:are},protocols:["http","https","file","blob","url","data"]},av=typeof window<"u"&&typeof document<"u",kh=typeof navigator=="object"&&navigator||void 0,ure=av&&(!kh||["ReactNative","NativeScript","NS"].indexOf(kh.product)<0),cre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dre=av&&window.location.href||"http://localhost",fre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:av,hasStandardBrowserEnv:ure,hasStandardBrowserWebWorkerEnv:cre,navigator:kh,origin:dre},Symbol.toStringTag,{value:"Module"})),Mn={...fre,...lre};function pre(e,t){return ld(e,new Mn.classes.URLSearchParams,{visitor:function(n,r,i,o){return Mn.isNode&&me.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hre(e){return me.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mre(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function w2(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),u=o>=n.length;return s=!s&&me.isArray(i)?i.length:s,u?(me.hasOwnProp(i,s)?i[s]=me.isArray(i[s])?i[s].concat(r):[i[s],r]:i[s]=r,!l):((!i[s]||!me.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&me.isArray(i[s])&&(i[s]=mre(i[s])),!l)}if(me.isFormData(e)&&me.isFunction(e.entries)){const n={};return me.forEachEntry(e,(r,i)=>{t(hre(r),i,n,0)}),n}return null}const Cs=(e,t)=>e!=null&&me.hasOwnProp(e,t)?e[t]:void 0;function vre(e,t,n){if(me.isString(e))try{return(t||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _l={transitional:sv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=me.isObject(t);if(o&&me.isHTMLForm(t)&&(t=new FormData(t)),me.isFormData(t))return i?JSON.stringify(w2(t)):t;if(me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t)||me.isReadableStream(t))return t;if(me.isArrayBufferView(t))return t.buffer;if(me.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const u=Cs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return pre(t,u).toString();if((l=me.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=Cs(this,"env"),f=d&&d.FormData;return ld(l?{"files[]":t}:t,f&&new f,u)}}return o||i?(n.setContentType("application/json",!1),vre(t)):t}],transformResponse:[function(t){const n=Cs(this,"transitional")||_l.transitional,r=n&&n.forcedJSONParsing,i=Cs(this,"responseType"),o=i==="json";if(me.isResponse(t)||me.isReadableStream(t))return t;if(t&&me.isString(t)&&(r&&!i||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Cs(this,"parseReviver"))}catch(u){if(l)throw u.name==="SyntaxError"?lt.from(u,lt.ERR_BAD_RESPONSE,this,null,Cs(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mn.classes.FormData,Blob:Mn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],e=>{_l.headers[e]={}});const gre=me.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_re=e=>{const t={};let n,r,i;return e&&e.split(`
43
43
  `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&gre[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ow=Symbol("internals"),yre=/[^\x09\x20-\x7E\x80-\xFF]/g;function bre(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function $a(e){return e&&String(e).trim().toLowerCase()}function wre(e){return bre(e.replace(yre,""))}function rc(e){return e===!1||e==null?e:me.isArray(e)?e.map(rc):wre(String(e))}function Ere(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Sre=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xp(e,t,n,r,i){if(me.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!me.isString(t)){if(me.isString(r))return t.indexOf(r)!==-1;if(me.isRegExp(r))return r.test(t)}}function Cre(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function xre(e,t){const n=me.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let ur=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,u,d){const f=$a(u);if(!f)throw new Error("header name must be a non-empty string");const p=me.findKey(i,f);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||u]=rc(l))}const s=(l,u)=>me.forEach(l,(d,f)=>o(d,f,u));if(me.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(me.isString(t)&&(t=t.trim())&&!Sre(t))s(_re(t),n);else if(me.isObject(t)&&me.isIterable(t)){let l={},u,d;for(const f of t){if(!me.isArray(f))throw TypeError("Object iterator must return a key-value pair");l[d=f[0]]=(u=l[d])?me.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}s(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=$a(t),t){const r=me.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Ere(i);if(me.isFunction(n))return n.call(this,i,r);if(me.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$a(t),t){const r=me.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||xp(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=$a(s),s){const l=me.findKey(r,s);l&&(!n||xp(r,r[l],l,n))&&(delete r[l],i=!0)}}return me.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||xp(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return me.forEach(this,(i,o)=>{const s=me.findKey(r,o);if(s){n[s]=rc(i),delete n[o];return}const l=t?Cre(o):String(o).trim();l!==o&&delete n[o],n[l]=rc(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return me.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&me.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
44
44
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[ow]=this[ow]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=$a(s);r[l]||(xre(i,s),r[l]=!0)}return me.isArray(t)?t.forEach(o):o(t),this}};ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(ur.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});me.freezeMethods(ur);function Tp(e,t){const n=this||_l,r=t||n,i=ur.from(r.headers);let o=r.data;return me.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function E2(e){return!!(e&&e.__CANCEL__)}let yl=class extends lt{constructor(t,n,r){super(t??"canceled",lt.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function S2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new lt("Request failed with status code "+n.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tre(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kre(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),f=r[o];s||(s=d),n[i]=u,r[i]=d;let p=o,v=0;for(;p!==i;)v+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-s<t)return;const y=f&&d-f;return y?Math.round(v*1e3/y):void 0}}function Ore(e,t){let n=0,r=1e3/t,i,o;const s=(d,f=Date.now())=>{n=f,i=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const f=Date.now(),p=f-n;p>=r?s(d,f):(i=d,o||(o=setTimeout(()=>{o=null,s(i)},r-p)))},()=>i&&s(i)]}const Ec=(e,t,n=3)=>{let r=0;const i=kre(50,250);return Ore(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,u=l!=null?Math.min(s,l):s,d=Math.max(0,u-r),f=i(d);r=Math.max(r,u);const p={loaded:u,total:l,progress:l?u/l:void 0,bytes:d,rate:f||void 0,estimated:f&&l?(l-u)/f:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},sw=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},aw=e=>(...t)=>me.asap(()=>e(...t)),$re=Mn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mn.origin),Mn.navigator&&/(msie|trident)/i.test(Mn.navigator.userAgent)):()=>!0,Are=Mn.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];me.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),me.isString(r)&&l.push(`path=${r}`),me.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),me.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Rre(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pre(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function C2(e,t,n){let r=!Rre(t);return e&&(r||n===!1)?Pre(e,t):t}const lw=e=>e instanceof ur?{...e}:e;function es(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,f,p,v){return me.isPlainObject(d)&&me.isPlainObject(f)?me.merge.call({caseless:v},d,f):me.isPlainObject(f)?me.merge({},f):me.isArray(f)?f.slice():f}function i(d,f,p,v){if(me.isUndefined(f)){if(!me.isUndefined(d))return r(void 0,d,p,v)}else return r(d,f,p,v)}function o(d,f){if(!me.isUndefined(f))return r(void 0,f)}function s(d,f){if(me.isUndefined(f)){if(!me.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function l(d,f,p){if(me.hasOwnProp(t,p))return r(d,f);if(me.hasOwnProp(e,p))return r(void 0,d)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:l,headers:(d,f,p)=>i(lw(d),lw(f),p,!0)};return me.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=me.hasOwnProp(u,f)?u[f]:i,v=me.hasOwnProp(e,f)?e[f]:void 0,y=me.hasOwnProp(t,f)?t[f]:void 0,g=p(v,y,f);me.isUndefined(g)&&p!==l||(n[f]=g)}),n}const x2=e=>{const t=es({},e),n=v=>me.hasOwnProp(t,v)?t[v]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),s=n("xsrfCookieName");let l=n("headers");const u=n("auth"),d=n("baseURL"),f=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=ur.from(l),t.url=b2(C2(d,p,f),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),me.isFormData(r)){if(Mn.hasStandardBrowserEnv||Mn.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(me.isFunction(r.getHeaders)){const v=r.getHeaders(),y=["content-type","content-length"];Object.entries(v).forEach(([g,m])=>{y.includes(g.toLowerCase())&&l.set(g,m)})}}if(Mn.hasStandardBrowserEnv&&(me.isFunction(i)&&(i=i(t)),i===!0||i==null&&$re(t.url))){const y=o&&s&&Are.read(s);y&&l.set(o,y)}return t},Ire=typeof XMLHttpRequest<"u",Mre=Ire&&function(e){return new Promise(function(n,r){const i=x2(e);let o=i.data;const s=ur.from(i.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=i,f,p,v,y,g;function m(){y&&y(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function x(){if(!b)return;const O=ur.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:e,request:b};S2(function(z){n(z),m()},function(z){r(z),m()},A),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new lt("Request aborted",lt.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const A=T&&T.message?T.message:"Network Error",M=new lt(A,lt.ERR_NETWORK,e,b);M.event=T||null,r(M),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||sv;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new lt(T,A.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,e,b)),b=null},o===void 0&&s.setContentType(null),"setRequestHeader"in b&&me.forEach(s.toJSON(),function(T,A){b.setRequestHeader(A,T)}),me.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),l&&l!=="json"&&(b.responseType=i.responseType),d&&([v,g]=Ec(d,!0),b.addEventListener("progress",v)),u&&b.upload&&([p,y]=Ec(u),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(f=O=>{b&&(r(!O||O.type?new yl(null,e,b):O),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const S=Tre(i.url);if(S&&Mn.protocols.indexOf(S)===-1){r(new lt("Unsupported protocol "+S+":",lt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Dre=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(d){if(!i){i=!0,l();const f=d instanceof Error?d:this.reason;r.abort(f instanceof lt?f:new yl(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,o(new lt(`timeout of ${t}ms exceeded`,lt.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>me.asap(l),u}},Fre=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Lre=async function*(e,t){for await(const n of jre(e))yield*Fre(n,t)},jre=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},uw=(e,t,n,r)=>{const i=Lre(e,t);let o=0,s,l=u=>{s||(s=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:f}=await i.next();if(d){l(),u.close();return}let p=f.byteLength;if(n){let v=o+=p;n(v)}u.enqueue(new Uint8Array(f))}catch(d){throw l(d),d}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},cw=64*1024,{isFunction:Du}=me,Ure=(({Request:e,Response:t})=>({Request:e,Response:t}))(me.global),{ReadableStream:dw,TextEncoder:fw}=me.global,pw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Nre=e=>{e=me.merge.call({skipUndefined:!0},Ure,e);const{fetch:t,Request:n,Response:r}=e,i=t?Du(t):typeof fetch=="function",o=Du(n),s=Du(r);if(!i)return!1;const l=i&&Du(dw),u=i&&(typeof fw=="function"?(g=>m=>g.encode(m))(new fw):async g=>new Uint8Array(await new n(g).arrayBuffer())),d=o&&l&&pw(()=>{let g=!1;const m=new n(Mn.origin,{body:new dw,method:"POST",get duplex(){return g=!0,"half"}}),b=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),g&&!b}),f=s&&l&&pw(()=>me.isReadableStream(new r("").body)),p={stream:f&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!p[g]&&(p[g]=(m,b)=>{let x=m&&m[g];if(x)return x.call(m);throw new lt(`Response type '${g}' is not supported`,lt.ERR_NOT_SUPPORT,b)})});const v=async g=>{if(g==null)return 0;if(me.isBlob(g))return g.size;if(me.isSpecCompliantForm(g))return(await new n(Mn.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(me.isArrayBufferView(g)||me.isArrayBuffer(g))return g.byteLength;if(me.isURLSearchParams(g)&&(g=g+""),me.isString(g))return(await u(g)).byteLength},y=async(g,m)=>{const b=me.toFiniteNumber(g.getContentLength());return b??v(m)};return async g=>{let{url:m,method:b,data:x,signal:S,cancelToken:O,timeout:T,onDownloadProgress:A,onUploadProgress:M,responseType:z,headers:Y,withCredentials:ve="same-origin",fetchOptions:W}=x2(g),X=t||fetch;z=z?(z+"").toLowerCase():"text";let K=Dre([S,O&&O.toAbortSignal()],T),L=null;const D=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let ne;try{if(M&&d&&b!=="get"&&b!=="head"&&(ne=await y(Y,x))!==0){let U=new n(m,{method:"POST",body:x,duplex:"half"}),ee;if(me.isFormData(x)&&(ee=U.headers.get("content-type"))&&Y.setContentType(ee),U.body){const[Q,B]=sw(ne,Ec(aw(M)));x=uw(U.body,cw,Q,B)}}me.isString(ve)||(ve=ve?"include":"omit");const le=o&&"credentials"in n.prototype;if(me.isFormData(x)){const U=Y.getContentType();U&&/^multipart\/form-data/i.test(U)&&!/boundary=/i.test(U)&&Y.delete("content-type")}const je={...W,signal:K,method:b.toUpperCase(),headers:Y.normalize().toJSON(),body:x,duplex:"half",credentials:le?ve:void 0};L=o&&new n(m,je);let J=await(o?X(L,W):X(m,je));const j=f&&(z==="stream"||z==="response");if(f&&(A||j&&D)){const U={};["status","statusText","headers"].forEach(oe=>{U[oe]=J[oe]});const ee=me.toFiniteNumber(J.headers.get("content-length")),[Q,B]=A&&sw(ee,Ec(aw(A),!0))||[];J=new r(uw(J.body,cw,Q,()=>{B&&B(),D&&D()}),U)}z=z||"text";let de=await p[me.findKey(p,z)||"text"](J,g);return!j&&D&&D(),await new Promise((U,ee)=>{S2(U,ee,{data:de,headers:ur.from(J.headers),status:J.status,statusText:J.statusText,config:g,request:L})})}catch(le){throw D&&D(),le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,g,L,le&&le.response),{cause:le.cause||le}):lt.from(le,le&&le.code,g,L,le&&le.response)}}},zre=new Map,T2=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,u,d,f=zre;for(;l--;)u=o[l],d=f.get(u),d===void 0&&f.set(u,d=l?new Map:Nre(t)),f=d;return d};T2();const lv={http:tre,xhr:Mre,fetch:{get:T2}};me.forEach(lv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hw=e=>`- ${e}`,Bre=e=>me.isFunction(e)||e===null||e===!1;function Vre(e,t){e=me.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let l;if(i=r,!Bre(r)&&(i=lv[(l=String(r)).toLowerCase()],i===void 0))throw new lt(`Unknown adapter '${l}'`);if(i&&(me.isFunction(i)||(i=i.get(t))))break;o[l||"#"+s]=i}if(!i){const s=Object.entries(o).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since :
45
45
  `+s.map(hw).join(`