comp-hub 0.29.7 → 0.29.8

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 (154) hide show
  1. package/README.md +132 -132
  2. package/bin/cli.js +53 -53
  3. package/bin/lib/commands.js +173 -173
  4. package/bin/lib/constants.js +22 -22
  5. package/bin/lib/http.js +62 -62
  6. package/bin/lib/startup.js +183 -183
  7. package/bin/lib/utils.js +112 -112
  8. package/dist/index.js +1 -1
  9. package/dist/website/container/assets/{index-CfBoiGrX.css → index-BlSriQ8o.css} +1 -1
  10. package/dist/website/container/assets/{index-BeeqGiFl.js → index-rRWp31us.js} +1 -1
  11. package/dist/website/container/index.html +32 -32
  12. package/dist/website/container/js/vue2-sfc-loader.js +260 -260
  13. package/dist/website/container/js/vue3-sfc-loader.js +289 -289
  14. package/dist/website/item/assets/index-CDQboxOq.css +1 -0
  15. package/dist/website/item/assets/{index-D3VEpySe.js → index-DIJTHUc5.js} +3 -3
  16. package/dist/website/item/index.html +30 -30
  17. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CSa_pS0b.js +1 -0
  18. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-BCEeHWp0.js +1 -0
  19. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-B9sbaztP.js +1 -0
  20. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-I_B9sBtb.js +1 -0
  21. package/dist/website/main/assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-vaWJXLBi.js +1 -0
  22. package/dist/website/main/assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-Brp0esZx.js +1 -0
  23. package/dist/website/main/assets/PanelBackground.vue_vue_type_script_setup_true_lang-Dp5z6Iw1.js +1 -0
  24. package/dist/website/main/assets/cloud-upload-DRSmr6Qo.js +1 -0
  25. package/dist/website/main/assets/core-YKf42450.js +3 -0
  26. package/dist/website/main/assets/{el-table-column-BaabKDRF.js → el-table-column-B36K2Har.js} +1 -1
  27. package/dist/website/main/assets/home-rounded--9AAXiZb.js +1 -0
  28. package/dist/website/main/assets/index-BHVQkNA2.js +1 -0
  29. package/dist/website/main/assets/index-BV4gqPW9.js +1 -0
  30. package/dist/website/main/assets/{index-9ejOpPXc.js → index-BW8vDkye.js} +3 -3
  31. package/dist/website/main/assets/index-BXjslBXB.js +1 -0
  32. package/dist/website/main/assets/index-BmnVYsjU.js +1 -0
  33. package/dist/website/main/assets/index-C-RbFIGY.js +1 -0
  34. package/dist/website/main/assets/index-C-elMysi.js +1 -0
  35. package/dist/website/main/assets/index-CCE8UKEc.js +1 -0
  36. package/dist/website/main/assets/index-CJu9086M.js +2 -0
  37. package/dist/website/main/assets/index-CN4epH6N.js +1 -0
  38. package/dist/website/main/assets/{index-CyPExloz.css → index-CRFJskzu.css} +1 -1
  39. package/dist/website/main/assets/index-CTk2LB3W.js +1 -0
  40. package/dist/website/main/assets/index-CWZwdzIK.js +1 -0
  41. package/dist/website/main/assets/index-CYRE55Ch.js +1 -0
  42. package/dist/website/main/assets/index-CYvMpsAk.js +1 -0
  43. package/dist/website/main/assets/index-CdGhZYup.js +1 -0
  44. package/dist/website/main/assets/index-CfYP0TVV.js +1 -0
  45. package/dist/website/main/assets/index-D-zBzPPy.css +1 -0
  46. package/dist/website/main/assets/index-D2HIFwH2.js +1 -0
  47. package/dist/website/main/assets/index-D8FvfjtO.js +1 -0
  48. package/dist/website/main/assets/index-DGeSXL3t.js +1 -0
  49. package/dist/website/main/assets/index-DW1TR3IW.js +1 -0
  50. package/dist/website/main/assets/index-DhAkucE9.js +1 -0
  51. package/dist/website/main/assets/index-Dl_h7vrN.js +2 -0
  52. package/dist/website/main/assets/index-DpHwEP_B.js +1 -0
  53. package/dist/website/main/assets/{index-CpXbVBP2.js → index-Ds4AosT0.js} +5 -5
  54. package/dist/website/main/assets/index-DwBDz4RR.js +1 -0
  55. package/dist/website/main/assets/{index-Cl0SK7oa.css → index-DxyEzkir.css} +1 -1
  56. package/dist/website/main/assets/index-EHIrsqSu.js +1 -0
  57. package/dist/website/main/assets/index-FFTkVbVX.css +1 -0
  58. package/dist/website/main/assets/index-M80Ed-Pb.js +1 -0
  59. package/dist/website/main/assets/index-Mryq8zw5.js +5 -0
  60. package/dist/website/main/assets/index-PeLBbpUx.js +1 -0
  61. package/dist/website/main/assets/index-QX7WDOzk.js +1 -0
  62. package/dist/website/main/assets/{index-C8unIZll.css → index-WO9Mrc8w.css} +1 -1
  63. package/dist/website/main/assets/index-qAhDQceU.js +1 -0
  64. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BfK34NCv.js +1 -0
  65. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DjS3Q9-g.js +1 -0
  66. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DtekInbn.js +1 -0
  67. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-RkEocesH.js +1 -0
  68. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-XpLtazGO.js +2 -0
  69. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-m8-lu9dQ.js +1 -0
  70. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-t5Qr3Cck.js +1 -0
  71. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-D39LYnj3.js → index.vue_vue_type_style_index_0_lang-B-Okzh4k.js} +1 -1
  72. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-BCmjNfvt.js +6 -0
  73. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-CTWQlkPh.js +1 -0
  74. package/dist/website/main/assets/kid-star-DWSbAoDk.js +1 -0
  75. package/dist/website/main/assets/md5-BVscxO09.js +1 -0
  76. package/dist/website/main/assets/settings-DyQPsIIk.js +1 -0
  77. package/dist/website/main/assets/supervised-user-circle-BzCVjgAw.js +1 -0
  78. package/dist/website/main/assets/sync-saved-locally-rounded-Dm232VG8.js +1 -0
  79. package/dist/website/main/assets/terminal-Cpm-3gfc.js +1 -0
  80. package/dist/website/main/assets/useCacheOssStore-BUYcRp33.js +1 -0
  81. package/dist/website/main/assets/{useCompEditStore-DCFM66C4.js → useCompEditStore-CCV6awON.js} +2 -2
  82. package/dist/website/main/assets/{useCompEditStore-DfjsDbzX.css → useCompEditStore-CxnuC31d.css} +1 -1
  83. package/dist/website/main/assets/useCompMetaLocalStore-ke8aERqo.js +1 -0
  84. package/dist/website/main/assets/useKeyword-BWlKaVGC.js +1 -0
  85. package/dist/website/main/assets/useMessage-DGNISOif.js +1 -0
  86. package/dist/website/main/assets/{useTeamHeaders-kxuE8Q8s.js → useTeamHeaders-CXV6avPM.js} +1 -1
  87. package/dist/website/main/assets/useVscodeOpen-W9IOZ_u_.js +1 -0
  88. package/dist/website/main/assets/{vendor-core-B1hRUZR_.js → vendor-core-BHu_Iam8.js} +1 -1
  89. package/dist/website/main/assets/{vendor-ui-CMQTpMsc.js → vendor-ui-Lm7VJSSH.js} +2 -2
  90. package/dist/website/main/assets/{vendor-xterm-mNFjEaKn.js → vendor-xterm-DbWxaMay.js} +1 -1
  91. package/dist/website/main/index.html +4 -4
  92. package/package.json +45 -45
  93. package/dist/website/item/assets/index-BZnlGnqP.css +0 -1
  94. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-sJqw3hBL.js +0 -1
  95. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js +0 -1
  96. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js +0 -1
  97. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-CPSb3doF.js +0 -1
  98. package/dist/website/main/assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js +0 -1
  99. package/dist/website/main/assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js +0 -1
  100. package/dist/website/main/assets/PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js +0 -1
  101. package/dist/website/main/assets/cloud-upload-BZUdgCdI.js +0 -1
  102. package/dist/website/main/assets/core-CduF1cve.js +0 -3
  103. package/dist/website/main/assets/home-rounded-CAKszmlU.js +0 -1
  104. package/dist/website/main/assets/index-B2G95uaY.js +0 -1
  105. package/dist/website/main/assets/index-BI1iHj1p.js +0 -2
  106. package/dist/website/main/assets/index-BerOWbR5.js +0 -1
  107. package/dist/website/main/assets/index-Bg2Ll1MS.js +0 -1
  108. package/dist/website/main/assets/index-Bk2GHNDj.js +0 -1
  109. package/dist/website/main/assets/index-Bn9djJ1D.js +0 -1
  110. package/dist/website/main/assets/index-BoBZsqw_.js +0 -1
  111. package/dist/website/main/assets/index-Bth_SWAt.css +0 -1
  112. package/dist/website/main/assets/index-BvkOcMzw.js +0 -1
  113. package/dist/website/main/assets/index-BzJsbiup.js +0 -1
  114. package/dist/website/main/assets/index-C-ssDsWy.js +0 -1
  115. package/dist/website/main/assets/index-C4QJD9AO.js +0 -1
  116. package/dist/website/main/assets/index-CSqRH-KQ.js +0 -1
  117. package/dist/website/main/assets/index-CUiK2qn1.js +0 -1
  118. package/dist/website/main/assets/index-CZwZuk3-.js +0 -1
  119. package/dist/website/main/assets/index-ChEH9AoP.js +0 -1
  120. package/dist/website/main/assets/index-D4G87Mom.js +0 -1
  121. package/dist/website/main/assets/index-D6J3GPPV.js +0 -1
  122. package/dist/website/main/assets/index-DDnVu2nK.js +0 -1
  123. package/dist/website/main/assets/index-DJ4AvgpT.css +0 -1
  124. package/dist/website/main/assets/index-DL5xk_C7.js +0 -1
  125. package/dist/website/main/assets/index-DLWhyZSM.js +0 -2
  126. package/dist/website/main/assets/index-DO0i9je3.js +0 -5
  127. package/dist/website/main/assets/index-DYjUv_9s.js +0 -1
  128. package/dist/website/main/assets/index-De1XOjmk.js +0 -1
  129. package/dist/website/main/assets/index-DmCMPHi-.js +0 -1
  130. package/dist/website/main/assets/index-Dmk2WbAD.js +0 -1
  131. package/dist/website/main/assets/index-DryBDQGT.js +0 -1
  132. package/dist/website/main/assets/index-Dy_awGYi.js +0 -1
  133. package/dist/website/main/assets/index-QDcOlnTv.js +0 -1
  134. package/dist/website/main/assets/index-evWJEs_J.js +0 -1
  135. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js +0 -1
  136. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BHRL6G5S.js +0 -1
  137. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CKf4glow.js +0 -1
  138. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CVAkHJvA.js +0 -1
  139. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Cnaq7WZP.js +0 -1
  140. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js +0 -2
  141. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-qqOG6j-E.js +0 -1
  142. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-Cm4wH59u.js +0 -6
  143. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-D2h7hdt0.js +0 -1
  144. package/dist/website/main/assets/kid-star-FcmIH9T1.js +0 -1
  145. package/dist/website/main/assets/md5-DEHaPvGx.js +0 -1
  146. package/dist/website/main/assets/settings-DST6rYZI.js +0 -1
  147. package/dist/website/main/assets/supervised-user-circle-5toxzbuX.js +0 -1
  148. package/dist/website/main/assets/sync-saved-locally-rounded-ekj1nT7F.js +0 -1
  149. package/dist/website/main/assets/terminal-CiPichiX.js +0 -1
  150. package/dist/website/main/assets/useCacheOssStore-D1ihuvZi.js +0 -1
  151. package/dist/website/main/assets/useCompMetaLocalStore-CnMRn13T.js +0 -1
  152. package/dist/website/main/assets/useKeyword-2O8Qbig-.js +0 -1
  153. package/dist/website/main/assets/useMessage-C_SU5QaN.js +0 -1
  154. package/dist/website/main/assets/useVscodeOpen-CA_im4Vj.js +0 -1
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DL5xk_C7.js","./vendor-ui-CMQTpMsc.js","./vendor-core-B1hRUZR_.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js","./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js","./el-dropdown-item-BeIfAqTO.css","./el-card-BAyktVMS.css","./index-C4QJD9AO.js","./index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js","./useCacheOssStore-D1ihuvZi.js","./index-DOlF0Z_P.css","./index.vue_vue_type_script_setup_true_lang-BHRL6G5S.js","./index-evWJEs_J.js","./index-B78Rw6nE.css","./useVscodeOpen-CA_im4Vj.js","./index-B2G95uaY.js","./index-8dCw6Y2Z.css","./el-link-CPQZ-olG.css","./index-BerOWbR5.js","./md5-DEHaPvGx.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-sJqw3hBL.js","./CanvasAnimation.vue_vue_type_script_setup_true_lang-CPSb3doF.js","./index-CNqahi2L.css","./index-DO0i9je3.js","./core-CduF1cve.js","./index-Dt73qBZB.css","./el-empty-S7fQQ3B8.css","./index-DDnVu2nK.js","./index.vue_vue_type_style_index_0_lang-D39LYnj3.js","./index-Dj51p5I8.css","./index-Bg2Ll1MS.js","./index-BoBZsqw_.js","./index.vue_vue_type_script_setup_true_lang-qqOG6j-E.js","./useMessage-C_SU5QaN.js","./index-BvkOcMzw.js","./useCompMetaLocalStore-CnMRn13T.js","./index.vue_vue_type_script_setup_true_lang-Cnaq7WZP.js","./index-D6J3GPPV.js","./el-table-column-BaabKDRF.js","./el-table-column-B3ZEEuPD.css","./index.vue_vue_type_style_index_0_lang-Cm4wH59u.js","./vendor-xterm-mNFjEaKn.js","./index-Bn5vi5XZ.css","./index.vue_vue_type_script_setup_true_lang-CKf4glow.js","./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js","./useTeamHeaders-kxuE8Q8s.js","./index.vue_vue_type_script_setup_true_lang-CVAkHJvA.js","./index-DJ4AvgpT.css","./PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js","./index-Bth_SWAt.css","./home-rounded-CAKszmlU.js","./home-rounded-B4KVwSYb.css","./index-Dy_awGYi.js","./useKeyword-2O8Qbig-.js","./supervised-user-circle-5toxzbuX.js","./supervised-user-circle-CZYpyCV4.css","./index-DryBDQGT.js","./index.vue_vue_type_style_index_0_lang-D2h7hdt0.js","./useCompEditStore-DCFM66C4.js","./v4-EwEgHOG0.js","./useCompEditStore-DfjsDbzX.css","./index-CdWXO9ks.css","./kid-star-FcmIH9T1.js","./kid-star-D1M-aC1C.css","./index-QDcOlnTv.js","./sync-saved-locally-rounded-ekj1nT7F.js","./sync-saved-locally-rounded-wbwASI26.css","./index-C-ssDsWy.js","./cloud-upload-BZUdgCdI.js","./cloud-upload-j3Y0taC9.css","./index-BI1iHj1p.js","./index-9ejOpPXc.js","./moment-B-YVwB4U.js","./index-VFwGpUE-.css","./index-BzJsbiup.js","./terminal-CiPichiX.js","./terminal-DFt3N_TH.css","./index-Bk2GHNDj.js","./settings-DST6rYZI.js","./settings-BhagQj3w.css","./index-D4G87Mom.js","./index-CyPExloz.css","./index-DLWhyZSM.js","./index-Cl0SK7oa.css","./index-CZwZuk3-.js"])))=>i.map(i=>d[i]);
2
- import{aA as Ko,m as te,I as Ce,ak as ze,O as y,Q as ne,Y as we,a2 as j,u as m,aB as vi,a8 as Xa,l as Mt,b as Tu,J as $o,e as Yo,aC as In,w as Oe,P as T,S as Ve,R as g,H as Ie,af as He,a0 as Ke,a1 as L,a as H,f as et,a7 as Ct,n as Ge,a4 as Up,$ as ue,aD as Zl,ac as ec,d as Nt,_ as Ot,W as We,au as bn,ar as ho,ad as Ye,aE as zp,X as h_,Z as it,T as At,ae as p_,am as wn,an as Jn,aF as f_,aG as _s,aH as m_,aI as v_,aJ as tc,aa as g_,U as Ae,k as ys,aK as __,aL as qn,aM as y_,aN as b_,ax as nc,t as $t,F as zi,ab as Gn,h as Ja,D as w_,B as bs,a9 as Vp,j as ko,al as E_,E as Bp,g as C_,o as S_,a3 as En,V as ws,as as Go,ao as Es,aO as Za,ap as ea,c as x_}from"./vendor-core-B1hRUZR_.js";import{e as T_,u as O_,E as $_,a as Ji,b as ic,d as k_,c as Ou,i as A_,f as P_,r as R_,g as I_,h as M_,j as D_,k as F_,l as L_,m as j_,n as N_,o as U_,p as z_,q as $u,s as Gi,t as el,v as Hp,w as V_,x as B_,y as H_,z as q_,A as W_,B as Fi,C as K_,D as Ao,F as Y_,G as G_,H as Q_,I as tl,J as nl,K as X_,L as J_,M as Z_,N as ey,O as ku,P as Au,Q as Pu,R as Ru,S as Iu,T as Mu,U as Du,V as Fu,W as Lu,X as ju,Y as Nu,Z as Uu,_ as zu,$ as Vu,a0 as Bu,a1 as Hu,a2 as qu,a3 as Wu,a4 as Ku,a5 as Yu,a6 as Gu,a7 as Qu,a8 as Xu,a9 as Ju,aa as Zu,ab as ed,ac as td,ad as mr,ae as Zi,af as oc,ag as Po,ah as Ro,ai as Io,aj as vr,ak as ty}from"./vendor-ui-CMQTpMsc.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();const ny="local://",iy="main",oy="container",ry="item",sy="/__global_config__",ay="/node_modules/.prebuild_module",ly="_metadata.json",cy="/_module_load_prefix_",uy="/_node_modules_load_prefix_",dy="/_comp_preview_prefix_local_",hy="/__proxy__",py="/__master__",fy="__remote__",my="__local__",vy="https://api.comphub.cn:5696",gy="http://localhost:7002",_y="http://localhost:5000",yy="http://localhost:5001",by="Comp Hub",wy="csrfToken",Ey="authorization",Cy="x-refresh-token",Sy="x-csrf-token",xy="accept-language",Ty="comp-hub-db",Oy="file-compiled",$y="https://oss.comphub.cn",ky="oss:sts:token",Ay="oss:sts:expire",Py="comp.json",Ry="README.md",Iy="/.comp_hub_temp",My="main.js",Dy="index.vue",qp="list_local",Wp="list_remote",Fy={COMP_LIST_TYPE_LOCAL:qp,COMP_LIST_TYPE_REMOTE:Wp},Kp="config",Yp="error",Gp="dir",Qp="preview",Xp="extra",Jp="deps",Zp="upgradeLog",ef="readme",Ly={TAB_TYPE_CONFIG:Kp,TAB_TYPE_ERROR:Yp,TAB_TYPE_DIR:Gp,TAB_TYPE_PREVIEW:Qp,TAB_TYPE_EXTRA:Xp,TAB_TYPE_DEPS:Jp,TAB_TYPE_UPGRADE_LOG:Zp,TAB_TYPE_README:ef},tf="mini",nf="full",jy={COMP_EDIT_TAB_TYPE_MINI:tf,COMP_EDIT_TAB_TYPE_FULL:nf},of="EDIT",rf="ADD",Ny={DIALOG_TYPE_EDIT:of,DIALOG_TYPE_ADD:rf},sf="ONLY_INSTALL",af="AUTO",lf="MAJOR_VERSION",cf="MINOR_VERSION",uf="EXACT_VERSION",Uy={COMP_MATCH_TYPE_ONLY_INSTALL:sf,COMP_MATCH_TYPE_AUTO:af,COMP_MATCH_TYPE_MAJOR_VERSION:lf,COMP_MATCH_TYPE_MINOR_VERSION:cf,COMP_MATCH_TYPE_EXACT_VERSION:uf},df="online",hf="offline",zy={COMP_UPDATE_TYPE_ONLINE:df,COMP_UPDATE_TYPE_OFFLINE:hf},Vy=0,By=1,Hy=-1,pf="checkPreviewListForm",ff="checkExtraInfoForm",mf="checkCompConfig",vf="afterCompDel",gf="openCompTerminal",_f="afterCompCancelCollect",yf="afterCompRenderRetry",bf="getCompError",wf="checkUpgradeLogForm",qy={COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:pf,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:ff,COMP_METHOD_KEY_CHECK_COMP_CONFIG:mf,COMP_METHOD_KEY_AFTER_COMP_DEL:vf,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:gf,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:_f,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:yf,COMP_METHOD_KEY_GET_COMP_ERROR:bf,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:wf},Wy={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"}},Ky="http://127.0.0.1",Yy="http://localhost:8095",Gy="http://localhost:8096",Qy="http://localhost:5198",Xy="/item",Jy="/container",Zy="CREATE",eb="JOIN",tb="EXIT",nb="teamAddMyComp",ib="teamCompList",ob="teamCompGroupList",rb="teamMyCompList",sb="teamMyCompUpdate",ab="vue/dist/vue.esm-bundler.js",lb="__v__",cb="compListStore",ub="compEditStore",db="callbacks",hb="comphubConfig",pb="local",fb="prod",mb="local",vb="prod",gb="http://localhost:5173/en/",_b="https://docs.comphub.cn",yb="screenshot_mini.png",bb=20,wb=20,bt=Object.freeze(Object.defineProperty({__proto__:null,ACCEPT_LANGUAGE_HEADER_NAME:xy,AUTHORIZATION_HEADER_NAME:Ey,CACHE_KEY_STS_EXPIRE_TIME:Ay,CACHE_KEY_STS_TOKEN:ky,COMPHUB_CONFIG_KEY:hb,COMP_ACTION_ICON_HEIGHT:wb,COMP_ACTION_ICON_WIDTH:bb,COMP_CONFIG_FILENAME:Py,COMP_EDIT_TAB_TYPES:jy,COMP_EDIT_TAB_TYPE_FULL:nf,COMP_EDIT_TAB_TYPE_MINI:tf,COMP_ENTRY_FILE:My,COMP_HUB_DEV_DOCS_URL:gb,COMP_HUB_PROD_DOCS_URL:_b,COMP_LIST_TYPES:Fy,COMP_LIST_TYPE_LOCAL:qp,COMP_LIST_TYPE_REMOTE:Wp,COMP_MATCH_TYPES:Uy,COMP_MATCH_TYPE_AUTO:af,COMP_MATCH_TYPE_EXACT_VERSION:uf,COMP_MATCH_TYPE_MAJOR_VERSION:lf,COMP_MATCH_TYPE_MINOR_VERSION:cf,COMP_MATCH_TYPE_ONLY_INSTALL:sf,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:_f,COMP_METHOD_KEY_AFTER_COMP_DEL:vf,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:yf,COMP_METHOD_KEY_CHECK_COMP_CONFIG:mf,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:ff,COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:pf,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:wf,COMP_METHOD_KEY_GET_COMP_ERROR:bf,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:gf,COMP_PREVIEW_PREFIX_LOCAL:dy,COMP_README_FILENAME:Ry,COMP_SCREENSHOT_MINI_FILENAME:yb,COMP_SUBMIT_MAX_FILE_COUNT:30,COMP_SUBMIT_MAX_SINGLE_FILE_SIZE:3145728,COMP_SUBMIT_MAX_TOTAL_SIZE:10485760,COMP_TEMP_DIR:Iy,COMP_UPDATE_TYPES:zy,COMP_UPDATE_TYPE_OFFLINE:hf,COMP_UPDATE_TYPE_ONLINE:df,COMP_USE_ENTRY_FILE:Dy,CSRF_KEY:wy,CSRF_TOKEN_HEADER_NAME:Sy,DIALOG_TYPES:Ny,DIALOG_TYPE_ADD:rf,DIALOG_TYPE_EDIT:of,FILE_MANAGER_DIRNAME:ny,GLOBAL_CONFIG_PATH:sy,IFRAME_CONTAINER_WEBSITE_PATH:Jy,IFRAME_HOST:Ky,IFRAME_ITEM_WEBSITE_PATH:Xy,IFRAME_ROUTES:Wy,INDEX_DB_NAME:Ty,INDEX_DB_TABLE_NAME:Oy,LOCAL_CHILD_IFRAME_URL:Yy,LOCAL_LEAF_IFRAME_URL:Gy,LOCAL_MIDWAY_ENV_LOCAL:pb,LOCAL_MIDWAY_ENV_PROD:fb,LOCAL_SERVICE_PREFIX:my,LOCAL_SERVICE_URL_DEV:_y,LOCAL_SERVICE_URL_DEV_SUB:yy,LOCAL_TOP_IFRAME_URL:Qy,MASTER_API_PREFIX:py,META_FILE_NAME:ly,MODULE_LOAD_PREFIX:cy,NODE_MODULES_LOAD_PREFIX:uy,OSS_CUSTOM_DOMAIN:$y,PREBUILD_MODULE_DIR:ay,PROVIDE_KEYS:qy,PROVIDE_KEY_CALLBACKS:db,PROVIDE_KEY_COMP_EDIT_STORE:ub,PROVIDE_KEY_COMP_LIST_STORE:cb,PROXY_PATH_PREFIX:hy,REFRESH_TOKEN_HEADER_NAME:Cy,REMOTE_MIDWAY_ENV_LOCAL:mb,REMOTE_MIDWAY_ENV_PROD:vb,REMOTE_SERVICE_PREFIX:fy,REMOTE_SERVICE_URL_DEV:gy,REMOTE_SERVICE_URL_PROD:vy,ROUTE_STATE_KEY_VERSION:lb,SCOPE_ID_TEAM_ADD_MY_COMP:nb,SCOPE_ID_TEAM_COMP_GROUP_LIST:ob,SCOPE_ID_TEAM_COMP_LIST:ib,SCOPE_ID_TEAM_MY_COMP_LIST:rb,SCOPE_ID_TEAM_MY_COMP_UPDATE:sb,SITE_TITLE:by,TAB_TYPES:Ly,TAB_TYPE_CONFIG:Kp,TAB_TYPE_DEPS:Jp,TAB_TYPE_DIR:Gp,TAB_TYPE_ERROR:Yp,TAB_TYPE_EXTRA:Xp,TAB_TYPE_PREVIEW:Qp,TAB_TYPE_README:ef,TAB_TYPE_UPGRADE_LOG:Zp,TEAM_OPERATE_TYPE_CREATE:Zy,TEAM_OPERATE_TYPE_EXIT:tb,TEAM_OPERATE_TYPE_JOIN:eb,VERSION_COMPARE_GREATER:By,VERSION_COMPARE_LESS:Hy,VERSION_COMPARE_SAME:Vy,VUE_ESM_BUNDLER:ab,WEBSITE_PATH_CONTAINER:oy,WEBSITE_PATH_ITEM:ry,WEBSITE_PATH_MAIN:iy},Symbol.toStringTag,{value:"Module"})),Eb=[{label:"tag.systemRecommended",value:"XTTJ"},{label:"tag.all",value:"QB"},{label:"tag.latest",value:"ZX"},{label:"tag.hottest",value:"ZR"}],Cb=[".css"],Sb=[{name:"__id__",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"}],VU=Object.freeze(Object.defineProperty({__proto__:null,COMP_DEFAULT_FIELD:Sb,DEFAULT_TAG_GROUP:Eb,PREBUILD_MODULE_SKIP_EXT:Cb},Symbol.toStringTag,{value:"Module"})),xb="comp-hub-locale",Tb=Object.freeze(Object.defineProperty({__proto__:null,LOCALE_KEY:xb},Symbol.toStringTag,{value:"Module"})),Ob="send-auth-code",$b="send-auth-code-success",kb="send-auth-code-failed",Ab="login-button",Pb="login-button-success",Rb="login-button-failed",Ib="skip-login",Mb="upload-select-folder",Db="upload-confirm",Fb="upload-success",Lb="upload-failed",jb="upload-repeat-confirm",Nb="edit-panel-submit",Ub="edit-panel-submit-success",zb="edit-panel-submit-failed",Vb="edit-generate-comp-json",Bb="edit-view-diff",Hb="edit-bg-color-change",qb="edit-dep-version-change",Wb="search-component",Kb="filter-tag",Yb="page-size-change",Gb="comp-preview",Qb="comp-download",Xb="comp-download-success",Jb="comp-download-failed",Zb="comp-collect-toggle",e0="comp-delete",t0="comp-update",n0="comp-update-success",i0="comp-update-failed",o0="comp-version-change",r0="preview-open-newtab",s0="preview-tab-change",a0="user-update-avatar",l0="user-update-avatar-success",c0="user-update-avatar-failed",u0="user-update-nickname",d0="user-update-nickname-success",h0="user-update-nickname-failed",p0="user-update-email",f0="user-update-email-success",m0="user-update-email-failed",v0="user-update-password",g0="user-update-password-success",_0="user-update-password-failed",y0="user-email-login-toggle",b0="team-tab-change",w0="team-filter-group",E0="team-kick-member",C0="team-apply-accept",S0="team-apply-reject",x0="team-comp-remove",T0="team-comp-permission-change",O0="sidebar-toggle",$0="setting-apply-rule",k0="clear-cache",nd=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_CACHE:k0,COMP_COLLECT_TOGGLE:Zb,COMP_DELETE:e0,COMP_DOWNLOAD:Qb,COMP_DOWNLOAD_FAILED:Jb,COMP_DOWNLOAD_SUCCESS:Xb,COMP_PREVIEW:Gb,COMP_UPDATE:t0,COMP_UPDATE_FAILED:i0,COMP_UPDATE_SUCCESS:n0,COMP_VERSION_CHANGE:o0,EDIT_BG_COLOR_CHANGE:Hb,EDIT_DEP_VERSION_CHANGE:qb,EDIT_GENERATE_COMP_JSON:Vb,EDIT_PANEL_SUBMIT:Nb,EDIT_PANEL_SUBMIT_FAILED:zb,EDIT_PANEL_SUBMIT_SUCCESS:Ub,EDIT_VIEW_DIFF:Bb,FILTER_TAG:Kb,LOGIN_BUTTON:Ab,LOGIN_BUTTON_FAILED:Rb,LOGIN_BUTTON_SUCCESS:Pb,PAGE_SIZE_CHANGE:Yb,PREVIEW_OPEN_NEWTAB:r0,PREVIEW_TAB_CHANGE:s0,SEARCH_COMPONENT:Wb,SEND_AUTH_CODE:Ob,SEND_AUTH_CODE_FAILED:kb,SEND_AUTH_CODE_SUCCESS:$b,SETTING_APPLY_RULE:$0,SIDEBAR_TOGGLE:O0,SKIP_LOGIN:Ib,TEAM_APPLY_ACCEPT:C0,TEAM_APPLY_REJECT:S0,TEAM_COMP_PERMISSION_CHANGE:T0,TEAM_COMP_REMOVE:x0,TEAM_FILTER_GROUP:w0,TEAM_KICK_MEMBER:E0,TEAM_TAB_CHANGE:b0,UPLOAD_CONFIRM:Db,UPLOAD_FAILED:Lb,UPLOAD_REPEAT_CONFIRM:jb,UPLOAD_SELECT_FOLDER:Mb,UPLOAD_SUCCESS:Fb,USER_EMAIL_LOGIN_TOGGLE:y0,USER_UPDATE_AVATAR:a0,USER_UPDATE_AVATAR_FAILED:c0,USER_UPDATE_AVATAR_SUCCESS:l0,USER_UPDATE_EMAIL:p0,USER_UPDATE_EMAIL_FAILED:m0,USER_UPDATE_EMAIL_SUCCESS:f0,USER_UPDATE_NICKNAME:u0,USER_UPDATE_NICKNAME_FAILED:h0,USER_UPDATE_NICKNAME_SUCCESS:d0,USER_UPDATE_PASSWORD:v0,USER_UPDATE_PASSWORD_FAILED:_0,USER_UPDATE_PASSWORD_SUCCESS:g0},Symbol.toStringTag,{value:"Module"})),BU=t=>bt.COMP_HUB_PROD_DOCS_URL,A0=t=>"";var P0={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 R0=()=>{const{locale:t}=Ko(),e={zh:P0,en:T_};return{locale:te(()=>e[t.value])}},I0=Ce({__name:"App",setup(t){const{locale:e}=R0();return O_(),(n,i)=>{const o=ze("router-view");return y(),ne(m($_),{locale:m(e)},{default:we(()=>[j(o)]),_:1},8,["locale"])}}}),M0="modulepreload",D0=function(t,e){return new URL(t,e).href},id={},nt=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");o=c(n.map(u=>{if(u=D0(u,i),u in id)return;id[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(i)for(let f=s.length-1;f>=0;f--){const p=s[f];if(p.href===u&&(!d||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":M0,d||(v.as="script"),v.crossOrigin="",v.href=u,l&&v.setAttribute("nonce",l),document.head.appendChild(v),d)return new Promise((f,p)=>{v.addEventListener("load",f),v.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function r(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})},si="authorization",is=()=>localStorage.getItem(si),F0=t=>localStorage.setItem(si,t),L0=()=>localStorage.removeItem(si),Ti="x-refresh-token",j0=()=>localStorage.getItem(Ti),N0=t=>localStorage.setItem(Ti,t),U0=()=>localStorage.removeItem(Ti),z0="aside_is_collapse",HU="loginType",qU="compUploadFullscreen",WU="terminalCommandHistory",KU="compUploadSidePanelSize",YU="tagSelected",V0="asideSize",B0="headerSize",Ef="tagsViewMaxCache",GU="readUploadAgreement",H0="dependencyMatchRule",QU="teamTabActiveName",XU="settingTabActiveName",JU="compPreviewTabActiveName",Cf="paginationPageSize",q0=()=>localStorage.getItem(Cf),W0=t=>localStorage.setItem(Cf,t),ZU="selectedFolderPath",Qo=vi("tagsView",{state:()=>({visitedViews:[],maxCache:Ji(Ef,10),payloadMap:new Map}),actions:{setMaxCache(t){this.$patch(e=>{e.maxCache=t})},addView(t){this.$patch(e=>{const n={...t},i=e.visitedViews.findIndex(r=>r.path===t.path);if(i!==-1){e.visitedViews[i]=n;return}e.visitedViews.unshift(n);const o=e.visitedViews.length-e.maxCache;o>0&&this.spliceVisitedViews(-o,o)})},spliceVisitedViews(t,e){this.$patch(n=>{n.visitedViews.splice(t,e)})},delViewByPath(t){this.$patch(e=>{for(const[n,i]of e.visitedViews.entries())if(i.path===t){e.visitedViews.splice(n,1);break}})},delViewAndJumpToPrev(t,e=!1,n){if(e){const i=this.visitedViews.filter(o=>o.path!==t)?.[0];i?n.push(i.path).then(o=>{o||setTimeout(()=>{this.delViewByPath(t)},250)}):n.push("/").then(o=>{o||this.delViewByPath(t)})}else this.delViewByPath(t)},addPayLoad(t,e){this.$patch(n=>{n.payloadMap.set(t,e)})},getPayLoad(t){return this.payloadMap.get(t)}}}),K0=Ce((t,{slots:e})=>{var n,i;const o=Yo(),{width:r,height:s}=Xa(t),a=Mt(ic(o,{width:(n=Tu(r))!==null&&n!==void 0?n:0,height:(i=Tu(s))!==null&&i!==void 0?i:0},{box:t.box,window:t.window}));return()=>{if(e.default)return $o(t.as||"div",{ref:o},e.default(a))}},{name:"UseElementSize",props:["as","box","height","width","window"]}),Y0={ref:"el",class:"relative"},G0={class:"absolute opacity-0 pointer-events-none flex"},Q0=["itemKey"],X0=Ce({__name:"AutoWrapRow",props:{list:{},moreWidth:{default:70},gap:{default:5},getKey:{}},setup(t){const e=t,n=H(new Map),i=In("el"),o=In("items"),{width:r}=ic(i),s=H([]),a=H(!1),l=te(()=>r.value-e.moreWidth),c=te(()=>{const p=s.value.map(_=>_.key);return e.list.filter(_=>p.includes(e.getKey(_)))}),u=te(()=>a.value?e.list.length-s.value.length:0),d=te(()=>{let p=0;for(const _ of n.value.values())p+=_;return p});function h(p,_){n.value.set(p,_)}function v(){const p=new Map;for(const _ of e.list){const C=e.getKey(_);p.set(C,n.value.get(C)??0)}n.value=p}const f=k_(()=>{let p=0;const _=[];if(!(!o.value||e.list.length===0)){for(const C of e.list){const w=e.getKey(C),E=o.value.find(b=>b.getAttribute("itemKey")===w);if(E){if(p+=E.offsetWidth+e.gap,p>l.value)break;_.push({key:w,value:E.offsetWidth})}}s.value=_,a.value=!0}},100);return Oe([()=>r.value,()=>e.list,()=>d.value],([,,p],[,,_])=>{p!==_&&(a.value=!1),f()},{flush:"post",deep:!0}),Oe(()=>e.list.length,()=>{v()}),(p,_)=>(y(),T("div",Y0,[Ve(p.$slots,"display",{visibleList:c.value,overflow:u.value}),g("div",G0,[(y(!0),T(Ie,null,He(t.list,(C,w)=>(y(),ne(m(K0),{key:t.getKey(C)},{default:we(({width:E})=>[Ke(L(h(t.getKey(C),Number(E)))+" ",1),g("div",{ref_for:!0,ref:"items",itemKey:t.getKey(C),class:"invisible whitespace-nowrap"},[Ve(p.$slots,"measure",{item:C,index:w})],8,Q0)]),_:2},1024))),128))])],512))}}),rc=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},Sf=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cs=(t,e,n,i="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),c={provider:o.length>0?o[0]:i,prefix:l,name:a};return e&&!Ur(c)?null:c}const r=o[0],s=r.split("-");if(s.length>1){const a={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!Ur(a)?null:a}if(n&&i===""){const a={provider:i,prefix:"",name:r};return e&&!Ur(a,n)?null:a}return null},Ur=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function J0(t,e){const n=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);function r(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=i[s]&&i[s].parent,l=a&&r(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(n).concat(Object.keys(i)).forEach(r),o}const xf=Object.freeze({left:0,top:0,width:16,height:16}),os=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ss=Object.freeze({...xf,...os}),il=Object.freeze({...Ss,body:"",hidden:!1});function Z0(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}function od(t,e){const n=Z0(t,e);for(const i in il)i in os?i in t&&!(i in n)&&(n[i]=os[i]):i in e?n[i]=e[i]:i in t&&(n[i]=t[i]);return n}function ew(t,e,n){const i=t.icons,o=t.aliases||Object.create(null);let r={};function s(a){r=od(i[a]||o[a],r)}return s(e),n.forEach(s),od(t,r)}function Tf(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const i=J0(t);for(const o in i){const r=i[o];r&&(e(o,ew(t,o,r)),n.push(o))}return n}const tw={provider:"",aliases:{},not_found:{},...xf};function ta(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Of(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!ta(t,tw))return null;const n=e.icons;for(const o in n){const r=n[o];if(!o||typeof r.body!="string"||!ta(r,il))return null}const i=e.aliases||Object.create(null);for(const o in i){const r=i[o],s=r.parent;if(!o||typeof s!="string"||!n[s]&&!i[s]||!ta(r,il))return null}return e}const rd=Object.create(null);function nw(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function eo(t,e){const n=rd[t]||(rd[t]=Object.create(null));return n[e]||(n[e]=nw(t,e))}function $f(t,e){return Of(e)?Tf(e,(n,i)=>{i?t.icons[n]=i:t.missing.add(n)}):[]}function iw(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Mo=!1;function kf(t){return typeof t=="boolean"&&(Mo=t),Mo}function ow(t){const e=typeof t=="string"?Cs(t,!0,Mo):t;if(e){const n=eo(e.provider,e.prefix),i=e.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function rw(t,e){const n=Cs(t,!0,Mo);if(!n)return!1;const i=eo(n.provider,n.prefix);return e?iw(i,n.name,e):(i.missing.add(n.name),!0)}function sw(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Mo&&!e&&!t.prefix){let i=!1;return Of(t)&&(t.prefix="",Tf(t,(o,r)=>{rw(o,r)&&(i=!0)})),i}const n=t.prefix;return Ur({prefix:n,name:"a"})?!!$f(eo(e,n),t):!1}const Af=Object.freeze({width:null,height:null}),Pf=Object.freeze({...Af,...os}),aw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,lw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function sd(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const i=t.split(aw);if(i===null||!i.length)return t;const o=[];let r=i.shift(),s=lw.test(r);for(;;){if(s){const a=parseFloat(r);isNaN(a)?o.push(r):o.push(Math.ceil(a*e*n)/n)}else o.push(r);if(r=i.shift(),r===void 0)return o.join("");s=!s}}function cw(t,e="defs"){let n="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),r=t.indexOf("</"+e);if(o===-1||r===-1)break;const s=t.indexOf(">",r);if(s===-1)break;n+=t.slice(o+1,r).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:n,content:t}}function uw(t,e){return t?"<defs>"+t+"</defs>"+e:e}function dw(t,e,n){const i=cw(t);return uw(i.defs,e+i.content+n)}const hw=t=>t==="unset"||t==="undefined"||t==="none";function pw(t,e){const n={...Ss,...t},i={...Pf,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,i].forEach(p=>{const _=[],C=p.hFlip,w=p.vFlip;let E=p.rotate;C?w?E+=2:(_.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),_.push("scale(-1 1)"),o.top=o.left=0):w&&(_.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),_.push("scale(1 -1)"),o.top=o.left=0);let b;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:b=o.height/2+o.top,_.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:_.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:b=o.width/2+o.left,_.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}E%2===1&&(o.left!==o.top&&(b=o.left,o.left=o.top,o.top=b),o.width!==o.height&&(b=o.width,o.width=o.height,o.height=b)),_.length&&(r=dw(r,'<g transform="'+_.join(" ")+'">',"</g>"))});const s=i.width,a=i.height,l=o.width,c=o.height;let u,d;s===null?(d=a===null?"1em":a==="auto"?c:a,u=sd(d,l/c)):(u=s==="auto"?l:s,d=a===null?sd(u,c/l):a==="auto"?c:a);const h={},v=(p,_)=>{hw(_)||(h[p]=_.toString())};v("width",u),v("height",d);const f=[o.left,o.top,l,c];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:r}}const fw=/\sid="(\S+)"/g,ad=new Map;function mw(t){t=t.replace(/[0-9]+$/,"")||"a";const e=ad.get(t)||0;return ad.set(t,e+1),e?`${t}${e}`:t}function vw(t){const e=[];let n;for(;n=fw.exec(t);)e.push(n[1]);if(!e.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(o=>{const r=mw(o),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const ol=Object.create(null);function gw(t,e){ol[t]=e}function rl(t){return ol[t]||ol[""]}function sc(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const ac=Object.create(null),_o=["https://api.simplesvg.com","https://api.unisvg.com"],zr=[];for(;_o.length>0;)_o.length===1||Math.random()>.5?zr.push(_o.shift()):zr.push(_o.pop());ac[""]=sc({resources:["https://api.iconify.design"].concat(zr)});function _w(t,e){const n=sc(e);return n===null?!1:(ac[t]=n,!0)}function lc(t){return ac[t]}const yw=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let ld=yw();function bw(t,e){const n=lc(t);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const r=e+".json?icons=";i=n.maxURL-o-n.path.length-r.length}return i}function ww(t){return t===404}const Ew=(t,e,n)=>{const i=[],o=bw(t,e),r="icons";let s={type:r,provider:t,prefix:e,icons:[]},a=0;return n.forEach((l,c)=>{a+=l.length+1,a>=o&&c>0&&(i.push(s),s={type:r,provider:t,prefix:e,icons:[]},a=l.length),s.icons.push(l)}),i.push(s),i};function Cw(t){if(typeof t=="string"){const e=lc(t);if(e)return e.path}return"/"}const Sw=(t,e,n)=>{if(!ld){n("abort",424);return}let i=Cw(e.provider);switch(e.type){case"icons":{const r=e.prefix,s=e.icons.join(","),a=new URLSearchParams({icons:s});i+=r+".json?"+a.toString();break}case"custom":{const r=e.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;ld(t+i).then(r=>{const s=r.status;if(s!==200){setTimeout(()=>{n(ww(s)?"abort":"next",s)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},xw={prepare:Ew,send:Sw};function Rf(t,e){t.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(o=>o.id!==e))})}function Tw(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const i=t.provider,o=t.prefix;e.forEach(r=>{const s=r.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const c=l.name;if(t.icons[c])s.loaded.push({provider:i,prefix:o,name:c});else if(t.missing.has(c))s.missing.push({provider:i,prefix:o,name:c});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Rf([t],r.id),r.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),r.abort))})}))}let Ow=0;function $w(t,e,n){const i=Ow++,o=Rf.bind(null,n,i);if(!e.pending.length)return o;const r={id:i,icons:e,callback:t,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(r)}),o}function kw(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return t.forEach(o=>{if(i.name===o.name&&i.prefix===o.prefix&&i.provider===o.provider)return;i=o;const r=o.provider,s=o.prefix,a=o.name,l=n[r]||(n[r]=Object.create(null)),c=l[s]||(l[s]=eo(r,s));let u;a in c.icons?u=e.loaded:s===""||c.missing.has(a)?u=e.missing:u=e.pending;const d={provider:r,prefix:s,name:a};u.push(d)}),e}function Aw(t,e=!0,n=!1){const i=[];return t.forEach(o=>{const r=typeof o=="string"?Cs(o,e,n):o;r&&i.push(r)}),i}const Pw={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Rw(t,e,n,i){const o=t.resources.length,r=t.random?Math.floor(Math.random()*o):t.index;let s;if(t.random){let x=t.resources.slice(0);for(s=[];x.length>1;){const k=Math.floor(Math.random()*x.length);s.push(x[k]),x=x.slice(0,k).concat(x.slice(k+1))}s=s.concat(x)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const a=Date.now();let l="pending",c=0,u,d=null,h=[],v=[];typeof i=="function"&&v.push(i);function f(){d&&(clearTimeout(d),d=null)}function p(){l==="pending"&&(l="aborted"),f(),h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function _(x,k){k&&(v=[]),typeof x=="function"&&v.push(x)}function C(){return{startTime:a,payload:e,status:l,queriesSent:c,queriesPending:h.length,subscribe:_,abort:p}}function w(){l="failed",v.forEach(x=>{x(void 0,u)})}function E(){h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function b(x,k,O){const K=k!=="success";switch(h=h.filter(D=>D!==x),l){case"pending":break;case"failed":if(K||!t.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=O,w();return}if(K){u=O,h.length||(s.length?S():w());return}if(f(),E(),!t.random){const D=t.resources.indexOf(x.resource);D!==-1&&D!==t.index&&(t.index=D)}l="completed",v.forEach(D=>{D(O)})}function S(){if(l!=="pending")return;f();const x=s.shift();if(x===void 0){if(h.length){d=setTimeout(()=>{f(),l==="pending"&&(E(),w())},t.timeout);return}w();return}const k={status:"pending",resource:x,callback:(O,K)=>{b(k,O,K)}};h.push(k),c++,d=setTimeout(S,t.rotate),n(x,e,k.callback)}return setTimeout(S),C}function If(t){const e={...Pw,...t};let n=[];function i(){n=n.filter(s=>s().status==="pending")}function o(s,a,l){const c=Rw(e,s,a,(u,d)=>{i(),l&&l(u,d)});return n.push(c),c}function r(s){return n.find(a=>s(a))||null}return{query:o,find:r,setIndex:s=>{e.index=s},getIndex:()=>e.index,cleanup:i}}function cd(){}const na=Object.create(null);function Iw(t){if(!na[t]){const e=lc(t);if(!e)return;na[t]={config:e,redundancy:If(e)}}return na[t]}function Mw(t,e,n){let i,o;if(typeof t=="string"){const r=rl(t);if(!r)return n(void 0,424),cd;o=r.send;const s=Iw(t);s&&(i=s.redundancy)}else{const r=sc(t);if(r){i=If(r);const s=rl(t.resources?t.resources[0]:"");s&&(o=s.send)}}return!i||!o?(n(void 0,424),cd):i.query(e,o,n)().abort}function ud(){}function Dw(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Tw(t)}))}function Fw(t){const e=[],n=[];return t.forEach(i=>{(i.match(Sf)?e:n).push(i)}),{valid:e,invalid:n}}function yo(t,e,n){function i(){const o=t.pendingIcons;e.forEach(r=>{o&&o.delete(r),t.icons[r]||t.missing.add(r)})}if(n&&typeof n=="object")try{if(!$f(t,n).length){i();return}}catch(o){console.error(o)}i(),Dw(t)}function dd(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function Lw(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:i}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const r=t.loadIcon;if(t.loadIcons&&(o.length>1||!r)){dd(t.loadIcons(o,i,n),c=>{yo(t,o,c)});return}if(r){o.forEach(c=>{dd(r(c,i,n),u=>{yo(t,[c],u?{prefix:i,icons:{[c]:u}}:null)})});return}const{valid:s,invalid:a}=Fw(o);if(a.length&&yo(t,a,null),!s.length)return;const l=i.match(Sf)?rl(n):null;if(!l){yo(t,s,null);return}l.prepare(n,i,s).forEach(c=>{Mw(n,c,u=>{yo(t,c.icons,u)})})}))}const jw=(t,e)=>{const n=kw(Aw(t,!0,kf()));if(!n.pending.length){let a=!0;return e&&setTimeout(()=>{a&&e(n.loaded,n.missing,n.pending,ud)}),()=>{a=!1}}const i=Object.create(null),o=[];let r,s;return n.pending.forEach(a=>{const{provider:l,prefix:c}=a;if(c===s&&l===r)return;r=l,s=c,o.push(eo(l,c));const u=i[l]||(i[l]=Object.create(null));u[c]||(u[c]=[])}),n.pending.forEach(a=>{const{provider:l,prefix:c,name:u}=a,d=eo(l,c),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(u)||(h.add(u),i[l][c].push(u))}),o.forEach(a=>{const l=i[a.provider][a.prefix];l.length&&Lw(a,l)}),e?$w(e,n,o):ud};function Nw(t,e){const n={...t};for(const i in e){const o=e[i],r=typeof o;i in Af?(o===null||o&&(r==="string"||r==="number"))&&(n[i]=o):r===typeof n[i]&&(n[i]=i==="rotate"?o%4:o)}return n}const Uw=/[\s,]+/;function zw(t,e){e.split(Uw).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Vw(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function i(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:i(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(t.slice(0,t.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?i(r):0)}}return e}function Bw(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Hw(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function qw(t){return"data:image/svg+xml,"+Hw(t)}function Ww(t){return'url("'+qw(t)+'")'}const hd={...Pf,inline:!1},Kw={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Yw={display:"inline-block"},sl={backgroundColor:"currentColor"},Mf={backgroundColor:"transparent"},pd={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},fd={webkitMask:sl,mask:sl,background:Mf};for(const t in fd){const e=fd[t];for(const n in pd)e[t+n]=pd[n]}const Vr={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Vr[t+"-flip"]=e,Vr[t.slice(0,1)+"-flip"]=e,Vr[t+"Flip"]=e});function md(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const vd=(t,e)=>{const n=Nw(hd,e),i={...Kw},o=e.mode||"svg",r={},s=e.style,a=typeof s=="object"&&!(s instanceof Array)?s:{};for(let p in e){const _=e[p];if(_!==void 0)switch(p){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[p]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&zw(n,_);break;case"color":r.color=_;break;case"rotate":typeof _=="string"?n[p]=Vw(_):typeof _=="number"&&(n[p]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete i["aria-hidden"];break;default:{const C=Vr[p];C?(_===!0||_==="true"||_===1)&&(n[C]=!0):hd[p]===void 0&&(i[p]=_)}}}const l=pw(t,n),c=l.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),o==="svg")return i.style={...r,...a},Object.assign(i,c),i.innerHTML=vw(l.body),$o("svg",i);const{body:u,width:d,height:h}=t,v=o==="mask"||(o==="bg"?!1:u.indexOf("currentColor")!==-1),f=Bw(u,{...c,width:d+"",height:h+""});return i.style={...r,"--svg":Ww(f),width:md(c.width),height:md(c.height),...Yw,...v?sl:Mf,...a},$o("span",i)};kf(!0);gw("",xw);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!sw(i))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const i="IconifyProviders["+n+"] is invalid.";try{const o=e[n];if(typeof o!="object"||!o||o.resources===void 0)continue;_w(n,o)||console.error(i)}catch{console.error(i)}}}}const Gw={...Ss,body:""},Qw=Ce((t,{emit:e})=>{const n=H(null);function i(){n.value&&(n.value.abort?.(),n.value=null)}const o=H(!!t.ssr),r=H(""),s=Yo(null);function a(){const c=t.icon;if(typeof c=="object"&&c!==null&&typeof c.body=="string")return r.value="",{data:c};let u;if(typeof c!="string"||(u=Cs(c,!1,!0))===null)return null;let d=ow(u);if(!d){const f=n.value;return(!f||f.name!==c)&&(d===null?n.value={name:c}:n.value={name:c,abort:jw([u],l)}),null}i(),r.value!==c&&(r.value=c,Ge(()=>{e("load",c)}));const h=t.customise;if(h){d=Object.assign({},d);const f=h(d.body,u.name,u.prefix,u.provider);typeof f=="string"&&(d.body=f)}const v=["iconify"];return u.prefix!==""&&v.push("iconify--"+u.prefix),u.provider!==""&&v.push("iconify--"+u.provider),{data:d,classes:v}}function l(){const c=a();c?c.data!==s.value?.data&&(s.value=c):s.value=null}return o.value?l():et(()=>{o.value=!0,l()}),Oe(()=>t.icon,l),Ct(i),()=>{const c=s.value;if(!c)return vd(Gw,t);let u=t;return c.classes&&(u={...t,class:c.classes.join(" ")}),vd({...Ss,...c.data},u)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});function Xw(t,e,n="_id"){const i=Ou(t,e,n).filter(Boolean),o=Ou(e,t,n).filter(Boolean),r=A_(t,e,(s,a)=>s[n]===a[n]&&!P_(s,a));return{addedItems:i,deletedItems:o,modifiedItems:r}}const ez=Object.freeze(Object.defineProperty({__proto__:null,findChangedArrayItems:Xw},Symbol.toStringTag,{value:"Module"}));function cc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jw(t,e){if(!e?.trim())return[{text:t,isMatch:!1}];const n=new RegExp(`(${cc(e)})`,"gi");return t.split(n).map(i=>({text:i,isMatch:n.test(i)&&i.toLowerCase()===e.toLowerCase()}))}function Zw(t,e,n="hl"){if(!e?.trim())return t;const i=cc(e.trim());return t.replace(new RegExp(`(${i})`,"gi"),`<mark class="${n}">$1</mark>`)}function e1(t,e){const n=e?.trim().toLowerCase();return n?t.findIndex(i=>i.toLowerCase().includes(n)):-1}const Df=t=>t.replace(/[/\\]/g,"/"),t1=(t,e="/")=>t.replace(/[\\/]+/g,e);function n1(){return"#"+R_(0,16777215).toString(16).padStart(6,"0")}const i1=t=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t),Ff=t=>t.replace(/[-_]([a-z])/g,(e,n)=>n.toUpperCase()).replace(/^[A-Z]/,e=>e.toLowerCase()),al=t=>{if(Array.isArray(t))return t.map(n=>al(n));if(t===null||typeof t!="object")return t;const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=Ff(n);e[i]=al(t[n])}return e};function o1(t){return/(^[A-Z][a-z][a-zA-Z0-9]*$)|(^[a-z]+(-[a-z0-9]+)+$)/.test(t.trim())}function r1(t){if(t<=0)throw new Error("长度必须大于0");let e="";for(;e.length<t;){const n=Math.floor(Math.random()*10);e.length===0&&n===0||(e+=n)}return e}function Lf(t){if(t==null)return{valid:!1,reason:"validateHash.empty"};if(typeof t!="string")return{valid:!1,reason:"validateHash.notString",reasonParams:{type:typeof t}};const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return{valid:!1,reason:"validateHash.contentEmpty"};if(/^\d/.test(e))return{valid:!1,reason:"validateHash.startsWithNumber",reasonParams:{char:e[0]}};const n=e.match(/[^\p{L}\p{N}_\-() ]/u);if(n){const i=n[0],o=i.charCodeAt(0);return i==="`"?{valid:!1,reason:"validateHash.invalidCharBacktick"}:i===`
3
- `?{valid:!1,reason:"validateHash.invalidCharNewline"}:i==="\r"?{valid:!1,reason:"validateHash.invalidCharCarriageReturn"}:i===" "?{valid:!1,reason:"validateHash.invalidCharTab"}:i==="\f"?{valid:!1,reason:"validateHash.invalidCharFormFeed"}:i==="\v"?{valid:!1,reason:"validateHash.invalidCharVerticalTab"}:i==="#"?{valid:!1,reason:"validateHash.invalidCharHash"}:/[<>\\"'&]/.test(i)?{valid:!1,reason:"validateHash.invalidCharHtmlSpecial",reasonParams:{char:i}}:{valid:!1,reason:"validateHash.invalidCharUnknown",reasonParams:{char:i,code:o.toString(16).toUpperCase().padStart(4,"0")}}}return{valid:!0,normalized:e}}function s1(t){return Lf(t).valid}function a1(t){return!t||!Array.isArray(t)?[]:[...new Set(t.map(e=>(e||"").trim().toLowerCase()).filter(Boolean))]}function l1(t){if(!t||t.length===0)return{valid:!0};if(t.length>5)return{valid:!1,error:"tagsMaxCount"};for(const e of t){if(!e)return{valid:!1,error:"tagsEmpty"};if(e.length>20)return{valid:!1,error:"tagsTooLong",tag:e};if(!/^[一-龥a-zA-Z0-9\-_]+$/.test(e))return{valid:!1,error:"tagsInvalidChars",tag:e}}return{valid:!0}}const tz=Object.freeze(Object.defineProperty({__proto__:null,convertKeysToCamelCase:al,escapeRegExp:cc,findKeywordLineIndex:e1,generateNumberString:r1,highlightText:Zw,isEmail:i1,isValidHash:s1,normalizeTags:a1,randomColor:n1,replaceBackslashWithSlash:Df,replaceSlashWithSpecifiedSeparator:t1,splitTextByKeyword:Jw,toCamelCase:Ff,validateCompName:o1,validateHash:Lf,validateTags:l1},Symbol.toStringTag,{value:"Module"}));function c1(t,e){if(!t||!e.length)throw new Error("组件路径或入口路径为空");const[n]=e.slice(-1);if(!n)throw new Error("入口路径最后一项无效");const i=Df(n);return`${t.replace(bt.FILE_MANAGER_DIRNAME,"")}${i}`}function u1(t){const e={};return t.forEach(n=>{n?.parent?e[n?.parent?.name]=n?.parent?.version:e[n.name]=n.version}),Object.entries(e).map(([n,i])=>({name:n,version:i}))}const nz=Object.freeze(Object.defineProperty({__proto__:null,getPreviewUrl:c1,handleDepData:u1},Symbol.toStringTag,{value:"Module"}));function d1(t){const e={children:[]},n=[e];return t.forEach(({depth:i,tokens:o})=>{if(o[0]){const r=o[0].text,s=o.map(u=>u.text),a=s.join(""),l={title:r,titles:s,href:`#${a}`,children:[]};for(;n.length>i;)n.pop();const c=n[n.length-1];c&&c.children.push(l),n.push(l)}}),e.children}const iz=Object.freeze(Object.defineProperty({__proto__:null,flatHeadingsToTree:d1},Symbol.toStringTag,{value:"Module"})),h1=t=>`Bearer ${t}`,p1=t=>t.replace("Bearer ",""),wi=Object.freeze(Object.defineProperty({__proto__:null,extractBearerToken:p1,generateBearerToken:h1},Symbol.toStringTag,{value:"Module"}));function f1(t,e,n={}){const{idKey:i="id",childrenKey:o="children"}=n,r=Array.isArray(t)?t:[t],s=[];let a=!1;const l=u=>{const d=u[o];Array.isArray(d)&&(s.push(...d),d.forEach(h=>l(h)))},c=u=>{if(a)return!0;for(const d of u){if(d?.[i]===e)return a=!0,l(d),!0;const h=d?.[o];if(Array.isArray(h)&&h.length>0&&c(h))return!0}return!1};return c(r),s}function jf(t,e){const n=JSON.parse(JSON.stringify(t));return n.children?.length&&(n.children=n.children.map(i=>jf(i,e))),e(n)}function m1(t,e,n={}){const{idKey:i="id",childrenKey:o="children"}=n,r=Array.isArray(t)?t:[t],s=l=>{const{[o]:c,...u}=l;return u},a=(l,c)=>{for(const u of l){if(u[i]===e)return[s(u),...c];const d=u[o];if(Array.isArray(d)&&d.length>0){const h=a(d,[s(u),...c]);if(h)return h}}return null};return a(r,[])??[]}function v1(t,e){const{createNode:n,pathSeparator:i="/",skipInvalid:o=!0}=e,r=new Map,s=i,a=n("directory","",s);a.children=[],r.set(s,a);const l=u=>{let d=u.replace(/\\/g,"/");return d=d.replace(/^\.\//,""),d=d.replace(/^\/+|\/+$/g,""),d.replace(/\//g,i)};for(const u of t){const d=l(u.path);if(!d)continue;const h=d.split(i).filter(Boolean);if(h.length===0)continue;let v=s,f="";for(let w=0;w<h.length-1;w++){const E=h[w];if(f=f?`${f}${i}${E}`:E,!r.has(f)){const b=n("directory",E,f);b.children=[],r.set(f,b),r.get(v)?.children?.push(b)}v=f}const p=h[h.length-1];if(!p){if(!o)throw new Error(`无效路径: ${u.path}`);continue}const _=f?`${f}${i}${p}`:p,C=n("file",p,_);r.get(v)?.children?.push(C)}const c=u=>{u.sort((d,h)=>d.type!==h.type?d.type==="directory"?-1:1:d.name.localeCompare(h.name)),u.forEach(d=>d.children?.length&&c(d.children))};return a.children?.length&&c(a.children),a}const oz=Object.freeze(Object.defineProperty({__proto__:null,convertFlatToTree:v1,findTreeNodePathToRoot:m1,getTreeAllChildren:f1,mapTree:jf},Symbol.toStringTag,{value:"Module"}));var Nf=(t=>(t.Added="added",t.Deleted="deleted",t.Unchanged="unchanged",t.Changed="modified",t))(Nf||{}),Uf=(t=>(t.Directory="directory",t.File="file",t))(Uf||{});function zf(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}function rs(t,e){for(const n of t)e.set(n.path,n),n.type==="directory"&&n.children?.length&&rs(n.children,e)}function gd(t){const e=new Map;return rs(t,e),e}function uc(t,e){const n=[];for(const i of t)if(!e.has(i.path)){const o=zf(i);o.status="deleted",i.type==="directory"&&i.children?.length&&(o.children=uc(i.children,e)),n.push(o)}return n}function g1(t,e,n){return n?n(t,e):t.hash&&e.hash?t.hash===e.hash:!0}function Br(t,e,n,i){return t.map(o=>{const r=zf(o),s=e.get(o.path);if(s){if(o.type==="file"){const a=g1(s,o,i?.contentCompare);r.status=a?"unchanged":"modified"}else r.status="unchanged";if(o.type==="directory"&&o.children&&s.children){const a=gd(s.children),l=Br(o.children,a,n,i),c=gd(l),u=uc(s.children,c);r.children=[...l,...u]}else o.type==="directory"&&o.children&&(r.children=Br(o.children,new Map,"added",i))}else r.status=n,o.type==="directory"&&o.children?.length&&(r.children=Br(o.children,new Map,n,i));return r.type==="directory"&&dc(r),r})}function dc(t){if(t.type!=="directory"||!t.children?.length)return;for(const n of t.children)n.type==="directory"&&dc(n);if(t.status==="added"||t.status==="deleted")return;const e=t.children.some(n=>n.status==="added"||n.status==="deleted"||n.status==="modified");t.status=e?"modified":"unchanged"}function Vf(t){const e=[...t].sort((n,i)=>n.type!==i.type?n.type==="directory"?-1:1:n.name.localeCompare(i.name));for(const n of e)n.type==="directory"&&n.children?.length&&(n.children=Vf(n.children));return e}function _1(t,e,n){const i=new Map,o=new Map;rs(e,i),rs(t,o);const r=Br(t,i,"added",n),s=uc(e,o),a=[...r,...s],l=n?.skipSort?a:Vf(a);for(const c of l)c.type==="directory"&&dc(c);return l}const rz=Object.freeze(Object.defineProperty({__proto__:null,NodeStatus:Nf,NodeType:Uf,mergeAndMarkTree:_1},Symbol.toStringTag,{value:"Module"})),y1=(t,e)=>{const n=Array.isArray(e)?e:[e];let i;return I_(t)?i="string":M_(t)?i="number":D_(t)?i="boolean":F_(t)?i="array":L_(t)?i="function":j_(t)?i="symbol":N_(t)?i="null":U_(t)?i="undefined":z_(t)?i="object":i="undefined",n.includes(i)},sz=Object.freeze(Object.defineProperty({__proto__:null,isType:y1},Symbol.toStringTag,{value:"Module"})),_d=/^[\^~>=<]+/,Bf=/^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9.]+))?(?:\+([a-zA-Z0-9.]+))?$/;function b1(t){return Bf.test(t)}function Dn(t){if(!t||typeof t!="string")throw new Error(`Invalid version string: ${t}`);const e=t.match(_d),n=e?e[0]:"",i=t.replace(_d,"").match(Bf);if(!i)throw new Error(`Invalid semver format: ${t}`);const[,o="0",r="0",s="0",a]=i,l=parseInt(o,10),c=parseInt(r,10),u=parseInt(s,10);return{raw:t,prefix:n,major:l,minor:c,patch:u,prerelease:a||null,majorVersion:o,version:`${l}.${c}.${u}`}}function w1(t,e){const n=Dn(t),i=Dn(e);return n.major===i.major&&n.minor===i.minor&&n.patch===i.patch}function E1(t){return Dn(t).majorVersion}function C1(t){const e={};for(const[n,i]of Object.entries(t))try{e[n]=Dn(i)}catch(o){console.warn(`Failed to parse version for ${n}: ${i}`,o)}return e}function Vi(t,e){const n=Dn(t),i=Dn(e),{VERSION_COMPARE_SAME:o,VERSION_COMPARE_LESS:r,VERSION_COMPARE_GREATER:s}=bt;return n.major!==i.major?n.major>i.major?s:r:n.minor!==i.minor?n.minor>i.minor?s:r:n.patch!==i.patch?n.patch>i.patch?s:r:o}function S1(t,e){const n=Dn(t),i=Dn(e);switch(i.prefix){case"^":return n.major===i.major;case"~":return n.major===i.major&&n.minor===i.minor;case">=":return Vi(t,e.replace(">=",""))>=0;case">":return Vi(t,e.replace(">",""))>0;case"<=":return Vi(t,e.replace("<=",""))<=0;case"<":return Vi(t,e.replace("<",""))<0;case"=":case"":return Vi(t,e.replace("=",""))===0;default:return!1}}function x1(t){if(!t||typeof t!="string")throw new Error("版本号必须是非空字符串");const e=Dn(t),n=(a,l)=>{if(a<0||a>999)throw new Error(`版本号${l}位必须在 0-999 之间,当前值:${a}(原始输入:${t})`);return a},i=n(e.major,"主版本"),o=n(e.minor,"次版本"),r=n(e.patch,"补丁版本"),s=i*1e6+o*1e3+r;if(!Number.isSafeInteger(s))throw new Error(`版本号转换后超出 JavaScript 安全整数范围,结果:${s}(原始输入:${t})`);return s}const az=Object.freeze(Object.defineProperty({__proto__:null,compareVersions:Vi,getMajorVersion:E1,isVersionEqual:w1,parseDependencies:C1,parseVersion:Dn,satisfiesRange:S1,validateVersion:b1,versionToNumber:x1},Symbol.toStringTag,{value:"Module"})),T1={};function O1(t,e){return y(),ne(Up,{name:"transition-fade",mode:"out-in",appear:""},{default:we(()=>[Ve(t.$slots,"default")]),_:3})}const $1=rc(T1,[["render",O1]]),k1={key:0,class:"fixed top-0 left-0 w-screen bg-[rgb(94,9,11)] text-white font-sans z-[99999] break-all overflow-auto max-h-[50vh] p-[10px] box-border"},A1={class:"clear-both"},P1={class:"whitespace-pre-wrap m-0"},R1={key:0},I1={class:"whitespace-pre-wrap m-0"},M1=Ce({__name:"ErrorOverlay",props:{errors:{}},setup(t){const e=H(!1),n=t,i=()=>{e.value=!1};return Oe(()=>n.errors,o=>{e.value=o.length>0},{immediate:!0,deep:!0}),(o,r)=>e.value?(y(),T("div",k1,[g("button",{class:"sticky top-[10px] right-[10px] float-right bg-white/20 border-none text-white text-lg cursor-pointer w-[30px] h-[30px] rounded-full flex items-center justify-center p-0 ml-[10px] transition-colors duration-200 hover:bg-white/30",onClick:i}," × "),g("div",A1,[(y(!0),T(Ie,null,He(t.errors,(s,a)=>(y(),T("div",{key:a,class:"mb-5"},[g("pre",P1,L(s?.message||s),1),s?.stack?(y(),T("div",R1,[g("pre",I1,L(s.stack),1)])):ue("",!0)]))),128))])])):ue("",!0)}}),D1=Ce({__name:"index",props:zp({config:{}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const{t:e}=Ko(),n=t,i=te(()=>{const u={};return n.config?.column?.forEach(d=>{u[d.prop]=d.value}),u}),o=Zl(t,"modelValue"),r=ec();async function s(){r?.onRefresh?.()}async function a(){n.config?.column?.forEach(u=>{u.value=""}),await Ge(),r?.onReset?.()}function l(u){return u??!0}function c(){r?.onSearch?.()}return Nt(()=>{o.value=i.value}),(u,d)=>{const h=ze("Icon");return y(),ne(m(el),{inline:!0,onSubmit:d[3]||(d[3]=Ye(()=>{},["prevent"])),onKeyup:d[4]||(d[4]=ho(v=>c(),["enter"]))},{default:we(()=>[(y(!0),T(Ie,null,He(t.config?.column||[],(v,f)=>(y(),ne(m($u),{key:f,label:m(v.label)??""},{default:we(()=>[l(v.useVModel)?(y(),ne(Ot(v.component),We({key:1,modelValue:v.value,"onUpdate:modelValue":p=>v.value=p},{ref_for:!0},v?.attributes||{},bn(v?.events||{})),null,16,["modelValue","onUpdate:modelValue"])):(y(),ne(Ot(v.component),We({key:0,"model-value":v.value},{ref_for:!0},v?.attributes||{},bn(v?.events||{})),null,16,["model-value"]))]),_:2},1032,["label"]))),128)),t.config?.column?.length?(y(),ne(m($u),{key:0},{default:we(()=>[j(m(Gi),{type:"success",onClick:d[0]||(d[0]=v=>c())},{default:we(()=>[Ke(L(m(e)("common.search")),1)]),_:1}),j(m(Gi),{type:"primary",onClick:d[1]||(d[1]=v=>a())},{default:we(()=>[Ke(L(m(e)("common.reset")),1)]),_:1}),j(m(Gi),{onClick:d[2]||(d[2]=v=>s())},{default:we(()=>[j(h,{icon:"material-symbols:refresh-rounded"})]),_:1})]),_:1})):ue("",!0)]),_:1})}}}),F1={key:0},L1={ref:"tableContainer",class:"flex-1 overflow-hidden"},j1={key:1,class:"mt-2"},N1=Ce({__name:"index",props:{tableConfig:{}},setup(t,{expose:e}){const n=ec(),i=t,o=In("tableContainer"),r=In("table"),{height:s}=ic(o),a=h_(),l=te(()=>{if(i.tableConfig?.pagination?.getPageSize||i.tableConfig?.pagination?.setPageSize)return{get:i.tableConfig.pagination.getPageSize,set:i.tableConfig.pagination.setPageSize};const I=U1().paginationStorage;return I?{get:()=>{const A=I.get();return A?Number(A):10},set:A=>I.set(String(A))}:null}),c=H(l.value?.get?.()??10),u=H(!1),d=H(1),h=H(D()),v=H("UNKNOWN"),f=te(()=>Object.keys(a)),p=te(()=>i.tableConfig.size??"default"),_=te(()=>i.tableConfig?.fixedHeight??!0),C=te(()=>_.value?Math.max(s.value,100):"auto"),w=te(()=>i.tableConfig?.autoLoading??!0),E=te(()=>({"--pagination-location":i.tableConfig?.pagination?.location||"center"})),b=te(()=>i.tableConfig?.isPagination??!0),S=te(()=>i.tableConfig?.paginationMap?i.tableConfig.paginationMap:{page:"page",pageSize:"pageSize"}),x=te(()=>({[S.value.page]:d.value,[S.value.pageSize]:c.value})),k=te(()=>({background:!0,pageSizes:[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",...i.tableConfig?.pagination?.attributes,total:i.tableConfig?.pagination?.total||0,pageSize:c.value,currentPage:d.value})),O=te(()=>({...x.value,...h.value})),K=te(()=>i.tableConfig?.search?.column.filter(I=>I.autoQuery??!0).map(I=>I.prop));function D(){const I={};return i.tableConfig?.search?.column?.forEach(A=>{I[A.prop]=A.value}),I}async function P(){v.value!=="NOT_CHANGE"&&(w.value&&(u.value=!0),i.tableConfig?.fetchData?.(O.value)?.finally(()=>{v.value="NOT_CHANGE",u.value=!1}))}async function U(){await P()}async function M(){v.value="UNKNOWN",await P()}async function q(){d.value=1,v.value!=="AUTO_QUERY"&&await P()}async function le(I){d.value=1,c.value=I}async function de(I){d.value=I}function Y(){v.value="UNKNOWN",P()}return Oe(()=>JSON.stringify(h.value),(I,A)=>{v.value="UNKNOWN";const Q=JSON.parse(I??"{}"),z=JSON.parse(A??"{}"),ie=Object.keys(Q),ve=Object.keys(z);let re=[];ie.length===ve.length?re=Object.keys(Q).filter(ge=>Q[ge]!==z[ge]):re=q_(ie,ve),K.value?.length&&W_(re,[...K.value]).length&&(v.value="AUTO_QUERY",P())}),Oe(()=>JSON.stringify(x.value),()=>{v.value="UNKNOWN",P()}),Nt(()=>{l.value?.set?.(c.value)}),et(()=>{P()}),e({getTableRef:()=>r.value,forceRefreshData:Y}),(I,A)=>{const Q=Hp;return it((y(),T("div",{class:"w-full h-full flex flex-col overflow-hidden",style:At(E.value)},[t.tableConfig.search?(y(),T("div",F1,[Ve(I.$slots,"search",{},()=>[j(D1,{modelValue:h.value,"onUpdate:modelValue":A[0]||(A[0]=z=>h.value=z),config:t.tableConfig.search,size:p.value,onSearch:U,onRefresh:M,onReset:q},null,8,["modelValue","config","size"])],!0)])):ue("",!0),Ve(I.$slots,"tableBefore",{},void 0,!0),g("div",L1,[Ve(I.$slots,"table",{},()=>[j(m(B_),We({ref:"table",size:p.value,data:t.tableConfig.data,height:C.value},m(n)),p_({default:we(()=>[(y(!0),T(Ie,null,He(t.tableConfig.column,(z,ie)=>(y(),T(Ie,null,[z.slot?Ve(I.$slots,z.slot,{key:0,col:z,index:ie},void 0,!0):(y(),ne(m(V_),We({key:`default-${ie}`},{ref_for:!0},z),null,16))],64))),256))]),_:2},[He(f.value,z=>({name:z,fn:we(ie=>[Ve(I.$slots,z,wn(Jn(ie)),void 0,!0)])}))]),1040,["size","data","height"])],!0)],512),b.value?(y(),T("div",j1,[Ve(I.$slots,"pagination",{},()=>[j(m(H_),We({size:p.value},k.value,{onSizeChange:le,onCurrentChange:de},bn(t.tableConfig?.pagination?.events||{})),null,16,["size"])],!0)])):ue("",!0)],4)),[[Q,u.value]])}}}),yd=rc(N1,[["__scopeId","data-v-f1bc3c2f"]]);let ll={};const U1=()=>ll,z1={...yd,install(t,e){e&&(ll={...ll,...e}),t.component("BaseTable",yd)}},V1={class:"overflow-hidden size-full"},B1=Ce({__name:"Main",setup(t){const e=Qo(),n=new Map,i=te(()=>e.visitedViews.map(s=>o(s)));function o(s){const{path:a}=s,{[bt.ROUTE_STATE_KEY_VERSION]:l}=s.query;return l?`${a}?${bt.ROUTE_STATE_KEY_VERSION}=${l}`:a}function r(s,a){const l=o(a);if(!n.has(l)){const c=Ce({name:l,setup(){return()=>$o(s)}});n.set(l,c)}return n.get(l)}return Oe(()=>i.value,(s,a)=>{const l=a.filter(c=>!s.includes(c));l.length&&n.delete(l[0])},{deep:!0}),(s,a)=>{const l=ze("router-view");return y(),T("div",V1,[j(l,null,{default:we(({Component:c,route:u})=>[j(m($1),null,{default:we(()=>[(y(),ne(f_,{include:i.value},[(y(),ne(Ot(r(c,u))))],1032,["include"]))]),_:2},1024)]),_:1})])}}});var ia,bd;function H1(){if(bd)return ia;bd=1;function t(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function e(o,r){for(var s="",a=0,l=-1,c=0,u,d=0;d<=o.length;++d){if(d<o.length)u=o.charCodeAt(d);else{if(u===47)break;u=47}if(u===47){if(!(l===d-1||c===1))if(l!==d-1&&c===2){if(s.length<2||a!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var h=s.lastIndexOf("/");if(h!==s.length-1){h===-1?(s="",a=0):(s=s.slice(0,h),a=s.length-1-s.lastIndexOf("/")),l=d,c=0;continue}}else if(s.length===2||s.length===1){s="",a=0,l=d,c=0;continue}}r&&(s.length>0?s+="/..":s="..",a=2)}else s.length>0?s+="/"+o.slice(l+1,d):s=o.slice(l+1,d),a=d-l-1;l=d,c=0}else u===46&&c!==-1?++c:c=-1}return s}function n(o,r){var s=r.dir||r.root,a=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+a:s+o+a:a}var i={resolve:function(){for(var r="",s=!1,a,l=arguments.length-1;l>=-1&&!s;l--){var c;l>=0?c=arguments[l]:(a===void 0&&(a=process.cwd()),c=a),t(c),c.length!==0&&(r=c+"/"+r,s=c.charCodeAt(0)===47)}return r=e(r,!s),s?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(r){if(t(r),r.length===0)return".";var s=r.charCodeAt(0)===47,a=r.charCodeAt(r.length-1)===47;return r=e(r,!s),r.length===0&&!s&&(r="."),r.length>0&&a&&(r+="/"),s?"/"+r:r},isAbsolute:function(r){return t(r),r.length>0&&r.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var r,s=0;s<arguments.length;++s){var a=arguments[s];t(a),a.length>0&&(r===void 0?r=a:r+="/"+a)}return r===void 0?".":i.normalize(r)},relative:function(r,s){if(t(r),t(s),r===s||(r=i.resolve(r),s=i.resolve(s),r===s))return"";for(var a=1;a<r.length&&r.charCodeAt(a)===47;++a);for(var l=r.length,c=l-a,u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var d=s.length,h=d-u,v=c<h?c:h,f=-1,p=0;p<=v;++p){if(p===v){if(h>v){if(s.charCodeAt(u+p)===47)return s.slice(u+p+1);if(p===0)return s.slice(u+p)}else c>v&&(r.charCodeAt(a+p)===47?f=p:p===0&&(f=0));break}var _=r.charCodeAt(a+p),C=s.charCodeAt(u+p);if(_!==C)break;_===47&&(f=p)}var w="";for(p=a+f+1;p<=l;++p)(p===l||r.charCodeAt(p)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+s.slice(u+f):(u+=f,s.charCodeAt(u)===47&&++u,s.slice(u))},_makeLong:function(r){return r},dirname:function(r){if(t(r),r.length===0)return".";for(var s=r.charCodeAt(0),a=s===47,l=-1,c=!0,u=r.length-1;u>=1;--u)if(s=r.charCodeAt(u),s===47){if(!c){l=u;break}}else c=!1;return l===-1?a?"/":".":a&&l===1?"//":r.slice(0,l)},basename:function(r,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');t(r);var a=0,l=-1,c=!0,u;if(s!==void 0&&s.length>0&&s.length<=r.length){if(s.length===r.length&&s===r)return"";var d=s.length-1,h=-1;for(u=r.length-1;u>=0;--u){var v=r.charCodeAt(u);if(v===47){if(!c){a=u+1;break}}else h===-1&&(c=!1,h=u+1),d>=0&&(v===s.charCodeAt(d)?--d===-1&&(l=u):(d=-1,l=h))}return a===l?l=h:l===-1&&(l=r.length),r.slice(a,l)}else{for(u=r.length-1;u>=0;--u)if(r.charCodeAt(u)===47){if(!c){a=u+1;break}}else l===-1&&(c=!1,l=u+1);return l===-1?"":r.slice(a,l)}},extname:function(r){t(r);for(var s=-1,a=0,l=-1,c=!0,u=0,d=r.length-1;d>=0;--d){var h=r.charCodeAt(d);if(h===47){if(!c){a=d+1;break}continue}l===-1&&(c=!1,l=d+1),h===46?s===-1?s=d:u!==1&&(u=1):s!==-1&&(u=-1)}return s===-1||l===-1||u===0||u===1&&s===l-1&&s===a+1?"":r.slice(s,l)},format:function(r){if(r===null||typeof r!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof r);return n("/",r)},parse:function(r){t(r);var s={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return s;var a=r.charCodeAt(0),l=a===47,c;l?(s.root="/",c=1):c=0;for(var u=-1,d=0,h=-1,v=!0,f=r.length-1,p=0;f>=c;--f){if(a=r.charCodeAt(f),a===47){if(!v){d=f+1;break}continue}h===-1&&(v=!1,h=f+1),a===46?u===-1?u=f:p!==1&&(p=1):u!==-1&&(p=-1)}return u===-1||h===-1||p===0||p===1&&u===h-1&&u===d+1?h!==-1&&(d===0&&l?s.base=s.name=r.slice(1,h):s.base=s.name=r.slice(d,h)):(d===0&&l?(s.name=r.slice(1,u),s.base=r.slice(1,h)):(s.name=r.slice(d,u),s.base=r.slice(d,h)),s.ext=r.slice(u,h)),d>0?s.dir=r.slice(0,d-1):l&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,ia=i,ia}var q1=H1();const W1=Fi(q1);function hc(){const{t}=Ko();return{getTitle:n=>n?n.includes(".")&&!n.startsWith("http")?t(n):n:""}}const K1={class:"truncate"},Y1=Ce({__name:"MenuItem",props:{route:{},fullPath:{}},setup(t){const{getTitle:e}=hc(),n=_s(),i=t;function o(){n.push({path:i.fullPath})}return(r,s)=>{const a=Ao,l=K_;return y(),T("span",{onClick:o},[j(l,{index:t.fullPath},{title:we(()=>[g("span",K1,L(m(e)(t.route.meta?.title)),1)]),default:we(()=>[j(a,null,{default:we(()=>[(y(),ne(Ot(t.route.meta?.icon)))]),_:1})]),_:1},8,["index"])])}}});function Hf(t,e){return function(){return t.apply(e,arguments)}}const{toString:G1}=Object.prototype,{getPrototypeOf:xs}=Object,{iterator:Ts,toStringTag:qf}=Symbol,Os=(t=>e=>{const n=G1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=t=>(t=t.toLowerCase(),e=>Os(e)===t),$s=t=>e=>typeof e===t,{isArray:po}=Array,to=$s("undefined");function Xo(t){return t!==null&&!to(t)&&t.constructor!==null&&!to(t.constructor)&&Ht(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Wf=Cn("ArrayBuffer");function Q1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Wf(t.buffer),e}const X1=$s("string"),Ht=$s("function"),Kf=$s("number"),Jo=t=>t!==null&&typeof t=="object",J1=t=>t===!0||t===!1,Hr=t=>{if(Os(t)!=="object")return!1;const e=xs(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(qf in t)&&!(Ts in t)},Z1=t=>{if(!Jo(t)||Xo(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},eE=Cn("Date"),tE=Cn("File"),nE=t=>!!(t&&typeof t.uri<"u"),iE=t=>t&&typeof t.getParts<"u",oE=Cn("Blob"),rE=Cn("FileList"),sE=t=>Jo(t)&&Ht(t.pipe);function aE(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const wd=aE(),Ed=typeof wd.FormData<"u"?wd.FormData:void 0,lE=t=>{if(!t)return!1;if(Ed&&t instanceof Ed)return!0;const e=xs(t);if(!e||e===Object.prototype||!Ht(t.append))return!1;const n=Os(t);return n==="formdata"||n==="object"&&Ht(t.toString)&&t.toString()==="[object FormData]"},cE=Cn("URLSearchParams"),[uE,dE,hE,pE]=["ReadableStream","Request","Response","Headers"].map(Cn),fE=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zo(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,o;if(typeof t!="object"&&(t=[t]),po(t))for(i=0,o=t.length;i<o;i++)e.call(null,t[i],i,t);else{if(Xo(t))return;const r=n?Object.getOwnPropertyNames(t):Object.keys(t),s=r.length;let a;for(i=0;i<s;i++)a=r[i],e.call(null,t[a],a,t)}}function Yf(t,e){if(Xo(t))return null;e=e.toLowerCase();const n=Object.keys(t);let i=n.length,o;for(;i-- >0;)if(o=n[i],e===o.toLowerCase())return o;return null}const Oi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gf=t=>!to(t)&&t!==Oi;function cl(){const{caseless:t,skipUndefined:e}=Gf(this)&&this||{},n={},i=(o,r)=>{if(r==="__proto__"||r==="constructor"||r==="prototype")return;const s=t&&Yf(n,r)||r;Hr(n[s])&&Hr(o)?n[s]=cl(n[s],o):Hr(o)?n[s]=cl({},o):po(o)?n[s]=o.slice():(!e||!to(o))&&(n[s]=o)};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Zo(arguments[o],i);return n}const mE=(t,e,n,{allOwnKeys:i}={})=>(Zo(e,(o,r)=>{n&&Ht(o)?Object.defineProperty(t,r,{value:Hf(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),t),vE=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),gE=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},_E=(t,e,n,i)=>{let o,r,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),r=o.length;r-- >0;)s=o[r],(!i||i(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&xs(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},yE=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},bE=t=>{if(!t)return null;if(po(t))return t;let e=t.length;if(!Kf(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},wE=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&xs(Uint8Array)),EE=(t,e)=>{const i=(t&&t[Ts]).call(t);let o;for(;(o=i.next())&&!o.done;){const r=o.value;e.call(t,r[0],r[1])}},CE=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},SE=Cn("HTMLFormElement"),xE=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),Cd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),TE=Cn("RegExp"),Qf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Zo(n,(o,r)=>{let s;(s=e(o,r,t))!==!1&&(i[r]=s||o)}),Object.defineProperties(t,i)},OE=t=>{Qf(t,(e,n)=>{if(Ht(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Ht(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$E=(t,e)=>{const n={},i=o=>{o.forEach(r=>{n[r]=!0})};return po(t)?i(t):i(String(t).split(e)),n},kE=()=>{},AE=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PE(t){return!!(t&&Ht(t.append)&&t[qf]==="FormData"&&t[Ts])}const RE=t=>{const e=new Array(10),n=(i,o)=>{if(Jo(i)){if(e.indexOf(i)>=0)return;if(Xo(i))return i;if(!("toJSON"in i)){e[o]=i;const r=po(i)?[]:{};return Zo(i,(s,a)=>{const l=n(s,o+1);!to(l)&&(r[a]=l)}),e[o]=void 0,r}}return i};return n(t,0)},IE=Cn("AsyncFunction"),ME=t=>t&&(Jo(t)||Ht(t))&&Ht(t.then)&&Ht(t.catch),Xf=((t,e)=>t?setImmediate:e?((n,i)=>(Oi.addEventListener("message",({source:o,data:r})=>{o===Oi&&r===n&&i.length&&i.shift()()},!1),o=>{i.push(o),Oi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ht(Oi.postMessage)),DE=typeof queueMicrotask<"u"?queueMicrotask.bind(Oi):typeof process<"u"&&process.nextTick||Xf,FE=t=>t!=null&&Ht(t[Ts]),W={isArray:po,isArrayBuffer:Wf,isBuffer:Xo,isFormData:lE,isArrayBufferView:Q1,isString:X1,isNumber:Kf,isBoolean:J1,isObject:Jo,isPlainObject:Hr,isEmptyObject:Z1,isReadableStream:uE,isRequest:dE,isResponse:hE,isHeaders:pE,isUndefined:to,isDate:eE,isFile:tE,isReactNativeBlob:nE,isReactNative:iE,isBlob:oE,isRegExp:TE,isFunction:Ht,isStream:sE,isURLSearchParams:cE,isTypedArray:wE,isFileList:rE,forEach:Zo,merge:cl,extend:mE,trim:fE,stripBOM:vE,inherits:gE,toFlatObject:_E,kindOf:Os,kindOfTest:Cn,endsWith:yE,toArray:bE,forEachEntry:EE,matchAll:CE,isHTMLForm:SE,hasOwnProperty:Cd,hasOwnProp:Cd,reduceDescriptors:Qf,freezeMethods:OE,toObjectSet:$E,toCamelCase:xE,noop:kE,toFiniteNumber:AE,findKey:Yf,global:Oi,isContextDefined:Gf,isSpecCompliantForm:PE,toJSONObject:RE,isAsyncFn:IE,isThenable:ME,setImmediate:Xf,asap:DE,isIterable:FE};let Fe=class Jf extends Error{static from(e,n,i,o,r,s){const a=new Jf(e.message,n||e.code,i,o,r);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,n,i,o,r){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),i&&(this.config=i),o&&(this.request=o),r&&(this.response=r,this.status=r.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:W.toJSONObject(this.config),code:this.code,status:this.status}}};Fe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Fe.ERR_BAD_OPTION="ERR_BAD_OPTION";Fe.ECONNABORTED="ECONNABORTED";Fe.ETIMEDOUT="ETIMEDOUT";Fe.ERR_NETWORK="ERR_NETWORK";Fe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Fe.ERR_DEPRECATED="ERR_DEPRECATED";Fe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Fe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Fe.ERR_CANCELED="ERR_CANCELED";Fe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Fe.ERR_INVALID_URL="ERR_INVALID_URL";Fe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LE=null;function ul(t){return W.isPlainObject(t)||W.isArray(t)}function Zf(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function oa(t,e,n){return t?t.concat(e).map(function(o,r){return o=Zf(o),!n&&r?"["+o+"]":o}).join(n?".":""):e}function jE(t){return W.isArray(t)&&!t.some(ul)}const NE=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function ks(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,C){return!W.isUndefined(C[_])});const i=n.metaTokens,o=n.visitor||d,r=n.dots,s=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=a&&W.isSpecCompliantForm(e);if(!W.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(W.isDate(p))return p.toISOString();if(W.isBoolean(p))return p.toString();if(!c&&W.isBlob(p))throw new Fe("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(p)||W.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,_,C){let w=p;if(W.isReactNative(e)&&W.isReactNativeBlob(p))return e.append(oa(C,_,r),u(p)),!1;if(p&&!C&&typeof p=="object"){if(W.endsWith(_,"{}"))_=i?_:_.slice(0,-2),p=JSON.stringify(p);else if(W.isArray(p)&&jE(p)||(W.isFileList(p)||W.endsWith(_,"[]"))&&(w=W.toArray(p)))return _=Zf(_),w.forEach(function(b,S){!(W.isUndefined(b)||b===null)&&e.append(s===!0?oa([_],S,r):s===null?_:_+"[]",u(b))}),!1}return ul(p)?!0:(e.append(oa(C,_,r),u(p)),!1)}const h=[],v=Object.assign(NE,{defaultVisitor:d,convertValue:u,isVisitable:ul});function f(p,_,C=0){if(!W.isUndefined(p)){if(C>l)throw new Fe("Object is too deeply nested ("+C+" levels). Max depth: "+l,Fe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+_.join("."));h.push(p),W.forEach(p,function(E,b){(!(W.isUndefined(E)||E===null)&&o.call(e,E,W.isString(b)?b.trim():b,_,v))===!0&&f(E,_?_.concat(b):[b],C+1)}),h.pop()}}if(!W.isObject(t))throw new TypeError("data must be an object");return f(t),e}function Sd(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(i){return e[i]})}function pc(t,e){this._pairs=[],t&&ks(t,this,e)}const em=pc.prototype;em.append=function(e,n){this._pairs.push([e,n])};em.toString=function(e){const n=e?function(i){return e.call(this,i,Sd)}:Sd;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function UE(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tm(t,e,n){if(!e)return t;const i=n&&n.encode||UE,o=W.isFunction(n)?{serialize:n}:n,r=o&&o.serialize;let s;if(r?s=r(e,o):s=W.isURLSearchParams(e)?e.toString():new pc(e,o).toString(i),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class xd{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,function(i){i!==null&&e(i)})}}const fc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},zE=typeof URLSearchParams<"u"?URLSearchParams:pc,VE=typeof FormData<"u"?FormData:null,BE=typeof Blob<"u"?Blob:null,HE={isBrowser:!0,classes:{URLSearchParams:zE,FormData:VE,Blob:BE},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",dl=typeof navigator=="object"&&navigator||void 0,qE=mc&&(!dl||["ReactNative","NativeScript","NS"].indexOf(dl.product)<0),WE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",KE=mc&&window.location.href||"http://localhost",YE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:qE,hasStandardBrowserWebWorkerEnv:WE,navigator:dl,origin:KE},Symbol.toStringTag,{value:"Module"})),kt={...YE,...HE};function GE(t,e){return ks(t,new kt.classes.URLSearchParams,{visitor:function(n,i,o,r){return kt.isNode&&W.isBuffer(n)?(this.append(i,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}function QE(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function XE(t){const e={},n=Object.keys(t);let i;const o=n.length;let r;for(i=0;i<o;i++)r=n[i],e[r]=t[r];return e}function nm(t){function e(n,i,o,r){let s=n[r++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=r>=n.length;return s=!s&&W.isArray(o)?o.length:s,l?(W.hasOwnProp(o,s)?o[s]=W.isArray(o[s])?o[s].concat(i):[o[s],i]:o[s]=i,!a):((!o[s]||!W.isObject(o[s]))&&(o[s]=[]),e(n,i,o[s],r)&&W.isArray(o[s])&&(o[s]=XE(o[s])),!a)}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,(i,o)=>{e(QE(i),o,n,0)}),n}return null}const ji=(t,e)=>t!=null&&W.hasOwnProp(t,e)?t[e]:void 0;function JE(t,e,n){if(W.isString(t))try{return(e||JSON.parse)(t),W.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const er={transitional:fc,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",o=i.indexOf("application/json")>-1,r=W.isObject(e);if(r&&W.isHTMLForm(e)&&(e=new FormData(e)),W.isFormData(e))return o?JSON.stringify(nm(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e)||W.isReadableStream(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(r){const l=ji(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return GE(e,l).toString();if((a=W.isFileList(e))||i.indexOf("multipart/form-data")>-1){const c=ji(this,"env"),u=c&&c.FormData;return ks(a?{"files[]":e}:e,u&&new u,l)}}return r||o?(n.setContentType("application/json",!1),JE(e)):e}],transformResponse:[function(e){const n=ji(this,"transitional")||er.transitional,i=n&&n.forcedJSONParsing,o=ji(this,"responseType"),r=o==="json";if(W.isResponse(e)||W.isReadableStream(e))return e;if(e&&W.isString(e)&&(i&&!o||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e,ji(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?Fe.from(l,Fe.ERR_BAD_RESPONSE,this,null,ji(this,"response")):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],t=>{er.headers[t]={}});const ZE=W.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"]),eC=t=>{const e={};let n,i,o;return t&&t.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-PeLBbpUx.js","./vendor-ui-Lm7VJSSH.js","./vendor-core-BHu_Iam8.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-Brp0esZx.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-vaWJXLBi.js","./BaseDialog.vue_vue_type_script_setup_true_lang-BCEeHWp0.js","./el-dropdown-item-BeIfAqTO.css","./el-card-BAyktVMS.css","./index-qAhDQceU.js","./index.vue_vue_type_script_setup_true_lang-DjS3Q9-g.js","./useCacheOssStore-BUYcRp33.js","./index-DOlF0Z_P.css","./index.vue_vue_type_script_setup_true_lang-t5Qr3Cck.js","./index-CCE8UKEc.js","./index-B78Rw6nE.css","./useVscodeOpen-W9IOZ_u_.js","./index-CWZwdzIK.js","./index-8dCw6Y2Z.css","./el-link-CPQZ-olG.css","./index-CN4epH6N.js","./md5-BVscxO09.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CSa_pS0b.js","./CanvasAnimation.vue_vue_type_script_setup_true_lang-I_B9sBtb.js","./index-CNqahi2L.css","./index-Mryq8zw5.js","./core-YKf42450.js","./index-Dt73qBZB.css","./el-empty-S7fQQ3B8.css","./index-M80Ed-Pb.js","./index.vue_vue_type_style_index_0_lang-B-Okzh4k.js","./index-Dj51p5I8.css","./index-CYvMpsAk.js","./index-BXjslBXB.js","./index.vue_vue_type_script_setup_true_lang-BfK34NCv.js","./useMessage-DGNISOif.js","./index-CdGhZYup.js","./useCompMetaLocalStore-ke8aERqo.js","./index.vue_vue_type_script_setup_true_lang-RkEocesH.js","./index-BmnVYsjU.js","./el-table-column-B36K2Har.js","./el-table-column-B3ZEEuPD.css","./index.vue_vue_type_style_index_0_lang-BCmjNfvt.js","./vendor-xterm-DbWxaMay.js","./index-Bn5vi5XZ.css","./index.vue_vue_type_script_setup_true_lang-m8-lu9dQ.js","./index.vue_vue_type_script_setup_true_lang-XpLtazGO.js","./useTeamHeaders-CXV6avPM.js","./index.vue_vue_type_script_setup_true_lang-DtekInbn.js","./index-FFTkVbVX.css","./PanelBackground.vue_vue_type_script_setup_true_lang-Dp5z6Iw1.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-B9sbaztP.js","./index-D-zBzPPy.css","./home-rounded--9AAXiZb.js","./home-rounded-B4KVwSYb.css","./index-D2HIFwH2.js","./useKeyword-BWlKaVGC.js","./supervised-user-circle-BzCVjgAw.js","./supervised-user-circle-CZYpyCV4.css","./index-BV4gqPW9.js","./index.vue_vue_type_style_index_0_lang-CTWQlkPh.js","./useCompEditStore-CCV6awON.js","./v4-EwEgHOG0.js","./useCompEditStore-CxnuC31d.css","./index-CdWXO9ks.css","./kid-star-DWSbAoDk.js","./kid-star-D1M-aC1C.css","./index-C-elMysi.js","./sync-saved-locally-rounded-Dm232VG8.js","./sync-saved-locally-rounded-wbwASI26.css","./index-EHIrsqSu.js","./cloud-upload-DRSmr6Qo.js","./cloud-upload-j3Y0taC9.css","./index-Dl_h7vrN.js","./index-BW8vDkye.js","./moment-B-YVwB4U.js","./index-VFwGpUE-.css","./index-DpHwEP_B.js","./terminal-Cpm-3gfc.js","./terminal-DFt3N_TH.css","./index-DW1TR3IW.js","./settings-DyQPsIIk.js","./settings-BhagQj3w.css","./index-CYRE55Ch.js","./index-CRFJskzu.css","./index-CJu9086M.js","./index-DxyEzkir.css","./index-CfYP0TVV.js"])))=>i.map(i=>d[i]);
2
+ import{aA as Ko,g as te,v as Ce,aj as ze,ab as y,j as ne,aO as we,r as j,ax as m,w as vi,au as Xa,ad as Mt,av as Tu,B as $o,ao as Yo,aF as In,aM as Oe,l as T,ai as Ve,i as g,F as Ie,ah as He,q as Ke,ap as L,af as H,a7 as et,a9 as Ct,Y as Ge,b as Up,k as ue,aB as Zl,ay as ec,aN as Nt,al as Ot,X as We,ar as bn,aQ as ho,aR as Ye,W as zp,aE as h_,aP as it,$ as At,p as p_,_ as wn,A as Jn,K as f_,aD as _s,m as m_,n as v_,aC as tc,c as g_,Z as Ae,Q as ys,S as __,u as qn,o as y_,s as b_,h as nc,at as $t,U as zi,V as Gn,y as Ja,a1 as w_,a4 as bs,aa as Vp,H as ko,ak as E_,ac as Bp,z as C_,a8 as S_,aK as En,T as ws,aJ as Go,aG as Es,aI as Za,aH as ea,t as x_}from"./vendor-core-BHu_Iam8.js";import{ai as T_,aD as O_,m as $_,aH as Ji,aE as ic,ag as k_,ah as Ou,ao as A_,ar as P_,aA as R_,aw as I_,au as M_,aq as D_,ap as F_,as as L_,ax as j_,at as N_,ay as U_,av as z_,y as $u,e as Gi,x as el,aJ as Hp,a2 as V_,a1 as B_,M as H_,aK as q_,an as W_,am as Fi,I as K_,z as Ao,K as Y_,$ as G_,H as Q_,N as tl,B as nl,a3 as X_,_ as J_,Z as Z_,r as ey,T as ku,k as Au,A as Pu,g as Ru,a5 as Iu,b as Mu,j as Du,i as Fu,R as Lu,Q as ju,P as Nu,q as Uu,h as zu,W as Vu,a7 as Bu,a9 as Hu,Y as qu,S as Wu,l as Ku,a0 as Yu,n as Gu,a4 as Qu,O as Xu,C as Ju,a6 as Zu,a8 as ed,G as td,ae as mr,af as Zi,ab as oc,az as Po,aj as Ro,aB as Io,J as vr,ac as ty}from"./vendor-ui-Lm7VJSSH.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();const ny="local://",iy="main",oy="container",ry="item",sy="/__global_config__",ay="/node_modules/.prebuild_module",ly="_metadata.json",cy="/_module_load_prefix_",uy="/_node_modules_load_prefix_",dy="/_comp_preview_prefix_local_",hy="/__proxy__",py="/__master__",fy="__remote__",my="__local__",vy="https://api.comphub.cn:5696",gy="http://localhost:7002",_y="http://localhost:5000",yy="http://localhost:5001",by="Comp Hub",wy="csrfToken",Ey="authorization",Cy="x-refresh-token",Sy="x-csrf-token",xy="accept-language",Ty="comp-hub-db",Oy="file-compiled",$y="https://oss.comphub.cn",ky="oss:sts:token",Ay="oss:sts:expire",Py="comp.json",Ry="README.md",Iy="/.comp_hub_temp",My="main.js",Dy="index.vue",qp="list_local",Wp="list_remote",Fy={COMP_LIST_TYPE_LOCAL:qp,COMP_LIST_TYPE_REMOTE:Wp},Kp="config",Yp="error",Gp="dir",Qp="preview",Xp="extra",Jp="deps",Zp="upgradeLog",ef="readme",Ly={TAB_TYPE_CONFIG:Kp,TAB_TYPE_ERROR:Yp,TAB_TYPE_DIR:Gp,TAB_TYPE_PREVIEW:Qp,TAB_TYPE_EXTRA:Xp,TAB_TYPE_DEPS:Jp,TAB_TYPE_UPGRADE_LOG:Zp,TAB_TYPE_README:ef},tf="mini",nf="full",jy={COMP_EDIT_TAB_TYPE_MINI:tf,COMP_EDIT_TAB_TYPE_FULL:nf},of="EDIT",rf="ADD",Ny={DIALOG_TYPE_EDIT:of,DIALOG_TYPE_ADD:rf},sf="ONLY_INSTALL",af="AUTO",lf="MAJOR_VERSION",cf="MINOR_VERSION",uf="EXACT_VERSION",Uy={COMP_MATCH_TYPE_ONLY_INSTALL:sf,COMP_MATCH_TYPE_AUTO:af,COMP_MATCH_TYPE_MAJOR_VERSION:lf,COMP_MATCH_TYPE_MINOR_VERSION:cf,COMP_MATCH_TYPE_EXACT_VERSION:uf},df="online",hf="offline",zy={COMP_UPDATE_TYPE_ONLINE:df,COMP_UPDATE_TYPE_OFFLINE:hf},Vy=0,By=1,Hy=-1,pf="checkPreviewListForm",ff="checkExtraInfoForm",mf="checkCompConfig",vf="afterCompDel",gf="openCompTerminal",_f="afterCompCancelCollect",yf="afterCompRenderRetry",bf="getCompError",wf="checkUpgradeLogForm",qy={COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:pf,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:ff,COMP_METHOD_KEY_CHECK_COMP_CONFIG:mf,COMP_METHOD_KEY_AFTER_COMP_DEL:vf,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:gf,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:_f,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:yf,COMP_METHOD_KEY_GET_COMP_ERROR:bf,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:wf},Wy={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"}},Ky="http://127.0.0.1",Yy="http://localhost:8095",Gy="http://localhost:8096",Qy="http://localhost:5198",Xy="/item",Jy="/container",Zy="CREATE",eb="JOIN",tb="EXIT",nb="teamAddMyComp",ib="teamCompList",ob="teamCompGroupList",rb="teamMyCompList",sb="teamMyCompUpdate",ab="vue/dist/vue.esm-bundler.js",lb="__v__",cb="compListStore",ub="compEditStore",db="callbacks",hb="comphubConfig",pb="local",fb="prod",mb="local",vb="prod",gb="http://localhost:5173/en/",_b="https://docs.comphub.cn",yb="screenshot_mini.png",bb=20,wb=20,bt=Object.freeze(Object.defineProperty({__proto__:null,ACCEPT_LANGUAGE_HEADER_NAME:xy,AUTHORIZATION_HEADER_NAME:Ey,CACHE_KEY_STS_EXPIRE_TIME:Ay,CACHE_KEY_STS_TOKEN:ky,COMPHUB_CONFIG_KEY:hb,COMP_ACTION_ICON_HEIGHT:wb,COMP_ACTION_ICON_WIDTH:bb,COMP_CONFIG_FILENAME:Py,COMP_EDIT_TAB_TYPES:jy,COMP_EDIT_TAB_TYPE_FULL:nf,COMP_EDIT_TAB_TYPE_MINI:tf,COMP_ENTRY_FILE:My,COMP_HUB_DEV_DOCS_URL:gb,COMP_HUB_PROD_DOCS_URL:_b,COMP_LIST_TYPES:Fy,COMP_LIST_TYPE_LOCAL:qp,COMP_LIST_TYPE_REMOTE:Wp,COMP_MATCH_TYPES:Uy,COMP_MATCH_TYPE_AUTO:af,COMP_MATCH_TYPE_EXACT_VERSION:uf,COMP_MATCH_TYPE_MAJOR_VERSION:lf,COMP_MATCH_TYPE_MINOR_VERSION:cf,COMP_MATCH_TYPE_ONLY_INSTALL:sf,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:_f,COMP_METHOD_KEY_AFTER_COMP_DEL:vf,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:yf,COMP_METHOD_KEY_CHECK_COMP_CONFIG:mf,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:ff,COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:pf,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:wf,COMP_METHOD_KEY_GET_COMP_ERROR:bf,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:gf,COMP_PREVIEW_PREFIX_LOCAL:dy,COMP_README_FILENAME:Ry,COMP_SCREENSHOT_MINI_FILENAME:yb,COMP_SUBMIT_MAX_FILE_COUNT:30,COMP_SUBMIT_MAX_SINGLE_FILE_SIZE:3145728,COMP_SUBMIT_MAX_TOTAL_SIZE:10485760,COMP_TEMP_DIR:Iy,COMP_UPDATE_TYPES:zy,COMP_UPDATE_TYPE_OFFLINE:hf,COMP_UPDATE_TYPE_ONLINE:df,COMP_USE_ENTRY_FILE:Dy,CSRF_KEY:wy,CSRF_TOKEN_HEADER_NAME:Sy,DIALOG_TYPES:Ny,DIALOG_TYPE_ADD:rf,DIALOG_TYPE_EDIT:of,FILE_MANAGER_DIRNAME:ny,GLOBAL_CONFIG_PATH:sy,IFRAME_CONTAINER_WEBSITE_PATH:Jy,IFRAME_HOST:Ky,IFRAME_ITEM_WEBSITE_PATH:Xy,IFRAME_ROUTES:Wy,INDEX_DB_NAME:Ty,INDEX_DB_TABLE_NAME:Oy,LOCAL_CHILD_IFRAME_URL:Yy,LOCAL_LEAF_IFRAME_URL:Gy,LOCAL_MIDWAY_ENV_LOCAL:pb,LOCAL_MIDWAY_ENV_PROD:fb,LOCAL_SERVICE_PREFIX:my,LOCAL_SERVICE_URL_DEV:_y,LOCAL_SERVICE_URL_DEV_SUB:yy,LOCAL_TOP_IFRAME_URL:Qy,MASTER_API_PREFIX:py,META_FILE_NAME:ly,MODULE_LOAD_PREFIX:cy,NODE_MODULES_LOAD_PREFIX:uy,OSS_CUSTOM_DOMAIN:$y,PREBUILD_MODULE_DIR:ay,PROVIDE_KEYS:qy,PROVIDE_KEY_CALLBACKS:db,PROVIDE_KEY_COMP_EDIT_STORE:ub,PROVIDE_KEY_COMP_LIST_STORE:cb,PROXY_PATH_PREFIX:hy,REFRESH_TOKEN_HEADER_NAME:Cy,REMOTE_MIDWAY_ENV_LOCAL:mb,REMOTE_MIDWAY_ENV_PROD:vb,REMOTE_SERVICE_PREFIX:fy,REMOTE_SERVICE_URL_DEV:gy,REMOTE_SERVICE_URL_PROD:vy,ROUTE_STATE_KEY_VERSION:lb,SCOPE_ID_TEAM_ADD_MY_COMP:nb,SCOPE_ID_TEAM_COMP_GROUP_LIST:ob,SCOPE_ID_TEAM_COMP_LIST:ib,SCOPE_ID_TEAM_MY_COMP_LIST:rb,SCOPE_ID_TEAM_MY_COMP_UPDATE:sb,SITE_TITLE:by,TAB_TYPES:Ly,TAB_TYPE_CONFIG:Kp,TAB_TYPE_DEPS:Jp,TAB_TYPE_DIR:Gp,TAB_TYPE_ERROR:Yp,TAB_TYPE_EXTRA:Xp,TAB_TYPE_PREVIEW:Qp,TAB_TYPE_README:ef,TAB_TYPE_UPGRADE_LOG:Zp,TEAM_OPERATE_TYPE_CREATE:Zy,TEAM_OPERATE_TYPE_EXIT:tb,TEAM_OPERATE_TYPE_JOIN:eb,VERSION_COMPARE_GREATER:By,VERSION_COMPARE_LESS:Hy,VERSION_COMPARE_SAME:Vy,VUE_ESM_BUNDLER:ab,WEBSITE_PATH_CONTAINER:oy,WEBSITE_PATH_ITEM:ry,WEBSITE_PATH_MAIN:iy},Symbol.toStringTag,{value:"Module"})),Eb=[{label:"tag.systemRecommended",value:"XTTJ"},{label:"tag.all",value:"QB"},{label:"tag.latest",value:"ZX"},{label:"tag.hottest",value:"ZR"}],Cb=[".css"],Sb=[{name:"__id__",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"}],VU=Object.freeze(Object.defineProperty({__proto__:null,COMP_DEFAULT_FIELD:Sb,DEFAULT_TAG_GROUP:Eb,PREBUILD_MODULE_SKIP_EXT:Cb},Symbol.toStringTag,{value:"Module"})),xb="comp-hub-locale",Tb=Object.freeze(Object.defineProperty({__proto__:null,LOCALE_KEY:xb},Symbol.toStringTag,{value:"Module"})),Ob="send-auth-code",$b="send-auth-code-success",kb="send-auth-code-failed",Ab="login-button",Pb="login-button-success",Rb="login-button-failed",Ib="skip-login",Mb="upload-select-folder",Db="upload-confirm",Fb="upload-success",Lb="upload-failed",jb="upload-repeat-confirm",Nb="edit-panel-submit",Ub="edit-panel-submit-success",zb="edit-panel-submit-failed",Vb="edit-generate-comp-json",Bb="edit-view-diff",Hb="edit-bg-color-change",qb="edit-dep-version-change",Wb="search-component",Kb="filter-tag",Yb="page-size-change",Gb="comp-preview",Qb="comp-download",Xb="comp-download-success",Jb="comp-download-failed",Zb="comp-collect-toggle",e0="comp-delete",t0="comp-update",n0="comp-update-success",i0="comp-update-failed",o0="comp-version-change",r0="preview-open-newtab",s0="preview-tab-change",a0="user-update-avatar",l0="user-update-avatar-success",c0="user-update-avatar-failed",u0="user-update-nickname",d0="user-update-nickname-success",h0="user-update-nickname-failed",p0="user-update-email",f0="user-update-email-success",m0="user-update-email-failed",v0="user-update-password",g0="user-update-password-success",_0="user-update-password-failed",y0="user-email-login-toggle",b0="team-tab-change",w0="team-filter-group",E0="team-kick-member",C0="team-apply-accept",S0="team-apply-reject",x0="team-comp-remove",T0="team-comp-permission-change",O0="sidebar-toggle",$0="setting-apply-rule",k0="clear-cache",nd=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_CACHE:k0,COMP_COLLECT_TOGGLE:Zb,COMP_DELETE:e0,COMP_DOWNLOAD:Qb,COMP_DOWNLOAD_FAILED:Jb,COMP_DOWNLOAD_SUCCESS:Xb,COMP_PREVIEW:Gb,COMP_UPDATE:t0,COMP_UPDATE_FAILED:i0,COMP_UPDATE_SUCCESS:n0,COMP_VERSION_CHANGE:o0,EDIT_BG_COLOR_CHANGE:Hb,EDIT_DEP_VERSION_CHANGE:qb,EDIT_GENERATE_COMP_JSON:Vb,EDIT_PANEL_SUBMIT:Nb,EDIT_PANEL_SUBMIT_FAILED:zb,EDIT_PANEL_SUBMIT_SUCCESS:Ub,EDIT_VIEW_DIFF:Bb,FILTER_TAG:Kb,LOGIN_BUTTON:Ab,LOGIN_BUTTON_FAILED:Rb,LOGIN_BUTTON_SUCCESS:Pb,PAGE_SIZE_CHANGE:Yb,PREVIEW_OPEN_NEWTAB:r0,PREVIEW_TAB_CHANGE:s0,SEARCH_COMPONENT:Wb,SEND_AUTH_CODE:Ob,SEND_AUTH_CODE_FAILED:kb,SEND_AUTH_CODE_SUCCESS:$b,SETTING_APPLY_RULE:$0,SIDEBAR_TOGGLE:O0,SKIP_LOGIN:Ib,TEAM_APPLY_ACCEPT:C0,TEAM_APPLY_REJECT:S0,TEAM_COMP_PERMISSION_CHANGE:T0,TEAM_COMP_REMOVE:x0,TEAM_FILTER_GROUP:w0,TEAM_KICK_MEMBER:E0,TEAM_TAB_CHANGE:b0,UPLOAD_CONFIRM:Db,UPLOAD_FAILED:Lb,UPLOAD_REPEAT_CONFIRM:jb,UPLOAD_SELECT_FOLDER:Mb,UPLOAD_SUCCESS:Fb,USER_EMAIL_LOGIN_TOGGLE:y0,USER_UPDATE_AVATAR:a0,USER_UPDATE_AVATAR_FAILED:c0,USER_UPDATE_AVATAR_SUCCESS:l0,USER_UPDATE_EMAIL:p0,USER_UPDATE_EMAIL_FAILED:m0,USER_UPDATE_EMAIL_SUCCESS:f0,USER_UPDATE_NICKNAME:u0,USER_UPDATE_NICKNAME_FAILED:h0,USER_UPDATE_NICKNAME_SUCCESS:d0,USER_UPDATE_PASSWORD:v0,USER_UPDATE_PASSWORD_FAILED:_0,USER_UPDATE_PASSWORD_SUCCESS:g0},Symbol.toStringTag,{value:"Module"})),BU=t=>bt.COMP_HUB_PROD_DOCS_URL,A0=t=>"";var P0={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 R0=()=>{const{locale:t}=Ko(),e={zh:P0,en:T_};return{locale:te(()=>e[t.value])}},I0=Ce({__name:"App",setup(t){const{locale:e}=R0();return O_(),(n,i)=>{const o=ze("router-view");return y(),ne(m($_),{locale:m(e)},{default:we(()=>[j(o)]),_:1},8,["locale"])}}}),M0="modulepreload",D0=function(t,e){return new URL(t,e).href},id={},nt=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");o=c(n.map(u=>{if(u=D0(u,i),u in id)return;id[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(i)for(let f=s.length-1;f>=0;f--){const p=s[f];if(p.href===u&&(!d||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":M0,d||(v.as="script"),v.crossOrigin="",v.href=u,l&&v.setAttribute("nonce",l),document.head.appendChild(v),d)return new Promise((f,p)=>{v.addEventListener("load",f),v.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function r(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})},si="authorization",is=()=>localStorage.getItem(si),F0=t=>localStorage.setItem(si,t),L0=()=>localStorage.removeItem(si),Ti="x-refresh-token",j0=()=>localStorage.getItem(Ti),N0=t=>localStorage.setItem(Ti,t),U0=()=>localStorage.removeItem(Ti),z0="aside_is_collapse",HU="loginType",qU="compUploadFullscreen",WU="terminalCommandHistory",KU="compUploadSidePanelSize",YU="tagSelected",V0="asideSize",B0="headerSize",Ef="tagsViewMaxCache",GU="readUploadAgreement",H0="dependencyMatchRule",QU="teamTabActiveName",XU="settingTabActiveName",JU="compPreviewTabActiveName",Cf="paginationPageSize",q0=()=>localStorage.getItem(Cf),W0=t=>localStorage.setItem(Cf,t),ZU="selectedFolderPath",Qo=vi("tagsView",{state:()=>({visitedViews:[],maxCache:Ji(Ef,10),payloadMap:new Map}),actions:{setMaxCache(t){this.$patch(e=>{e.maxCache=t})},addView(t){this.$patch(e=>{const n={...t},i=e.visitedViews.findIndex(r=>r.path===t.path);if(i!==-1){e.visitedViews[i]=n;return}e.visitedViews.unshift(n);const o=e.visitedViews.length-e.maxCache;o>0&&this.spliceVisitedViews(-o,o)})},spliceVisitedViews(t,e){this.$patch(n=>{n.visitedViews.splice(t,e)})},delViewByPath(t){this.$patch(e=>{for(const[n,i]of e.visitedViews.entries())if(i.path===t){e.visitedViews.splice(n,1);break}})},delViewAndJumpToPrev(t,e=!1,n){if(e){const i=this.visitedViews.filter(o=>o.path!==t)?.[0];i?n.push(i.path).then(o=>{o||setTimeout(()=>{this.delViewByPath(t)},250)}):n.push("/").then(o=>{o||this.delViewByPath(t)})}else this.delViewByPath(t)},addPayLoad(t,e){this.$patch(n=>{n.payloadMap.set(t,e)})},getPayLoad(t){return this.payloadMap.get(t)}}}),K0=Ce((t,{slots:e})=>{var n,i;const o=Yo(),{width:r,height:s}=Xa(t),a=Mt(ic(o,{width:(n=Tu(r))!==null&&n!==void 0?n:0,height:(i=Tu(s))!==null&&i!==void 0?i:0},{box:t.box,window:t.window}));return()=>{if(e.default)return $o(t.as||"div",{ref:o},e.default(a))}},{name:"UseElementSize",props:["as","box","height","width","window"]}),Y0={ref:"el",class:"relative"},G0={class:"absolute opacity-0 pointer-events-none flex"},Q0=["itemKey"],X0=Ce({__name:"AutoWrapRow",props:{list:{},moreWidth:{default:70},gap:{default:5},getKey:{}},setup(t){const e=t,n=H(new Map),i=In("el"),o=In("items"),{width:r}=ic(i),s=H([]),a=H(!1),l=te(()=>r.value-e.moreWidth),c=te(()=>{const p=s.value.map(_=>_.key);return e.list.filter(_=>p.includes(e.getKey(_)))}),u=te(()=>a.value?e.list.length-s.value.length:0),d=te(()=>{let p=0;for(const _ of n.value.values())p+=_;return p});function h(p,_){n.value.set(p,_)}function v(){const p=new Map;for(const _ of e.list){const C=e.getKey(_);p.set(C,n.value.get(C)??0)}n.value=p}const f=k_(()=>{let p=0;const _=[];if(!(!o.value||e.list.length===0)){for(const C of e.list){const w=e.getKey(C),E=o.value.find(b=>b.getAttribute("itemKey")===w);if(E){if(p+=E.offsetWidth+e.gap,p>l.value)break;_.push({key:w,value:E.offsetWidth})}}s.value=_,a.value=!0}},100);return Oe([()=>r.value,()=>e.list,()=>d.value],([,,p],[,,_])=>{p!==_&&(a.value=!1),f()},{flush:"post",deep:!0}),Oe(()=>e.list.length,()=>{v()}),(p,_)=>(y(),T("div",Y0,[Ve(p.$slots,"display",{visibleList:c.value,overflow:u.value}),g("div",G0,[(y(!0),T(Ie,null,He(t.list,(C,w)=>(y(),ne(m(K0),{key:t.getKey(C)},{default:we(({width:E})=>[Ke(L(h(t.getKey(C),Number(E)))+" ",1),g("div",{ref_for:!0,ref:"items",itemKey:t.getKey(C),class:"invisible whitespace-nowrap"},[Ve(p.$slots,"measure",{item:C,index:w})],8,Q0)]),_:2},1024))),128))])],512))}}),rc=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},Sf=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cs=(t,e,n,i="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),c={provider:o.length>0?o[0]:i,prefix:l,name:a};return e&&!Ur(c)?null:c}const r=o[0],s=r.split("-");if(s.length>1){const a={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!Ur(a)?null:a}if(n&&i===""){const a={provider:i,prefix:"",name:r};return e&&!Ur(a,n)?null:a}return null},Ur=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function J0(t,e){const n=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);function r(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=i[s]&&i[s].parent,l=a&&r(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(n).concat(Object.keys(i)).forEach(r),o}const xf=Object.freeze({left:0,top:0,width:16,height:16}),os=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ss=Object.freeze({...xf,...os}),il=Object.freeze({...Ss,body:"",hidden:!1});function Z0(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}function od(t,e){const n=Z0(t,e);for(const i in il)i in os?i in t&&!(i in n)&&(n[i]=os[i]):i in e?n[i]=e[i]:i in t&&(n[i]=t[i]);return n}function ew(t,e,n){const i=t.icons,o=t.aliases||Object.create(null);let r={};function s(a){r=od(i[a]||o[a],r)}return s(e),n.forEach(s),od(t,r)}function Tf(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const i=J0(t);for(const o in i){const r=i[o];r&&(e(o,ew(t,o,r)),n.push(o))}return n}const tw={provider:"",aliases:{},not_found:{},...xf};function ta(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Of(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!ta(t,tw))return null;const n=e.icons;for(const o in n){const r=n[o];if(!o||typeof r.body!="string"||!ta(r,il))return null}const i=e.aliases||Object.create(null);for(const o in i){const r=i[o],s=r.parent;if(!o||typeof s!="string"||!n[s]&&!i[s]||!ta(r,il))return null}return e}const rd=Object.create(null);function nw(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function eo(t,e){const n=rd[t]||(rd[t]=Object.create(null));return n[e]||(n[e]=nw(t,e))}function $f(t,e){return Of(e)?Tf(e,(n,i)=>{i?t.icons[n]=i:t.missing.add(n)}):[]}function iw(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Mo=!1;function kf(t){return typeof t=="boolean"&&(Mo=t),Mo}function ow(t){const e=typeof t=="string"?Cs(t,!0,Mo):t;if(e){const n=eo(e.provider,e.prefix),i=e.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function rw(t,e){const n=Cs(t,!0,Mo);if(!n)return!1;const i=eo(n.provider,n.prefix);return e?iw(i,n.name,e):(i.missing.add(n.name),!0)}function sw(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Mo&&!e&&!t.prefix){let i=!1;return Of(t)&&(t.prefix="",Tf(t,(o,r)=>{rw(o,r)&&(i=!0)})),i}const n=t.prefix;return Ur({prefix:n,name:"a"})?!!$f(eo(e,n),t):!1}const Af=Object.freeze({width:null,height:null}),Pf=Object.freeze({...Af,...os}),aw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,lw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function sd(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const i=t.split(aw);if(i===null||!i.length)return t;const o=[];let r=i.shift(),s=lw.test(r);for(;;){if(s){const a=parseFloat(r);isNaN(a)?o.push(r):o.push(Math.ceil(a*e*n)/n)}else o.push(r);if(r=i.shift(),r===void 0)return o.join("");s=!s}}function cw(t,e="defs"){let n="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),r=t.indexOf("</"+e);if(o===-1||r===-1)break;const s=t.indexOf(">",r);if(s===-1)break;n+=t.slice(o+1,r).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:n,content:t}}function uw(t,e){return t?"<defs>"+t+"</defs>"+e:e}function dw(t,e,n){const i=cw(t);return uw(i.defs,e+i.content+n)}const hw=t=>t==="unset"||t==="undefined"||t==="none";function pw(t,e){const n={...Ss,...t},i={...Pf,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,i].forEach(p=>{const _=[],C=p.hFlip,w=p.vFlip;let E=p.rotate;C?w?E+=2:(_.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),_.push("scale(-1 1)"),o.top=o.left=0):w&&(_.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),_.push("scale(1 -1)"),o.top=o.left=0);let b;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:b=o.height/2+o.top,_.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:_.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:b=o.width/2+o.left,_.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}E%2===1&&(o.left!==o.top&&(b=o.left,o.left=o.top,o.top=b),o.width!==o.height&&(b=o.width,o.width=o.height,o.height=b)),_.length&&(r=dw(r,'<g transform="'+_.join(" ")+'">',"</g>"))});const s=i.width,a=i.height,l=o.width,c=o.height;let u,d;s===null?(d=a===null?"1em":a==="auto"?c:a,u=sd(d,l/c)):(u=s==="auto"?l:s,d=a===null?sd(u,c/l):a==="auto"?c:a);const h={},v=(p,_)=>{hw(_)||(h[p]=_.toString())};v("width",u),v("height",d);const f=[o.left,o.top,l,c];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:r}}const fw=/\sid="(\S+)"/g,ad=new Map;function mw(t){t=t.replace(/[0-9]+$/,"")||"a";const e=ad.get(t)||0;return ad.set(t,e+1),e?`${t}${e}`:t}function vw(t){const e=[];let n;for(;n=fw.exec(t);)e.push(n[1]);if(!e.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(o=>{const r=mw(o),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const ol=Object.create(null);function gw(t,e){ol[t]=e}function rl(t){return ol[t]||ol[""]}function sc(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const ac=Object.create(null),_o=["https://api.simplesvg.com","https://api.unisvg.com"],zr=[];for(;_o.length>0;)_o.length===1||Math.random()>.5?zr.push(_o.shift()):zr.push(_o.pop());ac[""]=sc({resources:["https://api.iconify.design"].concat(zr)});function _w(t,e){const n=sc(e);return n===null?!1:(ac[t]=n,!0)}function lc(t){return ac[t]}const yw=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let ld=yw();function bw(t,e){const n=lc(t);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const r=e+".json?icons=";i=n.maxURL-o-n.path.length-r.length}return i}function ww(t){return t===404}const Ew=(t,e,n)=>{const i=[],o=bw(t,e),r="icons";let s={type:r,provider:t,prefix:e,icons:[]},a=0;return n.forEach((l,c)=>{a+=l.length+1,a>=o&&c>0&&(i.push(s),s={type:r,provider:t,prefix:e,icons:[]},a=l.length),s.icons.push(l)}),i.push(s),i};function Cw(t){if(typeof t=="string"){const e=lc(t);if(e)return e.path}return"/"}const Sw=(t,e,n)=>{if(!ld){n("abort",424);return}let i=Cw(e.provider);switch(e.type){case"icons":{const r=e.prefix,s=e.icons.join(","),a=new URLSearchParams({icons:s});i+=r+".json?"+a.toString();break}case"custom":{const r=e.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;ld(t+i).then(r=>{const s=r.status;if(s!==200){setTimeout(()=>{n(ww(s)?"abort":"next",s)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},xw={prepare:Ew,send:Sw};function Rf(t,e){t.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(o=>o.id!==e))})}function Tw(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const i=t.provider,o=t.prefix;e.forEach(r=>{const s=r.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const c=l.name;if(t.icons[c])s.loaded.push({provider:i,prefix:o,name:c});else if(t.missing.has(c))s.missing.push({provider:i,prefix:o,name:c});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Rf([t],r.id),r.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),r.abort))})}))}let Ow=0;function $w(t,e,n){const i=Ow++,o=Rf.bind(null,n,i);if(!e.pending.length)return o;const r={id:i,icons:e,callback:t,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(r)}),o}function kw(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return t.forEach(o=>{if(i.name===o.name&&i.prefix===o.prefix&&i.provider===o.provider)return;i=o;const r=o.provider,s=o.prefix,a=o.name,l=n[r]||(n[r]=Object.create(null)),c=l[s]||(l[s]=eo(r,s));let u;a in c.icons?u=e.loaded:s===""||c.missing.has(a)?u=e.missing:u=e.pending;const d={provider:r,prefix:s,name:a};u.push(d)}),e}function Aw(t,e=!0,n=!1){const i=[];return t.forEach(o=>{const r=typeof o=="string"?Cs(o,e,n):o;r&&i.push(r)}),i}const Pw={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Rw(t,e,n,i){const o=t.resources.length,r=t.random?Math.floor(Math.random()*o):t.index;let s;if(t.random){let x=t.resources.slice(0);for(s=[];x.length>1;){const k=Math.floor(Math.random()*x.length);s.push(x[k]),x=x.slice(0,k).concat(x.slice(k+1))}s=s.concat(x)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const a=Date.now();let l="pending",c=0,u,d=null,h=[],v=[];typeof i=="function"&&v.push(i);function f(){d&&(clearTimeout(d),d=null)}function p(){l==="pending"&&(l="aborted"),f(),h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function _(x,k){k&&(v=[]),typeof x=="function"&&v.push(x)}function C(){return{startTime:a,payload:e,status:l,queriesSent:c,queriesPending:h.length,subscribe:_,abort:p}}function w(){l="failed",v.forEach(x=>{x(void 0,u)})}function E(){h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function b(x,k,O){const K=k!=="success";switch(h=h.filter(D=>D!==x),l){case"pending":break;case"failed":if(K||!t.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=O,w();return}if(K){u=O,h.length||(s.length?S():w());return}if(f(),E(),!t.random){const D=t.resources.indexOf(x.resource);D!==-1&&D!==t.index&&(t.index=D)}l="completed",v.forEach(D=>{D(O)})}function S(){if(l!=="pending")return;f();const x=s.shift();if(x===void 0){if(h.length){d=setTimeout(()=>{f(),l==="pending"&&(E(),w())},t.timeout);return}w();return}const k={status:"pending",resource:x,callback:(O,K)=>{b(k,O,K)}};h.push(k),c++,d=setTimeout(S,t.rotate),n(x,e,k.callback)}return setTimeout(S),C}function If(t){const e={...Pw,...t};let n=[];function i(){n=n.filter(s=>s().status==="pending")}function o(s,a,l){const c=Rw(e,s,a,(u,d)=>{i(),l&&l(u,d)});return n.push(c),c}function r(s){return n.find(a=>s(a))||null}return{query:o,find:r,setIndex:s=>{e.index=s},getIndex:()=>e.index,cleanup:i}}function cd(){}const na=Object.create(null);function Iw(t){if(!na[t]){const e=lc(t);if(!e)return;na[t]={config:e,redundancy:If(e)}}return na[t]}function Mw(t,e,n){let i,o;if(typeof t=="string"){const r=rl(t);if(!r)return n(void 0,424),cd;o=r.send;const s=Iw(t);s&&(i=s.redundancy)}else{const r=sc(t);if(r){i=If(r);const s=rl(t.resources?t.resources[0]:"");s&&(o=s.send)}}return!i||!o?(n(void 0,424),cd):i.query(e,o,n)().abort}function ud(){}function Dw(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Tw(t)}))}function Fw(t){const e=[],n=[];return t.forEach(i=>{(i.match(Sf)?e:n).push(i)}),{valid:e,invalid:n}}function yo(t,e,n){function i(){const o=t.pendingIcons;e.forEach(r=>{o&&o.delete(r),t.icons[r]||t.missing.add(r)})}if(n&&typeof n=="object")try{if(!$f(t,n).length){i();return}}catch(o){console.error(o)}i(),Dw(t)}function dd(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function Lw(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:i}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const r=t.loadIcon;if(t.loadIcons&&(o.length>1||!r)){dd(t.loadIcons(o,i,n),c=>{yo(t,o,c)});return}if(r){o.forEach(c=>{dd(r(c,i,n),u=>{yo(t,[c],u?{prefix:i,icons:{[c]:u}}:null)})});return}const{valid:s,invalid:a}=Fw(o);if(a.length&&yo(t,a,null),!s.length)return;const l=i.match(Sf)?rl(n):null;if(!l){yo(t,s,null);return}l.prepare(n,i,s).forEach(c=>{Mw(n,c,u=>{yo(t,c.icons,u)})})}))}const jw=(t,e)=>{const n=kw(Aw(t,!0,kf()));if(!n.pending.length){let a=!0;return e&&setTimeout(()=>{a&&e(n.loaded,n.missing,n.pending,ud)}),()=>{a=!1}}const i=Object.create(null),o=[];let r,s;return n.pending.forEach(a=>{const{provider:l,prefix:c}=a;if(c===s&&l===r)return;r=l,s=c,o.push(eo(l,c));const u=i[l]||(i[l]=Object.create(null));u[c]||(u[c]=[])}),n.pending.forEach(a=>{const{provider:l,prefix:c,name:u}=a,d=eo(l,c),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(u)||(h.add(u),i[l][c].push(u))}),o.forEach(a=>{const l=i[a.provider][a.prefix];l.length&&Lw(a,l)}),e?$w(e,n,o):ud};function Nw(t,e){const n={...t};for(const i in e){const o=e[i],r=typeof o;i in Af?(o===null||o&&(r==="string"||r==="number"))&&(n[i]=o):r===typeof n[i]&&(n[i]=i==="rotate"?o%4:o)}return n}const Uw=/[\s,]+/;function zw(t,e){e.split(Uw).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Vw(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function i(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:i(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(t.slice(0,t.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?i(r):0)}}return e}function Bw(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Hw(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function qw(t){return"data:image/svg+xml,"+Hw(t)}function Ww(t){return'url("'+qw(t)+'")'}const hd={...Pf,inline:!1},Kw={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Yw={display:"inline-block"},sl={backgroundColor:"currentColor"},Mf={backgroundColor:"transparent"},pd={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},fd={webkitMask:sl,mask:sl,background:Mf};for(const t in fd){const e=fd[t];for(const n in pd)e[t+n]=pd[n]}const Vr={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Vr[t+"-flip"]=e,Vr[t.slice(0,1)+"-flip"]=e,Vr[t+"Flip"]=e});function md(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const vd=(t,e)=>{const n=Nw(hd,e),i={...Kw},o=e.mode||"svg",r={},s=e.style,a=typeof s=="object"&&!(s instanceof Array)?s:{};for(let p in e){const _=e[p];if(_!==void 0)switch(p){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[p]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&zw(n,_);break;case"color":r.color=_;break;case"rotate":typeof _=="string"?n[p]=Vw(_):typeof _=="number"&&(n[p]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete i["aria-hidden"];break;default:{const C=Vr[p];C?(_===!0||_==="true"||_===1)&&(n[C]=!0):hd[p]===void 0&&(i[p]=_)}}}const l=pw(t,n),c=l.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),o==="svg")return i.style={...r,...a},Object.assign(i,c),i.innerHTML=vw(l.body),$o("svg",i);const{body:u,width:d,height:h}=t,v=o==="mask"||(o==="bg"?!1:u.indexOf("currentColor")!==-1),f=Bw(u,{...c,width:d+"",height:h+""});return i.style={...r,"--svg":Ww(f),width:md(c.width),height:md(c.height),...Yw,...v?sl:Mf,...a},$o("span",i)};kf(!0);gw("",xw);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!sw(i))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const i="IconifyProviders["+n+"] is invalid.";try{const o=e[n];if(typeof o!="object"||!o||o.resources===void 0)continue;_w(n,o)||console.error(i)}catch{console.error(i)}}}}const Gw={...Ss,body:""},Qw=Ce((t,{emit:e})=>{const n=H(null);function i(){n.value&&(n.value.abort?.(),n.value=null)}const o=H(!!t.ssr),r=H(""),s=Yo(null);function a(){const c=t.icon;if(typeof c=="object"&&c!==null&&typeof c.body=="string")return r.value="",{data:c};let u;if(typeof c!="string"||(u=Cs(c,!1,!0))===null)return null;let d=ow(u);if(!d){const f=n.value;return(!f||f.name!==c)&&(d===null?n.value={name:c}:n.value={name:c,abort:jw([u],l)}),null}i(),r.value!==c&&(r.value=c,Ge(()=>{e("load",c)}));const h=t.customise;if(h){d=Object.assign({},d);const f=h(d.body,u.name,u.prefix,u.provider);typeof f=="string"&&(d.body=f)}const v=["iconify"];return u.prefix!==""&&v.push("iconify--"+u.prefix),u.provider!==""&&v.push("iconify--"+u.provider),{data:d,classes:v}}function l(){const c=a();c?c.data!==s.value?.data&&(s.value=c):s.value=null}return o.value?l():et(()=>{o.value=!0,l()}),Oe(()=>t.icon,l),Ct(i),()=>{const c=s.value;if(!c)return vd(Gw,t);let u=t;return c.classes&&(u={...t,class:c.classes.join(" ")}),vd({...Ss,...c.data},u)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});function Xw(t,e,n="_id"){const i=Ou(t,e,n).filter(Boolean),o=Ou(e,t,n).filter(Boolean),r=A_(t,e,(s,a)=>s[n]===a[n]&&!P_(s,a));return{addedItems:i,deletedItems:o,modifiedItems:r}}const ez=Object.freeze(Object.defineProperty({__proto__:null,findChangedArrayItems:Xw},Symbol.toStringTag,{value:"Module"}));function cc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jw(t,e){if(!e?.trim())return[{text:t,isMatch:!1}];const n=new RegExp(`(${cc(e)})`,"gi");return t.split(n).map(i=>({text:i,isMatch:n.test(i)&&i.toLowerCase()===e.toLowerCase()}))}function Zw(t,e,n="hl"){if(!e?.trim())return t;const i=cc(e.trim());return t.replace(new RegExp(`(${i})`,"gi"),`<mark class="${n}">$1</mark>`)}function e1(t,e){const n=e?.trim().toLowerCase();return n?t.findIndex(i=>i.toLowerCase().includes(n)):-1}const Df=t=>t.replace(/[/\\]/g,"/"),t1=(t,e="/")=>t.replace(/[\\/]+/g,e);function n1(){return"#"+R_(0,16777215).toString(16).padStart(6,"0")}const i1=t=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t),Ff=t=>t.replace(/[-_]([a-z])/g,(e,n)=>n.toUpperCase()).replace(/^[A-Z]/,e=>e.toLowerCase()),al=t=>{if(Array.isArray(t))return t.map(n=>al(n));if(t===null||typeof t!="object")return t;const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=Ff(n);e[i]=al(t[n])}return e};function o1(t){return/(^[A-Z][a-z][a-zA-Z0-9]*$)|(^[a-z]+(-[a-z0-9]+)+$)/.test(t.trim())}function r1(t){if(t<=0)throw new Error("长度必须大于0");let e="";for(;e.length<t;){const n=Math.floor(Math.random()*10);e.length===0&&n===0||(e+=n)}return e}function Lf(t){if(t==null)return{valid:!1,reason:"validateHash.empty"};if(typeof t!="string")return{valid:!1,reason:"validateHash.notString",reasonParams:{type:typeof t}};const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return{valid:!1,reason:"validateHash.contentEmpty"};if(/^\d/.test(e))return{valid:!1,reason:"validateHash.startsWithNumber",reasonParams:{char:e[0]}};const n=e.match(/[^\p{L}\p{N}_\-() ]/u);if(n){const i=n[0],o=i.charCodeAt(0);return i==="`"?{valid:!1,reason:"validateHash.invalidCharBacktick"}:i===`
3
+ `?{valid:!1,reason:"validateHash.invalidCharNewline"}:i==="\r"?{valid:!1,reason:"validateHash.invalidCharCarriageReturn"}:i===" "?{valid:!1,reason:"validateHash.invalidCharTab"}:i==="\f"?{valid:!1,reason:"validateHash.invalidCharFormFeed"}:i==="\v"?{valid:!1,reason:"validateHash.invalidCharVerticalTab"}:i==="#"?{valid:!1,reason:"validateHash.invalidCharHash"}:/[<>\\"'&]/.test(i)?{valid:!1,reason:"validateHash.invalidCharHtmlSpecial",reasonParams:{char:i}}:{valid:!1,reason:"validateHash.invalidCharUnknown",reasonParams:{char:i,code:o.toString(16).toUpperCase().padStart(4,"0")}}}return{valid:!0,normalized:e}}function s1(t){return Lf(t).valid}function a1(t){return!t||!Array.isArray(t)?[]:[...new Set(t.map(e=>(e||"").trim().toLowerCase()).filter(Boolean))]}function l1(t){if(!t||t.length===0)return{valid:!0};if(t.length>5)return{valid:!1,error:"tagsMaxCount"};for(const e of t){if(!e)return{valid:!1,error:"tagsEmpty"};if(e.length>20)return{valid:!1,error:"tagsTooLong",tag:e};if(!/^[一-龥a-zA-Z0-9\-_]+$/.test(e))return{valid:!1,error:"tagsInvalidChars",tag:e}}return{valid:!0}}const tz=Object.freeze(Object.defineProperty({__proto__:null,convertKeysToCamelCase:al,escapeRegExp:cc,findKeywordLineIndex:e1,generateNumberString:r1,highlightText:Zw,isEmail:i1,isValidHash:s1,normalizeTags:a1,randomColor:n1,replaceBackslashWithSlash:Df,replaceSlashWithSpecifiedSeparator:t1,splitTextByKeyword:Jw,toCamelCase:Ff,validateCompName:o1,validateHash:Lf,validateTags:l1},Symbol.toStringTag,{value:"Module"}));function c1(t,e){if(!t||!e.length)throw new Error("组件路径或入口路径为空");const[n]=e.slice(-1);if(!n)throw new Error("入口路径最后一项无效");const i=Df(n);return`${t.replace(bt.FILE_MANAGER_DIRNAME,"")}${i}`}function u1(t){const e={};return t.forEach(n=>{n?.parent?e[n?.parent?.name]=n?.parent?.version:e[n.name]=n.version}),Object.entries(e).map(([n,i])=>({name:n,version:i}))}const nz=Object.freeze(Object.defineProperty({__proto__:null,getPreviewUrl:c1,handleDepData:u1},Symbol.toStringTag,{value:"Module"}));function d1(t){const e={children:[]},n=[e];return t.forEach(({depth:i,tokens:o})=>{if(o[0]){const r=o[0].text,s=o.map(u=>u.text),a=s.join(""),l={title:r,titles:s,href:`#${a}`,children:[]};for(;n.length>i;)n.pop();const c=n[n.length-1];c&&c.children.push(l),n.push(l)}}),e.children}const iz=Object.freeze(Object.defineProperty({__proto__:null,flatHeadingsToTree:d1},Symbol.toStringTag,{value:"Module"})),h1=t=>`Bearer ${t}`,p1=t=>t.replace("Bearer ",""),wi=Object.freeze(Object.defineProperty({__proto__:null,extractBearerToken:p1,generateBearerToken:h1},Symbol.toStringTag,{value:"Module"}));function f1(t,e,n={}){const{idKey:i="id",childrenKey:o="children"}=n,r=Array.isArray(t)?t:[t],s=[];let a=!1;const l=u=>{const d=u[o];Array.isArray(d)&&(s.push(...d),d.forEach(h=>l(h)))},c=u=>{if(a)return!0;for(const d of u){if(d?.[i]===e)return a=!0,l(d),!0;const h=d?.[o];if(Array.isArray(h)&&h.length>0&&c(h))return!0}return!1};return c(r),s}function jf(t,e){const n=JSON.parse(JSON.stringify(t));return n.children?.length&&(n.children=n.children.map(i=>jf(i,e))),e(n)}function m1(t,e,n={}){const{idKey:i="id",childrenKey:o="children"}=n,r=Array.isArray(t)?t:[t],s=l=>{const{[o]:c,...u}=l;return u},a=(l,c)=>{for(const u of l){if(u[i]===e)return[s(u),...c];const d=u[o];if(Array.isArray(d)&&d.length>0){const h=a(d,[s(u),...c]);if(h)return h}}return null};return a(r,[])??[]}function v1(t,e){const{createNode:n,pathSeparator:i="/",skipInvalid:o=!0}=e,r=new Map,s=i,a=n("directory","",s);a.children=[],r.set(s,a);const l=u=>{let d=u.replace(/\\/g,"/");return d=d.replace(/^\.\//,""),d=d.replace(/^\/+|\/+$/g,""),d.replace(/\//g,i)};for(const u of t){const d=l(u.path);if(!d)continue;const h=d.split(i).filter(Boolean);if(h.length===0)continue;let v=s,f="";for(let w=0;w<h.length-1;w++){const E=h[w];if(f=f?`${f}${i}${E}`:E,!r.has(f)){const b=n("directory",E,f);b.children=[],r.set(f,b),r.get(v)?.children?.push(b)}v=f}const p=h[h.length-1];if(!p){if(!o)throw new Error(`无效路径: ${u.path}`);continue}const _=f?`${f}${i}${p}`:p,C=n("file",p,_);r.get(v)?.children?.push(C)}const c=u=>{u.sort((d,h)=>d.type!==h.type?d.type==="directory"?-1:1:d.name.localeCompare(h.name)),u.forEach(d=>d.children?.length&&c(d.children))};return a.children?.length&&c(a.children),a}const oz=Object.freeze(Object.defineProperty({__proto__:null,convertFlatToTree:v1,findTreeNodePathToRoot:m1,getTreeAllChildren:f1,mapTree:jf},Symbol.toStringTag,{value:"Module"}));var Nf=(t=>(t.Added="added",t.Deleted="deleted",t.Unchanged="unchanged",t.Changed="modified",t))(Nf||{}),Uf=(t=>(t.Directory="directory",t.File="file",t))(Uf||{});function zf(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}function rs(t,e){for(const n of t)e.set(n.path,n),n.type==="directory"&&n.children?.length&&rs(n.children,e)}function gd(t){const e=new Map;return rs(t,e),e}function uc(t,e){const n=[];for(const i of t)if(!e.has(i.path)){const o=zf(i);o.status="deleted",i.type==="directory"&&i.children?.length&&(o.children=uc(i.children,e)),n.push(o)}return n}function g1(t,e,n){return n?n(t,e):t.hash&&e.hash?t.hash===e.hash:!0}function Br(t,e,n,i){return t.map(o=>{const r=zf(o),s=e.get(o.path);if(s){if(o.type==="file"){const a=g1(s,o,i?.contentCompare);r.status=a?"unchanged":"modified"}else r.status="unchanged";if(o.type==="directory"&&o.children&&s.children){const a=gd(s.children),l=Br(o.children,a,n,i),c=gd(l),u=uc(s.children,c);r.children=[...l,...u]}else o.type==="directory"&&o.children&&(r.children=Br(o.children,new Map,"added",i))}else r.status=n,o.type==="directory"&&o.children?.length&&(r.children=Br(o.children,new Map,n,i));return r.type==="directory"&&dc(r),r})}function dc(t){if(t.type!=="directory"||!t.children?.length)return;for(const n of t.children)n.type==="directory"&&dc(n);if(t.status==="added"||t.status==="deleted")return;const e=t.children.some(n=>n.status==="added"||n.status==="deleted"||n.status==="modified");t.status=e?"modified":"unchanged"}function Vf(t){const e=[...t].sort((n,i)=>n.type!==i.type?n.type==="directory"?-1:1:n.name.localeCompare(i.name));for(const n of e)n.type==="directory"&&n.children?.length&&(n.children=Vf(n.children));return e}function _1(t,e,n){const i=new Map,o=new Map;rs(e,i),rs(t,o);const r=Br(t,i,"added",n),s=uc(e,o),a=[...r,...s],l=n?.skipSort?a:Vf(a);for(const c of l)c.type==="directory"&&dc(c);return l}const rz=Object.freeze(Object.defineProperty({__proto__:null,NodeStatus:Nf,NodeType:Uf,mergeAndMarkTree:_1},Symbol.toStringTag,{value:"Module"})),y1=(t,e)=>{const n=Array.isArray(e)?e:[e];let i;return I_(t)?i="string":M_(t)?i="number":D_(t)?i="boolean":F_(t)?i="array":L_(t)?i="function":j_(t)?i="symbol":N_(t)?i="null":U_(t)?i="undefined":z_(t)?i="object":i="undefined",n.includes(i)},sz=Object.freeze(Object.defineProperty({__proto__:null,isType:y1},Symbol.toStringTag,{value:"Module"})),_d=/^[\^~>=<]+/,Bf=/^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9.]+))?(?:\+([a-zA-Z0-9.]+))?$/;function b1(t){return Bf.test(t)}function Dn(t){if(!t||typeof t!="string")throw new Error(`Invalid version string: ${t}`);const e=t.match(_d),n=e?e[0]:"",i=t.replace(_d,"").match(Bf);if(!i)throw new Error(`Invalid semver format: ${t}`);const[,o="0",r="0",s="0",a]=i,l=parseInt(o,10),c=parseInt(r,10),u=parseInt(s,10);return{raw:t,prefix:n,major:l,minor:c,patch:u,prerelease:a||null,majorVersion:o,version:`${l}.${c}.${u}`}}function w1(t,e){const n=Dn(t),i=Dn(e);return n.major===i.major&&n.minor===i.minor&&n.patch===i.patch}function E1(t){return Dn(t).majorVersion}function C1(t){const e={};for(const[n,i]of Object.entries(t))try{e[n]=Dn(i)}catch(o){console.warn(`Failed to parse version for ${n}: ${i}`,o)}return e}function Vi(t,e){const n=Dn(t),i=Dn(e),{VERSION_COMPARE_SAME:o,VERSION_COMPARE_LESS:r,VERSION_COMPARE_GREATER:s}=bt;return n.major!==i.major?n.major>i.major?s:r:n.minor!==i.minor?n.minor>i.minor?s:r:n.patch!==i.patch?n.patch>i.patch?s:r:o}function S1(t,e){const n=Dn(t),i=Dn(e);switch(i.prefix){case"^":return n.major===i.major;case"~":return n.major===i.major&&n.minor===i.minor;case">=":return Vi(t,e.replace(">=",""))>=0;case">":return Vi(t,e.replace(">",""))>0;case"<=":return Vi(t,e.replace("<=",""))<=0;case"<":return Vi(t,e.replace("<",""))<0;case"=":case"":return Vi(t,e.replace("=",""))===0;default:return!1}}function x1(t){if(!t||typeof t!="string")throw new Error("版本号必须是非空字符串");const e=Dn(t),n=(a,l)=>{if(a<0||a>999)throw new Error(`版本号${l}位必须在 0-999 之间,当前值:${a}(原始输入:${t})`);return a},i=n(e.major,"主版本"),o=n(e.minor,"次版本"),r=n(e.patch,"补丁版本"),s=i*1e6+o*1e3+r;if(!Number.isSafeInteger(s))throw new Error(`版本号转换后超出 JavaScript 安全整数范围,结果:${s}(原始输入:${t})`);return s}const az=Object.freeze(Object.defineProperty({__proto__:null,compareVersions:Vi,getMajorVersion:E1,isVersionEqual:w1,parseDependencies:C1,parseVersion:Dn,satisfiesRange:S1,validateVersion:b1,versionToNumber:x1},Symbol.toStringTag,{value:"Module"})),T1={};function O1(t,e){return y(),ne(Up,{name:"transition-fade",mode:"out-in",appear:""},{default:we(()=>[Ve(t.$slots,"default")]),_:3})}const $1=rc(T1,[["render",O1]]),k1={key:0,class:"fixed top-0 left-0 w-screen bg-[rgb(94,9,11)] text-white font-sans z-[99999] break-all overflow-auto max-h-[50vh] p-[10px] box-border"},A1={class:"clear-both"},P1={class:"whitespace-pre-wrap m-0"},R1={key:0},I1={class:"whitespace-pre-wrap m-0"},M1=Ce({__name:"ErrorOverlay",props:{errors:{}},setup(t){const e=H(!1),n=t,i=()=>{e.value=!1};return Oe(()=>n.errors,o=>{e.value=o.length>0},{immediate:!0,deep:!0}),(o,r)=>e.value?(y(),T("div",k1,[g("button",{class:"sticky top-[10px] right-[10px] float-right bg-white/20 border-none text-white text-lg cursor-pointer w-[30px] h-[30px] rounded-full flex items-center justify-center p-0 ml-[10px] transition-colors duration-200 hover:bg-white/30",onClick:i}," × "),g("div",A1,[(y(!0),T(Ie,null,He(t.errors,(s,a)=>(y(),T("div",{key:a,class:"mb-5"},[g("pre",P1,L(s?.message||s),1),s?.stack?(y(),T("div",R1,[g("pre",I1,L(s.stack),1)])):ue("",!0)]))),128))])])):ue("",!0)}}),D1=Ce({__name:"index",props:zp({config:{}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const{t:e}=Ko(),n=t,i=te(()=>{const u={};return n.config?.column?.forEach(d=>{u[d.prop]=d.value}),u}),o=Zl(t,"modelValue"),r=ec();async function s(){r?.onRefresh?.()}async function a(){n.config?.column?.forEach(u=>{u.value=""}),await Ge(),r?.onReset?.()}function l(u){return u??!0}function c(){r?.onSearch?.()}return Nt(()=>{o.value=i.value}),(u,d)=>{const h=ze("Icon");return y(),ne(m(el),{inline:!0,onSubmit:d[3]||(d[3]=Ye(()=>{},["prevent"])),onKeyup:d[4]||(d[4]=ho(v=>c(),["enter"]))},{default:we(()=>[(y(!0),T(Ie,null,He(t.config?.column||[],(v,f)=>(y(),ne(m($u),{key:f,label:m(v.label)??""},{default:we(()=>[l(v.useVModel)?(y(),ne(Ot(v.component),We({key:1,modelValue:v.value,"onUpdate:modelValue":p=>v.value=p},{ref_for:!0},v?.attributes||{},bn(v?.events||{})),null,16,["modelValue","onUpdate:modelValue"])):(y(),ne(Ot(v.component),We({key:0,"model-value":v.value},{ref_for:!0},v?.attributes||{},bn(v?.events||{})),null,16,["model-value"]))]),_:2},1032,["label"]))),128)),t.config?.column?.length?(y(),ne(m($u),{key:0},{default:we(()=>[j(m(Gi),{type:"success",onClick:d[0]||(d[0]=v=>c())},{default:we(()=>[Ke(L(m(e)("common.search")),1)]),_:1}),j(m(Gi),{type:"primary",onClick:d[1]||(d[1]=v=>a())},{default:we(()=>[Ke(L(m(e)("common.reset")),1)]),_:1}),j(m(Gi),{onClick:d[2]||(d[2]=v=>s())},{default:we(()=>[j(h,{icon:"material-symbols:refresh-rounded"})]),_:1})]),_:1})):ue("",!0)]),_:1})}}}),F1={key:0},L1={ref:"tableContainer",class:"flex-1 overflow-hidden"},j1={key:1,class:"mt-2"},N1=Ce({__name:"index",props:{tableConfig:{}},setup(t,{expose:e}){const n=ec(),i=t,o=In("tableContainer"),r=In("table"),{height:s}=ic(o),a=h_(),l=te(()=>{if(i.tableConfig?.pagination?.getPageSize||i.tableConfig?.pagination?.setPageSize)return{get:i.tableConfig.pagination.getPageSize,set:i.tableConfig.pagination.setPageSize};const I=U1().paginationStorage;return I?{get:()=>{const A=I.get();return A?Number(A):10},set:A=>I.set(String(A))}:null}),c=H(l.value?.get?.()??10),u=H(!1),d=H(1),h=H(D()),v=H("UNKNOWN"),f=te(()=>Object.keys(a)),p=te(()=>i.tableConfig.size??"default"),_=te(()=>i.tableConfig?.fixedHeight??!0),C=te(()=>_.value?Math.max(s.value,100):"auto"),w=te(()=>i.tableConfig?.autoLoading??!0),E=te(()=>({"--pagination-location":i.tableConfig?.pagination?.location||"center"})),b=te(()=>i.tableConfig?.isPagination??!0),S=te(()=>i.tableConfig?.paginationMap?i.tableConfig.paginationMap:{page:"page",pageSize:"pageSize"}),x=te(()=>({[S.value.page]:d.value,[S.value.pageSize]:c.value})),k=te(()=>({background:!0,pageSizes:[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",...i.tableConfig?.pagination?.attributes,total:i.tableConfig?.pagination?.total||0,pageSize:c.value,currentPage:d.value})),O=te(()=>({...x.value,...h.value})),K=te(()=>i.tableConfig?.search?.column.filter(I=>I.autoQuery??!0).map(I=>I.prop));function D(){const I={};return i.tableConfig?.search?.column?.forEach(A=>{I[A.prop]=A.value}),I}async function P(){v.value!=="NOT_CHANGE"&&(w.value&&(u.value=!0),i.tableConfig?.fetchData?.(O.value)?.finally(()=>{v.value="NOT_CHANGE",u.value=!1}))}async function U(){await P()}async function M(){v.value="UNKNOWN",await P()}async function q(){d.value=1,v.value!=="AUTO_QUERY"&&await P()}async function le(I){d.value=1,c.value=I}async function de(I){d.value=I}function Y(){v.value="UNKNOWN",P()}return Oe(()=>JSON.stringify(h.value),(I,A)=>{v.value="UNKNOWN";const Q=JSON.parse(I??"{}"),z=JSON.parse(A??"{}"),ie=Object.keys(Q),ve=Object.keys(z);let re=[];ie.length===ve.length?re=Object.keys(Q).filter(ge=>Q[ge]!==z[ge]):re=q_(ie,ve),K.value?.length&&W_(re,[...K.value]).length&&(v.value="AUTO_QUERY",P())}),Oe(()=>JSON.stringify(x.value),()=>{v.value="UNKNOWN",P()}),Nt(()=>{l.value?.set?.(c.value)}),et(()=>{P()}),e({getTableRef:()=>r.value,forceRefreshData:Y}),(I,A)=>{const Q=Hp;return it((y(),T("div",{class:"w-full h-full flex flex-col overflow-hidden",style:At(E.value)},[t.tableConfig.search?(y(),T("div",F1,[Ve(I.$slots,"search",{},()=>[j(D1,{modelValue:h.value,"onUpdate:modelValue":A[0]||(A[0]=z=>h.value=z),config:t.tableConfig.search,size:p.value,onSearch:U,onRefresh:M,onReset:q},null,8,["modelValue","config","size"])],!0)])):ue("",!0),Ve(I.$slots,"tableBefore",{},void 0,!0),g("div",L1,[Ve(I.$slots,"table",{},()=>[j(m(B_),We({ref:"table",size:p.value,data:t.tableConfig.data,height:C.value},m(n)),p_({default:we(()=>[(y(!0),T(Ie,null,He(t.tableConfig.column,(z,ie)=>(y(),T(Ie,null,[z.slot?Ve(I.$slots,z.slot,{key:0,col:z,index:ie},void 0,!0):(y(),ne(m(V_),We({key:`default-${ie}`},{ref_for:!0},z),null,16))],64))),256))]),_:2},[He(f.value,z=>({name:z,fn:we(ie=>[Ve(I.$slots,z,wn(Jn(ie)),void 0,!0)])}))]),1040,["size","data","height"])],!0)],512),b.value?(y(),T("div",j1,[Ve(I.$slots,"pagination",{},()=>[j(m(H_),We({size:p.value},k.value,{onSizeChange:le,onCurrentChange:de},bn(t.tableConfig?.pagination?.events||{})),null,16,["size"])],!0)])):ue("",!0)],4)),[[Q,u.value]])}}}),yd=rc(N1,[["__scopeId","data-v-ce25225b"]]);let ll={};const U1=()=>ll,z1={...yd,install(t,e){e&&(ll={...ll,...e}),t.component("BaseTable",yd)}},V1={class:"overflow-hidden size-full"},B1=Ce({__name:"Main",setup(t){const e=Qo(),n=new Map,i=te(()=>e.visitedViews.map(s=>o(s)));function o(s){const{path:a}=s,{[bt.ROUTE_STATE_KEY_VERSION]:l}=s.query;return l?`${a}?${bt.ROUTE_STATE_KEY_VERSION}=${l}`:a}function r(s,a){const l=o(a);if(!n.has(l)){const c=Ce({name:l,setup(){return()=>$o(s)}});n.set(l,c)}return n.get(l)}return Oe(()=>i.value,(s,a)=>{const l=a.filter(c=>!s.includes(c));l.length&&n.delete(l[0])},{deep:!0}),(s,a)=>{const l=ze("router-view");return y(),T("div",V1,[j(l,null,{default:we(({Component:c,route:u})=>[j(m($1),null,{default:we(()=>[(y(),ne(f_,{include:i.value},[(y(),ne(Ot(r(c,u))))],1032,["include"]))]),_:2},1024)]),_:1})])}}});var ia,bd;function H1(){if(bd)return ia;bd=1;function t(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function e(o,r){for(var s="",a=0,l=-1,c=0,u,d=0;d<=o.length;++d){if(d<o.length)u=o.charCodeAt(d);else{if(u===47)break;u=47}if(u===47){if(!(l===d-1||c===1))if(l!==d-1&&c===2){if(s.length<2||a!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var h=s.lastIndexOf("/");if(h!==s.length-1){h===-1?(s="",a=0):(s=s.slice(0,h),a=s.length-1-s.lastIndexOf("/")),l=d,c=0;continue}}else if(s.length===2||s.length===1){s="",a=0,l=d,c=0;continue}}r&&(s.length>0?s+="/..":s="..",a=2)}else s.length>0?s+="/"+o.slice(l+1,d):s=o.slice(l+1,d),a=d-l-1;l=d,c=0}else u===46&&c!==-1?++c:c=-1}return s}function n(o,r){var s=r.dir||r.root,a=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+a:s+o+a:a}var i={resolve:function(){for(var r="",s=!1,a,l=arguments.length-1;l>=-1&&!s;l--){var c;l>=0?c=arguments[l]:(a===void 0&&(a=process.cwd()),c=a),t(c),c.length!==0&&(r=c+"/"+r,s=c.charCodeAt(0)===47)}return r=e(r,!s),s?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(r){if(t(r),r.length===0)return".";var s=r.charCodeAt(0)===47,a=r.charCodeAt(r.length-1)===47;return r=e(r,!s),r.length===0&&!s&&(r="."),r.length>0&&a&&(r+="/"),s?"/"+r:r},isAbsolute:function(r){return t(r),r.length>0&&r.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var r,s=0;s<arguments.length;++s){var a=arguments[s];t(a),a.length>0&&(r===void 0?r=a:r+="/"+a)}return r===void 0?".":i.normalize(r)},relative:function(r,s){if(t(r),t(s),r===s||(r=i.resolve(r),s=i.resolve(s),r===s))return"";for(var a=1;a<r.length&&r.charCodeAt(a)===47;++a);for(var l=r.length,c=l-a,u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var d=s.length,h=d-u,v=c<h?c:h,f=-1,p=0;p<=v;++p){if(p===v){if(h>v){if(s.charCodeAt(u+p)===47)return s.slice(u+p+1);if(p===0)return s.slice(u+p)}else c>v&&(r.charCodeAt(a+p)===47?f=p:p===0&&(f=0));break}var _=r.charCodeAt(a+p),C=s.charCodeAt(u+p);if(_!==C)break;_===47&&(f=p)}var w="";for(p=a+f+1;p<=l;++p)(p===l||r.charCodeAt(p)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+s.slice(u+f):(u+=f,s.charCodeAt(u)===47&&++u,s.slice(u))},_makeLong:function(r){return r},dirname:function(r){if(t(r),r.length===0)return".";for(var s=r.charCodeAt(0),a=s===47,l=-1,c=!0,u=r.length-1;u>=1;--u)if(s=r.charCodeAt(u),s===47){if(!c){l=u;break}}else c=!1;return l===-1?a?"/":".":a&&l===1?"//":r.slice(0,l)},basename:function(r,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');t(r);var a=0,l=-1,c=!0,u;if(s!==void 0&&s.length>0&&s.length<=r.length){if(s.length===r.length&&s===r)return"";var d=s.length-1,h=-1;for(u=r.length-1;u>=0;--u){var v=r.charCodeAt(u);if(v===47){if(!c){a=u+1;break}}else h===-1&&(c=!1,h=u+1),d>=0&&(v===s.charCodeAt(d)?--d===-1&&(l=u):(d=-1,l=h))}return a===l?l=h:l===-1&&(l=r.length),r.slice(a,l)}else{for(u=r.length-1;u>=0;--u)if(r.charCodeAt(u)===47){if(!c){a=u+1;break}}else l===-1&&(c=!1,l=u+1);return l===-1?"":r.slice(a,l)}},extname:function(r){t(r);for(var s=-1,a=0,l=-1,c=!0,u=0,d=r.length-1;d>=0;--d){var h=r.charCodeAt(d);if(h===47){if(!c){a=d+1;break}continue}l===-1&&(c=!1,l=d+1),h===46?s===-1?s=d:u!==1&&(u=1):s!==-1&&(u=-1)}return s===-1||l===-1||u===0||u===1&&s===l-1&&s===a+1?"":r.slice(s,l)},format:function(r){if(r===null||typeof r!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof r);return n("/",r)},parse:function(r){t(r);var s={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return s;var a=r.charCodeAt(0),l=a===47,c;l?(s.root="/",c=1):c=0;for(var u=-1,d=0,h=-1,v=!0,f=r.length-1,p=0;f>=c;--f){if(a=r.charCodeAt(f),a===47){if(!v){d=f+1;break}continue}h===-1&&(v=!1,h=f+1),a===46?u===-1?u=f:p!==1&&(p=1):u!==-1&&(p=-1)}return u===-1||h===-1||p===0||p===1&&u===h-1&&u===d+1?h!==-1&&(d===0&&l?s.base=s.name=r.slice(1,h):s.base=s.name=r.slice(d,h)):(d===0&&l?(s.name=r.slice(1,u),s.base=r.slice(1,h)):(s.name=r.slice(d,u),s.base=r.slice(d,h)),s.ext=r.slice(u,h)),d>0?s.dir=r.slice(0,d-1):l&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,ia=i,ia}var q1=H1();const W1=Fi(q1);function hc(){const{t}=Ko();return{getTitle:n=>n?n.includes(".")&&!n.startsWith("http")?t(n):n:""}}const K1={class:"truncate"},Y1=Ce({__name:"MenuItem",props:{route:{},fullPath:{}},setup(t){const{getTitle:e}=hc(),n=_s(),i=t;function o(){n.push({path:i.fullPath})}return(r,s)=>{const a=Ao,l=K_;return y(),T("span",{onClick:o},[j(l,{index:t.fullPath},{title:we(()=>[g("span",K1,L(m(e)(t.route.meta?.title)),1)]),default:we(()=>[j(a,null,{default:we(()=>[(y(),ne(Ot(t.route.meta?.icon)))]),_:1})]),_:1},8,["index"])])}}});function Hf(t,e){return function(){return t.apply(e,arguments)}}const{toString:G1}=Object.prototype,{getPrototypeOf:xs}=Object,{iterator:Ts,toStringTag:qf}=Symbol,Os=(t=>e=>{const n=G1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=t=>(t=t.toLowerCase(),e=>Os(e)===t),$s=t=>e=>typeof e===t,{isArray:po}=Array,to=$s("undefined");function Xo(t){return t!==null&&!to(t)&&t.constructor!==null&&!to(t.constructor)&&Ht(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Wf=Cn("ArrayBuffer");function Q1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Wf(t.buffer),e}const X1=$s("string"),Ht=$s("function"),Kf=$s("number"),Jo=t=>t!==null&&typeof t=="object",J1=t=>t===!0||t===!1,Hr=t=>{if(Os(t)!=="object")return!1;const e=xs(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(qf in t)&&!(Ts in t)},Z1=t=>{if(!Jo(t)||Xo(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},eE=Cn("Date"),tE=Cn("File"),nE=t=>!!(t&&typeof t.uri<"u"),iE=t=>t&&typeof t.getParts<"u",oE=Cn("Blob"),rE=Cn("FileList"),sE=t=>Jo(t)&&Ht(t.pipe);function aE(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const wd=aE(),Ed=typeof wd.FormData<"u"?wd.FormData:void 0,lE=t=>{if(!t)return!1;if(Ed&&t instanceof Ed)return!0;const e=xs(t);if(!e||e===Object.prototype||!Ht(t.append))return!1;const n=Os(t);return n==="formdata"||n==="object"&&Ht(t.toString)&&t.toString()==="[object FormData]"},cE=Cn("URLSearchParams"),[uE,dE,hE,pE]=["ReadableStream","Request","Response","Headers"].map(Cn),fE=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zo(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,o;if(typeof t!="object"&&(t=[t]),po(t))for(i=0,o=t.length;i<o;i++)e.call(null,t[i],i,t);else{if(Xo(t))return;const r=n?Object.getOwnPropertyNames(t):Object.keys(t),s=r.length;let a;for(i=0;i<s;i++)a=r[i],e.call(null,t[a],a,t)}}function Yf(t,e){if(Xo(t))return null;e=e.toLowerCase();const n=Object.keys(t);let i=n.length,o;for(;i-- >0;)if(o=n[i],e===o.toLowerCase())return o;return null}const Oi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gf=t=>!to(t)&&t!==Oi;function cl(){const{caseless:t,skipUndefined:e}=Gf(this)&&this||{},n={},i=(o,r)=>{if(r==="__proto__"||r==="constructor"||r==="prototype")return;const s=t&&Yf(n,r)||r;Hr(n[s])&&Hr(o)?n[s]=cl(n[s],o):Hr(o)?n[s]=cl({},o):po(o)?n[s]=o.slice():(!e||!to(o))&&(n[s]=o)};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Zo(arguments[o],i);return n}const mE=(t,e,n,{allOwnKeys:i}={})=>(Zo(e,(o,r)=>{n&&Ht(o)?Object.defineProperty(t,r,{value:Hf(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),t),vE=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),gE=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},_E=(t,e,n,i)=>{let o,r,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),r=o.length;r-- >0;)s=o[r],(!i||i(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&xs(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},yE=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},bE=t=>{if(!t)return null;if(po(t))return t;let e=t.length;if(!Kf(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},wE=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&xs(Uint8Array)),EE=(t,e)=>{const i=(t&&t[Ts]).call(t);let o;for(;(o=i.next())&&!o.done;){const r=o.value;e.call(t,r[0],r[1])}},CE=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},SE=Cn("HTMLFormElement"),xE=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),Cd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),TE=Cn("RegExp"),Qf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Zo(n,(o,r)=>{let s;(s=e(o,r,t))!==!1&&(i[r]=s||o)}),Object.defineProperties(t,i)},OE=t=>{Qf(t,(e,n)=>{if(Ht(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Ht(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$E=(t,e)=>{const n={},i=o=>{o.forEach(r=>{n[r]=!0})};return po(t)?i(t):i(String(t).split(e)),n},kE=()=>{},AE=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PE(t){return!!(t&&Ht(t.append)&&t[qf]==="FormData"&&t[Ts])}const RE=t=>{const e=new Array(10),n=(i,o)=>{if(Jo(i)){if(e.indexOf(i)>=0)return;if(Xo(i))return i;if(!("toJSON"in i)){e[o]=i;const r=po(i)?[]:{};return Zo(i,(s,a)=>{const l=n(s,o+1);!to(l)&&(r[a]=l)}),e[o]=void 0,r}}return i};return n(t,0)},IE=Cn("AsyncFunction"),ME=t=>t&&(Jo(t)||Ht(t))&&Ht(t.then)&&Ht(t.catch),Xf=((t,e)=>t?setImmediate:e?((n,i)=>(Oi.addEventListener("message",({source:o,data:r})=>{o===Oi&&r===n&&i.length&&i.shift()()},!1),o=>{i.push(o),Oi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ht(Oi.postMessage)),DE=typeof queueMicrotask<"u"?queueMicrotask.bind(Oi):typeof process<"u"&&process.nextTick||Xf,FE=t=>t!=null&&Ht(t[Ts]),W={isArray:po,isArrayBuffer:Wf,isBuffer:Xo,isFormData:lE,isArrayBufferView:Q1,isString:X1,isNumber:Kf,isBoolean:J1,isObject:Jo,isPlainObject:Hr,isEmptyObject:Z1,isReadableStream:uE,isRequest:dE,isResponse:hE,isHeaders:pE,isUndefined:to,isDate:eE,isFile:tE,isReactNativeBlob:nE,isReactNative:iE,isBlob:oE,isRegExp:TE,isFunction:Ht,isStream:sE,isURLSearchParams:cE,isTypedArray:wE,isFileList:rE,forEach:Zo,merge:cl,extend:mE,trim:fE,stripBOM:vE,inherits:gE,toFlatObject:_E,kindOf:Os,kindOfTest:Cn,endsWith:yE,toArray:bE,forEachEntry:EE,matchAll:CE,isHTMLForm:SE,hasOwnProperty:Cd,hasOwnProp:Cd,reduceDescriptors:Qf,freezeMethods:OE,toObjectSet:$E,toCamelCase:xE,noop:kE,toFiniteNumber:AE,findKey:Yf,global:Oi,isContextDefined:Gf,isSpecCompliantForm:PE,toJSONObject:RE,isAsyncFn:IE,isThenable:ME,setImmediate:Xf,asap:DE,isIterable:FE};let Fe=class Jf extends Error{static from(e,n,i,o,r,s){const a=new Jf(e.message,n||e.code,i,o,r);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,n,i,o,r){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),i&&(this.config=i),o&&(this.request=o),r&&(this.response=r,this.status=r.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:W.toJSONObject(this.config),code:this.code,status:this.status}}};Fe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Fe.ERR_BAD_OPTION="ERR_BAD_OPTION";Fe.ECONNABORTED="ECONNABORTED";Fe.ETIMEDOUT="ETIMEDOUT";Fe.ERR_NETWORK="ERR_NETWORK";Fe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Fe.ERR_DEPRECATED="ERR_DEPRECATED";Fe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Fe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Fe.ERR_CANCELED="ERR_CANCELED";Fe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Fe.ERR_INVALID_URL="ERR_INVALID_URL";Fe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LE=null;function ul(t){return W.isPlainObject(t)||W.isArray(t)}function Zf(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function oa(t,e,n){return t?t.concat(e).map(function(o,r){return o=Zf(o),!n&&r?"["+o+"]":o}).join(n?".":""):e}function jE(t){return W.isArray(t)&&!t.some(ul)}const NE=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function ks(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,C){return!W.isUndefined(C[_])});const i=n.metaTokens,o=n.visitor||d,r=n.dots,s=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=a&&W.isSpecCompliantForm(e);if(!W.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(W.isDate(p))return p.toISOString();if(W.isBoolean(p))return p.toString();if(!c&&W.isBlob(p))throw new Fe("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(p)||W.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,_,C){let w=p;if(W.isReactNative(e)&&W.isReactNativeBlob(p))return e.append(oa(C,_,r),u(p)),!1;if(p&&!C&&typeof p=="object"){if(W.endsWith(_,"{}"))_=i?_:_.slice(0,-2),p=JSON.stringify(p);else if(W.isArray(p)&&jE(p)||(W.isFileList(p)||W.endsWith(_,"[]"))&&(w=W.toArray(p)))return _=Zf(_),w.forEach(function(b,S){!(W.isUndefined(b)||b===null)&&e.append(s===!0?oa([_],S,r):s===null?_:_+"[]",u(b))}),!1}return ul(p)?!0:(e.append(oa(C,_,r),u(p)),!1)}const h=[],v=Object.assign(NE,{defaultVisitor:d,convertValue:u,isVisitable:ul});function f(p,_,C=0){if(!W.isUndefined(p)){if(C>l)throw new Fe("Object is too deeply nested ("+C+" levels). Max depth: "+l,Fe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+_.join("."));h.push(p),W.forEach(p,function(E,b){(!(W.isUndefined(E)||E===null)&&o.call(e,E,W.isString(b)?b.trim():b,_,v))===!0&&f(E,_?_.concat(b):[b],C+1)}),h.pop()}}if(!W.isObject(t))throw new TypeError("data must be an object");return f(t),e}function Sd(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(i){return e[i]})}function pc(t,e){this._pairs=[],t&&ks(t,this,e)}const em=pc.prototype;em.append=function(e,n){this._pairs.push([e,n])};em.toString=function(e){const n=e?function(i){return e.call(this,i,Sd)}:Sd;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function UE(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tm(t,e,n){if(!e)return t;const i=n&&n.encode||UE,o=W.isFunction(n)?{serialize:n}:n,r=o&&o.serialize;let s;if(r?s=r(e,o):s=W.isURLSearchParams(e)?e.toString():new pc(e,o).toString(i),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class xd{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,function(i){i!==null&&e(i)})}}const fc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},zE=typeof URLSearchParams<"u"?URLSearchParams:pc,VE=typeof FormData<"u"?FormData:null,BE=typeof Blob<"u"?Blob:null,HE={isBrowser:!0,classes:{URLSearchParams:zE,FormData:VE,Blob:BE},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",dl=typeof navigator=="object"&&navigator||void 0,qE=mc&&(!dl||["ReactNative","NativeScript","NS"].indexOf(dl.product)<0),WE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",KE=mc&&window.location.href||"http://localhost",YE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:qE,hasStandardBrowserWebWorkerEnv:WE,navigator:dl,origin:KE},Symbol.toStringTag,{value:"Module"})),kt={...YE,...HE};function GE(t,e){return ks(t,new kt.classes.URLSearchParams,{visitor:function(n,i,o,r){return kt.isNode&&W.isBuffer(n)?(this.append(i,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}function QE(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function XE(t){const e={},n=Object.keys(t);let i;const o=n.length;let r;for(i=0;i<o;i++)r=n[i],e[r]=t[r];return e}function nm(t){function e(n,i,o,r){let s=n[r++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=r>=n.length;return s=!s&&W.isArray(o)?o.length:s,l?(W.hasOwnProp(o,s)?o[s]=W.isArray(o[s])?o[s].concat(i):[o[s],i]:o[s]=i,!a):((!o[s]||!W.isObject(o[s]))&&(o[s]=[]),e(n,i,o[s],r)&&W.isArray(o[s])&&(o[s]=XE(o[s])),!a)}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,(i,o)=>{e(QE(i),o,n,0)}),n}return null}const ji=(t,e)=>t!=null&&W.hasOwnProp(t,e)?t[e]:void 0;function JE(t,e,n){if(W.isString(t))try{return(e||JSON.parse)(t),W.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const er={transitional:fc,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",o=i.indexOf("application/json")>-1,r=W.isObject(e);if(r&&W.isHTMLForm(e)&&(e=new FormData(e)),W.isFormData(e))return o?JSON.stringify(nm(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e)||W.isReadableStream(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(r){const l=ji(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return GE(e,l).toString();if((a=W.isFileList(e))||i.indexOf("multipart/form-data")>-1){const c=ji(this,"env"),u=c&&c.FormData;return ks(a?{"files[]":e}:e,u&&new u,l)}}return r||o?(n.setContentType("application/json",!1),JE(e)):e}],transformResponse:[function(e){const n=ji(this,"transitional")||er.transitional,i=n&&n.forcedJSONParsing,o=ji(this,"responseType"),r=o==="json";if(W.isResponse(e)||W.isReadableStream(e))return e;if(e&&W.isString(e)&&(i&&!o||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e,ji(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?Fe.from(l,Fe.ERR_BAD_RESPONSE,this,null,ji(this,"response")):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],t=>{er.headers[t]={}});const ZE=W.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"]),eC=t=>{const e={};let n,i,o;return t&&t.split(`
4
4
  `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),i=s.substring(o+1).trim(),!(!n||e[n]&&ZE[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},Td=Symbol("internals"),tC=/[^\x09\x20-\x7E\x80-\xFF]/g;function nC(t){let e=0,n=t.length;for(;e<n;){const i=t.charCodeAt(e);if(i!==9&&i!==32)break;e+=1}for(;n>e;){const i=t.charCodeAt(n-1);if(i!==9&&i!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}function bo(t){return t&&String(t).trim().toLowerCase()}function iC(t){return nC(t.replace(tC,""))}function qr(t){return t===!1||t==null?t:W.isArray(t)?t.map(qr):iC(String(t))}function oC(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const rC=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ra(t,e,n,i,o){if(W.isFunction(i))return i.call(this,e,n);if(o&&(e=n),!!W.isString(e)){if(W.isString(i))return e.indexOf(i)!==-1;if(W.isRegExp(i))return i.test(e)}}function sC(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function aC(t,e){const n=W.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(o,r,s){return this[i].call(this,e,o,r,s)},configurable:!0})})}let qt=class{constructor(e){e&&this.set(e)}set(e,n,i){const o=this;function r(a,l,c){const u=bo(l);if(!u)throw new Error("header name must be a non-empty string");const d=W.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=qr(a))}const s=(a,l)=>W.forEach(a,(c,u)=>r(c,u,l));if(W.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(W.isString(e)&&(e=e.trim())&&!rC(e))s(eC(e),n);else if(W.isObject(e)&&W.isIterable(e)){let a={},l,c;for(const u of e){if(!W.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?W.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}s(a,n)}else e!=null&&r(n,e,i);return this}get(e,n){if(e=bo(e),e){const i=W.findKey(this,e);if(i){const o=this[i];if(!n)return o;if(n===!0)return oC(o);if(W.isFunction(n))return n.call(this,o,i);if(W.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=bo(e),e){const i=W.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||ra(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let o=!1;function r(s){if(s=bo(s),s){const a=W.findKey(i,s);a&&(!n||ra(i,i[a],a,n))&&(delete i[a],o=!0)}}return W.isArray(e)?e.forEach(r):r(e),o}clear(e){const n=Object.keys(this);let i=n.length,o=!1;for(;i--;){const r=n[i];(!e||ra(this,this[r],r,e,!0))&&(delete this[r],o=!0)}return o}normalize(e){const n=this,i={};return W.forEach(this,(o,r)=>{const s=W.findKey(i,r);if(s){n[s]=qr(o),delete n[r];return}const a=e?sC(r):String(r).trim();a!==r&&delete n[r],n[a]=qr(o),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return W.forEach(this,(i,o)=>{i!=null&&i!==!1&&(n[o]=e&&W.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
5
5
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(o=>i.set(o)),i}static accessor(e){const i=(this[Td]=this[Td]={accessors:{}}).accessors,o=this.prototype;function r(s){const a=bo(s);i[a]||(aC(o,s),i[a]=!0)}return W.isArray(e)?e.forEach(r):r(e),this}};qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(qt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});W.freezeMethods(qt);function sa(t,e){const n=this||er,i=e||n,o=qt.from(i.headers);let r=i.data;return W.forEach(t,function(a){r=a.call(n,r,o.normalize(),e?e.status:void 0)}),o.normalize(),r}function im(t){return!!(t&&t.__CANCEL__)}let tr=class extends Fe{constructor(e,n,i){super(e??"canceled",Fe.ERR_CANCELED,n,i),this.name="CanceledError",this.__CANCEL__=!0}};function om(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Fe("Request failed with status code "+n.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function lC(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function cC(t,e){t=t||10;const n=new Array(t),i=new Array(t);let o=0,r=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=i[r];s||(s=c),n[o]=l,i[o]=c;let d=r,h=0;for(;d!==o;)h+=n[d++],d=d%t;if(o=(o+1)%t,o===r&&(r=(r+1)%t),c-s<e)return;const v=u&&c-u;return v?Math.round(h*1e3/v):void 0}}function uC(t,e){let n=0,i=1e3/e,o,r;const s=(c,u=Date.now())=>{n=u,o=null,r&&(clearTimeout(r),r=null),t(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=i?s(c,u):(o=c,r||(r=setTimeout(()=>{r=null,s(o)},i-d)))},()=>o&&s(o)]}const ss=(t,e,n=3)=>{let i=0;const o=cC(50,250);return uC(r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,l=a!=null?Math.min(s,a):s,c=Math.max(0,l-i),u=o(c);i=Math.max(i,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a?(a-l)/u:void 0,event:r,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},Od=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},$d=t=>(...e)=>W.asap(()=>t(...e)),dC=kt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,kt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,hC=kt.hasStandardBrowserEnv?{write(t,e,n,i,o,r,s){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];W.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),W.isString(i)&&a.push(`path=${i}`),W.isString(o)&&a.push(`domain=${o}`),r===!0&&a.push("secure"),W.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pC(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function fC(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function rm(t,e,n){let i=!pC(e);return t&&(i||n===!1)?fC(t,e):e}const kd=t=>t instanceof qt?{...t}:t;function Ii(t,e){e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(c,u,d,h){return W.isPlainObject(c)&&W.isPlainObject(u)?W.merge.call({caseless:h},c,u):W.isPlainObject(u)?W.merge({},u):W.isArray(u)?u.slice():u}function o(c,u,d,h){if(W.isUndefined(u)){if(!W.isUndefined(c))return i(void 0,c,d,h)}else return i(c,u,d,h)}function r(c,u){if(!W.isUndefined(u))return i(void 0,u)}function s(c,u){if(W.isUndefined(u)){if(!W.isUndefined(c))return i(void 0,c)}else return i(void 0,u)}function a(c,u,d){if(W.hasOwnProp(e,d))return i(c,u);if(W.hasOwnProp(t,d))return i(void 0,c)}const l={url:r,method:r,data:r,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:a,headers:(c,u,d)=>o(kd(c),kd(u),d,!0)};return W.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=W.hasOwnProp(l,u)?l[u]:o,h=W.hasOwnProp(t,u)?t[u]:void 0,v=W.hasOwnProp(e,u)?e[u]:void 0,f=d(h,v,u);W.isUndefined(f)&&d!==a||(n[u]=f)}),n}const sm=t=>{const e=Ii({},t),n=h=>W.hasOwnProp(e,h)?e[h]:void 0,i=n("data");let o=n("withXSRFToken");const r=n("xsrfHeaderName"),s=n("xsrfCookieName");let a=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(e.headers=a=qt.from(a),e.url=tm(rm(c,d,u),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),W.isFormData(i)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(W.isFunction(i.getHeaders)){const h=i.getHeaders(),v=["content-type","content-length"];Object.entries(h).forEach(([f,p])=>{v.includes(f.toLowerCase())&&a.set(f,p)})}}if(kt.hasStandardBrowserEnv&&(W.isFunction(o)&&(o=o(e)),o===!0||o==null&&dC(e.url))){const v=r&&s&&hC.read(s);v&&a.set(r,v)}return e},mC=typeof XMLHttpRequest<"u",vC=mC&&function(t){return new Promise(function(n,i){const o=sm(t);let r=o.data;const s=qt.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,v,f;function p(){v&&v(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function C(){if(!_)return;const E=qt.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:t,request:_};om(function(k){n(k),p()},function(k){i(k),p()},S),_=null}"onloadend"in _?_.onloadend=C:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(C)},_.onabort=function(){_&&(i(new Fe("Request aborted",Fe.ECONNABORTED,t,_)),_=null)},_.onerror=function(b){const S=b&&b.message?b.message:"Network Error",x=new Fe(S,Fe.ERR_NETWORK,t,_);x.event=b||null,i(x),_=null},_.ontimeout=function(){let b=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const S=o.transitional||fc;o.timeoutErrorMessage&&(b=o.timeoutErrorMessage),i(new Fe(b,S.clarifyTimeoutError?Fe.ETIMEDOUT:Fe.ECONNABORTED,t,_)),_=null},r===void 0&&s.setContentType(null),"setRequestHeader"in _&&W.forEach(s.toJSON(),function(b,S){_.setRequestHeader(S,b)}),W.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),c&&([h,f]=ss(c,!0),_.addEventListener("progress",h)),l&&_.upload&&([d,v]=ss(l),_.upload.addEventListener("progress",d),_.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(u=E=>{_&&(i(!E||E.type?new tr(null,t,_):E),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const w=lC(o.url);if(w&&kt.protocols.indexOf(w)===-1){i(new Fe("Unsupported protocol "+w+":",Fe.ERR_BAD_REQUEST,t));return}_.send(r||null)})},gC=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,o;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof Fe?u:new tr(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,r(new Fe(`timeout of ${e}ms exceeded`,Fe.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),t=null)};t.forEach(c=>c.addEventListener("abort",r));const{signal:l}=i;return l.unsubscribe=()=>W.asap(a),l}},_C=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,o;for(;i<n;)o=i+e,yield t.slice(i,o),i=o},yC=async function*(t,e){for await(const n of bC(t))yield*_C(n,e)},bC=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Ad=(t,e,n,i)=>{const o=yC(t,e);let r=0,s,a=l=>{s||(s=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=r+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Pd=64*1024,{isFunction:gr}=W,wC=(({Request:t,Response:e})=>({Request:t,Response:e}))(W.global),{ReadableStream:Rd,TextEncoder:Id}=W.global,Md=(t,...e)=>{try{return!!t(...e)}catch{return!1}},EC=t=>{t=W.merge.call({skipUndefined:!0},wC,t);const{fetch:e,Request:n,Response:i}=t,o=e?gr(e):typeof fetch=="function",r=gr(n),s=gr(i);if(!o)return!1;const a=o&&gr(Rd),l=o&&(typeof Id=="function"?(f=>p=>f.encode(p))(new Id):async f=>new Uint8Array(await new n(f).arrayBuffer())),c=r&&a&&Md(()=>{let f=!1;const p=new n(kt.origin,{body:new Rd,method:"POST",get duplex(){return f=!0,"half"}}),_=p.headers.has("Content-Type");return p.body!=null&&p.body.cancel(),f&&!_}),u=s&&a&&Md(()=>W.isReadableStream(new i("").body)),d={stream:u&&(f=>f.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(p,_)=>{let C=p&&p[f];if(C)return C.call(p);throw new Fe(`Response type '${f}' is not supported`,Fe.ERR_NOT_SUPPORT,_)})});const h=async f=>{if(f==null)return 0;if(W.isBlob(f))return f.size;if(W.isSpecCompliantForm(f))return(await new n(kt.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(W.isArrayBufferView(f)||W.isArrayBuffer(f))return f.byteLength;if(W.isURLSearchParams(f)&&(f=f+""),W.isString(f))return(await l(f)).byteLength},v=async(f,p)=>{const _=W.toFiniteNumber(f.getContentLength());return _??h(p)};return async f=>{let{url:p,method:_,data:C,signal:w,cancelToken:E,timeout:b,onDownloadProgress:S,onUploadProgress:x,responseType:k,headers:O,withCredentials:K="same-origin",fetchOptions:D}=sm(f),P=e||fetch;k=k?(k+"").toLowerCase():"text";let U=gC([w,E&&E.toAbortSignal()],b),M=null;const q=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let le;try{if(x&&c&&_!=="get"&&_!=="head"&&(le=await v(O,C))!==0){let z=new n(p,{method:"POST",body:C,duplex:"half"}),ie;if(W.isFormData(C)&&(ie=z.headers.get("content-type"))&&O.setContentType(ie),z.body){const[ve,re]=Od(le,ss($d(x)));C=Ad(z.body,Pd,ve,re)}}W.isString(K)||(K=K?"include":"omit");const de=r&&"credentials"in n.prototype;if(W.isFormData(C)){const z=O.getContentType();z&&/^multipart\/form-data/i.test(z)&&!/boundary=/i.test(z)&&O.delete("content-type")}const Y={...D,signal:U,method:_.toUpperCase(),headers:O.normalize().toJSON(),body:C,duplex:"half",credentials:de?K:void 0};M=r&&new n(p,Y);let I=await(r?P(M,D):P(p,Y));const A=u&&(k==="stream"||k==="response");if(u&&(S||A&&q)){const z={};["status","statusText","headers"].forEach(ge=>{z[ge]=I[ge]});const ie=W.toFiniteNumber(I.headers.get("content-length")),[ve,re]=S&&Od(ie,ss($d(S),!0))||[];I=new i(Ad(I.body,Pd,ve,()=>{re&&re(),q&&q()}),z)}k=k||"text";let Q=await d[W.findKey(d,k)||"text"](I,f);return!A&&q&&q(),await new Promise((z,ie)=>{om(z,ie,{data:Q,headers:qt.from(I.headers),status:I.status,statusText:I.statusText,config:f,request:M})})}catch(de){throw q&&q(),de&&de.name==="TypeError"&&/Load failed|fetch/i.test(de.message)?Object.assign(new Fe("Network Error",Fe.ERR_NETWORK,f,M,de&&de.response),{cause:de.cause||de}):Fe.from(de,de&&de.code,f,M,de&&de.response)}}},CC=new Map,am=t=>{let e=t&&t.env||{};const{fetch:n,Request:i,Response:o}=e,r=[i,o,n];let s=r.length,a=s,l,c,u=CC;for(;a--;)l=r[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:EC(e)),u=c;return c};am();const vc={http:LE,xhr:vC,fetch:{get:am}};W.forEach(vc,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Dd=t=>`- ${t}`,SC=t=>W.isFunction(t)||t===null||t===!1;function xC(t,e){t=W.isArray(t)?t:[t];const{length:n}=t;let i,o;const r={};for(let s=0;s<n;s++){i=t[s];let a;if(o=i,!SC(i)&&(o=vc[(a=String(i)).toLowerCase()],o===void 0))throw new Fe(`Unknown adapter '${a}'`);if(o&&(W.isFunction(o)||(o=o.get(e))))break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
6
6
  `+s.map(Dd).join(`
@@ -8,7 +8,7 @@ import{aA as Ko,m as te,I as Ce,ak as ze,O as y,Q as ne,Y as we,a2 as j,u as m,a
8
8
  `);return s===-1?"":o.stack.slice(s+1)})();try{if(!i.stack)i.stack=r;else if(r){const s=r.indexOf(`
9
9
  `),a=s===-1?-1:r.indexOf(`
10
10
  `,s+1),l=a===-1?"":r.slice(a+1);String(i.stack).endsWith(l)||(i.stack+=`
11
- `+r)}}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ii(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:r}=n;i!==void 0&&Wr.assertOptions(i,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean),legacyInterceptorReqResOrdering:on.transitional(on.boolean)},!1),o!=null&&(W.isFunction(o)?n.paramsSerializer={serialize:o}:Wr.assertOptions(o,{encode:on.function,serialize:on.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wr.assertOptions(n,{baseUrl:on.spelling("baseURL"),withXsrfToken:on.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=r&&W.merge(r.common,r[n.method]);r&&W.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),n.headers=qt.concat(s,r);const a=[];let l=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(n)===!1)return;l=l&&p.synchronous;const _=n.transitional||fc;_&&_.legacyInterceptorReqResOrdering?a.unshift(p.fulfilled,p.rejected):a.push(p.fulfilled,p.rejected)});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const f=[Fd.bind(this),void 0];for(f.unshift(...a),f.push(...c),h=f.length,u=Promise.resolve(n);d<h;)u=u.then(f[d++],f[d++]);return u}h=a.length;let v=n;for(;d<h;){const f=a[d++],p=a[d++];try{v=f(v)}catch(_){p.call(this,_);break}}try{u=Fd.call(this,v)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=Ii(this.defaults,e);const n=rm(e.baseURL,e.url,e.allowAbsoluteUrls);return tm(n,e.params,e.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(e){$i.prototype[e]=function(n,i){return this.request(Ii(i||{},{method:e,url:n,data:(i||{}).data}))}});W.forEach(["post","put","patch"],function(e){function n(i){return function(r,s,a){return this.request(Ii(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}$i.prototype[e]=n(),$i.prototype[e+"Form"]=n(!0)});let OC=class um{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const i=this;this.promise.then(o=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](o);i._listeners=null}),this.promise.then=o=>{let r;const s=new Promise(a=>{i.subscribe(a),r=a}).then(o);return s.cancel=function(){i.unsubscribe(r)},s},e(function(r,s,a){i.reason||(i.reason=new tr(r,s,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new um(function(o){e=o}),cancel:e}}};function $C(t){return function(n){return t.apply(null,n)}}function kC(t){return W.isObject(t)&&t.isAxiosError===!0}const hl={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(hl).forEach(([t,e])=>{hl[e]=t});function dm(t){const e=new $i(t),n=Hf($i.prototype.request,e);return W.extend(n,$i.prototype,e,{allOwnKeys:!0}),W.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return dm(Ii(t,o))},n}const ht=dm(er);ht.Axios=$i;ht.CanceledError=tr;ht.CancelToken=OC;ht.isCancel=im;ht.VERSION=cm;ht.toFormData=ks;ht.AxiosError=Fe;ht.Cancel=ht.CanceledError;ht.all=function(e){return Promise.all(e)};ht.spread=$C;ht.isAxiosError=kC;ht.mergeConfig=Ii;ht.AxiosHeaders=qt;ht.formToJSON=t=>nm(W.isHTMLForm(t)?new FormData(t):t);ht.getAdapter=lm.getAdapter;ht.HttpStatusCode=hl;ht.default=ht;const{Axios:dz,AxiosError:hz,CanceledError:pz,isCancel:fz,CancelToken:mz,VERSION:vz,all:gz,Cancel:_z,isAxiosError:yz,spread:bz,toFormData:wz,AxiosHeaders:Ez,HttpStatusCode:jd,formToJSON:Cz,getAdapter:Sz,mergeConfig:xz}=ht,hm=new Map,AC={baseURL:"",timeout:1e4};function Nd(t,e){const n=ht.create({...AC,...e});return hm.set(t,n),n}function PC(t="default"){const e=hm.get(t);if(!e)throw new Error(`Instance "${t}" not initialized. Call initInstance() first.`);return e}async function Ee(t,e){const n=t.split("/")[0],i=PC(n);return t=t.replace(n,""),i.request({url:t,...e})}async function RC(t,e){return Ee("__local__/api/v1/comp/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function IC(t,e){return Ee("__local__/api/v1/comp/checkCompRepeat",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function MC(t,e){return Ee("__local__/api/v1/comp/compFileHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function DC(t,e){return Ee("__local__/api/v1/comp/compFilesOssSignedUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function FC(t,e){return Ee("__local__/api/v1/comp/dep",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function LC(t,e){return Ee("__local__/api/v1/comp/dir",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function jC(t,e){return Ee("__local__/api/v1/comp/download",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function NC(t,e){return Ee("__local__/api/v1/comp/file",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function UC(t,e){return Ee("__local__/api/v1/comp/generateCompJson",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function zC(t,e){return Ee("__local__/api/v1/comp/localCompDetailByPathHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function VC(t,e){return Ee("__local__/api/v1/comp/localComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function BC(t,e){return Ee("__local__/api/v1/comp/localCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function HC(t,e){return Ee("__local__/api/v1/comp/openCompPathInVscode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function qC(t){return Ee("__local__/api/v1/comp/packageJson",{method:"POST",...t||{}})}async function WC(t,e){return Ee("__local__/api/v1/comp/submit",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function KC(t,e){return Ee("__local__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function YC(t,e){return Ee("__local__/api/v1/comp/updateVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function GC(t,e){return Ee("__local__/api/v1/comp/writeFile",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const QC=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheck:RC,compcontrollerCheckcomprepeat:IC,compcontrollerCompfilehash:MC,compcontrollerCompfilesosssignedurl:DC,compcontrollerDep:FC,compcontrollerDir:LC,compcontrollerDownload:jC,compcontrollerFile:NC,compcontrollerGeneratecompjson:UC,compcontrollerLocalcompdetailbypathhash:zC,compcontrollerLocalcomps:VC,compcontrollerLocalcompsbyids:BC,compcontrollerOpencomppathinvscode:HC,compcontrollerPackagejson:qC,compcontrollerSubmit:WC,compcontrollerUpdate:KC,compcontrollerUpdateversion:YC,compcontrollerWritefile:GC},Symbol.toStringTag,{value:"Module"}));async function XC(t){return Ee("__local__/api/v1/module/clearPreBuild",{method:"POST",...t||{}})}async function JC(t,e){return Ee("__local__/api/v1/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ZC(t){return Ee("__local__/api/v1/module/preBuildSize",{method:"POST",...t||{}})}const eS=Object.freeze(Object.defineProperty({__proto__:null,modulecontrollerClearprebuild:XC,modulecontrollerPrebuild:JC,modulecontrollerPrebuildsize:ZC},Symbol.toStringTag,{value:"Module"}));async function tS(t,e){return Ee("__local__/api/v1/oss/fileSignUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const nS=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerFilesignurl:tS},Symbol.toStringTag,{value:"Module"}));async function iS(t,e){return Ee("__local__/api/v1/preprocessing/preprocess",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const oS=Object.freeze(Object.defineProperty({__proto__:null,preprocessingcontrollerPreprocess:iS},Symbol.toStringTag,{value:"Module"}));async function rS(t,e){return Ee("__local__/api/v1/vuefinder/list",{method:"GET",params:{...t},...e||{}})}const sS=Object.freeze(Object.defineProperty({__proto__:null,vuefindercontrollerList:rS},Symbol.toStringTag,{value:"Module"})),aS={v1Comp:QC,v1Module:eS,v1Oss:nS,v1Preprocessing:oS,v1Vuefinder:sS};async function lS(t,e){return Ee("__remote__/api/v1/comp/checkCompExistByHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function cS(t,e){return Ee("__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function uS(t,e){return Ee("__remote__/api/v1/comp/checkVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function dS(t,e){return Ee("__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function hS(t,e){return Ee("__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function pS(t,e){return Ee("__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function fS(t,e){return Ee("__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function mS(t,e){return Ee("__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function vS(t,e){return Ee("__remote__/api/v1/comp/compsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function gS(t,e){return Ee("__remote__/api/v1/comp/deleteFailedComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function _S(t,e){return Ee("__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function yS(t,e){return Ee("__remote__/api/v1/comp/existCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function bS(t,e){return Ee("__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function wS(t,e){return Ee("__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ES(t,e){return Ee("__remote__/api/v1/comp/softDelete",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function CS(t,e){return Ee("__remote__/api/v1/comp/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function SS(t,e){return Ee("__remote__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function xS(t,e){return Ee("__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function TS(t,e){return Ee("__remote__/api/v1/comp/updateCompDownloadCount",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function OS(t,e){return Ee("__remote__/api/v1/comp/updateObjectId",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function $S(t,e){return Ee("__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function kS(t,e){return Ee("__remote__/api/v1/comp/upload",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function AS(t,e){return Ee("__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const PS=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheckcompexistbyhash:lS,compcontrollerCheckcompexistbyid:cS,compcontrollerCheckversion:uS,compcontrollerCollect:dS,compcontrollerCollectedcomps:hS,compcontrollerCompdetail:pS,compcontrollerComphash:fS,compcontrollerComps:mS,compcontrollerCompsbyids:vS,compcontrollerDeletefailedcomp:gS,compcontrollerDeletemycomp:_S,compcontrollerExistcompsbyids:yS,compcontrollerMycomps:bS,compcontrollerSimilarcomps:wS,compcontrollerSoftdelete:ES,compcontrollerTags:CS,compcontrollerUpdate:SS,compcontrollerUpdatebasicinfo:xS,compcontrollerUpdatecompdownloadcount:TS,compcontrollerUpdateobjectid:OS,compcontrollerUpgraderecords:$S,compcontrollerUpload:kS,compcontrollerVersions:AS},Symbol.toStringTag,{value:"Module"}));async function RS(t){return Ee("__remote__/api/v1/csrf/csrf",{method:"GET",...t||{}})}const IS=Object.freeze(Object.defineProperty({__proto__:null,csrfcontrollerGetcsrftoken:RS},Symbol.toStringTag,{value:"Module"}));async function MS(t,e){return Ee("__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const DS=Object.freeze(Object.defineProperty({__proto__:null,emailcontrollerSendcode:MS},Symbol.toStringTag,{value:"Module"}));async function FS(t,e){return Ee("__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const LS=Object.freeze(Object.defineProperty({__proto__:null,keywordcontrollerQuerykeywordscomp:FS},Symbol.toStringTag,{value:"Module"}));async function jS(t){return Ee("__remote__/api/v1/oss/compOssDir",{method:"POST",...t||{}})}async function NS(t){return Ee("__remote__/api/v1/oss/getSts",{method:"POST",...t||{}})}async function US(t,e){return Ee("__remote__/api/v1/oss/putPolicy",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const zS=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerCompossdir:jS,osscontrollerGetsts:NS,osscontrollerPutpolicy:US},Symbol.toStringTag,{value:"Module"}));async function VS(t,e){return Ee("__remote__/api/v1/team/addToTeamMyComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function BS(t){return Ee("__remote__/api/v1/team/allMember",{method:"POST",...t||{}})}async function HS(t,e){return Ee("__remote__/api/v1/team/applyList",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function qS(t,e){return Ee("__remote__/api/v1/team/checkCompUpdatePermission",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function WS(t,e){return Ee("__remote__/api/v1/team/copyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function KS(t,e){return Ee("__remote__/api/v1/team/create",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function YS(t){return Ee("__remote__/api/v1/team/created",{method:"POST",...t||{}})}async function GS(t,e){return Ee("__remote__/api/v1/team/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function QS(t){return Ee("__remote__/api/v1/team/detail",{method:"POST",...t||{}})}async function XS(t){return Ee("__remote__/api/v1/team/exit",{method:"POST",...t||{}})}async function JS(t,e){return Ee("__remote__/api/v1/team/findByCode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ZS(t,e){return Ee("__remote__/api/v1/team/handleApply",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function e2(t,e){return Ee("__remote__/api/v1/team/join",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function t2(t){return Ee("__remote__/api/v1/team/joined",{method:"POST",...t||{}})}async function n2(t,e){return Ee("__remote__/api/v1/team/kickOut",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function i2(t,e){return Ee("__remote__/api/v1/team/member",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function o2(t,e){return Ee("__remote__/api/v1/team/myTeamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function r2(t,e){return Ee("__remote__/api/v1/team/removeComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function s2(t,e){return Ee("__remote__/api/v1/team/removeMyTeamComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function a2(t,e){return Ee("__remote__/api/v1/team/teamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function l2(t,e){return Ee("__remote__/api/v1/team/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function c2(t,e){return Ee("__remote__/api/v1/team/updateCompCanUpdateUsers",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function u2(t,e){return Ee("__remote__/api/v1/team/updateMenu",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function d2(t,e){return Ee("__remote__/api/v1/team/updateTeamUserNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const h2=Object.freeze(Object.defineProperty({__proto__:null,teamcontrollerAddtoteammycomps:VS,teamcontrollerAllmember:BS,teamcontrollerApplylist:HS,teamcontrollerCheckcompupdatepermission:qS,teamcontrollerCopycomp:WS,teamcontrollerCreate:KS,teamcontrollerCreated:YS,teamcontrollerDelete:GS,teamcontrollerDetail:QS,teamcontrollerExit:XS,teamcontrollerFindbycode:JS,teamcontrollerHandleapply:ZS,teamcontrollerJoin:e2,teamcontrollerJoined:t2,teamcontrollerKickout:n2,teamcontrollerMember:i2,teamcontrollerMyteamcomps:o2,teamcontrollerRemovecompfromteam:r2,teamcontrollerRemovemyteamcomp:s2,teamcontrollerTeamcomps:a2,teamcontrollerUpdate:l2,teamcontrollerUpdatecompcanupdateusers:c2,teamcontrollerUpdatemenu:u2,teamcontrollerUpdateteamusernickname:d2},Symbol.toStringTag,{value:"Module"}));async function p2(t){return Ee("__remote__/api/v1/token/approachExpire",{method:"POST",...t||{}})}async function f2(t){return Ee("__remote__/api/v1/token/refresh",{method:"POST",...t||{}})}const m2=Object.freeze(Object.defineProperty({__proto__:null,tokencontrollerApproachexpire:p2,tokencontrollerRefresh:f2},Symbol.toStringTag,{value:"Module"}));async function v2(t,e){return Ee("__remote__/api/v1/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function g2(t){return Ee("__remote__/api/v1/upgrade/logs",{method:"POST",...t||{}})}async function _2(t,e){return Ee("__remote__/api/v1/upgrade/publish",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const y2=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerCheck:v2,upgradecontrollerLogs:g2,upgradecontrollerPublish:_2},Symbol.toStringTag,{value:"Module"}));async function b2(t,e){return Ee("__remote__/api/v1/user/changeAvatar",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function w2(t,e){return Ee("__remote__/api/v1/user/changeNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function E2(t,e){return Ee("__remote__/api/v1/user/changePassword",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function C2(t){return Ee("__remote__/api/v1/user/checkPassword",{method:"POST",...t||{}})}async function S2(t,e){return Ee("__remote__/api/v1/user/login",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function x2(t,e){return Ee("__remote__/api/v1/user/setAllowEmailLogin",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function T2(t,e){return Ee("__remote__/api/v1/user/updateEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function O2(t){return Ee("__remote__/api/v1/user/userInfo",{method:"POST",...t||{}})}async function $2(t){return Ee("__remote__/api/v1/user/whoAmI",{method:"POST",...t||{}})}const k2=Object.freeze(Object.defineProperty({__proto__:null,usercontrollerChangeavatar:b2,usercontrollerChangenickname:w2,usercontrollerChangepassword:E2,usercontrollerCheckpassword:C2,usercontrollerLogin:S2,usercontrollerSetallowemaillogin:x2,usercontrollerUpdateemail:T2,usercontrollerUserinfo:O2,usercontrollerWhoami:$2},Symbol.toStringTag,{value:"Module"}));async function A2(t,e){return Ee("__remote__/api/v2/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const P2=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerv2Check:A2},Symbol.toStringTag,{value:"Module"})),ki={v1Comp:PS,v1Csrf:IS,v1Email:DS,v1Keyword:LS,v1Oss:zS,v1Team:h2,v1Token:m2,v1Upgrade:y2,v1User:k2,v2Upgrade:P2},R2=vi("personalStore",{state:()=>({userInfo:{},isPasswordSet:!1}),getters:{isAllowEmailLogin(t){return t.userInfo?.isAllowEmailLogin??!1}},actions:{setUserInfo(t){this.$patch(e=>{e.userInfo=t})},setIsPasswordSet(t){this.$patch(e=>{e.isPasswordSet=t})},async initUserInfo(){const t=await ki.v1User.usercontrollerUserinfo();t.code===0&&this.setUserInfo(t.data)},async setEmail(t){this.$patch(e=>{e.userInfo.email=t})},async setNickname(t){this.$patch(e=>{e.userInfo.nickname=t})},async setAllowEmailLogin(t){await ki.v1User.usercontrollerSetallowemaillogin({allow:t}).then(()=>{this.$patch(e=>{e.userInfo.isAllowEmailLogin=t})})}}}),I2=vi("moduleStore",{state:()=>({modules:{}}),actions:{setModules(t,e){this.$patch(n=>{n.modules[t]=e})},async loadModule(t){if(this.modules[t])return this.modules[t];const e=await import(t);return this.setModules(t,e),e}}}),_r=Ji(z0,!0),gc=vi("appStore",{state:()=>({}),getters:{collapse(){return _r.value}},actions:{toggleSideBar(){_r.value=!_r.value},setSideBarCollapse(t){t!==this.collapse&&(_r.value=t)}}}),M2=vi("team",{state:()=>({joinedTeams:[],createdTeams:[]}),actions:{setJoinedTeams(t){this.$patch(e=>{e.joinedTeams=t})},setCreatedTeams(t){this.$patch(e=>{e.createdTeams=t})},removeCreatedTeam(t){this.$patch(e=>{e.createdTeams=e.createdTeams.filter(n=>n._id!==t)})},addCreatedTeam(t){this.$patch(e=>{e.createdTeams.some(i=>i._id===t._id)||e.createdTeams.push(t)})},addJoinedTeam(t){this.$patch(e=>{e.joinedTeams.some(i=>i._id===t._id)||e.joinedTeams.push(t)})},removeJoinedTeam(t){this.$patch(e=>{e.joinedTeams=e.joinedTeams.filter(n=>n._id!==t)})},updateCreatedTeamItemById(t,e){this.$patch(n=>{const i=n.createdTeams.findIndex(o=>o._id===t);i!==-1&&(n.createdTeams[i]=e)})},getTeamDetail(t){return this.joinedTeams.find(n=>n._id===t)||this.createdTeams.find(n=>n._id===t)}}});function yr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)i!=="__proto__"&&(t[i]=n[i])}return t}var D2={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function pl(t,e){function n(o,r,s){if(!(typeof document>"u")){s=yr({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=o+"="+t.write(r,o)+a}}function i(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var r=document.cookie?document.cookie.split("; "):[],s={},a=0;a<r.length;a++){var l=r[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(u in s||(s[u]=t.read(c,u)),o===u)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:i,remove:function(o,r){n(o,"",yr({},r,{expires:-1}))},withAttributes:function(o){return pl(this.converter,yr({},this.attributes,o))},withConverter:function(o){return pl(yr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var pm=pl(D2,{path:"/"});const F2={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:"更新记录",openInNewPage:"新页面打开",depInstall:"依赖安装",fullscreen:"全屏",exitFullscreen:"退出全屏",maximizeRestore:"最大化/还原",siteSlogan:"原子化组件社区,让组件流通更简单。",siteSubtitle:"Vue 组件共享平台",docsTutorial:"文档教程",empty:"暂无数据",noReadme:"组件没有配置README.md文件",dragSort:"拖拽排序",filter:"筛选",apply:"应用",person:"人",unit:"个",pleaseSelect:"请选择",pleaseInput:"请输入",me:"我",generate:"生成",regenerate:"重新生成",generateSuccess:"生成成功",moreOperations:"更多操作",more:"更多",maxTagCount:"最大标签数量"},L2={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} 个字符",version:"组件版本",detail:"组件详情",preview:"组件预览",previewConfig:"预览配置",previewList:"预览列表",uploadPreview:"组件上传预览",updatePreview:"组件更新预览",download:"下载组件",update:"更新组件",upload:"上传组件",submit:"提交组件",edit:"编辑组件",add:"添加组件",delete:"删除组件",local:"本地组件",remote:"远程组件",online:"在线组件",similar:"相似组件",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:"在 VS Code 中打开",openingInEditor:"在编辑器中打开...",updateSuccess:"更新成功",downloadVersionConfirm:"当前选择的版本为:{version},确认下载吗?",downloading:"组件下载中...",downloadPathConfirm:"是否下载组件到【{path}】路径下",downloadCoverConfirm:"组件【{name}】已经下载或者有同名组件,是否覆盖?",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 删除"}},j2={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:"支持创建分组菜单,灵活组织团队组件"},N2={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:"修改邮箱",basicInfo:"基本信息",securitySettings:"安全设置",loginPassword:"登录密码",passwordTip:"建议定期更换密码,确保账号安全",setPassword:"设置密码",emailLogin:"邮箱登录",emailLoginTip:"允许使用邮箱作为登录账号",pleaseSetPasswordFirst:"请先设置登录密码",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:"登录成功",userInfo:"用户信息",personalCenter:"个人中心",myComp:"我的组件",notLoggedIn:"未登录",goLogin:"去登录"},U2={title:"文件",name:"文件名",path:"文件路径",size:"文件大小",type:"文件类型",dir:"文件夹",selectDir:"选择文件夹",upload:"文件上传",download:"文件下载",select:"选择",multiSelect:"不支持多选",onlyDir:"只能选择文件夹",rootDir:"根目录",projectPath:"项目路径",currentDir:"当前目录",parentDir:"上级目录",refreshDir:"刷新文件夹列表"},z2={success:{download:"下载成功",update:"更新成功",delete:"删除成功",collect:"收藏成功",uncollect:"取消收藏成功",save:"保存成功",submit:"提交成功",upload:"上传成功",copy:"复制成功",operation:"操作成功",sendAuthCode:"验证码已发送",exitTeam:"退出成功"},error:{download:"下载失败",update:"更新失败",delete:"删除失败",collect:"收藏失败",uncollect:"取消收藏失败",save:"保存失败",submit:"提交失败",upload:"上传失败",copy:"复制失败",operation:"操作失败",load:"加载失败",network:"网络错误",timeout:"请求超时",unknown:"未知错误",pleaseFixCompileError:"请先处理编译错误",loginExpired:"登录已过期,请重新登录",refreshFailed:"刷新失败",requestFailed:"请求失败,请联系管理员",storageNotSupported:"浏览器不支持 storage.estimate API"},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!"}},V2={404:"页面不存在",share:"组件市场",collect:"收藏组件",collectSimple:"收藏",mine:"我的组件",mineSimple:"我的",local:"本地组件",localSimple:"本地",team:"团队",upload:"上传组件",uploadSimple:"上传",uploadTeam:"上传团队组件",setting:"设置",userInfo:"用户信息",upgrade:"更新",terminal:"终端",preview:"组件预览",previewLocal:"本地组件预览",previewTeam:"团队组件预览",previewBlank:"预览",similarPreview:"相似组件预览",login:"登录",mdPreview:"文档预览",unknownTag:"未知标签"},B2={parse:"解析 Markdown",loading:"加载 Markdown",error:"加载失败",toc:"目录",anchor:"锚点"},H2={title:"终端",open:"打开终端",close:"关闭终端",execute:"执行命令",shutdown:"关闭进程",timeout:"超时时间",disconnected:"终端已断开连接"},q2={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)"}},W2={title:"设置",previewRule:"预览规则",other:"其他设置",theme:"主题",language:"语言",darkMode:"暗黑模式",lightMode:"明亮模式"},K2={title:"版本更新",current:"当前版本",latest:"最新版本",check:"检查更新",upgrading:"更新中",upgraded:"已更新",publish:"发布更新",record:"更新记录",log:"更新日志",hasUpdate:"有更新",betaVersion:"内测版",noUpdate:"暂无更新",updateMethod:"更新方式",openTerminalAndRun:"打开终端,执行以下命令:",cannotIgnoreUpdate:"不可忽略此次更新"},Y2={systemRecommended:"系统推荐",all:"全部",latest:"最新",hottest:"最热"},G2={submit:"提交"},Q2={empty:"不能为空",notString:"必须是字符串类型,当前类型为: {type}",contentEmpty:"内容不能为空",startsWithNumber:'内容不能以数字开头,当前以 "{char}" 开头',invalidCharBacktick:"内容包含反引号(Markdown 语法标记),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharNewline:"内容包含换行符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharCarriageReturn:"内容包含回车符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharTab:"内容包含制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharFormFeed:"内容包含换页符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharVerticalTab:"内容包含垂直制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHash:"内容包含 # 字符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHtmlSpecial:'内容包含 HTML 特殊字符 "{char}",特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格',invalidCharUnknown:'内容包含非法字符 "{char}"(Unicode: U+{code}),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格'},X2={openInEditor:"在编辑器中打开",current:"当前",noRegistered:"暂无已注册项目",deregisterTitle:"注销项目",deregisterConfirm:"确定要注销项目 {hash} ({cwd}) 吗?",deregisterSuccess:"已注销项目 {hash}",deregisterFailed:"注销失败"},J2={common:F2,comp:L2,team:j2,user:N2,file:U2,message:z2,route:V2,markdown:B2,terminal:H2,deps:q2,setting:W2,upgrade:K2,tag:Y2,formCreate:G2,validateHash:Q2,project:X2},Z2={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",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",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"},ex={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",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",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 VS Code",openingInEditor:"Opening in editor...",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?",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"}},tx={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"},nx={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",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",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",userInfo:"User Info",personalCenter:"Personal Center",myComp:"My Components",notLoggedIn:"Not logged in",goLogin:"Go to Login"},ix={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"},ox={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"},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"},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!"}},rx={404:"Page Not Found",share:"Component Market",collect:"Collected Components",collectSimple:"Collection",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",mdPreview:"Document Preview",unknownTag:"Unknown Tag"},sx={parse:"Parse Markdown",loading:"Loading Markdown",error:"Load failed",toc:"Table of Contents",anchor:"Anchor"},ax={title:"Terminal",open:"Open Terminal",close:"Close Terminal",execute:"Execute Command",shutdown:"Shutdown Process",timeout:"Timeout",disconnected:"Terminal disconnected"},lx={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)"}},cx={title:"Settings",previewRule:"Preview Rule",other:"Other Settings",theme:"Theme",language:"Language",darkMode:"Dark Mode",lightMode:"Light Mode"},ux={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"},dx={systemRecommended:"System Recommended",all:"All",latest:"Latest",hottest:"Hottest"},hx={submit:"Submit"},px={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'},fx={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"},mx={common:Z2,comp:ex,team:tx,user:nx,file:ix,message:ox,route:rx,markdown:sx,terminal:ax,deps:lx,setting:cx,upgrade:ux,tag:dx,formCreate:hx,validateHash:px,project:fx},vx={zh:J2,en:mx},gx=localStorage.getItem(Tb.LOCALE_KEY)||"zh",fm=m_({locale:gx,messages:vx,legacy:!1});function mm(t){t.use(fm)}const _c=Object.freeze(Object.defineProperty({__proto__:null,i18n:fm,setup:mm},Symbol.toStringTag,{value:"Module"}));function _x({store:t}){t.$subscribe((...e)=>{const[n]=e;if(n.type==="direct")throw new Error("不允许直接修改store,建议使用action修改")})}const fl=v_();function vm(t){fl.use(_x),t.use(fl)}const yx=Object.freeze(Object.defineProperty({__proto__:null,pinia:fl,setup:vm},Symbol.toStringTag,{value:"Module"}));function bx(t){t.component("Icon",Qw)}const{i18n:br}=_c,{pinia:la}=yx,Qi=vi("userStore",{state:()=>({userInfo:{},logoutDialogOpen:!1}),getters:{userId:t=>t.userInfo._id,displayName(t){return t.userInfo.nickname||t.userInfo.account||br.global.t("user.notLoggedIn")},avatar:t=>t.userInfo.avatar,avatarStr(t){return t.userInfo.nickname?.[0]||t.userInfo.account?.[0]||""}},actions:{async fetchCsrfToken(){pm.get(bt.CSRF_KEY)||await ki.v1Csrf.csrfcontrollerGetcsrftoken()},updateAvatar(t){this.$patch(e=>{e.userInfo&&(e.userInfo.avatar=t)})},updateNickname(t){this.$patch(e=>{e.userInfo&&(e.userInfo.nickname=t)})},setLogoutDialogOpen(t){this.$patch(e=>{e.logoutDialogOpen=t})},setUserInfo(t){this.$patch(e=>{e.userInfo=t})},login(t){return ki.v1User.usercontrollerLogin({...t})},async fetchWhoAmI(){const t=await ki.v1User.usercontrollerWhoami();t.data&&this.setUserInfo(t.data)},logout(){no.push("/login?type=logout").then(t=>{t||(this.clearLocalStorage(),this.resetAll(),this.$reset())})},resetAll(){const t=Qo(),e=R2(),n=I2(),i=gc(),o=M2();t?.$reset(),e?.$reset(),n?.$reset(),i?.$reset(),o?.$reset(),this.clearTeamHomeStores(),this.clearCompListStores(),this.clearCompEditStore()},clearLocalStorage(){L0(),U0()},clearTeamHomeStores(){for(const[t,e]of la._s.entries())t.startsWith("teamHome")&&e.$reset()},clearCompListStores(){for(const[t,e]of la._s.entries())t.startsWith("compList")&&e.$reset()},clearCompEditStore(){for(const[t,e]of la._s.entries())t.startsWith("compEdit")&&e.$reset()},isRealUserLogin(){const t=Object.keys(this.userInfo),e=is();return t.length>0&&e!==null},isAccessTokenExist(){return is()!==null},logoutDialog(){if(this.logoutDialogOpen)return;this.setLogoutDialogOpen(!0);const t={confirmButtonText:br.global.t("user.goLogin"),showClose:!0,callback:e=>{this.setLogoutDialogOpen(!1),e==="confirm"&&this.logout()}};Y_.alert(br.global.t("message.loginRequired"),br.global.t("common.info"),t)}}}),wx=Ce({__name:"SubMenu",props:{route:{},basePath:{}},setup(t){const{getTitle:e}=hc(),n=t,i=Qi(),o=(c,u="")=>W1.resolve(c,u),r=te(()=>o(n.basePath||"",n.route.path)),s=te(()=>(n.route.children||[]).some(c=>!c.meta?.hidden)),a=te(()=>{const{children:c=[]}=n.route;return c.length===0||c.length===1&&!c[0]?.children?.length}),l=te(()=>{const{children:c=[],meta:u={}}=n.route;return u?.hidden?!1:i.isRealUserLogin()||c.length>0?!0:!i.isAccessTokenExist()&&n.route.meta?.noAuth});return(c,u)=>{const d=ze("SubMenu",!0),h=Ao,v=G_;return l.value?(y(),T(Ie,{key:0},[t.route.meta?.hideParent&&s.value?(y(!0),T(Ie,{key:0},He(t.route.children,f=>(y(),ne(d,{key:o(r.value,f.path),route:f,"base-path":o(r.value,f.path)},null,8,["route","base-path"]))),128)):(y(),T(Ie,{key:1},[a.value?(y(),ne(Y1,{key:0,route:t.route,"full-path":r.value},null,8,["route","full-path"])):(y(),ne(v,{key:1,index:r.value},{title:we(()=>[j(h,null,{default:we(()=>[(y(),ne(Ot(t.route?.meta?.icon)))]),_:1}),g("span",null,L(m(e)(t.route?.meta?.title)),1)]),default:we(()=>[(y(!0),T(Ie,null,He(t.route.children,f=>(y(),ne(d,{key:o(r.value,f.path),route:f,"base-path":o(r.value,f.path)},null,8,["route","base-path"]))),128))]),_:1},8,["index"]))],64))],64)):ue("",!0)}}}),Ex=Ce({__name:"index",setup(t){const e=gc(),n=_s(),i=tc(),o=te(()=>n.options.routes),r=te(()=>i.path);return(s,a)=>{const l=Q_;return y(),ne(l,{class:"dark:!bg-gray-800 border-t border-gray-200 dark:border-gray-700",collapse:m(e).collapse,"default-active":r.value},{default:we(()=>[(y(!0),T(Ie,null,He(o.value,c=>(y(),T(Ie,null,[c?.meta?.hidden?ue("",!0):(y(),ne(wx,{key:c.path,basePath:c.path,route:c},null,8,["basePath","route"]))],64))),256))]),_:1},8,["collapse","default-active"])}}}),Cx={class:"flex gap-[20px] items-center pl-[10px] pr-[10px]"},Sx=["title"],xx=["title"],Tx=["title"],Ox={class:"flex items-center gap-[10px]"},$x=Ce({__name:"index",setup(t){const{t:e}=Ko(),n=Qo(),i=_s(),o=tc(),r=Ji(Ef,10),s=H(n.maxCache),a=()=>{i.back()},l=()=>{i.replace({path:o.path,query:{...o.query,[bt.ROUTE_STATE_KEY_VERSION]:Date.now()}})};function c(u){u&&n.setMaxCache(u)}return Nt(()=>{r.value=n.maxCache}),(u,d)=>{const h=ze("Icon"),v=nl,f=tl;return y(),T("div",Cx,[g("span",{title:m(e)("common.back")},[j(h,{icon:"material-symbols:arrow-back-rounded",class:"cursor-pointer",onClick:a})],8,Sx),g("span",{title:m(e)("common.refresh")},[j(h,{icon:"material-symbols:refresh-rounded",class:"cursor-pointer",onClick:l})],8,xx),j(f,{placement:"bottom",trigger:"hover",width:"auto"},{reference:we(()=>[g("span",{title:m(e)("common.moreOperations")},[j(h,{icon:"material-symbols:article-outline",class:"cursor-pointer"})],8,Tx)]),default:we(()=>[g("div",Ox,[g("div",null,L(m(e)("common.maxTagCount"))+":",1),g("div",null,[j(v,{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=p=>s.value=p),min:1,style:{width:"90px"},"controls-position":"right",onChange:c},null,8,["modelValue"])])])]),_:1})])}}}),kx={class:"flex dark:bg-gray-800 py-[2px] h-[40px] border border-gray-200 dark:border-gray-700"},Ax=Ce({__name:"index",setup(t){const{t:e}=Ko(),n=_s(),i=tc(),o=Qo(),{getTitle:r}=hc();Oe(()=>i,()=>{o.addView(i)},{immediate:!0,deep:!0});const s=te(()=>o.visitedViews),a=te(()=>s.value.length===1);function l(h){const v=c(h);o.delViewAndJumpToPrev(h.path,v,n)}function c(h){return h.path===i.path}function u(h){n.push(h)}function d(h){const v=h?.meta?.title||e("route.unknownTag"),f=o.getPayLoad(h.path);return r(f?.name||v)}return(h,v)=>{const f=ze("Icon"),p=Ao,_=Gi,C=X_;return y(),T("div",kx,[j($x),j(m(X0),{class:"flex-1 overflow-hidden",list:s.value,getKey:w=>w.path},{display:we(({visibleList:w,overflow:E})=>[j(g_,{tag:"ul",name:"fade",class:"flex gap-[5px] p-[2px] items-center"},{default:we(()=>[(y(!0),T(Ie,null,He(w,b=>(y(),T("div",{key:b.path},[j(_,{type:c(b)?"primary":"default",onClick:S=>u(b)},{default:we(()=>[Ke(L(d(b))+" ",1),a.value?ue("",!0):(y(),ne(p,{key:0,style:{"font-size":"16px"},class:"ml-[5px]",onClick:Ye(S=>l(b),["stop"])},{default:we(()=>[j(f,{icon:"material-symbols:close"})]),_:1},8,["onClick"]))]),_:2},1032,["type","onClick"])]))),128)),E>0?(y(),ne(C,{key:0,type:"info"},{default:we(()=>[Ke("+"+L(E)+" "+L(m(e)("common.more")),1)]),_:2},1024)):ue("",!0)]),_:2},1024)]),measure:we(({item:w})=>[j(_,{type:"primary"},{default:we(()=>[Ke(L(d(w))+" ",1),a.value?ue("",!0):(y(),ne(p,{key:0,style:{"font-size":"16px"},class:"ml-[5px]"},{default:we(()=>[j(f,{icon:"material-symbols:close"})]),_:1}))]),_:2},1024)]),_:1},8,["list","getKey"])])}}}),Px=rc(Ax,[["__scopeId","data-v-8b93a5e3"]]),Rx={class:"size-full overflow-hidden"},Ix={class:"h-[60px] dark:bg-gray-800"},Mx={class:"size-full overflow-hidden flex flex-col dark:bg-gray-800"},Dx={class:"dark:bg-gray-800"},Fx={class:"size-full flex flex-col"},Lx={class:""},jx={class:"flex-1 overflow-auto"},Nx=Ce({__name:"index",setup(t){const e=qn(()=>nt(()=>import("./index-DL5xk_C7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),n=qn(()=>nt(()=>import("./index-C4QJD9AO.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,14,15,16,17,18,6]),import.meta.url)),i=H(68),o=H(200),r=H(60),s=H(""),a=H(""),l=te(()=>s.value?"transition-width duration-400":""),c=te(()=>a.value?"transition-height duration-300":""),u=te(()=>({class:c.value,size:v.value,collapsible:!0,resizable:!1})),d=te(()=>({class:l.value,min:i.value,max:300,collapsible:!0})),h=Ji(V0,i.value),v=Ji(B0,r.value),f=gc(),p=Qi(),_=async(E,b)=>{s.value=b,b==="end"&&h.value===0?(h.value=o.value,window?.umami?.track(nd.SIDEBAR_TOGGLE,{state:"expanded"})):b==="start"&&window?.umami?.track(nd.SIDEBAR_TOGGLE,{state:"collapsed"})},C=(E,b)=>{a.value=b,b==="start"?v.value=0:b==="end"&&(v.value=r.value)},w=E=>{E==="header"?a.value="":E==="side"&&(s.value="")};return Nt(()=>{f.setSideBarCollapse(h.value===i.value)}),(E,b)=>{const S=J_,x=ey,k=Z_;return y(),T("div",Rx,[j(k,{layout:"vertical",onCollapse:C},{default:we(()=>[j(S,We({class:"!overflow-hidden transform-gpu isolate will-change-height"},u.value,{onTransitionend:b[0]||(b[0]=O=>w("header")),onWebkitTransitionEnd:b[1]||(b[1]=O=>w("header"))}),{default:we(()=>[g("div",Ix,[j(m(n))])]),_:1},16),j(S,{class:Ae(["transform-gpu isolate",c.value])},{default:we(()=>[j(k,{onCollapse:_},{default:we(()=>[j(S,We(d.value,{size:m(h),"onUpdate:size":b[2]||(b[2]=O=>ys(h)?h.value=O:null),class:"transform-gpu isolate will-change-width",onTransitionend:b[3]||(b[3]=O=>w("side")),onWebkitTransitionEnd:b[4]||(b[4]=O=>w("side"))}),{default:we(()=>[g("div",Mx,[j(Ex),m(p).isRealUserLogin()?(y(),T(Ie,{key:0},[g("div",Dx,[j(x)]),j(m(e))],64)):ue("",!0)])]),_:1},16,["size"]),j(S,{class:Ae(["transform-gpu isolate !overflow-hidden",l.value])},{default:we(()=>[g("div",Fx,[g("div",Lx,[j(Px)]),g("div",jx,[(y(),ne(__,null,{default:we(()=>[j(B1)]),_:1}))])])]),_:1},8,["class"])]),_:1})]),_:1},8,["class"])]),_:1})])}}});let no;function Ux(){const t=window.__GLOBAL_CONFIG__?.projectHash,e=t?`/${t}/main/`:`/${bt.WEBSITE_PATH_MAIN}/`;return no=y_({history:b_(e),routes:[{path:"/login",name:"login",component:()=>nt(()=>import("./index-BerOWbR5.js"),__vite__mapDeps([19,1,2,12,13,14,20,21,3,22,23,18]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.login"}},{path:"/upgrade",name:"upgrade",component:()=>nt(()=>import("./index-DO0i9je3.js"),__vite__mapDeps([24,1,2,12,22,25,26,7,27]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.upgrade"}},{path:"/mdPreview",name:"mdPreview",component:()=>nt(()=>import("./index-DDnVu2nK.js"),__vite__mapDeps([28,1,2,29,25,30]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.mdPreview"}},{path:"/previewBlank/:compId/:version?",name:"previewBlank",component:()=>nt(()=>import("./index-Bg2Ll1MS.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:()=>nt(()=>import("./index-BvkOcMzw.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:()=>nt(()=>import("./index-D6J3GPPV.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,10,15,46,5,4,34,18,47,29,25,30,48,7,33,49,50,51]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.similarPreview"}},{path:"/",component:Nx,redirect:"/share",meta:{hideParent:!0},children:[{path:"/share",name:"share",meta:{title:"route.share",icon:qn(()=>nt(()=>import("./home-rounded-CAKszmlU.js"),__vite__mapDeps([52,16,2,53]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-Dy_awGYi.js"),__vite__mapDeps([54,1,2,45,32,36,10,15,46,5,4,34,18,55]),import.meta.url)},{path:"/mine",name:"mine",meta:{title:"route.mine",icon:qn(()=>nt(()=>import("./supervised-user-circle-5toxzbuX.js"),__vite__mapDeps([56,16,2,57]),import.meta.url))},component:()=>nt(()=>import("./index-DryBDQGT.js"),__vite__mapDeps([58,1,2,45,32,36,10,15,46,5,4,34,18,59,60,61,29,25,30,49,50,3,62,7,63,55]),import.meta.url)},{path:"/collect",name:"collect",meta:{title:"route.collect",icon:qn(()=>nt(()=>import("./kid-star-FcmIH9T1.js"),__vite__mapDeps([64,16,2,65]),import.meta.url))},component:()=>nt(()=>import("./index-QDcOlnTv.js"),__vite__mapDeps([66,1,2,45,32,36,10,15,46,5,4,34,18,55]),import.meta.url)},{path:"/local",name:"local",meta:{title:"route.local",icon:qn(()=>nt(()=>import("./sync-saved-locally-rounded-ekj1nT7F.js"),__vite__mapDeps([67,16,2,68]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-C-ssDsWy.js"),__vite__mapDeps([69,1,2,45,32,36,10,15,46,5,4,34,18]),import.meta.url)},{path:"/upload",name:"upload",meta:{title:"route.upload",icon:qn(()=>nt(()=>import("./cloud-upload-BZUdgCdI.js"),__vite__mapDeps([70,16,2,71]),import.meta.url)),noAuth:!0,hidden:!0},component:()=>nt(()=>import("./index-BI1iHj1p.js"),__vite__mapDeps([72,1,2,60,32,4,61,34,29,25,30,5,49,50,3,62,7,18,44,46,27]),import.meta.url)},{path:"/uploadTeam/:teamId",name:"uploadTeam",meta:{title:"route.uploadTeam",hidden:!0},component:()=>nt(()=>import("./index-BI1iHj1p.js"),__vite__mapDeps([72,1,2,60,32,4,61,34,29,25,30,5,49,50,3,62,7,18,44,46,27]),import.meta.url)},{path:"/userInfo",name:"userInfo",meta:{title:"route.userInfo",hidden:!0},component:()=>nt(()=>import("./index-9ejOpPXc.js"),__vite__mapDeps([73,1,2,21,3,5,20,74,9,10,11,75,7]),import.meta.url)},{path:"/preview/:compId",meta:{title:"route.preview",noAuth:!0,hidden:!0},component:()=>nt(()=>import("./index-D6J3GPPV.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,10,15,46,5,4,34,18,47,29,25,30,48,7,33,49,50,51]),import.meta.url)},{path:"/previewLocal/:compId",meta:{title:"route.previewLocal",hidden:!0,noAuth:!0},component:()=>nt(()=>import("./index-BzJsbiup.js"),__vite__mapDeps([76,1,2,36,47,29,25,30,46,45,32,10,15,5,4,34,18,48,7,37,49]),import.meta.url)},{path:"/previewTeam/:teamId/:compId",meta:{title:"route.previewTeam",noAuth:!0,hidden:!0},props:{isTeamPreview:!0},component:()=>nt(()=>import("./index-D6J3GPPV.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,10,15,46,5,4,34,18,47,29,25,30,48,7,33,49,50,51]),import.meta.url)},{path:"/terminal",name:"terminal",meta:{title:"route.terminal",icon:qn(()=>nt(()=>import("./terminal-CiPichiX.js"),__vite__mapDeps([77,16,2,78]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-Bk2GHNDj.js"),__vite__mapDeps([79,41,2,42,1,43]),import.meta.url)},{path:"/setting",name:"setting",meta:{title:"route.setting",icon:qn(()=>nt(()=>import("./settings-DST6rYZI.js"),__vite__mapDeps([80,16,2,81]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-D4G87Mom.js"),__vite__mapDeps([82,1,2,50,83,7]),import.meta.url)},{path:"/team/:teamId",name:"team",meta:{title:"route.team",hidden:!0},component:()=>nt(()=>import("./index-DLWhyZSM.js"),__vite__mapDeps([84,1,2,39,40,9,10,11,45,32,36,15,46,5,4,34,18,3,55,16,50,85,7]),import.meta.url)}]},{path:"/:pathMatch(.*)*",name:"404",meta:{hidden:!0,noAuth:!0,title:"route.404"},component:()=>nt(()=>import("./index-CZwZuk3-.js"),__vite__mapDeps([86,2,1]),import.meta.url)}]}),no}function zx(t){Ux(),t.use(no)}const Vx=H([]);function Bx(t){const e=nc(M1,{errors:Vx.value}),n=document.createElement("div");n.id="error-container",e.mount(n),document.body.appendChild(n)}var Kr={exports:{}},Hx=Kr.exports,Ud;function qx(){return Ud||(Ud=1,(function(t,e){(function(n,i){t.exports=i()})(Hx,function(){function n(X){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V})(X)}function i(X,V){if(!(X instanceof V))throw new TypeError("Cannot call a class as a function")}function o(X,V){for(var J=0;J<V.length;J++){var ye=V[J];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(X,ye.key,ye)}}function r(X,V,J){V&&o(X.prototype,V),J&&o(X,J),Object.defineProperty(X,"prototype",{writable:!1})}function s(X,V,J){V in X?Object.defineProperty(X,V,{value:J,enumerable:!0,configurable:!0,writable:!0}):X[V]=J}function a(X,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(V&&V.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),Object.defineProperty(X,"prototype",{writable:!1}),V&&c(X,V)}function l(X){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)})(X)}function c(X,V){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,ye){return J.__proto__=ye,J})(X,V)}function u(X,V){if(V&&(typeof V=="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(V=X,V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}function d(X){var V=(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 J,ye=l(X);return u(this,V?(J=l(this).constructor,Reflect.construct(ye,arguments,J)):ye.apply(this,arguments))}}function h(X,V){(V==null||V>X.length)&&(V=X.length);for(var J=0,ye=new Array(V);J<V;J++)ye[J]=X[J];return ye}function v(X,V){var J,ye=typeof Symbol<"u"&&X[Symbol.iterator]||X["@@iterator"];if(!ye){if(Array.isArray(X)||(ye=(function(Z,ae){if(Z){if(typeof Z=="string")return h(Z,ae);var fe=Object.prototype.toString.call(Z).slice(8,-1);return(fe=fe==="Object"&&Z.constructor?Z.constructor.name:fe)==="Map"||fe==="Set"?Array.from(Z):fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe)?h(Z,ae):void 0}})(X))||V&&X&&typeof X.length=="number")return ye&&(X=ye),J=0,{s:V=function(){},n:function(){return J>=X.length?{done:!0}:{done:!1,value:X[J++]}},e:function(Z){throw Z},f:V};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
11
+ `+r)}}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ii(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:r}=n;i!==void 0&&Wr.assertOptions(i,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean),legacyInterceptorReqResOrdering:on.transitional(on.boolean)},!1),o!=null&&(W.isFunction(o)?n.paramsSerializer={serialize:o}:Wr.assertOptions(o,{encode:on.function,serialize:on.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wr.assertOptions(n,{baseUrl:on.spelling("baseURL"),withXsrfToken:on.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=r&&W.merge(r.common,r[n.method]);r&&W.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),n.headers=qt.concat(s,r);const a=[];let l=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(n)===!1)return;l=l&&p.synchronous;const _=n.transitional||fc;_&&_.legacyInterceptorReqResOrdering?a.unshift(p.fulfilled,p.rejected):a.push(p.fulfilled,p.rejected)});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const f=[Fd.bind(this),void 0];for(f.unshift(...a),f.push(...c),h=f.length,u=Promise.resolve(n);d<h;)u=u.then(f[d++],f[d++]);return u}h=a.length;let v=n;for(;d<h;){const f=a[d++],p=a[d++];try{v=f(v)}catch(_){p.call(this,_);break}}try{u=Fd.call(this,v)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=Ii(this.defaults,e);const n=rm(e.baseURL,e.url,e.allowAbsoluteUrls);return tm(n,e.params,e.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(e){$i.prototype[e]=function(n,i){return this.request(Ii(i||{},{method:e,url:n,data:(i||{}).data}))}});W.forEach(["post","put","patch"],function(e){function n(i){return function(r,s,a){return this.request(Ii(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}$i.prototype[e]=n(),$i.prototype[e+"Form"]=n(!0)});let OC=class um{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const i=this;this.promise.then(o=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](o);i._listeners=null}),this.promise.then=o=>{let r;const s=new Promise(a=>{i.subscribe(a),r=a}).then(o);return s.cancel=function(){i.unsubscribe(r)},s},e(function(r,s,a){i.reason||(i.reason=new tr(r,s,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new um(function(o){e=o}),cancel:e}}};function $C(t){return function(n){return t.apply(null,n)}}function kC(t){return W.isObject(t)&&t.isAxiosError===!0}const hl={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(hl).forEach(([t,e])=>{hl[e]=t});function dm(t){const e=new $i(t),n=Hf($i.prototype.request,e);return W.extend(n,$i.prototype,e,{allOwnKeys:!0}),W.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return dm(Ii(t,o))},n}const ht=dm(er);ht.Axios=$i;ht.CanceledError=tr;ht.CancelToken=OC;ht.isCancel=im;ht.VERSION=cm;ht.toFormData=ks;ht.AxiosError=Fe;ht.Cancel=ht.CanceledError;ht.all=function(e){return Promise.all(e)};ht.spread=$C;ht.isAxiosError=kC;ht.mergeConfig=Ii;ht.AxiosHeaders=qt;ht.formToJSON=t=>nm(W.isHTMLForm(t)?new FormData(t):t);ht.getAdapter=lm.getAdapter;ht.HttpStatusCode=hl;ht.default=ht;const{Axios:dz,AxiosError:hz,CanceledError:pz,isCancel:fz,CancelToken:mz,VERSION:vz,all:gz,Cancel:_z,isAxiosError:yz,spread:bz,toFormData:wz,AxiosHeaders:Ez,HttpStatusCode:jd,formToJSON:Cz,getAdapter:Sz,mergeConfig:xz}=ht,hm=new Map,AC={baseURL:"",timeout:1e4};function Nd(t,e){const n=ht.create({...AC,...e});return hm.set(t,n),n}function PC(t="default"){const e=hm.get(t);if(!e)throw new Error(`Instance "${t}" not initialized. Call initInstance() first.`);return e}async function Ee(t,e){const n=t.split("/")[0],i=PC(n);return t=t.replace(n,""),i.request({url:t,...e})}async function RC(t,e){return Ee("__local__/api/v1/comp/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function IC(t,e){return Ee("__local__/api/v1/comp/checkCompRepeat",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function MC(t,e){return Ee("__local__/api/v1/comp/compFileHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function DC(t,e){return Ee("__local__/api/v1/comp/compFilesOssSignedUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function FC(t,e){return Ee("__local__/api/v1/comp/dep",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function LC(t,e){return Ee("__local__/api/v1/comp/dir",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function jC(t,e){return Ee("__local__/api/v1/comp/download",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function NC(t,e){return Ee("__local__/api/v1/comp/file",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function UC(t,e){return Ee("__local__/api/v1/comp/generateCompJson",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function zC(t,e){return Ee("__local__/api/v1/comp/localCompDetailByPathHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function VC(t,e){return Ee("__local__/api/v1/comp/localComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function BC(t,e){return Ee("__local__/api/v1/comp/localCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function HC(t,e){return Ee("__local__/api/v1/comp/openCompPathInVscode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function qC(t){return Ee("__local__/api/v1/comp/packageJson",{method:"POST",...t||{}})}async function WC(t,e){return Ee("__local__/api/v1/comp/submit",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function KC(t,e){return Ee("__local__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function YC(t,e){return Ee("__local__/api/v1/comp/updateVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function GC(t,e){return Ee("__local__/api/v1/comp/writeFile",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const QC=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheck:RC,compcontrollerCheckcomprepeat:IC,compcontrollerCompfilehash:MC,compcontrollerCompfilesosssignedurl:DC,compcontrollerDep:FC,compcontrollerDir:LC,compcontrollerDownload:jC,compcontrollerFile:NC,compcontrollerGeneratecompjson:UC,compcontrollerLocalcompdetailbypathhash:zC,compcontrollerLocalcomps:VC,compcontrollerLocalcompsbyids:BC,compcontrollerOpencomppathinvscode:HC,compcontrollerPackagejson:qC,compcontrollerSubmit:WC,compcontrollerUpdate:KC,compcontrollerUpdateversion:YC,compcontrollerWritefile:GC},Symbol.toStringTag,{value:"Module"}));async function XC(t){return Ee("__local__/api/v1/module/clearPreBuild",{method:"POST",...t||{}})}async function JC(t,e){return Ee("__local__/api/v1/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ZC(t){return Ee("__local__/api/v1/module/preBuildSize",{method:"POST",...t||{}})}const eS=Object.freeze(Object.defineProperty({__proto__:null,modulecontrollerClearprebuild:XC,modulecontrollerPrebuild:JC,modulecontrollerPrebuildsize:ZC},Symbol.toStringTag,{value:"Module"}));async function tS(t,e){return Ee("__local__/api/v1/oss/fileSignUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const nS=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerFilesignurl:tS},Symbol.toStringTag,{value:"Module"}));async function iS(t,e){return Ee("__local__/api/v1/preprocessing/preprocess",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const oS=Object.freeze(Object.defineProperty({__proto__:null,preprocessingcontrollerPreprocess:iS},Symbol.toStringTag,{value:"Module"}));async function rS(t,e){return Ee("__local__/api/v1/vuefinder/list",{method:"GET",params:{...t},...e||{}})}const sS=Object.freeze(Object.defineProperty({__proto__:null,vuefindercontrollerList:rS},Symbol.toStringTag,{value:"Module"})),aS={v1Comp:QC,v1Module:eS,v1Oss:nS,v1Preprocessing:oS,v1Vuefinder:sS};async function lS(t,e){return Ee("__remote__/api/v1/comp/checkCompExistByHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function cS(t,e){return Ee("__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function uS(t,e){return Ee("__remote__/api/v1/comp/checkVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function dS(t,e){return Ee("__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function hS(t,e){return Ee("__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function pS(t,e){return Ee("__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function fS(t,e){return Ee("__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function mS(t,e){return Ee("__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function vS(t,e){return Ee("__remote__/api/v1/comp/compsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function gS(t,e){return Ee("__remote__/api/v1/comp/deleteFailedComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function _S(t,e){return Ee("__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function yS(t,e){return Ee("__remote__/api/v1/comp/existCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function bS(t,e){return Ee("__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function wS(t,e){return Ee("__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ES(t,e){return Ee("__remote__/api/v1/comp/softDelete",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function CS(t,e){return Ee("__remote__/api/v1/comp/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function SS(t,e){return Ee("__remote__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function xS(t,e){return Ee("__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function TS(t,e){return Ee("__remote__/api/v1/comp/updateCompDownloadCount",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function OS(t,e){return Ee("__remote__/api/v1/comp/updateObjectId",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function $S(t,e){return Ee("__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function kS(t,e){return Ee("__remote__/api/v1/comp/upload",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function AS(t,e){return Ee("__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const PS=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheckcompexistbyhash:lS,compcontrollerCheckcompexistbyid:cS,compcontrollerCheckversion:uS,compcontrollerCollect:dS,compcontrollerCollectedcomps:hS,compcontrollerCompdetail:pS,compcontrollerComphash:fS,compcontrollerComps:mS,compcontrollerCompsbyids:vS,compcontrollerDeletefailedcomp:gS,compcontrollerDeletemycomp:_S,compcontrollerExistcompsbyids:yS,compcontrollerMycomps:bS,compcontrollerSimilarcomps:wS,compcontrollerSoftdelete:ES,compcontrollerTags:CS,compcontrollerUpdate:SS,compcontrollerUpdatebasicinfo:xS,compcontrollerUpdatecompdownloadcount:TS,compcontrollerUpdateobjectid:OS,compcontrollerUpgraderecords:$S,compcontrollerUpload:kS,compcontrollerVersions:AS},Symbol.toStringTag,{value:"Module"}));async function RS(t){return Ee("__remote__/api/v1/csrf/csrf",{method:"GET",...t||{}})}const IS=Object.freeze(Object.defineProperty({__proto__:null,csrfcontrollerGetcsrftoken:RS},Symbol.toStringTag,{value:"Module"}));async function MS(t,e){return Ee("__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const DS=Object.freeze(Object.defineProperty({__proto__:null,emailcontrollerSendcode:MS},Symbol.toStringTag,{value:"Module"}));async function FS(t,e){return Ee("__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const LS=Object.freeze(Object.defineProperty({__proto__:null,keywordcontrollerQuerykeywordscomp:FS},Symbol.toStringTag,{value:"Module"}));async function jS(t){return Ee("__remote__/api/v1/oss/compOssDir",{method:"POST",...t||{}})}async function NS(t){return Ee("__remote__/api/v1/oss/getSts",{method:"POST",...t||{}})}async function US(t,e){return Ee("__remote__/api/v1/oss/putPolicy",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const zS=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerCompossdir:jS,osscontrollerGetsts:NS,osscontrollerPutpolicy:US},Symbol.toStringTag,{value:"Module"}));async function VS(t,e){return Ee("__remote__/api/v1/team/addToTeamMyComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function BS(t){return Ee("__remote__/api/v1/team/allMember",{method:"POST",...t||{}})}async function HS(t,e){return Ee("__remote__/api/v1/team/applyList",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function qS(t,e){return Ee("__remote__/api/v1/team/checkCompUpdatePermission",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function WS(t,e){return Ee("__remote__/api/v1/team/copyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function KS(t,e){return Ee("__remote__/api/v1/team/create",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function YS(t){return Ee("__remote__/api/v1/team/created",{method:"POST",...t||{}})}async function GS(t,e){return Ee("__remote__/api/v1/team/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function QS(t){return Ee("__remote__/api/v1/team/detail",{method:"POST",...t||{}})}async function XS(t){return Ee("__remote__/api/v1/team/exit",{method:"POST",...t||{}})}async function JS(t,e){return Ee("__remote__/api/v1/team/findByCode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ZS(t,e){return Ee("__remote__/api/v1/team/handleApply",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function e2(t,e){return Ee("__remote__/api/v1/team/join",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function t2(t){return Ee("__remote__/api/v1/team/joined",{method:"POST",...t||{}})}async function n2(t,e){return Ee("__remote__/api/v1/team/kickOut",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function i2(t,e){return Ee("__remote__/api/v1/team/member",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function o2(t,e){return Ee("__remote__/api/v1/team/myTeamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function r2(t,e){return Ee("__remote__/api/v1/team/removeComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function s2(t,e){return Ee("__remote__/api/v1/team/removeMyTeamComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function a2(t,e){return Ee("__remote__/api/v1/team/teamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function l2(t,e){return Ee("__remote__/api/v1/team/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function c2(t,e){return Ee("__remote__/api/v1/team/updateCompCanUpdateUsers",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function u2(t,e){return Ee("__remote__/api/v1/team/updateMenu",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function d2(t,e){return Ee("__remote__/api/v1/team/updateTeamUserNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const h2=Object.freeze(Object.defineProperty({__proto__:null,teamcontrollerAddtoteammycomps:VS,teamcontrollerAllmember:BS,teamcontrollerApplylist:HS,teamcontrollerCheckcompupdatepermission:qS,teamcontrollerCopycomp:WS,teamcontrollerCreate:KS,teamcontrollerCreated:YS,teamcontrollerDelete:GS,teamcontrollerDetail:QS,teamcontrollerExit:XS,teamcontrollerFindbycode:JS,teamcontrollerHandleapply:ZS,teamcontrollerJoin:e2,teamcontrollerJoined:t2,teamcontrollerKickout:n2,teamcontrollerMember:i2,teamcontrollerMyteamcomps:o2,teamcontrollerRemovecompfromteam:r2,teamcontrollerRemovemyteamcomp:s2,teamcontrollerTeamcomps:a2,teamcontrollerUpdate:l2,teamcontrollerUpdatecompcanupdateusers:c2,teamcontrollerUpdatemenu:u2,teamcontrollerUpdateteamusernickname:d2},Symbol.toStringTag,{value:"Module"}));async function p2(t){return Ee("__remote__/api/v1/token/approachExpire",{method:"POST",...t||{}})}async function f2(t){return Ee("__remote__/api/v1/token/refresh",{method:"POST",...t||{}})}const m2=Object.freeze(Object.defineProperty({__proto__:null,tokencontrollerApproachexpire:p2,tokencontrollerRefresh:f2},Symbol.toStringTag,{value:"Module"}));async function v2(t,e){return Ee("__remote__/api/v1/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function g2(t){return Ee("__remote__/api/v1/upgrade/logs",{method:"POST",...t||{}})}async function _2(t,e){return Ee("__remote__/api/v1/upgrade/publish",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const y2=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerCheck:v2,upgradecontrollerLogs:g2,upgradecontrollerPublish:_2},Symbol.toStringTag,{value:"Module"}));async function b2(t,e){return Ee("__remote__/api/v1/user/changeAvatar",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function w2(t,e){return Ee("__remote__/api/v1/user/changeNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function E2(t,e){return Ee("__remote__/api/v1/user/changePassword",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function C2(t){return Ee("__remote__/api/v1/user/checkPassword",{method:"POST",...t||{}})}async function S2(t,e){return Ee("__remote__/api/v1/user/login",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function x2(t,e){return Ee("__remote__/api/v1/user/setAllowEmailLogin",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function T2(t,e){return Ee("__remote__/api/v1/user/updateEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function O2(t){return Ee("__remote__/api/v1/user/userInfo",{method:"POST",...t||{}})}async function $2(t){return Ee("__remote__/api/v1/user/whoAmI",{method:"POST",...t||{}})}const k2=Object.freeze(Object.defineProperty({__proto__:null,usercontrollerChangeavatar:b2,usercontrollerChangenickname:w2,usercontrollerChangepassword:E2,usercontrollerCheckpassword:C2,usercontrollerLogin:S2,usercontrollerSetallowemaillogin:x2,usercontrollerUpdateemail:T2,usercontrollerUserinfo:O2,usercontrollerWhoami:$2},Symbol.toStringTag,{value:"Module"}));async function A2(t,e){return Ee("__remote__/api/v2/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const P2=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerv2Check:A2},Symbol.toStringTag,{value:"Module"})),ki={v1Comp:PS,v1Csrf:IS,v1Email:DS,v1Keyword:LS,v1Oss:zS,v1Team:h2,v1Token:m2,v1Upgrade:y2,v1User:k2,v2Upgrade:P2},R2=vi("personalStore",{state:()=>({userInfo:{},isPasswordSet:!1}),getters:{isAllowEmailLogin(t){return t.userInfo?.isAllowEmailLogin??!1}},actions:{setUserInfo(t){this.$patch(e=>{e.userInfo=t})},setIsPasswordSet(t){this.$patch(e=>{e.isPasswordSet=t})},async initUserInfo(){const t=await ki.v1User.usercontrollerUserinfo();t.code===0&&this.setUserInfo(t.data)},async setEmail(t){this.$patch(e=>{e.userInfo.email=t})},async setNickname(t){this.$patch(e=>{e.userInfo.nickname=t})},async setAllowEmailLogin(t){await ki.v1User.usercontrollerSetallowemaillogin({allow:t}).then(()=>{this.$patch(e=>{e.userInfo.isAllowEmailLogin=t})})}}}),I2=vi("moduleStore",{state:()=>({modules:{}}),actions:{setModules(t,e){this.$patch(n=>{n.modules[t]=e})},async loadModule(t){if(this.modules[t])return this.modules[t];const e=await import(t);return this.setModules(t,e),e}}}),_r=Ji(z0,!0),gc=vi("appStore",{state:()=>({}),getters:{collapse(){return _r.value}},actions:{toggleSideBar(){_r.value=!_r.value},setSideBarCollapse(t){t!==this.collapse&&(_r.value=t)}}}),M2=vi("team",{state:()=>({joinedTeams:[],createdTeams:[]}),actions:{setJoinedTeams(t){this.$patch(e=>{e.joinedTeams=t})},setCreatedTeams(t){this.$patch(e=>{e.createdTeams=t})},removeCreatedTeam(t){this.$patch(e=>{e.createdTeams=e.createdTeams.filter(n=>n._id!==t)})},addCreatedTeam(t){this.$patch(e=>{e.createdTeams.some(i=>i._id===t._id)||e.createdTeams.push(t)})},addJoinedTeam(t){this.$patch(e=>{e.joinedTeams.some(i=>i._id===t._id)||e.joinedTeams.push(t)})},removeJoinedTeam(t){this.$patch(e=>{e.joinedTeams=e.joinedTeams.filter(n=>n._id!==t)})},updateCreatedTeamItemById(t,e){this.$patch(n=>{const i=n.createdTeams.findIndex(o=>o._id===t);i!==-1&&(n.createdTeams[i]=e)})},getTeamDetail(t){return this.joinedTeams.find(n=>n._id===t)||this.createdTeams.find(n=>n._id===t)}}});function yr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)i!=="__proto__"&&(t[i]=n[i])}return t}var D2={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function pl(t,e){function n(o,r,s){if(!(typeof document>"u")){s=yr({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=o+"="+t.write(r,o)+a}}function i(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var r=document.cookie?document.cookie.split("; "):[],s={},a=0;a<r.length;a++){var l=r[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(u in s||(s[u]=t.read(c,u)),o===u)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:i,remove:function(o,r){n(o,"",yr({},r,{expires:-1}))},withAttributes:function(o){return pl(this.converter,yr({},this.attributes,o))},withConverter:function(o){return pl(yr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var pm=pl(D2,{path:"/"});const F2={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:"更新记录",openInNewPage:"新页面打开",depInstall:"依赖安装",fullscreen:"全屏",exitFullscreen:"退出全屏",maximizeRestore:"最大化/还原",siteSlogan:"原子化组件社区,让组件流通更简单。",siteSubtitle:"Vue 组件共享平台",docsTutorial:"文档教程",empty:"暂无数据",noReadme:"组件没有配置README.md文件",dragSort:"拖拽排序",filter:"筛选",apply:"应用",person:"人",unit:"个",pleaseSelect:"请选择",pleaseInput:"请输入",me:"我",generate:"生成",regenerate:"重新生成",generateSuccess:"生成成功",moreOperations:"更多操作",more:"更多",maxTagCount:"最大标签数量"},L2={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} 个字符",version:"组件版本",detail:"组件详情",preview:"组件预览",previewConfig:"预览配置",previewList:"预览列表",uploadPreview:"组件上传预览",updatePreview:"组件更新预览",download:"下载组件",update:"更新组件",upload:"上传组件",submit:"提交组件",edit:"编辑组件",add:"添加组件",delete:"删除组件",local:"本地组件",remote:"远程组件",online:"在线组件",similar:"相似组件",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:"在 VS Code 中打开",openingInEditor:"在编辑器中打开...",updateSuccess:"更新成功",downloadVersionConfirm:"当前选择的版本为:{version},确认下载吗?",downloading:"组件下载中...",downloadPathConfirm:"是否下载组件到【{path}】路径下",downloadCoverConfirm:"组件【{name}】已经下载或者有同名组件,是否覆盖?",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 删除"}},j2={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:"支持创建分组菜单,灵活组织团队组件"},N2={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:"修改邮箱",basicInfo:"基本信息",securitySettings:"安全设置",loginPassword:"登录密码",passwordTip:"建议定期更换密码,确保账号安全",setPassword:"设置密码",emailLogin:"邮箱登录",emailLoginTip:"允许使用邮箱作为登录账号",pleaseSetPasswordFirst:"请先设置登录密码",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:"登录成功",userInfo:"用户信息",personalCenter:"个人中心",myComp:"我的组件",notLoggedIn:"未登录",goLogin:"去登录"},U2={title:"文件",name:"文件名",path:"文件路径",size:"文件大小",type:"文件类型",dir:"文件夹",selectDir:"选择文件夹",upload:"文件上传",download:"文件下载",select:"选择",multiSelect:"不支持多选",onlyDir:"只能选择文件夹",rootDir:"根目录",projectPath:"项目路径",currentDir:"当前目录",parentDir:"上级目录",refreshDir:"刷新文件夹列表"},z2={success:{download:"下载成功",update:"更新成功",delete:"删除成功",collect:"收藏成功",uncollect:"取消收藏成功",save:"保存成功",submit:"提交成功",upload:"上传成功",copy:"复制成功",operation:"操作成功",sendAuthCode:"验证码已发送",exitTeam:"退出成功"},error:{download:"下载失败",update:"更新失败",delete:"删除失败",collect:"收藏失败",uncollect:"取消收藏失败",save:"保存失败",submit:"提交失败",upload:"上传失败",copy:"复制失败",operation:"操作失败",load:"加载失败",network:"网络错误",timeout:"请求超时",unknown:"未知错误",pleaseFixCompileError:"请先处理编译错误",loginExpired:"登录已过期,请重新登录",refreshFailed:"刷新失败",requestFailed:"请求失败,请联系管理员",storageNotSupported:"浏览器不支持 storage.estimate API"},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!"}},V2={404:"页面不存在",share:"组件市场",collect:"收藏组件",collectSimple:"收藏",mine:"我的组件",mineSimple:"我的",local:"本地组件",localSimple:"本地",team:"团队",upload:"上传组件",uploadSimple:"上传",uploadTeam:"上传团队组件",setting:"设置",userInfo:"用户信息",upgrade:"更新",terminal:"终端",preview:"组件预览",previewLocal:"本地组件预览",previewTeam:"团队组件预览",previewBlank:"预览",similarPreview:"相似组件预览",login:"登录",mdPreview:"文档预览",unknownTag:"未知标签"},B2={parse:"解析 Markdown",loading:"加载 Markdown",error:"加载失败",toc:"目录",anchor:"锚点"},H2={title:"终端",open:"打开终端",close:"关闭终端",execute:"执行命令",shutdown:"关闭进程",timeout:"超时时间",disconnected:"终端已断开连接"},q2={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)"}},W2={title:"设置",previewRule:"预览规则",other:"其他设置",theme:"主题",language:"语言",darkMode:"暗黑模式",lightMode:"明亮模式"},K2={title:"版本更新",current:"当前版本",latest:"最新版本",check:"检查更新",upgrading:"更新中",upgraded:"已更新",publish:"发布更新",record:"更新记录",log:"更新日志",hasUpdate:"有更新",betaVersion:"内测版",noUpdate:"暂无更新",updateMethod:"更新方式",openTerminalAndRun:"打开终端,执行以下命令:",cannotIgnoreUpdate:"不可忽略此次更新"},Y2={systemRecommended:"系统推荐",all:"全部",latest:"最新",hottest:"最热"},G2={submit:"提交"},Q2={empty:"不能为空",notString:"必须是字符串类型,当前类型为: {type}",contentEmpty:"内容不能为空",startsWithNumber:'内容不能以数字开头,当前以 "{char}" 开头',invalidCharBacktick:"内容包含反引号(Markdown 语法标记),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharNewline:"内容包含换行符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharCarriageReturn:"内容包含回车符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharTab:"内容包含制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharFormFeed:"内容包含换页符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharVerticalTab:"内容包含垂直制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHash:"内容包含 # 字符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHtmlSpecial:'内容包含 HTML 特殊字符 "{char}",特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格',invalidCharUnknown:'内容包含非法字符 "{char}"(Unicode: U+{code}),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格'},X2={openInEditor:"在编辑器中打开",current:"当前",noRegistered:"暂无已注册项目",deregisterTitle:"注销项目",deregisterConfirm:"确定要注销项目 {hash} ({cwd}) 吗?",deregisterSuccess:"已注销项目 {hash}",deregisterFailed:"注销失败"},J2={common:F2,comp:L2,team:j2,user:N2,file:U2,message:z2,route:V2,markdown:B2,terminal:H2,deps:q2,setting:W2,upgrade:K2,tag:Y2,formCreate:G2,validateHash:Q2,project:X2},Z2={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",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",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"},ex={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",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",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 VS Code",openingInEditor:"Opening in editor...",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?",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"}},tx={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"},nx={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",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",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",userInfo:"User Info",personalCenter:"Personal Center",myComp:"My Components",notLoggedIn:"Not logged in",goLogin:"Go to Login"},ix={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"},ox={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"},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"},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!"}},rx={404:"Page Not Found",share:"Component Market",collect:"Collected Components",collectSimple:"Collection",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",mdPreview:"Document Preview",unknownTag:"Unknown Tag"},sx={parse:"Parse Markdown",loading:"Loading Markdown",error:"Load failed",toc:"Table of Contents",anchor:"Anchor"},ax={title:"Terminal",open:"Open Terminal",close:"Close Terminal",execute:"Execute Command",shutdown:"Shutdown Process",timeout:"Timeout",disconnected:"Terminal disconnected"},lx={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)"}},cx={title:"Settings",previewRule:"Preview Rule",other:"Other Settings",theme:"Theme",language:"Language",darkMode:"Dark Mode",lightMode:"Light Mode"},ux={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"},dx={systemRecommended:"System Recommended",all:"All",latest:"Latest",hottest:"Hottest"},hx={submit:"Submit"},px={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'},fx={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"},mx={common:Z2,comp:ex,team:tx,user:nx,file:ix,message:ox,route:rx,markdown:sx,terminal:ax,deps:lx,setting:cx,upgrade:ux,tag:dx,formCreate:hx,validateHash:px,project:fx},vx={zh:J2,en:mx},gx=localStorage.getItem(Tb.LOCALE_KEY)||"zh",fm=m_({locale:gx,messages:vx,legacy:!1});function mm(t){t.use(fm)}const _c=Object.freeze(Object.defineProperty({__proto__:null,i18n:fm,setup:mm},Symbol.toStringTag,{value:"Module"}));function _x({store:t}){t.$subscribe((...e)=>{const[n]=e;if(n.type==="direct")throw new Error("不允许直接修改store,建议使用action修改")})}const fl=v_();function vm(t){fl.use(_x),t.use(fl)}const yx=Object.freeze(Object.defineProperty({__proto__:null,pinia:fl,setup:vm},Symbol.toStringTag,{value:"Module"}));function bx(t){t.component("Icon",Qw)}const{i18n:br}=_c,{pinia:la}=yx,Qi=vi("userStore",{state:()=>({userInfo:{},logoutDialogOpen:!1}),getters:{userId:t=>t.userInfo._id,displayName(t){return t.userInfo.nickname||t.userInfo.account||br.global.t("user.notLoggedIn")},avatar:t=>t.userInfo.avatar,avatarStr(t){return t.userInfo.nickname?.[0]||t.userInfo.account?.[0]||""}},actions:{async fetchCsrfToken(){pm.get(bt.CSRF_KEY)||await ki.v1Csrf.csrfcontrollerGetcsrftoken()},updateAvatar(t){this.$patch(e=>{e.userInfo&&(e.userInfo.avatar=t)})},updateNickname(t){this.$patch(e=>{e.userInfo&&(e.userInfo.nickname=t)})},setLogoutDialogOpen(t){this.$patch(e=>{e.logoutDialogOpen=t})},setUserInfo(t){this.$patch(e=>{e.userInfo=t})},login(t){return ki.v1User.usercontrollerLogin({...t})},async fetchWhoAmI(){const t=await ki.v1User.usercontrollerWhoami();t.data&&this.setUserInfo(t.data)},logout(){no.push("/login?type=logout").then(t=>{t||(this.clearLocalStorage(),this.resetAll(),this.$reset())})},resetAll(){const t=Qo(),e=R2(),n=I2(),i=gc(),o=M2();t?.$reset(),e?.$reset(),n?.$reset(),i?.$reset(),o?.$reset(),this.clearTeamHomeStores(),this.clearCompListStores(),this.clearCompEditStore()},clearLocalStorage(){L0(),U0()},clearTeamHomeStores(){for(const[t,e]of la._s.entries())t.startsWith("teamHome")&&e.$reset()},clearCompListStores(){for(const[t,e]of la._s.entries())t.startsWith("compList")&&e.$reset()},clearCompEditStore(){for(const[t,e]of la._s.entries())t.startsWith("compEdit")&&e.$reset()},isRealUserLogin(){const t=Object.keys(this.userInfo),e=is();return t.length>0&&e!==null},isAccessTokenExist(){return is()!==null},logoutDialog(){if(this.logoutDialogOpen)return;this.setLogoutDialogOpen(!0);const t={confirmButtonText:br.global.t("user.goLogin"),showClose:!0,callback:e=>{this.setLogoutDialogOpen(!1),e==="confirm"&&this.logout()}};Y_.alert(br.global.t("message.loginRequired"),br.global.t("common.info"),t)}}}),wx=Ce({__name:"SubMenu",props:{route:{},basePath:{}},setup(t){const{getTitle:e}=hc(),n=t,i=Qi(),o=(c,u="")=>W1.resolve(c,u),r=te(()=>o(n.basePath||"",n.route.path)),s=te(()=>(n.route.children||[]).some(c=>!c.meta?.hidden)),a=te(()=>{const{children:c=[]}=n.route;return c.length===0||c.length===1&&!c[0]?.children?.length}),l=te(()=>{const{children:c=[],meta:u={}}=n.route;return u?.hidden?!1:i.isRealUserLogin()||c.length>0?!0:!i.isAccessTokenExist()&&n.route.meta?.noAuth});return(c,u)=>{const d=ze("SubMenu",!0),h=Ao,v=G_;return l.value?(y(),T(Ie,{key:0},[t.route.meta?.hideParent&&s.value?(y(!0),T(Ie,{key:0},He(t.route.children,f=>(y(),ne(d,{key:o(r.value,f.path),route:f,"base-path":o(r.value,f.path)},null,8,["route","base-path"]))),128)):(y(),T(Ie,{key:1},[a.value?(y(),ne(Y1,{key:0,route:t.route,"full-path":r.value},null,8,["route","full-path"])):(y(),ne(v,{key:1,index:r.value},{title:we(()=>[j(h,null,{default:we(()=>[(y(),ne(Ot(t.route?.meta?.icon)))]),_:1}),g("span",null,L(m(e)(t.route?.meta?.title)),1)]),default:we(()=>[(y(!0),T(Ie,null,He(t.route.children,f=>(y(),ne(d,{key:o(r.value,f.path),route:f,"base-path":o(r.value,f.path)},null,8,["route","base-path"]))),128))]),_:1},8,["index"]))],64))],64)):ue("",!0)}}}),Ex=Ce({__name:"index",setup(t){const e=gc(),n=_s(),i=tc(),o=te(()=>n.options.routes),r=te(()=>i.path);return(s,a)=>{const l=Q_;return y(),ne(l,{class:"dark:!bg-gray-800 border-t border-gray-200 dark:border-gray-700",collapse:m(e).collapse,"default-active":r.value},{default:we(()=>[(y(!0),T(Ie,null,He(o.value,c=>(y(),T(Ie,null,[c?.meta?.hidden?ue("",!0):(y(),ne(wx,{key:c.path,basePath:c.path,route:c},null,8,["basePath","route"]))],64))),256))]),_:1},8,["collapse","default-active"])}}}),Cx={class:"flex gap-[20px] items-center pl-[10px] pr-[10px]"},Sx=["title"],xx=["title"],Tx=["title"],Ox={class:"flex items-center gap-[10px]"},$x=Ce({__name:"index",setup(t){const{t:e}=Ko(),n=Qo(),i=_s(),o=tc(),r=Ji(Ef,10),s=H(n.maxCache),a=()=>{i.back()},l=()=>{i.replace({path:o.path,query:{...o.query,[bt.ROUTE_STATE_KEY_VERSION]:Date.now()}})};function c(u){u&&n.setMaxCache(u)}return Nt(()=>{r.value=n.maxCache}),(u,d)=>{const h=ze("Icon"),v=nl,f=tl;return y(),T("div",Cx,[g("span",{title:m(e)("common.back")},[j(h,{icon:"material-symbols:arrow-back-rounded",class:"cursor-pointer",onClick:a})],8,Sx),g("span",{title:m(e)("common.refresh")},[j(h,{icon:"material-symbols:refresh-rounded",class:"cursor-pointer",onClick:l})],8,xx),j(f,{placement:"bottom",trigger:"hover",width:"auto"},{reference:we(()=>[g("span",{title:m(e)("common.moreOperations")},[j(h,{icon:"material-symbols:article-outline",class:"cursor-pointer"})],8,Tx)]),default:we(()=>[g("div",Ox,[g("div",null,L(m(e)("common.maxTagCount"))+":",1),g("div",null,[j(v,{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=p=>s.value=p),min:1,style:{width:"90px"},"controls-position":"right",onChange:c},null,8,["modelValue"])])])]),_:1})])}}}),kx={class:"flex dark:bg-gray-800 py-[2px] h-[40px] border border-gray-200 dark:border-gray-700"},Ax=Ce({__name:"index",setup(t){const{t:e}=Ko(),n=_s(),i=tc(),o=Qo(),{getTitle:r}=hc();Oe(()=>i,()=>{o.addView(i)},{immediate:!0,deep:!0});const s=te(()=>o.visitedViews),a=te(()=>s.value.length===1);function l(h){const v=c(h);o.delViewAndJumpToPrev(h.path,v,n)}function c(h){return h.path===i.path}function u(h){n.push(h)}function d(h){const v=h?.meta?.title||e("route.unknownTag"),f=o.getPayLoad(h.path);return r(f?.name||v)}return(h,v)=>{const f=ze("Icon"),p=Ao,_=Gi,C=X_;return y(),T("div",kx,[j($x),j(m(X0),{class:"flex-1 overflow-hidden",list:s.value,getKey:w=>w.path},{display:we(({visibleList:w,overflow:E})=>[j(g_,{tag:"ul",name:"fade",class:"flex gap-[5px] p-[2px] items-center"},{default:we(()=>[(y(!0),T(Ie,null,He(w,b=>(y(),T("div",{key:b.path},[j(_,{type:c(b)?"primary":"default",onClick:S=>u(b)},{default:we(()=>[Ke(L(d(b))+" ",1),a.value?ue("",!0):(y(),ne(p,{key:0,style:{"font-size":"16px"},class:"ml-[5px]",onClick:Ye(S=>l(b),["stop"])},{default:we(()=>[j(f,{icon:"material-symbols:close"})]),_:1},8,["onClick"]))]),_:2},1032,["type","onClick"])]))),128)),E>0?(y(),ne(C,{key:0,type:"info"},{default:we(()=>[Ke("+"+L(E)+" "+L(m(e)("common.more")),1)]),_:2},1024)):ue("",!0)]),_:2},1024)]),measure:we(({item:w})=>[j(_,{type:"primary"},{default:we(()=>[Ke(L(d(w))+" ",1),a.value?ue("",!0):(y(),ne(p,{key:0,style:{"font-size":"16px"},class:"ml-[5px]"},{default:we(()=>[j(f,{icon:"material-symbols:close"})]),_:1}))]),_:2},1024)]),_:1},8,["list","getKey"])])}}}),Px=rc(Ax,[["__scopeId","data-v-8b93a5e3"]]),Rx={class:"size-full overflow-hidden"},Ix={class:"h-[60px] dark:bg-gray-800"},Mx={class:"size-full overflow-hidden flex flex-col dark:bg-gray-800"},Dx={class:"dark:bg-gray-800"},Fx={class:"size-full flex flex-col"},Lx={class:""},jx={class:"flex-1 overflow-auto"},Nx=Ce({__name:"index",setup(t){const e=qn(()=>nt(()=>import("./index-PeLBbpUx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),n=qn(()=>nt(()=>import("./index-qAhDQceU.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,14,15,16,17,18,6]),import.meta.url)),i=H(68),o=H(200),r=H(60),s=H(""),a=H(""),l=te(()=>s.value?"transition-width duration-400":""),c=te(()=>a.value?"transition-height duration-300":""),u=te(()=>({class:c.value,size:v.value,collapsible:!0,resizable:!1})),d=te(()=>({class:l.value,min:i.value,max:300,collapsible:!0})),h=Ji(V0,i.value),v=Ji(B0,r.value),f=gc(),p=Qi(),_=async(E,b)=>{s.value=b,b==="end"&&h.value===0?(h.value=o.value,window?.umami?.track(nd.SIDEBAR_TOGGLE,{state:"expanded"})):b==="start"&&window?.umami?.track(nd.SIDEBAR_TOGGLE,{state:"collapsed"})},C=(E,b)=>{a.value=b,b==="start"?v.value=0:b==="end"&&(v.value=r.value)},w=E=>{E==="header"?a.value="":E==="side"&&(s.value="")};return Nt(()=>{f.setSideBarCollapse(h.value===i.value)}),(E,b)=>{const S=J_,x=ey,k=Z_;return y(),T("div",Rx,[j(k,{layout:"vertical",onCollapse:C},{default:we(()=>[j(S,We({class:"!overflow-hidden transform-gpu isolate will-change-height"},u.value,{onTransitionend:b[0]||(b[0]=O=>w("header")),onWebkitTransitionEnd:b[1]||(b[1]=O=>w("header"))}),{default:we(()=>[g("div",Ix,[j(m(n))])]),_:1},16),j(S,{class:Ae(["transform-gpu isolate",c.value])},{default:we(()=>[j(k,{onCollapse:_},{default:we(()=>[j(S,We(d.value,{size:m(h),"onUpdate:size":b[2]||(b[2]=O=>ys(h)?h.value=O:null),class:"transform-gpu isolate will-change-width",onTransitionend:b[3]||(b[3]=O=>w("side")),onWebkitTransitionEnd:b[4]||(b[4]=O=>w("side"))}),{default:we(()=>[g("div",Mx,[j(Ex),m(p).isRealUserLogin()?(y(),T(Ie,{key:0},[g("div",Dx,[j(x)]),j(m(e))],64)):ue("",!0)])]),_:1},16,["size"]),j(S,{class:Ae(["transform-gpu isolate !overflow-hidden",l.value])},{default:we(()=>[g("div",Fx,[g("div",Lx,[j(Px)]),g("div",jx,[(y(),ne(__,null,{default:we(()=>[j(B1)]),_:1}))])])]),_:1},8,["class"])]),_:1})]),_:1},8,["class"])]),_:1})])}}});let no;function Ux(){const t=window.__GLOBAL_CONFIG__?.projectHash,e=t?`/${t}/main/`:`/${bt.WEBSITE_PATH_MAIN}/`;return no=y_({history:b_(e),routes:[{path:"/login",name:"login",component:()=>nt(()=>import("./index-CN4epH6N.js"),__vite__mapDeps([19,1,2,12,13,14,20,21,3,22,23,18]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.login"}},{path:"/upgrade",name:"upgrade",component:()=>nt(()=>import("./index-Mryq8zw5.js"),__vite__mapDeps([24,1,2,12,22,25,26,7,27]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.upgrade"}},{path:"/mdPreview",name:"mdPreview",component:()=>nt(()=>import("./index-M80Ed-Pb.js"),__vite__mapDeps([28,1,2,29,25,30]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.mdPreview"}},{path:"/previewBlank/:compId/:version?",name:"previewBlank",component:()=>nt(()=>import("./index-CYvMpsAk.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:()=>nt(()=>import("./index-CdGhZYup.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:()=>nt(()=>import("./index-BmnVYsjU.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,10,15,46,5,4,34,18,47,29,25,30,48,7,33,49,50,51]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.similarPreview"}},{path:"/",component:Nx,redirect:"/share",meta:{hideParent:!0},children:[{path:"/share",name:"share",meta:{title:"route.share",icon:qn(()=>nt(()=>import("./home-rounded--9AAXiZb.js"),__vite__mapDeps([52,16,2,53]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-D2HIFwH2.js"),__vite__mapDeps([54,1,2,45,32,36,10,15,46,5,4,34,18,55]),import.meta.url)},{path:"/mine",name:"mine",meta:{title:"route.mine",icon:qn(()=>nt(()=>import("./supervised-user-circle-BzCVjgAw.js"),__vite__mapDeps([56,16,2,57]),import.meta.url))},component:()=>nt(()=>import("./index-BV4gqPW9.js"),__vite__mapDeps([58,1,2,45,32,36,10,15,46,5,4,34,18,59,60,61,29,25,30,49,50,3,62,7,63,55]),import.meta.url)},{path:"/collect",name:"collect",meta:{title:"route.collect",icon:qn(()=>nt(()=>import("./kid-star-DWSbAoDk.js"),__vite__mapDeps([64,16,2,65]),import.meta.url))},component:()=>nt(()=>import("./index-C-elMysi.js"),__vite__mapDeps([66,1,2,45,32,36,10,15,46,5,4,34,18,55]),import.meta.url)},{path:"/local",name:"local",meta:{title:"route.local",icon:qn(()=>nt(()=>import("./sync-saved-locally-rounded-Dm232VG8.js"),__vite__mapDeps([67,16,2,68]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-EHIrsqSu.js"),__vite__mapDeps([69,1,2,45,32,36,10,15,46,5,4,34,18]),import.meta.url)},{path:"/upload",name:"upload",meta:{title:"route.upload",icon:qn(()=>nt(()=>import("./cloud-upload-DRSmr6Qo.js"),__vite__mapDeps([70,16,2,71]),import.meta.url)),noAuth:!0,hidden:!0},component:()=>nt(()=>import("./index-Dl_h7vrN.js"),__vite__mapDeps([72,1,2,60,32,4,61,34,29,25,30,5,49,50,3,62,7,18,44,46,27]),import.meta.url)},{path:"/uploadTeam/:teamId",name:"uploadTeam",meta:{title:"route.uploadTeam",hidden:!0},component:()=>nt(()=>import("./index-Dl_h7vrN.js"),__vite__mapDeps([72,1,2,60,32,4,61,34,29,25,30,5,49,50,3,62,7,18,44,46,27]),import.meta.url)},{path:"/userInfo",name:"userInfo",meta:{title:"route.userInfo",hidden:!0},component:()=>nt(()=>import("./index-BW8vDkye.js"),__vite__mapDeps([73,1,2,21,3,5,20,74,9,10,11,75,7]),import.meta.url)},{path:"/preview/:compId",meta:{title:"route.preview",noAuth:!0,hidden:!0},component:()=>nt(()=>import("./index-BmnVYsjU.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,10,15,46,5,4,34,18,47,29,25,30,48,7,33,49,50,51]),import.meta.url)},{path:"/previewLocal/:compId",meta:{title:"route.previewLocal",hidden:!0,noAuth:!0},component:()=>nt(()=>import("./index-DpHwEP_B.js"),__vite__mapDeps([76,1,2,36,47,29,25,30,46,45,32,10,15,5,4,34,18,48,7,37,49]),import.meta.url)},{path:"/previewTeam/:teamId/:compId",meta:{title:"route.previewTeam",noAuth:!0,hidden:!0},props:{isTeamPreview:!0},component:()=>nt(()=>import("./index-BmnVYsjU.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,10,15,46,5,4,34,18,47,29,25,30,48,7,33,49,50,51]),import.meta.url)},{path:"/terminal",name:"terminal",meta:{title:"route.terminal",icon:qn(()=>nt(()=>import("./terminal-Cpm-3gfc.js"),__vite__mapDeps([77,16,2,78]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-DW1TR3IW.js"),__vite__mapDeps([79,41,2,42,1,43]),import.meta.url)},{path:"/setting",name:"setting",meta:{title:"route.setting",icon:qn(()=>nt(()=>import("./settings-DyQPsIIk.js"),__vite__mapDeps([80,16,2,81]),import.meta.url)),noAuth:!0},component:()=>nt(()=>import("./index-CYRE55Ch.js"),__vite__mapDeps([82,1,2,50,83,7]),import.meta.url)},{path:"/team/:teamId",name:"team",meta:{title:"route.team",hidden:!0},component:()=>nt(()=>import("./index-CJu9086M.js"),__vite__mapDeps([84,1,2,39,40,9,10,11,45,32,36,15,46,5,4,34,18,3,55,16,50,85,7]),import.meta.url)}]},{path:"/:pathMatch(.*)*",name:"404",meta:{hidden:!0,noAuth:!0,title:"route.404"},component:()=>nt(()=>import("./index-CfYP0TVV.js"),__vite__mapDeps([86,2,1]),import.meta.url)}]}),no}function zx(t){Ux(),t.use(no)}const Vx=H([]);function Bx(t){const e=nc(M1,{errors:Vx.value}),n=document.createElement("div");n.id="error-container",e.mount(n),document.body.appendChild(n)}var Kr={exports:{}},Hx=Kr.exports,Ud;function qx(){return Ud||(Ud=1,(function(t,e){(function(n,i){t.exports=i()})(Hx,function(){function n(X){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V})(X)}function i(X,V){if(!(X instanceof V))throw new TypeError("Cannot call a class as a function")}function o(X,V){for(var J=0;J<V.length;J++){var ye=V[J];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(X,ye.key,ye)}}function r(X,V,J){V&&o(X.prototype,V),J&&o(X,J),Object.defineProperty(X,"prototype",{writable:!1})}function s(X,V,J){V in X?Object.defineProperty(X,V,{value:J,enumerable:!0,configurable:!0,writable:!0}):X[V]=J}function a(X,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(V&&V.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),Object.defineProperty(X,"prototype",{writable:!1}),V&&c(X,V)}function l(X){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)})(X)}function c(X,V){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,ye){return J.__proto__=ye,J})(X,V)}function u(X,V){if(V&&(typeof V=="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(V=X,V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}function d(X){var V=(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 J,ye=l(X);return u(this,V?(J=l(this).constructor,Reflect.construct(ye,arguments,J)):ye.apply(this,arguments))}}function h(X,V){(V==null||V>X.length)&&(V=X.length);for(var J=0,ye=new Array(V);J<V;J++)ye[J]=X[J];return ye}function v(X,V){var J,ye=typeof Symbol<"u"&&X[Symbol.iterator]||X["@@iterator"];if(!ye){if(Array.isArray(X)||(ye=(function(Z,ae){if(Z){if(typeof Z=="string")return h(Z,ae);var fe=Object.prototype.toString.call(Z).slice(8,-1);return(fe=fe==="Object"&&Z.constructor?Z.constructor.name:fe)==="Map"||fe==="Set"?Array.from(Z):fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe)?h(Z,ae):void 0}})(X))||V&&X&&typeof X.length=="number")return ye&&(X=ye),J=0,{s:V=function(){},n:function(){return J>=X.length?{done:!0}:{done:!1,value:X[J++]}},e:function(Z){throw Z},f:V};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
12
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var xe,se=!0,Me=!1;return{s:function(){ye=ye.call(X)},n:function(){var Z=ye.next();return se=Z.done,Z},e:function(Z){Me=!0,xe=Z},f:function(){try{se||ye.return==null||ye.return()}finally{if(Me)throw xe}}}}function f(){if(p.url)window.location.href=p.url;else if(p.rewriteHTML)try{document.documentElement.innerHTML=p.rewriteHTML}catch{document.documentElement.innerText=p.rewriteHTML}else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(X){console.log(X)}setTimeout(function(){window.location.href=p.timeOutUrl||"https://theajack.github.io/disable-devtool/404.html?h=".concat(encodeURIComponent(location.host))},500)}}var p={md5:"",ondevtoolopen:f,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:""},_=["detectors","ondevtoolclose","ignore"];function C(X){var V,J=0<arguments.length&&X!==void 0?X:{};for(V in J.onDevtoolOpen&&(J.ondevtoolopen=J.onDevtoolOpen),J.onDevtoolClose&&(J.ondevtoolclose=J.onDevtoolClose),p){var ye=V;J[ye]===void 0||n(p[ye])!==n(J[ye])&&_.indexOf(ye)===-1||(p[ye]=J[ye])}typeof p.ondevtoolclose=="function"&&p.clearIntervalWhenDevOpenTrigger===!0&&(p.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}function w(){return new Date().getTime()}function E(X){var V=w();return X(),w()-V}function b(X,V){function J(Me){return function(){X&&X();var Z=Me.apply(void 0,arguments);return V&&V(),Z}}var ye=window.alert,xe=window.confirm,se=window.prompt;try{window.alert=J(ye),window.confirm=J(xe),window.prompt=J(se)}catch{}}var S,x,k,O={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 K(){function X(Ft){return V.indexOf(Ft)!==-1}var V=navigator.userAgent.toLowerCase(),J=(function(){var yt=navigator,Ft=yt.platform,yt=yt.maxTouchPoints;if(typeof yt=="number")return 1<yt;if(typeof Ft=="string"){if(yt=Ft.toLowerCase(),/(mac|win)/i.test(yt))return!1;if(/(android|iphone|ipad|ipod|arch)/i.test(yt))return!0}return/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())})(),ye=!!window.top&&window!==window.top,xe=!J,se=X("qqbrowser"),Me=X("firefox"),Z=X("macintosh"),ae=X("edge"),fe=ae&&!X("chrome"),ce=fe||X("trident")||X("msie"),be=X("crios"),On=X("edgios"),Qt=X("chrome")||be,nn=!J&&/(googlebot|baiduspider|bingbot|applebot|petalbot|yandexbot|bytespider|chrome\-lighthouse|moto g power)/i.test(V);Object.assign(O,{iframe:ye,pc:xe,qqBrowser:se,firefox:Me,macos:Z,edge:ae,oldEdge:fe,ie:ce,iosChrome:be,iosEdge:On,chrome:Qt,seoBot:nn,mobile:J})}function D(){for(var X=(function(){for(var ye={},xe=0;xe<500;xe++)ye["".concat(xe)]="".concat(xe);return ye})(),V=[],J=0;J<50;J++)V.push(X);return V}function P(){p.clearLog&&k()}var U="",M=!1;function q(){var X=p.ignore;if(X){if(typeof X=="function")return X();if(X.length!==0){var V=location.href;if(U===V)return M;U=V;var J,ye=!1,xe=v(X);try{for(xe.s();!(J=xe.n()).done;){var se=J.value;if(typeof se=="string"){if(V.indexOf(se)!==-1){ye=!0;break}}else if(se.test(V)){ye=!0;break}}}catch(Me){xe.e(Me)}finally{xe.f()}return M=ye}}}var le=function(){return!1};function de(X){var V,J,ye=74,xe=73,se=85,Me=83,Z=123,ae=O.macos?function(ce,be){return ce.metaKey&&ce.altKey&&(be===xe||be===ye)}:function(ce,be){return ce.ctrlKey&&ce.shiftKey&&(be===xe||be===ye)},fe=O.macos?function(ce,be){return ce.metaKey&&ce.altKey&&be===se||ce.metaKey&&be===Me}:function(ce,be){return ce.ctrlKey&&(be===Me||be===se)};X.addEventListener("keydown",function(ce){var be=(ce=ce||X.event).keyCode||ce.which;if(be===Z||ae(ce,be)||fe(ce,be))return I(X,ce)},!0),V=X,p.disableMenu&&V.addEventListener("contextmenu",function(ce){if(ce.pointerType!=="touch")return I(V,ce)}),J=X,(p.disableSelect||p.disableInputSelect)&&Y(J,"selectstart"),J=X,p.disableCopy&&Y(J,"copy"),J=X,p.disableCut&&Y(J,"cut"),J=X,p.disablePaste&&Y(J,"paste")}function Y(X,V){X.addEventListener(V,function(J){if(!(ye=J.target)||ye.tagName!=="INPUT"&&ye.tagName!=="TEXTAREA"&&((xe=ye.getAttribute)==null?void 0:xe.call(ye,"contenteditable"))!=="true"){if(p.disableSelect)return I(X,J)}else if(p.disableInputSelect)return I(X,J);var ye,xe})}function I(X,V){if(!q()&&!le())return(V=V||X.event).returnValue=!1,V.preventDefault(),!1}var A,Q=!1,z={};function ie(X){z[X]=!1}function ve(){for(var X in z)if(z[X])return Q=!0;return Q=!1}(Pe=A=A||{})[Pe.Unknown=-1]="Unknown",Pe[Pe.RegToString=0]="RegToString",Pe[Pe.DefineId=1]="DefineId",Pe[Pe.Size=2]="Size",Pe[Pe.DateToString=3]="DateToString",Pe[Pe.FuncToString=4]="FuncToString",Pe[Pe.Debugger=5]="Debugger",Pe[Pe.Performance=6]="Performance",Pe[Pe.DebugLib=7]="DebugLib";var re=(function(){function X(ye){var J=ye.type,ye=ye.enabled,ye=ye===void 0||ye;i(this,X),this.type=A.Unknown,this.enabled=!0,this.type=J,this.enabled=ye,this.enabled&&(J=this,$.push(J),this.init())}return r(X,[{key:"onDevToolOpen",value:function(){var V;console.warn("You don't have permission to use DEVTOOL!【type = ".concat(this.type,"】")),p.clearIntervalWhenDevOpenTrigger&&B(),window.clearTimeout(R),p.ondevtoolopen(this.type,f),V=this.type,z[V]=!0}},{key:"init",value:function(){}}]),X})(),ge=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.DebugLib})}return r(V,[{key:"init",value:function(){}},{key:"detect",value:function(){var J;(((J=(J=window.eruda)==null?void 0:J._devTools)==null?void 0:J._isShow)===!0||window._vcOrigConsole&&window.document.querySelector("#__vconsole.vc-toggle"))&&this.onDevToolOpen()}}],[{key:"isUsing",value:function(){return!!window.eruda||!!window._vcOrigConsole}}]),V})(),_e=0,R=0,$=[],N=0;function F(X){function V(){fe=!0}function J(){fe=!1}var ye,xe,se,Me,Z,ae,fe=!1;function ce(){(ae[Me]===se?xe:ye)()}b(V,J),ye=J,xe=V,(ae=document).hidden!==void 0?(se="hidden",Z="visibilitychange",Me="visibilityState"):ae.mozHidden!==void 0?(se="mozHidden",Z="mozvisibilitychange",Me="mozVisibilityState"):ae.msHidden!==void 0?(se="msHidden",Z="msvisibilitychange",Me="msVisibilityState"):ae.webkitHidden!==void 0&&(se="webkitHidden",Z="webkitvisibilitychange",Me="webkitVisibilityState"),ae.removeEventListener(Z,ce,!1),ae.addEventListener(Z,ce,!1),_e=window.setInterval(function(){if(!(X.isSuspend||fe||q())){var be,On,Qt=v($);try{for(Qt.s();!(be=Qt.n()).done;){var nn=be.value;ie(nn.type),nn.detect(N++)}}catch(Ft){Qt.e(Ft)}finally{Qt.f()}P(),typeof p.ondevtoolclose=="function"&&(On=Q,!ve()&&On&&p.ondevtoolclose())}},p.interval),R=setTimeout(function(){O.pc||ge.isUsing()||B()},p.stopIntervalTime)}function B(){window.clearInterval(_e)}var oe=8;function ee(X){for(var V=(function(se,Me){se[Me>>5]|=128<<Me%32,se[14+(Me+64>>>9<<4)]=Me;for(var Z=1732584193,ae=-271733879,fe=-1732584194,ce=271733878,be=0;be<se.length;be+=16){var On=Z,Qt=ae,nn=fe,Ft=ce;Z=he(Z,ae,fe,ce,se[be+0],7,-680876936),ce=he(ce,Z,ae,fe,se[be+1],12,-389564586),fe=he(fe,ce,Z,ae,se[be+2],17,606105819),ae=he(ae,fe,ce,Z,se[be+3],22,-1044525330),Z=he(Z,ae,fe,ce,se[be+4],7,-176418897),ce=he(ce,Z,ae,fe,se[be+5],12,1200080426),fe=he(fe,ce,Z,ae,se[be+6],17,-1473231341),ae=he(ae,fe,ce,Z,se[be+7],22,-45705983),Z=he(Z,ae,fe,ce,se[be+8],7,1770035416),ce=he(ce,Z,ae,fe,se[be+9],12,-1958414417),fe=he(fe,ce,Z,ae,se[be+10],17,-42063),ae=he(ae,fe,ce,Z,se[be+11],22,-1990404162),Z=he(Z,ae,fe,ce,se[be+12],7,1804603682),ce=he(ce,Z,ae,fe,se[be+13],12,-40341101),fe=he(fe,ce,Z,ae,se[be+14],17,-1502002290),ae=he(ae,fe,ce,Z,se[be+15],22,1236535329),Z=me(Z,ae,fe,ce,se[be+1],5,-165796510),ce=me(ce,Z,ae,fe,se[be+6],9,-1069501632),fe=me(fe,ce,Z,ae,se[be+11],14,643717713),ae=me(ae,fe,ce,Z,se[be+0],20,-373897302),Z=me(Z,ae,fe,ce,se[be+5],5,-701558691),ce=me(ce,Z,ae,fe,se[be+10],9,38016083),fe=me(fe,ce,Z,ae,se[be+15],14,-660478335),ae=me(ae,fe,ce,Z,se[be+4],20,-405537848),Z=me(Z,ae,fe,ce,se[be+9],5,568446438),ce=me(ce,Z,ae,fe,se[be+14],9,-1019803690),fe=me(fe,ce,Z,ae,se[be+3],14,-187363961),ae=me(ae,fe,ce,Z,se[be+8],20,1163531501),Z=me(Z,ae,fe,ce,se[be+13],5,-1444681467),ce=me(ce,Z,ae,fe,se[be+2],9,-51403784),fe=me(fe,ce,Z,ae,se[be+7],14,1735328473),ae=me(ae,fe,ce,Z,se[be+12],20,-1926607734),Z=$e(Z,ae,fe,ce,se[be+5],4,-378558),ce=$e(ce,Z,ae,fe,se[be+8],11,-2022574463),fe=$e(fe,ce,Z,ae,se[be+11],16,1839030562),ae=$e(ae,fe,ce,Z,se[be+14],23,-35309556),Z=$e(Z,ae,fe,ce,se[be+1],4,-1530992060),ce=$e(ce,Z,ae,fe,se[be+4],11,1272893353),fe=$e(fe,ce,Z,ae,se[be+7],16,-155497632),ae=$e(ae,fe,ce,Z,se[be+10],23,-1094730640),Z=$e(Z,ae,fe,ce,se[be+13],4,681279174),ce=$e(ce,Z,ae,fe,se[be+0],11,-358537222),fe=$e(fe,ce,Z,ae,se[be+3],16,-722521979),ae=$e(ae,fe,ce,Z,se[be+6],23,76029189),Z=$e(Z,ae,fe,ce,se[be+9],4,-640364487),ce=$e(ce,Z,ae,fe,se[be+12],11,-421815835),fe=$e(fe,ce,Z,ae,se[be+15],16,530742520),ae=$e(ae,fe,ce,Z,se[be+2],23,-995338651),Z=Se(Z,ae,fe,ce,se[be+0],6,-198630844),ce=Se(ce,Z,ae,fe,se[be+7],10,1126891415),fe=Se(fe,ce,Z,ae,se[be+14],15,-1416354905),ae=Se(ae,fe,ce,Z,se[be+5],21,-57434055),Z=Se(Z,ae,fe,ce,se[be+12],6,1700485571),ce=Se(ce,Z,ae,fe,se[be+3],10,-1894986606),fe=Se(fe,ce,Z,ae,se[be+10],15,-1051523),ae=Se(ae,fe,ce,Z,se[be+1],21,-2054922799),Z=Se(Z,ae,fe,ce,se[be+8],6,1873313359),ce=Se(ce,Z,ae,fe,se[be+15],10,-30611744),fe=Se(fe,ce,Z,ae,se[be+6],15,-1560198380),ae=Se(ae,fe,ce,Z,se[be+13],21,1309151649),Z=Se(Z,ae,fe,ce,se[be+4],6,-145523070),ce=Se(ce,Z,ae,fe,se[be+11],10,-1120210379),fe=Se(fe,ce,Z,ae,se[be+2],15,718787259),ae=Se(ae,fe,ce,Z,se[be+9],21,-343485551),Z=Ne(Z,On),ae=Ne(ae,Qt),fe=Ne(fe,nn),ce=Ne(ce,Ft)}return Array(Z,ae,fe,ce)})((function(se){for(var Me=Array(),Z=(1<<oe)-1,ae=0;ae<se.length*oe;ae+=oe)Me[ae>>5]|=(se.charCodeAt(ae/oe)&Z)<<ae%32;return Me})(X),X.length*oe),J="0123456789abcdef",ye="",xe=0;xe<4*V.length;xe++)ye+=J.charAt(V[xe>>2]>>xe%4*8+4&15)+J.charAt(V[xe>>2]>>xe%4*8&15);return ye}function G(X,V,J,ye,xe,se){return Ne((V=Ne(Ne(V,X),Ne(ye,se)))<<xe|V>>>32-xe,J)}function he(X,V,J,ye,xe,se,Me){return G(V&J|~V&ye,X,V,xe,se,Me)}function me(X,V,J,ye,xe,se,Me){return G(V&ye|J&~ye,X,V,xe,se,Me)}function $e(X,V,J,ye,xe,se,Me){return G(V^J^ye,X,V,xe,se,Me)}function Se(X,V,J,ye,xe,se,Me){return G(J^(V|~ye),X,V,xe,se,Me)}function Ne(X,V){var J=(65535&X)+(65535&V);return(X>>16)+(V>>16)+(J>>16)<<16|65535&J}var Pe=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.RegToString,enabled:O.qqBrowser||O.firefox})}return r(V,[{key:"init",value:function(){var J=this;this.lastTime=0,this.reg=/./,S(this.reg),this.reg.toString=function(){var ye;return O.qqBrowser?(ye=new Date().getTime(),J.lastTime&&ye-J.lastTime<100?J.onDevToolOpen():J.lastTime=ye):O.firefox&&J.onDevToolOpen(),""}}},{key:"detect",value:function(){S(this.reg)}}]),V})(),Ue=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.DefineId})}return r(V,[{key:"init",value:function(){var J=this;this.div=document.createElement("div"),this.div.__defineGetter__("id",function(){J.onDevToolOpen()}),Object.defineProperty(this.div,"id",{get:function(){J.onDevToolOpen()}})}},{key:"detect",value:function(){S(this.div)}}]),V})(),ut=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.Size,enabled:!O.iframe&&!O.edge})}return r(V,[{key:"init",value:function(){var J=this;this.checkWindowSizeUneven(),window.addEventListener("resize",function(){setTimeout(function(){J.checkWindowSizeUneven()},100)},!0)}},{key:"detect",value:function(){}},{key:"checkWindowSizeUneven",value:function(){var J=(function(){if(Qe(window.devicePixelRatio))return window.devicePixelRatio;var xe=window.screen;return!!(Qe(xe)&&xe.deviceXDPI&&xe.logicalXDPI)&&xe.deviceXDPI/xe.logicalXDPI})();if(J!==!1){var ye=200<window.outerWidth-window.innerWidth*J,J=300<window.outerHeight-window.innerHeight*J;if(ye||J)return this.onDevToolOpen(),!1;ie(this.type)}return!0}}]),V})();function Qe(X){return X!=null}var at,tt=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.DateToString,enabled:!O.iosChrome&&!O.iosEdge})}return r(V,[{key:"init",value:function(){var J=this;this.count=0,this.date=new Date,this.date.toString=function(){return J.count++,""}}},{key:"detect",value:function(){this.count=0,S(this.date),P(),2<=this.count&&this.onDevToolOpen()}}]),V})(),pt=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.FuncToString,enabled:!O.iosChrome&&!O.iosEdge})}return r(V,[{key:"init",value:function(){var J=this;this.count=0,this.func=function(){},this.func.toString=function(){return J.count++,""}}},{key:"detect",value:function(){this.count=0,S(this.func),P(),2<=this.count&&this.onDevToolOpen()}}]),V})(),dt=(function(){a(V,re);var X=d(V);function V(){return i(this,V),X.call(this,{type:A.Debugger,enabled:O.iosChrome||O.iosEdge})}return r(V,[{key:"detect",value:function(){var J=w();100<w()-J&&this.onDevToolOpen()}}]),V})(),ft=(function(){a(V,re);var X=d(V);function V(){var J;return i(this,V),(J=X.call(this,{type:A.Performance,enabled:O.chrome||!O.mobile})).count=0,J}return r(V,[{key:"init",value:function(){this.maxPrintTime=0,this.largeObjectArray=D()}},{key:"detect",value:function(){var J=this,ye=E(function(){x(J.largeObjectArray)}),xe=E(function(){S(J.largeObjectArray)});if(this.maxPrintTime=Math.max(this.maxPrintTime,xe),P(),ye===0||this.maxPrintTime===0)return!1;ye>10*this.maxPrintTime&&(2<=this.count?this.onDevToolOpen():(this.count++,this.detect()))}}]),V})(),Dt=(s(at={},A.RegToString,Pe),s(at,A.DefineId,Ue),s(at,A.Size,ut),s(at,A.DateToString,tt),s(at,A.FuncToString,pt),s(at,A.Debugger,dt),s(at,A.Performance,ft),s(at,A.DebugLib,ge),at),fn=Object.assign(function(X){function V(){var Me=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return{success:!Me,reason:Me}}var J;if(fn.isRunning)return V("already running");if(K(),J=window.console||{log:function(){},table:function(){},clear:function(){}},k=O.ie?(S=function(){return J.log.apply(J,arguments)},x=function(){return J.table.apply(J,arguments)},function(){return J.clear()}):(S=J.log,x=J.table,J.clear),C(X),p.md5&&ee((function(Me){var Z=window.location.search,ae=window.location.hash;return(Z=Z===""&&ae!==""?"?".concat(ae.split("?")[1]):Z)!==""&&Z!==void 0&&(ae=new RegExp("(^|&)"+Me+"=([^&]*)(&|$)","i"),Me=Z.substr(1).match(ae),Me!=null)?unescape(Me[2]):""})(p.tkName))===p.md5)return V("token passed");if(p.seo&&O.seoBot)return V("seobot");fn.isRunning=!0,F(fn);var ye=fn,xe=(le=function(){return ye.isSuspend},window.top),se=window.parent;if(de(window),p.disableIframeParents&&xe&&se&&xe!==window){for(;se!==xe;)de(se),se=se.parent;de(xe)}return(p.detectors==="all"?Object.keys(Dt):p.detectors).forEach(function(Me){new Dt[Me]}),V()},{isRunning:!1,isSuspend:!1,md5:ee,version:"0.3.9",DetectorType:A,isDevToolOpened:ve});return Pe=(function(){if(typeof window>"u"||!window.document)return null;var X=document.querySelector("[disable-devtool-auto]");if(!X)return null;var V=["disable-menu","disable-select","disable-copy","disable-cut","disable-paste","clear-log"],J=["interval"],ye={};return["md5","url","tk-name","detectors"].concat(V,J).forEach(function(xe){var se=X.getAttribute(xe);se!==null&&(J.indexOf(xe)!==-1?se=parseInt(se):V.indexOf(xe)!==-1?se=se!=="false":xe==="detector"&&se!=="all"&&(se=se.split(" ")),ye[(function(Me){if(Me.indexOf("-")===-1)return Me;var Z=!1;return Me.split("").map(function(ae){return ae==="-"?(Z=!0,""):Z?(Z=!1,ae.toUpperCase()):ae}).join("")})(xe)]=se)}),ye})(),Pe&&fn(Pe),fn})})(Kr)),Kr.exports}var Wx=qx();const Kx=Fi(Wx);function Yx(){window.__GLOBAL_CONFIG__.allowDebug||Kx({disableMenu:!1})}(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.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(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var Gx=Object.defineProperty,Qx=Object.defineProperties,Xx=Object.getOwnPropertyDescriptors,zd=Object.getOwnPropertySymbols,Jx=Object.prototype.hasOwnProperty,Zx=Object.prototype.propertyIsEnumerable,Vd=(t,e,n)=>e in t?Gx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e)=>{for(var n in e||(e={}))Jx.call(e,n)&&Vd(t,n,e[n]);if(zd)for(var n of zd(e))Zx.call(e,n)&&Vd(t,n,e[n]);return t},un=(t,e)=>Qx(t,Xx(e));function yc(t,e){return Object.keys(t).reduce((n,i)=>((!e||e.indexOf(i)===-1)&&(n[i]=t[i]),n),{})}function zt(t){return Array.isArray(t)?t:[null,void 0,""].indexOf(t)>-1?[]:[t]}const eT="fcCheckbox",tT=Ce({name:eT,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(t,e){const n=$t(t.formCreateInject,"options",[]),i=$t(t,"options"),o=$t(t,"modelValue"),r=$t(t,"inputValue",""),s=H(r.value),a=$t(t,"input",!1),l=d=>{const h=[...zt(o.value)],v=h.indexOf(s.value);s.value=d,v>-1&&(h.splice(v,1),h.push(d),u(h))};Oe(r,d=>{if(!a.value){s.value=d;return}l(d)});const c=te(()=>{let d=n.value||[];return i.value&&(d=i.value||[]),Array.isArray(d)?d:[]});Oe(o,d=>{let h=null;if(!r.value&&d!=null&&Array.isArray(d)&&d.length>0&&a.value){const v=c.value.map(f=>f.value);d.forEach(f=>{v.indexOf(f)===-1&&(h=f)})}h!=null&&(s.value=h)},{immediate:!0});const u=d=>{e.emit("update:modelValue",d)};return{options:c,value:o,onInput:u,updateCustomValue:l,makeInput(d){if(a.value)return j(d,{value:s.value||void 0,label:s.value||void 0},{default:()=>[j(ze("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":l},null)]})}}},render(){const t=this.type==="button"?"ElCheckboxButton":"ElCheckbox",e=ze(t);return j(ze("ElCheckboxGroup"),We(this.$attrs,{modelValue:this.value===null?void 0:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Te({default:()=>{var n,i;return[this.options.map((o,r)=>{const s=Te({},o),a=s.value,l=s.label;return delete s.value,delete s.label,j(e,We(s,{label:a,value:a,key:t+r+"-"+a}),{default:()=>[l||a||""]})}),(i=(n=this.$slots).default)==null?void 0:i.call(n),this.makeInput(e)]}},yc(this.$slots,["default"])))},mounted(){this.$emit("fc.el",this.$refs.el)}});function gm(t){t=t||new Map;const e={$on(n,i){const o=t.get(n);o&&o.push(i)||t.set(n,[i])},$once(n,i){i._once=!0,e.$on(n,i)},$off(n,i){const o=t.get(n);o&&o.splice(o.indexOf(i)>>>0,1)},$emit(n,...i){(t.get(n)||[]).slice().map(o=>{o._once&&(e.$off(n,o),delete o._once),o(...i)}),(t.get("*")||[]).slice().map(o=>{o(n,i)})}};return e}const gi=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},nT={name:"IconCircleClose"},iT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function oT(t,e,n,i,o,r){return y(),T("svg",iT,[...e[0]||(e[0]=[g("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),g("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 rT=gi(nT,[["render",oT]]),sT={name:"IconDocument"},aT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function lT(t,e,n,i,o,r){return y(),T("svg",aT,[...e[0]||(e[0]=[g("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 cT=gi(sT,[["render",lT]]),uT={name:"IconDelete"},dT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function hT(t,e,n,i,o,r){return y(),T("svg",dT,[...e[0]||(e[0]=[g("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 pT=gi(uT,[["render",hT]]),fT={name:"IconView"},mT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function vT(t,e,n,i,o,r){return y(),T("svg",mT,[...e[0]||(e[0]=[g("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 gT=gi(fT,[["render",vT]]),_T={name:"IconFolderOpened"},yT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function bT(t,e,n,i,o,r){return y(),T("svg",yT,[...e[0]||(e[0]=[g("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 wT=gi(_T,[["render",bT]]),ET="fcFrame",CT=Ce({name:ET,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:wT,IconView:gT},data(){return{fileList:zt(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new gm}},watch:{modelValue(t){this.fileList=zt(t)}},methods:{close(){this.closeModel(!0)},closeModel(t){this.bus.$emit(t?"$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 t=this.fileList,e=this.maxLength===1?t[0]||"":t;this.$emit("update:modelValue",e),this.$emit("change",e)},makeInput(){return j(ze("ElInput"),We({type:"text",modelValue:this.fileList.map(t=>this.getSrc(t)).toString(),readonly:!0},{key:1}),{append:()=>j(ze("ElButton"),{icon:ze(this.icon),onClick:()=>this.showModel()},null),suffix:()=>this.fileList.length&&!this.disabled?j(ze("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:()=>{this.fileList=[],this.input()}},{default:()=>[j(rT,null,null)]}):null})},makeGroup(t){return(!this.maxLength||this.fileList.length<this.maxLength)&&t.push(this.makeBtn()),j("div",{key:2},[t])},makeItem(t,e){return j("div",{class:"_fc-files",key:"3"+t},[e])},valid(t){const e=this.formCreateInject.field||this.field;if(e&&t!==e)throw new Error("[frame]无效的字段值")},makeIcons(t,e){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(t,e)),this.allowRemove&&n.push(this.makeRemoveIcon(t,e)),j("div",{class:"_fc-upload-cover",key:4},[n])}},makeHandleIcon(t,e){const n=ze(this.handleIcon===!0||this.handleIcon===void 0?"icon-view":this.handleIcon);return j(ze("ElIcon"),{onClick:()=>this.handleClick(t),key:"5"+e},{default:()=>[j(n,null,null)]})},makeRemoveIcon(t,e){return j(ze("ElIcon"),{onClick:()=>this.handleRemove(t),key:"6"+e},{default:()=>[j(pT,null,null)]})},makeFiles(){return this.makeGroup(this.fileList.map((t,e)=>this.makeItem(e,[j(ze("ElIcon"),{onClick:()=>this.handleClick(t)},{default:()=>[j(cT,null,null)]}),this.makeIcons(t,e)])))},makeImages(){return this.makeGroup(this.fileList.map((t,e)=>this.makeItem(e,[j("img",{src:this.getSrc(t)},null),this.makeIcons(t,e)])))},makeBtn(){const t=ze(this.icon);return j("div",{class:"_fc-upload-btn",onClick:()=>this.showModel(),key:7},[j(ze("ElIcon"),null,{default:()=>[j(t,null,null)]})])},handleClick(t){if(this.onHandle)return this.onHandle(t);this.previewImage=this.getSrc(t),this.previewVisible=!0},handleRemove(t){this.disabled||this.onBeforeRemove(t)!==!1&&(this.fileList.splice(this.fileList.indexOf(t),1),this.input(),this.onRemove(t))},getSrc(t){return this.srcKey?t[this.srcKey]:t},frameLoad(t){this.onLoad(t);try{this.helper===!0&&(t.form_create_helper={api:this.formCreateInject.api,close:e=>{this.valid(e),this.closeModel()},set:(e,n)=>{this.valid(e),!this.disabled&&this.$emit("update:modelValue",n)},get:e=>(this.valid(e),this.modelValue),onOk:e=>this.bus.$on("$ok",e),onClose:e=>this.bus.$on("$close",e)})}catch(e){console.error(e)}},makeFooter(){const{okBtnText:t,closeBtnText:e,closeBtn:n,okBtn:i,footer:o}=this.$props;if(o)return j("div",null,[n?j(ze("ElButton"),{onClick:()=>this.onCancel()!==!1&&(this.frameVisible=!1)},{default:()=>[e||this.formCreateInject.t("close")||"关闭"]}):null,i?j(ze("ElButton"),{type:"primary",onClick:()=>this.onOk()!==!1&&this.closeModel()},{default:()=>[t||this.formCreateInject.t("ok")||"确定"]}):null])}},render(){const t=this.type;let e;t==="input"?e=this.makeInput():t==="image"?e=this.makeImages():e=this.makeFiles();const{width:n="30%",height:i,src:o,title:r,modalTitle:s}=this.$props;return Ge(()=>{this.$refs.frame&&this.frameLoad(this.$refs.frame.contentWindow||{})}),j("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[e,j(ze("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:s,modelValue:this.previewVisible,onClose:this.handleCancel},{default:()=>[j("img",{style:"width: 100%",src:this.previewImage},null)]}),j(ze("ElDialog"),We({appendToBody:!0},Te({width:n,title:r},this.modal),{modelValue:this.frameVisible,onClose:()=>this.closeModel(!0)}),{default:()=>[this.frameVisible||!this.reload?j("iframe",{ref:"frame",src:o,frameBorder:"0",style:{height:i,border:"0 none",width:"100%"}},null):null],footer:()=>this.makeFooter()})])},beforeMount(){const{name:t,field:e,api:n}=this.formCreateInject;t&&n.on("fc:closeModal:"+t,this.close),e&&n.on("fc:closeModal:"+e,this.close)},beforeUnmount(){const{name:t,field:e,api:n}=this.formCreateInject;t&&n.off("fc:closeModal:"+t,this.close),e&&n.off("fc:closeModal:"+e,this.close)}}),ST="fcRadio",xT=Ce({name:ST,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(t,e){const n=$t(t.formCreateInject,"options",[]),i=$t(t,"options"),o=$t(t,"modelValue"),r=$t(t,"inputValue",""),s=H(r.value),a=$t(t,"input",!1);Oe(r,d=>{if(!a.value){s.value=d;return}u(d)});const l=te(()=>{let d=n.value||[];return i.value&&(d=i.value||[]),Array.isArray(d)?d:[]});Oe(o,d=>{let h=!1;!r.value&&d!=null&&a.value&&(h=l.value.map(v=>v.value).indexOf(d)===-1),h&&(s.value=d)},{immediate:!0});const c=d=>{e.emit("update:modelValue",d)},u=d=>{const h=s.value;s.value=d,o.value===h&&c(d)};return{options:l,value:o,onInput:c,updateCustomValue:u,customValue:s,makeInput(d){if(a.value)return j(d,{checked:!1,value:s.value||void 0,label:s.value||void 0},{default:()=>[j(ze("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":u},null)]})}}},render(){const t=this.type==="button"?"ElRadioButton":"ElRadio",e=ze(t);return j(ze("ElRadioGroup"),We(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Te({default:()=>{var n,i;return[this.options.map((o,r)=>{const s=Te({},o),a=s.value,l=s.label;return delete s.value,delete s.label,j(e,We(s,{label:a,value:a,key:t+r+"-"+a}),{default:()=>[l||a||""]})}),(i=(n=this.$slots).default)==null?void 0:i.call(n),this.makeInput(e)]}},yc(this.$slots,["default"])))},mounted(){this.$emit("fc.el",this.$refs.el)}}),pe={type(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"},Undef(t){return t==null},Element(t){return typeof t=="object"&&t!==null&&t.nodeType===1&&!pe.Object(t)},trueArray(t){return Array.isArray(t)&&t.length>0},Function(t){const e=this.getType(t);return e==="Function"||e==="AsyncFunction"},getType(t){const e=Object.prototype.toString.call(t);return/^\[object (.*)\]$/.exec(e)[1]},empty(t){return t==null||Array.isArray(t)&&Array.isArray(t)&&!t.length?!0:typeof t=="string"&&!t}};["Date","Object","String","Boolean","Array","Number"].forEach(t=>{pe[t]=function(e){return pe.type(e,t)}});function lt(t,e){return{}.hasOwnProperty.call(t,e)}const TT="fcSelect",OT=Ce({name:TT,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup(t,{emit:e}){const n=$t(t.formCreateInject,"options",[]),i=$t(t,"modelValue");return{options:te(()=>Array.isArray(n.value)?n.value:[]),value:i,handleUpdate:o=>{e("update:modelValue",o)},hasProperty:lt,is:pe}},mounted(){this.$emit("fc.el",this.$refs.el)}});function $T(t,e,n,i,o,r){const s=ze("el-option"),a=ze("el-option-group"),l=ze("el-select");return y(),ne(l,We(t.$attrs,{"model-value":t.value,"onUpdate:modelValue":t.handleUpdate,ref:"el"}),{default:we(()=>[(y(!0),T(Ie,null,He(t.options,(c,u)=>(y(),T(Ie,null,[t.hasProperty(c,"options")?(y(),ne(a,{label:c.label,key:`${u}-${c.label}`},{default:we(()=>[(y(!0),T(Ie,null,He(t.is.trueArray(c.options)?c.options:[],(d,h)=>(y(),ne(s,We({key:`${h}-${d.value}`},{ref_for:!0},d),null,16))),128))]),_:2},1032,["label"])):(y(),ne(s,We({key:`${u}-${c.value}`},{ref_for:!0},c),null,16))],64))),256)),Ve(t.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"])}const kT=gi(OT,[["render",$T]]),AT="fcTree",PT=Ce({name:AT,inheritAttrs:!1,formCreateParser:{mergeProp(t){const e=t.prop.props;e.nodeKey||(e.nodeKey="id"),e.props||(e.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 t;this.type==="selected"?t=this.$refs.tree.getCurrentKey():t=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",t)},setValue(){this.$refs.tree&&(this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(zt(this.modelValue)))}},render(){return j(ze("ElTree"),We(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),RT={name:"IconUpload"},IT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function MT(t,e,n,i,o,r){return y(),T("svg",IT,[...e[0]||(e[0]=[g("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 DT=gi(RT,[["render",MT]]);function Bd(t,e){return typeof t=="object"?t:{url:t,is_string:!0,name:FT(t),uid:e}}function Hd(t){return un(Te({},t),{file:t,value:t})}function FT(t){return(""+t).split("/").pop()}const LT="fcUpload",jT=Ce({name:LT,inheritAttrs:!1,formCreateParser:{toFormValue(t){return zt(t)},toValue(t,e){return e.prop.props.limit===1?t[0]||"":t}},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=zt(this.modelValue).map(Bd).map(Hd)},watch:{modelValue(t){this.fileList=zt(t).map(Bd).map(Hd)}},methods:{handlePreview(t){this.onPreview?this.onPreview(...arguments):this.listType==="text"?window.open(t.url):(this.previewImage=t.url,this.previewVisible=!0)},update(t){let e=t.map(n=>n.is_string?n.url:n.value||n.url).filter(n=>n!==void 0);this.$emit("update:modelValue",e)},handleCancel(){this.previewVisible=!1},handleChange(t,e){this.$emit("change",...arguments),t.status==="success"&&this.update(e)},handleRemove(t,e){this.$emit("remove",...arguments),this.update(e)},doHttpRequest(t){if(this.httpRequest)return this.httpRequest(t);t.source="upload",this.formCreateInject.api.fetch(t)}},render(){const t=zt(this.modelValue).length;return j("div",{class:"_fc-upload"},[j(ze("ElUpload"),We({key:t},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":this.$attrs.limit?this.$attrs.limit<=t:!1},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),Te({default:()=>{var e,n;return[((n=(e=this.$slots).default)==null?void 0:n.call(e))||(["text","picture"].indexOf(this.listType)===-1?j(ze("ElIcon"),null,{default:()=>[j(DT,null,null)]}):j(ze("ElButton"),{type:"primary"},{default:()=>[this.formCreateInject.t("clickToUpload")||this.uploadText||"点击上传"]}))]}},yc(this.$slots,["default"]))),j(ze("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:()=>[j("img",{style:"width: 100%",src:this.previewImage},null)]})])},mounted(){this.$emit("fc.el",this.$refs.upload)}});function sn(t,e,n){t[e]=n}function Ei(t,e){delete t[e]}function nr(t,e={},n){let i=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){let r=e[o];if((i=Array.isArray(r))||pe.Object(r)){let s=t[o]===void 0;if(i)i=!1,s&&sn(t,o,[]);else if(r._clone&&n!==void 0)if(n)r=r.getRule(),s&&sn(t,o,{});else{sn(t,o,r._clone());continue}else s&&sn(t,o,{});t[o]=nr(t[o],r,n)}else sn(t,o,r),pe.Undef(r)||(pe.Undef(r.__json)||(t[o].__json=r.__json),pe.Undef(r.__origin)||(t[o].__origin=r.__origin))}return n!==void 0&&Array.isArray(t)?t.filter(o=>!o||!o.__ctrl):t}function Mn(t){return nr({},{value:t}).value}const NT=Object.assign||function(t){for(let e,n=1;n<arguments.length;n++)for(let i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&sn(t,i,e[i]);return t};function De(){return NT.apply(this,arguments)}function ml(t){return typeof t!="object"||t===null?t:t instanceof Array?[...t]:Te({},t)}function ci(t,e){var n=null;return function(...i){n!==null&&clearTimeout(n),n=setTimeout(()=>t.call(this,...i),e)}}function _m(t){return t==null?"":typeof t=="object"?JSON.stringify(t,null,2):String(t)}function UT(t){return t&&typeof t=="object"&&typeof t.then=="function"}function as(t){return UT(t)?t:Promise.resolve(t)}function Do(t){let e=t.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return e.indexOf("-")===0&&(e=e.substr(1)),e}function ym(t){return t.replace(t[0],t[0].toLocaleUpperCase())}function bm(t,e,n){return`[form-create ${t}]: ${e}`}function bc(t,e){console.error(bm("err",t))}function zT(t){bc(t.toString()),console.error(t)}const vl="[[FORM-CREATE-PREFIX-",gl="-FORM-CREATE-SUFFIX]]";function Fo(t,e){return JSON.stringify(nr(Array.isArray(t)?[]:{},t,!0),function(n,i){if(!(i&&i._isVue===!0)){if(typeof i!="function")return i;if(i.__json)return i.__json;if(i.__origin&&(i=i.__origin),!i.__emit)return vl+i+gl}},e)}function ca(t){return new Function("return "+t)()}function Fn(t,e){if(t&&pe.String(t)&&t.length>4){let n=t.trim(),i=!1;try{if(n.indexOf(gl)>0&&n.indexOf(vl)===0)n=n.replace(gl,"").replace(vl,""),i=!0;else if(n.indexOf("$FN:")===0)n=n.substring(4),i=!0;else if(n.indexOf("$EXEC:")===0)n=n.substring(6),i=!0;else if(n.indexOf("$GLOBAL:")===0){const r=n.substring(8);return n=function(...s){const a=s[0].api.getGlobalEvent(r);if(a)return a.call(this,...s)},n.__json=t,n.__inject=!0,n}else{if(n.indexOf("$FNX:")===0)return n=ca(`function($inject){
13
13
  `+n.substring(5)+`
14
14
  }`),n.__json=t,n.__inject=!0,n;(!e&&n.indexOf("function ")===0&&n!=="function "||!e&&n.indexOf("function(")===0&&n!=="function(")&&(i=!0)}if(!i)return t;let o;try{o=ca(n)}catch{o=ca("function "+n)}return o.__json=t,o}catch(o){bc(`解析失败:${n}
@@ -20,4 +20,4 @@ err: ${o}`);return}}return t}function wm(t,e){return JSON.parse(t,function(n,i){
20
20
  type: ${a.type}`)}),i.length>0&&this.#f()}removeFiles(e){const{files:n,currentUploads:i}=this.getState(),o={...n},r={...i},s=Object.create(null);e.forEach(u=>{n[u]&&(s[u]=n[u],delete o[u])});function a(u){return s[u]===void 0}Object.keys(r).forEach(u=>{const d=i[u].fileIDs.filter(a);if(d.length===0){delete r[u];return}const{capabilities:h}=this.getState();if(d.length!==i[u].fileIDs.length&&!h.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");r[u]={...i[u],fileIDs:d}});const l={currentUploads:r,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.#d();const c=Object.keys(s);c.forEach(u=>{this.emit("file-removed",s[u])}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e){this.removeFiles([e])}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const n=this.getFile(e),o=!(n.isPaused||!1);return this.setFileState(e,{isPaused:o}),this.emit("upload-pause",n,o),o}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(i=>!e[i].progress.uploadComplete&&e[i].progress.uploadStarted).forEach(i=>{const o={...e[i],isPaused:!0};e[i]=o}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(i=>!e[i].progress.uploadComplete&&e[i].progress.uploadStarted).forEach(i=>{const o={...e[i],isPaused:!1,error:null};e[i]=o}),this.setState({files:e}),this.emit("resume-all")}#v(){const{files:e}=this.getState();return Object.keys(e).filter(n=>{const i=e[n];return i.error&&(!i.missingRequiredMetaFields||i.missingRequiredMetaFields.length===0)})}async#g(){const e=this.#v(),n={...this.getState().files};if(e.forEach(o=>{n[o]={...n[o],isPaused:!1,error:null}}),this.setState({files:n,error:null}),this.emit("retry-all",this.getFilesByIds(e)),e.length===0)return{successful:[],failed:[]};const i=this.#h(e,{forceAllowNewUpload:!0});return this.#p(i)}async retryAll(){const e=await this.#g();return this.emit("complete",e),e}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),n=Object.keys(e);n.length&&this.removeFiles(n),this.setState(Pr)}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(e));const n=this.#h([e],{forceAllowNewUpload:!0});return this.#p(n)}logout(){this.iteratePlugins(e=>{e.provider?.logout?.()})}#C=(e,n)=>{const i=e?this.getFile(e.id):void 0;if(e==null||!i){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}if(i.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);return}const o={bytesTotal:n.bytesTotal,percentage:n.bytesTotal!=null&&Number.isFinite(n.bytesTotal)&&n.bytesTotal>0?Math.round(n.bytesUploaded/n.bytesTotal*100):void 0};i.progress.uploadStarted!=null?this.setFileState(e.id,{progress:{...i.progress,...o,bytesUploaded:n.bytesUploaded}}):this.setFileState(e.id,{progress:{...i.progress,...o}}),this.#d()};#_(){const e=this.#S();let n=null;e!=null&&(n=Math.round(e*100),n>100?n=100:n<0&&(n=0)),this.emit("progress",n??0),this.setState({totalProgress:n??0})}#d=HA(()=>this.#_(),500,{leading:!0,trailing:!0});[Symbol.for("uppy test: updateTotalProgress")](){return this.#_()}#S(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0)return 0;if(n.every(l=>l.progress.uploadComplete))return 1;const i=l=>l.progress.bytesTotal!=null&&l.progress.bytesTotal!==0,o=n.filter(i),r=n.filter(l=>!i(l));if(o.every(l=>l.progress.uploadComplete)&&r.length>0&&!r.every(l=>l.progress.uploadComplete))return null;const s=o.reduce((l,c)=>l+(c.progress.bytesTotal??0),0),a=o.reduce((l,c)=>l+(c.progress.bytesUploaded||0),0);return s===0?0:a/s}#x(){const e=(o,r,s)=>{let a=o.message||"Unknown error";o.details&&(a+=` ${o.details}`),this.setState({error:a}),r!=null&&r.id in this.getState().files&&this.setFileState(r.id,{error:a,response:s})};this.on("error",e),this.on("upload-error",(o,r,s)=>{if(e(r,o,s),typeof r=="object"&&r.message){this.log(r.message,"error");const a=new Error(this.i18n("failedToUpload",{file:o?.name??""}));a.isUserFacing=!0,a.details=r.message,r.details&&(a.details+=` ${r.details}`),this.#s([a])}else this.#s([r])});let n=null;this.on("upload-stalled",(o,r)=>{const{message:s}=o,a=r.map(l=>l.meta.name).join(", ");n||(this.info({message:s,details:a},"warning",this.opts.infoTimeout),n=setTimeout(()=>{n=null},this.opts.infoTimeout)),this.log(`${s} ${a}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const i=o=>{const r=o.filter(a=>{const l=a!=null&&this.getFile(a.id);return l||this.log(`Not setting progress for a file that has been removed: ${a?.id}`),l}),s=Object.fromEntries(r.map(a=>[a.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:a.size}}]));this.patchFilesState(s)};this.on("upload-start",i),this.on("upload-progress",this.#C),this.on("upload-success",(o,r)=>{if(o==null||!this.getFile(o.id)){this.log(`Not setting progress for a file that has been removed: ${o?.id}`);return}const s=this.getFile(o.id).progress,a=this.#a.size>0;this.setFileState(o.id,{progress:{...s,postprocess:a?{mode:"indeterminate"}:void 0,uploadComplete:!0,...!a&&{complete:!0},percentage:100,bytesUploaded:s.bytesTotal},response:r,uploadURL:r.uploadURL,isPaused:!1}),o.size==null&&this.setFileState(o.id,{size:r.bytesUploaded||s.bytesTotal}),this.#d()}),this.on("preprocess-progress",(o,r)=>{if(o==null||!this.getFile(o.id)){this.log(`Not setting progress for a file that has been removed: ${o?.id}`);return}this.setFileState(o.id,{progress:{...this.getFile(o.id).progress,preprocess:r}})}),this.on("preprocess-complete",o=>{if(o==null||!this.getFile(o.id)){this.log(`Not setting progress for a file that has been removed: ${o?.id}`);return}const r={...this.getState().files};r[o.id]={...r[o.id],progress:{...r[o.id].progress}},delete r[o.id].progress.preprocess,this.setState({files:r})}),this.on("postprocess-progress",(o,r)=>{if(o==null||!this.getFile(o.id)){this.log(`Not setting progress for a file that has been removed: ${o?.id}`);return}this.setFileState(o.id,{progress:{...this.getState().files[o.id].progress,postprocess:r}})}),this.on("postprocess-complete",o=>{const r=o&&this.getFile(o.id);if(r==null){this.log(`Not setting progress for a file that has been removed: ${o?.id}`);return}const{postprocess:s,...a}=r.progress;this.patchFilesState({[r.id]:{progress:{...a,complete:!0}}})}),this.on("restored",()=>{this.#d()}),this.on("dashboard:file-edit-complete",o=>{o&&this.#u(o)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",this.#c),window.addEventListener("offline",this.#c),setTimeout(this.#c,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)}#c=this.updateOnlineStatus.bind(this);getID(){return this.opts.id}use(e,...n){if(typeof e!="function"){const s=`Expected a plugin class, but got ${e===null?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(s)}const i=new e(this,...n),o=i.id;if(!o)throw new Error("Your plugin must have an id");if(!i.type)throw new Error("Your plugin must have a type");const r=this.getPlugin(o);if(r){const s=`Already found a plugin named '${r.id}'. Tried to use: '${o}'.
21
21
  Uppy plugins must have unique \`id\` options.`;throw new Error(s)}return e.VERSION&&this.log(`Using ${o} v${e.VERSION}`),i.type in this.#e?this.#e[i.type].push(i):this.#e[i.type]=[i],i.install(),this.emit("plugin-added",i),this}getPlugin(e){for(const n of Object.values(this.#e)){const i=n.find(o=>o.id===e);if(i!=null)return i}}[Symbol.for("uppy test: getPlugins")](e){return this.#e[e]}iteratePlugins(e){Object.values(this.#e).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const n=this.#e[e.type],i=n.findIndex(s=>s.id===e.id);i!==-1&&n.splice(i,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),this.#n(),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",this.#c),window.removeEventListener("offline",this.#c))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,n="info",i=3e3){const o=typeof e=="object";this.setState({info:[...this.getState().info,{type:n,message:o?e.message:e,details:o?e.details:null}]}),setTimeout(()=>this.hideInfo(),i),this.emit("info-visible")}log(e,n){const{logger:i}=this.opts;switch(n){case"error":i.error(e);break;case"warning":i.warn(e);break;default:i.debug(e);break}}#y=new Map;registerRequestClient(e,n){this.#y.set(e,n)}getRequestClientForFile(e){if(!("remote"in e&&e.remote))throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const n=this.#y.get(e.remote.requestClientId);if(n==null)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return n}async restore(e){this.log(`Core: Running restored upload "${e}"`);const n=await this.#p(e);return this.emit("complete",n),n}#h(e,n={}){const{forceAllowNewUpload:i=!1}=n,{allowNewUpload:o,currentUploads:r}=this.getState();if(!o&&!i)throw new Error("Cannot create a new upload: already uploading.");const s=GA();return this.emit("upload",s,this.getFilesByIds(e)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...r,[s]:{fileIDs:e,step:0,result:{}}}}),s}[Symbol.for("uppy test: createUpload")](...e){return this.#h(...e)}#T(e){const{currentUploads:n}=this.getState();return n[e]}addResultData(e,n){if(!this.#T(e)){this.log(`Not setting result for an upload that has been removed: ${e}`);return}const{currentUploads:i}=this.getState(),o={...i[e],result:{...i[e].result,...n}};this.setState({currentUploads:{...i,[e]:o}})}#b(e){const{[e]:n,...i}=this.getState().currentUploads;this.setState({currentUploads:i})}async#p(e){const n=()=>{const{currentUploads:s}=this.getState();return s[e]};let i=n();if(!i)throw new Error("Nonexistent upload");const o=[...this.#r,...this.#o,...this.#a];try{for(let s=i.step||0;s<o.length;s++){const a=o[s];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...i,step:s}}});const{fileIDs:l}=i;if(await a(l,e),i=n(),!i)break}}catch(s){throw this.#b(e),s}if(i){i.fileIDs.forEach(c=>{const u=this.getFile(c);u?.progress.postprocess&&this.emit("postprocess-complete",u)});const s=i.fileIDs.map(c=>this.getFile(c)),a=s.filter(c=>!c.error),l=s.filter(c=>c.error);this.addResultData(e,{successful:a,failed:l,uploadID:e}),i=n()}let r;return i&&(r=i.result,this.#b(e)),r==null&&(this.log(`Not setting result for an upload that has been removed: ${e}`),r={successful:[],failed:[],uploadID:e}),r}async upload(){this.#e.uploader?.length||this.log("No uploader type plugins are used","warning");let{files:e}=this.getState();if(this.#v().length>0){const o=await this.#g();if(!(this.getFiles().filter(s=>s.progress.uploadStarted==null).length>0))return this.emit("complete",o),o;({files:e}=this.getState())}const i=this.opts.onBeforeUpload(e);if(i===!1)throw new Error("Not starting the upload because onBeforeUpload returned false");i&&typeof i=="object"&&(e=i,this.setState({files:e}));try{if(this.#t.validateMinNumberOfFiles(e),!this.#l(e))throw new _n(this.i18n("missingRequiredMetaField"));const{currentUploads:o}=this.getState(),r=Object.values(o).flatMap(c=>c.fileIDs),s=Object.keys(e).filter(c=>{const u=this.getFile(c);return u&&!u.progress.uploadStarted&&!r.includes(c)}),a=this.#h(s),l=await this.#p(a);return this.emit("complete",l),l}catch(o){throw this.#s([o]),o}}}function Nh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),n.push.apply(n,i)}return n}function Xe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nh(Object(n),!0).forEach((function(i){an(t,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nh(Object(n)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}))}return t}function an(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tP(t,e){if(t==null)return{};var n,i,o=(function(s,a){if(s==null)return{};var l,c,u={},d=Object.keys(s);for(c=0;c<d.length;c++)l=d[c],a.indexOf(l)>=0||(u[l]=s[l]);return u})(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Mi(t){return(function(e){if(Array.isArray(e))return Fa(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,n){if(e){if(typeof e=="string")return Fa(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Fa(e,n)}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
22
22
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Fa(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Uh,nP,Rr,gt=(Uh=function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var s=typeof r;if(s==="string"||s==="number")i.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&i.push(a)}}else if(s==="object")if(r.toString===Object.prototype.toString)for(var l in r)e.call(r,l)&&r[l]&&i.push(l);else i.push(r.toString())}}return i.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()},Uh(Rr={path:nP,exports:{},require:function(t,e){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(e==null&&Rr.path)}},Rr.exports),Rr.exports),Sn=function(t){return function(e,n){if(!e)return t;var i;typeof e=="string"?i=e:n=e;var o=t;return i&&(o+="__"+i),o+(n?Object.keys(n).reduce((function(r,s){var a=n[s];return a&&(r+=" "+(typeof a=="boolean"?o+"--"+s:o+"--"+s+"_"+a)),r}),""):"")}};function Ol(t,e,n){var i,o,r,s,a;function l(){var u=Date.now()-s;u<e&&u>=0?i=setTimeout(l,e-u):(i=null,n||(a=t.apply(r,o),r=o=null))}e==null&&(e=100);var c=function(){r=this,o=arguments,s=Date.now();var u=n&&!i;return i||(i=setTimeout(l,e)),u&&(a=t.apply(r,o),r=o=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=t.apply(r,o),r=o=null,clearTimeout(i),i=null)},c}Ol.debounce=Ol;var $l=Ol,Re=function(){return Re=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Re.apply(this,arguments)};function rv(t,e){var n,i;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),i=t+"-"+e):(n=t||e,i=t||e),{name:n,classname:i}}function sv(t){return/^blob:/.test(t)}function zh(t){return sv(t)||(function(e){return/^data:/.test(e)})(t)}function Ni(t){return!!(t&&t.constructor&&t.call&&t.apply)}function _t(t){return t===void 0}function Xr(t){return typeof t=="object"&&t!==null}function kl(t,e,n){var i={};return Xr(t)?(Object.keys(e).forEach((function(o){_t(t[o])?i[o]=e[o]:Xr(e[o])?Xr(t[o])?i[o]=kl(t[o],e[o],n[o]):i[o]=t[o]?e[o]:n[o]:e[o]===!0||e[o]===!1?i[o]=!!t[o]:i[o]=t[o]})),i):t?e:n}function Ir(t){var e=Number(t);return Number.isNaN(e)?t:e}function Vh(t){return typeof(t=="number"||(function(e){return typeof e=="object"&&e!==null})(t)&&toString.call(t)=="[object Number]")&&!av(t)}function av(t){return t!=t}function lv(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var Oo=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},iP=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},Ac=function(t){this.type="move",this.directions=t},oP=(function(){function t(e,n,i,o,r){this.type="drag",this.nativeEvent=e,this.position=i,this.previousPosition=o,this.element=n,this.anchor=r}return t.prototype.shift=function(){var e=this,n=e.element,i=e.anchor,o=e.position;if(n){var r=n.getBoundingClientRect(),s=r.left,a=r.top;return{left:o.left-s-i.left,top:o.top-a-i.top}}return{left:0,top:0}},t})(),Pc={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(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=Mi(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce((function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}}),{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,i=e.right,o=e.bottom,r=e.top;this.anchor={left:t.clientX-n,top:t.clientY-r,bottom:o-t.clientY,right:i-t.clientX}},processMove:function(t,e){var n=Mi(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var i=this.$refs.draggable;this.$emit("drag",new oP(t,i,{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"]};Pc.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onMousedown:e[2]||(e[2]=function(){return r.onMouseDown&&r.onMouseDown.apply(r,arguments)}),onMouseover:e[3]||(e[3]=function(){return r.onMouseOver&&r.onMouseOver.apply(r,arguments)}),onMouseleave:e[4]||(e[4]=function(){return r.onMouseLeave&&r.onMouseLeave.apply(r,arguments)})},[Ve(t.$slots,"default")],34)};var La=Sn("vue-handler-wrapper"),cv={name:"HandlerWrapper",components:{DraggableElement:Pc},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=rv(this.horizontalPosition,this.verticalPosition);t=La((an(e={},n.classname,!0),an(e,"disabled",this.disabled),e))}else t=La({disabled:this.disabled});return{root:t,draggable:La("draggable")}}},emits:["leave","enter","drag","drag-end"]};cv.render=function(t,e,n,i,o,r){var s=ze("DraggableElement");return y(),ne("div",{class:r.classes.root},[j(s,{class:r.classes.draggable,onDrag:e[1]||(e[1]=function(a){return t.$emit("drag",a)}),onDragEnd:e[2]||(e[2]=function(a){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(a){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(a){return t.$emit("enter")})},{default:we((function(){return[Ve(t.$slots,"default")]})),_:3},8,["class"])],2)};var rP=Sn("vue-line-wrapper"),uv={name:"LineWrapper",components:{DraggableElement:Pc},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return rP((an(t={},this.position,!0),an(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};uv.render=function(t,e,n,i,o,r){var s=ze("DraggableElement");return y(),ne(s,{class:r.classname,onDrag:e[1]||(e[1]=function(a){return t.$emit("drag",a)}),onDragEnd:e[2]||(e[2]=function(a){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(a){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(a){return t.$emit("enter")})},{default:we((function(){return[Ve(t.$slots,"default")]})),_:3},8,["class"])};var Rn=["left","right","top","bottom"],sP=["left","right"],aP=["top","bottom"],lP=["left","top"],cP=["fill-area","fit-area","stencil","none"],Bh={left:0,top:0,width:0,height:0};function Hh(t,e,n){return!(n=n||["width","height","left","top"]).some((function(i){return t[i]!==e[i]}))}function Ln(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function io(t,e){return{left:t.left-e.left,top:t.top-e.top}}function wt(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function No(t,e){var n={left:0,top:0,right:0,bottom:0};return Rn.forEach((function(i){var o=e[i],r=Ln(t)[i];n[i]=o!==void 0&&r!==void 0?i==="left"||i==="top"?Math.max(0,o-r):Math.max(0,r-o):0})),n}function An(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function Ms(t){return{left:-t.left,top:-t.top}}function Wt(t,e){return Re(Re({},t),{left:t.left+e.left,top:t.top+e.top})}function cn(t,e,n,i){if(e!==1){if(n){var o=wt(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-o.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-o.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function Je(t){return t.width/t.height}function oo(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function ro(t,e){var n={left:0,top:0},i=No(t,e);return i.left&&i.left>0?n.left=i.left:i.right&&i.right>0&&(n.left=-i.right),i.top&&i.top>0?n.top=i.top:i.bottom&&i.bottom>0&&(n.top=-i.bottom),n}function ja(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function dv(t,e){var n=Je(t),i=Je(e);return e.width<1/0&&e.height<1/0?n>i?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function hv(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function ai(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function Ds(t,e){var n=No(Et(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,oo(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,oo(t,e)):1}function Et(t,e,n){n===void 0&&(n=!1);var i=ro(t,e);return Wt(t,n?Ms(i):i)}function Al(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function uP(t,e){return Re(Re({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function pv(t,e,n){n===void 0&&(n=!0);var i={};return Rn.forEach((function(o){var r=t[o],s=e[o];r!==void 0&&s!==void 0?i[o]=o==="left"||o==="top"?n?Math.max(r,s):Math.min(r,s):n?Math.min(r,s):Math.max(r,s):s!==void 0?i[o]=s:r!==void 0&&(i[o]=r)})),i}function Fs(t,e){return pv(t,e,!0)}function qh(t){var e=t.size,n=t.aspectRatio,i=t.ignoreMinimum,o=t.sizeRestrictions;return!!((e.correctRatio||Je(e)>=n.minimum&&Je(e)<=n.maximum)&&e.height<=o.maxHeight&&e.width<=o.maxWidth&&e.width&&e.height&&(i||e.height>=o.minHeight&&e.width>=o.minWidth))}function Wh(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Xn(t){var e=t.width,n=t.height,i=t.sizeRestrictions,o={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},r={width:Math.max(i.minWidth,Math.min(i.maxWidth,e)),height:Math.max(i.minHeight,Math.min(i.maxHeight,n))};function s(c,u){return u===void 0&&(u=!1),c.reduce((function(d,h){return qh({size:h,aspectRatio:o,sizeRestrictions:i,ignoreMinimum:u})&&(!d||Wh(h,{width:e,height:n})<Wh(d,{width:e,height:n}))?h:d}),null)}var a=[];o&&[o.minimum,o.maximum].forEach((function(c){c&&a.push({width:r.width,height:r.width/c,correctRatio:!0},{width:r.height*c,height:r.height,correctRatio:!0})})),qh({size:r,aspectRatio:o,sizeRestrictions:i})&&a.push(r);var l=s(a)||s(a,!0);return l&&{width:l.width,height:l.height}}function Pl(t){var e=t.event,n=t.coordinates,i=t.positionRestrictions,o=i===void 0?{}:i,r=Wt(n,e.directions);return Wt(r,ro(r,o))}function dP(t){var e=t.coordinates,n=t.transform,i=t.imageSize,o=t.sizeRestrictions,r=t.positionRestrictions,s=t.aspectRatio,a=t.visibleArea,l=function(u,d){return Pl({coordinates:u,positionRestrictions:r,event:new Ac({left:d.left-u.left,top:d.top-u.top})})},c=Re({},e);return(Array.isArray(n)?n:[n]).forEach((function(u){var d={};_t((d=typeof u=="function"?u({coordinates:c,imageSize:i,visibleArea:a}):u).width)&&_t(d.height)||(c=(function(h,v){var f=Re(Re(Re({},h),Xn({width:v.width,height:v.height,sizeRestrictions:o,aspectRatio:s})),{left:0,top:0});return l(f,{left:h.left,top:h.top})})(c,Re(Re({},c),d))),_t(d.left)&&_t(d.top)||(c=l(c,Re(Re({},c),d)))})),c}function hP(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,i=t.coordinates,o=t.visibleArea;t.aspectRatio;var r=t.stencilSize,s=t.sizeRestrictions,a=t.positionRestrictions;t.stencilReference;var l,c,u,d=Re({},i),h=Re({},o),v=Re({},r);l=Je(v),c=Je(d),u===void 0&&(u=.001),(l===0||c===0?Math.abs(c-l)<u:Math.abs(c/l)<1+u&&Math.abs(c/l)>1-u)||(d=Re(Re({},d),Xn({sizeRestrictions:s,width:d.width,height:d.height,aspectRatio:{minimum:Je(v),maximum:Je(v)}})));var f=Ds(h=cn(h,d.width*n.width/(h.width*v.width)),e({visibleArea:h,type:"resize"}));return f!==1&&(h=cn(h,f),d=cn(d,f)),h=Et(h=Wt(h,io(wt(d),wt(h))),e({visibleArea:h,type:"move"})),{coordinates:d=Et(d,Fs(Ln(h),a)),visibleArea:h}}function pP(t){var e=t.event,n=t.getAreaRestrictions,i=t.boundaries,o=t.coordinates,r=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var s=t.positionRestrictions;t.stencilReference;var a=Re({},o),l=Re({},r);if(o&&r&&e.type!=="manipulateImage"){var c={width:0,height:0};l.width,i.width,Je(i)>Je(a)?(c.height=.8*i.height,c.width=c.height*Je(a)):(c.width=.8*i.width,c.height=c.width*Je(a));var u=Ds(l=cn(l,a.width*i.width/(l.width*c.width)),n({visibleArea:l,type:"resize"}));l=cn(l,u),u!==1&&(c.height/=u,c.width/=u),l=Et(l=Wt(l,io(wt(a),wt(l))),n({visibleArea:l,type:"move"})),a=Et(a,Fs(Ln(l),s))}return{coordinates:a,visibleArea:l}}function fP(t){var e=t.event,n=t.coordinates,i=t.visibleArea,o=t.getAreaRestrictions,r=Re({},i),s=Re({},n);if(e.type==="setCoordinates"){var a=Math.max(0,s.width-r.width),l=Math.max(0,s.height-r.height);a>l?r=cn(r,Math.min(s.width/r.width,oo(r,o({visibleArea:r,type:"resize"})))):l>a&&(r=cn(r,Math.min(s.height/r.height,oo(r,o({visibleArea:r,type:"resize"}))))),r=Et(r=Wt(r,Ms(ro(s,Ln(r)))),o({visibleArea:r,type:"move"}))}return{visibleArea:r,coordinates:s}}function mP(t){var e=t.imageSize,n=t.visibleArea,i=t.coordinates,o=n||e;return{left:(n?n.left:0)+o.width/2-i.width/2,top:(n?n.top:0)+o.height/2-i.height/2}}function vP(t){var e=t.imageSize,n=t.visibleArea,i=t.aspectRatio,o=t.sizeRestrictions,r=n||e,s=Math.min(i.maximum||1/0,Math.max(i.minimum||0,Je(r))),a=r.width<r.height?{width:.8*r.width,height:.8*r.width/s}:{height:.8*r.height,width:.8*r.height*s};return Xn(Re(Re({},a),{aspectRatio:i,sizeRestrictions:o}))}function gP(t){var e,n,i=t.imageSize,o=t.visibleArea,r=t.boundaries,s=t.aspectRatio,a=t.sizeRestrictions,l=t.stencilSize,c=o||i;return Je(c)>Je(r)?n=(e=l.height*c.height/r.height)*Je(l):e=(n=l.width*c.width/r.width)/Je(l),Xn({width:n,height:e,aspectRatio:s,sizeRestrictions:a})}function _P(t){var e=t.getAreaRestrictions,n=t.coordinates,i=t.imageSize,o=Je(t.boundaries);if(n){var r={height:Math.max(n.height,i.height),width:Math.max(n.width,i.width)},s=dv({width:Je(r)>o?r.width:r.height*o,height:Je(r)>o?r.width/o:r.height},Al(e())),a={left:n.left+n.width/2-s.width/2,top:n.top+n.height/2-s.height/2,width:s.width,height:s.height},l=No(n,Ln(Re({left:0,top:0},i))),c={};return!l.left&&!l.right&&a.width<=i.width&&(c.left=0,c.right=i.width),!l.top&&!l.bottom&&a.height<=i.height&&(c.top=0,c.bottom=i.height),Et(a,c)}var u=Je(i);return s={height:u>o?i.height:i.width/o,width:u>o?i.height*o:i.width},{left:i.width/2-s.width/2,top:i.height/2-s.height/2,width:s.width,height:s.height}}function Mr(t,e){return pv(t,Ln(e))}function yP(t){var e=t.event,n=t.coordinates,i=t.visibleArea,o=t.sizeRestrictions,r=t.getAreaRestrictions,s=t.positionRestrictions,a=t.adjustStencil,l=e.scale,c=e.move,u=Re({},i),d=Re({},n),h=1,v=1,f=l.factor&&Math.abs(l.factor-1)>.001;u=Wt(u,{left:c.left||0,top:c.top||0});var p={stencil:{minimum:Math.max(o.minWidth?o.minWidth/d.width:0,o.minHeight?o.minHeight/d.height:0),maximum:Math.min(o.maxWidth?o.maxWidth/d.width:1/0,o.maxHeight?o.maxHeight/d.height:1/0,oo(d,s))},area:{maximum:oo(u,r({visibleArea:u,type:"resize"}))}};l.factor&&f&&(l.factor<1?(v=Math.max(l.factor,p.stencil.minimum))>1&&(v=1):l.factor>1&&(v=Math.min(l.factor,Math.min(p.area.maximum,p.stencil.maximum)))<1&&(v=1)),v&&(u=cn(u,v,l.center));var _=n.left-i.left,C=i.width+i.left-(n.width+n.left),w=n.top-i.top,E=i.height+i.top-(n.height+n.top);return u=Et(u=Wt(u,ro(u,{left:s.left!==void 0?s.left-_*v:void 0,top:s.top!==void 0?s.top-w*v:void 0,bottom:s.bottom!==void 0?s.bottom+E*v:void 0,right:s.right!==void 0?s.right+C*v:void 0})),r({visibleArea:u,type:"move"})),d.width=d.width*v,d.height=d.height*v,d.left=u.left+_*v,d.top=u.top+w*v,d=Et(d,Fs(Ln(u),s)),l.factor&&f&&a&&(l.factor>1?h=Math.min(p.area.maximum,l.factor)/v:l.factor<1&&(h=Math.max(d.height/u.height,d.width/u.width,l.factor/v)),h!==1&&(u=Wt(u=Et(u=cn(u,h,l.factor>1?l.center:wt(d)),r({visibleArea:u,type:"move"})),Ms(ro(d,Ln(u)))))),{coordinates:d,visibleArea:u}}function bP(t){var e=t.aspectRatio,n=t.getAreaRestrictions,i=t.coordinates,o=t.visibleArea,r=t.sizeRestrictions,s=t.positionRestrictions,a=t.imageSize,l=t.previousImageSize,c=t.angle,u=Re({},i),d=Re({},o),h=ai(wt(Re({left:0,top:0},l)),c);return(u=Re(Re({},Xn({sizeRestrictions:r,aspectRatio:e,width:u.width,height:u.height})),ai(wt(u),c))).left-=h.left-a.width/2+u.width/2,u.top-=h.top-a.height/2+u.height/2,d=cn(d,Ds(d,n({visibleArea:d,type:"resize"}))),{coordinates:u=Et(u,s),visibleArea:d=Et(d=Wt(d,io(wt(u),wt(i))),n({visibleArea:d,type:"move"}))}}function wP(t){var e=t.flip,n=t.previousFlip,i=t.rotate,o=t.getAreaRestrictions,r=t.coordinates,s=t.visibleArea,a=t.imageSize,l=Re({},r),c=Re({},s),u=n.horizontal!==e.horizontal,d=n.vertical!==e.vertical;if(u||d){var h=ai({left:a.width/2,top:a.height/2},-i),v=ai(wt(l),-i),f=ai({left:u?h.left-(v.left-h.left):v.left,top:d?h.top-(v.top-h.top):v.top},i);l=Wt(l,io(f,wt(l))),v=ai(wt(c),-i),c=Et(c=Wt(c,io(f=ai({left:u?h.left-(v.left-h.left):v.left,top:d?h.top-(v.top-h.top):v.top},i),wt(c))),o({visibleArea:c,type:"move"}))}return{coordinates:l,visibleArea:c}}function Kh(t){var e=t.directions,n=t.coordinates,i=t.positionRestrictions,o=i===void 0?{}:i,r=t.sizeRestrictions,s=t.preserveRatio,a=t.compensate,l=Re({},e),c=An(n,l).width,u=An(n,l).height;c<0&&(l.left<0&&l.right<0?(l.left=-(n.width-r.minWidth)/(l.left/l.right),l.right=-(n.width-r.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-r.minWidth):l.right<0&&(l.right=-(n.width-r.minWidth))),u<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-r.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-r.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-r.minHeight):l.bottom<0&&(l.bottom=-(n.height-r.minHeight)));var d=No(An(n,l),o);a&&(d.left&&d.left>0&&d.right===0?(l.right+=d.left,l.left-=d.left):d.right&&d.right>0&&d.left===0&&(l.left+=d.right,l.right-=d.right),d.top&&d.top>0&&d.bottom===0?(l.bottom+=d.top,l.top-=d.top):d.bottom&&d.bottom>0&&d.top===0&&(l.top+=d.bottom,l.bottom-=d.bottom),d=No(An(n,l),o));var h={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Rn.forEach((function(p){var _=d[p];_&&l[p]&&(h[p]=Math.max(0,1-_/l[p]))})),s){var v=Math.min.apply(null,Rn.map((function(p){return h[p]})));v!==1/0&&Rn.forEach((function(p){l[p]*=v}))}else Rn.forEach((function(p){h[p]!==1/0&&(l[p]*=h[p])}));if(c=An(n,l).width,u=An(n,l).height,l.right+l.left&&(c>r.maxWidth?h.width=(r.maxWidth-n.width)/(l.right+l.left):c<r.minWidth&&(h.width=(r.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(u>r.maxHeight?h.height=(r.maxHeight-n.height)/(l.bottom+l.top):u<r.minHeight&&(h.height=(r.minHeight-n.height)/(l.bottom+l.top))),s){var f=Math.min(h.width,h.height);f!==1/0&&Rn.forEach((function(p){l[p]*=f}))}else h.width!==1/0&&sP.forEach((function(p){l[p]*=h.width})),h.height!==1/0&&aP.forEach((function(p){l[p]*=h.height}));return l}function Dr(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var EP=Sn("vue-simple-handler"),CP=Sn("vue-simple-handler-wrapper"),Rc={name:"SimpleHandler",components:{HandlerWrapper:cv},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 t,e=(an(t={},this.horizontalPosition,!!this.horizontalPosition),an(t,this.verticalPosition,!!this.verticalPosition),an(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),an(t,"hover",this.hover),t);return{default:gt(EP(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:gt(CP(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Rc.render=function(t,e,n,i,o,r){var s=ze("HandlerWrapper");return y(),ne(s,{class:r.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:r.onDrag,onDragEnd:r.onDragEnd,onEnter:r.onEnter,onLeave:r.onLeave},{default:we((function(){return[j("div",{class:r.classes.default},null,2)]})),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var SP=Sn("vue-simple-line"),xP=Sn("vue-simple-line-wrapper"),Ic={name:"SimpleLine",components:{LineWrapper:uv},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:gt(SP(an({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:gt(xP(an({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Ic.render=function(t,e,n,i,o,r){var s=ze("LineWrapper");return y(),ne(s,{class:r.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:r.onDrag,onDragEnd:r.onDragEnd,onEnter:r.onEnter,onLeave:r.onLeave},{default:we((function(){return[j("div",{class:r.classes.root},null,2)]})),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Na=Sn("vue-bounding-box"),TP=["east","west",null],OP=["south","north",null],fv={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 Rc}},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 Ic}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return TP.forEach((function(e){OP.forEach((function(n){if(e!==n){var i=rv(e,n),o=i.name,r=i.classname;t.push({name:o,classname:r,verticalDirection:n,horizontalDirection:e})}}))})),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,i=this.linesWrappersClasses;return{root:Na(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:i}},lineNodes:function(){var t=this,e=[];return this.points.forEach((function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:gt(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:gt(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})})),e},handlerNodes:function(){var t=this,e=[],n=this.width,i=this.height;return this.points.forEach((function(o){if(t.handlers[o.name]){var r={name:o.name,component:t.handlersComponent,class:gt(t.classes.handlers.default,t.classes.handlers[o.name]),wrapperClass:gt(t.classes.handlersWrappers.default,t.classes.handlersWrappers[o.name]),hoverClass:t.classes.handlers.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!t.resizable};if(n&&i){var s=o.horizontalDirection,a=o.verticalDirection,l=s==="east"?n:s==="west"?0:n/2,c=a==="south"?i:a==="north"?0:i/2;r.wrapperClass=Na("handler"),r.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(c,"px)")},t.transitions&&t.transitions.enabled&&(r.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else r.wrapperClass=Na("handler",an({},o.classname,!0));e.push(r)}})),e}},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(t,e,n){var i,o=t.shift(),r=o.left,s=o.top,a={left:0,right:0,top:0,bottom:0};e==="west"?a.left-=r:e==="east"&&(a.right+=r),n==="north"?a.top-=s:n==="south"&&(a.bottom+=s),!n&&e?i="width":n&&!e&&(i="height"),this.resizable&&this.$emit("resize",new iP(a,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};fv.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"box",class:r.classes.root,style:r.style},[Ve(t.$slots,"default"),j("div",null,[(y(!0),ne(Ie,null,He(r.lineNodes,(function(s){return y(),ne(Ot(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(a){return r.onHandlerDrag(a,s.horizontalDirection,s.verticalDirection)},onDragEnd:e[1]||(e[1]=function(a){return r.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])})),128))]),(y(!0),ne(Ie,null,He(r.handlerNodes,(function(s){return y(),ne("div",{key:s.name,style:s.wrapperStyle,class:s.wrapperClass},[(y(),ne(Ot(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(a){return r.onHandlerDrag(a,s.horizontalDirection,s.verticalDirection)},onDragEnd:e[2]||(e[2]=function(a){return r.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)})),128))],6)};var $P=Sn("vue-draggable-area"),mv={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:$P()}}},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(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=Mi(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):lv({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,i=e.top;this.anchor={x:t.clientX-n,y:t.clientY-i}},processMove:function(t,e){var n=Mi(e);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),o=i.left,r=i.top;this.touches.length===1&&n.length===1&&this.$emit("move",new Ac({left:n[0].clientX-(o+this.anchor.x),top:n[0].clientY-(r+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};mv.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onMousedown:e[2]||(e[2]=function(){return r.onMouseDown&&r.onMouseDown.apply(r,arguments)})},[Ve(t.$slots,"default")],544)};function Ua(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t?.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t?.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function kP(t){return new Promise((function(e,n){try{if(t)if(/^data:/i.test(t))e((function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var c=atob(l),u=c.length,d=new ArrayBuffer(u),h=new Uint8Array(d),v=0;v<u;v++)h[v]=c.charCodeAt(v);return d})(t));else if(/^blob:/i.test(t)){var i=new FileReader;i.onload=function(l){e(l.target.result)},r=t,s=function(l){i.readAsArrayBuffer(l)},(a=new XMLHttpRequest).open("GET",r,!0),a.responseType="blob",a.onload=function(){this.status!=200&&this.status!==0||s(this.response)},a.send()}else{var o=new XMLHttpRequest;o.onreadystatechange=function(){o.readyState===4&&(o.status===200||o.status===0?e(o.response):n("Warning: could not load an image to parse its orientation"),o=null)},o.onprogress=function(){o.getResponseHeader("content-type")!=="image/jpeg"&&o.abort()},o.withCredentials=!1,o.open("GET",t,!0),o.responseType="arraybuffer",o.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var r,s,a}))}function vv(t){var e=t.rotate,n=t.flip,i=t.scaleX,o=t.scaleY,r="";return r+=" rotate("+e+"deg) ",r+=" scaleX("+i*(n.horizontal?-1:1)+") ",r+=" scaleY("+o*(n.vertical?-1:1)+") "}function AP(t){try{var e,n=new DataView(t),i=void 0,o=void 0,r=void 0,s=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var a=n.byteLength,l=2;l+1<a;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){r=l;break}l++}if(r&&(i=r+10,(function(v,f,p){var _,C="";for(_=f,p+=f;_<p;_++)C+=String.fromCharCode(v.getUint8(_));return C})(n,r+4,4)==="Exif")){var c=n.getUint16(i);if(((o=c===18761)||c===19789)&&n.getUint16(i+2,o)===42){var u=n.getUint32(i+4,o);u>=8&&(s=i+u)}}if(s){for(var d=n.getUint16(s,o),h=0;h<d;h++)if(l=s+12*h+2,n.getUint16(l,o)===274){l+=8,e=n.getUint16(l,o),n.setUint16(l,1,o);break}}return e}catch{return null}}function Yh(t,e){var n=e.getBoundingClientRect(),i=n.left,o=n.top,r={left:0,top:0},s=0;return t.forEach((function(a){r.left+=(a.clientX-i)/t.length,r.top+=(a.clientY-o)/t.length})),t.forEach((function(a){s+=lv({x:r.left,y:r.top},{x:a.clientX-i,y:a.clientY-o})})),{centerMass:r,spread:s,count:t.length}}var gv={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=$l(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new Oo({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=Yh(e,this.$refs.container),i=this.oldGeometricProperties;i.count===n.count&&i.count>1&&this.$emit("resize",new Oo({left:i.centerMass.left-n.centerMass.left,top:i.centerMass.top-n.centerMass.top},{factor:i.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),i=n.left,o=n.top,r=n.bottom,s=n.right;this.touches=Mi(t.touches).filter((function(a){return a.clientX>i&&a.clientX<s&&a.clientY>o&&a.clientY<r})),this.oldGeometricProperties=Yh(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=Mi(t.touches).filter((function(i){return!i.identifier||e.touches.find((function(o){return o.identifier===i.identifier}))}));this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,i=e.top,o=1+this.wheelResize.ratio*(s=t.deltaY||t.detail||t.wheelDelta,(a=+s)==0||av(a)?a:a>0?1:-1),r={left:t.clientX-n,top:t.clientY-i};this.$emit("resize",new Oo({},{factor:o,center:r})),this.touches.length||this.debouncedProcessEnd()}var s,a}},emits:["resize","move","transform-end"]};gv.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onMousedown:e[2]||(e[2]=function(){return r.onMouseDown&&r.onMouseDown.apply(r,arguments)}),onWheel:e[3]||(e[3]=function(){return r.onWheel&&r.onWheel.apply(r,arguments)})},[Ve(t.$slots,"default")],544)};var Rl={components:{TransformableImage:gv},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"]};Rl.render=function(t,e,n,i,o,r){var s=ze("transformable-image");return y(),ne(s,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(a){return t.$emit("move",a)}),onResize:e[2]||(e[2]=function(a){return t.$emit("resize",a)})},{default:we((function(){return[Ve(t.$slots,"default")]})),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Fr=Sn("vue-preview"),_v={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:Fr({fill:this.fill}),wrapper:Fr("wrapper"),imageWrapper:Fr("image-wrapper"),image:gt(Fr("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={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&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=Xe(Xe({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,i=this.imageSize.height,o=hv({width:n,height:i},e.rotate),r={width:"".concat(n,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},s={rotate:{left:(n-o.width)*e.scaleX/2,top:(i-o.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*i/2}};return r.transform=`translate(
23
- `.concat(-this.coordinates.left/t-s.rotate.left-s.scale.left,"px,").concat(-this.coordinates.top/t-s.rotate.top-s.scale.top,"px) ")+vv(e),this.transitions&&this.transitions.enabled&&(r.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),r}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(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){t.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 t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};_v.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"root",class:r.classes.root,style:r.style},[j("div",{ref:"wrapper",class:r.classes.wrapper,style:r.wrapperStyle},[it(j("img",{ref:"image",src:n.image&&n.image.src,class:r.classes.image,style:r.imageStyle},null,14,["src"]),[[En,n.image&&n.image.src]])],6)],6)};var yv={components:{Preview:_v},inheritAttrs:!1};yv.render=function(t,e,n,i,o,r){var s=ze("preview");return y(),ne(s,We(t.$attrs,{fill:!0}),null,16)};var za=Sn("vue-rectangle-stencil"),bv={name:"RectangleStencil",components:{StencilPreview:yv,BoundingBox:fv,DraggableArea:mv},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Rc}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ic}},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:gt(za({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:gt(za("preview"),this.previewClass),boundingBox:gt(za("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,i=t.left,o=t.top,r={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(i,"px, ").concat(o,"px)")};return this.transitions&&this.transitions.enabled&&(r.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),r}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),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"]};bv.render=function(t,e,n,i,o,r){var s=ze("stencil-preview"),a=ze("draggable-area"),l=ze("bounding-box");return y(),ne("div",{class:r.classes.stencil,style:r.style},[j(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:r.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:r.onResize,onResizeEnd:r.onResizeEnd},{default:we((function(){return[j(a,{movable:n.movable,onMove:r.onMove,onMoveEnd:r.onMoveEnd},{default:we((function(){return[j(s,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:r.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 PP=["transitions"],Bn=Sn("vue-advanced-cropper"),wv={name:"Cropper",components:{BackgroundWrapper:Rl},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return bv}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Rl}},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(t){return cP.indexOf(t)!==-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(t){return!(typeof t=="string"&&t!=="fill"&&t!=="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(t){var e=t.event,n=t.coordinates,i=t.aspectRatio,o=t.positionRestrictions,r=t.sizeRestrictions,s=Re(Re({},n),{right:n.left+n.width,bottom:n.top+n.height}),a=e.params||{},l=Re({},e.directions),c=a.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};r.widthFrozen&&(l.left=0,l.right=0),r.heightFrozen&&(l.top=0,l.bottom=0),Rn.forEach((function(b){c[b]||(l[b]=0)}));var u=An(s,l=Kh({coordinates:s,directions:l,sizeRestrictions:r,positionRestrictions:o})).width,d=An(s,l).height,h=a.preserveRatio?Je(s):ja(u/d,i);if(h){var v=a.respectDirection;if(v||(v=s.width>=s.height||h===1?"width":"height"),v==="width"){var f=u/h-s.height;if(c.top&&c.bottom){var p=l.top,_=l.bottom;l.bottom=Dr(f,_,p),l.top=Dr(f,p,_)}else c.bottom?l.bottom=f:c.top?l.top=f:c.right?l.right=0:c.left&&(l.left=0)}else if(v==="height"){var C=s.width-d*h;if(c.left&&c.right){var w=l.left,E=l.right;l.left=-Dr(C,w,E),l.right=-Dr(C,E,w)}else c.left?l.left=-C:c.right?l.right=-C:c.top?l.top=0:c.bottom&&(l.bottom=0)}l=Kh({directions:l,coordinates:s,sizeRestrictions:r,positionRestrictions:o,preserveRatio:!0,compensate:a.compensate})}return u=An(s,l).width,d=An(s,l).height,(h=a.preserveRatio?Je(s):ja(u/d,i))&&Math.abs(h-u/d)>.001&&Rn.forEach((function(b){c[b]||(l[b]=0)})),Pl({event:new Ac({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:o})}},moveAlgorithm:{type:Function,default:Pl},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,i=Je(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/i+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,i=t.aspectRatio,o=t.sizeRestrictions,r=t.positionRestrictions,s=Re(Re({},n),Xn({width:n.width,height:n.height,aspectRatio:i,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,o.minHeight),minWidth:Math.min(e.width,o.minWidth)}}));return s=Et(s=Wt(s,io(wt(n),wt(s))),Fs(Ln(e),r))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,i=t.getAreaRestrictions,o=t.coordinates,r=Re({},e);r.height=r.width/Je(n),r.top+=(e.height-r.height)/2,(o.height-r.height>0||o.width-r.width>0)&&(r=cn(r,Math.max(o.height/r.height,o.width/r.width)));var s=Ms(ro(o,Ln(r=cn(r,Ds(r,i({visibleArea:r,type:"resize"}))))));return r.width<o.width&&(s.left=0),r.height<o.height&&(s.top=0),r=Et(r=Wt(r,s),i({visibleArea:r,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,i=t.imageSize,o=t.imageRestriction,r=t.type,s={};return o==="fill-area"?s={left:0,top:0,right:i.width,bottom:i.height}:o==="fit-area"&&(Je(n)>Je(i)?(s={top:0,bottom:i.height},e&&r==="move"&&(e.width>i.width?(s.left=-(e.width-i.width)/2,s.right=i.width-s.left):(s.left=0,s.right=i.width))):(s={left:0,right:i.width},e&&r==="move"&&(e.height>i.height?(s.top=-(e.height-i.height)/2,s.bottom=i.height-s.top):(s.top=0,s.bottom=i.height)))),s}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.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:Xe({},Bh)}},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 t=(function(e){return e*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=kl(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:kl(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},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 t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:_t(this.minWidth)?0:Ir(this.minWidth),minHeight:_t(this.minHeight)?0:Ir(this.minHeight),maxWidth:_t(this.maxWidth)?1/0:Ir(this.maxWidth),maxHeight:_t(this.maxHeight)?1/0:Ir(this.maxHeight)});if(t=(function(i){var o=i.areaRestrictions,r=i.sizeRestrictions,s=i.boundaries,a=i.positionRestrictions,l=Re(Re({},r),{minWidth:r.minWidth!==void 0?r.minWidth:0,minHeight:r.minHeight!==void 0?r.minHeight:0,maxWidth:r.maxWidth!==void 0?r.maxWidth:1/0,maxHeight:r.maxHeight!==void 0?r.maxHeight:1/0});a.left!==void 0&&a.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,a.right-a.left)),a.bottom!==void 0&&a.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,a.bottom-a.top));var c=Al(o),u=dv(s,c);return c.width<1/0&&(!l.maxWidth||l.maxWidth>u.width)&&(l.maxWidth=Math.min(l.maxWidth,u.width)),c.height<1/0&&(!l.maxHeight||l.maxHeight>u.height)&&(l.maxHeight=Math.min(l.maxHeight,u.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l})({sizeRestrictions:t,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 e=this.getStencilSize(),n=Al(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Bn(),image:gt(Bn("image"),this.imageClass),stencil:Bn("stencil"),boundaries:gt(Bn("boundaries"),this.boundariesClass),stretcher:gt(Bn("stretcher")),background:gt(Bn("background"),this.backgroundClass),foreground:gt(Bn("foreground"),this.foregroundClass),imageWrapper:gt(Bn("image-wrapper")),cropperWrapper:gt(Bn("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,i=t.left,o=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(o-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={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||(t.opacity="0"),t},imageStyle:function(){var t=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)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},i=Xe(Xe({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),o={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+vv(i)};return this.transitionsOptions.enabled&&(o.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),o}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick((function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return t[n]!==e[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=$l(this.update,this.debounce),this.debouncedDisableTransitions=$l(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 t=this.initialized?this.prepareResult(Xe({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:Xe({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?Xe({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?Xe({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,o=i===void 0||i;this.onManipulateImage(new Oo({},{factor:1/t,center:e}),{normalize:!1,transitions:o})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,o=i===void 0||i;this.onManipulateImage(new Oo({left:t||0,top:e||0}),{normalize:!1,transitions:o})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.autoZoom,o=i===void 0||i,r=n.transitions,s=r===void 0||r;this.$nextTick((function(){e.imageLoaded?(e.transitionsActive||(s&&e.enableTransitions(),e.coordinates=e.applyTransform(t),o&&e.runAutoZoom("setCoordinates"),s&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t}))},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then((function(){t.onChange()})):this.resetVisibleArea().then((function(){t.onChange()}))},reset:function(){var t=this;return this.resetVisibleArea().then((function(){t.onChange(!1)}))},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){t(),e.awaiting=!1})))},prepareResult:function(t){return this.roundResult?(function(e){var n=e.coordinates,i=e.sizeRestrictions,o=e.positionRestrictions,r={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return r.width>i.maxWidth?r.width=Math.floor(n.width):r.width<i.minWidth&&(r.width=Math.ceil(n.width)),r.height>i.maxHeight?r.height=Math.floor(n.height):r.height<i.minHeight&&(r.height=Math.ceil(n.height)),Et(r,o)})(Xe(Xe({},this.getPublicProperties()),{},{positionRestrictions:Mr(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,i){var o=this.autoZoomAlgorithm;o||(o=this.stencilSize?hP:this.autoZoom?pP:fP);var r=o({event:{type:t,params:i},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return Xe(Xe({},r),{},{changed:!Hh(r.visibleArea,e)||!Hh(r.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,i=n!==void 0&&n,o=tP(e,PP),r=this.processAutoZoom(t,this.visibleArea,this.coordinates,o),s=r.visibleArea,a=r.coordinates,l=r.changed;i&&l&&this.enableTransitions(),this.visibleArea=s,this.coordinates=a,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return(function(e){var n=e.event,i=e.visibleArea,o=e.coefficient;if(n.type==="manipulateImage")return Re(Re({},n),{move:{left:n.move&&n.move.left?o*n.move.left:0,top:n.move&&n.move.top?o*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*o+i.left,top:n.scale.center.top*o+i.top}:null}});if(n.type==="resize"){var r=Re(Re({},n),{directions:Re({},n.directions)});return Rn.forEach((function(a){r.directions[a]*=o})),r}if(n.type==="move"){var s=Re(Re({},n),{directions:Re({},n.directions)});return lP.forEach((function(a){s.directions[a]*=o})),s}return n})(Xe(Xe({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(a,l,c){var u=c.rotate,d=c.flip,h={width:l.naturalWidth,height:l.naturalHeight},v=hv(h,u),f=a.getContext("2d");a.height=v.height,a.width=v.width,f.save();var p=ai(wt(Re({left:0,top:0},h)),u);return f.translate(-(p.left-v.width/2),-(p.top-v.height/2)),f.rotate(u*Math.PI/180),f.translate(d.horizontal?h.width:0,d.vertical?h.height:0),f.scale(d.horizontal?-1:1,d.vertical?-1:1),f.drawImage(l,0,0,h.width,h.height),f.restore(),a})(this.$refs.sourceCanvas,e,this.imageTransforms):e,i=Xe({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),o=function(a){return a.find((function(l){return c=l,!Number.isNaN(parseFloat(c))&&isFinite(c);var c}))},r=Xn({sizeRestrictions:{minWidth:o([i.width,i.minWidth])||0,minHeight:o([i.height,i.minHeight])||0,maxWidth:o([i.width,i.maxWidth])||1/0,maxHeight:o([i.height,i.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(i.maxArea&&r.width*r.height>i.maxArea){var s=Math.sqrt(i.maxArea/(r.width*r.height));r={width:Math.round(s*r.width),height:Math.round(s*r.height)}}return(function(a,l,c,u,d){a.width=u?u.width:c.width,a.height=u?u.height:c.height;var h=a.getContext("2d");h.clearRect(0,0,a.width,a.height),d&&(d.imageSmoothingEnabled&&(h.imageSmoothingEnabled=d.imageSmoothingEnabled),d.imageSmoothingQuality&&(h.imageSmoothingQuality=d.imageSmoothingQuality),d.fillColor&&(h.fillStyle=d.fillColor,h.fillRect(0,0,a.width,a.height),h.save()));var v=c.left<0?-c.left:0,f=c.top<0?-c.top:0;h.drawImage(l,c.left+v,c.top+f,c.width,c.height,v*(a.width/c.width),f*(a.height/c.height),a.width,a.height)})(t,n,this.coordinates,r,i),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?uP(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&e?Mr(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return dP({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?gP:vP);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var i=Ni(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,o=this.defaultPosition||mP,r=[i,function(s){var a=s.coordinates;return Xe({},Ni(o)?o({coordinates:a,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&r.push.apply(r,Mi(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(r,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout((function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then((function(){var i={cropper:n,imageSize:t.imageSize};if(Ni(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(i):t.defaultBoundaries==="fit"?t.boundaries=(function(o){var r=o.cropper,s=o.imageSize,a=r.clientHeight,l=r.clientWidth,c=a,u=s.width*a/s.height;return u>l&&(u=l,c=s.height*l/s.width),{width:u,height:c}})(i):t.boundaries=(function(o){var r=o.cropper;return{width:r.clientWidth,height:r.clientHeight}})(i),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=Xe(Xe({},this.defaultImageTransforms),{},{flip:Xe({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,i,o,r,s,a=t.defaultVisibleArea||_P;t.visibleArea=Ni(a)?a({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,i=e.boundaries,o=e.getAreaRestrictions,r=Re({},n),s=Je(i),r.width/r.height!==s&&(r.height=r.width/s),Et(r,o({visibleArea:r,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")})).catch((function(){t.visibleArea=null}))},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then((function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")})).catch((function(){t.visibleArea=null}))},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(o){if(zh(o))return!1;var r=window.location,s=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(o)||[],a={protocol:s[1]||"",host:s[2]||"",port:s[3]||""},l=function(c){return c.port||((c.protocol||r.protocol)==="http"?80:433)};return!(!a.protocol&&!a.host&&!a.port||a.protocol&&a.protocol==r.protocol&&a.host&&a.host==r.host&&a.host&&l(a)==l(r))})(this.src)){var n=_t(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var i=(t=this.src,new Promise((function(o){kP(t).then((function(r){var s=AP(r);o(r?{source:t,arrayBuffer:r,orientation:s}:{source:t,arrayBuffer:null,orientation:null})})).catch((function(r){console.warn(r),o({source:t,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){i.then(e.onParseImage)}),this.transitionTime)}else setTimeout((function(){e.onParseImage({source:e.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){t.$emit("ready"),t.onChange(!1)})))},onParseImage:function(t){var e=this,n=t.source,i=t.arrayBuffer,o=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&o&&o>1?sv(n)||!zh(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(r){for(var s=[],a=new Uint8Array(r);a.length>0;){var l=a.subarray(0,8192);s.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),a=a.subarray(8192)}return"data:image/jpeg;base64,"+btoa(s.join(""))})(i):this.imageAttributes.src=n,Ni(this.defaultTransforms)?this.appliedImageTransforms=Ua(this.defaultTransforms()):Xr(this.defaultTransforms)?this.appliedImageTransforms=Ua(this.defaultTransforms):this.appliedImageTransforms=(function(r){var s=Ua({});if(r)switch(r){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})(o),this.defaultImageTransforms=Xe(Xe({},this.appliedImageTransforms),{},{flip:Xe({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var r=e.$refs.image;r&&r.complete&&((function(s){return!!s.naturalWidth})(r)?e.onSuccessLoadImage():e.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender((function(){e.coordinates=e.moveAlgorithm(Xe(Xe({},e.getPublicProperties()),{},{positionRestrictions:Mr(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()}))},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=e.sizeRestrictions,i=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(Xe(Xe({},e.getPublicProperties()),{},{positionRestrictions:Mr(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,i),minHeight:Math.max(n.minHeight,i)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1}))},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,i=n!==void 0&&n,o=e.normalize,r=o===void 0||o;i&&this.enableTransitions();var s=yP(Xe(Xe({},this.getPublicProperties()),{},{event:r?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),a=s.visibleArea,l=s.coordinates;this.visibleArea=a,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,i=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:i})},getAspectRatio:function(t){var e,n,i=this.stencilProps,o=i.aspectRatio,r=i.minAspectRatio,s=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var a=this.$refs.stencil.aspectRatios();e=a.minimum,n=a.maximum}if(_t(e)&&(e=_t(o)?r:o),_t(n)&&(n=_t(o)?s:o),!t&&(_t(e)||_t(n))){var l=this.getStencilSize(),c=l?Je(l):null;_t(e)&&(e=Vh(c)?c:void 0),_t(n)&&(n=Vh(c)?c:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={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)},e=t.boundaries,n=t.stencilSize,i=t.aspectRatio,ja(Je(o=Ni(n)?n({boundaries:e,aspectRatio:i}):n),i)&&(o=Xn({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:o.width,height:o.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(o.width>e.width||o.height>e.height)&&(o=Xn({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:o.width,height:o.height,aspectRatio:{minimum:Je(o),maximum:Je(o)}})),o;var t,e,n,i,o},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 Xe({},Bh)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=Xe({},this.imageTransforms.flip),s=wP({flip:{horizontal:t?!r.horizontal:r.horizontal,vertical:e?!r.vertical:r.vertical},previousFlip:r,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()}),a=s.visibleArea,l=s.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=a,this.coordinates=l,this.onChange(),o&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,i=n===void 0||n;if(!this.transitionsActive){i&&this.enableTransitions();var o=Xe({},this.imageSize);this.appliedImageTransforms.rotate+=t;var r=bP({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:o,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=r.visibleArea,a=r.coordinates,l=this.processAutoZoom("rotateImage",s,a);s=l.visibleArea,a=l.coordinates,this.visibleArea=s,this.coordinates=a,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},RP={key:0,ref:"canvas",style:{display:"none"}},IP={key:1,ref:"sourceCanvas",style:{display:"none"}};wv.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"cropper",class:r.classes.cropper},[j("div",{ref:"stretcher",class:r.classes.stretcher},null,2),j("div",{class:r.classes.boundaries,style:r.boundariesStyle},[(y(),ne(Ot(n.backgroundWrapperComponent),{class:r.classes.cropperWrapper,"wheel-resize":r.settings.resizeImage.wheel,"touch-resize":r.settings.resizeImage.touch,"touch-move":r.settings.moveImage.touch,"mouse-move":r.settings.moveImage.mouse,onMove:r.onManipulateImage,onResize:r.onManipulateImage},{default:we((function(){return[j("div",{class:r.classes.background,style:r.boundariesStyle},null,6),j("div",{class:r.classes.imageWrapper},[j("img",{ref:"image",crossorigin:o.imageAttributes.crossOrigin,src:o.imageAttributes.src,class:r.classes.image,style:r.imageStyle,onMousedown:e[1]||(e[1]=Ye((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),j("div",{class:r.classes.foreground,style:r.boundariesStyle},null,6),it((y(),ne(Ot(n.stencilComponent),We({ref:"stencil",image:r.image,coordinates:o.coordinates,"stencil-coordinates":r.stencilCoordinates,transitions:r.transitionsOptions},n.stencilProps,{onResize:r.onResize,onResizeEnd:r.onResizeEnd,onMove:r.onMove,onMoveEnd:r.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[En,o.imageLoaded]]),n.canvas?(y(),ne("canvas",RP,null,512)):ue("",!0),n.canvas?(y(),ne("canvas",IP,null,512)):ue("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const _i=typeof window<"u",Ev=_i&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),Cv=_i&&window.devicePixelRatio>1,MP={elements_selector:".lazy",container:Ev||_i?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},Sv=t=>Object.assign({},MP,t),Gh=function(t,e){let n;const i="LazyLoad::Initialized",o=new t(e);try{n=new CustomEvent(i,{detail:{instance:o}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(i,!1,!1,{instance:o})}window.dispatchEvent(n)},DP=(t,e)=>{if(e)if(e.length)for(let n,i=0;n=e[i];i+=1)Gh(t,n);else Gh(t,e)},ei="src",Mc="srcset",Dc="sizes",xv="poster",or="llOriginalAttrs",Tv="data",Fc="loading",Ov="loaded",$v="applied",FP="entered",Lc="error",kv="native",Av="data-",Pv="ll-status",Kt=(t,e)=>t.getAttribute(Av+e),LP=(t,e,n)=>{const i=Av+e;n!==null?t.setAttribute(i,n):t.removeAttribute(i)},rr=t=>Kt(t,Pv),Li=(t,e)=>LP(t,Pv,e),Ls=t=>Li(t,null),jc=t=>rr(t)===null,jP=t=>rr(t)===Fc,NP=t=>rr(t)===Lc,Nc=t=>rr(t)===kv,UP=[Fc,Ov,$v,Lc],zP=t=>UP.indexOf(rr(t))>=0,yi=(t,e,n,i)=>{t&&typeof t=="function"&&(i===void 0?n===void 0?t(e):t(e,n):t(e,n,i))},fo=(t,e)=>{_i&&e!==""&&t.classList.add(e)},Pn=(t,e)=>{_i&&e!==""&&t.classList.remove(e)},VP=t=>{t.llTempImage=document.createElement("IMG")},BP=t=>{delete t.llTempImage},Rv=t=>t.llTempImage,js=(t,e)=>{if(!e)return;const n=e._observer;n&&n.unobserve(t)},HP=t=>{t.disconnect()},qP=(t,e,n)=>{e.unobserve_entered&&js(t,n)},Uc=(t,e)=>{t&&(t.loadingCount+=e)},WP=t=>{t&&(t.toLoadCount-=1)},Iv=(t,e)=>{t&&(t.toLoadCount=e)},KP=t=>t.loadingCount>0,YP=t=>t.toLoadCount>0,Mv=t=>{let e=[];for(let n,i=0;n=t.children[i];i+=1)n.tagName==="SOURCE"&&e.push(n);return e},zc=(t,e)=>{const n=t.parentNode;n&&n.tagName==="PICTURE"&&Mv(n).forEach(e)},Dv=(t,e)=>{Mv(t).forEach(e)},Ns=[ei],Fv=[ei,xv],Uo=[ei,Mc,Dc],Lv=[Tv],Us=t=>!!t[or],jv=t=>t[or],Nv=t=>delete t[or],so=(t,e)=>{if(Us(t))return;const n={};e.forEach((i=>{n[i]=t.getAttribute(i)})),t[or]=n},GP=t=>{Us(t)||(t[or]={backgroundImage:t.style.backgroundImage})},Di=(t,e)=>{if(!Us(t))return;const n=jv(t);e.forEach((i=>{((o,r,s)=>{s?o.setAttribute(r,s):o.removeAttribute(r)})(t,i,n[i])}))},QP=t=>{if(!Us(t))return;const e=jv(t);t.style.backgroundImage=e.backgroundImage},Uv=(t,e,n)=>{fo(t,e.class_applied),Li(t,$v),n&&(e.unobserve_completed&&js(t,e),yi(e.callback_applied,t,n))},zv=(t,e,n)=>{fo(t,e.class_loading),Li(t,Fc),n&&(Uc(n,1),yi(e.callback_loading,t,n))},ui=(t,e,n)=>{n&&t.setAttribute(e,n)},Qh=(t,e)=>{ui(t,Dc,Kt(t,e.data_sizes)),ui(t,Mc,Kt(t,e.data_srcset)),ui(t,ei,Kt(t,e.data_src))},XP=(t,e)=>{zc(t,(n=>{so(n,Uo),Qh(n,e)})),so(t,Uo),Qh(t,e)},JP=(t,e)=>{so(t,Ns),ui(t,ei,Kt(t,e.data_src))},ZP=(t,e)=>{Dv(t,(n=>{so(n,Ns),ui(n,ei,Kt(n,e.data_src))})),so(t,Fv),ui(t,xv,Kt(t,e.data_poster)),ui(t,ei,Kt(t,e.data_src)),t.load()},eR=(t,e)=>{so(t,Lv),ui(t,Tv,Kt(t,e.data_src))},tR=(t,e,n)=>{const i=Kt(t,e.data_bg),o=Kt(t,e.data_bg_hidpi),r=Cv&&o?o:i;r&&(t.style.backgroundImage=`url("${r}")`,Rv(t).setAttribute(ei,r),zv(t,e,n))},nR=(t,e,n)=>{const i=Kt(t,e.data_bg_multi),o=Kt(t,e.data_bg_multi_hidpi),r=Cv&&o?o:i;r&&(t.style.backgroundImage=r,Uv(t,e,n))},iR=(t,e,n)=>{const i=Kt(t,e.data_bg_set);if(!i)return;let o=i.split("|").map((r=>`image-set(${r})`));t.style.backgroundImage=o.join(),Uv(t,e,n)},Vv={IMG:XP,IFRAME:JP,VIDEO:ZP,OBJECT:eR},oR=(t,e)=>{const n=Vv[t.tagName];n&&n(t,e)},rR=(t,e,n)=>{const i=Vv[t.tagName];i&&(i(t,e),zv(t,e,n))},sR=["IMG","IFRAME","VIDEO","OBJECT"],aR=t=>sR.indexOf(t.tagName)>-1,Bv=(t,e)=>{!e||KP(e)||YP(e)||yi(t.callback_finish,e)},Xh=(t,e,n)=>{t.addEventListener(e,n),t.llEvLisnrs[e]=n},lR=(t,e,n)=>{t.removeEventListener(e,n)},Vc=t=>!!t.llEvLisnrs,cR=(t,e,n)=>{Vc(t)||(t.llEvLisnrs={});const i=t.tagName==="VIDEO"?"loadeddata":"load";Xh(t,i,e),Xh(t,"error",n)},Il=t=>{if(!Vc(t))return;const e=t.llEvLisnrs;for(let n in e){const i=e[n];lR(t,n,i)}delete t.llEvLisnrs},Hv=(t,e,n)=>{BP(t),Uc(n,-1),WP(n),Pn(t,e.class_loading),e.unobserve_completed&&js(t,n)},uR=(t,e,n,i)=>{const o=Nc(e);Hv(e,n,i),fo(e,n.class_loaded),Li(e,Ov),yi(n.callback_loaded,e,i),o||Bv(n,i)},dR=(t,e,n,i)=>{const o=Nc(e);Hv(e,n,i),fo(e,n.class_error),Li(e,Lc),yi(n.callback_error,e,i),n.restore_on_error&&Di(e,Uo),o||Bv(n,i)},Ml=(t,e,n)=>{const i=Rv(t)||t;Vc(i)||cR(i,(o=>{uR(0,t,e,n),Il(i)}),(o=>{dR(0,t,e,n),Il(i)}))},Dl=(t,e,n)=>{aR(t)?((i,o,r)=>{Ml(i,o,r),rR(i,o,r)})(t,e,n):((i,o,r)=>{VP(i),Ml(i,o,r),GP(i),tR(i,o,r),nR(i,o,r),iR(i,o,r)})(t,e,n)},hR=(t,e,n)=>{t.setAttribute("loading","lazy"),Ml(t,e,n),oR(t,e),Li(t,kv)},Jh=t=>{t.removeAttribute(ei),t.removeAttribute(Mc),t.removeAttribute(Dc)},pR=t=>{zc(t,(e=>{Jh(e)})),Jh(t)},qv=t=>{zc(t,(e=>{Di(e,Uo)})),Di(t,Uo)},fR=t=>{Dv(t,(e=>{Di(e,Ns)})),Di(t,Fv),t.load()},mR=t=>{Di(t,Ns)},vR=t=>{Di(t,Lv)},gR={IMG:qv,IFRAME:mR,VIDEO:fR,OBJECT:vR},_R=(t,e)=>{(n=>{const i=gR[n.tagName];i?i(n):QP(n)})(t),((n,i)=>{jc(n)||Nc(n)||(Pn(n,i.class_entered),Pn(n,i.class_exited),Pn(n,i.class_applied),Pn(n,i.class_loading),Pn(n,i.class_loaded),Pn(n,i.class_error))})(t,e),Ls(t),Nv(t)},yR=(t,e,n,i)=>{n.cancel_on_exit&&jP(t)&&t.tagName==="IMG"&&(Il(t),pR(t),qv(t),Pn(t,n.class_loading),Uc(i,-1),Ls(t),yi(n.callback_cancel,t,e,i))},bR=(t,e,n,i)=>{const o=zP(t);Li(t,FP),fo(t,n.class_entered),Pn(t,n.class_exited),qP(t,n,i),yi(n.callback_enter,t,e,i),o||Dl(t,n,i)},wR=(t,e,n,i)=>{jc(t)||(fo(t,n.class_exited),yR(t,e,n,i),yi(n.callback_exit,t,e,i))},ER=["IMG","IFRAME","VIDEO"],Wv=t=>t.use_native&&"loading"in HTMLImageElement.prototype,CR=(t,e,n)=>{t.forEach((i=>{ER.indexOf(i.tagName)!==-1&&hR(i,e,n)})),Iv(n,0)},SR=t=>t.isIntersecting||t.intersectionRatio>0,xR=(t,e)=>{e.forEach((n=>{t.observe(n)}))},TR=(t,e)=>{HP(t),xR(t,e)},OR=(t,e)=>{Wv(t)||(e._observer=new IntersectionObserver((n=>{((i,o,r)=>{i.forEach((s=>SR(s)?bR(s.target,s,o,r):wR(s.target,s,o,r)))})(n,t,e)}),(n=>({root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))(t)))},Kv=t=>Array.prototype.slice.call(t),cs=t=>t.container.querySelectorAll(t.elements_selector),$R=t=>Kv(t).filter(jc),kR=t=>NP(t),AR=t=>Kv(t).filter(kR),Zh=(t,e)=>$R(t||cs(e)),PR=(t,e)=>{AR(cs(t)).forEach((n=>{Pn(n,t.class_error),Ls(n)})),e.update()},RR=(t,e)=>{_i&&(e._onlineHandler=()=>{PR(t,e)},window.addEventListener("online",e._onlineHandler))},IR=t=>{_i&&window.removeEventListener("online",t._onlineHandler)},Hi=function(t,e){const n=Sv(t);this._settings=n,this.loadingCount=0,OR(n,this),RR(n,this),this.update(e)};Hi.prototype={update:function(t){const e=this._settings,n=Zh(t,e);Iv(this,n.length),Ev?this.loadAll(n):Wv(e)?CR(n,e,this):TR(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),IR(this),cs(this._settings).forEach((t=>{Nv(t)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){const e=this._settings;Zh(t,e).forEach((n=>{js(n,this),Dl(n,e,this)}))},restoreAll:function(){const t=this._settings;cs(t).forEach((e=>{_R(e,t)}))}},Hi.load=(t,e)=>{const n=Sv(e);Dl(t,n)},Hi.resetStatus=t=>{Ls(t)},_i&&DP(Hi,window.lazyLoadOptions);const Xt=(t,e)=>{const{o:n,i,u:o}=t;let r=n,s;const a=(u,d)=>{const h=r,v=u,f=d||(i?!i(h,v):h!==v);return(f||o)&&(r=v,s=h),[r,f,s]};return[e?u=>a(e(r,s),u):a,u=>[r,!!u,s]]},MR=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,Bt=MR?window:{},Yv=Math.max,DR=Math.min,Fl=Math.round,li=Math.abs,ep=Math.sign,Bc=Bt.cancelAnimationFrame,zo=Bt.requestAnimationFrame,Hc=Bt.setTimeout,Gv=Bt.clearTimeout,zs=t=>typeof Bt[t]<"u"?Bt[t]:void 0,FR=zs("MutationObserver"),tp=zs("IntersectionObserver"),qi=zs("ResizeObserver"),To=zs("ScrollTimeline"),qc=t=>t===void 0,Vs=t=>t===null,di=t=>typeof t=="number",mo=t=>typeof t=="string",Bs=t=>typeof t=="boolean",xn=t=>typeof t=="function",dn=t=>Array.isArray(t),us=t=>typeof t=="object"&&!dn(t)&&!Vs(t),Wc=t=>{const e=!!t&&t.length,n=di(e)&&e>-1&&e%1==0;return dn(t)||!xn(t)&&n?e>0&&us(t)?e-1 in t:!0:!1},Vo=t=>!!t&&t.constructor===Object,ds=t=>t instanceof HTMLElement,Hs=t=>t instanceof Element;function ot(t,e){if(Wc(t))for(let n=0;n<t.length&&e(t[n],n,t)!==!1;n++);else t&&ot(Object.keys(t),(n=>e(t[n],n,t)));return t}const Qv=(t,e)=>t.indexOf(e)>=0,ao=(t,e)=>t.concat(e),ct=(t,e,n)=>(!mo(e)&&Wc(e)?Array.prototype.push.apply(t,e):t.push(e),t),bi=t=>Array.from(t||[]),Kc=t=>dn(t)?t:!mo(t)&&Wc(t)?bi(t):[t],hs=t=>!!t&&!t.length,ps=t=>bi(new Set(t)),Zt=(t,e,n)=>{ot(t,o=>o?o.apply(void 0,e||[]):!0),n||(t.length=0)},Xv="paddingTop",Jv="paddingRight",Zv="paddingLeft",eg="paddingBottom",tg="marginLeft",ng="marginRight",ig="marginBottom",Yc="overflowX",Gc="overflowY",sr="width",ar="height",Yn="visible",yn="hidden",Pi="scroll",LR=t=>{const e=String(t||"");return e?e[0].toUpperCase()+e.slice(1):""},qs=(t,e,n,i)=>{if(t&&e){let o=!0;return ot(n,(r=>{const s=t[r],a=e[r];s!==a&&(o=!1)})),o}return!1},Qc=(t,e)=>qs(t,e,["w","h"]),Jr=(t,e)=>qs(t,e,["x","y"]),jR=(t,e)=>qs(t,e,["t","r","b","l"]),Le=(t,...e)=>t.bind(0,...e),Wi=t=>{let e;const n=t?Hc:zo,i=t?Gv:Bc;return[o=>{i(e),e=n((()=>o()),xn(t)?t():t)},()=>i(e)]},np=t=>{const e=xn(t)?t():t;if(di(e)){const n=e?Hc:zo,i=e?Gv:Bc;return o=>{const r=n((()=>o()),e);return()=>{i(r)}}}return e&&e._},og=(t,e)=>{const{p:n,v:i,S:o,m:r}=e||{};let s,a,l,c;const u=function(p){a&&a(),s&&s(),c=a=s=l=void 0,t.apply(this,p)},d=f=>r&&l?r(l,f):f,h=()=>{a&&l&&u(d(l)||l)},v=function(){const p=bi(arguments),_=np(n);if(_){const C=typeof o=="function"?o():o,w=np(i),b=d(p)||p,S=u.bind(0,b);a&&a(),C&&!c?(S(),c=!0,a=_((()=>c=void 0))):(a=_(S),w&&!s&&(s=w(h))),l=b}else u(p)};return v.O=h,v},rg=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ut=t=>t?Object.keys(t):[],Ze=(t,e,n,i,o,r,s)=>{const a=[e,n,i,o,r,s];return(typeof t!="object"||Vs(t))&&!xn(t)&&(t={}),ot(a,(l=>{ot(l,((c,u)=>{const d=l[u];if(t===d)return!0;const h=dn(d);if(d&&Vo(d)){const v=t[u];let f=v;h&&!dn(v)?f=[]:!h&&!Vo(v)&&(f={}),t[u]=Ze(f,d)}else t[u]=h?d.slice():d}))})),t},sg=(t,e)=>ot(Ze({},t),((n,i,o)=>{n===void 0?delete o[i]:n&&Vo(n)&&(o[i]=sg(n))})),Xc=t=>!Ut(t).length,Bo=()=>{},ag=(t,e,n)=>Yv(t,DR(e,n)),Ri=t=>ps((dn(t)?t:(t||"").split(" ")).filter((e=>e))),Jc=(t,e)=>t&&t.getAttribute(e),ip=(t,e)=>t&&t.hasAttribute(e),Wn=(t,e,n)=>{ot(Ri(e),(i=>{t&&t.setAttribute(i,String(n||""))}))},$n=(t,e)=>{ot(Ri(e),(n=>t&&t.removeAttribute(n)))},Ws=(t,e)=>{const n=Ri(Jc(t,e)),i=Le(Wn,t,e),o=(r,s)=>{const a=new Set(n);return ot(Ri(r),(l=>{a[s](l)})),bi(a).join(" ")};return{C:r=>i(o(r,"delete")),$:r=>i(o(r,"add")),H:r=>{const s=Ri(r);return s.reduce(((a,l)=>a&&n.includes(l)),s.length>0)}}},lg=(t,e,n)=>(Ws(t,e).C(n),Le(Zc,t,e,n)),Zc=(t,e,n)=>(Ws(t,e).$(n),Le(lg,t,e,n)),fs=(t,e,n,i)=>(i?Zc:lg)(t,e,n),eu=(t,e,n)=>Ws(t,e).H(n),cg=t=>Ws(t,"class"),ug=(t,e)=>{cg(t).C(e)},Ks=(t,e)=>(cg(t).$(e),Le(ug,t,e)),dg=(t,e)=>{const n=e?Hs(e)&&e:document;return n?bi(n.querySelectorAll(t)):[]},NR=(t,e)=>{const n=e?Hs(e)&&e:document;return n&&n.querySelector(t)},Ll=(t,e)=>Hs(t)&&t.matches(e),hg=t=>Ll(t,"body"),jl=t=>t?bi(t.childNodes):[],Ho=t=>t&&t.parentElement,Ki=(t,e)=>Hs(t)&&t.closest(e),Nl=t=>document.activeElement,UR=(t,e,n)=>{const i=Ki(t,e),o=t&&NR(n,i),r=Ki(o,e)===i;return i&&o?i===t||o===t||r&&Ki(Ki(t,n),e)!==i:!1},lo=t=>{ot(Kc(t),(e=>{const n=Ho(e);e&&n&&n.removeChild(e)}))},It=(t,e)=>Le(lo,t&&e&&ot(Kc(e),(n=>{n&&t.appendChild(n)})));let pg;const zR=()=>pg,VR=t=>{pg=t},Xi=t=>{const e=document.createElement("div");return Wn(e,"class",t),e},tu=t=>{const e=Xi(),n=zR(),i=t.trim();return e.innerHTML=n?n.createHTML(i):i,ot(jl(e),(o=>lo(o)))},op=(t,e)=>t.getPropertyValue(e)||t[e]||"",fg=t=>{const e=t||0;return isFinite(e)?e:0},Lr=t=>fg(parseFloat(t||"")),Ul=t=>Math.round(t*1e4)/1e4,mg=t=>`${Ul(fg(t))}px`;function co(t,e){t&&e&&ot(e,((n,i)=>{try{const o=t.style,r=Vs(n)||Bs(n)?"":di(n)?mg(n):n;i.indexOf("--")===0?o.setProperty(i,r):o[i]=r}catch{}}))}function jn(t,e,n){const i=mo(e);let o=i?"":{};if(t){const r=Bt.getComputedStyle(t,n)||t.style;o=i?op(r,e):bi(e).reduce(((s,a)=>(s[a]=op(r,a),s)),o)}return o}const rp=(t,e,n)=>{const i=e?`${e}-`:"",o=n?`-${n}`:"",r=`${i}top${o}`,s=`${i}right${o}`,a=`${i}bottom${o}`,l=`${i}left${o}`,c=jn(t,[r,s,a,l]);return{t:Lr(c[r]),r:Lr(c[s]),b:Lr(c[a]),l:Lr(c[l])}},Va=(t,e)=>`translate${us(t)?`(${t.x},${t.y})`:`${e?"X":"Y"}(${t})`}`,BR=t=>!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length),HR={w:0,h:0},Ys=(t,e)=>e?{w:e[`${t}Width`],h:e[`${t}Height`]}:HR,qR=t=>Ys("inner",t||Bt),hi=Le(Ys,"offset"),vg=Le(Ys,"client"),ms=Le(Ys,"scroll"),nu=t=>{const e=parseFloat(jn(t,sr))||0,n=parseFloat(jn(t,ar))||0;return{w:e-Fl(e),h:n-Fl(n)}},Ba=t=>t.getBoundingClientRect(),WR=t=>!!t&&BR(t),zl=t=>!!(t&&(t[ar]||t[sr])),gg=(t,e)=>{const n=zl(t);return!zl(e)&&n},sp=(t,e,n,i)=>{ot(Ri(e),(o=>{t&&t.removeEventListener(o,n,i)}))},st=(t,e,n,i)=>{var o;const r=(o=i&&i.D)!=null?o:!0,s=i&&i.I||!1,a=i&&i.A||!1,l={passive:r,capture:s};return Le(Zt,Ri(e).map((c=>{const u=a?d=>{sp(t,c,u,s),n&&n(d)}:n;return t&&t.addEventListener(c,u,l),Le(sp,t,c,u,s)})))},iu=t=>t.stopPropagation(),Vl=t=>t.preventDefault(),_g=t=>iu(t)||Vl(t),ln=(t,e)=>{const{x:n,y:i}=di(e)?{x:e,y:e}:e||{};di(n)&&(t.scrollLeft=n),di(i)&&(t.scrollTop=i)},Jt=t=>({x:t.scrollLeft,y:t.scrollTop}),yg=()=>({T:{x:0,y:0},k:{x:0,y:0}}),KR=(t,e)=>{const{T:n,k:i}=t,{w:o,h:r}=e,s=(d,h,v)=>{let f=ep(d)*v,p=ep(h)*v;if(f===p){const _=li(d),C=li(h);p=_>C?0:p,f=_<C?0:f}return f=f===p?0:f,[f+0,p+0]},[a,l]=s(n.x,i.x,o),[c,u]=s(n.y,i.y,r);return{T:{x:a,y:c},k:{x:l,y:u}}},Ha=({T:t,k:e})=>{const n=(i,o)=>i===0&&i<=o;return{x:n(t.x,e.x),y:n(t.y,e.y)}},ap=({T:t,k:e},n)=>{const i=(o,r,s)=>ag(0,1,(o-s)/(o-r)||0);return{x:i(t.x,e.x,n.x),y:i(t.y,e.y,n.y)}},Bl=t=>{t&&t.focus&&t.focus({preventScroll:!0,focusVisible:!1})},lp=(t,e)=>{ot(Kc(e),t)},Hl=t=>{const e=new Map,n=(r,s)=>{if(r){const a=e.get(r);lp((l=>{a&&a[l?"delete":"clear"](l)}),s)}else e.forEach((a=>{a.clear()})),e.clear()},i=(r,s)=>{if(mo(r)){const c=e.get(r)||new Set;return e.set(r,c),lp((u=>{xn(u)&&c.add(u)}),s),Le(n,r,s)}Bs(s)&&s&&n();const a=Ut(r),l=[];return ot(a,(c=>{const u=r[c];u&&ct(l,i(c,u))})),Le(Zt,l)},o=(r,s)=>{ot(bi(e.get(r)),(a=>{s&&!hs(s)?a.apply(0,s):a()}))};return i(t||{}),[i,n,o]},bg={},wg={},YR=t=>{ot(t,(e=>ot(e,((n,i)=>{bg[i]=e[i]}))))},Eg=(t,e,n)=>Ut(t).map((i=>{const{static:o,instance:r}=t[i],[s,a,l]=n||[],c=n?r:o;if(c){const u=n?c(s,a,e):c(e);return(l||wg)[i]=u}})),GR=(t,e)=>t[e],vo=t=>GR(wg,t),QR="__osOptionsValidationPlugin",go="data-overlayscrollbars",Zr="os-environment",jr=`${Zr}-scrollbar-hidden`,qa=`${go}-initialize`,es="noClipping",cp=`${go}-body`,pi=go,XR="host",Kn=`${go}-viewport`,JR=Yc,ZR=Gc,eI="arrange",Cg="measuring",tI="scrolling",Sg="scrollbarHidden",nI="noContent",ql=`${go}-padding`,up=`${go}-content`,ou="os-size-observer",iI=`${ou}-appear`,ru=`${ou}-listener`,oI=`${ru}-scroll`,ts=`${ru}-item`,dp=`${ts}-final`,rI="os-trinsic-observer",sI="os-theme-none",en="os-scrollbar",aI=`${en}-rtl`,lI=`${en}-horizontal`,cI=`${en}-vertical`,xg=`${en}-track`,su=`${en}-handle`,uI=`${en}-visible`,dI=`${en}-cornerless`,hp=`${en}-interaction`,pp=`${en}-unusable`,Wl=`${en}-auto-hide`,hI=`${Wl}-hidden`,fp=`${en}-wheel`,pI=`${xg}-interactive`,fI=`${su}-interactive`,Tg="__osSizeObserverPlugin",mI={[Tg]:{static:()=>(t,e,n)=>{const o="scroll",r=tu(`<div class="${ts}" dir="ltr"><div class="${ts}"><div class="${dp}"></div></div><div class="${ts}"><div class="${dp}" style="width: 200%; height: 200%"></div></div></div>`),s=r[0],a=s.lastChild,l=s.firstChild,c=l?.firstChild;let u=hi(s),d=u,h=!1,v;const f=()=>{ln(l,3333333),ln(a,3333333)},p=w=>{v=0,h&&(u=d,e(w===!0))},_=w=>{d=hi(s),h=!w||!Qc(d,u),w?(iu(w),h&&!v&&(Bc(v),v=zo(p))):p(w===!1),f()},C=[It(t,r),st(l,o,_),st(a,o,_)];return Ks(t,oI),co(c,{[sr]:3333333,[ar]:3333333}),zo(f),[n?Le(_,!1):f,C]}}},vI=(t,e)=>{const{M:n}=e,[i,o]=t("showNativeOverlaidScrollbars");return[i&&n.x&&n.y,o]},Yi=t=>t.indexOf(Yn)===0,gI=t=>t.replace(`${Yn}-`,""),Kl=(t,e)=>{if(t==="auto")return e?Pi:yn;const n=t||yn;return[yn,Pi,Yn].includes(n)?n:yn},_I=(t,e)=>{const{overflowX:n,overflowY:i}=jn(t,[Yc,Gc]);return{x:Kl(n,e.x),y:Kl(i,e.y)}},au="__osScrollbarsHidingPlugin",yI="__osClickScrollPlugin",mp=t=>JSON.stringify(t,((e,n)=>{if(xn(n))throw 0;return n})),vp=(t,e)=>t?`${e}`.split(".").reduce(((n,i)=>n&&rg(n,i)?n[i]:void 0),t):void 0,bI=[0,33],Og=[33,99],$g=[222,666,!0],wI={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:bI,resize:null,event:Og,env:$g},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"]}},kg=(t,e)=>{const n={},i=ao(Ut(e),Ut(t));return ot(i,(o=>{const r=t[o],s=e[o];if(us(r)&&us(s))Ze(n[o]={},kg(r,s)),Xc(n[o])&&delete n[o];else if(rg(e,o)&&s!==r){let a=!0;if(dn(r)||dn(s))try{mp(r)===mp(s)&&(a=!1)}catch{}a&&(n[o]=s)}})),n},Wa=(t,e,n)=>i=>[vp(t,i),n||vp(e,i)!==void 0];let Ag;const EI=()=>Ag,CI=t=>{Ag=t};let Ka;const SI=()=>{const t=(b,S,x)=>{It(document.body,b),It(document.body,b);const k=vg(b),O=hi(b),K=nu(S);return x&&lo(b),{x:O.h-k.h+K.h,y:O.w-k.w+K.w}},e=b=>{let S=!1;const x=Ks(b,jr);try{S=jn(b,"scrollbar-width")==="none"||jn(b,"display","::-webkit-scrollbar")==="none"}catch{}return x(),S},n=`.${Zr}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Zr} div{width:200%;height:200%;margin:10px 0}.${jr}{scrollbar-width:none!important}.${jr}::-webkit-scrollbar,.${jr}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,o=tu(`<div class="${Zr}"><div></div><style>${n}</style></div>`)[0],r=o.firstChild,s=o.lastChild,a=EI();a&&(s.nonce=a);const[l,,c]=Hl(),[u,d]=Xt({o:t(o,r),i:Jr},Le(t,o,r,!0)),[h]=d(),v=e(o),f={x:h.x===0,y:h.y===0},p={elements:{host:null,padding:!v,viewport:b=>v&&hg(b)&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},_=Ze({},wI),C=Le(Ze,{},_),w=Le(Ze,{},p),E={U:h,M:f,P:v,J:!!To,G:Le(l,"r"),K:w,Z:b=>Ze(p,b)&&w(),tt:C,nt:b=>Ze(_,b)&&C(),ot:Ze({},p),st:Ze({},_)};if($n(o,"style"),lo(o),st(Bt,"resize",(()=>{c("r",[])})),xn(Bt.matchMedia)&&!v&&(!f.x||!f.y)){const b=S=>{const x=Bt.matchMedia(`(resolution: ${Bt.devicePixelRatio}dppx)`);st(x,"change",(()=>{S(),b(S)}),{A:!0})};b((()=>{const[S,x]=u();Ze(E.U,S),c("r",[x])}))}return E},zn=()=>(Ka||(Ka=SI()),Ka),xI=(t,e,n)=>{let i=!1;const o=n?new WeakMap:!1,r=()=>{i=!0},s=a=>{if(o&&n){const l=n.map((c=>{const[u,d]=c||[];return[d&&u?(a||dg)(u,t):[],d]}));ot(l,(c=>ot(c[0],(u=>{const d=c[1],h=o.get(u)||[];if(t.contains(u)&&d){const f=st(u,d,(p=>{i?(f(),o.delete(u)):e(p)}));o.set(u,ct(h,f))}else Zt(h),o.delete(u)}))))}};return s(),[r,s]},gp=(t,e,n,i)=>{let o=!1;const{et:r,ct:s,rt:a,it:l,lt:c,ut:u}=i||{},[d,h]=xI(t,(()=>o&&n(!0)),a),v=r||[],f=s||[],p=ao(v,f),_=(w,E)=>{if(!hs(E)){const b=c||Bo,S=u||Bo,x=[],k=[];let O=!1,K=!1;if(ot(E,(D=>{const{attributeName:P,target:U,type:M,oldValue:q,addedNodes:le,removedNodes:de}=D,Y=M==="attributes",I=M==="childList",A=t===U,Q=Y&&P,z=Q&&Jc(U,P||""),ie=mo(z)?z:null,ve=Q&&q!==ie,re=Qv(f,P)&&ve;if(e&&(I||!A)){const ge=Y&&ve,_e=ge&&l&&Ll(U,l),$=(_e?!b(U,P,q,ie):!Y||ge)&&!S(D,!!_e,t,i);ot(le,(N=>ct(x,N))),ot(de,(N=>ct(x,N))),K=K||$}!e&&A&&ve&&!b(U,P,q,ie)&&(ct(k,P),O=O||re)})),h((D=>ps(x).reduce(((P,U)=>(ct(P,dg(D,U)),Ll(U,D)?ct(P,U):P)),[]))),e)return!w&&K&&n(!1),[!1];if(!hs(k)||O){const D=[ps(k),O];return w||n.apply(0,D),D}}},C=new FR(Le(_,!1));return[()=>(C.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:p,subtree:e,childList:e,characterData:e}),o=!0,()=>{o&&(d(),C.disconnect(),o=!1)}),()=>{if(o)return _(!0,C.takeRecords())}]};let Ci=null;const Pg=(t,e,n)=>{const{ft:i}=n||{},o=vo(Tg),[r]=Xt({o:!1,u:!0});return()=>{const s=[],l=tu(`<div class="${ou}"><div class="${ru}"></div></div>`)[0],c=l.firstChild,u=d=>{const h=dn(d)&&!hs(d);let v=!1,f=!1;if(h){const p=d[0],[_,,C]=r(p.contentRect),w=zl(_);f=gg(_,C),v=!f&&!w}else f=d===!0;v||e({_t:!0,ft:f})};if(qi){if(!Bs(Ci)){const f=new qi(Bo);f.observe(t,{get box(){Ci=!0}}),Ci=Ci||!1,f.disconnect()}const d=og(u,{p:0,v:0}),h=f=>d(f),v=new qi(h);if(v.observe(Ci?t:c),ct(s,[()=>{v.disconnect()},!Ci&&It(t,l)]),Ci){const f=new qi(h);f.observe(t,{box:"border-box"}),ct(s,(()=>f.disconnect()))}}else if(o){const[d,h]=o(c,u,i);ct(s,ao([Ks(l,iI),st(l,"animationstart",d),It(t,l)],h))}else return Bo;return Le(Zt,s)}},TI=(t,e)=>{let n;const i=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,o=Xi(rI),[r]=Xt({o:!1}),s=(l,c)=>{if(l){const u=r(i(l)),[,d]=u;return d&&!c&&e(u)&&[u]}},a=(l,c)=>s(c.pop(),l);return[()=>{const l=[];if(tp)n=new tp(Le(a,!1),{root:t}),n.observe(o),ct(l,(()=>{n.disconnect()}));else{const c=()=>{const u=hi(o);s(u)};ct(l,Pg(o,c)()),c()}return Le(Zt,ct(l,It(t,o)))},()=>n&&a(!0,n.takeRecords())]},OI=(t,e,n,i)=>{let o,r,s,a,l,c,u,d;const h=`[${pi}]`,v=`[${Kn}]`,f=["id","class","style","open","wrap","cols","rows"],{dt:p,vt:_,L:C,gt:w,ht:E,V:b,bt:S,yt:x,wt:k,St:O}=t,K=R=>jn(R,"direction")==="rtl",D=()=>{let R,$,N;const F=og(i,{p:()=>R,v:()=>$,S:()=>N,m(oe,ee){const[G]=oe,[he]=ee;return[ao(Ut(G),Ut(he)).reduce(((me,$e)=>(me[$e]=G[$e]||he[$e],me)),{})]}}),B=(oe,ee)=>{if(dn(ee)){const[G,he,me]=ee;R=G,$=he,N=me}else di(ee)?(R=ee,$=!1,N=!1):(R=!1,$=!1,N=!1);F(oe)};return B.O=F.O,B},P={Ot:!1,B:K(p)},U=zn(),M=vo(au),[q]=Xt({i:Qc,o:{w:0,h:0}},(()=>{const R=M&&M.R(t,e,P,U,n).Y,N=!(S&&b)&&eu(_,pi,es),F=!b&&x(eI),B=F&&Jt(w),oe=B&&O(),ee=k(Cg,N),G=F&&R&&R(),he=ms(C),me=nu(C);return G&&G(),ln(w,B),oe&&oe(),N&&ee(),{w:he.w+me.w,h:he.h+me.h}})),le=D(),de=R=>{const $=K(p);Ze(R,{Ct:d!==$}),Ze(P,{B:$}),d=$},Y=(R,$)=>{const[N,F]=R,B={$t:F};return Ze(P,{Ot:N}),$||i(B),B},I=({_t:R,ft:$})=>{const N=$?i:le,F={_t:R||$,ft:$};de(F),N(F,r)},A=(R,$)=>{const[,N]=q(),F={xt:N};return de(F),N&&!$&&le(F,R?s:o),F},Q=(R,$,N)=>{const F={Ht:$};return de(F),$&&!N&&le(F,o),F},[z,ie]=E?TI(_,Y):[],ve=!b&&Pg(_,I,{ft:!0}),[re,ge]=gp(_,!1,Q,{ct:f,et:f}),_e=b&&qi&&new qi((R=>{const $=R[R.length-1].contentRect;I({_t:!0,ft:gg($,u)}),u=$}));return[()=>{_e&&_e.observe(_);const R=ve&&ve(),$=z&&z(),N=re(),F=U.G((B=>{const[,oe]=q();le({Et:B,xt:oe,_t:S},a)}));return()=>{_e&&_e.disconnect(),R&&R(),$&&$(),c&&c(),N(),F()}},({Dt:R,zt:$,It:N})=>{const F={},[B]=R("update.ignoreMutation"),[oe,ee]=R("update.attributes"),[G,he]=R("update.elementEvents"),[me,$e]=R("update.debounce"),Se=he||ee,Ne=$||N,Pe=Ue=>xn(B)&&!!B(Ue);if(Se){l&&l(),c&&c();const[Ue,ut]=gp(E||C,!0,A,{et:ao(f,oe||[]),rt:G,it:h,ut:(Qe,at)=>{const{target:tt,attributeName:pt}=Qe;return(!at&&pt&&!b?UR(tt,h,v):!1)||!!Ki(tt,`.${en}`)||Pe(Qe)}});c=Ue(),l=ut}if($e&&(le.O(),dn(me)||di(me)?(o=me,r=!1,s=Og,a=$g):Vo(me)?(o=me.mutation,r=me.resize,s=me.event,a=me.env):(o=!1,r=!1,s=!1,a=!1)),Ne){const Ue=ge(),ut=ie&&ie(),Qe=l&&l();Ue&&Ze(F,Q(Ue[0],Ue[1],Ne)),ut&&Ze(F,Y(ut[0],Ne)),Qe&&Ze(F,A(Qe[0],Ne))}return de(F),F},P]},Rg=(t,e)=>xn(e)?e.apply(0,t):e,$I=(t,e,n,i)=>{const o=qc(i)?n:i;return Rg(t,o)||e.apply(0,t)},Ig=(t,e,n,i)=>{const o=qc(i)?n:i,r=Rg(t,o);return!!r&&(ds(r)?r:e.apply(0,t))},kI=(t,e)=>{const{nativeScrollbarsOverlaid:n,body:i}=e||{},{M:o,P:r,K:s}=zn(),{nativeScrollbarsOverlaid:a,body:l}=s().cancel,c=n??a,u=qc(i)?l:i,d=(o.x||o.y)&&c,h=t&&(Vs(u)?!r:u);return!!d||!!h},AI=(t,e,n,i)=>{const o="--os-viewport-percent",r="--os-scroll-percent",s="--os-scroll-direction",{K:a}=zn(),{scrollbars:l}=a(),{slot:c}=l,{dt:u,vt:d,L:h,At:v,gt:f,bt:p,V:_}=e,{scrollbars:C}=v?{}:t,{slot:w}=C||{},E=[],b=[],S=[],x=Ig([u,d,h],(()=>_&&p?u:d),c,w),k=z=>{if(To){let ie=null,ve=[];const re=new To({source:f,axis:z}),ge=()=>{ie&&ie.cancel(),ie=null};return{Mt:R=>{const{Tt:$}=n,N=Ha($)[z],F=z==="x",B=[Va(0,F),Va(`calc(-100% + 100cq${F?"w":"h"})`,F)],oe=N?B:B.reverse();return ve[0]===oe[0]&&ve[1]===oe[1]||(ve=oe,ge(),ie=R.kt.animate({clear:["left"],transform:oe},{timeline:re})),ge}}}},O={x:k("x"),y:k("y")},K=()=>{const{Rt:z,Vt:ie}=n,ve=(re,ge)=>ag(0,1,re/(re+ge)||0);return{x:ve(ie.x,z.x),y:ve(ie.y,z.y)}},D=(z,ie,ve)=>{const re=ve?Ks:ug;ot(z,(ge=>{re(ge.Lt,ie)}))},P=(z,ie)=>{ot(z,(ve=>{const[re,ge]=ie(ve);co(re,ge)}))},U=(z,ie,ve)=>{const re=Bs(ve),ge=re?ve:!0,_e=re?!ve:!0;ge&&D(b,z,ie),_e&&D(S,z,ie)},M=()=>{const z=K(),ie=ve=>re=>[re.Lt,{[o]:Ul(ve)+""}];P(b,ie(z.x)),P(S,ie(z.y))},q=()=>{if(!To){const{Tt:z}=n,ie=ap(z,Jt(f)),ve=re=>ge=>[ge.Lt,{[r]:Ul(re)+""}];P(b,ve(ie.x)),P(S,ve(ie.y))}},le=()=>{const{Tt:z}=n,ie=Ha(z),ve=re=>ge=>[ge.Lt,{[s]:re?"0":"1"}];P(b,ve(ie.x)),P(S,ve(ie.y)),To&&(b.forEach(O.x.Mt),S.forEach(O.y.Mt))},de=()=>{if(_&&!p){const{Rt:z,Tt:ie}=n,ve=Ha(ie),re=ap(ie,Jt(f)),ge=_e=>{const{Lt:R}=_e,$=Ho(R)===h&&R,N=(F,B,oe)=>{const ee=B*F;return mg(oe?ee:-ee)};return[$,$&&{transform:Va({x:N(re.x,z.x,ve.x),y:N(re.y,z.y,ve.y)})}]};P(b,ge),P(S,ge)}},Y=z=>{const ie=z?"x":"y",re=Xi(`${en} ${z?lI:cI}`),ge=Xi(xg),_e=Xi(su),R={Lt:re,Pt:ge,kt:_e},$=O[ie];return ct(z?b:S,R),ct(E,[It(re,ge),It(ge,_e),Le(lo,re),$&&$.Mt(R),i(R,U,z)]),R},I=Le(Y,!0),A=Le(Y,!1),Q=()=>(It(x,b[0].Lt),It(x,S[0].Lt),Le(Zt,E));return I(),A(),[{Ut:M,Nt:q,qt:le,Bt:de,Ft:U,jt:{Xt:b,Yt:I,Wt:Le(P,b)},Jt:{Xt:S,Yt:A,Wt:Le(P,S)}},Q]},PI=(t,e,n,i,o)=>(r,s,a)=>{const{vt:l,L:c,V:u,gt:d,Gt:h,St:v}=e,{Lt:f,Pt:p,kt:_}=r,[C,w]=Wi(333),[E,b]=Wi(444),S=O=>{xn(d.scrollBy)&&d.scrollBy({behavior:"smooth",left:O.x,top:O.y})},x=()=>{const O="pointerup pointercancel lostpointercapture",K=`client${a?"X":"Y"}`,D=a?sr:ar,P=a?"left":"top",U=a?"w":"h",M=a?"x":"y",q=[];return st(p,"pointerdown",i((le=>{const de=Ki(le.target,`.${su}`)===_,Y=de?_:p,I=t.scrollbars,A=I[de?"dragScroll":"clickScroll"],{button:Q,isPrimary:z,pointerType:ie}=le,{pointers:ve}=I;if(Q===0&&z&&A&&(ve||[]).includes(ie)){Zt(q),b();const ge=!de&&(le.shiftKey||A==="instant"),_e=Le(Ba,_),R=Le(Ba,p),$=(tt,pt)=>(tt||_e())[P]-(pt||R())[P],N=Fl(Ba(d)[D])/hi(d)[U]||1,F=Jt(d)[M],B=tt=>{ln(d,{[M]:F+tt})},oe=tt=>{const{Rt:pt}=n,dt=hi(p)[U]-hi(_)[U],ft=1/N*tt/dt;B(ft*pt[M])},ee=le[K],G=_e(),he=R(),me=G[D],$e=$(G,he)+me/2,Ne=ee-he[P]-$e,Pe=de?0:Ne,Ue=tt=>{Zt(at),Y.releasePointerCapture(tt.pointerId)},ut=de||ge,Qe=v(),at=[st(h,O,Ue),st(h,"selectstart",(tt=>Vl(tt)),{D:!1}),st(p,O,Ue),ut&&st(p,"pointermove",(tt=>oe(Pe+tt[K]-ee))),ut&&(()=>{const tt=Jt(d);Qe();const pt=Jt(d),dt={x:pt.x-tt.x,y:pt.y-tt.y};(li(dt.x)>3||li(dt.y)>3)&&(v(),ln(d,tt),S(dt),E(Qe))})];if(Y.setPointerCapture(le.pointerId),ge)oe(Ne);else if(!de){const tt=vo(yI);if(tt){const{Vt:pt}=n,dt=tt(B,oe,Le($),Ne,pt[M],A,!!a,(ft=>{ft?Qe():ct(at,Qe)}));ct(at,dt),ct(q,Le(dt,!0))}}}})))};let k=!0;return Le(Zt,[st(_,"pointermove pointerleave",i(o)),st(f,"pointerenter",i((()=>{s(hp,!0)}))),st(f,"pointerleave pointercancel",i((()=>{s(hp,!1)}))),st(f,"wheel",i((O=>{const{deltaX:K,deltaY:D,deltaMode:P}=O;k&&P===0&&Ho(f)===l&&S({x:K,y:D}),k=!1,s(fp,!0),C((()=>{k=!0,s(fp)})),Vl(O)})),{D:!1,I:!0}),!u&&st(f,"mousedown",i((()=>{const O=Nl();(ip(O,Kn)||ip(O,pi)||O===document.body)&&Hc(Le(Bl,c),25)}))),st(f,"pointerdown",(()=>{const O=st(h,"click",(D=>{K(),_g(D)}),{A:!0,I:!0,D:!1}),K=st(h,"pointerup pointercancel",(()=>{K(),setTimeout(O,150)}),{I:!0,D:!0})}),{I:!0,D:!0}),x(),w,b])},RI=(t,e,n,i,o,r,s)=>{let a,l,c,u,d,h=Bo,v=0;const f=["mouse","pen"],p=_e=>R=>{n.Kt||_e(R)},_=_e=>f.includes(_e.pointerType),[C,w]=Wi(),[E,b]=Wi(100),[S,x]=Wi(50),[k,O]=Wi((()=>v)),[K,D]=AI(t,r,o,PI(e,r,o,p,(_e=>_(_e)&&Q()))),{vt:P,Qt:U,bt:M}=r,{Ft:q,Ut:le,Nt:de,qt:Y,Bt:I}=K,A=(_e,R)=>{O();const $=N=>{n.Kt||q(hI,N)};if(_e)$();else{const N=c?!a:!0;v>0&&!R?k(Le($,N)):$(N)}},Q=()=>{(c?!a:!u)&&(A(!0),E((()=>{A(!1)})))},z=_e=>{_(_e)&&(a=!0,!n.Kt&&c&&A(!0))},ie=_e=>{_(_e)&&(a=!1,!n.Kt&&c&&A(!1))},ve=_e=>{q(Wl,_e,!0),q(Wl,_e,!1)},re=[O,b,x,w,()=>h(),st(P,"pointerover",z,{A:!0}),st(P,"pointerenter",z),st(P,"pointerleave",ie),st(P,"pointermove",p((_e=>{_(_e)&&l&&Q()}))),st(U,"scroll",p((_e=>{C((()=>{de(),Q()})),s(_e),I()})))],ge=vo(au);return[()=>Le(Zt,ct(re,D())),({Dt:_e,It:R,Zt:$,tn:N})=>{const{nn:F,sn:B,en:oe,cn:ee}=N||{},{Ct:G,ft:he}=$||{},{B:me}=i,{M:$e,P:Se}=zn(),{rn:Ne,j:Pe}=o,[Ue,ut]=_e("showNativeOverlaidScrollbars"),[Qe,at]=_e("scrollbars.theme"),[tt,pt]=_e("scrollbars.visibility"),[dt,ft]=_e("scrollbars.autoHide"),[Dt,fn]=_e("scrollbars.autoHideSuspend"),[X]=_e("scrollbars.autoHideDelay"),[V,J]=_e("scrollbars.dragScroll"),[ye,xe]=_e("scrollbars.clickScroll"),[se,Me]=_e("overflow"),Z=he&&!R,ae=F||B||ee||G||R,fe=oe||pt||Me,ce=Ue&&$e.x&&$e.y,be=!Se&&!ge,On=ce||be,Qt=(nn,Ft,yt)=>{const ur=nn.includes(Pi)&&(tt===Yn||tt==="auto"&&Ft===Pi);return q(uI,ur,yt),ur};if(v=X,(ut||be)&&q(sI,On),at&&(q(d),q(Qe,!0),d=Qe),(fn||Z)&&(ve(!Dt),Z&&Dt&&(Pe.x||Pe.y?(h(),S((()=>{h=st(U,Pi,p(Le(ve,!0)),{A:!0})}))):ve(!0))),ft&&(l=dt==="move",c=dt==="leave",u=dt==="never",A(u,!0)),J&&q(fI,V),xe&&q(pI,!!ye),fe){const nn=Qt(se.x,Ne.x,!0),Ft=Qt(se.y,Ne.y,!1);q(dI,!(nn&&Ft))}ae&&(de(),le(),I(),ee&&Y(),q(pp,!Pe.x,!0),q(pp,!Pe.y,!1),q(aI,me&&!M))},{},K]},II=t=>{const e=zn(),{K:n,P:i}=e,{elements:o}=n(),{padding:r,viewport:s,content:a}=o,l=ds(t),c=l?{}:t,{elements:u}=c,{padding:d,viewport:h,content:v}=u||{},f=l?t:c.target,p=hg(f),_=f.ownerDocument,C=_.documentElement,w=()=>_.defaultView||Bt,E=Le($I,[f]),b=Le(Ig,[f]),S=Le(Xi,""),x=Le(E,S,s),k=Le(b,S,a),O=G=>{const he=hi(G),me=ms(G),$e=jn(G,Yc),Se=jn(G,Gc);return me.w-he.w>0&&!Yi($e)||me.h-he.h>0&&!Yi(Se)},K=x(h),D=K===f,P=D&&p,U=!D&&k(v),M=!D&&K===U,q=P?C:K,le=P?q:f,de=!D&&b(S,r,d),Y=!M&&U,I=[Y,q,de,le].map((G=>ds(G)&&!Ho(G)&&G)),A=G=>G&&Qv(I,G),Q=!A(q)&&O(q)?q:f,z=P?C:q,ve={dt:f,vt:le,L:q,ln:de,ht:Y,gt:z,Qt:P?_:q,an:p?C:Q,Gt:_,bt:p,At:l,V:D,un:w,yt:G=>eu(q,Kn,G),wt:(G,he)=>fs(q,Kn,G,he),St:()=>fs(z,Kn,tI,!0)},{dt:re,vt:ge,ln:_e,L:R,ht:$}=ve,N=[()=>{$n(ge,[pi,qa]),$n(re,qa),p&&$n(C,[qa,pi])}];let F=jl([$,R,_e,ge,re].find((G=>G&&!A(G))));const B=P?re:$||R,oe=Le(Zt,N);return[ve,()=>{const G=w(),he=Nl(),me=Ue=>{It(Ho(Ue),jl(Ue)),lo(Ue)},$e=Ue=>st(Ue,"focusin focusout focus blur",_g,{I:!0,D:!1}),Se="tabindex",Ne=Jc(R,Se),Pe=$e(he);return Wn(ge,pi,D?"":XR),Wn(_e,ql,""),Wn(R,Kn,""),Wn($,up,""),D||(Wn(R,Se,Ne||"-1"),p&&Wn(C,cp,"")),It(B,F),It(ge,_e),It(_e||ge,!D&&R),It(R,$),ct(N,[Pe,()=>{const Ue=Nl(),ut=A(R),Qe=ut&&Ue===R?re:Ue,at=$e(Qe);$n(_e,ql),$n($,up),$n(R,Kn),p&&$n(C,cp),Ne?Wn(R,Se,Ne):$n(R,Se),A($)&&me($),ut&&me(R),A(_e)&&me(_e),Bl(Qe),at()}]),i&&!D&&(Zc(R,Kn,Sg),ct(N,Le($n,R,Kn))),Bl(!D&&p&&he===re&&G.top===G?R:he),Pe(),F=0,oe},oe]},MI=({ht:t})=>({Zt:e,fn:n,It:i})=>{const{$t:o}=e||{},{Ot:r}=n;t&&(o||i)&&co(t,{[ar]:r&&"100%"})},DI=({vt:t,ln:e,L:n,V:i},o)=>{const[r,s]=Xt({i:jR,o:rp()},Le(rp,t,"padding",""));return({Dt:a,Zt:l,fn:c,It:u})=>{let[d,h]=s(u);const{P:v}=zn(),{_t:f,xt:p,Ct:_}=l||{},{B:C}=c,[w,E]=a("paddingAbsolute");(f||h||(u||p))&&([d,h]=r(u));const S=!i&&(E||_||h);if(S){const x=!w||!e&&!v,k=d.r+d.l,O=d.t+d.b,K={[ng]:x&&!C?-k:0,[ig]:x?-O:0,[tg]:x&&C?-k:0,top:x?-d.t:0,right:x?C?-d.r:"auto":0,left:x?C?"auto":-d.l:0,[sr]:x&&`calc(100% + ${k}px)`},D={[Xv]:x?d.t:0,[Jv]:x?d.r:0,[eg]:x?d.b:0,[Zv]:x?d.l:0};co(e||n,K),co(n,D),Ze(o,{ln:d,_n:!x,F:e?D:Ze({},K,D)})}return{dn:S}}},FI=(t,e)=>{const n=zn(),{vt:i,ln:o,L:r,V:s,Qt:a,gt:l,bt:c,wt:u,un:d}=t,{P:h}=n,v=c&&s,f=Le(Yv,0),p={display:()=>!1,direction:re=>re!=="ltr",flexDirection:re=>re.endsWith("-reverse"),writingMode:re=>re!=="horizontal-tb"},_=Ut(p),C={i:Qc,o:{w:0,h:0}},w={i:Jr,o:{}},E=re=>{u(Cg,!v&&re)},b=()=>jn(r,_),S=(re,ge)=>{const _e=!Ut(re).length,R=ge?!0:_.some((Se=>{const Ne=re[Se];return mo(Ne)&&p[Se](Ne)}));if(_e||!R||!WR(r))return{T:{x:0,y:0},k:{x:1,y:1}};E(!0);const $=Jt(l),N=st(a,Pi,(Se=>{const Ne=Jt(l);Se.isTrusted&&Ne.x===$.x&&Ne.y===$.y&&iu(Se)}),{I:!0,A:!0}),F=u(nI,!0);ln(l,{x:0,y:0}),F();const B=Jt(l),oe=ms(l);ln(l,{x:oe.w,y:oe.h});const ee=Jt(l),G={x:ee.x-B.x,y:ee.y-B.y};ln(l,{x:-oe.w,y:-oe.h});const he=Jt(l),me={x:he.x-B.x,y:he.y-B.y},$e={x:li(G.x)>=li(me.x)?ee.x:he.x,y:li(G.y)>=li(me.y)?ee.y:he.y};return ln(l,$),zo((()=>N())),{T:B,k:$e}},x=(re,ge)=>{const _e=Bt.devicePixelRatio%1!==0?1:0,R={w:f(re.w-ge.w),h:f(re.h-ge.h)};return{w:R.w>_e?R.w:0,h:R.h>_e?R.h:0}},k=(re,ge)=>{const _e=(R,$,N,F)=>{const B=R===Yn?yn:gI(R),oe=Yi(R),ee=Yi(N);return!$&&!F?yn:oe&&ee?Yn:oe?$&&F?B:$?Yn:yn:$?B:ee&&F?Yn:yn};return{x:_e(ge.x,re.x,ge.y,re.y),y:_e(ge.y,re.y,ge.x,re.x)}},O=re=>{const ge=R=>[Yn,yn,Pi].map(($=>ve(Kl($),R))),_e=ge(!0).concat(ge()).join(" ");u(_e),u(Ut(re).map((R=>ve(re[R],R==="x"))).join(" "),!0)},[K,D]=Xt(C,Le(nu,r)),[P,U]=Xt(C,Le(ms,r)),[M,q]=Xt(C),[le]=Xt(w),[de,Y]=Xt(C),[I]=Xt(w),[A]=Xt({i:(re,ge)=>qs(re,ge,ps(ao(Ut(re),Ut(ge)))),o:{}}),[Q,z]=Xt({i:(re,ge)=>Jr(re.T,ge.T)&&Jr(re.k,ge.k),o:yg()}),ie=vo(au),ve=(re,ge)=>`${ge?JR:ZR}${LR(re)}`;return({Dt:re,Zt:ge,fn:_e,It:R},{dn:$})=>{const{_t:N,Ht:F,xt:B,Ct:oe,ft:ee,Et:G}=ge||{},he=ie&&ie.R(t,e,_e,n,re),{X:me,Y:$e,W:Se}=he||{},[Ne,Pe]=vI(re,n),[Ue,ut]=re("overflow"),Qe=Yi(Ue.x),at=Yi(Ue.y),tt=N||$||B||oe||G||Pe;let pt=D(R),dt=U(R),ft=q(R),Dt=Y(R);if(Pe&&h&&u(Sg,!Ne),tt){eu(i,pi,es)&&E(!0);const Su=$e&&$e(),[dr]=pt=K(R),[hr]=dt=P(R),pr=vg(r),fr=v&&qR(d()),d_={w:f(hr.w+dr.w),h:f(hr.h+dr.h)},xu={w:f((fr?fr.w:pr.w+f(pr.w-hr.w))+dr.w),h:f((fr?fr.h:pr.h+f(pr.h-hr.h))+dr.h)};Su&&Su(),Dt=de(xu),ft=M(x(d_,xu),R)}const[fn,X]=Dt,[V,J]=ft,[ye,xe]=dt,[se,Me]=pt,[Z]=le({x:V.w>0,y:V.h>0}),ae=Qe&&at&&(Z.x||Z.y)||Qe&&Z.x&&!Z.y||at&&Z.y&&!Z.x,fe=$||oe||G||Me||xe||X||J||ut||Pe||tt||F&&v,[ce]=re("update.flowDirectionStyles"),[be,On]=A(ce?ce(r)||{}:b(),R),Qt=oe||ee||On||R,[nn,Ft]=Qt?Q(S(be,!!ce),R):z();let yt=k(Z,Ue);E(!1),fe&&(O(yt),yt=_I(r,Z),Se&&me&&(me(yt,ye,se),co(r,Se(yt))));const[ur,u_]=I(yt);return fs(i,pi,es,ae),fs(o,ql,es,ae),Ze(e,{rn:ur,Vt:{x:fn.w,y:fn.h},Rt:{x:V.w,y:V.h},j:Z,Tt:KR(nn,V)}),{en:u_,nn:X,sn:J,cn:Ft||J}}},LI=t=>{const[e,n,i]=II(t),o={ln:{t:0,r:0,b:0,l:0},_n:!1,F:{[ng]:0,[ig]:0,[tg]:0,[Xv]:0,[Jv]:0,[eg]:0,[Zv]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},rn:{x:yn,y:yn},j:{x:!1,y:!1},Tt:yg()},{dt:r,gt:s,V:a,St:l}=e,{P:c,M:u}=zn(),d=!c&&(u.x||u.y),h=[MI(e),DI(e,o),FI(e,o)];return[n,v=>{const f={},_=d&&Jt(s),C=_&&l();return ot(h,(w=>{Ze(f,w(v,f)||{})})),ln(s,_),C&&C(),a||ln(r,0),f},o,e,i]},jI=(t,e,n,i)=>{let o=!1;const r={Kt:!1,pn:!1},s=Wa(e,{}),[a,l,c,u,d]=LI(t),[h,v,f]=OI(u,c,s,(b=>{E({},b)})),[p,_,,C]=RI(t,e,r,f,c,u,i),w=b=>Ut(b).some((S=>!!b[S])),E=(b,S)=>{const{Kt:x,pn:k}=r;if(k||x&&o)return!1;const{vn:O,It:K,zt:D}=b,P=O||{},U=!!K||!o,M={Dt:Wa(e,P,U),vn:P,It:U},q=S||v(Ze({},M,{zt:D})),le=l(Ze({},M,{fn:f,Zt:q}));_(Ze({},M,{Zt:q,tn:le}));const de=w(q),Y=w(le),I=de||Y||!Xc(P)||U;return o=!0,I&&n(b,{Zt:q,tn:le}),I};return[()=>{const{an:b,gt:S,St:x}=u,k=Jt(b),O=[h(),a(),p(),()=>{r.pn=!0}],K=x();return ln(S,k),K(),Le(Zt,O)},E,b=>{const S=r.Kt;r.Kt=b,!b&&S!==b&&E({It:!0,zt:!0})},()=>{_({Dt:Wa(e,{},!1),vn:{},It:!1})},()=>({gn:r,hn:f,bn:c}),{yn:u,wn:C},d]},lu=new WeakMap,NI=(t,e)=>{lu.set(t,e)},UI=t=>{lu.delete(t)},Mg=t=>lu.get(t),hn=(t,e,n)=>{const{tt:i}=zn(),o=ds(t),r=o?t:t.target,s=Mg(r);if(e&&!s){const a=[],l={},c=U=>{const M=sg(U),q=vo(QR);return q?q(M,!0):M},u=Ze({},i(),c(e)),[d,h,v]=Hl(),[f,p,_]=Hl(n),C=(U,M)=>{_(U,M),v(U,M)},[w,E,b,S,x,k,O]=jI(t,u,(({vn:U,It:M},{Zt:q,tn:le})=>{const{_t:de,Ct:Y,$t:I,xt:A,Ht:Q,ft:z}=q,{nn:ie,sn:ve,en:re,cn:ge}=le;C("updated",[P,{updateHints:{sizeChanged:!!de,directionChanged:!!Y,heightIntrinsicChanged:!!I,overflowEdgeChanged:!!ie,overflowAmountChanged:!!ve,overflowStyleChanged:!!re,scrollCoordinatesChanged:!!ge,contentMutation:!!A,hostMutation:!!Q,appear:!!z},changedOptions:U||{},force:!!M}])}),(U=>C("scroll",[P,U]))),K=U=>{const{gn:M}=x(),{pn:q}=M;q||(UI(r),Zt(a),C("destroyed",[P,U]),h(),p())},P={options(U,M){if(U){const q=M?i():{},le=kg(u,Ze(q,c(U)));Xc(le)||(Ze(u,le),E({vn:le}))}return Ze({},u)},on:f,off:(U,M)=>{U&&M&&p(U,M)},state(){const{gn:U,hn:M,bn:q}=x(),{pn:le,Kt:de}=U,{B:Y}=M,{Vt:I,Rt:A,rn:Q,j:z,ln:ie,_n:ve,Tt:re}=q;return Ze({},{overflowEdge:I,overflowAmount:A,overflowStyle:Q,hasOverflow:z,scrollCoordinates:{start:re.T,end:re.k},padding:ie,paddingAbsolute:ve,directionRTL:Y,sleeping:de,destroyed:le})},elements(){const{dt:U,vt:M,ln:q,L:le,ht:de,gt:Y,Qt:I}=k.yn,{jt:A,Jt:Q}=k.wn,z=ve=>{const{kt:re,Pt:ge,Lt:_e}=ve;return{scrollbar:_e,track:ge,handle:re}},ie=ve=>{const{Xt:re,Yt:ge}=ve,_e=z(re[0]);return Ze({},_e,{clone:()=>{const R=z(ge());return S(),R}})};return Ze({},{target:U,host:M,padding:q||le,viewport:le,content:de||le,scrollOffsetElement:Y,scrollEventElement:I,scrollbarHorizontal:ie(A),scrollbarVertical:ie(Q)})},update:U=>E({It:U,zt:!0}),destroy:Le(K,!1),sleep:b,plugin:U=>l[Ut(U)[0]]};return ct(a,[O]),NI(r,P),Eg(bg,hn,[P,d,l]),kI(k.yn.bt,!o&&t.cancel)?(K(!0),P):(ct(a,w()),C("initialized",[P]),P.update(),P)}return s};hn.plugin=t=>{const e=dn(t),n=e?t:[t],i=n.map((o=>Eg(o,hn)[0]));return YR(n),e?i:i[0]};hn.valid=t=>{const e=t&&t.elements,n=xn(e)&&e();return Vo(n)&&!!Mg(n.target)};hn.env=()=>{const{U:t,M:e,P:n,J:i,ot:o,st:r,K:s,Z:a,tt:l,nt:c}=zn();return Ze({},{scrollbarsSize:t,scrollbarsOverlaid:e,scrollbarsHiding:n,scrollTimeline:i,staticDefaultInitialization:o,staticDefaultOptions:r,getDefaultInitialization:s,setDefaultInitialization:a,getDefaultOptions:l,setDefaultOptions:c})};hn.nonce=CI;hn.trustedTypePolicy=VR;class zI{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,n){const i=this._listeners.get(e)??new Set;return this._listeners.set(e,i),i.add(n),this}removeEventListener(e,n){var i;return(i=this._listeners.get(e))==null||i.delete(n),this}dispatchEvent(e,...n){let i=!0;for(const o of this._listeners.get(e)??[])i=o(...n)!==!1&&i;return i}unbindAllListeners(){this._listeners.clear()}}const _p=(t,e="px")=>typeof t=="number"?t+e:t,ii=({style:t},e,n)=>{if(typeof e=="object")for(const[i,o]of Object.entries(e))o!==void 0&&(t[i]=_p(o));else n!==void 0&&(t[e]=_p(n))},yp=(t=0,e=0,n=0,i=0)=>{const o={x:t,y:e,width:n,height:i,top:e,left:t,right:t+n,bottom:e+i};return{...o,toJSON:()=>JSON.stringify(o)}},VI=t=>{let e,n=-1,i=!1;return{next:(...o)=>{e=o,i||(i=!0,n=requestAnimationFrame(()=>{t(...e),i=!1}))},cancel:()=>{cancelAnimationFrame(n),i=!1}}},bp=(t,e,n="touch")=>{switch(n){case"center":{const i=e.left+e.width/2,o=e.top+e.height/2;return i>=t.left&&i<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},BI=()=>matchMedia("(hover: none), (pointer: coarse)").matches,HI=()=>"safari"in window,Yl=t=>Array.isArray(t)?t:[t],Dg=t=>(e,n,i,o={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=Yl(n),e=Yl(e);for(const r of e)if(r)for(const s of n)r[t](s,i,{capture:!1,...o})},oi=Dg("addEventListener"),vn=Dg("removeEventListener"),Nr=t=>{var e;const{clientX:n,clientY:i,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:i,target:o}},Ui=(t,e=document)=>Yl(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),qI=(t,e)=>e.some(n=>typeof n=="number"?t.button===n:typeof n=="object"?n.button!==t.button?!1:n.modifiers.every(i=>{switch(i){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:Si,max:wp,min:Ep,ceil:Cp}=Math,Sp=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Fg=class extends zI{constructor(e){var n,i,o,r,s;super(),this._selection=Sp(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=yp(),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",...e,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...e.behaviour,startThreshold:(n=e.behaviour)!=null&&n.startThreshold?typeof e.behaviour.startThreshold=="number"?e.behaviour.startThreshold:{x:10,y:10,...e.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(i=e.behaviour)==null?void 0:i.scrolling,startScrollMargins:{x:0,y:0,...(r=(o=e.behaviour)==null?void 0:o.scrolling)==null?void 0:r.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...e.features,singleTap:{allow:!0,intersect:"native",...(s=e.features)==null?void 0:s.singleTap}}};for(const u of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[u]=="function"&&(this[u]=this[u].bind(this));const{document:a,selectionAreaClass:l,selectionContainerClass:c}=this._options;this._area=a.createElement("div"),this._clippingElement=a.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),c&&this._clippingElement.classList.add(c),ii(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),ii(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=VI(u=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",u),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(e=!0){const{document:n,features:i}=this._options,o=e?oi:vn;o(n,"mousedown",this._onTapStart),i.touch&&o(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,n=!1){const{x:i,y:o,target:r}=Nr(e),{document:s,startAreas:a,boundaries:l,features:c,behaviour:u}=this._options,d=r.getBoundingClientRect();if(e instanceof MouseEvent&&!qI(e,u.triggers))return;const h=Ui(a,s),v=Ui(l,s);this._targetElement=v.find(C=>bp(C.getBoundingClientRect(),d));const f=e.composedPath(),p=h.find(C=>f.includes(C));if(this._targetBoundary=v.find(C=>f.includes(C)),!this._targetElement||!p||!this._targetBoundary||!n&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:i,y1:o,x2:0,y2:0};const _=s.scrollingElement??s.body;this._scrollDelta={x:_.scrollLeft,y:_.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),oi(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),oi(s,["mouseup","touchcancel","touchend"],this._onTapStop),oi(s,"scroll",this._onScroll),c.deselectOnBlur&&(this._targetBoundaryScrolled=!1,oi(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(e){const{singleTap:{intersect:n},range:i}=this._options.features,o=Nr(e);let r;if(n==="native")r=o.target;else if(n==="touch"){this.resolveSelectables();const{x:a,y:l}=o;r=this._selectables.find(c=>{const{right:u,left:d,top:h,bottom:v}=c.getBoundingClientRect();return a<u&&a>d&&l<v&&l>h})}if(!r)return;for(this.resolveSelectables();!this._selectables.includes(r);)if(r.parentElement)r=r.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&i&&this._latestElement){const a=this._latestElement,[l,c]=a.compareDocumentPosition(r)&4?[r,a]:[a,r],u=[...this._selectables.filter(d=>d.compareDocumentPosition(l)&4&&d.compareDocumentPosition(c)&2),l,c];this.select(u),this._latestElement=a}else s.includes(r)&&(s.length===1||e.ctrlKey||s.every(a=>this._selection.stored.includes(a)))?this.deselect(r):(this.select(r),this._latestElement=r)}_delayedTapMove(e){const{container:n,document:i,behaviour:{startThreshold:o}}=this._options,{x1:r,y1:s}=this._areaLocation,{x:a,y:l}=Nr(e);if(typeof o=="number"&&Si(a+l-(r+s))>=o||typeof o=="object"&&Si(a-r)>=o.x||Si(l-s)>=o.y){if(vn(i,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){vn(i,["mouseup","touchcancel","touchend"],this._onTapStop);return}oi(i,["mousemove","touchmove"],this._onTapMove,{passive:!1}),ii(this._area,"display","block"),Ui(n,i)[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&&(oi(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),oi(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(c=>this._targetElement.contains(c))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:n,_area:i}=this,o=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(ii(e,{top:o.top,left:o.left,width:o.width,height:o.height}),ii(i,{marginTop:-o.top,marginLeft:-o.left})):(ii(e,{top:0,left:0,width:"100%",height:"100%"}),ii(i,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{_scrollSpeed:n,_areaLocation:i,_options:o,_frame:r}=this,{speedDivider:s}=o.behaviour.scrolling,a=this._targetElement,{x:l,y:c}=Nr(e);if(i.x2=l,i.y2=c,this._lastMousePosition.x=l,this._lastMousePosition.y=c,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const u=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:d,scrollLeft:h}=a;n.y&&(a.scrollTop+=Cp(n.y/s),i.y1-=a.scrollTop-d),n.x&&(a.scrollLeft+=Cp(n.x/s),i.x1-=a.scrollLeft-h),r.next(e),requestAnimationFrame(u)};requestAnimationFrame(u)}else r.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:n}=this._options;(n.touch&&BI()||this._scrollAvailable&&HI())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:n}}=this,{scrollTop:i,scrollLeft:o}=n.scrollingElement??n.body;this._areaLocation.x1+=e.x-o,this._areaLocation.y1+=e.y-i,e.x=o,e.y=i,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,vn(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(e){const{manualSpeed:n}=this._options.behaviour.scrolling,i=e.deltaY?e.deltaY>0?1:-1:0,o=e.deltaX?e.deltaX>0?1:-1:0;this._scrollSpeed.y+=i*n,this._scrollSpeed.x+=o*n,this._onTapMove(e),e.preventDefault()}_keyboardScroll(e){const{manualSpeed:n}=this._options.behaviour.scrolling,i=e.key==="ArrowLeft"?-1:e.key==="ArrowRight"?1:0,o=e.key==="ArrowUp"?-1:e.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(i)*n,this._scrollSpeed.y+=Math.sign(o)*n,e.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:e,_areaLocation:n,_targetElement:i,_options:o}=this,{scrollTop:r,scrollHeight:s,clientHeight:a,scrollLeft:l,scrollWidth:c,clientWidth:u}=i,d=this._targetRect,{x1:h,y1:v}=n;let{x2:f,y2:p}=n;const{behaviour:{scrolling:{startScrollMargins:_}}}=o;f<d.left+_.x?(e.x=l?-Si(d.left-f+_.x):0,f=f<d.left?d.left:f):f>d.right-_.x?(e.x=c-l-u?Si(d.left+d.width-f-_.x):0,f=f>d.right?d.right:f):e.x=0,p<d.top+_.y?(e.y=r?-Si(d.top-p+_.y):0,p=p<d.top?d.top:p):p>d.bottom-_.y?(e.y=s-r-a?Si(d.top+d.height-p-_.y):0,p=p>d.bottom?d.bottom:p):e.y=0;const C=Ep(h,f),w=Ep(v,p),E=wp(h,f),b=wp(v,p);this._areaRect=yp(C,w,E-C,b-w)}_redrawSelectionArea(){const{x:e,y:n,width:i,height:o}=this._areaRect,{style:r}=this._area;r.left=`${e}px`,r.top=`${n}px`,r.width=`${i}px`,r.height=`${o}px`}_onTapStop(e,n){var i;const{document:o,features:r}=this._options,{_singleClick:s}=this;vn(this._targetElement,"scroll",this._onStartAreaScroll),vn(o,["mousemove","touchmove"],this._delayedTapMove),vn(o,["touchmove","mousemove"],this._onTapMove),vn(o,["mouseup","touchcancel","touchend"],this._onTapStop),vn(o,"scroll",this._onScroll),this._keepSelection(),e&&s&&r.singleTap.allow?this._onSingleTap(e):!s&&!n&&(this._updateElementSelection(),this._emitEvent("stop",e)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,vn(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),vn(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(i=this._frame)==null||i.cancel(),ii(this._area,"display","none")}_updateElementSelection(){const{_selectables:e,_options:n,_selection:i,_areaRect:o}=this,{stored:r,selected:s,touched:a}=i,{intersect:l,overlap:c}=n.behaviour,u=c==="invert",d=[],h=[],v=[];for(let p=0;p<e.length;p++){const _=e[p];if(bp(o,_.getBoundingClientRect(),l)){if(s.includes(_))r.includes(_)&&!a.includes(_)&&a.push(_);else if(u&&r.includes(_)){v.push(_);continue}else h.push(_);d.push(_)}}u&&h.push(...r.filter(p=>!s.includes(p)));const f=c==="keep";for(let p=0;p<s.length;p++){const _=s[p];!d.includes(_)&&!(f&&r.includes(_))&&v.push(_)}i.selected=d,i.changed={added:h,removed:v},this._latestElement=void 0}_emitEvent(e,n){return this.emit(e,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:e,_selection:n}=this,{selected:i,changed:o,touched:r,stored:s}=n,a=i.filter(l=>!s.includes(l));switch(e.behaviour.overlap){case"drop":{n.stored=[...a,...s.filter(l=>!r.includes(l))];break}case"invert":{n.stored=[...a,...s.filter(l=>!o.removed.includes(l))];break}case"keep":{n.stored=[...s,...i.filter(l=>!s.includes(l))];break}}}trigger(e,n=!0){this._onTapStart(e,n)}resolveSelectables(){this._selectables=Ui(this._options.selectables,this._options.document)}clearSelection(e=!0,n=!1){const{selected:i,stored:o,changed:r}=this._selection;r.added=[],r.removed.push(...i,...e?o:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=Sp(e?[]:o)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(e){Object.assign(this._areaLocation,e),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,n=!1){const{changed:i,selected:o,stored:r}=this._selection,s=Ui(e,this._options.document).filter(a=>!o.includes(a)&&!r.includes(a));return r.push(...s),o.push(...s),i.added.push(...s),i.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(e,n=!1){const{selected:i,stored:o,changed:r}=this._selection,s=Ui(e,this._options.document).filter(a=>i.includes(a)||o.includes(a));this._selection.stored=o.filter(a=>!s.includes(a)),this._selection.selected=i.filter(a=>!s.includes(a)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(a=>!r.removed.includes(a))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Fg.version="3.9.0";let WI=Fg;const KI="5.2.0",YI={version:KI},GI={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function QI(t,e){let n=e;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})),hA(t)?(n=new Tl(n,t),n):(n.request=t,n)}function xp(t){return t.data.slice(0,t.data.size,t.meta.type)}const XI={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:""};class JI extends vA{static VERSION=YI.version;#e;#t;uploaderEvents;constructor(e,n){if(super(e,{...XI,fieldName:n.bundle?"files[]":"file",...n}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=GI,this.i18nInit(),this.#t=new pA({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=i=>async(o,r)=>{try{const s=await iA(o,{...r,onBeforeRequest:(c,u)=>this.opts.onBeforeRequest?.(c,u,i),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:c=>{const u=Math.ceil(c/1e3),d=new Error(this.i18n("uploadStalled",{seconds:u}));this.uppy.emit("upload-stalled",d,i)},onUploadProgress:c=>{if(c.lengthComputable)for(const{id:u}of i){const d=this.uppy.getFile(u);d!=null&&this.uppy.emit("upload-progress",d,{uploadStarted:d.progress.uploadStarted??0,bytesUploaded:c.loaded/c.total*d.size,bytesTotal:d.size})}}});let a=await this.opts.getResponseData?.(s);if(s.responseType==="json")a??=s.response;else try{a??=JSON.parse(s.responseText)}catch(c){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:c})}const l=typeof a?.url=="string"?a.url:void 0;for(const{id:c}of i)this.uppy.emit("upload-success",this.uppy.getFile(c),{status:s.status,body:a,uploadURL:l});return s}catch(s){if(s.name==="AbortError")return;const a=s.request;for(const l of i)this.uppy.emit("upload-error",this.uppy.getFile(l.id),QI(a,s),a);throw s}}}getOptions(e){const n=this.uppy.getState().xhrUpload,{headers:i}=this.opts,o={...this.opts,...n||{},...e.xhrUpload||{},headers:{}};return typeof i=="function"?o.headers=i(e):Object.assign(o.headers,this.opts.headers),n&&Object.assign(o.headers,n.headers),e.xhrUpload&&Object.assign(o.headers,e.xhrUpload.headers),o}addMetadata(e,n,i){_h(i.allowedMetaFields,n).forEach(r=>{const s=n[r];Array.isArray(s)?s.forEach(a=>e.append(r,a)):e.append(r,s)})}createFormDataUpload(e,n){const i=new FormData;this.addMetadata(i,e.meta,n);const o=xp(e);return e.name?i.append(n.fieldName,o,e.meta.name):i.append(n.fieldName,o),i}createBundledUpload(e,n){const i=new FormData,{meta:o}=this.uppy.getState();return this.addMetadata(i,o,n),e.forEach(r=>{const s=this.getOptions(r),a=xp(r);r.name?i.append(s.fieldName,a,r.name):i.append(s.fieldName,a)}),i}async#n(e){const n=new gA(this.uppy),i=new AbortController;n.onFileRemove(e.id,()=>i.abort()),n.onCancelAll(e.id,()=>i.abort());try{await this.#t.add(async o=>{const r=this.getOptions(e),s=this.#e([e]),a=r.formData?this.createFormDataUpload(e,r):e.data,l=typeof r.endpoint=="string"?r.endpoint:await r.endpoint(e);return s(l,{...r,body:a,signal:AbortSignal.any([o,i.signal])})})}catch(o){if(o.name==="AbortError")return;throw o}finally{n.remove()}}async#i(e){const n=new AbortController;function i(){n.abort()}this.uppy.once("cancel-all",i);try{await this.#t.add(async o=>{const r=this.uppy.getState().xhrUpload??{},s=this.#e(e),a=this.createBundledUpload(e,{...this.opts,...r}),l=typeof this.opts.endpoint=="string"?this.opts.endpoint:await this.opts.endpoint(e);return s(l,{...this.opts,body:a,signal:AbortSignal.any([o,n.signal])})})}catch(o){if(o.name==="AbortError")return;throw o}finally{this.uppy.off("cancel-all",i)}}#r(e){const n=this.getOptions(e),i=_h(n.allowedMetaFields,e.meta);return{...e.remote?.body,protocol:"multipart",endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:Object.fromEntries(i.map(o=>[o,e.meta[o]])),httpMethod:n.method,useFormData:n.formData,headers:n.headers}}async#o(e){await Promise.allSettled(e.map(n=>{if(n.isRemote){const i=()=>this.#t,o=new AbortController,r=s=>{s.id===n.id&&o.abort()};return this.uppy.on("file-removed",r),this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,this.#r(n),{signal:o.signal,getQueue:i}).finally(()=>{this.uppy.off("file-removed",r)})}return this.#n(n)}))}#a=async e=>{if(e.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(e),i=sA(n),o=aA(i);if(this.uppy.emit("upload-start",o),this.opts.bundle){if(i.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.#i(i)}else await this.#o(i)};install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.#a)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.#a)}}const cu=new Map,Gl=Symbol("ServiceContainerId");function ZI(t,e){cu.set(t,e)}function eM(t){cu.delete(t)}function je(t){const e=t??ko(Gl);if(!e)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=cu.get(e);if(!n)throw new Error(`VueFinder app instance with id "${e}" was not found. Make sure the VueFinder component with id="${e}" is mounted.`);return n}function tM(t){const e=localStorage.getItem(t+"_storage"),n=Mt(JSON.parse(e??"{}"));Oe(n,i);function i(){Object.keys(n).length?localStorage.setItem(t+"_storage",JSON.stringify(n)):localStorage.removeItem(t+"_storage")}function o(a,l){n[a]=l}function r(a){delete n[a]}function s(){Object.keys(n).forEach(a=>r(a))}return{getStore:(a,l=null)=>a in n?n[a]:l,setStore:o,removeStore:r,clearStore:s}}function Yt(t,e="An error occurred"){if(!t)return e;if(typeof t=="string")return t||e;if(t instanceof Error)return t.message||e;if(typeof t=="object"&&t!==null){const n=t;if(typeof n.message=="string"&&n.message)return n.message;if(typeof n.error=="string"&&n.error)return n.error}return e}function nM(t,e){return zm(t,e,{encode:JSON.stringify,decode:JSON.parse})}function iM(t){if(!t?.config?.get)return!0;try{return!!t.config.get("notificationsEnabled")}catch{return!0}}function Bi(t,e,n){const i={type:e,message:n};if(t?.emitter?.emit?.("vf-notify",i),!!iM(t))switch(e){case"success":Tr.success(n);break;case"error":Tr.error(n);break;case"warning":Tr.warning(n);break;default:Tr.info(n);break}}function Gt(t){return{success(e){Bi(t,"success",e)},error(e){Bi(t,"error",e)},info(e){Bi(t,"info",e)},warning(e){Bi(t,"warning",e)},emit(e,n){Bi(t,e,n)}}}const Ya=new Map;async function Ga(t,e){const n=e[t];return typeof n=="function"?(await n()).default:n}function oM(t,e,n,i,o){const r=Gt({emitter:n,config:o}),s="vuefinder_locale",a="global";let l;if(Ya.has(a))l=Ya.get(a),e&&e!==l.get()&&l.set(e);else{const b=localStorage.getItem(s)?JSON.parse(localStorage.getItem(s)):null;l=nM(s,e||b||"en"),Ya.set(a,l)}const c="vuefinder_translations",u=b=>{try{const S=localStorage.getItem(c);if(S)return JSON.parse(S)[b]||null}catch{}return null},d=(b,S)=>{try{const x=localStorage.getItem(c),k=x?JSON.parse(x):{};k[b]=S,localStorage.setItem(c,JSON.stringify(k))}catch{}},h=ke(l),v=String(h.value),f=u(v),p=H(f||{});let _=!1;!f&&Object.keys(i).length>0&&Ga(v,i).then(b=>{p.value=b,d(v,b)}).catch(()=>{}),Oe(h,async(b,S)=>{if(S&&b===S)return;if(!_){_=!0;const k=u(String(b));if(k)p.value=k;else if(Object.keys(i).length>0)try{const O=await Ga(String(b),i);p.value=O,d(String(b),O)}catch{}return}const x=u(String(b));if(x)p.value=x;else try{const k=await Ga(String(b),i);p.value=k,d(String(b),k)}catch(k){const O=Yt(k,"Locale cannot be loaded!");r.error(O);return}Object.values(i).length>1&&(r.success("The language is set to "+b),n.emit("vf-language-saved"))},{immediate:!1});const C=(b,...S)=>S.length?C(b=b.replace("%s",String(S.shift())),...S):b;function w(b,...S){return p.value&&Object.prototype.hasOwnProperty.call(p.value,b)?C(p.value[b]||b,...S):C(b,...S)}const E=te({get:()=>h.value,set:b=>{l.set(b)}});return Mt({t:w,locale:E,localeAtom:l})}const rM=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],Lg={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:rM.reduce((t,e)=>(t[e]=!0,t),{})};function Tp(){return Lg.advanced}function jg(t){return t?t==="simple"||t==="advanced"?{...Lg[t]}:{...Tp(),...t}:Tp()}const sM="4.1.2";function uu(t,e,n,i,o){return e=Math,n=e.log,i=1024,o=n(t)/n(i)|0,(t/e.pow(i,o)).toFixed(0)+" "+(o?"KMGTPEZY"[--o]+"iB":"B")}function Ng(t,e,n,i,o){return e=Math,n=e.log,i=1e3,o=n(t)/n(i)|0,(t/e.pow(i,o)).toFixed(0)+" "+(o?"KMGTPEZY"[--o]+"B":"B")}function aM(t){if(typeof t=="number")return t;const e={k:1,m:2,g:3,t:4},n=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t);if(!n)return 0;const i=parseFloat(n[1]||"0"),o=(n[2]||"").toLowerCase(),r=e[o]??0;return Math.round(i*Math.pow(1024,r))}function lM(t){const e=Yo(null),n=H(!1),i=H(),o=H(!1);return{visible:n,type:e,data:i,open:(r,s=null)=>{t.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),n.value=!0,e.value=r,i.value=s},close:()=>{t.get("fullScreen")||(document.querySelector("body").style.overflow=""),n.value=!1,e.value=null},setEditMode:r=>{o.value=r},editMode:o}}const vs={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},gs={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},cM=new Set(Object.keys(gs));function uM(t){return t||"silver"}function Ug(t){return cM.has(t)}function Op(t){const e={},n={},i=t;for(const o in i)if(Ug(o))n[o]=i[o];else if(o in vs){const r=o;e[r]=i[o]}return{persistenceConfig:e,nonPersistenceConfig:n}}function $p(t,e){const n={...vs,...e,...t};return n.theme=uM(n.theme),n}function kp(t,e){return{...gs,...e,...t}}const dM=(t,e={})=>{const n=`vuefinder_config_${t}`,{persistenceConfig:i,nonPersistenceConfig:o}=Op(e),r=$p(i,vs),s=kp(o,gs),a=zm(n,r,{encode:JSON.stringify,decode:JSON.parse}),l=Tt(s),c=ri([a,l],(f,p)=>({...f,...p})),u=(f={})=>{const p=a.get(),_=l.get(),{persistenceConfig:C,nonPersistenceConfig:w}=Op(f),E=$p(C,p),b=kp(w,_);a.set(E),l.set(b)},d=f=>Ug(f)?l.get()[f]:a.get()[f],h=()=>({...a.get(),...l.get()}),v=(f,p)=>{const _=a.get();typeof f=="object"&&f!==null?a.set({..._,...f}):a.set({..._,[f]:p})};return{state:c,init:u,get:d,set:v,toggle:f=>{const p=a.get();v(f,!p[f])},all:h,reset:()=>{a.set({...vs}),l.set({...gs})}}};function hM(t,e){if(typeof t=="string"&&typeof e=="string")return t.toLowerCase().localeCompare(e.toLowerCase());const n=Number(t)||0,i=Number(e)||0;return n===i?0:n<i?-1:1}const pM=()=>{const t=Tt(""),e=Tt([]),n=Tt(!1),i=Tt([]),o=Tt({active:!1,column:"",order:""}),r=Tt({kind:"all",showHidden:!1}),s=Tt(new Set),a=Tt({type:"copy",path:"",items:new Set}),l=Tt(null),c=Tt(0),u=Tt(!1),d=Tt([]),h=Tt(-1),v=ri([t],ee=>{const G=(ee??"").trim(),he=G.indexOf("://"),me=he>=0?G.slice(0,he):"",$e=(he>=0?G.slice(he+3):G).split("/").filter(Boolean);let Se="";const Ne=$e.map(Pe=>(Se=Se?`${Se}/${Pe}`:Pe,{basename:Pe,name:Pe,path:me?`${me}://${Se}`:Se,type:"dir"}));return{storage:me,breadcrumb:Ne,path:G}}),f=ri([i,o,r],(ee,G,he)=>{let me=ee;he.kind==="files"?me=me.filter(Ue=>Ue.type==="file"):he.kind==="folders"&&(me=me.filter(Ue=>Ue.type==="dir")),he.showHidden||(me=me.filter(Ue=>!Ue.basename.startsWith(".")));const{active:$e,column:Se,order:Ne}=G;if(!$e||!Se)return me;const Pe=Ne==="asc"?1:-1;return me.slice().sort((Ue,ut)=>hM(Ue[Se],ut[Se])*Pe)}),p=ri([i,s],(ee,G)=>G.size===0?[]:ee.filter(he=>G.has(he.path))),_=(ee,G)=>{const he=t.get();if((G??!0)&&he!==ee){const me=d.get(),$e=h.get();$e<me.length-1&&me.splice($e+1),me.length===0&&he&&me.push(he),me.push(ee),d.set([...me]),h.set(me.length-1)}t.set(ee)},C=ee=>{i.set(ee??[])},w=ee=>{e.set(ee??[])},E=(ee,G)=>{o.set({active:!0,column:ee,order:G})},b=ee=>{const G=o.get();G.active&&G.column===ee?o.set({active:G.order==="asc",column:ee,order:"desc"}):o.set({active:!0,column:ee,order:"asc"})},S=()=>{o.set({active:!1,column:"",order:""})},x=(ee,G)=>{r.set({kind:ee,showHidden:G})},k=()=>{r.set({kind:"all",showHidden:!1})},O=(ee,G="multiple")=>{const he=new Set(s.get());G==="single"&&he.clear(),he.add(ee),s.set(he)},K=(ee,G="multiple")=>{const he=new Set(s.get());G==="single"&&he.clear(),ee.forEach(me=>he.add(me)),s.set(he)},D=ee=>{const G=new Set(s.get());G.delete(ee),s.set(G)},P=ee=>s.get().has(ee),U=(ee,G="multiple")=>{const he=new Set(s.get());he.has(ee)?he.delete(ee):(G==="single"&&he.clear(),he.add(ee)),s.set(he)},M=(ee="multiple",G)=>{if(ee==="single"){const he=i.get()[0];if(he){const me=he.path;s.set(new Set([me])),c.set(1)}}else{if(G?.selectionFilterType||G?.selectionFilterMimeIncludes&&G.selectionFilterMimeIncludes.length>0){const he=i.get().filter(me=>{const $e=G.selectionFilterType,Se=G.selectionFilterMimeIncludes;return $e==="files"&&me.type==="dir"||$e==="dirs"&&me.type==="file"?!1:Se&&Array.isArray(Se)&&Se.length>0&&me.type!=="dir"?me.mime_type?Se.some(Ne=>me.mime_type?.startsWith(Ne)):!1:!0}).map(me=>me.path);s.set(new Set(he))}else{const he=new Set(i.get().map(me=>me.path));s.set(he)}de(s.get().size)}},q=()=>{s.set(new Set),c.set(0)},le=ee=>{const G=new Set(ee??[]);s.set(G),c.set(G.size)},de=ee=>{c.set(ee)},Y=ee=>{u.set(!!ee)},I=()=>u.get(),A=(ee,G)=>{const he=i.get().filter(me=>G.has(me.path));a.set({type:ee,path:v.get().path,items:new Set(he)})},Q=ee=>ri([a],G=>G.type==="cut"&&Array.from(G.items).some(he=>he.path===ee)),z=ee=>ri([a],G=>G.type==="copy"&&Array.from(G.items).some(he=>he.path===ee));return{files:i,storages:e,currentPath:t,sort:o,filter:r,selectedKeys:s,selectedCount:c,loading:u,draggedItem:l,clipboardItems:a,path:v,sortedFiles:f,selectedItems:p,setPath:_,setFiles:C,setStorages:w,setSort:E,toggleSort:b,clearSort:S,setFilter:x,clearFilter:k,select:O,selectMultiple:K,deselect:D,toggleSelect:U,selectAll:M,isSelected:P,clearSelection:q,setSelection:le,setSelectedCount:de,setLoading:Y,isLoading:I,setClipboard:A,createIsCut:Q,createIsCopied:z,isCut:ee=>{const G=Q(ee);return ke(G).value??!1},isCopied:ee=>{const G=z(ee);return ke(G).value??!1},clearClipboard:()=>{a.set({type:"copy",path:"",items:new Set})},getClipboard:()=>a.get(),setDraggedItem:ee=>{l.set(ee)},getDraggedItem:()=>l.get(),clearDraggedItem:()=>{l.set(null)},setReadOnly:ee=>{n.set(ee)},getReadOnly:()=>n.get(),isReadOnly:ee=>n.get()?!0:ee.read_only??!1,goBack:()=>{const ee=d.get(),G=h.get();if(G>0){const he=G-1,me=ee[he];me&&(h.set(he),_(me,!1))}},goForward:()=>{const ee=d.get(),G=h.get();if(G<ee.length-1){const he=G+1,me=ee[he];me&&(h.set(he),_(me,!1))}},canGoBack:ri([h],ee=>ee>0),canGoForward:ri([d,h],(ee,G)=>G<ee.length-1),navigationHistory:d,historyIndex:h}};class fM{validateParam(e,n){if(e==null)throw new Error(`${n} is required`)}validatePath(e){if(!e)throw new Error("Path must be a non-empty string")}parsePath(e){if(!e)return{};if(e.includes("://")){const[n,...i]=e.split("://");return{storage:n,path:i.join("://")}}return{path:e}}combinePath(e,n){return e&&n?`${e}://${n}`:n||""}}function Ap(t,e,n){const i=`HTTP ${e}: ${n}`;if(!t)return i;try{const o=JSON.parse(t);if(o.message)return o.message;if(o.error){if(typeof o.error=="string")return o.error;if(o.error.message)return o.error.message}if(o.errors&&Array.isArray(o.errors)&&o.errors.length>0){const r=o.errors.map(s=>s.message).filter(s=>!!s);if(r.length>0)return r.join(", ")}return o.detail?o.detail:o.title?o.title:t}catch{return t||i}}class zg extends fM{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(e){super();const n={...zg.DEFAULT_URLS,...e.url||{}};this.config={...e,baseURL:e.baseURL||"",url:n}}setBaseURL(e){this.config.baseURL=e||""}setToken(e){this.config.token=e}configureUploader(e,n){const i=this.getHeaders();delete i["Content-Type"],e.use(JI,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:i,formData:!0}),e.on("upload",()=>{const o=n.getTargetPath();e.getFiles().forEach(r=>{e.setFileMeta(r.id,{path:o})})})}getHeaders(){const e={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(e.Authorization=`Bearer ${this.config.token}`),e}async request(e,n={}){const i=`${this.config.baseURL}${e}`,o=await fetch(i,{...n,headers:{...this.getHeaders(),...n.headers}});if(!o.ok){const r=await o.text(),s=Ap(r,o.status,o.statusText);throw new Error(s)}return(o.headers.get("content-type")||"").includes("application/json")?await o.json():await o.text()}async list(e){const n=new URLSearchParams;e?.path&&n.append("path",e.path);const i=n.toString()?`${this.config.url.list}?${n.toString()}`:this.config.url.list;return await this.request(i,{method:"GET"})}async delete(e){return this.validateParam(e.items,"items"),this.validateParam(e.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:e.path,items:e.items})})}async rename(e){return this.validateParam(e.path,"path"),this.validateParam(e.item,"item"),this.validateParam(e.name,"name"),this.validatePath(e.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:e.path,item:e.item,name:e.name})})}async copy(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async move(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async archive(e){return this.validateParam(e.items,"items"),this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:e.items,path:e.path,name:e.name})})}async unarchive(e){return this.validateParam(e.item,"item"),this.validateParam(e.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:e.item,path:e.path})})}async createFile(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}async createFolder(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}getPreviewUrl(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`}async getContent(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path}),i=`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`,o=await fetch(i,{headers:this.getHeaders()});if(!o.ok){const r=await o.text(),s=Ap(r,o.status,o.statusText);throw new Error(s)}return{content:await o.text(),mimeType:o.headers.get("Content-Type")||void 0}}getDownloadUrl(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.download}?${n.toString()}`}async search(e){const n=this.config.url.search,i=new URLSearchParams;e.path&&i.set("path",e.path),e.filter&&i.set("filter",e.filter),e.deep&&i.set("deep","1"),e.size&&e.size!=="all"&&i.set("size",e.size);const o=i.toString()?`${n}?${i.toString()}`:n;return(await this.request(o,{method:"GET"})).files||[]}async save(e){return this.validateParam(e.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:e.path,content:e.content}),headers:this.getHeaders()})}}const Pp={list:t=>["adapter","list",t],search:(t,e,n,i)=>["adapter","search",t,e,n,i],delete:t=>["adapter","delete",t],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class mM{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(e,n={}){this.driver=e,this.onBeforeOpen=n.onBeforeOpen,this.onAfterOpen=n.onAfterOpen,this.queryClient=n.queryClient||new tA({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(e){const n=Pp.list(e);return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.list({path:e}),staleTime:this.config.staleTime})}async open(e){this.onBeforeOpen&&this.onBeforeOpen();const n=await this.list(e);return this.onAfterOpen&&this.onAfterOpen(n),n}async delete(e){const n=await this.driver.delete(e);return this.invalidateListQueries(),n}async rename(e){const n=await this.driver.rename(e);return this.invalidateListQueries(),n}async copy(e){const n=await this.driver.copy(e);return this.invalidateListQueries(),n}async move(e){const n=await this.driver.move(e);return this.invalidateListQueries(),n}async archive(e){const n=await this.driver.archive(e);return this.invalidateListQueries(),n}async unarchive(e){const n=await this.driver.unarchive(e);return this.invalidateListQueries(),n}async createFile(e){const n=await this.driver.createFile(e);return this.invalidateListQueries(),n}async createFolder(e){const n=await this.driver.createFolder(e);return this.invalidateListQueries(),n}async getContent(e){const n=["adapter","content",e.path];return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.getContent(e),staleTime:this.config.staleTime})}getPreviewUrl(e){return this.driver.getPreviewUrl(e)}getDownloadUrl(e){return this.driver.getDownloadUrl(e)}async search(e){const n=Pp.search(e.path,e.filter,e.deep,e.size);return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.search(e),staleTime:this.config.staleTime})}async save(e){const n=await this.driver.save(e);return this.invalidateListQueries(),n}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(e){this.queryClient.invalidateQueries({queryKey:["adapter","list",e],exact:!0})}clearCache(){this.queryClient.clear()}}function vM(t){const e=ke(t.state);return{current:te(()=>e.value.theme||"silver"),set:n=>{t.set("theme",n)}}}const gM=(t,e)=>{const n=tM(t.id??"vf"),i=C$(),o=e.i18n,r=t.locale??e.locale,s=dM(t.id??"vf",t.config??{}),a=pM();if(!t.driver)throw new Error("Driver is required for VueFinder");const l=new mM(t.driver);return Mt({version:sM,config:s,theme:(()=>{const c=vM(s);return{current:c.current,set:c.set}})(),fs:a,root:null,debug:t.debug??!1,emitter:i,storage:n,i18n:oM(n,r,i,o,s),modal:lM(s),adapter:Gn(l),features:jg(t.features),selectionMode:t.selectionMode||"multiple",selectionFilterType:te(()=>t.selectionFilterType||"both"),selectionFilterMimeIncludes:te(()=>t.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:s.get("metricUnits")?Ng:uu,contextMenuItems:t.contextMenuItems,customUploader:t.customUploader})},_M=["data-theme"],yM={class:"vuefinder__modal-layout__container"},bM={class:"vuefinder__modal-layout__content"},wM={key:0,class:"vuefinder__modal-layout__footer"},EM={key:0,class:"vuefinder__modal-drag-overlay"},CM={class:"vuefinder__modal-drag-message"},tn=Ce({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{}},setup(t){const e=H(null),n=je();n.config;const i=t;et(()=>{const r=document.querySelector(".v-f-modal input");r&&r.focus(),Ge(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&e.value){const s=e.value.getBoundingClientRect().bottom+16;window.scrollTo({top:s,left:0,behavior:"smooth"})}})});const o=r=>{r.target.classList.contains("vuefinder__modal-layout__wrapper")&&(r.preventDefault(),r.stopPropagation())};return(r,s)=>(y(),T("div",{"data-theme":m(n).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:s[1]||(s[1]=ho(a=>m(n).modal.close(),["esc"]))},[s[2]||(s[2]=g("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),g("div",yM,[g("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:o,onMousedown:s[0]||(s[0]=Ye(a=>m(n).modal.close(),["self"]))},[g("div",{ref_key:"modalBody",ref:e,class:"vuefinder__modal-layout__body"},[g("div",bM,[Ve(r.$slots,"default")]),r.$slots.buttons?(y(),T("div",wM,[Ve(r.$slots,"buttons")])):ue("",!0)],512)],32)]),i.showDragOverlay?(y(),T("div",EM,[g("div",CM,L(i.dragOverlayText||"Drag and drop the files/folders to here."),1)])):ue("",!0)],40,_M))}}),SM={class:"vuefinder__modal-header"},xM={class:"vuefinder__modal-header__icon-container"},TM={id:"modal-title",class:"vuefinder__modal-header__title"},pn=Ce({__name:"ModalHeader",props:{title:{},icon:{}},setup(t){return(e,n)=>(y(),T("div",SM,[g("div",xM,[(y(),ne(Ot(t.icon),{class:"vuefinder__modal-header__icon"}))]),g("div",TM,L(t.title),1)]))}}),OM={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function $M(t,e){return y(),T("svg",OM,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"9"},null,-1),g("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 Vg={render:$M},kM={class:"vuefinder__about-modal__content"},AM={class:"vuefinder__about-modal__main"},PM={class:"vuefinder__about-modal__tab-content"},RM={class:"vuefinder__about-modal__lead"},IM={class:"vuefinder__about-modal__description"},MM={class:"vuefinder__about-modal__links"},DM={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},FM={class:"vuefinder__about-modal__meta"},LM={class:"vuefinder__about-modal__meta-item"},jM={class:"vuefinder__about-modal__meta-label"},NM={class:"vuefinder__about-modal__meta-value"},UM={class:"vuefinder__about-modal__meta-item"},zM={class:"vuefinder__about-modal__meta-label"},Bg=Ce({__name:"ModalAbout",setup(t){const e=je(),{t:n}=e.i18n;return(i,o)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:o[0]||(o[0]=r=>m(e).modal.close())},L(m(n)("Close")),1)]),default:we(()=>[g("div",kM,[j(pn,{icon:m(Vg),title:"Vuefinder "+m(e).version},null,8,["icon","title"]),g("div",AM,[g("div",PM,[g("div",RM,L(m(n)("A modern, customizable file manager component built for Vue.")),1),g("div",IM,L(m(n)("If you like it, please follow and ⭐ star on GitHub.")),1),g("div",MM,[g("a",DM,L(m(n)("Project Home")),1),o[1]||(o[1]=g("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),g("div",FM,[g("div",LM,[g("span",jM,L(m(n)("Version")),1),g("span",NM,L(m(e).version),1)]),g("div",UM,[g("span",zM,L(m(n)("License")),1),o[2]||(o[2]=g("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),VM={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function BM(t,e){return y(),T("svg",VM,[...e[0]||(e[0]=[g("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 Hg={render:BM},HM={class:"vuefinder__delete-modal__content"},qM={class:"vuefinder__delete-modal__form"},WM={class:"vuefinder__delete-modal__description"},KM={class:"vuefinder__delete-modal__files vf-scrollbar"},YM={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"},GM={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"},QM={class:"vuefinder__delete-modal__file-name"},XM={class:"vuefinder__delete-modal__confirmation"},JM={class:"vuefinder__delete-modal__confirmation-label"},ZM={class:"vuefinder__delete-modal__confirmation-text"},eD=["disabled"],Gs=Ce({__name:"ModalDelete",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(e.modal.data.items),a=H(!1),l=()=>{s.value.length&&a.value&&e.adapter.delete({path:r.value.path,items:s.value.map(({path:c,type:u})=>({path:c,type:u}))}).then(c=>{n.success(i("Files deleted.")),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,i("Failed to delete files")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("div",XM,[g("label",JM,[it(g("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>a.value=d),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[Es,a.value]]),g("span",ZM,L(m(i)("I'm sure delete it, This action cannot be undone.")),1)])]),g("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!a.value,onClick:l},L(m(i)("Yes, Delete!")),9,eD),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=d=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(Hg),title:m(i)("Delete files")},null,8,["icon","title"]),g("div",HM,[g("div",qM,[g("p",WM,L(m(i)("Are you sure you want to delete these files?")),1),g("div",KM,[(y(!0),T(Ie,null,He(s.value,d=>(y(),T("p",{key:d.path,class:"vuefinder__delete-modal__file"},[d.type==="dir"?(y(),T("svg",YM,[...u[2]||(u[2]=[g("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)])])):(y(),T("svg",GM,[...u[3]||(u[3]=[g("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)])])),g("span",QM,L(d.basename),1)]))),128))])])])])]),_:1}))}}),tD={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function nD(t,e){return y(),T("svg",tD,[...e[0]||(e[0]=[g("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 qg={render:nD},iD={class:"vuefinder__rename-modal__content"},oD={class:"vuefinder__rename-modal__item"},rD={class:"vuefinder__rename-modal__item-info"},sD={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"},aD={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"},lD={class:"vuefinder__rename-modal__item-name"},Qs=Ce({__name:"ModalRename",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(e.modal.data.items[0]),a=H(s.value.basename),l=()=>{a.value!=s.value.basename&&e.adapter.rename({path:r.value.path,item:s.value.path,name:a.value}).then(c=>{n.success(i("%s is renamed.",a.value)),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,i("Failed to rename")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},L(m(i)("Rename")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=d=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(qg),title:m(i)("Rename")},null,8,["icon","title"]),g("div",iD,[g("div",oD,[g("p",rD,[s.value.type==="dir"?(y(),T("svg",sD,[...u[2]||(u[2]=[g("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)])])):(y(),T("svg",aD,[...u[3]||(u[3]=[g("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)])])),g("span",lD,L(s.value.basename),1)]),it(g("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>a.value=d),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:ho(l,["enter"])},null,544),[[Go,a.value]])])])])]),_:1}))}});function Tn(){const t=je(),e=te(()=>t.features);return{enabled:n=>e.value[n]??!1}}const cD={class:"vuefinder__text-preview"},uD={class:"vuefinder__text-preview__header"},dD=["title"],hD={class:"vuefinder__text-preview__actions"},pD={key:0,class:"vuefinder__text-preview__content"},fD={key:1},mD=Ce({__name:"Text",emits:["success"],setup(t,{emit:e}){const n=e,i=H(""),o=H(""),r=H(null),s=H(!1),a=je(),l=Gt(a),{enabled:c}=Tn(),{t:u}=a.i18n;et(async()=>{try{const v=await a.adapter.getContent({path:a.modal.data.item.path});i.value=v.content,n("success")}catch(v){Yt(v,"Failed to load text content"),n("success")}});const d=()=>{s.value=!s.value,o.value=i.value,a.modal.setEditMode(s.value)},h=async()=>{try{const v=a.modal.data.item.path;await a.adapter.save({path:v,content:o.value}),i.value=o.value,l.success(u("Updated.")),n("success"),s.value=!s.value}catch(v){l.error(Yt(v,u("Failed to save file")))}};return(v,f)=>(y(),T("div",cD,[g("div",uD,[g("div",{id:"modal-title",class:"vuefinder__text-preview__title",title:m(a).modal.data.item.path},L(m(a).modal.data.item.basename),9,dD),g("div",hD,[s.value?(y(),T("button",{key:0,class:"vuefinder__text-preview__save-button",onClick:h},L(m(u)("Save")),1)):ue("",!0),m(c)("edit")?(y(),T("button",{key:1,class:"vuefinder__text-preview__edit-button",onClick:f[0]||(f[0]=p=>d())},L(s.value?m(u)("Cancel"):m(u)("Edit")),1)):ue("",!0)])]),g("div",null,[s.value?(y(),T("div",fD,[it(g("textarea",{ref_key:"editInput",ref:r,"onUpdate:modelValue":f[1]||(f[1]=p=>o.value=p),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512),[[Go,o.value]])])):(y(),T("pre",pD,L(i.value),1))])]))}}),du=async(t,e)=>{if(e){if(e.isFile){const n=await new Promise(i=>{e.file(i)});t(e,n)}if(e.isDirectory){const n=e.createReader(),i=await new Promise(o=>{n.readEntries(o)});for(const o of i)await du(t,o)}}},vt={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function Wg(t){const e=je(),{t:n}=e.i18n,i=e.fs,o=ke(i.path),r=e.config,s=H({QUEUE_ENTRY_STATUS:vt}),a=H(null),l=H(null),c=H(null),u=H(null),d=H(null),h=H([]),v=H(""),f=H(!1),p=H(!1),_=H(null);let C;const w=Y=>{Y.preventDefault(),Y.stopPropagation(),p.value=!0},E=Y=>{Y.preventDefault(),Y.stopPropagation(),p.value=!0},b=Y=>{Y.preventDefault(),Y.stopPropagation(),(!Y.relatedTarget||Y.relatedTarget===document.body)&&(p.value=!1)},S=Y=>{Y.preventDefault(),Y.stopPropagation(),p.value=!1;const I=/^[/\\](.+)/,A=Y.dataTransfer;A&&(A.items&&A.items.length?Array.from(A.items).forEach(Q=>{if(Q.kind==="file"){const z=Q.webkitGetAsEntry?.();if(z)du((ie,ve)=>{const re=I.exec(ie?.fullPath||"");k(ve,re?re[1]:ve.name)},z);else{const ie=Q.getAsFile?.();ie&&k(ie)}}}):A.files&&A.files.length&&Array.from(A.files).forEach(Q=>k(Q)))},x=Y=>h.value.findIndex(I=>I.id===Y),k=(Y,I)=>C.addFile({name:I||Y.name,type:Y.type,data:Y,source:"Local"}),O=Y=>Y.status===vt.DONE?"text-green-600":Y.status===vt.ERROR||Y.status===vt.CANCELED?"text-red-600":"",K=Y=>Y.status===vt.DONE?"✓":Y.status===vt.ERROR||Y.status===vt.CANCELED?"!":"...",D=()=>u.value?.click(),P=()=>e.modal.close(),U=Y=>{if(f.value||!h.value.filter(I=>I.status!==vt.DONE).length){f.value||(v.value=n("Please select file to upload first."));return}v.value="",_.value=Y||o.value,C.upload()},M=()=>{C.cancelAll(),h.value.forEach(Y=>{Y.status!==vt.DONE&&(Y.status=vt.CANCELED,Y.statusName=n("Canceled"))}),f.value=!1},q=Y=>{f.value||(C.removeFile(Y.id),h.value.splice(x(Y.id),1))},le=Y=>{if(!f.value)if(C.cancelAll(),Y){const I=h.value.filter(A=>A.status!==vt.DONE);h.value=[],I.forEach(A=>k(A.originalFile,A.name))}else h.value=[]},de=Y=>{Y.forEach(I=>{k(I)})};return et(()=>{C=new kc({debug:e.debug,restrictions:{maxFileSize:aM(r.get("maxFileSize")??"10mb")},locale:e.i18n.t("uppy"),onBeforeFileAdded:(Q,z)=>{if(z[Q.id]!=null){const ie=x(Q.id);h.value[ie]?.status===vt.PENDING&&(v.value=C.i18n("noDuplicates",{fileName:Q.name})),h.value=h.value.filter(ve=>ve.id!==Q.id)}return h.value.push({id:Q.id,name:Q.name,size:e.filesize(Q.size),status:vt.PENDING,statusName:n("Pending upload"),percent:null,originalFile:Q.data}),!0}});const Y={getTargetPath:()=>(_.value||o.value).path};if(t)t(C,Y);else if(e.adapter.getDriver().configureUploader)e.adapter.getDriver().configureUploader(C,Y);else throw new Error("No uploader configured");C.on("restriction-failed",(Q,z)=>{const ie=h.value[x(Q.id)];ie&&q(ie),v.value=z.message}),C.on("upload-start",Q=>{Q.forEach(z=>{const ie=h.value[x(z.id)];ie&&(ie.status=vt.UPLOADING,ie.statusName=n("Uploading"),ie.percent="0%")})}),C.on("upload-progress",(Q,z)=>{const ie=z.bytesTotal??1,ve=Math.floor(z.bytesUploaded/ie*100),re=x(Q.id);re!==-1&&h.value[re]&&(h.value[re].percent=`${ve}%`)}),C.on("upload-success",Q=>{const z=h.value[x(Q.id)];z&&(z.status=vt.DONE,z.statusName=n("Done"))}),C.on("upload-error",(Q,z)=>{const ie=h.value[x(Q.id)];ie&&(ie.percent=null,ie.status=vt.ERROR,ie.statusName=z?.isNetworkError?n("Network Error, Unable establish connection to the server or interrupted."):z?.message||n("Unknown Error"))}),C.on("error",Q=>{v.value=Q.message,f.value=!1}),C.on("complete",Q=>{f.value=!1;const z=_.value||o.value;e.adapter.invalidateListQuery(z.path),e.adapter.open(z.path);const ie=h.value.filter(ve=>ve.status===vt.DONE&&Q.successful.includes(ve.id)).map(ve=>ve.name);e.emitter.emit("vf-upload-complete",ie)}),u.value?.addEventListener("click",()=>l.value?.click()),d.value?.addEventListener("click",()=>c.value?.click());const I={capture:!0};document.addEventListener("dragover",w,I),document.addEventListener("dragenter",E,I),document.addEventListener("dragleave",b,I),document.addEventListener("drop",S,I);const A=Q=>{const z=Q.target,ie=z.files;if(ie){for(const ve of ie)k(ve);z.value=""}};l.value?.addEventListener("change",A),c.value?.addEventListener("change",A)}),Ct(()=>{const Y={capture:!0};document.removeEventListener("dragover",w,Y),document.removeEventListener("dragenter",E,Y),document.removeEventListener("dragleave",b,Y),document.removeEventListener("drop",S,Y)}),{container:a,internalFileInput:l,internalFolderInput:c,pickFiles:u,pickFolders:d,queue:h,message:v,uploading:f,hasFilesInDropArea:p,definitions:s,openFileSelector:D,upload:U,cancel:M,remove:q,clear:le,close:P,getClassNameForEntry:O,getIconForEntry:K,addExternalFiles:de}}const vD={class:"vuefinder__image-preview"},gD={class:"vuefinder__image-preview__header"},_D=["title"],yD={class:"vuefinder__image-preview__actions"},bD={class:"vuefinder__image-preview__image-container"},wD=["src"],ED=Ce({name:"ImagePreview",__name:"Image",emits:["success"],setup(t,{emit:e}){const n=e,i=je(),o=Gt(i),{enabled:r}=Tn(),{t:s}=i.i18n,a=H(!1),l=H(i.modal.data.item.previewUrl??i.adapter.getPreviewUrl({path:i.modal.data.item.path})),c=H(l.value),{addExternalFiles:u,upload:d,queue:h}=Wg(i.customUploader),v=i.fs,f=ke(v.path),p=In("cropperRef"),_=async()=>{a.value=!a.value,i.modal.setEditMode(a.value)},C=async()=>{const w=p.value?.getResult({size:{width:795,height:341},fillColor:"#ffffff"})?.canvas;if(!w)return;let E=w;if(w.width>1200||w.height>1200){const O=Math.min(1200/w.width,1200/w.height),K=document.createElement("canvas");K.width=Math.floor(w.width*O),K.height=Math.floor(w.height*O);const D=K.getContext("2d");D&&(D.drawImage(w,0,0,K.width,K.height),E=K)}const b=i.modal.data.item.basename,S=b.split(".").pop()?.toLowerCase()||"jpg",x=S==="png"?"image/png":S==="gif"?"image/gif":"image/jpeg",k=await new Promise(O=>{E.toBlob(K=>O(K),x)});if(!k){o.error(s("Failed to save image"));return}try{const O=new File([k],b,{type:x}),K=i.modal.data.item.path.split("/");K.pop();const D={path:K.join("/")||(f.value?.path??"")};u([O]),await new Promise(q=>setTimeout(q,100));const P=h.value.find(q=>q.name===O.name);if(!P)throw new Error("File was not added to upload queue");d(D);let U=0;for(;U<150;){await new Promise(le=>setTimeout(le,200));const q=h.value.find(le=>le.id===P.id);if(q?.status===vt.DONE)break;if(q?.status===vt.ERROR)throw new Error(q.statusName||"Upload failed");U++}o.success(s("Updated.")),await fetch(l.value,{cache:"reload",mode:"no-cors"});const M=i.root?.querySelector?.('[data-src="'+l.value+'"]');M&&M instanceof HTMLElement&&Hi.resetStatus(M),i.emitter.emit("vf-refresh-thumbnails"),await _(),n("success")}catch(O){o.error(Yt(O,s("Failed to save image")))}};return et(()=>{n("success")}),(w,E)=>(y(),T("div",vD,[g("div",gD,[g("h3",{id:"modal-title",class:"vuefinder__image-preview__title",title:m(i).modal.data.item.path},L(m(i).modal.data.item.basename),9,_D),g("div",yD,[a.value?(y(),T("button",{key:0,class:"vuefinder__image-preview__crop-button",onClick:C},L(m(s)("Crop")),1)):ue("",!0),m(r)("edit")?(y(),T("button",{key:1,class:"vuefinder__image-preview__edit-button",onClick:E[0]||(E[0]=b=>_())},L(a.value?m(s)("Cancel"):m(s)("Edit")),1)):ue("",!0)])]),g("div",bD,[a.value?(y(),ne(m(wv),{key:1,ref_key:"cropperRef",ref:p,class:"h-full w-full",crossorigin:"anonymous",src:c.value,"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src"])):(y(),T("img",{key:0,style:{},src:m(i).modal.data.item.previewUrl??m(i).adapter.getPreviewUrl({path:m(i).modal.data.item.path}),class:"vuefinder__image-preview__image h-full w-full"},null,8,wD))])]))}}),CD={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function SD(t,e){return y(),T("svg",CD,[...e[0]||(e[0]=[g("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 qo={render:SD},xD={class:"vuefinder__default-preview"},TD={class:"vuefinder__default-preview__content"},OD={class:"vuefinder__default-preview__header"},$D=["title"],kD={class:"vuefinder__default-preview__icon-container"},AD=["title"],PD=Ce({__name:"Default",emits:["success"],setup(t,{emit:e}){const n=je(),i=e;return et(()=>{i("success")}),(o,r)=>(y(),T("div",xD,[g("div",TD,[g("div",OD,[g("h3",{id:"modal-title",class:"vuefinder__default-preview__title",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,$D)]),g("div",kD,[j(m(qo),{class:"vuefinder__default-preview__file-icon"}),g("div",{id:"modal-title",class:"vuefinder__default-preview__file-name",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,AD)])])]))}}),RD={class:"vuefinder__video-preview"},ID=["title"],MD={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},DD=["src"],FD=Ce({__name:"Video",emits:["success"],setup(t,{emit:e}){const n=je(),i=e,o=()=>n.adapter.getPreviewUrl({path:n.modal.data.item.path});return et(()=>{i("success")}),(r,s)=>(y(),T("div",RD,[g("h3",{id:"modal-title",class:"vuefinder__video-preview__title",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,ID),g("div",null,[g("video",MD,[g("source",{src:o(),type:"video/mp4"},null,8,DD),s[0]||(s[0]=Ke(" Your browser does not support the video tag. ",-1))])])]))}}),LD={class:"vuefinder__audio-preview"},jD=["title"],ND={class:"vuefinder__audio-preview__audio",controls:""},UD=["src"],zD=Ce({__name:"Audio",emits:["success"],setup(t,{emit:e}){const n=e,i=je(),o=()=>{const r=je();return r.adapter.getPreviewUrl({path:r.modal.data.item.path})};return et(()=>{n("success")}),(r,s)=>(y(),T("div",LD,[g("h3",{id:"modal-title",class:"vuefinder__audio-preview__title",title:m(i).modal.data.item.path},L(m(i).modal.data.item.basename),9,jD),g("div",null,[g("audio",ND,[g("source",{src:o(),type:"audio/mpeg"},null,8,UD),s[0]||(s[0]=Ke(" Your browser does not support the audio element. ",-1))])])]))}}),VD={class:"vuefinder__pdf-preview"},BD=["title"],HD=["data"],qD=["src"],WD=Ce({__name:"Pdf",emits:["success"],setup(t,{emit:e}){const n=je(),i=e,o=()=>{const r=je();return r.adapter.getPreviewUrl({path:r.modal.data.item.path})};return et(()=>{i("success")}),(r,s)=>(y(),T("div",VD,[g("h3",{id:"modal-title",class:"vuefinder__pdf-preview__title",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,BD),g("div",null,[g("object",{class:"vuefinder__pdf-preview__object",data:o(),type:"application/pdf",width:"100%",height:"100%"},[g("iframe",{class:"vuefinder__pdf-preview__iframe",src:o(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,qD)],8,HD)])]))}});function KD(t,e=null){return new Date(t*1e3).toLocaleString(e??navigator.language??"en-US")}const YD={key:0,class:"vuefinder__preview-modal__nav-overlay"},GD=["disabled","title"],QD=["disabled","title"],XD={class:"vuefinder__preview-modal__content"},JD={key:0},ZD={class:"vuefinder__preview-modal__loading"},eF={key:0,class:"vuefinder__preview-modal__loading-indicator"},tF={class:"vuefinder__preview-modal__details"},nF={class:"font-bold"},iF={class:"pl-2 font-bold"},oF={key:0,class:"vuefinder__preview-modal__note"},rF=["download","href"],lr=Ce({__name:"ModalPreview",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n,o=H(!1),r=w=>{const E=(w||"").split("/").pop()||"",b=E.lastIndexOf(".");return b>=0?E.slice(b+1).toLowerCase():""},s=(w,E)=>E?w==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(E):w==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(E):w==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(E):w==="text"?new Set(["txt","md","json","js","ts","css","scss","html","xml","csv","log","yml","yaml"]).has(E):w==="application/pdf"?E==="pdf":!1:!1,a=w=>{const E=e.modal.data.item.mime_type;if(E&&typeof E=="string")return E.startsWith(w);const b=r(e.modal.data.item.path);return s(w,b)},l=n("preview");l||(o.value=!0);const c=te(()=>e.modal.data.item),u=ke(e.fs.sortedFiles),d=te(()=>u.value.filter(w=>w.type==="file")),h=te(()=>d.value.findIndex(w=>w.path===c.value.path)),v=te(()=>h.value>0),f=te(()=>h.value<d.value.length-1),p=()=>{if(e.modal.editMode||!v.value)return;const w=d.value[h.value-1];w&&(e.fs.clearSelection(),e.fs.select(w.path),e.modal.data.item=w)},_=()=>{if(e.modal.editMode||!f.value)return;const w=d.value[h.value+1];w&&(e.fs.clearSelection(),e.fs.select(w.path),e.modal.data.item=w)},C=w=>{if(w.key==="Escape"){w.preventDefault(),w.stopPropagation(),e.modal.close();return}(w.key==="ArrowLeft"||w.key==="ArrowRight")&&(w.preventDefault(),w.stopPropagation(),w.key==="ArrowLeft"?p():_())};return et(()=>{const w=document.querySelector(".vuefinder__preview-modal");w&&w.focus()}),(w,E)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:E[6]||(E[6]=b=>m(e).modal.close())},L(m(i)("Close")),1),m(n)("download")?(y(),T("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:m(e).adapter.getDownloadUrl(m(e).modal.data.item),href:m(e).adapter.getDownloadUrl(m(e).modal.data.item)},L(m(i)("Download")),9,rF)):ue("",!0)]),default:we(()=>[g("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:C},[m(e).modal.editMode?ue("",!0):(y(),T("div",YD,[g("button",{disabled:!v.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:m(i)("Previous file"),onClick:p},[...E[7]||(E[7]=[g("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[g("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,GD),g("button",{disabled:!f.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:m(i)("Next file"),onClick:_},[...E[8]||(E[8]=[g("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[g("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,QD)])),g("div",XD,[m(l)?(y(),T("div",JD,[a("text")?(y(),ne(mD,{key:`text-${c.value.path}`,onSuccess:E[0]||(E[0]=b=>o.value=!0)})):a("image")?(y(),ne(ED,{key:`image-${c.value.path}`,onSuccess:E[1]||(E[1]=b=>o.value=!0)})):a("video")?(y(),ne(FD,{key:`video-${c.value.path}`,onSuccess:E[2]||(E[2]=b=>o.value=!0)})):a("audio")?(y(),ne(zD,{key:`audio-${c.value.path}`,onSuccess:E[3]||(E[3]=b=>o.value=!0)})):a("application/pdf")?(y(),ne(WD,{key:`pdf-${c.value.path}`,onSuccess:E[4]||(E[4]=b=>o.value=!0)})):(y(),ne(PD,{key:`default-${c.value.path}`,onSuccess:E[5]||(E[5]=b=>o.value=!0)}))])):ue("",!0),g("div",ZD,[o.value===!1?(y(),T("div",eF,[E[9]||(E[9]=g("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[g("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("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)),g("span",null,L(m(i)("Loading")),1)])):ue("",!0)])])],32),g("div",tF,[g("div",null,[g("span",nF,L(m(i)("File Size"))+": ",1),Ke(L(m(e).filesize(m(e).modal.data.item.file_size)),1)]),g("div",null,[g("span",iF,L(m(i)("Last Modified"))+": ",1),Ke(" "+L(m(KD)(m(e).modal.data.item.last_modified)),1)])]),m(n)("download")?(y(),T("div",oF,[g("span",null,L(m(i)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):ue("",!0)]),_:1}))}}),sF={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 aF(t,e){return y(),T("svg",sF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("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 lF={render:aF},cF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function uF(t,e){return y(),T("svg",cF,[...e[0]||(e[0]=[g("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 hu={render:uF},dF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function hF(t,e){return y(),T("svg",dF,[...e[0]||(e[0]=[g("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 Nn={render:hF},pF={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 fF(t,e){return y(),T("svg",pF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const Xs={render:fF},mF={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 vF(t,e){return y(),T("svg",mF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("path",{d:"M5 12h14"},null,-1)])])}const Js={render:vF},gF={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 _F(t,e){return y(),T("svg",gF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("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 pu={render:_F},yF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function bF(t,e){return y(),T("svg",yF,[...e[0]||(e[0]=[g("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 fu={render:bF},wF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function EF(t,e){return y(),T("svg",wF,[...e[0]||(e[0]=[g("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 mu={render:EF},CF={class:"vuefinder__modal-tree__folder-item"},SF={class:"vuefinder__modal-tree__folder-content"},xF={key:1,class:"vuefinder__modal-tree__folder-spacer"},TF={class:"vuefinder__modal-tree__folder-text"},OF={key:0,class:"vuefinder__modal-tree__subfolders"},$F={key:0,class:"vuefinder__modal-tree__more-note"},kF=300,AF=Ce({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(t,{emit:e}){const n=je(),{t:i}=n.i18n,o=n.fs,r=H({}),s=t,a=e;ke(o.path);const l=te(()=>{const k=`${s.storage}:${s.folder.path}`;return s.expandedFolders[k]||!1}),c=te(()=>s.modelValue?.path===s.folder.path),u=te(()=>s.currentPath?.path===s.folder.path),d=te(()=>s.modalTreeData[s.folder.path]||[]),h=te(()=>{const k=d.value,O=r.value[s.folder.path]||50;return k.length>O?k.slice(0,O):k}),v=te(()=>d.value.length),f=te(()=>r.value[s.folder.path]||50),p=te(()=>v.value>f.value),_=()=>{r.value[s.folder.path]=(f.value||50)+50},C=te(()=>d.value.length>0||s.folder.type==="dir"),w=()=>{a("toggleFolder",s.storage,s.folder.path)},E=()=>{a("update:modelValue",s.folder)},b=()=>{a("update:modelValue",s.folder),a("selectAndClose",s.folder)};let S=0;const x=()=>{const k=Date.now();k-S<kF?b():E(),S=k};return(k,O)=>{const K=ze("ModalTreeFolderItem",!0);return y(),T("div",CF,[g("div",SF,[C.value?(y(),T("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:w},[l.value?(y(),ne(m(Js),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(y(),ne(m(Xs),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(y(),T("div",xF)),g("div",{class:Ae(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":c.value,"vuefinder__modal-tree__folder-link--current":u.value}]),onClick:E,onDblclick:b,onTouchend:x},[l.value?(y(),ne(m(mu),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(y(),ne(m(Nn),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),g("span",TF,L(t.folder.basename),1)],34)]),l.value&&C.value?(y(),T("div",OF,[(y(!0),T(Ie,null,He(h.value,D=>(y(),ne(K,{key:D.path,folder:D,storage:t.storage,"model-value":t.modelValue,"expanded-folders":t.expandedFolders,"modal-tree-data":t.modalTreeData,"current-path":t.currentPath,"onUpdate:modelValue":O[0]||(O[0]=P=>k.$emit("update:modelValue",P)),onSelectAndClose:O[1]||(O[1]=P=>k.$emit("selectAndClose",P)),onToggleFolder:O[2]||(O[2]=(P,U)=>k.$emit("toggleFolder",P,U))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),p.value?(y(),T("div",$F,[g("div",{class:"vuefinder__modal-tree__load-more",onClick:_},L(m(i)("load more")),1)])):ue("",!0)])):ue("",!0)])}}}),PF={class:"vuefinder__modal-tree"},RF={class:"vuefinder__modal-tree__header"},IF={class:"vuefinder__modal-tree__title"},MF={key:0,class:"vuefinder__modal-tree__section"},DF={class:"vuefinder__modal-tree__section-title"},FF={class:"vuefinder__modal-tree__list"},LF=["onClick","onDblclick","onTouchend"],jF={class:"vuefinder__modal-tree__text"},NF={class:"vuefinder__modal-tree__text-storage"},UF={class:"vuefinder__modal-tree__section-title"},zF={class:"vuefinder__modal-tree__list"},VF={class:"vuefinder__modal-tree__storage-item"},BF={class:"vuefinder__modal-tree__storage-content"},HF=["onClick"],qF=["onClick","onDblclick","onTouchend"],WF={class:"vuefinder__modal-tree__storage-text"},KF={key:0,class:"vuefinder__modal-tree__subfolders"},YF={key:0,class:"vuefinder__modal-tree__more-note"},GF=["onClick"],Rp=300,vu=Ce({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(t,{emit:e}){const n=je(),{t:i}=n.i18n,o=n.fs,r=n.config,s=e,a=ke(o.sortedFiles),l=ke(o.storages),c=te(()=>l.value||[]),u=ke(o.path),d=H(null),h=H({}),v=H({}),f=H({});Oe(a,M=>{const q=M.filter(de=>de.type==="dir"),le=u.value?.path||"";le&&(v.value[le]=q.map(de=>({...de,type:"dir"})))});const p=(M,q)=>{const le=`${M}:${q}`;h.value={...h.value,[le]:!h.value[le]},h.value[le]&&!v.value[q]&&n.adapter.list(q).then(de=>{const Y=(de.files||[]).filter(I=>I.type==="dir");v.value[q]=Y.map(I=>({...I,type:"dir"}))})},_=M=>v.value[M]||[],C=M=>f.value[M]||50,w=M=>{const q=_(M),le=C(M);return q.length>le?q.slice(0,le):q},E=M=>_(M).length,b=M=>E(M)>C(M),S=M=>{f.value[M]=C(M)+50},x=M=>{M&&s("update:modelValue",M)},k=M=>{M&&(s("update:modelValue",M),s("selectAndClose",M))},O=M=>{const q={storage:M,path:M+"://",basename:M,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:M+"://"};s("update:modelValue",q)},K=M=>{const q={storage:M,path:M+"://",basename:M,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:M+"://"};s("update:modelValue",q),s("selectAndClose",q)};let D=0;const P=M=>{if(!M)return;const q=Date.now();q-D<Rp?k(M):x(M),D=q},U=M=>{const q=Date.now();q-D<Rp?K(M):O(M),D=q};return et(()=>{d.value&&hn(d.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(M,q)=>(y(),T("div",PF,[g("div",RF,[g("div",IF,L(m(i)("Select Target Folder")),1)]),g("div",{ref_key:"modalContentElement",ref:d,class:"vuefinder__modal-tree__content"},[t.showPinnedFolders&&m(n).features.pinned&&m(r).get("pinnedFolders").length?(y(),T("div",MF,[g("div",DF,L(m(i)("Pinned Folders")),1),g("div",FF,[(y(!0),T(Ie,null,He(m(r).get("pinnedFolders"),le=>(y(),T("div",{key:le.path,class:Ae(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":t.modelValue?.path===le.path}]),onClick:de=>x(le),onDblclick:de=>k(le),onTouchend:de=>P(le)},[j(m(Nn),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),g("div",jF,L(le.basename),1),g("div",NF,L(le.storage),1),j(m(pu),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,LF))),128))])])):ue("",!0),g("div",UF,L(m(i)("Storages")),1),(y(!0),T(Ie,null,He(c.value,le=>(y(),T("div",{key:le,class:"vuefinder__modal-tree__section"},[g("div",zF,[g("div",VF,[g("div",BF,[g("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:Ye(de=>p(le,le+"://"),["stop"])},[h.value[`${le}:${le}://`]?(y(),ne(m(Js),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(y(),ne(m(Xs),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,HF),g("div",{class:Ae(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":t.modelValue?.path===le+"://"}]),onClick:de=>O(le),onDblclick:de=>K(le),onTouchend:de=>U(le)},[j(m(fu),{class:"vuefinder__modal-tree__storage-icon"}),g("span",WF,L(le),1)],42,qF)]),h.value[`${le}:${le}://`]?(y(),T("div",KF,[(y(!0),T(Ie,null,He(w(le+"://"),de=>(y(),ne(AF,{key:de.path,folder:de,storage:le,"model-value":t.modelValue,"expanded-folders":h.value,"modal-tree-data":v.value,"current-path":t.currentPath,"onUpdate:modelValue":x,onSelectAndClose:k,onToggleFolder:p},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),b(le+"://")?(y(),T("div",YF,[g("div",{class:"vuefinder__modal-tree__load-more",onClick:de=>S(le+"://")},L(m(i)("load more")),9,GF)])):ue("",!0)])):ue("",!0)])])]))),128))],512)]))}}),QF=["title"],Ql=Ce({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(t,{emit:e}){const n=e,i=je(),{t:o}=i.i18n,r=H(!1),s=H(null),a=H(s.value?.innerHTML);Oe(a,()=>r.value=!1);const l=()=>{n("hidden"),r.value=!0};return(c,u)=>(y(),T("div",null,[r.value?ue("",!0):(y(),T("div",{key:0,ref_key:"strMessage",ref:s,class:Ae(["vuefinder__message",t.error?"vuefinder__message--error":"vuefinder__message--success"])},[Ve(c.$slots,"default"),g("div",{class:"vuefinder__message__close",title:m(o)("Close"),onClick:l},[...u[0]||(u[0]=[g("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"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,QF)],2))]))}}),XF={class:"vuefinder__move-modal__content"},JF={class:"vuefinder__move-modal__description"},ZF={class:"vuefinder__move-modal__files vf-scrollbar"},e5={class:"vuefinder__move-modal__file-name"},t5={class:"vuefinder__move-modal__target-title"},n5={class:"vuefinder__move-modal__target-container"},i5={class:"vuefinder__move-modal__target-path"},o5={class:"vuefinder__move-modal__target-storage"},r5={key:0,class:"vuefinder__move-modal__destination-folder"},s5={class:"vuefinder__move-modal__target-badge"},a5={key:0,class:"vuefinder__move-modal__options"},l5={class:"vuefinder__move-modal__checkbox-label"},c5={class:"vuefinder__move-modal__checkbox-text"},u5=["disabled"],d5={class:"vuefinder__move-modal__selected-items"},Kg=Ce({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(t){const e=je(),n=Gt(e),{enabled:i}=Tn(),{t:o}=e.i18n,r=t,s=H(e.modal.data.items.from),a=H(e.modal.data.items.to),l=H(""),c=H(r.copy||!i("move")),u=te(()=>c.value?"copy":"move"),d=H(!1),h=ke(e.fs.path),v=te(()=>c.value?o("Copy files"):o("Move files")),f=te(()=>c.value?o("Are you sure you want to copy these files?"):o("Are you sure you want to move these files?")),p=te(()=>c.value?o("Yes, Copy!"):o("Yes, Move!")),_=x=>{x&&(a.value=x)},C=x=>{x&&(a.value=x,d.value=!1)},w=te(()=>{const x=a.value;return x?s.value.some(k=>!!(x.path===k.path||k.path.startsWith(x.path+"/")||k.type==="dir"&&x.path.startsWith(k.path+"/"))):!0}),E=te(()=>{if(!w.value)return"";const x=a.value;return x?s.value.find(k=>x.path===k.path||k.path.startsWith(x.path+"/")||k.type==="dir"&&x.path.startsWith(k.path+"/"))?o("Cannot move/copy item to itself or its parent/child directory"):o("Invalid destination directory"):o("Please select a destination directory")}),b=()=>{const x=a.value.path;if(!x)return{storage:"local",path:""};if(x.endsWith("://"))return{storage:x.replace("://",""),path:""};const k=x.split("://");return{storage:k[0]||"local",path:k[1]||""}},S=async()=>{if(s.value.length)try{const{files:x}=await e.adapter[u.value]({path:h.value.path,sources:s.value.map(({path:k})=>k),destination:a.value.path});e.fs.setFiles(x),e.modal.close()}catch(x){n.error(Yt(x,o("Failed to transfer files")))}};return(x,k)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:w.value,onClick:S},L(p.value),9,u5),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:k[4]||(k[4]=O=>m(e).modal.close())},L(m(o)("Cancel")),1),g("div",d5,L(m(o)("%s item(s) selected.",s.value.length)),1)]),default:we(()=>[g("div",null,[j(pn,{icon:c.value?m(hu):m(lF),title:v.value},null,8,["icon","title"]),g("div",XF,[g("p",JF,L(f.value),1),g("div",ZF,[(y(!0),T(Ie,null,He(s.value,O=>(y(),T("div",{key:O.path,class:"vuefinder__move-modal__file"},[g("div",null,[O.type==="dir"?(y(),ne(m(Nn),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(y(),ne(m(qo),{key:1,class:"vuefinder__move-modal__icon"}))]),g("div",e5,L(O.path),1)]))),128))]),g("h4",t5,L(m(o)("Target Directory")),1),g("div",n5,[g("div",{class:"vuefinder__move-modal__target-display",onClick:k[0]||(k[0]=O=>d.value=!d.value)},[g("div",i5,[g("span",o5,L(b().storage)+"://",1),b().path?(y(),T("span",r5,L(b().path),1)):ue("",!0)]),g("span",s5,L(m(o)("Browse")),1)])]),g("div",{class:Ae(["vuefinder__move-modal__tree-selector",d.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[j(vu,{modelValue:a.value,"onUpdate:modelValue":[k[1]||(k[1]=O=>a.value=O),_],"show-pinned-folders":!0,onSelectAndClose:C},null,8,["modelValue"])],2),m(i)("copy")&&m(i)("move")?(y(),T("div",a5,[g("label",l5,[it(g("input",{"onUpdate:modelValue":k[2]||(k[2]=O=>c.value=O),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[Es,c.value]]),g("span",c5,L(m(o)("Create a copy instead of moving")),1)])])):ue("",!0),E.value?(y(),ne(Ql,{key:1,error:""},{default:we(()=>[Ke(L(E.value),1)]),_:1})):ue("",!0),l.value.length&&!E.value?(y(),ne(Ql,{key:2,error:"",onHidden:k[3]||(k[3]=O=>l.value="")},{default:we(()=>[Ke(L(l.value),1)]),_:1})):ue("",!0)])])]),_:1}))}}),uo=Ce({__name:"ModalMove",setup(t){return(e,n)=>(y(),ne(Kg,{copy:!1}))}}),gu=Ce({__name:"ModalCopy",setup(t){return(e,n)=>(y(),ne(Kg,{copy:!0}))}}),h5=(t,e=0,n=!1)=>{let i;return(...o)=>{n&&!i&&t(...o),clearTimeout(i),i=setTimeout(()=>{t(...o)},e)}},Yg=(t,e,n)=>{const i=H(t);return x_((o,r)=>({get(){return o(),i.value},set:h5(s=>{i.value=s,r()},e,!1)}))},p5={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function f5(t,e){return y(),T("svg",p5,[...e[0]||(e[0]=[g("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 _u={render:f5},m5={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 v5(t,e){return y(),T("svg",m5,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),g("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 Zs={render:v5},g5={class:"vuefinder__search-modal__search-input"},_5=["value","placeholder","disabled"],y5={key:0,class:"vuefinder__search-modal__loading"},b5=Ce({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(t,{expose:e,emit:n}){const i=n,o=je(),{t:r}=o.i18n,s=H(null),a=c=>{const u=c.target;i("update:modelValue",u.value)},l=c=>{i("keydown",c)};return e({focus:()=>{s.value&&s.value.focus()}}),(c,u)=>(y(),T("div",g5,[j(m(_u),{class:"vuefinder__search-modal__search-icon"}),g("input",{ref_key:"searchInput",ref:s,value:t.modelValue,type:"text",placeholder:m(r)("Search files"),disabled:t.disabled,class:"vuefinder__search-modal__input",onKeydown:l,onKeyup:u[0]||(u[0]=Ye(()=>{},["stop"])),onInput:a},null,40,_5),t.isSearching?(y(),T("div",y5,[j(m(Zs),{class:"vuefinder__search-modal__loading-icon"})])):ue("",!0)]))}}),w5={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function E5(t,e){return y(),T("svg",w5,[...e[0]||(e[0]=[g("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),g("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 Gg={render:E5},C5=["disabled","title"],S5=["data-theme"],x5={class:"vuefinder__search-modal__dropdown-content"},T5={class:"vuefinder__search-modal__dropdown-section"},O5={class:"vuefinder__search-modal__dropdown-title"},$5={class:"vuefinder__search-modal__dropdown-options"},k5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},A5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},P5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},R5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},I5=Ce({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","keydown"],setup(t,{expose:e,emit:n}){const i=t,o=n,r=je(),{t:s}=r.i18n,a=H(null),l=H(null);let c=null;const u=p=>{if(o("update:selectedOption",p),p.startsWith("size-")){const _=p.split("-")[1];o("update:sizeFilter",_)}},d=async()=>{i.disabled||(i.visible?(o("update:visible",!1),c&&(c(),c=null)):(o("update:visible",!0),await Ge(),await h()))},h=async()=>{if(!(!a.value||!l.value)&&(await Ge(),!(!a.value||!l.value))){Object.assign(l.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:p,y:_}=await Zi(a.value,l.value,{placement:"bottom-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(l.value.style,{left:`${p}px`,top:`${_}px`}),requestAnimationFrame(()=>{l.value&&Object.assign(l.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(p){console.warn("Floating UI initial positioning error:",p);return}try{c=oc(a.value,l.value,async()=>{if(!(!a.value||!l.value))try{const{x:p,y:_}=await Zi(a.value,l.value,{placement:"bottom-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(l.value.style,{left:`${p}px`,top:`${_}px`})}catch(p){console.warn("Floating UI positioning error:",p)}})}catch(p){console.warn("Floating UI autoUpdate setup error:",p),c=null}}},v=p=>{if(!i.visible)return;const _=["size-all","size-small","size-medium","size-large"],C=_.findIndex(w=>w===i.selectedOption);if(p.key==="ArrowDown"){p.preventDefault();const w=(C+1)%_.length;o("update:selectedOption",_[w]||null)}else if(p.key==="ArrowUp"){p.preventDefault();const w=C<=0?_.length-1:C-1;o("update:selectedOption",_[w]||null)}else p.key==="Enter"?(p.preventDefault(),i.selectedOption?.startsWith("size-")&&o("update:sizeFilter",i.selectedOption.split("-")[1])):p.key==="Escape"&&(p.preventDefault(),o("update:visible",!1),c&&(c(),c=null))},f=()=>{c&&(c(),c=null)};return Oe(()=>i.visible,p=>{!p&&c&&(c(),c=null)}),Ct(()=>{f()}),e({cleanup:f}),(p,_)=>(y(),T(Ie,null,[g("button",{ref_key:"dropdownBtn",ref:a,class:Ae(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":t.visible}]),disabled:t.disabled,title:m(s)("Search Options"),onClick:Ye(d,["stop"])},[j(m(Gg),{class:"vuefinder__search-modal__dropdown-icon"})],10,C5),(y(),ne(ws,{to:"body"},[t.visible?(y(),T("div",{key:0,ref_key:"dropdownContent",ref:l,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":m(r).theme.current,tabindex:"-1",onClick:_[4]||(_[4]=Ye(()=>{},["stop"])),onKeydown:v},[g("div",x5,[g("div",T5,[g("div",O5,L(m(s)("File Size")),1),g("div",$5,[g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="all"}]),onClick:_[0]||(_[0]=Ye(C=>u("size-all"),["stop"]))},[g("span",null,L(m(s)("All Files")),1),t.sizeFilter==="all"?(y(),T("div",k5,[..._[5]||(_[5]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2),g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="small"}]),onClick:_[1]||(_[1]=Ye(C=>u("size-small"),["stop"]))},[g("span",null,L(m(s)("Small (< 1MB)")),1),t.sizeFilter==="small"?(y(),T("div",A5,[..._[6]||(_[6]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2),g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="medium"}]),onClick:_[2]||(_[2]=Ye(C=>u("size-medium"),["stop"]))},[g("span",null,L(m(s)("Medium (1-10MB)")),1),t.sizeFilter==="medium"?(y(),T("div",P5,[..._[7]||(_[7]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2),g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="large"}]),onClick:_[3]||(_[3]=Ye(C=>u("size-large"),["stop"]))},[g("span",null,L(m(s)("Large (> 10MB)")),1),t.sizeFilter==="large"?(y(),T("div",R5,[..._[8]||(_[8]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2)])])])],40,S5)):ue("",!0)]))],64))}});function Qg(t,e=40){const n=t.match(/^([^:]+:\/\/)(.*)$/);if(!n)return t;const i=n[1],o=n[2]??"",r=o.split("/").filter(Boolean),s=r.pop();if(!s)return i+o;let a=`${i}${r.join("/")}${r.length?"/":""}${s}`;if(a.length<=e)return a;const l=s.split(/\.(?=[^\.]+$)/),c=l[0]??"",u=l[1]??"",d=c.length>10?`${c.slice(0,6)}...${c.slice(-5)}`:c,h=u?`${d}.${u}`:d;return a=`${i}${r.join("/")}${r.length?"/":""}${h}`,a.length>e&&(a=`${i}.../${h}`),a}async function Xg(t){try{await navigator.clipboard.writeText(t)}catch{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}async function Wo(t){await Xg(t)}async function M5(t){await Xg(t)}const D5={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function F5(t,e){return y(),T("svg",D5,[...e[0]||(e[0]=[g("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 Jg={render:F5},L5=["title"],j5={class:"vuefinder__search-modal__result-icon"},N5={class:"vuefinder__search-modal__result-content"},U5={class:"vuefinder__search-modal__result-name"},z5={key:0,class:"vuefinder__search-modal__result-size"},V5=["title"],B5=["title"],H5=["data-item-dropdown","data-theme"],q5={class:"vuefinder__search-modal__item-dropdown-content"},W5=Ce({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","preview"],setup(t,{emit:e}){const n=t,i=e,o=je(),{t:r}=o.i18n,s=H(null);let a=null,l=null,c=[],u=null;Oe(()=>n.activeDropdown,k=>{a&&(a(),a=null),l&&(c.forEach(O=>{O===window?window.removeEventListener("scroll",l,!0):O.removeEventListener("scroll",l,!0)}),l=null,c=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null),k===n.item.path&&s.value&&Ge(()=>{C(n.item.path,s.value),h(),v()})});const d=k=>{const O=[];let K=k;for(;K&&K!==document.body&&K!==document.documentElement;){const D=window.getComputedStyle(K),P=D.overflow+D.overflowX+D.overflowY;(P.includes("scroll")||P.includes("auto"))&&O.push(K),K=K.parentElement}return O},h=()=>{if(n.activeDropdown!==n.item.path)return;const k=d(s.value);c=[window,...k],l=()=>{n.activeDropdown===n.item.path&&i("toggleItemDropdown",n.item.path,new MouseEvent("click"))};const O=l;O&&c.forEach(K=>{K===window?window.addEventListener("scroll",O,!0):K.addEventListener("scroll",O,!0)})},v=()=>{n.activeDropdown===n.item.path&&(u=k=>{if(n.activeDropdown!==n.item.path)return;const O=k.target;if(!O)return;const K=document.querySelector(`[data-item-dropdown="${n.item.path}"]`);if(K&&K.contains(O)||s.value&&s.value.contains(O))return;const D=o.root;if(D&&D.contains(O)){i("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}const P=document.querySelector(".vuefinder__modal-layout");if(P&&P.contains(O)){i("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}i("toggleItemDropdown",n.item.path,new MouseEvent("click"))},setTimeout(()=>{u&&(document.addEventListener("mousedown",u,!0),document.addEventListener("touchstart",u,!0))},100))};Ct(()=>{a&&(a(),a=null),l&&(c.forEach(k=>{k===window?window.removeEventListener("scroll",l,!0):k.removeEventListener("scroll",l,!0)}),l=null,c=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null)});const f=k=>n.expandedPaths.has(k),p=k=>k.type==="dir"||!k.file_size?"":uu(k.file_size),_=(k,O)=>{O.stopPropagation(),i("toggleItemDropdown",k,O)},C=async(k,O)=>{const K=document.querySelector(`[data-item-dropdown="${k}"]`);if(!(!K||!O)&&(await Ge(),!(!K||!O))){Object.assign(K.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:D,y:P}=await Zi(O,K,{placement:"left-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(K.style,{left:`${D}px`,top:`${P}px`}),requestAnimationFrame(()=>{K&&Object.assign(K.style,{opacity:"1",transform:"translateY(0)"})})}catch(D){console.warn("Floating UI initial positioning error:",D);return}try{a=oc(O,K,async()=>{if(!(!O||!K))try{const{x:D,y:P}=await Zi(O,K,{placement:"left-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(K.style,{left:`${D}px`,top:`${P}px`})}catch(D){console.warn("Floating UI positioning error:",D)}})}catch(D){console.warn("Floating UI autoUpdate setup error:",D),a=null}}},w=k=>{i("update:selectedItemDropdownOption",k)},E=async k=>{await Wo(k.path),i("copyPath",k)},b=k=>{i("openContainingFolder",k)},S=k=>{i("preview",k)},x=k=>{if(!n.activeDropdown)return;const O=["copy-path","open-folder","preview"],K=n.selectedItemDropdownOption,D=O.findIndex(P=>K?.includes(P));if(k.key==="ArrowDown"){k.preventDefault();const P=(D+1)%O.length;i("update:selectedItemDropdownOption",`${O[P]||""}-${n.activeDropdown}`)}else if(k.key==="ArrowUp"){k.preventDefault();const P=D<=0?O.length-1:D-1;i("update:selectedItemDropdownOption",`${O[P]||""}-${n.activeDropdown}`)}else k.key==="Enter"?(k.preventDefault(),K&&(K.includes("copy-path")?E(n.item):K.includes("open-folder")?b(n.item):K.includes("preview")&&S(n.item))):k.key==="Escape"&&(k.preventDefault(),i("update:selectedItemDropdownOption",null))};return(k,O)=>(y(),T("div",{class:Ae(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":t.index===t.selectedIndex}]),title:t.item.basename,onClick:O[9]||(O[9]=K=>i("select",t.index))},[g("div",j5,[t.item.type==="dir"?(y(),ne(m(Nn),{key:0})):(y(),ne(m(qo),{key:1}))]),g("div",N5,[g("div",U5,[Ke(L(t.item.basename)+" ",1),p(t.item)?(y(),T("span",z5,L(p(t.item)),1)):ue("",!0)]),g("div",{class:"vuefinder__search-modal__result-path",title:t.item.path,onClick:O[0]||(O[0]=Ye(K=>{i("select",t.index),i("togglePathExpansion",t.item.path)},["stop"]))},L(f(t.item.path)?t.item.path:m(Qg)(t.item.path)),9,V5)]),g("button",{ref_key:"buttonElementRef",ref:s,class:"vuefinder__search-modal__result-actions",title:m(r)("More actions"),onClick:O[1]||(O[1]=K=>{i("selectWithDropdown",t.index),_(t.item.path,K)})},[j(m(Jg),{class:"vuefinder__search-modal__result-actions-icon"})],8,B5),(y(),ne(ws,{to:"body"},[t.activeDropdown===t.item.path?(y(),T("div",{key:0,"data-item-dropdown":t.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":m(o).theme.current,tabindex:"-1",onClick:O[8]||(O[8]=Ye(()=>{},["stop"])),onKeydown:x},[g("div",q5,[g("div",{class:Ae(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`copy-path-${t.item.path}`}]),onClick:O[2]||(O[2]=K=>{w(`copy-path-${t.item.path}`),E(t.item)}),onFocus:O[3]||(O[3]=K=>w(`copy-path-${t.item.path}`))},[j(m(hu),{class:"vuefinder__search-modal__item-dropdown-icon"}),g("span",null,L(m(r)("Copy Path")),1)],34),g("div",{class:Ae(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`open-folder-${t.item.path}`}]),onClick:O[4]||(O[4]=K=>{w(`open-folder-${t.item.path}`),b(t.item)}),onFocus:O[5]||(O[5]=K=>w(`open-folder-${t.item.path}`))},[j(m(Nn),{class:"vuefinder__search-modal__item-dropdown-icon"}),g("span",null,L(m(r)("Open Containing Folder")),1)],34),g("div",{class:Ae(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`preview-${t.item.path}`}]),onClick:O[6]||(O[6]=K=>{w(`preview-${t.item.path}`),S(t.item)}),onFocus:O[7]||(O[7]=K=>w(`preview-${t.item.path}`))},[j(m(qo),{class:"vuefinder__search-modal__item-dropdown-icon"}),g("span",null,L(m(r)("Preview")),1)],34)])],40,H5)):ue("",!0)]))],10,L5))}}),K5={key:0,class:"vuefinder__search-modal__searching"},Y5={class:"vuefinder__search-modal__loading-icon"},G5={key:1,class:"vuefinder__search-modal__no-results"},Q5={key:2,class:"vuefinder__search-modal__results-list"},X5={class:"vuefinder__search-modal__results-header"},xi=60,Ip=5,J5=Ce({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","preview"],setup(t,{expose:e,emit:n}){const i=t,o=n,r=je(),{t:s}=r.i18n,a=In("scrollableContainer"),l=te(()=>i.searchResults.length>0),c=te(()=>i.searchResults.length),u=H(0),d=H(600),h=te(()=>i.searchResults.length*xi),v=te(()=>{const E=Math.max(0,Math.floor(u.value/xi)-Ip),b=Math.min(i.searchResults.length,Math.ceil((u.value+d.value)/xi)+Ip);return{start:E,end:b}}),f=te(()=>{const{start:E,end:b}=v.value;return i.searchResults.slice(E,b).map((S,x)=>({item:S,index:E+x,top:(E+x)*xi}))}),p=E=>{const b=E.target;u.value=b.scrollTop},_=()=>{a.value&&(d.value=a.value.clientHeight)},C=()=>{if(i.selectedIndex>=0&&a.value){const E=i.selectedIndex*xi,b=E+xi,S=a.value.scrollTop,x=a.value.clientHeight,k=S+x;let O=S;E<S?O=E:b>k&&(O=b-x),O!==S&&a.value.scrollTo({top:O,behavior:"smooth"})}},w=()=>{a.value&&(a.value.scrollTop=0,u.value=0)};return et(()=>{_(),window.addEventListener("resize",_)}),Ct(()=>{window.removeEventListener("resize",_)}),Oe(()=>a.value,()=>{_()}),e({scrollSelectedIntoView:C,resetScroll:w,getContainerHeight:()=>d.value,scrollTop:()=>u.value}),(E,b)=>(y(),T("div",{class:Ae(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":t.resultsEnter}])},[t.isSearching?(y(),T("div",K5,[g("div",Y5,[j(m(Zs),{class:"vuefinder__search-modal__loading-icon"})]),g("span",null,L(m(s)("Searching...")),1)])):l.value?(y(),T("div",Q5,[g("div",X5,[g("span",null,L(m(s)("Found %s results",c.value)),1)]),g("div",{ref_key:"scrollableContainer",ref:a,class:"vuefinder__search-modal__results-scrollable",onScroll:p},[g("div",{class:"vuefinder__search-modal__results-items",style:At({height:`${h.value}px`,position:"relative"})},[(y(!0),T(Ie,null,He(f.value,S=>(y(),T("div",{key:S.item.path,style:At({position:"absolute",top:`${S.top}px`,left:"0",width:"100%",height:`${xi}px`})},[j(W5,{item:S.item,index:S.index,"selected-index":t.selectedIndex,"expanded-paths":t.expandedPaths,"active-dropdown":t.activeDropdown,"selected-item-dropdown-option":t.selectedItemDropdownOption,onSelect:b[0]||(b[0]=x=>o("selectResultItem",x)),onSelectWithDropdown:b[1]||(b[1]=x=>o("selectResultItemWithDropdown",x)),onTogglePathExpansion:b[2]||(b[2]=x=>o("togglePathExpansion",x)),onToggleItemDropdown:b[3]||(b[3]=(x,k)=>o("toggleItemDropdown",x,k)),"onUpdate:selectedItemDropdownOption":b[4]||(b[4]=x=>o("update:selectedItemDropdownOption",x)),onCopyPath:b[5]||(b[5]=x=>o("copyPath",x)),onOpenContainingFolder:b[6]||(b[6]=x=>o("openContainingFolder",x)),onPreview:b[7]||(b[7]=x=>o("preview",x))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(y(),T("div",G5,[g("span",null,L(m(s)("No results found")),1)]))],2))}}),Z5={class:"vuefinder__search-modal"},eL={class:"vuefinder__search-modal__content"},tL={class:"vuefinder__search-modal__search-bar"},nL={class:"vuefinder__search-modal__search-location"},iL=["title"],oL=["disabled"],rL={key:0,class:"vuefinder__search-modal__folder-selector"},sL={class:"vuefinder__search-modal__folder-selector-content"},aL={key:1,class:"vuefinder__search-modal__instructions"},lL={class:"vuefinder__search-modal__instructions-text"},yu=Ce({name:"ModalSearch",__name:"ModalSearch",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=H(null),s=H(null),a=H(null),l=Yg("",300),c=H([]),u=H(!1),d=H(-1),h=H(!1),v=H(!1),f=H(null),p=H("all"),_=H(!1),C=H(`size-${p.value}`),w=H(null),E=H(new Set),b=H(null),S=ke(o.path),x=A=>{E.value.has(A)?E.value.delete(A):E.value.add(A)},k=(A,Q)=>{Q&&typeof Q.stopPropagation=="function"&&Q.stopPropagation(),b.value===A?b.value=null:b.value=A},O=()=>{b.value=null},K=A=>{try{const Q=A.dir||`${A.storage}://`;e.adapter.open(Q),e.modal.close(),O()}catch{n.error(i("Failed to open containing folder"))}},D=A=>{e.modal.open(lr,{storage:S?.value?.storage??"local",item:A}),O()},P=A=>{d.value=A,O()},U=A=>{d.value=A},M=async A=>{await Wo(A.path),O()};Oe(l,async A=>{A.trim()?(await q(A.trim()),d.value=0):(c.value=[],u.value=!1,d.value=-1)}),Oe(p,async A=>{C.value=`size-${A}`,l.value.trim()&&!v.value&&(await q(l.value.trim()),d.value=0)}),Oe(_,async()=>{l.value.trim()&&!v.value&&(await q(l.value.trim()),d.value=0)});const q=async A=>{if(A){u.value=!0;try{const Q=f.value?.path||S?.value?.path,z=await e.adapter.search({path:Q,filter:A,deep:_.value,size:p.value});c.value=z||[],u.value=!1}catch(Q){n.error(Yt(Q,i("Search failed"))),c.value=[],u.value=!1}}};et(()=>{document.addEventListener("click",I),C.value=`size-${p.value}`});const le=()=>{v.value?(v.value=!1,l.value.trim()&&(q(l.value.trim()),d.value=0)):(h.value=!1,v.value=!0)},de=A=>{A&&(f.value=A)},Y=A=>{A&&(de(A),v.value=!1,l.value.trim()&&(q(l.value.trim()),d.value=0))};Ct(()=>{document.removeEventListener("click",I),s.value&&s.value.cleanup()});const I=A=>{const Q=A.target;if(h.value&&(Q.closest(".vuefinder__search-modal__dropdown")||(h.value=!1,Ge(()=>{r.value&&r.value.focus()}))),b.value){const z=Q.closest(".vuefinder__search-modal__item-dropdown"),ie=Q.closest(".vuefinder__search-modal__result-item");!z&&!ie&&O()}};return(A,Q)=>(y(),ne(tn,{class:"vuefinder__search-modal-layout"},{default:we(()=>[g("div",Z5,[j(pn,{icon:m(_u),title:m(i)("Search files")},null,8,["icon","title"]),g("div",eL,[g("div",tL,[j(b5,{ref_key:"searchInputRef",ref:r,modelValue:m(l),"onUpdate:modelValue":Q[0]||(Q[0]=z=>ys(l)?l.value=z:null),"is-searching":u.value,disabled:v.value},null,8,["modelValue","is-searching","disabled"]),j(I5,{ref_key:"searchOptionsDropdownRef",ref:s,visible:h.value,"onUpdate:visible":Q[1]||(Q[1]=z=>h.value=z),"size-filter":p.value,"onUpdate:sizeFilter":Q[2]||(Q[2]=z=>p.value=z),"selected-option":C.value,"onUpdate:selectedOption":Q[3]||(Q[3]=z=>C.value=z),disabled:v.value},null,8,["visible","size-filter","selected-option","disabled"])]),g("div",{class:"vuefinder__search-modal__options",onClick:Q[7]||(Q[7]=Ye(()=>{},["stop"]))},[g("div",nL,[g("button",{class:Ae(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":v.value}]),onClick:Ye(le,["stop"])},[j(m(Nn),{class:"vuefinder__search-modal__location-icon"}),g("span",{class:"vuefinder__search-modal__location-text",title:f.value?.path||m(S).path},L(m(Qg)(f.value?.path||m(S).path)),9,iL),Q[10]||(Q[10]=g("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[g("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)]),g("label",{class:"vuefinder__search-modal__deep-search",onClick:Q[6]||(Q[6]=Ye(()=>{},["stop"]))},[it(g("input",{"onUpdate:modelValue":Q[4]||(Q[4]=z=>_.value=z),type:"checkbox",disabled:v.value,class:"vuefinder__search-modal__checkbox",onClick:Q[5]||(Q[5]=Ye(()=>{},["stop"]))},null,8,oL),[[Es,_.value]]),g("span",null,L(m(i)("Include subfolders")),1)])]),v.value?(y(),T("div",rL,[g("div",sL,[j(vu,{modelValue:f.value,"onUpdate:modelValue":[Q[8]||(Q[8]=z=>f.value=z),de],"show-pinned-folders":!0,"current-path":m(S),onSelectAndClose:Y},null,8,["modelValue","current-path"])])])):ue("",!0),!m(l).trim()&&!v.value?(y(),T("div",aL,[g("p",lL,L(m(i)("Start typing to search files. Use options to filter or include subfolders.")),1)])):ue("",!0),m(l).trim()&&!v.value?(y(),ne(J5,{key:2,ref_key:"searchResultsListRef",ref:a,"search-results":c.value,"is-searching":u.value,"selected-index":d.value,"expanded-paths":E.value,"active-dropdown":b.value,"selected-item-dropdown-option":w.value,"results-enter":!0,onSelectResultItem:P,onSelectResultItemWithDropdown:U,onTogglePathExpansion:x,onToggleItemDropdown:k,"onUpdate:selectedItemDropdownOption":Q[9]||(Q[9]=z=>w.value=z),onCopyPath:M,onOpenContainingFolder:K,onPreview:D},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):ue("",!0)])])]),_:1}))}}),cL={props:{on:{type:String,required:!0}},setup(t,{emit:e,slots:n}){const i=je(),o=H(!1),{t:r}=i.i18n;let s=null;const a=()=>{s&&clearTimeout(s),o.value=!0,s=setTimeout(()=>{o.value=!1},2e3)};return et(()=>{i.emitter.on(t.on,a)}),Ct(()=>{s&&clearTimeout(s)}),{shown:o,t:r}}},uL=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},dL={key:1};function hL(t,e,n,i,o,r){return y(),T("div",{class:Ae(["vuefinder__action-message",{"vuefinder__action-message--hidden":!i.shown}])},[t.$slots.default?Ve(t.$slots,"default",{key:0}):(y(),T("span",dL,L(i.t("Saved.")),1))],2)}const Mp=uL(cL,[["render",hL]]),pL=[{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"}],fL={class:"vuefinder__settings-modal__content"},mL={class:"vuefinder__settings-modal__main"},vL={class:"vuefinder__settings-modal__sections"},gL={key:0,class:"vuefinder__settings-modal__section"},_L={for:"theme",class:"vuefinder__settings-modal__label"},yL={class:"vuefinder__settings-modal__input-group"},bL=["value"],wL=["value"],EL={key:1,class:"vuefinder__settings-modal__section"},CL={for:"language",class:"vuefinder__settings-modal__label"},SL={class:"vuefinder__settings-modal__input-group"},xL=["value"],TL={class:"vuefinder__settings-modal__reset-section"},OL={class:"vuefinder__settings-modal__reset-content"},$L={class:"vuefinder__settings-modal__reset-title"},kL={class:"vuefinder__settings-modal__reset-description"},Zg=Ce({__name:"ModalSettings",setup(t){const e=je(),{enabled:n}=Tn(),i=e.config,{clearStore:o}=e.storage,{t:r,localeAtom:s}=e.i18n,a=ke(s),l=te({get:()=>String(a.value||"en"),set:p=>s.set(p||"en")}),c=ke(i.state),u=te(()=>c.value.theme||"silver"),d=async()=>{i.reset(),o(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},h=p=>{i.set("theme",p),e.emitter.emit("vf-theme-saved")},{i18n:v}=ko("VueFinderOptions"),f=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(([p])=>Object.keys(v).includes(p)));return(p,_)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:_[2]||(_[2]=C=>m(e).modal.close())},L(m(r)("Close")),1)]),default:we(()=>[g("div",fL,[j(pn,{icon:m(Gg),title:m(r)("Settings")},null,8,["icon","title"]),g("div",mL,[g("div",vL,[m(n)("theme")?(y(),T("div",gL,[g("label",_L,[Ke(L(m(r)("Theme"))+" ",1),j(Mp,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:we(()=>[Ke(L(m(r)("Saved.")),1)]),_:1})]),g("div",yL,[g("select",{id:"theme",value:u.value,class:"vuefinder__settings-modal__select",onChange:_[0]||(_[0]=C=>h(C.target?.value))},[(y(!0),T(Ie,null,He(m(pL),C=>(y(),T("option",{key:C.name,value:C.name},L(C.displayName),9,wL))),128))],40,bL)])])):ue("",!0),Object.keys(m(f)).length>1?(y(),T("div",EL,[g("label",CL,[Ke(L(m(r)("Language"))+" ",1),j(Mp,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:we(()=>[Ke(L(m(r)("Saved.")),1)]),_:1})]),g("div",SL,[it(g("select",{id:"language","onUpdate:modelValue":_[1]||(_[1]=C=>l.value=C),class:"vuefinder__settings-modal__select"},[(y(!0),T(Ie,null,He(m(f),(C,w)=>(y(),T("option",{key:w,value:w},L(C),9,xL))),128))],512),[[Za,l.value]])])])):ue("",!0)]),g("div",TL,[g("div",OL,[g("div",$L,L(m(r)("Reset")),1),g("div",kL,L(m(r)("Reset all settings to default")),1)]),g("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:d},L(m(r)("Reset Settings")),1)])])])]),_:1}))}}),Lt={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 AL(){const t=je(),e=Gt(t),n=t.fs,i=t.config,{enabled:o}=Tn(),r=ke(n.path),s=ke(n.selectedItems),a=l=>{if(l.code===Lt.ESCAPE&&(t.modal.close(),t.root.focus()),!t.modal.visible){if(l.metaKey&&l.code===Lt.KEY_R&&!l.shiftKey&&(t.adapter.invalidateListQuery(r.value.path),t.adapter.open(r.value.path),l.preventDefault()),l.metaKey&&l.shiftKey&&l.code===Lt.KEY_R&&o("rename")&&s.value.length===1&&(t.modal.open(Qs,{items:s.value}),l.preventDefault()),l.code===Lt.DELETE&&s.value.length!==0&&t.modal.open(Gs,{items:s.value}),l.metaKey&&l.code===Lt.BACKSLASH&&t.modal.open(Bg),l.metaKey&&l.code===Lt.KEY_F&&o("search")&&(t.modal.open(yu),l.preventDefault()),l.metaKey&&l.code===Lt.KEY_E&&(i.toggle("showTreeView"),l.preventDefault()),l.metaKey&&l.code===Lt.KEY_S&&(t.modal.open(Zg),l.preventDefault()),l.metaKey&&l.code===Lt.ENTER&&(i.toggle("fullScreen"),t.root.focus()),l.metaKey&&l.code===Lt.KEY_A&&(n.selectAll(t.selectionMode||"multiple",t),l.preventDefault()),l.code===Lt.SPACE&&s.value.length===1&&s.value[0]?.type!=="dir"&&t.modal.open(lr,{storage:n.path.get().storage,item:s.value[0]}),l.metaKey&&l.code===Lt.KEY_C&&o("copy")){if(s.value.length===0){e.error(t.i18n.t("No items selected"));return}n.setClipboard("copy",new Set(s.value.map(c=>c.path))),e.success(s.value.length===1?t.i18n.t("Item copied to clipboard"):t.i18n.t("%s items copied to clipboard",s.value.length)),l.preventDefault()}if(l.metaKey&&l.code===Lt.KEY_X&&o("copy")){if(s.value.length===0){e.error(t.i18n.t("No items selected"));return}n.setClipboard("cut",new Set(s.value.map(c=>c.path))),e.success(s.value.length===1?t.i18n.t("Item cut to clipboard"):t.i18n.t("%s items cut to clipboard",s.value.length)),l.preventDefault()}if(l.metaKey&&l.code===Lt.KEY_V&&o("copy")){if(n.getClipboard().items.size===0){e.error(t.i18n.t("No items in clipboard"));return}if(n.getClipboard().path===n.path.get().path){e.error(t.i18n.t("Cannot paste items to the same directory"));return}if(n.getClipboard().type==="cut"){t.modal.open(uo,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}}),n.clearClipboard();return}if(n.getClipboard().type==="copy"){t.modal.open(gu,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}});return}l.preventDefault()}}};et(async()=>{if(await Ge(),!t.root){console.warn("app.root is not available. Event listeners will not be attached.");return}t.root.addEventListener("keydown",a)}),bs(()=>{t.root&&t.root.removeEventListener("keydown",a)})}function PL(){const t=H(!1),e=H([]);return{isDraggingExternal:t,externalFiles:e,handleDragEnter:n=>{n.preventDefault(),n.stopPropagation();const i=n.dataTransfer?.items;i&&Array.from(i).some(o=>o.kind==="file")&&(t.value=!0,n.isExternalDrag=!0)},handleDragOver:n=>{t.value&&n.dataTransfer&&(n.dataTransfer.dropEffect="copy",n.preventDefault(),n.stopPropagation())},handleDragLeave:n=>{n.preventDefault();const i=n.currentTarget.getBoundingClientRect(),o=n.clientX,r=n.clientY;(o<i.left||o>i.right||r<i.top||r>i.bottom)&&(t.value=!1)},handleDrop:async n=>{n.preventDefault(),n.stopPropagation(),t.value=!1;const i=n.dataTransfer?.items;if(i){const o=Array.from(i).filter(r=>r.kind==="file");if(o.length>0){e.value=[];for(const r of o){const s=r.webkitGetAsEntry?.();if(s)await du((a,l)=>{e.value.push({name:l.name,size:l.size,type:l.type,lastModified:new Date(l.lastModified),file:l})},s);else{const a=r.getAsFile();a&&e.value.push({name:a.name,size:a.size,type:a.type,lastModified:new Date(a.lastModified),file:a})}}return e.value}}return[]},clearExternalFiles:()=>{e.value=[]}}}const RL={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 IL(t,e){return y(),T("svg",RL,[...e[0]||(e[0]=[g("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 e_={render:IL},ML={class:"vuefinder__new-folder-modal__content"},DL={class:"vuefinder__new-folder-modal__form"},FL={class:"vuefinder__new-folder-modal__description"},LL=["placeholder"],bu=Ce({__name:"ModalNewFolder",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(""),a=()=>{s.value!==""&&e.adapter.createFolder({path:r.value.path,name:s.value}).then(l=>{n.success(i("%s is created.",s.value)),e.fs.setFiles(l.files),e.modal.close()}).catch(l=>{n.error(Yt(l,i("Failed to create folder")))})};return(l,c)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:a},L(m(i)("Create")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=u=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(e_),title:m(i)("New Folder")},null,8,["icon","title"]),g("div",ML,[g("div",DL,[g("p",FL,L(m(i)("Create a new folder")),1),it(g("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),class:"vuefinder__new-folder-modal__input",placeholder:m(i)("Folder Name"),type:"text",autofocus:"",onKeyup:ho(a,["enter"])},null,40,LL),[[Go,s.value]])])])])]),_:1}))}}),jL={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 NL(t,e){return y(),T("svg",jL,[...e[0]||(e[0]=[g("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 t_={render:NL},UL={class:"vuefinder__new-file-modal__content"},zL={class:"vuefinder__new-file-modal__form"},VL={class:"vuefinder__new-file-modal__description"},BL=["placeholder"],n_=Ce({__name:"ModalNewFile",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(""),a=()=>{s.value!==""&&e.adapter.createFile({path:r.value.path,name:s.value}).then(l=>{n.success(i("%s is created.",s.value)),e.fs.setFiles(l.files),e.modal.close()}).catch(l=>{n.error(Yt(l,i("Failed to create file")))})};return(l,c)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:a},L(m(i)("Create")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=u=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(t_),title:m(i)("New File")},null,8,["icon","title"]),g("div",UL,[g("div",zL,[g("p",VL,L(m(i)("Create a new file")),1),it(g("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),class:"vuefinder__new-file-modal__input",placeholder:m(i)("File Name"),type:"text",onKeyup:ho(a,["enter"])},null,40,BL),[[Go,s.value]])])])])]),_:1}))}}),HL={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 qL(t,e){return y(),T("svg",HL,[...e[0]||(e[0]=[g("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 i_={render:qL};function Xl(t,e=14){const n=`((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e+1},})([\\w\\W]{8,}))`;return t.replace(new RegExp(n),"$2..$4")}const WL={class:"vuefinder__upload-modal__content relative"},KL={class:"vuefinder__upload-modal__target-section"},YL={class:"vuefinder__upload-modal__target-label"},GL={class:"vuefinder__upload-modal__target-container"},QL={class:"vuefinder__upload-modal__target-path"},XL={class:"vuefinder__upload-modal__target-storage"},JL={key:0,class:"vuefinder__upload-modal__target-folder"},ZL={class:"vuefinder__upload-modal__target-badge"},e4={class:"vuefinder__upload-modal__drag-hint"},t4={class:"vuefinder__upload-modal__file-list vf-scrollbar"},n4=["textContent"],i4={class:"vuefinder__upload-modal__file-info"},o4={class:"vuefinder__upload-modal__file-name hidden md:block"},r4={class:"vuefinder__upload-modal__file-name md:hidden"},s4={key:0,class:"ml-auto"},a4=["title","disabled","onClick"],l4={key:0,class:"py-2"},c4=["aria-expanded"],u4={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},d4=["disabled"],h4=["aria-expanded"],p4={key:0,class:"vuefinder__upload-actions__menu"},wu=Ce({__name:"ModalUpload",setup(t){const e=je(),{t:n}=e.i18n,i=e.fs,o=ke(i.path),r=H(o.value),s=H(!1),a=()=>{const Y=r.value.path;if(!Y)return{storage:"local",path:""};if(Y.endsWith("://"))return{storage:Y.replace("://",""),path:""};const I=Y.split("://");return{storage:I[0]||"local",path:I[1]||""}},l=Y=>{Y&&(r.value=Y)},c=Y=>{Y&&(r.value=Y,s.value=!1)},{container:u,internalFileInput:d,internalFolderInput:h,pickFiles:v,queue:f,message:p,uploading:_,hasFilesInDropArea:C,definitions:w,openFileSelector:E,upload:b,cancel:S,remove:x,clear:k,close:O,getClassNameForEntry:K,getIconForEntry:D,addExternalFiles:P}=Wg(e.customUploader),U=()=>{b(r.value)};et(()=>{e.emitter.on("vf-external-files-dropped",Y=>{P(Y)})}),Ct(()=>{e.emitter.off("vf-external-files-dropped")});const M=H(!1),q=H(null),le=H(null),de=Y=>{if(!M.value)return;const I=Y.target,A=q.value?.contains(I)??!1,Q=le.value?.contains(I)??!1;!A&&!Q&&(M.value=!1)};return et(()=>document.addEventListener("click",de)),Ct(()=>document.removeEventListener("click",de)),(Y,I)=>(y(),ne(tn,{"show-drag-overlay":m(C),"drag-overlay-text":m(n)("Drag and drop the files/folders to here.")},{buttons:we(()=>[g("div",{ref_key:"actionsMenuMobileRef",ref:q,class:"relative mb-2 w-full sm:hidden"},[g("div",{class:Ae(["vuefinder__upload-actions","vuefinder__upload-actions--block",M.value?"vuefinder__upload-actions--ring":""])},[g("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:I[3]||(I[3]=A=>m(E)())},L(m(n)("Select Files")),1),g("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":M.value?"true":"false",onClick:I[4]||(I[4]=Ye(A=>M.value=!M.value,["stop"]))},[...I[17]||(I[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[g("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,c4)],2),M.value?(y(),T("div",u4,[g("div",{class:"vuefinder__upload-actions__item",onClick:I[5]||(I[5]=A=>{m(E)(),M.value=!1})},L(m(n)("Select Files")),1),g("div",{class:"vuefinder__upload-actions__item",onClick:I[6]||(I[6]=A=>{m(h)?.click(),M.value=!1})},L(m(n)("Select Folders")),1),I[18]||(I[18]=g("div",{class:"vuefinder__upload-actions__separator"},null,-1)),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[7]||(I[7]=A=>m(_)?null:(m(k)(!1),M.value=!1))},L(m(n)("Clear all")),3),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[8]||(I[8]=A=>m(_)?null:(m(k)(!0),M.value=!1))},L(m(n)("Clear only successful")),3)])):ue("",!0)],512),g("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:m(_)||!m(f).length,onClick:Ye(U,["prevent"])},L(m(n)("Upload")),9,d4),m(_)?(y(),T("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:I[9]||(I[9]=Ye((...A)=>m(S)&&m(S)(...A),["prevent"]))},L(m(n)("Cancel")),1)):(y(),T("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:I[10]||(I[10]=Ye((...A)=>m(O)&&m(O)(...A),["prevent"]))},L(m(n)("Close")),1)),g("div",{ref_key:"actionsMenuDesktopRef",ref:le,class:"relative mr-auto hidden sm:block"},[g("div",{class:Ae(["vuefinder__upload-actions",M.value?"vuefinder__upload-actions--ring":""])},[g("button",{ref_key:"pickFiles",ref:v,type:"button",class:"vuefinder__upload-actions__main"},L(m(n)("Select Files")),513),g("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":M.value?"true":"false",onClick:I[11]||(I[11]=Ye(A=>M.value=!M.value,["stop"]))},[...I[19]||(I[19]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[g("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,h4)],2),M.value?(y(),T("div",p4,[g("div",{class:"vuefinder__upload-actions__item",onClick:I[12]||(I[12]=A=>{m(E)(),M.value=!1})},L(m(n)("Select Files")),1),g("div",{class:"vuefinder__upload-actions__item",onClick:I[13]||(I[13]=A=>{m(h)?.click(),M.value=!1})},L(m(n)("Select Folders")),1),I[20]||(I[20]=g("div",{class:"vuefinder__upload-actions__separator"},null,-1)),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[14]||(I[14]=A=>m(_)?null:(m(k)(!1),M.value=!1))},L(m(n)("Clear all")),3),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[15]||(I[15]=A=>m(_)?null:(m(k)(!0),M.value=!1))},L(m(n)("Clear only successful")),3)])):ue("",!0)],512)]),default:we(()=>[g("div",null,[j(pn,{icon:m(i_),title:m(n)("Upload Files")},null,8,["icon","title"]),g("div",WL,[g("div",KL,[g("div",YL,L(m(n)("Target Directory")),1),g("div",GL,[g("div",{class:"vuefinder__upload-modal__target-display",onClick:I[0]||(I[0]=A=>s.value=!s.value)},[g("div",QL,[g("span",XL,L(a().storage)+"://",1),a().path?(y(),T("span",JL,L(a().path),1)):ue("",!0)]),g("span",ZL,L(m(n)("Browse")),1)])]),g("div",{class:Ae(["vuefinder__upload-modal__tree-selector",s.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[j(vu,{modelValue:r.value,"onUpdate:modelValue":[I[1]||(I[1]=A=>r.value=A),l],"show-pinned-folders":!0,onSelectAndClose:c},null,8,["modelValue"])],2)]),g("div",e4,L(m(n)("You can drag & drop files anywhere while this modal is open.")),1),g("div",{ref_key:"container",ref:u,class:"hidden"},null,512),g("div",t4,[(y(!0),T(Ie,null,He(m(f),A=>(y(),T("div",{key:A.id,class:"vuefinder__upload-modal__file-entry"},[g("span",{class:Ae(["vuefinder__upload-modal__file-icon",m(K)(A)])},[g("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:L(m(D)(A))},null,8,n4)],2),g("div",i4,[g("div",o4,L(m(Xl)(A.name,40))+" ("+L(A.size)+") ",1),g("div",r4,L(m(Xl)(A.name,16))+" ("+L(A.size)+") ",1),g("div",{class:Ae(["vuefinder__upload-modal__file-status",m(K)(A)])},[Ke(L(A.statusName)+" ",1),A.status===m(w).QUEUE_ENTRY_STATUS.UPLOADING?(y(),T("b",s4,L(A.percent),1)):ue("",!0)],2)]),g("button",{type:"button",class:Ae(["vuefinder__upload-modal__file-remove",m(_)?"disabled":""]),title:m(n)("Delete"),disabled:m(_),onClick:Q=>m(x)(A)},[...I[16]||(I[16]=[g("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"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,a4)]))),128)),m(f).length?ue("",!0):(y(),T("div",l4,L(m(n)("No files selected!")),1))]),m(p).length?(y(),ne(Ql,{key:0,error:"",onHidden:I[2]||(I[2]=A=>p.value="")},{default:we(()=>[Ke(L(m(p)),1)]),_:1})):ue("",!0)])]),g("input",{ref_key:"internalFileInput",ref:d,type:"file",multiple:"",class:"hidden"},null,512),g("input",{ref_key:"internalFolderInput",ref:h,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),f4={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 m4(t,e){return y(),T("svg",f4,[...e[0]||(e[0]=[g("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 o_={render:m4},v4={class:"vuefinder__unarchive-modal__content"},g4={class:"vuefinder__unarchive-modal__items"},_4={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"},y4={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"},b4={class:"vuefinder__unarchive-modal__item-name"},w4={class:"vuefinder__unarchive-modal__info"},Eu=Ce({__name:"ModalUnarchive",setup(t){const e=je(),n=Gt(e),i=e.fs,o=ke(i.path),{t:r}=e.i18n,s=H(e.modal.data.items[0]),a=H([]),l=()=>{e.adapter.unarchive({item:s.value.path,path:o.value.path}).then(c=>{n.success(r("The file unarchived.")),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,r("Failed to unarchive")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},L(m(r)("Unarchive")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[0]||(u[0]=d=>m(e).modal.close())},L(m(r)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(o_),title:m(r)("Unarchive")},null,8,["icon","title"]),g("div",v4,[g("div",g4,[(y(!0),T(Ie,null,He(a.value,d=>(y(),T("p",{key:d.path,class:"vuefinder__unarchive-modal__item"},[d.type==="dir"?(y(),T("svg",_4,[...u[1]||(u[1]=[g("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)])])):(y(),T("svg",y4,[...u[2]||(u[2]=[g("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)])])),g("span",b4,L(d.basename),1)]))),128)),g("p",w4,L(m(r)("The archive will be unarchived at"))+" ("+L(m(o).path)+") ",1)])])])]),_:1}))}}),E4={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function C4(t,e){return y(),T("svg",E4,[...e[0]||(e[0]=[g("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 r_={render:C4},S4={class:"vuefinder__archive-modal__content"},x4={class:"vuefinder__archive-modal__form"},T4={class:"vuefinder__archive-modal__files vf-scrollbar"},O4={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"},$4={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"},k4={class:"vuefinder__archive-modal__file-name"},A4=["placeholder"],Cu=Ce({__name:"ModalArchive",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(""),a=H(e.modal.data.items),l=()=>{a.value.length&&e.adapter.archive({path:r.value.path,items:a.value.map(({path:c,type:u})=>({path:c,type:u})),name:s.value}).then(c=>{n.success(i("The file(s) archived.")),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,i("Failed to archive files")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},L(m(i)("Archive")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=d=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(r_),title:m(i)("Archive the files")},null,8,["icon","title"]),g("div",S4,[g("div",x4,[g("div",T4,[(y(!0),T(Ie,null,He(a.value,d=>(y(),T("p",{key:d.path,class:"vuefinder__archive-modal__file"},[d.type==="dir"?(y(),T("svg",O4,[...u[2]||(u[2]=[g("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)])])):(y(),T("svg",$4,[...u[3]||(u[3]=[g("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)])])),g("span",k4,L(d.basename),1)]))),128))]),it(g("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>s.value=d),class:"vuefinder__archive-modal__input",placeholder:m(i)("Archive name. (.zip file will be created)"),type:"text",onKeyup:ho(l,["enter"])},null,40,A4),[[Go,s.value]])])])])]),_:1}))}}),P4={class:"vuefinder__about-modal__content"},R4={class:"vuefinder__about-modal__main"},I4={class:"vuefinder__about-modal__shortcuts"},M4={class:"vuefinder__about-modal__shortcut"},D4={key:0,class:"vuefinder__about-modal__shortcut"},F4={key:1,class:"vuefinder__about-modal__shortcut"},L4={class:"vuefinder__about-modal__shortcut"},j4={class:"vuefinder__about-modal__shortcut"},N4={key:2,class:"vuefinder__about-modal__shortcut"},U4={key:3,class:"vuefinder__about-modal__shortcut"},z4={key:4,class:"vuefinder__about-modal__shortcut"},V4={key:5,class:"vuefinder__about-modal__shortcut"},B4={class:"vuefinder__about-modal__shortcut"},H4={class:"vuefinder__about-modal__shortcut"},q4={key:6,class:"vuefinder__about-modal__shortcut"},W4={key:7,class:"vuefinder__about-modal__shortcut"},K4=Ce({__name:"ModalShortcuts",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n;return(o,r)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:r[0]||(r[0]=s=>m(e).modal.close())},L(m(i)("Close")),1)]),default:we(()=>[g("div",P4,[j(pn,{icon:m(Vg),title:m(i)("Shortcuts")},null,8,["icon","title"]),g("div",R4,[g("div",I4,[g("div",M4,[g("div",null,L(m(i)("Refresh")),1),r[1]||(r[1]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"R")],-1))]),m(n)("rename")?(y(),T("div",D4,[g("div",null,L(m(i)("Rename")),1),r[2]||(r[2]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"Shift"),Ke(" + "),g("kbd",null,"R")],-1))])):ue("",!0),m(n)("delete")?(y(),T("div",F4,[g("div",null,L(m(i)("Delete")),1),r[3]||(r[3]=g("kbd",null,"Del",-1))])):ue("",!0),g("div",L4,[g("div",null,L(m(i)("Escape")),1),r[4]||(r[4]=g("kbd",null,"Esc",-1))]),g("div",j4,[g("div",null,L(m(i)("Select All")),1),r[5]||(r[5]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"A")],-1))]),m(n)("copy")?(y(),T("div",N4,[g("div",null,L(m(i)("Cut")),1),r[6]||(r[6]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"X")],-1))])):ue("",!0),m(n)("copy")?(y(),T("div",U4,[g("div",null,L(m(i)("Copy")),1),r[7]||(r[7]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"C")],-1))])):ue("",!0),m(n)("copy")?(y(),T("div",z4,[g("div",null,L(m(i)("Paste")),1),r[8]||(r[8]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"V")],-1))])):ue("",!0),m(n)("search")?(y(),T("div",V4,[g("div",null,L(m(i)("Search")),1),r[9]||(r[9]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"F")],-1))])):ue("",!0),g("div",B4,[g("div",null,L(m(i)("Toggle Sidebar")),1),r[10]||(r[10]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"E")],-1))]),g("div",H4,[g("div",null,L(m(i)("Open Settings")),1),r[11]||(r[11]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"S")],-1))]),m(n)("fullscreen")?(y(),T("div",q4,[g("div",null,L(m(i)("Toggle Full Screen")),1),r[12]||(r[12]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"Enter")],-1))])):ue("",!0),m(n)("preview")?(y(),T("div",W4,[g("div",null,L(m(i)("Preview")),1),r[13]||(r[13]=g("kbd",null,"Space",-1))])):ue("",!0)])])])]),_:1}))}}),Y4={class:"vuefinder__menubar__container"},G4=["onClick","onMouseenter"],Q4={class:"vuefinder__menubar__label"},X4=["onMouseenter"],J4=["onClick"],Z4={key:0,class:"vuefinder__menubar__dropdown__label"},ej={key:1,class:"vuefinder__menubar__dropdown__checkmark"},tj=Ce({__name:"MenuBar",setup(t){const e=je(),n=Gt(e),{enabled:i}=Tn(),{t:o}=e?.i18n||{t:E=>E},r=e?.fs,s=e?.config,a=ke(s.state),l=ke(r.selectedItems),c=ke(r?.storages||[]),u=H(null),d=H(!1),h=te(()=>window.opener!==null||window.name!==""||window.history.length<=1),v=te(()=>[{id:"file",label:o("File"),items:[{id:"new-folder",label:o("New Folder"),action:()=>e?.modal?.open(bu,{items:l.value}),hidden:()=>!i("newfolder")},{id:"new-file",label:o("New File"),action:()=>e?.modal?.open(n_,{items:l.value}),hidden:()=>!i("newfile")},{type:"separator",hidden:()=>!i("newfolder")&&!i("newfile")||!i("upload")},{id:"upload",label:o("Upload"),action:()=>e?.modal?.open(wu,{items:l.value}),hidden:()=>!i("upload")},{type:"separator",hidden:()=>!i("search")},{id:"search",label:o("Search"),action:()=>e.modal.open(yu),hidden:()=>!i("search")},{type:"separator",hidden:()=>!i("archive")&&!i("unarchive")},{id:"archive",label:o("Archive"),action:()=>{l.value.length>0&&e?.modal?.open(Cu,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!i("archive")},{id:"unarchive",label:o("Unarchive"),action:()=>{l.value.length===1&&l.value[0]?.mime_type==="application/zip"&&e?.modal?.open(Eu,{items:l.value})},enabled:()=>l.value.length===1&&l.value[0]?.mime_type==="application/zip",hidden:()=>!i("unarchive")},{type:"separator",hidden:()=>!i("preview")},{id:"preview",label:o("Preview"),action:()=>{l.value.length===1&&l.value[0]?.type!=="dir"&&e?.modal?.open(lr,{storage:r?.path?.get()?.storage,item:l.value[0]})},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!i("preview")},...h.value?[{type:"separator"},{id:"exit",label:o("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:o("Edit"),items:[...e?.selectionMode==="multiple"?[{id:"select-all",label:o("Select All"),action:()=>r?.selectAll(e?.selectionMode||"multiple",e),enabled:()=>!0},{id:"deselect",label:o("Deselect All"),action:()=>r?.clearSelection(),enabled:()=>l.value.length>0},{type:"separator"}]:[],...i("copy")?[{id:"cut",label:o("Cut"),action:()=>{l.value.length>0&&r?.setClipboard("cut",new Set(l.value.map(E=>E.path)))},enabled:()=>l.value.length>0},{id:"copy",label:o("Copy"),action:()=>{l.value.length>0&&r?.setClipboard("copy",new Set(l.value.map(E=>E.path)))},enabled:()=>l.value.length>0},{id:"paste",label:o("Paste"),action:()=>{const E=r?.getClipboard();E?.items?.size>0&&e?.modal?.open(E.type==="cut"?uo:gu,{items:{from:Array.from(E.items),to:r?.path?.get()}})},enabled:()=>r?.getClipboard()?.items?.size>0}]:[],...i("move")?[{id:"move",label:o("Move files"),action:()=>{if(l.value.length>0){const E=e?.fs,b={storage:E?.path?.get()?.storage||"",path:E?.path?.get()?.path||"",type:"dir"};e?.modal?.open(uo,{items:{from:l.value,to:b}})}},enabled:()=>l.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:o("Copy Path"),action:async()=>{if(l.value.length===1){const E=l.value[0];await Wo(E.path)}else{const E=r?.path?.get();E?.path&&await Wo(E.path)}},enabled:()=>!0},{id:"copy-download-url",label:o("Copy Download URL"),action:async()=>{if(l.value.length===1){const E=l.value[0];r?.path?.get()?.storage;const b=e?.adapter?.getDownloadUrl({path:E.path});b&&await M5(b)}},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!i("rename")&&!i("delete")},{id:"rename",label:o("Rename"),action:()=>{l.value.length===1&&e?.modal?.open(Qs,{items:l.value})},enabled:()=>l.value.length===1,hidden:()=>!i("rename")},{id:"delete",label:o("Delete"),action:()=>{l.value.length>0&&e?.modal?.open(Gs,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!i("delete")}]},{id:"view",label:o("View"),items:[{id:"refresh",label:o("Refresh"),action:()=>{e.adapter.invalidateListQuery(r.path.get().path),e.adapter.open(r.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:o("Grid View"),action:()=>s?.set("view","grid"),enabled:()=>!0,checked:()=>a.value?.view==="grid"},{id:"list-view",label:o("List View"),action:()=>s?.set("view","list"),enabled:()=>!0,checked:()=>a.value?.view==="list"},{type:"separator"},{id:"tree-view",label:o("Tree View"),action:()=>s?.toggle("showTreeView"),enabled:()=>!0,checked:()=>a.value?.showTreeView},{id:"thumbnails",label:o("Show Thumbnails"),action:()=>s?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>a.value?.showThumbnails},{id:"show-hidden-files",label:o("Show Hidden Files"),action:()=>s?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>a.value?.showHiddenFiles},{type:"separator",hidden:()=>!i("fullscreen")},{id:"fullscreen",label:o("Full Screen"),action:()=>s?.toggle("fullScreen"),enabled:()=>i("fullscreen"),checked:()=>a.value?.fullScreen,hidden:()=>!i("fullscreen")},{type:"separator"},{id:"persist-path",label:o("Persist Path"),action:()=>{s?.toggle("persist"),e.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>a.value?.persist},{id:"metric-units",label:o("Metric Units"),action:()=>{s?.toggle("metricUnits"),e.filesize=s?.get("metricUnits")?Ng:uu,e.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>a.value?.metricUnits}]},{id:"go",label:o("Go"),items:[...i("history")?[{id:"forward",label:o("Forward"),action:()=>{r?.goForward();const E=r?.path?.get();E?.path&&e?.adapter.open(E.path)},enabled:()=>r?.canGoForward?.get()??!1},{id:"back",label:o("Back"),action:()=>{r?.goBack();const E=r?.path?.get();E?.path&&e?.adapter.open(E.path)},enabled:()=>r?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:o("Open containing folder"),action:()=>{const E=r?.path?.get();if(E?.breadcrumb&&E.breadcrumb.length>1){const b=E.breadcrumb[E.breadcrumb.length-2]?.path??`${E.storage}://`;e?.adapter.open(b)}},enabled:()=>{const E=r?.path?.get();return E?.breadcrumb&&E.breadcrumb.length>1}},{type:"separator"},...(c.value||[]).map(E=>({id:`storage-${E}`,label:E,action:()=>{const b=`${E}://`;e?.adapter.open(b)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:o("Go to Folder"),action:async()=>{const E=prompt(o("Enter folder path:"));if(E){if(!E.includes("://")){alert(o("Invalid path format. Path must be in format: storage://path/to/folder"));return}const b=E.indexOf("://"),S=E.slice(0,b);if(!c.value||!c.value.includes(S)){alert(o('Invalid storage. Storage "%s" is not available.',S));return}try{await e?.adapter.open(E)}catch(x){const k=Yt(x,o("Failed to navigate to folder"));n.error(k),e.fs.setLoading(!1)}}},enabled:()=>!0}]},{id:"help",label:o("Help"),items:[{id:"settings",label:o("Settings"),action:()=>e?.modal?.open(Zg),enabled:()=>!0},{id:"shortcuts",label:o("Shortcuts"),action:()=>e?.modal?.open(K4),enabled:()=>!0},{id:"about",label:o("About"),action:()=>e?.modal?.open(Bg),enabled:()=>!0}]}]),f=E=>{u.value===E?_():(u.value=E,d.value=!0)},p=E=>{d.value&&(u.value=E)},_=()=>{u.value=null,d.value=!1},C=E=>{_(),E()},w=E=>{E.target.closest(".vuefinder__menubar")||_()};return et(()=>{document.addEventListener("click",w)}),Ct(()=>{document.removeEventListener("click",w)}),(E,b)=>(y(),T("div",{class:"vuefinder__menubar",onClick:b[0]||(b[0]=Ye(()=>{},["stop"]))},[g("div",Y4,[(y(!0),T(Ie,null,He(v.value,S=>(y(),T("div",{key:S.id,class:Ae(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":u.value===S.id}]),onClick:x=>f(S.id),onMouseenter:x=>p(S.id)},[g("span",Q4,L(S.label),1),u.value===S.id?(y(),T("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:x=>p(S.id)},[(y(!0),T(Ie,null,He(S.items,x=>(y(),T("div",{key:x.id||x.type,class:Ae(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":x.type==="separator","vuefinder__menubar__dropdown__item--disabled":x.enabled&&!x.enabled(),"vuefinder__menubar__dropdown__item--checked":x.checked&&x.checked(),"vuefinder__menubar__dropdown__item--hidden":x.hidden&&x.hidden()}]),onClick:Ye(k=>x.type!=="separator"&&x.enabled&&x.enabled()?C(x.action):null,["stop"])},[x.type!=="separator"?(y(),T("span",Z4,L(x.label),1)):ue("",!0),x.checked&&x.checked()?(y(),T("span",ej," ✓ ")):ue("",!0)],10,J4))),128))],40,X4)):ue("",!0)],42,G4))),128))])]))}}),nj={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function ij(t,e){return y(),T("svg",nj,[...e[0]||(e[0]=[g("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 oj={render:ij},rj={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 sj(t,e){return y(),T("svg",rj,[...e[0]||(e[0]=[g("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 aj={render:sj},lj={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 cj(t,e){return y(),T("svg",lj,[...e[0]||(e[0]=[g("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 uj={render:cj},dj={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 hj(t,e){return y(),T("svg",dj,[...e[0]||(e[0]=[g("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 pj={render:hj},fj={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function mj(t,e){return y(),T("svg",fj,[...e[0]||(e[0]=[g("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 vj={render:mj},gj={class:"vuefinder__toolbar"},_j={class:"vuefinder__toolbar__actions"},yj=["title"],bj=["title"],wj=["title"],Ej=["title"],Cj=["title"],Sj=["title"],xj=["title"],Tj={class:"vuefinder__toolbar__controls"},Oj=["title"],$j={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},kj=["title"],Aj={class:"relative"},Pj={key:0,class:"vuefinder__toolbar__filter-indicator"},Rj={key:0,class:"vuefinder__toolbar__dropdown"},Ij={class:"vuefinder__toolbar__dropdown-content"},Mj={class:"vuefinder__toolbar__dropdown-section"},Dj={class:"vuefinder__toolbar__dropdown-label"},Fj={class:"vuefinder__toolbar__dropdown-row"},Lj={value:"name"},jj={value:"size"},Nj={value:"modified"},Uj={value:""},zj={value:"asc"},Vj={value:"desc"},Bj={class:"vuefinder__toolbar__dropdown-section"},Hj={class:"vuefinder__toolbar__dropdown-label"},qj={class:"vuefinder__toolbar__dropdown-options"},Wj={class:"vuefinder__toolbar__dropdown-option"},Kj={class:"vuefinder__toolbar__option-text"},Yj={class:"vuefinder__toolbar__dropdown-option"},Gj={class:"vuefinder__toolbar__option-text"},Qj={class:"vuefinder__toolbar__dropdown-option"},Xj={class:"vuefinder__toolbar__option-text"},Jj={class:"vuefinder__toolbar__dropdown-toggle"},Zj={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},e3={class:"vuefinder__toolbar__dropdown-reset"},t3=["title"],n3=["title"],i3=Ce({name:"VfToolbar",__name:"Toolbar",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n,o=e.fs,r=e.config,s=ke(r.state),a=ke(o.selectedItems),l=ke(o.sort),c=ke(o.filter);Oe(()=>s.value.fullScreen,()=>{const _=document.querySelector("body");_&&(_.style.overflow=s.value.fullScreen?"hidden":"")},{immediate:!0});const u=H(!1),d=_=>{_.target.closest(".vuefinder__toolbar__dropdown-container")||(u.value=!1)};et(()=>{const _=document.querySelector("body");_&&s.value.fullScreen&&setTimeout(()=>_.style.overflow="hidden"),document.addEventListener("click",d)}),Ct(()=>{document.removeEventListener("click",d)});const h=H({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:s.value.showHiddenFiles});Oe(()=>h.value.sortBy,_=>{if(!h.value.sortOrder){o.clearSort();return}_==="name"?o.setSort("basename",h.value.sortOrder):_==="size"?o.setSort("file_size",h.value.sortOrder):_==="modified"&&o.setSort("last_modified",h.value.sortOrder)}),Oe(()=>h.value.sortOrder,_=>{if(!_){o.clearSort();return}h.value.sortBy==="name"?o.setSort("basename",_):h.value.sortBy==="size"?o.setSort("file_size",_):h.value.sortBy==="modified"&&o.setSort("last_modified",_)}),Oe(l,_=>{_.active?(_.column==="basename"?h.value.sortBy="name":_.column==="file_size"?h.value.sortBy="size":_.column==="last_modified"&&(h.value.sortBy="modified"),h.value.sortOrder=_.order):h.value.sortOrder=""},{immediate:!0}),Oe(()=>h.value.filterKind,_=>{o.setFilter(_,s.value.showHiddenFiles)}),Oe(()=>h.value.showHidden,_=>{r.set("showHiddenFiles",_),o.setFilter(h.value.filterKind,_)}),Oe(c,_=>{h.value.filterKind=_.kind},{immediate:!0}),Oe(()=>s.value.showHiddenFiles,_=>{h.value.showHidden=_,o.setFilter(h.value.filterKind,_)},{immediate:!0});const v=()=>r.set("view",s.value.view==="grid"?"list":"grid"),f=te(()=>c.value.kind!=="all"||!s.value.showHiddenFiles||l.value.active),p=()=>{h.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},r.set("showHiddenFiles",!0),o.clearSort(),o.clearFilter()};return(_,C)=>(y(),T("div",gj,[g("div",_j,[m(n)("newfolder")?(y(),T("div",{key:0,class:"mx-1.5",title:m(i)("New Folder"),onClick:C[0]||(C[0]=w=>m(e).modal.open(bu,{items:m(a)}))},[j(m(e_))],8,yj)):ue("",!0),m(n)("newfile")?(y(),T("div",{key:1,class:"mx-1.5",title:m(i)("New File"),onClick:C[1]||(C[1]=w=>m(e).modal.open(n_,{items:m(a)}))},[j(m(t_))],8,bj)):ue("",!0),m(n)("rename")?(y(),T("div",{key:2,class:"mx-1.5",title:m(i)("Rename"),onClick:C[2]||(C[2]=w=>m(a).length!==1||m(e).modal.open(Qs,{items:m(a)}))},[j(m(qg),{class:Ae(m(a).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,wj)):ue("",!0),m(n)("delete")?(y(),T("div",{key:3,class:"mx-1.5",title:m(i)("Delete"),onClick:C[3]||(C[3]=w=>!m(a).length||m(e).modal.open(Gs,{items:m(a)}))},[j(m(Hg),{class:Ae(m(a).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ej)):ue("",!0),m(n)("upload")?(y(),T("div",{key:4,class:"mx-1.5",title:m(i)("Upload"),onClick:C[4]||(C[4]=w=>m(e).modal.open(wu,{items:m(a)}))},[j(m(i_))],8,Cj)):ue("",!0),m(n)("unarchive")&&m(a).length===1&&m(a)[0].mime_type==="application/zip"?(y(),T("div",{key:5,class:"mx-1.5",title:m(i)("Unarchive"),onClick:C[5]||(C[5]=w=>!m(a).length||m(e).modal.open(Eu,{items:m(a)}))},[j(m(o_),{class:Ae(m(a).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Sj)):ue("",!0),m(n)("archive")?(y(),T("div",{key:6,class:"mx-1.5",title:m(i)("Archive"),onClick:C[6]||(C[6]=w=>!m(a).length||m(e).modal.open(Cu,{items:m(a)}))},[j(m(r_),{class:Ae(m(a).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,xj)):ue("",!0)]),g("div",Tj,[m(n)("search")?(y(),T("div",{key:0,class:"mx-1.5",title:m(i)("Search Files"),onClick:C[7]||(C[7]=w=>m(e).modal.open(yu))},[j(m(_u),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,Oj)):ue("",!0),g("div",$j,[g("div",{title:m(i)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:C[8]||(C[8]=w=>u.value=!u.value)},[g("div",Aj,[j(m(vj),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),f.value?(y(),T("div",Pj)):ue("",!0)])],8,kj),u.value?(y(),T("div",Rj,[g("div",Ij,[g("div",Mj,[g("div",Dj,L(m(i)("Sorting")),1),g("div",Fj,[it(g("select",{"onUpdate:modelValue":C[9]||(C[9]=w=>h.value.sortBy=w),class:"vuefinder__toolbar__dropdown-select"},[g("option",Lj,L(m(i)("Name")),1),g("option",jj,L(m(i)("Size")),1),g("option",Nj,L(m(i)("Date")),1)],512),[[Za,h.value.sortBy]]),it(g("select",{"onUpdate:modelValue":C[10]||(C[10]=w=>h.value.sortOrder=w),class:"vuefinder__toolbar__dropdown-select"},[g("option",Uj,L(m(i)("None")),1),g("option",zj,L(m(i)("Asc")),1),g("option",Vj,L(m(i)("Desc")),1)],512),[[Za,h.value.sortOrder]])])]),g("div",Bj,[g("div",Hj,L(m(i)("Show")),1),g("div",qj,[g("label",Wj,[it(g("input",{"onUpdate:modelValue":C[11]||(C[11]=w=>h.value.filterKind=w),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[ea,h.value.filterKind]]),g("span",Kj,L(m(i)("All items")),1)]),g("label",Yj,[it(g("input",{"onUpdate:modelValue":C[12]||(C[12]=w=>h.value.filterKind=w),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[ea,h.value.filterKind]]),g("span",Gj,L(m(i)("Files only")),1)]),g("label",Qj,[it(g("input",{"onUpdate:modelValue":C[13]||(C[13]=w=>h.value.filterKind=w),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[ea,h.value.filterKind]]),g("span",Xj,L(m(i)("Folders only")),1)])])]),g("div",Jj,[g("label",Zj,L(m(i)("Show hidden files")),1),it(g("input",{id:"showHidden","onUpdate:modelValue":C[14]||(C[14]=w=>h.value.showHidden=w),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[Es,h.value.showHidden]])]),g("div",e3,[g("button",{class:"vuefinder__toolbar__reset-button",onClick:p},L(m(i)("Reset")),1)])])])):ue("",!0)]),m(n)("fullscreen")?(y(),T("div",{key:1,class:"mx-1.5",title:m(i)("Toggle Full Screen"),onClick:C[15]||(C[15]=w=>m(r).toggle("fullScreen"))},[m(s).fullScreen?(y(),ne(m(aj),{key:0,class:"vf-toolbar-icon"})):(y(),ne(m(oj),{key:1,class:"vf-toolbar-icon"}))],8,t3)):ue("",!0),g("div",{class:"mx-1.5",title:m(i)("Change View"),onClick:C[16]||(C[16]=w=>v())},[m(s).view==="grid"?(y(),ne(m(uj),{key:0,class:"vf-toolbar-icon"})):ue("",!0),m(s).view==="list"?(y(),ne(m(pj),{key:1,class:"vf-toolbar-icon"})):ue("",!0)],8,n3)])]))}}),o3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function r3(t,e){return y(),T("svg",o3,[...e[0]||(e[0]=[g("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 s3={render:r3},a3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function l3(t,e){return y(),T("svg",a3,[...e[0]||(e[0]=[g("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 c3={render:l3},u3={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 d3(t,e){return y(),T("svg",u3,[...e[0]||(e[0]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const h3={render:d3},p3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function f3(t,e){return y(),T("svg",p3,[...e[0]||(e[0]=[g("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 m3={render:f3},v3={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 g3(t,e){return y(),T("svg",v3,[...e[0]||(e[0]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const _3={render:g3},y3={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 b3(t,e){return y(),T("svg",y3,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const w3={render:b3},E3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function C3(t,e){return y(),T("svg",E3,[...e[0]||(e[0]=[g("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 S3={render:C3};function cr(t,e=[]){const n="vfDragEnterCounter",i=t.fs,o=ke(i.selectedItems);function r(d,h){return!!(!d||d.type!=="dir"||d.path.startsWith(h)||o.value.some(v=>v.path===h?!1:!!d.path.startsWith(v.path)))}function s(d,h){if(d.isExternalDrag)return;if(!(t.features?.move??!1)){d.dataTransfer&&(d.dataTransfer.dropEffect="none",d.dataTransfer.effectAllowed="none");return}d.preventDefault();const v=i.getDraggedItem();r(h,v)?d.dataTransfer&&(d.dataTransfer.dropEffect="none",d.dataTransfer.effectAllowed="none"):(d.dataTransfer&&(d.dataTransfer.dropEffect="copy",d.dataTransfer.effectAllowed="all"),d.currentTarget.classList.add(...e))}function a(d){if(d.isExternalDrag||!(t.features?.move??!1))return;d.preventDefault();const h=d.currentTarget,v=Number(h.dataset[n]||0);h.dataset[n]=String(v+1)}function l(d){if(d.isExternalDrag||!(t.features?.move??!1))return;d.preventDefault();const h=d.currentTarget,v=Number(h.dataset[n]||0)-1;v<=0?(delete h.dataset[n],h.classList.remove(...e)):h.dataset[n]=String(v)}function c(d,h){if(d.isExternalDrag||!(t.features?.move??!1)||!h)return;d.preventDefault();const v=d.currentTarget;delete v.dataset[n],v.classList.remove(...e);const f=d.dataTransfer?.getData("items")||"[]",p=JSON.parse(f).map(_=>i.sortedFiles.get().find(C=>C.path===_));i.clearDraggedItem(),t.modal.open(uo,{items:{from:p,to:h}})}function u(d){return{dragover:h=>s(h,d),dragenter:a,dragleave:l,drop:h=>c(h,d)}}return{events:u}}const x3={class:"vuefinder__breadcrumb__container"},T3=["title"],O3=["title"],$3=["title"],k3=["title"],A3={class:"vuefinder__breadcrumb__path-container"},P3={class:"vuefinder__breadcrumb__list"},R3={key:0,class:"vuefinder__breadcrumb__hidden-list"},I3={class:"relative"},M3=["title","onClick"],D3=["title"],F3={class:"vuefinder__breadcrumb__path-mode"},L3={class:"vuefinder__breadcrumb__path-mode-content"},j3=["title"],N3={class:"vuefinder__breadcrumb__path-text"},U3=["title"],z3=["data-theme"],V3=["onClick"],B3={class:"vuefinder__breadcrumb__hidden-item-content"},H3={class:"vuefinder__breadcrumb__hidden-item-text"},q3=Ce({__name:"Breadcrumb",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=e.config,s=ke(r.state),a=ke(o.path),l=ke(o.loading),c=H(null),u=Yg(0,100),d=H(5),h=H(!1),v=H(!1),f=te(()=>a.value?.breadcrumb??[]);function p(Y,I){return Y.length>I?[Y.slice(-I),Y.slice(0,-I)]:[Y,[]]}const _=te(()=>p(f.value,d.value)[0]),C=te(()=>p(f.value,d.value)[1]);Oe(u,()=>{if(!c.value)return;const Y=c.value.children;let I=0,A=0;const Q=5,z=1;d.value=Q,Ge(()=>{for(let ie=Y.length-1;ie>=0;ie--){const ve=Y[ie];if(I+ve.offsetWidth>u.value-40)break;I+=parseInt(ve.offsetWidth.toString(),10),A++}A<z&&(A=z),A>Q&&(A=Q),d.value=A})});const w=()=>{c.value&&(u.value=c.value.offsetWidth)},E=H(null);et(()=>{E.value=new ResizeObserver(w),c.value&&E.value.observe(c.value)}),Ct(()=>{E.value&&E.value.disconnect()});const b=cr(e,["vuefinder__drag-over"]);function S(Y=null){Y??=f.value.length-2;const I={basename:a.value?.storage??"local",extension:"",path:(a.value?.storage??"local")+"://",storage:a.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return f.value[Y]??I}const x=()=>{e.adapter.invalidateListQuery(a.value.path),e.adapter.open(a.value.path)},k=()=>{_.value.length>0&&e.adapter.open(f.value[f.value.length-2]?.path??(a.value?.storage??"local")+"://")},O=Y=>{e.adapter.open(Y.path),h.value=!1},K=()=>{h.value&&(h.value=!1)},D={mounted(Y,I){Y.clickOutsideEvent=function(A){Y===A.target||Y.contains(A.target)||I.value()},document.body.addEventListener("click",Y.clickOutsideEvent)},beforeUnmount(Y){document.body.removeEventListener("click",Y.clickOutsideEvent)}},P=()=>{r.toggle("showTreeView")},U=H({x:0,y:0}),M=(Y,I=null)=>{if(Y.currentTarget instanceof HTMLElement){const{x:A,y:Q,height:z}=Y.currentTarget.getBoundingClientRect();U.value={x:A,y:Q+z}}h.value=I??!h.value},q=()=>{v.value=!v.value},le=async()=>{await Wo(a.value?.path||""),n.success(i("Path copied to clipboard"))},de=()=>{v.value=!1};return(Y,I)=>(y(),T("div",x3,[g("span",{title:m(i)("Toggle Tree View")},[j(m(w3),{class:Ae(["vuefinder__breadcrumb__toggle-tree",m(s).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:P},null,8,["class"])],8,T3),g("span",{title:m(i)("Go up a directory")},[j(m(c3),We({class:f.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},bn(f.value.length?m(b).events(S()):{}),{onClick:k}),null,16,["class"])],8,O3),m(o).isLoading()?(y(),T("span",{key:1,title:m(i)("Cancel")},[j(m(h3),{onClick:I[0]||(I[0]=A=>m(e).emitter.emit("vf-fetch-abort"))})],8,k3)):(y(),T("span",{key:0,title:m(i)("Refresh")},[j(m(s3),{onClick:x})],8,$3)),it(g("div",A3,[g("div",null,[j(m(m3),We({class:"vuefinder__breadcrumb__home-icon"},bn(m(b).events(S(-1))),{onClick:I[1]||(I[1]=Ye(A=>m(e).adapter.open(m(a).storage+"://"),["stop"]))}),null,16)]),g("div",P3,[C.value.length?it((y(),T("div",R3,[I[3]||(I[3]=g("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),g("div",I3,[g("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:I[2]||(I[2]=A=>M(A,!0)),onClick:Ye(M,["stop"])},[j(m(Jg),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[D,K]]):ue("",!0)]),g("div",{ref_key:"breadcrumbContainer",ref:c,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(y(!0),T(Ie,null,He(_.value,(A,Q)=>(y(),T("div",{key:Q},[I[4]||(I[4]=g("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),g("span",We({class:"vuefinder__breadcrumb__item pointer-events-auto",title:A.basename},bn(m(b).events(A),!0),{onClick:Ye(z=>m(e).adapter.open(A.path),["stop"])}),L(A.name),17,M3)]))),128))],512),m(r).get("loadingIndicator")==="circular"&&m(l)?(y(),ne(m(Zs),{key:0})):ue("",!0),g("span",{title:m(i)("Toggle Path Copy Mode"),onClick:q},[j(m(S3),{class:"vuefinder__breadcrumb__toggle-icon"})],8,D3)],512),[[En,!v.value]]),it(g("div",F3,[g("div",L3,[g("div",{title:m(i)("Copy Path")},[j(m(hu),{class:"vuefinder__breadcrumb__copy-icon",onClick:le})],8,j3),g("div",N3,L(m(a).path),1),g("div",{title:m(i)("Exit")},[j(m(_3),{class:"vuefinder__breadcrumb__exit-icon",onClick:de})],8,U3)])],512),[[En,v.value]]),(y(),ne(ws,{to:"body"},[g("div",null,[it(g("div",{style:At({position:"absolute",top:U.value.y+"px",left:U.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":m(e).theme.current},[(y(!0),T(Ie,null,He(C.value,(A,Q)=>(y(),T("div",We({key:Q,class:"vuefinder__breadcrumb__hidden-item"},bn(m(b).events(A),!0),{onClick:z=>O(A)}),[g("div",B3,[g("span",null,[j(m(Nn),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),g("span",H3,L(A.name),1)])],16,V3))),128))],12,z3),[[En,h.value]])])]))]))}}),W3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function K3(t,e){return y(),T("svg",W3,[...e[0]||(e[0]=[g("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 Dp={render:K3},Y3={class:"vuefinder__drag-item__container"},G3={class:"vuefinder__drag-item__count"},Q3=Ce({__name:"DragItem",props:{count:{}},setup(t){const e=t;return(n,i)=>(y(),T("div",Y3,[e.count>1?(y(),ne(m(Dp),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):ue("",!0),j(m(Dp),{class:"vuefinder__drag-item__icon"}),g("div",G3,L(e.count),1)]))}}),X3={key:2,class:"vuefinder__item-icon__extension"},Fp=Ce({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(t){const e=t,n=je(),i=ke(n.config.state),o=te(()=>e.small!==void 0?e.small?"small":"large":e.view==="list"?"small":"large"),r=te(()=>{const a=o.value,l=i.value?.listIconSize,c=i.value?.gridIconSize;return i.value?.gridItemWidth,i.value?.gridItemHeight,e.view==="list"||a==="small"?{"--vf-icon-size":`${l??16}px`}:{"--vf-icon-size":`${c??48}px`}}),s={app:n,config:i.value,item:e.item,view:e.view};return(a,l)=>(y(),T("div",{class:Ae(["vuefinder__item-icon",{"vuefinder__item-icon--small":o.value==="small","vuefinder__item-icon--large":o.value==="large","vuefinder__item-icon--grid":t.view==="grid","vuefinder__item-icon--list":t.view==="list"}]),style:At(r.value)},[Ve(a.$slots,"icon",wn(Jn(s)),()=>[t.item.type==="dir"?(y(),ne(m(Nn),{key:0,class:"vuefinder__item-icon__folder"})):(y(),ne(m(qo),{key:1,class:"vuefinder__item-icon__file"})),t.ext&&t.item.type!=="dir"&&t.item.extension?(y(),T("div",X3,L(t.item.extension.substring(0,3)),1)):ue("",!0)])],6))}}),J3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function Z3(t,e){return y(),T("svg",J3,[...e[0]||(e[0]=[g("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),g("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 Lp={render:Z3},eN=["data-key","data-row","data-col","draggable"],tN={key:0},nN={class:"vuefinder__explorer__item-grid-content"},iN=["data-src","alt"],oN={class:"vuefinder__explorer__item-title"},rN={key:1,class:"vuefinder__explorer__item-list-content"},sN={class:"vuefinder__explorer__item-list-name"},aN={class:"vuefinder__explorer__item-list-icon"},lN={class:"vuefinder__explorer__item-name"},cN={key:0,class:"vuefinder__explorer__item-path"},uN={key:1,class:"vuefinder__explorer__item-size"},dN={key:0},hN={key:2,class:"vuefinder__explorer__item-date"},pN=Ce({__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(t,{emit:e}){const n=t,i=e,o=je(),r=o.fs,s=o.config,a=te(()=>{const P=o.selectionFilterType;return!P||P==="both"?!0:P==="files"&&n.item.type==="file"||P==="dirs"&&n.item.type==="dir"}),l=te(()=>{const P=o.selectionFilterMimeIncludes;return!P||!P.length||n.item.type==="dir"?!0:n.item.mime_type?P.some(U=>n.item.mime_type?.startsWith(U)):!1}),c=te(()=>a.value&&l.value),u=te(()=>["file-item-"+n.explorerId,n.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",n.isSelected?"vf-explorer-selected":"",c.value?"":"vf-explorer-item--unselectable"]),d=te(()=>({opacity:n.isDragging||r.isCut(n.item.path)||!c.value?.5:""})),h=H(null);let v=!1,f=null,p=null,_=!1;const{enabled:C}=Tn(),w=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),E=te(()=>w?!1:C("move")),b=()=>{f&&(clearTimeout(f),f=null),p=null},S=P=>{b(),p=P,_=!1,P.stopPropagation(),f=setTimeout(()=>{!p||f===null||(_=!0,p.cancelable&&p.preventDefault(),p.stopPropagation(),i("contextmenu",p),b())},500)},x=P=>{if(_){P.preventDefault(),P.stopPropagation(),b();return}setTimeout(()=>{_||(b(),D(P))},100)},k=P=>{if(!p)return;const U=p.touches[0]||p.changedTouches[0],M=P.touches[0]||P.changedTouches[0];if(U&&M){const q=Math.abs(M.clientX-U.clientX),le=Math.abs(M.clientY-U.clientY);(q>15||le>15)&&b()}},O=P=>{w&&P.type!=="click"||i("click",P)},K=P=>{if(_)return P.preventDefault(),P.stopPropagation(),!1;i("dragstart",P)},D=P=>{if(!v)v=!0,i("click",P),h.value=setTimeout(()=>{v=!1},300);else return v=!1,i("dblclick",P),!1};return(P,U)=>(y(),T("div",{class:Ae(u.value),style:At(d.value),"data-key":t.item.path,"data-row":t.rowIndex,"data-col":t.colIndex,draggable:E.value,onTouchstartCapture:U[1]||(U[1]=M=>S(M)),onTouchendCapture:U[2]||(U[2]=M=>x(M)),onTouchmoveCapture:k,onTouchcancelCapture:U[3]||(U[3]=()=>b()),onClick:O,onDblclick:U[4]||(U[4]=M=>i("dblclick",M)),onContextmenu:U[5]||(U[5]=Ye(M=>i("contextmenu",M),["prevent","stop"])),onDragstart:K,onDragend:U[6]||(U[6]=M=>i("dragend",M))},[t.view==="grid"?(y(),T("div",tN,[m(r).isReadOnly(t.item)?(y(),ne(m(Lp),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):ue("",!0),g("div",nN,[(t.item.mime_type??"").startsWith("image")&&t.showThumbnails?(y(),T("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":t.item.previewUrl??m(o).adapter.getPreviewUrl({path:t.item.path}),alt:t.item.basename,onTouchstart:U[0]||(U[0]=M=>M.preventDefault())},null,40,iN)):(y(),ne(Fp,{key:1,item:t.item,ext:!0,view:t.view},{icon:we(M=>[Ve(P.$slots,"icon",wn(Jn(M)))]),_:3},8,["item","view"]))]),g("span",oN,L(m(Xl)(t.item.basename)),1)])):(y(),T("div",rN,[g("div",sN,[g("div",aN,[j(Fp,{item:t.item,view:t.view},{icon:we(M=>[Ve(P.$slots,"icon",wn(Jn(M)))]),_:3},8,["item","view"])]),g("span",lN,L(t.item.basename),1),g("div",null,[m(r).isReadOnly(t.item)?(y(),ne(m(Lp),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):ue("",!0)])]),t.showPath?(y(),T("div",cN,L(t.item.path),1)):ue("",!0),t.showPath?ue("",!0):(y(),T("div",uN,[t.item.file_size?(y(),T("div",dN,L(m(o).filesize(t.item.file_size)),1)):ue("",!0)])),!t.showPath&&t.item.last_modified?(y(),T("div",hN,L(new Date(t.item.last_modified*1e3).toLocaleString()),1)):ue("",!0)])),m(C)("pinned")&&m(s).get("pinnedFolders").find(M=>M.path===t.item.path)?(y(),ne(m(pu),{key:2,class:"vuefinder__item--pinned"})):ue("",!0)],46,eN))}}),fN=["data-row"],jp=Ce({__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(t,{emit:e}){const n=t,i=e,o=te(()=>[n.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),r=te(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${n.rowHeight}px`,transform:`translateY(${n.rowIndex*n.rowHeight}px)`})),s=te(()=>n.view==="grid"?{gridTemplateColumns:`repeat(${n.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(a,l)=>(y(),T("div",{class:Ae(o.value),"data-row":t.rowIndex,style:At(r.value)},[g("div",{class:Ae(["grid justify-self-start",{"w-full":t.view==="list"}]),style:At(s.value)},[(y(!0),T(Ie,null,He(t.items,(c,u)=>(y(),ne(pN,We({key:c.path,item:c,view:t.view,"show-thumbnails":t.showThumbnails,"show-path":t.showPath,"is-selected":t.isSelected(c.path),"is-dragging":t.isDraggingItem(c.path),"row-index":t.rowIndex,"col-index":u,"explorer-id":t.explorerId},bn(t.dragNDropEvents(c)),{onClick:l[0]||(l[0]=d=>i("click",d)),onDblclick:l[1]||(l[1]=d=>i("dblclick",d)),onContextmenu:l[2]||(l[2]=d=>i("contextmenu",d)),onDragstart:l[3]||(l[3]=d=>i("dragstart",d)),onDragend:l[4]||(l[4]=d=>i("dragend",d))}),{icon:we(d=>[Ve(a.$slots,"icon",We({ref_for:!0},d))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,fN))}}),mN={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function vN(t,e){return y(),T("svg",mN,[...e[0]||(e[0]=[g("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 gN={render:vN},_N={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function yN(t,e){return y(),T("svg",_N,[...e[0]||(e[0]=[g("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 bN={render:yN},Qa=Ce({__name:"SortIcon",props:{direction:{}},setup(t){return(e,n)=>(y(),T("div",null,[t.direction==="asc"?(y(),ne(m(gN),{key:0,class:"vuefinder__explorer__sort-icon"})):ue("",!0),t.direction==="desc"?(y(),ne(m(bN),{key:1,class:"vuefinder__explorer__sort-icon"})):ue("",!0)]))}}),wN={class:"vuefinder__explorer__header"},EN=Ce({__name:"ExplorerHeader",setup(t){const e=je(),n=e.fs,{t:i}=e.i18n,o=ke(n.sort);return(r,s)=>(y(),T("div",wN,[g("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:s[0]||(s[0]=a=>m(n).toggleSort("basename"))},[Ke(L(m(i)("Name"))+" ",1),it(j(Qa,{direction:m(o).order},null,8,["direction"]),[[En,m(o).active&&m(o).column==="basename"]])]),g("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:s[1]||(s[1]=a=>m(n).toggleSort("file_size"))},[Ke(L(m(i)("Size"))+" ",1),it(j(Qa,{direction:m(o).order},null,8,["direction"]),[[En,m(o).active&&m(o).column==="file_size"]])]),g("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:s[2]||(s[2]=a=>m(n).toggleSort("last_modified"))},[Ke(L(m(i)("Date"))+" ",1),it(j(Qa,{direction:m(o).order},null,8,["direction"]),[[En,m(o).active&&m(o).column==="last_modified"]])])]))}});function CN(t,e){const{scrollContainer:n,itemWidth:i=100,rowHeight:o,overscan:r=2,containerPadding:s=48,lockItemsPerRow:a}=e,l=t,c=()=>typeof o=="number"?o:o.value,u=()=>i?typeof i=="number"?i:i.value:100,d=()=>s?typeof s=="number"?s:s.value:0,h=H(0),v=H(6),f=H(600);let p=null;const _=te(()=>Math.ceil(l.value.length/v.value)),C=te(()=>_.value*c()),w=te(()=>{const P=c(),U=Math.max(0,Math.floor(h.value/P)-r),M=Math.min(_.value,Math.ceil((h.value+f.value)/P)+r);return{start:U,end:M}}),E=te(()=>{const{start:P,end:U}=w.value;return Array.from({length:U-P},(M,q)=>P+q)}),b=()=>f.value,S=()=>typeof a=="object"?a.value:!1,x=()=>{if(S()){v.value=1;return}if(n.value){const P=d(),U=n.value.clientWidth-P,M=u();M>0&&(v.value=Math.max(Math.floor(U/M),2))}},k=P=>{const U=P.target;h.value=U.scrollTop};Oe(()=>l.value.length,()=>{x()}),i&&typeof i!="number"&&Oe(i,()=>{x()}),s&&typeof s!="number"&&Oe(s,()=>{x()}),o&&typeof o!="number"&&Oe(o,()=>{});const O=(P,U)=>{if(!P||!Array.isArray(P))return[];const M=U*v.value;return P.slice(M,M+v.value)},K=(P,U,M,q,le)=>{if(!P||!Array.isArray(P))return[];const de=[];for(let Y=U;Y<=M;Y++)for(let I=q;I<=le;I++){const A=Y*v.value+I;A<P.length&&P[A]&&de.push(P[A])}return de},D=P=>({row:Math.floor(P/v.value),col:P%v.value});return et(async()=>{await Ge(),n.value&&(f.value=n.value.clientHeight||600),x(),window.addEventListener("resize",()=>{n.value&&(f.value=n.value.clientHeight||600),x()}),n.value&&"ResizeObserver"in window&&(p=new ResizeObserver(P=>{const U=P[0];U&&(f.value=Math.round(U.contentRect.height)),x()}),p.observe(n.value))}),Ct(()=>{window.removeEventListener("resize",x),p&&(p.disconnect(),p=null)}),{scrollTop:h,itemsPerRow:v,totalRows:_,totalHeight:C,visibleRange:w,visibleRows:E,updateItemsPerRow:x,handleScroll:k,getRowItems:O,getItemsInRange:K,getItemPosition:D,getContainerHeight:b}}function SN(t){const{itemsPerRow:e,totalHeight:n,getItemsInRange:i,getKey:o,selectionObject:r,rowHeight:s,itemWidth:a,osInstance:l}=t,c=()=>typeof a=="number"?a:a.value,u=Math.floor(Math.random()*2**32).toString(),d=je(),h=d.fs,v=ke(h.selectedKeys),f=ke(h.sortedFiles),p=te(()=>{const I=new Map;return f.value&&f.value.forEach(A=>{I.set(o(A),A)}),I}),_=H(new Set),C=H(!1),w=H(!1),E=I=>I.map(A=>A.getAttribute("data-key")).filter(A=>!!A),b=I=>{I.selection.clearSelection(!0,!0)},S=I=>{if(v.value&&v.value.size>0){const A=document.querySelectorAll(`.file-item-${u}[data-key]`),Q=new Map;A.forEach(ie=>{const ve=ie.getAttribute("data-key");ve&&Q.set(ve,ie)});const z=[];v.value.forEach(ie=>{const ve=Q.get(ie);ve&&x(ie)&&z.push(ve)}),z.forEach(ie=>{I.selection.select(ie,!0)})}},x=I=>{const A=p.value.get(I);if(!A)return!1;const Q=d.selectionFilterType,z=d.selectionFilterMimeIncludes;return Q==="files"&&A.type==="dir"||Q==="dirs"&&A.type==="file"?!1:z&&Array.isArray(z)&&z.length>0?A.type==="dir"?!0:A.mime_type?z.some(ie=>A.mime_type?.startsWith(ie)):!1:!0},k=I=>{if(d.selectionMode==="single")return!1;C.value=!1,!I.event?.metaKey&&!I.event?.ctrlKey&&(w.value=!0),I.selection.resolveSelectables(),b(I),S(I)},O=H(0),K=({event:I,selection:A})=>{O.value=(r.value?.getAreaLocation().y1??0)-(d.root.getBoundingClientRect().top??0);const Q=document.querySelector(".selection-area-container");if(Q&&(Q.dataset.theme=d.theme.current),d.selectionMode==="single")return;const z=I;z&&"type"in z&&z.type==="touchend"&&z.preventDefault();const ie=I;!ie?.ctrlKey&&!ie?.metaKey&&(h.clearSelection(),A.clearSelection(!0,!0)),_.value.clear()},D=I=>{if(d.selectionMode==="single")return;const A=E(I.store.changed.added),Q=E(I.store.changed.removed);w.value=!1,C.value=!0,A.forEach(z=>{v.value&&!v.value.has(z)&&x(z)&&(_.value.add(z),h.select(z,d.selectionMode||"multiple"))}),Q.forEach(z=>{document.querySelector(`[data-key="${z}"]`)&&p.value.has(z)&&_.value.delete(z),h.deselect(z)}),I.selection.resolveSelectables(),S(I)},P=()=>{_.value.clear()},U=I=>{if(!I.event)return;const A=document.querySelector(".scroller-"+u);if(!A)return;const Q=A.getBoundingClientRect(),z=Q.left,ie=Q.top;let ve=A.scrollTop;if(l?.value){const{viewport:ft}=l.value.elements();ft&&(ve=ft.scrollTop)}const re=r.value?.getAreaLocation();if(!re)return;const ge=Math.min(re.x1,re.x2),_e=ve+Math.min(re.y1,re.y2),R=Math.max(re.x1,re.x2),$=ve+Math.max(re.y1,re.y2),N=4,F=c();let B=Math.floor((ge-z-N)/F),oe=Math.floor((R-z-N)/F);const ee=ge-z-N-B*F,G=R-z-N-oe*F;ee>F-N&&(B=B+1),G<N&&(oe=oe-1);const he=Math.max(0,B),me=Math.min(e.value-1,oe);let $e=Math.floor((_e-ie-N)/s.value),Se=Math.floor(($-ie-N)/s.value);const Ne=_e-ie-N-$e*s.value,Pe=$-ie-N-Se*s.value,Ue=Math.floor((n.value-N)/s.value);Ne>s.value-N&&($e=$e+1),Pe<N&&(Se=Se-1);const ut=Math.max(0,$e),Qe=Math.min(Se,Ue),at=i(f.value,ut,Qe,he,me),tt=document.querySelectorAll(`.file-item-${u}[data-key]`),pt=new Map;tt.forEach(ft=>{const Dt=ft.getAttribute("data-key");Dt&&pt.set(Dt,ft)});const dt=[];if(at.forEach(ft=>{const Dt=o(ft);pt.get(Dt)||dt.push(Dt)}),dt.length>0){const ft=d.selectionMode||"multiple";h.selectMultiple(dt,ft)}},M=I=>{U(I),b(I),S(I),h.setSelectedCount(v.value?.size||0),C.value=!1},q=()=>{let I=[".scroller-"+u];if(l?.value){const{viewport:A}=l.value.elements();A&&(I=A)}r.value=new WI({selectables:[".file-item-"+u+":not(.vf-explorer-item--unselectable)"],boundaries:I,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"}}}),r.value.on("beforestart",k),r.value.on("start",K),r.value.on("move",D),r.value.on("stop",M)},le=()=>{r.value&&(r.value.destroy(),r.value=null)},de=()=>{r.value&&(Array.from(v.value??new Set).forEach(I=>{x(I)||h.deselect(I)}),le(),q())},Y=I=>{w.value&&(r.value?.clearSelection(),P(),w.value=!1);const A=I;!_.value.size&&!w.value&&!A?.ctrlKey&&!A?.metaKey&&(h.clearSelection(),r.value?.clearSelection())};return et(()=>{const I=A=>{!A.buttons&&C.value&&(C.value=!1)};document.addEventListener("dragleave",I),Ct(()=>{document.removeEventListener("dragleave",I)})}),{explorerId:u,isDragging:C,initializeSelectionArea:q,updateSelectionArea:de,handleContentClick:Y}}function xN(t){const e=n=>{if(!n)return{typeAllowed:!1,mimeAllowed:!1};const i=t.selectionFilterType,o=t.selectionFilterMimeIncludes,r=!i||i==="both"||i==="files"&&n.type==="file"||i==="dirs"&&n.type==="dir";let s=!0;return o&&Array.isArray(o)&&o.length>0&&(n.type==="dir"?s=!0:n.mime_type?s=o.some(a=>n.mime_type.startsWith(a)):s=!1),{typeAllowed:r,mimeAllowed:s}};return{isItemSelectable:e,canSelectItem:n=>{const{typeAllowed:i,mimeAllowed:o}=e(n);return i&&o}}}function TN(t){const e=n=>({item:n,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:e,openItem:(n,i,o)=>{const r=e(n);if(n.type==="file"&&i){if(t.emitter.emit("vf-file-dclick",r),r.defaultPrevented)return}else if(n.type==="dir"&&o&&(t.emitter.emit("vf-folder-dclick",r),r.defaultPrevented))return;const s=t.contextMenuItems?.find(a=>a.show(t,{items:[n],target:n,searchQuery:""}));s&&s.action(t,[n])}}}function ON(t,e,n,i,o,r,s){const a=t.fs,{canSelectItem:l}=xN(t),{openItem:c}=TN(t),u=h=>{const v=h.target?.closest(".file-item-"+e);if(!v)return null;const f=String(v.getAttribute("data-key")),p=n.value?.find(_=>_.path===f);return{key:f,item:p}},d=()=>{const h=i.value;return n.value?.filter(v=>h?.has(v.path))||[]};return{handleItemClick:h=>{const v=u(h);if(!v)return;const{key:f,item:p}=v,_=h;if(!l(p))return;const C=t.selectionMode||"multiple";!_?.ctrlKey&&!_?.metaKey&&(h.type!=="touchstart"||!a.isSelected(f))&&(a.clearSelection(),o.value?.clearSelection(!0,!0)),o.value?.resolveSelectables(),h.type==="touchstart"&&a.isSelected(f)?a.select(f,C):a.toggleSelect(f,C),a.setSelectedCount(i.value?.size||0)},handleItemDblClick:h=>{const v=u(h);if(!v)return;const{item:f}=v;l(f)&&f&&c(f,r,s)},handleItemContextMenu:h=>{h.preventDefault(),h.stopPropagation();const v=u(h);if(!v)return;const{key:f,item:p}=v;l(p)&&(i.value?.has(f)||(a.clearSelection(),a.select(f)),t.emitter.emit("vf-contextmenu-show",{event:h,items:d(),target:p}))},handleContentContextMenu:h=>{h.preventDefault(),t.emitter.emit("vf-contextmenu-show",{event:h,items:d()})},getSelectedItems:d}}function $N(t,e){const n=H(null);return et(()=>{if(hn.plugin([mI]),t.value){const i=hn(t.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:o=>{n.value=o;const{viewport:r}=o.elements();r&&r.addEventListener("scroll",e)},updated:o=>{const{viewport:r}=o.elements()}});n.value=i}}),Ct(()=>{if(n.value){const{viewport:i}=n.value.elements();i&&i.removeEventListener("scroll",e),n.value.destroy(),n.value=null}}),{osInstance:n}}function kN(t,e){const n=H(null);return et(()=>{t.value&&(n.value=new Hi({elements_selector:".lazy",container:t.value})),e?.emitter&&e.emitter.on("vf-refresh-thumbnails",()=>{n.value&&n.value.update()})}),Vp(()=>{n.value&&n.value.update()}),Ct(()=>{n.value&&(n.value.destroy(),n.value=null)}),{vfLazyLoad:n}}const AN={class:"vuefinder__explorer__container"},PN={key:0,class:"vuefinder__linear-loader"},RN=Ce({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(t){const e=t,n=je(),i=cr(n,["vuefinder__drag-over"]),o=In("dragImage"),r=Yo(null),s=In("scrollContainer"),a=In("scrollContent"),l=n.fs,c=n.config,u=ke(c.state),d=ke(l.sortedFiles),h=ke(l.selectedKeys),v=ke(l.loading),f=F=>h.value?.has(F)??!1,p=te(()=>{if(u.value?.view==="grid"){const oe=u.value?.gridItemHeight??80,ee=u.value?.gridItemGap??8;return oe+ee*2}const F=u.value?.listItemHeight??32,B=u.value?.listItemGap??2;return F+B*2}),_=te(()=>{if(u.value?.view==="grid"){const F=u.value?.gridItemWidth??96,B=u.value?.gridItemGap??8;return F+B*2}return 104}),C=te(()=>u.value?.view==="grid"?(u.value?.gridItemGap??8)*2:0),{t:w}=n.i18n,{itemsPerRow:E,totalHeight:b,visibleRows:S,handleScroll:x,getRowItems:k,getItemsInRange:O,updateItemsPerRow:K}=CN(te(()=>d.value??[]),{scrollContainer:s,itemWidth:_,rowHeight:p,overscan:2,containerPadding:C,lockItemsPerRow:te(()=>u.value.view==="list")}),{osInstance:D}=$N(s,x),{explorerId:P,isDragging:U,initializeSelectionArea:M,updateSelectionArea:q,handleContentClick:le}=SN({itemsPerRow:E,totalHeight:b,getItemsInRange:O,getKey:F=>F.path,selectionObject:r,rowHeight:p,itemWidth:_,osInstance:D}),de=H(null),Y=F=>{if(!F||!de.value)return!1;const B=h.value?.has(de.value)??!1;return U.value&&(B?h.value?.has(F)??!1:F===de.value)};Oe(()=>c.get("view"),F=>{F==="list"?E.value=1:K()},{immediate:!0}),Oe(E,F=>{c.get("view")==="list"&&F!==1&&(E.value=1)});const I=F=>d.value?.[F];kN(s,n);const{handleItemClick:A,handleItemDblClick:Q,handleItemContextMenu:z,handleContentContextMenu:ie}=ON(n,P,d,h,r,e.onFileDclick,e.onFolderDclick);et(()=>{const F=()=>{r.value||M(),r.value&&r.value.on("beforestart",({event:B})=>{const oe=B?.target===a.value;if(!B?.metaKey&&!B?.ctrlKey&&!B?.altKey&&!oe)return!1})};if(D.value)F();else{const B=setInterval(()=>{D.value&&(clearInterval(B),F())},50);setTimeout(()=>{clearInterval(B),r.value||F()},500)}Oe(()=>[n.selectionFilterType,n.selectionFilterMimeIncludes],q,{deep:!0})});const ve=F=>{if(!(n.features?.move??!1)||F.altKey||F.ctrlKey||F.metaKey)return F.preventDefault(),!1;U.value=!0;const B=F.target?.closest(".file-item-"+P);if(de.value=B?String(B.dataset.key):null,F.dataTransfer&&de.value){F.dataTransfer.setDragImage(o.value,0,15),F.dataTransfer.effectAllowed="all",F.dataTransfer.dropEffect="copy";const oe=h.value?.has(de.value)?Array.from(h.value):[de.value];F.dataTransfer.setData("items",JSON.stringify(oe)),l.setDraggedItem(de.value)}},re=()=>{de.value=null};let ge=null,_e=null;const R=F=>{F.target?.closest(".file-item-"+P)||(_e=F,ge&&clearTimeout(ge),ge=setTimeout(()=>{_e&&(_e.cancelable&&_e.preventDefault(),_e.stopPropagation(),ie(_e)),_e=null,ge=null},500))},$=F=>{ge&&(clearTimeout(ge),ge=null),_e=null},N=F=>{if(!_e)return;const B=_e.touches[0]||_e.changedTouches[0],oe=F.touches[0]||F.changedTouches[0];if(B&&oe){const ee=Math.abs(oe.clientX-B.clientX),G=Math.abs(oe.clientY-B.clientY);(ee>15||G>15)&&(ge&&(clearTimeout(ge),ge=null),_e=null)}};return(F,B)=>(y(),T("div",AN,[m(u).view==="list"?(y(),ne(EN,{key:0})):ue("",!0),g("div",{ref_key:"scrollContainer",ref:s,class:Ae(["vuefinder__explorer__selector-area","scroller-"+m(P)])},[m(c).get("loadingIndicator")==="linear"&&m(v)?(y(),T("div",PN)):ue("",!0),g("div",{ref_key:"scrollContent",ref:a,class:"scrollContent vuefinder__explorer__scroll-content",style:At({height:`${m(b)}px`,position:"relative",width:"100%"}),onContextmenu:B[0]||(B[0]=Ye((...oe)=>m(ie)&&m(ie)(...oe),["self","prevent"])),onClick:B[1]||(B[1]=Ye((...oe)=>m(le)&&m(le)(...oe),["self"])),onTouchstartCapture:Ye(R,["self"]),onTouchendCapture:Ye($,["self"]),onTouchmoveCapture:Ye(N,["self"]),onTouchcancelCapture:Ye($,["self"])},[g("div",{ref_key:"dragImage",ref:o,class:"vuefinder__explorer__drag-item"},[j(Q3,{count:de.value&&m(h).has(de.value)?m(h).size:1},null,8,["count"])],512),m(u).view==="grid"?(y(!0),T(Ie,{key:0},He(m(S),oe=>(y(),ne(jp,{key:oe,"row-index":oe,"row-height":p.value,view:"grid","items-per-row":m(E),items:m(k)(m(d),oe),"show-thumbnails":m(u).showThumbnails,"is-dragging-item":Y,"is-selected":f,"drag-n-drop-events":ee=>m(i).events(ee),"explorer-id":m(P),onClick:m(A),onDblclick:m(Q),onContextmenu:m(z),onDragstart:ve,onDragend:re},{icon:we(ee=>[Ve(F.$slots,"icon",We({ref_for:!0},ee))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(y(!0),T(Ie,{key:1},He(m(S),oe=>(y(),ne(jp,{key:oe,"row-index":oe,"row-height":p.value,view:"list",items:I(oe)?[I(oe)]:[],"is-dragging-item":Y,"is-selected":f,"drag-n-drop-events":ee=>m(i).events(ee),"explorer-id":m(P),onClick:m(A),onDblclick:m(Q),onContextmenu:m(z),onDragstart:ve,onDragend:re},{icon:we(ee=>[Ve(F.$slots,"icon",We({ref_for:!0},ee))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),IN=["href","download"],MN=["onClick"],DN=Ce({__name:"ContextMenu",setup(t){const e=je(),n=H(null),i=H([]);let o=null,r=null,s=null,a=[],l=null;const c=Mt({active:!1,items:[],positions:{}});e.emitter.on("vf-context-selected",v=>{i.value=v});const u=v=>v.link(e,i.value),d=v=>{e.emitter.emit("vf-contextmenu-hide"),v.action(e,i.value)};e.emitter.on("vf-contextmenu-show",v=>{const{event:f,items:p,target:_=null}=v||{};c.items=(e.contextMenuItems||[]).filter(C=>C.show(e,{items:p,target:_})).sort((C,w)=>{const E=C.order??1/0,b=w.order??1/0;return E-b}),_?p.length>1&&p.some(C=>C.path===_.path)?e.emitter.emit("vf-context-selected",p):e.emitter.emit("vf-context-selected",[_]):e.emitter.emit("vf-context-selected",[]),h(f)}),e.emitter.on("vf-contextmenu-hide",()=>{c.active=!1,o&&(o(),o=null),s&&(a.forEach(v=>{v===window?window.removeEventListener("scroll",s,!0):v.removeEventListener("scroll",s,!0)}),s=null,a=[]),l&&(document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),l=null),r=null,c.positions={}});const h=async v=>{o&&(o(),o=null);const f=(b=>{if("clientX"in b&&"clientY"in b)return{x:b.clientX,y:b.clientY};const S="touches"in b&&b.touches[0]||"changedTouches"in b&&b.changedTouches[0];return S?{x:S.clientX,y:S.clientY}:{x:0,y:0}})(v);if(r={getBoundingClientRect:()=>({width:0,height:0,x:f.x,y:f.y,top:f.y,left:f.x,right:f.x,bottom:f.y})},c.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},c.active=!0,await Ge(),!n.value||!r)return;await new Promise(b=>{requestAnimationFrame(()=>{requestAnimationFrame(b)})});const p=[Po(8),Ro({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),Io({padding:16})];let _=0,C=0;try{const b=await Zi(r,n.value,{placement:"right-start",strategy:"fixed",middleware:p});_=b.x,C=b.y}catch(b){console.warn("[ContextMenu] Floating UI initial positioning error:",b);return}c.positions={position:"fixed",zIndex:"10001",left:`${_}px`,top:`${C}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{n.value&&(c.positions={...c.positions,opacity:"1",transform:"translateY(0)"})});const w=(b=>{const S=[];let x=b;for(;x&&x!==document.body&&x!==document.documentElement;){const k=window.getComputedStyle(x),O=k.overflow+k.overflowX+k.overflowY;(O.includes("scroll")||O.includes("auto"))&&S.push(x),x=x.parentElement}return S})(n.value);a=[window,...w],s=()=>{c.active&&e.emitter.emit("vf-contextmenu-hide")};const E=s;E&&a.forEach(b=>{b===window?window.addEventListener("scroll",E,!0):b.addEventListener("scroll",E,!0)}),l=b=>{if(!c.active)return;const S=b.target;if(!S||n.value&&n.value.contains(S))return;const x=e.root;x&&x.contains(S)||e.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{l&&(document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0))},100),setTimeout(()=>{if(!(!n.value||!r))try{o=oc(r,n.value,async()=>{if(!(!r||!n.value))try{const{x:b,y:S}=await Zi(r,n.value,{placement:"right-start",strategy:"fixed",middleware:p});c.positions={...c.positions,left:`${b}px`,top:`${S}px`}}catch(b){console.warn("Floating UI positioning error:",b)}})}catch(b){console.warn("Floating UI autoUpdate setup error:",b),o=null}},200)};return Ct(()=>{o&&(o(),o=null),s&&(a.forEach(v=>{v===window?window.removeEventListener("scroll",s,!0):v.removeEventListener("scroll",s,!0)}),s=null,a=[]),l&&(document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),l=null),r=null}),(v,f)=>it((y(),T("ul",{ref_key:"contextmenu",ref:n,class:Ae([{"vuefinder__context-menu--active":c.active,"vuefinder__context-menu--inactive":!c.active},"vuefinder__context-menu"]),style:At(c.positions)},[(y(!0),T(Ie,null,He(c.items,p=>(y(),T("li",{key:p.title,class:"vuefinder__context-menu__item"},[p.link?(y(),T("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:u(p),download:u(p),onClick:f[0]||(f[0]=_=>m(e).emitter.emit("vf-contextmenu-hide"))},[g("span",null,L(p.title(m(e).i18n)),1)],8,IN)):(y(),T("div",{key:1,class:"vuefinder__context-menu__action",onClick:_=>d(p)},[g("span",null,L(p.title(m(e).i18n)),1)],8,MN))]))),128))],6)),[[En,c.active]])}}),FN={class:"vuefinder__status-bar__wrapper"},LN={class:"vuefinder__status-bar__storage"},jN=["title"],NN={class:"vuefinder__status-bar__storage-icon"},UN=["value"],zN=["value"],VN={class:"vuefinder__status-bar__info space-x-2"},BN={key:0},HN={key:1},qN={key:0,class:"vuefinder__status-bar__size"},WN={class:"vuefinder__status-bar__actions"},KN=Ce({__name:"Statusbar",setup(t){const e=je(),{t:n}=e.i18n,i=e.fs,o=ke(i.sortedFiles),r=ke(i.path),s=ke(i.selectedCount),a=ke(i.storages),l=ke(i.selectedItems),c=ke(i.path),u=_=>{const C=_.target.value;e.adapter.open(C+"://")},d=te(()=>!l.value||l.value.length===0?0:l.value.reduce((_,C)=>_+(C.file_size||0),0)),h=te(()=>a.value),v=te(()=>o.value),f=te(()=>s.value||0),p=te(()=>l.value||[]);return(_,C)=>(y(),T("div",FN,[g("div",LN,[g("div",{class:"vuefinder__status-bar__storage-container",title:m(n)("Storage")},[g("div",NN,[j(m(fu))]),g("select",{name:"vuefinder-media-selector",value:m(r).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:u},[(y(!0),T(Ie,null,He(h.value,w=>(y(),T("option",{key:w,value:w},L(w),9,zN))),128))],40,UN),C[0]||(C[0]=g("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,jN),g("div",VN,[f.value===0?(y(),T("span",BN,L(v.value.length)+" "+L(m(n)("items")),1)):(y(),T("span",HN,[Ke(L(f.value)+" "+L(m(n)("selected"))+" ",1),d.value?(y(),T("span",qN,L(m(e).filesize(d.value)),1)):ue("",!0)]))])]),g("div",WN,[Ve(_.$slots,"actions",{path:m(c).path,count:f.value||0,selected:p.value})])]))}}),YN={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function GN(t,e){return y(),T("svg",YN,[...e[0]||(e[0]=[g("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),g("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 QN={render:GN};function s_(t,e){const n=t.findIndex(i=>i.path===e.path);n>-1?t[n]=e:t.push(e)}const XN={class:"vuefinder__folder-loader-indicator"},JN={key:1,class:"vuefinder__folder-loader-indicator--icon"},a_=Ce({__name:"FolderLoaderIndicator",props:zp({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=je(),i=Zl(t,"modelValue"),o=H(!1);Oe(()=>i.value,()=>r());const r=async()=>{o.value=!0;try{const s=(await n.adapter.list(e.path)).files.filter(a=>a.type==="dir");s_(n.treeViewData,{path:e.path,type:"dir",folders:s})}catch(s){Yt(s,"Failed to fetch subfolders")}finally{o.value=!1}};return(s,a)=>(y(),T("div",XN,[o.value?(y(),ne(m(Zs),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(y(),T("div",JN,[i.value?(y(),ne(m(Js),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):ue("",!0),i.value?ue("",!0):(y(),ne(m(Xs),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),ZN={key:0},eU={class:"vuefinder__treesubfolderlist__no-folders"},tU={class:"vuefinder__treesubfolderlist__item-content"},nU=["onClick"],iU=["title","onDblclick","onClick"],oU={class:"vuefinder__treesubfolderlist__item-icon"},rU={class:"vuefinder__treesubfolderlist__subfolder"},sU={key:1,class:"vuefinder__treesubfolderlist__more-note"},aU=Ce({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(t){const e=je(),n=e.fs,i=cr(e,["vuefinder__drag-over"]),o=H({}),r=e.config,s=ke(r.state),{t:a}=e.i18n,l=ke(n.path),c=t,u=H(null),d=H(50);et(()=>{c.path===c.storage+"://"&&u.value&&hn(u.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const h=te(()=>{const w=e.treeViewData.find(E=>E.path===c.path)?.folders||[];return w.length>d.value?w.slice(0,d.value):w}),v=te(()=>e.treeViewData.find(w=>w.path===c.path)?.folders?.length||0),f=te(()=>v.value>d.value),p=te(()=>`${c.storage}://`),_=(w,E)=>w===E||w.startsWith(`${E}/`);Oe(h,w=>{const E=s.value.expandTreeByDefault&&c.path===p.value,b=s.value.expandedTreePaths||[];w.forEach(S=>{const x=b.some(k=>_(k,S.path));(E||x)&&o.value[S.path]===void 0&&(o.value[S.path]=!0)})},{immediate:!0});const C=()=>{d.value+=50};return(w,E)=>{const b=ze("TreeSubfolderList",!0);return y(),T("ul",{ref_key:"parentSubfolderList",ref:u,class:"vuefinder__treesubfolderlist__container"},[h.value.length?ue("",!0):(y(),T("li",ZN,[g("div",eU,L(m(a)("No folders")),1)])),(y(!0),T(Ie,null,He(h.value,S=>(y(),T("li",{key:S.path,class:"vuefinder__treesubfolderlist__item"},[g("div",tU,[g("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:x=>o.value[S.path]=!o.value[S.path]},[j(a_,{modelValue:o.value[S.path],"onUpdate:modelValue":x=>o.value[S.path]=x,storage:t.storage,path:S.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,nU),g("div",We({class:"vuefinder__treesubfolderlist__item-link",title:S.path},bn(m(i).events({...S,dir:S.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:x=>o.value[S.path]=!o.value[S.path],onClick:x=>m(e).adapter.open(S.path)}),[g("div",oU,[m(l)?.path===S.path?(y(),ne(m(mu),{key:0,class:"vuefinder__item-icon__folder--open"})):(y(),ne(m(Nn),{key:1,class:"vuefinder__item-icon__folder"}))]),g("div",{class:Ae(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":m(l).path===S.path}])},L(S.basename),3)],16,iU)]),g("div",rU,[it(j(b,{storage:c.storage,path:S.path},null,8,["storage","path"]),[[En,o.value[S.path]]])])]))),128)),f.value?(y(),T("li",sU,[g("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:C},L(m(a)("load more")),1)])):ue("",!0)],512)}}}),lU=Ce({__name:"TreeStorageItem",props:{storage:{}},setup(t){const e=je(),n=e.fs,i=e.config,o=t,r=ke(i.state),s=te(()=>{const v=r.value.expandedTreePaths||[],f=`${o.storage}://`;return v.some(p=>p===f||p.startsWith(`${f}`))}),a=H(r.value.expandTreeByDefault||s.value),l=cr(e,["vuefinder__drag-over"]),c=ke(n.path),u=te(()=>o.storage===c.value?.storage);Oe(()=>({expandTreeByDefault:r.value.expandTreeByDefault,hasExpandedPathInStorage:s.value}),v=>{(v.expandTreeByDefault||v.hasExpandedPathInStorage)&&(a.value=!0)});const d={storage:o.storage,path:o.storage+"://",dir:o.storage+"://",type:"dir",basename:o.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function h(v){v===c.value?.storage?a.value=!a.value:e.adapter.open(v+"://")}return(v,f)=>(y(),T(Ie,null,[g("div",{class:"vuefinder__treestorageitem__header",onClick:f[2]||(f[2]=p=>h(t.storage))},[g("div",We({class:["vuefinder__treestorageitem__info",u.value?"vuefinder__treestorageitem__info--active":""]},bn(m(l).events(d),!0)),[g("div",{class:Ae(["vuefinder__treestorageitem__icon",u.value?"vuefinder__treestorageitem__icon--active":""])},[j(m(fu))],2),g("div",null,L(t.storage),1)],16),g("div",{class:"vuefinder__treestorageitem__loader",onClick:f[1]||(f[1]=Ye(p=>a.value=!a.value,["stop"]))},[j(a_,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=p=>a.value=p),storage:t.storage,path:t.storage+"://"},null,8,["modelValue","storage","path"])])]),it(j(aU,{storage:t.storage,path:t.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[En,a.value]])],64))}}),cU={class:"vuefinder__folder-indicator"},uU={class:"vuefinder__folder-indicator--icon"},dU=Ce({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=Zl(t,"modelValue");return(n,i)=>(y(),T("div",cU,[g("div",uU,[e.value?(y(),ne(m(Js),{key:0,class:"vuefinder__folder-indicator--minus"})):ue("",!0),e.value?ue("",!0):(y(),ne(m(Xs),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),hU={key:0,class:"vuefinder__treeview__header"},pU={class:"vuefinder__treeview__pinned-label"},fU={class:"vuefinder__treeview__pin-text text-nowrap"},mU={key:0,class:"vuefinder__treeview__pinned-list"},vU=["onClick"],gU=["title"],_U=["onClick"],yU={key:0},bU={class:"vuefinder__treeview__no-pinned"},wU=Ce({__name:"TreeView",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n,{getStore:o,setStore:r}=e.storage,s=e.fs,a=e.config,l=ke(a.state),c=ke(s.sortedFiles),u=ke(s.storages),d=te(()=>u.value||[]),h=ke(s.path),v=cr(e,["vuefinder__drag-over"]),f=H(190),p=H(o("pinned-folders-opened",!0));Oe(p,E=>r("pinned-folders-opened",E));const _=E=>{const b=a.get("pinnedFolders");a.set("pinnedFolders",b.filter(S=>S.path!==E.path))},C=E=>{const b=E.clientX,S=E.target.parentElement;if(!S)return;const x=S.getBoundingClientRect().width;S.classList.remove("transition-[width]"),S.classList.add("transition-none");const k=K=>{f.value=x+K.clientX-b,f.value<50&&(f.value=0,a.set("showTreeView",!1)),f.value>50&&a.set("showTreeView",!0)},O=()=>{const K=S.getBoundingClientRect();f.value=K.width,S.classList.add("transition-[width]"),S.classList.remove("transition-none"),window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",O)};window.addEventListener("mousemove",k),window.addEventListener("mouseup",O)},w=H(null);return et(()=>{w.value&&hn(w.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),Oe(c,E=>{const b=E.filter(S=>S.type==="dir");s_(e.treeViewData,{path:h.value.path||"",folders:b.map(S=>({storage:S.storage,path:S.path,basename:S.basename,type:"dir"}))})}),(E,b)=>(y(),T(Ie,null,[g("div",{class:Ae(["vuefinder__treeview__overlay",m(l).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:b[0]||(b[0]=S=>m(a).toggle("showTreeView"))},null,2),g("div",{style:At(m(l).showTreeView?"min-width:100px;max-width:75%; width: "+f.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[g("div",{ref_key:"treeViewScrollElement",ref:w,class:"vuefinder__treeview__scroll"},[m(n)("pinned")?(y(),T("div",hU,[g("div",{class:"vuefinder__treeview__pinned-toggle",onClick:b[2]||(b[2]=S=>p.value=!p.value)},[g("div",pU,[j(m(pu),{class:"vuefinder__treeview__pin-icon"}),g("div",fU,L(m(i)("Pinned Folders")),1)]),j(dU,{modelValue:p.value,"onUpdate:modelValue":b[1]||(b[1]=S=>p.value=S)},null,8,["modelValue"])]),p.value?(y(),T("ul",mU,[(y(!0),T(Ie,null,He(m(l).pinnedFolders,S=>(y(),T("li",{key:S.path,class:"vuefinder__treeview__pinned-item"},[g("div",We({class:"vuefinder__treeview__pinned-folder"},bn(m(v).events(S),!0),{onClick:x=>m(e).adapter.open(S.path)}),[m(h).path!==S.path?(y(),ne(m(Nn),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):ue("",!0),m(h).path===S.path?(y(),ne(m(mu),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):ue("",!0),g("div",{title:S.path,class:Ae(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":m(h).path===S.path}])},L(S.basename),11,gU)],16,vU),g("div",{class:"vuefinder__treeview__remove-folder",onClick:x=>_(S)},[j(m(QN),{class:"vuefinder__treeview__remove-icon"})],8,_U)]))),128)),m(l).pinnedFolders.length?ue("",!0):(y(),T("li",yU,[g("div",bU,L(m(i)("No folders pinned")),1)]))])):ue("",!0)])):ue("",!0),(y(!0),T(Ie,null,He(d.value,S=>(y(),T("div",{key:S,class:"vuefinder__treeview__storage"},[j(lU,{storage:S},null,8,["storage"])]))),128))],512),g("div",{class:"vuefinder__treeview__resize-handle",onMousedown:C},null,32)],4)],64))}}),xt={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function EU(t){return t.items.length>1&&t.items.some(e=>e.path===t.target?.path)?"many":t.target?"one":"none"}function mt(t){const e=Object.assign({needsSearchQuery:!1},t);return(n,i)=>!(e.needsSearchQuery!==!!i.searchQuery||e.target!==void 0&&e.target!==EU(i)||e.targetType!==void 0&&e.targetType!==i.target?.type||e.mimeType!==void 0&&e.mimeType!==i.target?.mime_type||e.feature!==void 0&&!(n.features[e.feature]??!1))}function Co(...t){return(e,n)=>t.some(i=>i(e,n))}function So(...t){return(e,n)=>t.every(i=>i(e,n))}const l_=[{id:xt.openDir,title:({t})=>t("Open containing folder"),action:(t,e)=>{const n=e[0];n&&t.adapter.open(n.dir)},show:mt({target:"one",needsSearchQuery:!0}),order:10},{id:xt.refresh,title:({t})=>t("Refresh"),action:t=>{const e=t.fs;t.adapter.invalidateListQuery(e.path.get().path),t.adapter.open(e.path.get().path)},show:Co(mt({target:"none"}),mt({target:"many"})),order:20},{id:xt.selectAll,title:({t})=>t("Select All"),action:t=>{t.fs.selectAll(t.selectionMode||"multiple")},show:(t,e)=>t.selectionMode==="multiple"&&mt({target:"none"})(t,e),order:30},{id:xt.new_folder,title:({t})=>t("New Folder"),action:t=>t.modal.open(bu),show:mt({target:"none",feature:"newfolder"}),order:40},{id:xt.open,title:({t})=>t("Open"),action:(t,e)=>{e[0]&&t.adapter.open(e[0].path)},show:mt({target:"one",targetType:"dir"}),order:50},{id:xt.pinFolder,title:({t})=>t("Pin Folder"),action:(t,e)=>{const n=t.config,i=n.get("pinnedFolders"),o=i.concat(e.filter(r=>i.findIndex(s=>s.path===r.path)===-1));n.set("pinnedFolders",o)},show:So(mt({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(n=>n.path===e.target?.path)===-1),order:60},{id:xt.unpinFolder,title:({t})=>t("Unpin Folder"),action:(t,e)=>{const n=t.config,i=n.get("pinnedFolders");n.set("pinnedFolders",i.filter(o=>!e.find(r=>r.path===o.path)))},show:So(mt({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(n=>n.path===e.target?.path)!==-1),order:70},{id:xt.preview,title:({t})=>t("Preview"),action:(t,e)=>t.modal.open(lr,{storage:e[0]?.storage,item:e[0]}),show:So(mt({target:"one",feature:"preview"}),(t,e)=>e.target?.type!=="dir"),order:80},{id:xt.download,link:(t,e)=>{if(e[0])return t.adapter.getDownloadUrl(e[0])},title:({t})=>t("Download"),action:()=>{},show:So(mt({target:"one",feature:"download"}),(t,e)=>e.target?.type!=="dir"),order:90},{id:xt.rename,title:({t})=>t("Rename"),action:(t,e)=>t.modal.open(Qs,{items:e}),show:mt({target:"one",feature:"rename"}),order:100},{id:xt.move,title:({t})=>t("Move files"),action:(t,e)=>{const n=t.fs,i={storage:n.path.get().storage||"",path:n.path.get().path||"",type:"dir"};t.modal.open(uo,{items:{from:e,to:i}})},show:Co(mt({target:"one",feature:"move"}),mt({target:"many",feature:"move"})),order:110},{id:xt.copy,title:({t})=>t("Copy"),action:(t,e)=>{e.length>0&&t.fs.setClipboard("copy",new Set(e.map(n=>n.path)))},show:Co(mt({target:"one",feature:"copy"}),mt({target:"many",feature:"copy"})),order:120},{id:xt.paste,title:({t})=>t("Paste"),action:(t,e)=>{const n=t.fs.getClipboard();if(n?.items?.size>0){const i=t.fs.path.get();let o=i.path,r=i.storage;e.length===1&&e[0]?.type==="dir"&&(o=e[0].path,r=e[0].storage);const s={storage:r||"",path:o||"",type:"dir"};t.modal.open(n.type==="cut"?uo:gu,{items:{from:Array.from(n.items),to:s}})}},show:(t,e)=>t.features?.copy??!1?t.fs.getClipboard()?.items?.size>0:!1,order:130},{id:xt.archive,title:({t})=>t("Archive"),action:(t,e)=>t.modal.open(Cu,{items:e}),show:Co(mt({target:"many",feature:"archive"}),So(mt({target:"one",feature:"archive"}),(t,e)=>e.target?.mime_type!=="application/zip")),order:140},{id:xt.unarchive,title:({t})=>t("Unarchive"),action:(t,e)=>t.modal.open(Eu,{items:e}),show:mt({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:xt.delete,title:({t})=>t("Delete"),action:(t,e)=>{t.modal.open(Gs,{items:e})},show:Co(mt({feature:"delete",target:"one"}),mt({feature:"delete",target:"many"})),order:160}],CU=["data-theme"],SU={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},xU={class:"vuefinder__external-drop-message"},TU={class:"vuefinder__main__content"},OU=Ce({__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(t,{emit:e}){const n=e,i=t,o=je(),r=In("root"),s=o.config;Oe(()=>i.features,w=>{const E=jg(w);Object.keys(o.features).forEach(b=>{delete o.features[b]}),Object.assign(o.features,E)},{deep:!0});const a=o.fs,l=ke(o.i18n.localeAtom),c=ke(s.state),u=te(()=>{const w=c.value;return{"--vf-grid-item-width":`${w.gridItemWidth}px`,"--vf-grid-item-height":`${w.gridItemHeight}px`,"--vf-grid-item-gap":`${w.gridItemGap}px`,"--vf-grid-icon-size":`${w.gridIconSize}px`,"--vf-list-item-height":`${w.listItemHeight}px`,"--vf-list-item-gap":`${w.listItemGap}px`,"--vf-list-icon-size":`${w.listIconSize}px`}});AL();const{isDraggingExternal:d,handleDragEnter:h,handleDragOver:v,handleDragLeave:f,handleDrop:p}=PL();function _(w){a.setPath(w.dirname),s.get("persist")&&s.set("path",w.dirname),a.setReadOnly(w.read_only??!1),o.modal.close(),a.setFiles(w.files),a.clearSelection(),a.setSelectedCount(0),a.setStorages(w.storages)}o.adapter.onBeforeOpen=()=>{a.setLoading(!0)},o.adapter.onAfterOpen=w=>{_(w),a.setLoading(!1)},o.emitter.on("vf-upload-complete",w=>{n("upload-complete",w)}),o.emitter.on("vf-delete-complete",w=>{n("delete-complete",w)}),o.emitter.on("vf-notify",w=>{n("notify",w)}),o.emitter.on("vf-file-dclick",w=>{n("file-dclick",w)}),o.emitter.on("vf-folder-dclick",w=>{n("folder-dclick",w)}),Oe(()=>i.config?.theme,w=>{w&&s.set("theme",m(w))},{immediate:!0}),Oe(l,(w,E)=>{w!==E&&n("update:locale",String(w))},{immediate:!1}),et(()=>{o.root=r.value,Oe(()=>s.get("path"),E=>{o.adapter.open(E)});const w=s.get("persist")?s.get("path"):s.get("initialPath")??"";a.setPath(w),o.adapter.open(w),a.path.listen(E=>{n("path-change",E.path)}),a.selectedItems.listen(E=>{n("select",E)}),n("ready")});const C=async w=>{const E=await p(w);E.length>0&&(o.modal.open(wu),setTimeout(()=>{o.emitter.emit("vf-external-files-dropped",E.map(b=>b.file))},100))};return(w,E)=>(y(),T("div",{ref_key:"root",ref:r,tabindex:"0",class:Ae(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":m(d)}]),"data-theme":m(o).theme.current,style:At(u.value),onDragenter:E[2]||(E[2]=(...b)=>m(h)&&m(h)(...b)),onDragover:E[3]||(E[3]=(...b)=>m(v)&&m(v)(...b)),onDragleave:E[4]||(E[4]=(...b)=>m(f)&&m(f)(...b)),onDrop:C},[g("div",{class:Ae(m(o).theme.current),style:{height:"100%",width:"100%"}},[g("div",{class:Ae([m(c)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:E[0]||(E[0]=b=>m(o).emitter.emit("vf-contextmenu-hide")),onTouchstart:E[1]||(E[1]=b=>m(o).emitter.emit("vf-contextmenu-hide"))},[m(d)?(y(),T("div",SU,[g("div",xU,L(m(o).i18n.t("Drag and drop the files/folders to here.")),1)])):ue("",!0),m(c).showMenuBar?(y(),ne(tj,{key:1})):ue("",!0),m(c).showToolbar?(y(),ne(i3,{key:2})):ue("",!0),j(q3),g("div",TU,[j(wU),j(RN,{"on-file-dclick":i.onFileDclick,"on-folder-dclick":i.onFolderDclick},{icon:we(b=>[Ve(w.$slots,"icon",wn(Jn(b)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),j(KN,null,{actions:we(b=>[Ve(w.$slots,"status-bar",wn(Jn(b)))]),_:3})],34),(y(),ne(ws,{to:"body"},[j(Up,{name:"fade"},{default:we(()=>[m(o).modal.visible?(y(),ne(Ot(m(o).modal.type),{key:0})):ue("",!0)]),_:1})])),j(DN,{items:m(l_)},null,8,["items"]),m(c).notificationsEnabled?(y(),ne(m(Ek),{key:0,position:m(c).notificationPosition,duration:m(c).notificationDuration,"visible-toasts":m(c).notificationVisibleToasts,"rich-colors":m(c).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):ue("",!0)],2)],46,CU))}}),$U=Ce({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>l_},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(t){const e=t,n=e.id??ko(Gl);if(!n)throw new Error('VueFinderProvider requires an "id" prop.');const i=gM(e,ko("VueFinderOptions")||{});return Oe(()=>e.config,o=>{if(o){const r={};for(const s in o){const a=m(o[s]);a!==void 0&&(r[s]=a)}i.config.init(r)}},{deep:!0,immediate:!0}),Oe(()=>e.locale,o=>{o&&i.i18n.localeAtom&&i.i18n.localeAtom.get()!==o&&i.i18n.localeAtom.set(o)},{immediate:!0}),ZI(n,i),Bp(Gl,n),bs(()=>{eM(n)}),(o,r)=>(y(),ne(OU,wn(Jn(e)),{icon:we(s=>[Ve(o.$slots,"icon",wn(Jn(s)))]),"status-bar":we(s=>[Ve(o.$slots,"status-bar",wn(Jn(s)))]),_:3},16))}});function Az(t){const e=je(t),n=o=>o||e.fs.path.get().path||"",i=o=>{Array.isArray(o.files)&&e.fs.setFiles(o.files)};return{async refresh(){const o=e.fs.path.get().path||"";e.adapter.invalidateListQuery(o),await e.adapter.open(o)},async open(o){await e.adapter.open(o)},preview(o){const r=(e.fs.files.get()||[]).find(s=>s.path===o);!r||r.type!=="file"||e.modal.open(lr,{storage:r.storage,item:r})},notify(o,r){Bi(e,o,r)},getPath(){return e.fs.path.get().path||""},select(o){const r=new Set((e.fs.files.get()||[]).map(a=>a.path)),s=(o||[]).filter(a=>r.has(a));e.fs.setSelection(s)},selectOne(o){new Set((e.fs.files.get()||[]).map(r=>r.path)).has(o)&&e.fs.setSelection([o])},clearSelection(){e.fs.clearSelection()},getSelectedPaths(){return(e.fs.selectedItems.get()||[]).map(o=>o.path)},async createFolder(o,r){const s=await e.adapter.createFolder({path:n(r),name:o});i(s)},async createFile(o,r){const s=await e.adapter.createFile({path:n(r),name:o});i(s)},async delete(o,r){const s=n(r),a=new Map((e.fs.files.get()||[]).map(u=>[u.path,u])),l=(o||[]).map(u=>a.get(u)).filter(u=>!!u).map(u=>({path:u.path,type:u.type})),c=await e.adapter.delete({path:s,items:l});i(c)},async rename(o,r,s){const a=await e.adapter.rename({path:n(s),item:o,name:r});i(a)},async copy(o,r,s){const a=await e.adapter.copy({path:n(s),sources:o,destination:r});i(a)},async move(o,r,s){const a=await e.adapter.move({path:n(s),sources:o,destination:r});i(a)},getFiles(){return e.fs.files.get()||[]},getStorages(){return e.fs.storages.get()||[]},isLoading(){return e.fs.isLoading()},isReadOnly(){return e.fs.getReadOnly()}}}const kU={install(t,e={}){e.i18n=e.i18n??{};const[n]=Object.keys(e.i18n);e.locale=e.locale??n??"en",t.provide("VueFinderOptions",e),t.component("VueFinder",$U)}};function AU(t){t.use(kU,{i18n:{zhCN:()=>nt(()=>import("./zhCN-0_iHo67e.js"),[],import.meta.url),en:()=>nt(()=>import("./en-C_Tot-hO.js"),[],import.meta.url)}})}const PU=()=>{const{i18n:t}=_c;let e=!1,n=null,i=[];async function o(){return e&&n||(e=!0,n=(async()=>{try{return(await ki.v1Token.tokencontrollerRefresh({headers:{[Ti]:wi.generateBearerToken(j0())}})).code===0}catch(p){return console.error(p),!1}finally{e=!1,n=null}})()),n}async function r(p){return l(p)?(vr.error(t.global.t("message.error.loginExpired")),Qi().logoutDialog(),Promise.reject(t.global.t("message.error.loginExpired"))):new Promise((_,C)=>{i.push({resolve:_,reject:C,config:p}),e||o().then(w=>{w?i.forEach(({resolve:E,reject:b,config:S})=>{S.headers[si]=wi.generateBearerToken(is()),a(S),d.request(S).then(E).catch(b)}):(i.forEach(({reject:E})=>E(t.global.t("message.error.refreshFailed"))),vr.error(t.global.t("message.error.loginExpired")),Qi().logoutDialog()),i=[]})})}function s(p){return p.headers[bt.CSRF_TOKEN_HEADER_NAME]=pm.get(bt.CSRF_KEY),p.headers[si]=wi.generateBearerToken(is()),p.headers[bt.ACCEPT_LANGUAGE_HEADER_NAME]=t.global.locale.value,p}function a(p){p.headers["X-Token-Refreshed"]="true"}function l(p){return p.headers["X-Token-Refreshed"]==="true"}async function c(p){if(p.headers[si]){const _=wi.extractBearerToken(p.headers[si]);F0(_),p.config.headers[si]=wi.generateBearerToken(_)}if(p.headers[Ti]){const _=wi.extractBearerToken(p.headers[Ti]);N0(_),p.config.headers[Ti]=wi.generateBearerToken(_)}if(p.data.code===jd.Unauthorized&&!p.config.url?.includes("/api/v1/token/refresh"))return r(p.config);if(p.data.code===jd.Forbidden)return Qi().logoutDialog(),Promise.reject(t.global.t("user.notLoggedIn"));if(p.data.code!==0){const _=p.data.message||t.global.t("message.error.requestFailed");return vr.error(_),Promise.reject(_)}return p.data}function u(p){return console.error(p),vr.error(p.message),Promise.reject(p)}const d=Nd(bt.REMOTE_SERVICE_PREFIX,{baseURL:`/${bt.REMOTE_SERVICE_PREFIX}`});d.interceptors.request.use(s,u),d.interceptors.response.use(c,u);const h=A0(),v=window.__GLOBAL_CONFIG__?.projectHash,f=Nd(bt.LOCAL_SERVICE_PREFIX,{baseURL:`${h}/${v}`});f.interceptors.request.use(s,u),f.interceptors.response.use(c,u)},c_=vi("setting",{state:()=>({dependencies:[],devDependencies:[],packageJson:{}}),getters:{vueVersion:t=>t.dependencies.find(e=>e.name==="vue")?.version||"",deps:t=>[...t.dependencies,...t.devDependencies],compHubVersion:()=>window.__GLOBAL_CONFIG__.version||""},actions:{setDependencies(t){this.$patch(e=>{e.dependencies=t})},setDevDependencies(t){this.$patch(e=>{e.devDependencies=t})},setPackageJson(t){this.$patch(e=>{e.packageJson=t})},async initSetting(){await this.fetchPackageJson(),await this.initPreviewSetting()},async fetchPackageJson(){await aS.v1Comp.compcontrollerPackagejson().then(t=>{const e=t.data?.packageJson??{};this.setPackageJson(e)})},async initPreviewSetting(){const t=Ji(H0,{dependencies:[],devDependencies:[]}),{dependencies:e=[],devDependencies:n=[]}=t.value,i=Object.entries(this.packageJson?.dependencies??{}).map(([r,s])=>{const a=e.find(l=>l.name===r);return{name:r,version:s,match:a?.match??bt.COMP_MATCH_TYPE_AUTO}}),o=Object.entries(this.packageJson?.devDependencies??{}).map(([r,s])=>{const a=n.find(l=>l.name===r);return{name:r,version:s,match:a?.match??bt.COMP_MATCH_TYPE_AUTO}});t.value={dependencies:i,devDependencies:o},this.setDependencies(i),this.setDevDependencies(o)}}}),RU=vi("upgrade",{state:()=>({upgradeInfo:{}}),getters:{isForceUpgrade:t=>t.upgradeInfo.hasUpgrade&&t.upgradeInfo.isForce,isUpgrade:t=>t.upgradeInfo.hasUpgrade,upgradeDesc:t=>t.upgradeInfo.desc,latestVersion:t=>t.upgradeInfo.latestVersion,hasUpgrade:t=>t.upgradeInfo.hasUpgrade},actions:{setUpgradeInfo(t){this.$patch(e=>{e.upgradeInfo=t})},async getUpgradeInfo(){if(Object.keys(this.upgradeInfo).length>0)return;const t=c_(),e=await ki.v2Upgrade.upgradecontrollerv2Check({compHubVersion:t.compHubVersion});this.setUpgradeInfo(e.data)}}});var ns={exports:{}};var IU=ns.exports,Np;function MU(){return Np||(Np=1,(function(t,e){(function(n,i){t.exports=i()})(IU,function(){var n={};n.version="0.2.0";var i=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(f){var p,_;for(p in f)_=f[p],_!==void 0&&f.hasOwnProperty(p)&&(i[p]=_);return this},n.status=null,n.set=function(f){var p=n.isStarted();f=o(f,i.minimum,1),n.status=f===1?null:f;var _=n.render(!p),C=_.querySelector(i.barSelector),w=i.speed,E=i.easing;return _.offsetWidth,a(function(b){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),l(C,s(f,w,E)),f===1?(l(_,{transition:"none",opacity:1}),_.offsetWidth,setTimeout(function(){l(_,{transition:"all "+w+"ms linear",opacity:0}),setTimeout(function(){n.remove(),b()},w)},w)):setTimeout(b,w)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var f=function(){setTimeout(function(){n.status&&(n.trickle(),f())},i.trickleSpeed)};return i.trickle&&f(),this},n.done=function(f){return!f&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(f){var p=n.status;return p?(typeof f!="number"&&(f=(1-p)*o(Math.random()*p,.1,.95)),p=o(p+f,0,.994),n.set(p)):n.start()},n.trickle=function(){return n.inc(Math.random()*i.trickleRate)},(function(){var f=0,p=0;n.promise=function(_){return!_||_.state()==="resolved"?this:(p===0&&n.start(),f++,p++,_.always(function(){p--,p===0?(f=0,n.done()):n.set((f-p)/f)}),this)}})(),n.render=function(f){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var p=document.createElement("div");p.id="nprogress",p.innerHTML=i.template;var _=p.querySelector(i.barSelector),C=f?"-100":r(n.status||0),w=document.querySelector(i.parent),E;return l(_,{transition:"all 0 linear",transform:"translate3d("+C+"%,0,0)"}),i.showSpinner||(E=p.querySelector(i.spinnerSelector),E&&v(E)),w!=document.body&&u(w,"nprogress-custom-parent"),w.appendChild(p),p},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(i.parent),"nprogress-custom-parent");var f=document.getElementById("nprogress");f&&v(f)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var f=document.body.style,p="WebkitTransform"in f?"Webkit":"MozTransform"in f?"Moz":"msTransform"in f?"ms":"OTransform"in f?"O":"";return p+"Perspective"in f?"translate3d":p+"Transform"in f?"translate":"margin"};function o(f,p,_){return f<p?p:f>_?_:f}function r(f){return(-1+f)*100}function s(f,p,_){var C;return i.positionUsing==="translate3d"?C={transform:"translate3d("+r(f)+"%,0,0)"}:i.positionUsing==="translate"?C={transform:"translate("+r(f)+"%,0)"}:C={"margin-left":r(f)+"%"},C.transition="all "+p+"ms "+_,C}var a=(function(){var f=[];function p(){var _=f.shift();_&&_(p)}return function(_){f.push(_),f.length==1&&p()}})(),l=(function(){var f=["Webkit","O","Moz","ms"],p={};function _(b){return b.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(S,x){return x.toUpperCase()})}function C(b){var S=document.body.style;if(b in S)return b;for(var x=f.length,k=b.charAt(0).toUpperCase()+b.slice(1),O;x--;)if(O=f[x]+k,O in S)return O;return b}function w(b){return b=_(b),p[b]||(p[b]=C(b))}function E(b,S,x){S=w(S),b.style[S]=x}return function(b,S){var x=arguments,k,O;if(x.length==2)for(k in S)O=S[k],O!==void 0&&S.hasOwnProperty(k)&&E(b,k,O);else E(b,x[1],x[2])}})();function c(f,p){var _=typeof f=="string"?f:h(f);return _.indexOf(" "+p+" ")>=0}function u(f,p){var _=h(f),C=_+p;c(_,p)||(f.className=C.substring(1))}function d(f,p){var _=h(f),C;c(f,p)&&(C=_.replace(" "+p+" "," "),f.className=C.substring(1,C.length-1))}function h(f){return(" "+(f.className||"")+" ").replace(/\s+/gi," ")}function v(f){f&&f.parentNode&&f.parentNode.removeChild(f)}return n})})(ns)),ns.exports}var DU=MU();const Jl=Fi(DU),{i18n:FU}=_c;function LU(){no.beforeEach(async(t,e)=>{Jl.start();const n=Qo(),i=Qi(),o=c_(),r=RU();if(t.path!==e.path&&(await o.initSetting(),await i.fetchCsrfToken(),await r.getUpgradeInfo()),r.isForceUpgrade&&!t.path.startsWith("/upgrade"))return{path:"/upgrade"};if(t.path===e.path&&t.fullPath!==e.fullPath)return;const s=n.visitedViews.find(a=>a.path===t.path);if(s){if(t.fullPath===s.fullPath)return;const{hash:a="",query:l={}}=t,{query:c={},hash:u=""}=s,d=ty(c);if(!t.redirectedFrom){const h={query:{...d,...l},hash:a||u};return{path:t.path,...h}}}if(i.isAccessTokenExist()){if(t.meta.noAuth){if(t.path.startsWith("/login")){const a=t.query.type==="logout";if(i.isAccessTokenExist()&&!a)return"/"}else i.isRealUserLogin()||await i.fetchWhoAmI();return}if(i.isRealUserLogin()||await i.fetchWhoAmI(),!i.isRealUserLogin())return i.logoutDialog(),!1}else if(!t.meta.noAuth)return i.logoutDialog(),!1}),no.afterEach(t=>{const e=t.meta.title;document.title=FU.global.t(e)||bt.SITE_TITLE,Jl.done()})}Jl.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,parent:"body"});async function jU(t){await b$(),PU(),mm(t),vm(t),bx(t),zx(t),LU(),Bx(),Yx(),y$(t),w$(t),E$(t),AU(t)}async function NU(){const t=nc(I0);await jU(t),t.mount("#app")}NU();export{Az as A,z1 as B,JU as C,H0 as D,A0 as E,qU as F,l_ as G,iz as H,tz as I,rz as J,oz as K,HU as L,sz as M,nd as O,GU as R,XU as S,$1 as T,az as Z,rc as _,Qi as a,ki as b,c_ as c,RU as d,bt as e,X0 as f,Qo as g,YU as h,VU as i,KU as j,nt as k,R2 as l,_c as m,aS as n,Qw as o,W1 as p,WU as q,QU as r,ez as s,M2 as t,BU as u,gc as v,Tb as w,nz as x,ZU as y,zg as z};
23
+ `.concat(-this.coordinates.left/t-s.rotate.left-s.scale.left,"px,").concat(-this.coordinates.top/t-s.rotate.top-s.scale.top,"px) ")+vv(e),this.transitions&&this.transitions.enabled&&(r.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),r}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(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){t.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 t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};_v.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"root",class:r.classes.root,style:r.style},[j("div",{ref:"wrapper",class:r.classes.wrapper,style:r.wrapperStyle},[it(j("img",{ref:"image",src:n.image&&n.image.src,class:r.classes.image,style:r.imageStyle},null,14,["src"]),[[En,n.image&&n.image.src]])],6)],6)};var yv={components:{Preview:_v},inheritAttrs:!1};yv.render=function(t,e,n,i,o,r){var s=ze("preview");return y(),ne(s,We(t.$attrs,{fill:!0}),null,16)};var za=Sn("vue-rectangle-stencil"),bv={name:"RectangleStencil",components:{StencilPreview:yv,BoundingBox:fv,DraggableArea:mv},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Rc}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ic}},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:gt(za({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:gt(za("preview"),this.previewClass),boundingBox:gt(za("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,i=t.left,o=t.top,r={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(i,"px, ").concat(o,"px)")};return this.transitions&&this.transitions.enabled&&(r.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),r}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),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"]};bv.render=function(t,e,n,i,o,r){var s=ze("stencil-preview"),a=ze("draggable-area"),l=ze("bounding-box");return y(),ne("div",{class:r.classes.stencil,style:r.style},[j(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:r.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:r.onResize,onResizeEnd:r.onResizeEnd},{default:we((function(){return[j(a,{movable:n.movable,onMove:r.onMove,onMoveEnd:r.onMoveEnd},{default:we((function(){return[j(s,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:r.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 PP=["transitions"],Bn=Sn("vue-advanced-cropper"),wv={name:"Cropper",components:{BackgroundWrapper:Rl},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return bv}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Rl}},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(t){return cP.indexOf(t)!==-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(t){return!(typeof t=="string"&&t!=="fill"&&t!=="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(t){var e=t.event,n=t.coordinates,i=t.aspectRatio,o=t.positionRestrictions,r=t.sizeRestrictions,s=Re(Re({},n),{right:n.left+n.width,bottom:n.top+n.height}),a=e.params||{},l=Re({},e.directions),c=a.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};r.widthFrozen&&(l.left=0,l.right=0),r.heightFrozen&&(l.top=0,l.bottom=0),Rn.forEach((function(b){c[b]||(l[b]=0)}));var u=An(s,l=Kh({coordinates:s,directions:l,sizeRestrictions:r,positionRestrictions:o})).width,d=An(s,l).height,h=a.preserveRatio?Je(s):ja(u/d,i);if(h){var v=a.respectDirection;if(v||(v=s.width>=s.height||h===1?"width":"height"),v==="width"){var f=u/h-s.height;if(c.top&&c.bottom){var p=l.top,_=l.bottom;l.bottom=Dr(f,_,p),l.top=Dr(f,p,_)}else c.bottom?l.bottom=f:c.top?l.top=f:c.right?l.right=0:c.left&&(l.left=0)}else if(v==="height"){var C=s.width-d*h;if(c.left&&c.right){var w=l.left,E=l.right;l.left=-Dr(C,w,E),l.right=-Dr(C,E,w)}else c.left?l.left=-C:c.right?l.right=-C:c.top?l.top=0:c.bottom&&(l.bottom=0)}l=Kh({directions:l,coordinates:s,sizeRestrictions:r,positionRestrictions:o,preserveRatio:!0,compensate:a.compensate})}return u=An(s,l).width,d=An(s,l).height,(h=a.preserveRatio?Je(s):ja(u/d,i))&&Math.abs(h-u/d)>.001&&Rn.forEach((function(b){c[b]||(l[b]=0)})),Pl({event:new Ac({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:o})}},moveAlgorithm:{type:Function,default:Pl},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,i=Je(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/i+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,i=t.aspectRatio,o=t.sizeRestrictions,r=t.positionRestrictions,s=Re(Re({},n),Xn({width:n.width,height:n.height,aspectRatio:i,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,o.minHeight),minWidth:Math.min(e.width,o.minWidth)}}));return s=Et(s=Wt(s,io(wt(n),wt(s))),Fs(Ln(e),r))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,i=t.getAreaRestrictions,o=t.coordinates,r=Re({},e);r.height=r.width/Je(n),r.top+=(e.height-r.height)/2,(o.height-r.height>0||o.width-r.width>0)&&(r=cn(r,Math.max(o.height/r.height,o.width/r.width)));var s=Ms(ro(o,Ln(r=cn(r,Ds(r,i({visibleArea:r,type:"resize"}))))));return r.width<o.width&&(s.left=0),r.height<o.height&&(s.top=0),r=Et(r=Wt(r,s),i({visibleArea:r,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,i=t.imageSize,o=t.imageRestriction,r=t.type,s={};return o==="fill-area"?s={left:0,top:0,right:i.width,bottom:i.height}:o==="fit-area"&&(Je(n)>Je(i)?(s={top:0,bottom:i.height},e&&r==="move"&&(e.width>i.width?(s.left=-(e.width-i.width)/2,s.right=i.width-s.left):(s.left=0,s.right=i.width))):(s={left:0,right:i.width},e&&r==="move"&&(e.height>i.height?(s.top=-(e.height-i.height)/2,s.bottom=i.height-s.top):(s.top=0,s.bottom=i.height)))),s}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.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:Xe({},Bh)}},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 t=(function(e){return e*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=kl(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:kl(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},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 t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:_t(this.minWidth)?0:Ir(this.minWidth),minHeight:_t(this.minHeight)?0:Ir(this.minHeight),maxWidth:_t(this.maxWidth)?1/0:Ir(this.maxWidth),maxHeight:_t(this.maxHeight)?1/0:Ir(this.maxHeight)});if(t=(function(i){var o=i.areaRestrictions,r=i.sizeRestrictions,s=i.boundaries,a=i.positionRestrictions,l=Re(Re({},r),{minWidth:r.minWidth!==void 0?r.minWidth:0,minHeight:r.minHeight!==void 0?r.minHeight:0,maxWidth:r.maxWidth!==void 0?r.maxWidth:1/0,maxHeight:r.maxHeight!==void 0?r.maxHeight:1/0});a.left!==void 0&&a.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,a.right-a.left)),a.bottom!==void 0&&a.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,a.bottom-a.top));var c=Al(o),u=dv(s,c);return c.width<1/0&&(!l.maxWidth||l.maxWidth>u.width)&&(l.maxWidth=Math.min(l.maxWidth,u.width)),c.height<1/0&&(!l.maxHeight||l.maxHeight>u.height)&&(l.maxHeight=Math.min(l.maxHeight,u.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l})({sizeRestrictions:t,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 e=this.getStencilSize(),n=Al(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Bn(),image:gt(Bn("image"),this.imageClass),stencil:Bn("stencil"),boundaries:gt(Bn("boundaries"),this.boundariesClass),stretcher:gt(Bn("stretcher")),background:gt(Bn("background"),this.backgroundClass),foreground:gt(Bn("foreground"),this.foregroundClass),imageWrapper:gt(Bn("image-wrapper")),cropperWrapper:gt(Bn("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,i=t.left,o=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(o-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={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||(t.opacity="0"),t},imageStyle:function(){var t=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)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},i=Xe(Xe({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),o={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+vv(i)};return this.transitionsOptions.enabled&&(o.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),o}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick((function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return t[n]!==e[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=$l(this.update,this.debounce),this.debouncedDisableTransitions=$l(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 t=this.initialized?this.prepareResult(Xe({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:Xe({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?Xe({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?Xe({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,o=i===void 0||i;this.onManipulateImage(new Oo({},{factor:1/t,center:e}),{normalize:!1,transitions:o})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,o=i===void 0||i;this.onManipulateImage(new Oo({left:t||0,top:e||0}),{normalize:!1,transitions:o})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.autoZoom,o=i===void 0||i,r=n.transitions,s=r===void 0||r;this.$nextTick((function(){e.imageLoaded?(e.transitionsActive||(s&&e.enableTransitions(),e.coordinates=e.applyTransform(t),o&&e.runAutoZoom("setCoordinates"),s&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t}))},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then((function(){t.onChange()})):this.resetVisibleArea().then((function(){t.onChange()}))},reset:function(){var t=this;return this.resetVisibleArea().then((function(){t.onChange(!1)}))},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){t(),e.awaiting=!1})))},prepareResult:function(t){return this.roundResult?(function(e){var n=e.coordinates,i=e.sizeRestrictions,o=e.positionRestrictions,r={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return r.width>i.maxWidth?r.width=Math.floor(n.width):r.width<i.minWidth&&(r.width=Math.ceil(n.width)),r.height>i.maxHeight?r.height=Math.floor(n.height):r.height<i.minHeight&&(r.height=Math.ceil(n.height)),Et(r,o)})(Xe(Xe({},this.getPublicProperties()),{},{positionRestrictions:Mr(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,i){var o=this.autoZoomAlgorithm;o||(o=this.stencilSize?hP:this.autoZoom?pP:fP);var r=o({event:{type:t,params:i},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return Xe(Xe({},r),{},{changed:!Hh(r.visibleArea,e)||!Hh(r.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,i=n!==void 0&&n,o=tP(e,PP),r=this.processAutoZoom(t,this.visibleArea,this.coordinates,o),s=r.visibleArea,a=r.coordinates,l=r.changed;i&&l&&this.enableTransitions(),this.visibleArea=s,this.coordinates=a,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return(function(e){var n=e.event,i=e.visibleArea,o=e.coefficient;if(n.type==="manipulateImage")return Re(Re({},n),{move:{left:n.move&&n.move.left?o*n.move.left:0,top:n.move&&n.move.top?o*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*o+i.left,top:n.scale.center.top*o+i.top}:null}});if(n.type==="resize"){var r=Re(Re({},n),{directions:Re({},n.directions)});return Rn.forEach((function(a){r.directions[a]*=o})),r}if(n.type==="move"){var s=Re(Re({},n),{directions:Re({},n.directions)});return lP.forEach((function(a){s.directions[a]*=o})),s}return n})(Xe(Xe({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(a,l,c){var u=c.rotate,d=c.flip,h={width:l.naturalWidth,height:l.naturalHeight},v=hv(h,u),f=a.getContext("2d");a.height=v.height,a.width=v.width,f.save();var p=ai(wt(Re({left:0,top:0},h)),u);return f.translate(-(p.left-v.width/2),-(p.top-v.height/2)),f.rotate(u*Math.PI/180),f.translate(d.horizontal?h.width:0,d.vertical?h.height:0),f.scale(d.horizontal?-1:1,d.vertical?-1:1),f.drawImage(l,0,0,h.width,h.height),f.restore(),a})(this.$refs.sourceCanvas,e,this.imageTransforms):e,i=Xe({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),o=function(a){return a.find((function(l){return c=l,!Number.isNaN(parseFloat(c))&&isFinite(c);var c}))},r=Xn({sizeRestrictions:{minWidth:o([i.width,i.minWidth])||0,minHeight:o([i.height,i.minHeight])||0,maxWidth:o([i.width,i.maxWidth])||1/0,maxHeight:o([i.height,i.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(i.maxArea&&r.width*r.height>i.maxArea){var s=Math.sqrt(i.maxArea/(r.width*r.height));r={width:Math.round(s*r.width),height:Math.round(s*r.height)}}return(function(a,l,c,u,d){a.width=u?u.width:c.width,a.height=u?u.height:c.height;var h=a.getContext("2d");h.clearRect(0,0,a.width,a.height),d&&(d.imageSmoothingEnabled&&(h.imageSmoothingEnabled=d.imageSmoothingEnabled),d.imageSmoothingQuality&&(h.imageSmoothingQuality=d.imageSmoothingQuality),d.fillColor&&(h.fillStyle=d.fillColor,h.fillRect(0,0,a.width,a.height),h.save()));var v=c.left<0?-c.left:0,f=c.top<0?-c.top:0;h.drawImage(l,c.left+v,c.top+f,c.width,c.height,v*(a.width/c.width),f*(a.height/c.height),a.width,a.height)})(t,n,this.coordinates,r,i),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?uP(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&e?Mr(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return dP({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?gP:vP);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var i=Ni(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,o=this.defaultPosition||mP,r=[i,function(s){var a=s.coordinates;return Xe({},Ni(o)?o({coordinates:a,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&r.push.apply(r,Mi(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(r,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout((function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then((function(){var i={cropper:n,imageSize:t.imageSize};if(Ni(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(i):t.defaultBoundaries==="fit"?t.boundaries=(function(o){var r=o.cropper,s=o.imageSize,a=r.clientHeight,l=r.clientWidth,c=a,u=s.width*a/s.height;return u>l&&(u=l,c=s.height*l/s.width),{width:u,height:c}})(i):t.boundaries=(function(o){var r=o.cropper;return{width:r.clientWidth,height:r.clientHeight}})(i),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=Xe(Xe({},this.defaultImageTransforms),{},{flip:Xe({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,i,o,r,s,a=t.defaultVisibleArea||_P;t.visibleArea=Ni(a)?a({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,i=e.boundaries,o=e.getAreaRestrictions,r=Re({},n),s=Je(i),r.width/r.height!==s&&(r.height=r.width/s),Et(r,o({visibleArea:r,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")})).catch((function(){t.visibleArea=null}))},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then((function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")})).catch((function(){t.visibleArea=null}))},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(o){if(zh(o))return!1;var r=window.location,s=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(o)||[],a={protocol:s[1]||"",host:s[2]||"",port:s[3]||""},l=function(c){return c.port||((c.protocol||r.protocol)==="http"?80:433)};return!(!a.protocol&&!a.host&&!a.port||a.protocol&&a.protocol==r.protocol&&a.host&&a.host==r.host&&a.host&&l(a)==l(r))})(this.src)){var n=_t(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var i=(t=this.src,new Promise((function(o){kP(t).then((function(r){var s=AP(r);o(r?{source:t,arrayBuffer:r,orientation:s}:{source:t,arrayBuffer:null,orientation:null})})).catch((function(r){console.warn(r),o({source:t,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){i.then(e.onParseImage)}),this.transitionTime)}else setTimeout((function(){e.onParseImage({source:e.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){t.$emit("ready"),t.onChange(!1)})))},onParseImage:function(t){var e=this,n=t.source,i=t.arrayBuffer,o=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&o&&o>1?sv(n)||!zh(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(r){for(var s=[],a=new Uint8Array(r);a.length>0;){var l=a.subarray(0,8192);s.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),a=a.subarray(8192)}return"data:image/jpeg;base64,"+btoa(s.join(""))})(i):this.imageAttributes.src=n,Ni(this.defaultTransforms)?this.appliedImageTransforms=Ua(this.defaultTransforms()):Xr(this.defaultTransforms)?this.appliedImageTransforms=Ua(this.defaultTransforms):this.appliedImageTransforms=(function(r){var s=Ua({});if(r)switch(r){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})(o),this.defaultImageTransforms=Xe(Xe({},this.appliedImageTransforms),{},{flip:Xe({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var r=e.$refs.image;r&&r.complete&&((function(s){return!!s.naturalWidth})(r)?e.onSuccessLoadImage():e.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender((function(){e.coordinates=e.moveAlgorithm(Xe(Xe({},e.getPublicProperties()),{},{positionRestrictions:Mr(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()}))},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=e.sizeRestrictions,i=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(Xe(Xe({},e.getPublicProperties()),{},{positionRestrictions:Mr(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,i),minHeight:Math.max(n.minHeight,i)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1}))},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,i=n!==void 0&&n,o=e.normalize,r=o===void 0||o;i&&this.enableTransitions();var s=yP(Xe(Xe({},this.getPublicProperties()),{},{event:r?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),a=s.visibleArea,l=s.coordinates;this.visibleArea=a,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,i=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:i})},getAspectRatio:function(t){var e,n,i=this.stencilProps,o=i.aspectRatio,r=i.minAspectRatio,s=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var a=this.$refs.stencil.aspectRatios();e=a.minimum,n=a.maximum}if(_t(e)&&(e=_t(o)?r:o),_t(n)&&(n=_t(o)?s:o),!t&&(_t(e)||_t(n))){var l=this.getStencilSize(),c=l?Je(l):null;_t(e)&&(e=Vh(c)?c:void 0),_t(n)&&(n=Vh(c)?c:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={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)},e=t.boundaries,n=t.stencilSize,i=t.aspectRatio,ja(Je(o=Ni(n)?n({boundaries:e,aspectRatio:i}):n),i)&&(o=Xn({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:o.width,height:o.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(o.width>e.width||o.height>e.height)&&(o=Xn({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:o.width,height:o.height,aspectRatio:{minimum:Je(o),maximum:Je(o)}})),o;var t,e,n,i,o},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 Xe({},Bh)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=Xe({},this.imageTransforms.flip),s=wP({flip:{horizontal:t?!r.horizontal:r.horizontal,vertical:e?!r.vertical:r.vertical},previousFlip:r,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()}),a=s.visibleArea,l=s.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=a,this.coordinates=l,this.onChange(),o&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,i=n===void 0||n;if(!this.transitionsActive){i&&this.enableTransitions();var o=Xe({},this.imageSize);this.appliedImageTransforms.rotate+=t;var r=bP({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:o,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=r.visibleArea,a=r.coordinates,l=this.processAutoZoom("rotateImage",s,a);s=l.visibleArea,a=l.coordinates,this.visibleArea=s,this.coordinates=a,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},RP={key:0,ref:"canvas",style:{display:"none"}},IP={key:1,ref:"sourceCanvas",style:{display:"none"}};wv.render=function(t,e,n,i,o,r){return y(),ne("div",{ref:"cropper",class:r.classes.cropper},[j("div",{ref:"stretcher",class:r.classes.stretcher},null,2),j("div",{class:r.classes.boundaries,style:r.boundariesStyle},[(y(),ne(Ot(n.backgroundWrapperComponent),{class:r.classes.cropperWrapper,"wheel-resize":r.settings.resizeImage.wheel,"touch-resize":r.settings.resizeImage.touch,"touch-move":r.settings.moveImage.touch,"mouse-move":r.settings.moveImage.mouse,onMove:r.onManipulateImage,onResize:r.onManipulateImage},{default:we((function(){return[j("div",{class:r.classes.background,style:r.boundariesStyle},null,6),j("div",{class:r.classes.imageWrapper},[j("img",{ref:"image",crossorigin:o.imageAttributes.crossOrigin,src:o.imageAttributes.src,class:r.classes.image,style:r.imageStyle,onMousedown:e[1]||(e[1]=Ye((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),j("div",{class:r.classes.foreground,style:r.boundariesStyle},null,6),it((y(),ne(Ot(n.stencilComponent),We({ref:"stencil",image:r.image,coordinates:o.coordinates,"stencil-coordinates":r.stencilCoordinates,transitions:r.transitionsOptions},n.stencilProps,{onResize:r.onResize,onResizeEnd:r.onResizeEnd,onMove:r.onMove,onMoveEnd:r.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[En,o.imageLoaded]]),n.canvas?(y(),ne("canvas",RP,null,512)):ue("",!0),n.canvas?(y(),ne("canvas",IP,null,512)):ue("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const _i=typeof window<"u",Ev=_i&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),Cv=_i&&window.devicePixelRatio>1,MP={elements_selector:".lazy",container:Ev||_i?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},Sv=t=>Object.assign({},MP,t),Gh=function(t,e){let n;const i="LazyLoad::Initialized",o=new t(e);try{n=new CustomEvent(i,{detail:{instance:o}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(i,!1,!1,{instance:o})}window.dispatchEvent(n)},DP=(t,e)=>{if(e)if(e.length)for(let n,i=0;n=e[i];i+=1)Gh(t,n);else Gh(t,e)},ei="src",Mc="srcset",Dc="sizes",xv="poster",or="llOriginalAttrs",Tv="data",Fc="loading",Ov="loaded",$v="applied",FP="entered",Lc="error",kv="native",Av="data-",Pv="ll-status",Kt=(t,e)=>t.getAttribute(Av+e),LP=(t,e,n)=>{const i=Av+e;n!==null?t.setAttribute(i,n):t.removeAttribute(i)},rr=t=>Kt(t,Pv),Li=(t,e)=>LP(t,Pv,e),Ls=t=>Li(t,null),jc=t=>rr(t)===null,jP=t=>rr(t)===Fc,NP=t=>rr(t)===Lc,Nc=t=>rr(t)===kv,UP=[Fc,Ov,$v,Lc],zP=t=>UP.indexOf(rr(t))>=0,yi=(t,e,n,i)=>{t&&typeof t=="function"&&(i===void 0?n===void 0?t(e):t(e,n):t(e,n,i))},fo=(t,e)=>{_i&&e!==""&&t.classList.add(e)},Pn=(t,e)=>{_i&&e!==""&&t.classList.remove(e)},VP=t=>{t.llTempImage=document.createElement("IMG")},BP=t=>{delete t.llTempImage},Rv=t=>t.llTempImage,js=(t,e)=>{if(!e)return;const n=e._observer;n&&n.unobserve(t)},HP=t=>{t.disconnect()},qP=(t,e,n)=>{e.unobserve_entered&&js(t,n)},Uc=(t,e)=>{t&&(t.loadingCount+=e)},WP=t=>{t&&(t.toLoadCount-=1)},Iv=(t,e)=>{t&&(t.toLoadCount=e)},KP=t=>t.loadingCount>0,YP=t=>t.toLoadCount>0,Mv=t=>{let e=[];for(let n,i=0;n=t.children[i];i+=1)n.tagName==="SOURCE"&&e.push(n);return e},zc=(t,e)=>{const n=t.parentNode;n&&n.tagName==="PICTURE"&&Mv(n).forEach(e)},Dv=(t,e)=>{Mv(t).forEach(e)},Ns=[ei],Fv=[ei,xv],Uo=[ei,Mc,Dc],Lv=[Tv],Us=t=>!!t[or],jv=t=>t[or],Nv=t=>delete t[or],so=(t,e)=>{if(Us(t))return;const n={};e.forEach((i=>{n[i]=t.getAttribute(i)})),t[or]=n},GP=t=>{Us(t)||(t[or]={backgroundImage:t.style.backgroundImage})},Di=(t,e)=>{if(!Us(t))return;const n=jv(t);e.forEach((i=>{((o,r,s)=>{s?o.setAttribute(r,s):o.removeAttribute(r)})(t,i,n[i])}))},QP=t=>{if(!Us(t))return;const e=jv(t);t.style.backgroundImage=e.backgroundImage},Uv=(t,e,n)=>{fo(t,e.class_applied),Li(t,$v),n&&(e.unobserve_completed&&js(t,e),yi(e.callback_applied,t,n))},zv=(t,e,n)=>{fo(t,e.class_loading),Li(t,Fc),n&&(Uc(n,1),yi(e.callback_loading,t,n))},ui=(t,e,n)=>{n&&t.setAttribute(e,n)},Qh=(t,e)=>{ui(t,Dc,Kt(t,e.data_sizes)),ui(t,Mc,Kt(t,e.data_srcset)),ui(t,ei,Kt(t,e.data_src))},XP=(t,e)=>{zc(t,(n=>{so(n,Uo),Qh(n,e)})),so(t,Uo),Qh(t,e)},JP=(t,e)=>{so(t,Ns),ui(t,ei,Kt(t,e.data_src))},ZP=(t,e)=>{Dv(t,(n=>{so(n,Ns),ui(n,ei,Kt(n,e.data_src))})),so(t,Fv),ui(t,xv,Kt(t,e.data_poster)),ui(t,ei,Kt(t,e.data_src)),t.load()},eR=(t,e)=>{so(t,Lv),ui(t,Tv,Kt(t,e.data_src))},tR=(t,e,n)=>{const i=Kt(t,e.data_bg),o=Kt(t,e.data_bg_hidpi),r=Cv&&o?o:i;r&&(t.style.backgroundImage=`url("${r}")`,Rv(t).setAttribute(ei,r),zv(t,e,n))},nR=(t,e,n)=>{const i=Kt(t,e.data_bg_multi),o=Kt(t,e.data_bg_multi_hidpi),r=Cv&&o?o:i;r&&(t.style.backgroundImage=r,Uv(t,e,n))},iR=(t,e,n)=>{const i=Kt(t,e.data_bg_set);if(!i)return;let o=i.split("|").map((r=>`image-set(${r})`));t.style.backgroundImage=o.join(),Uv(t,e,n)},Vv={IMG:XP,IFRAME:JP,VIDEO:ZP,OBJECT:eR},oR=(t,e)=>{const n=Vv[t.tagName];n&&n(t,e)},rR=(t,e,n)=>{const i=Vv[t.tagName];i&&(i(t,e),zv(t,e,n))},sR=["IMG","IFRAME","VIDEO","OBJECT"],aR=t=>sR.indexOf(t.tagName)>-1,Bv=(t,e)=>{!e||KP(e)||YP(e)||yi(t.callback_finish,e)},Xh=(t,e,n)=>{t.addEventListener(e,n),t.llEvLisnrs[e]=n},lR=(t,e,n)=>{t.removeEventListener(e,n)},Vc=t=>!!t.llEvLisnrs,cR=(t,e,n)=>{Vc(t)||(t.llEvLisnrs={});const i=t.tagName==="VIDEO"?"loadeddata":"load";Xh(t,i,e),Xh(t,"error",n)},Il=t=>{if(!Vc(t))return;const e=t.llEvLisnrs;for(let n in e){const i=e[n];lR(t,n,i)}delete t.llEvLisnrs},Hv=(t,e,n)=>{BP(t),Uc(n,-1),WP(n),Pn(t,e.class_loading),e.unobserve_completed&&js(t,n)},uR=(t,e,n,i)=>{const o=Nc(e);Hv(e,n,i),fo(e,n.class_loaded),Li(e,Ov),yi(n.callback_loaded,e,i),o||Bv(n,i)},dR=(t,e,n,i)=>{const o=Nc(e);Hv(e,n,i),fo(e,n.class_error),Li(e,Lc),yi(n.callback_error,e,i),n.restore_on_error&&Di(e,Uo),o||Bv(n,i)},Ml=(t,e,n)=>{const i=Rv(t)||t;Vc(i)||cR(i,(o=>{uR(0,t,e,n),Il(i)}),(o=>{dR(0,t,e,n),Il(i)}))},Dl=(t,e,n)=>{aR(t)?((i,o,r)=>{Ml(i,o,r),rR(i,o,r)})(t,e,n):((i,o,r)=>{VP(i),Ml(i,o,r),GP(i),tR(i,o,r),nR(i,o,r),iR(i,o,r)})(t,e,n)},hR=(t,e,n)=>{t.setAttribute("loading","lazy"),Ml(t,e,n),oR(t,e),Li(t,kv)},Jh=t=>{t.removeAttribute(ei),t.removeAttribute(Mc),t.removeAttribute(Dc)},pR=t=>{zc(t,(e=>{Jh(e)})),Jh(t)},qv=t=>{zc(t,(e=>{Di(e,Uo)})),Di(t,Uo)},fR=t=>{Dv(t,(e=>{Di(e,Ns)})),Di(t,Fv),t.load()},mR=t=>{Di(t,Ns)},vR=t=>{Di(t,Lv)},gR={IMG:qv,IFRAME:mR,VIDEO:fR,OBJECT:vR},_R=(t,e)=>{(n=>{const i=gR[n.tagName];i?i(n):QP(n)})(t),((n,i)=>{jc(n)||Nc(n)||(Pn(n,i.class_entered),Pn(n,i.class_exited),Pn(n,i.class_applied),Pn(n,i.class_loading),Pn(n,i.class_loaded),Pn(n,i.class_error))})(t,e),Ls(t),Nv(t)},yR=(t,e,n,i)=>{n.cancel_on_exit&&jP(t)&&t.tagName==="IMG"&&(Il(t),pR(t),qv(t),Pn(t,n.class_loading),Uc(i,-1),Ls(t),yi(n.callback_cancel,t,e,i))},bR=(t,e,n,i)=>{const o=zP(t);Li(t,FP),fo(t,n.class_entered),Pn(t,n.class_exited),qP(t,n,i),yi(n.callback_enter,t,e,i),o||Dl(t,n,i)},wR=(t,e,n,i)=>{jc(t)||(fo(t,n.class_exited),yR(t,e,n,i),yi(n.callback_exit,t,e,i))},ER=["IMG","IFRAME","VIDEO"],Wv=t=>t.use_native&&"loading"in HTMLImageElement.prototype,CR=(t,e,n)=>{t.forEach((i=>{ER.indexOf(i.tagName)!==-1&&hR(i,e,n)})),Iv(n,0)},SR=t=>t.isIntersecting||t.intersectionRatio>0,xR=(t,e)=>{e.forEach((n=>{t.observe(n)}))},TR=(t,e)=>{HP(t),xR(t,e)},OR=(t,e)=>{Wv(t)||(e._observer=new IntersectionObserver((n=>{((i,o,r)=>{i.forEach((s=>SR(s)?bR(s.target,s,o,r):wR(s.target,s,o,r)))})(n,t,e)}),(n=>({root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))(t)))},Kv=t=>Array.prototype.slice.call(t),cs=t=>t.container.querySelectorAll(t.elements_selector),$R=t=>Kv(t).filter(jc),kR=t=>NP(t),AR=t=>Kv(t).filter(kR),Zh=(t,e)=>$R(t||cs(e)),PR=(t,e)=>{AR(cs(t)).forEach((n=>{Pn(n,t.class_error),Ls(n)})),e.update()},RR=(t,e)=>{_i&&(e._onlineHandler=()=>{PR(t,e)},window.addEventListener("online",e._onlineHandler))},IR=t=>{_i&&window.removeEventListener("online",t._onlineHandler)},Hi=function(t,e){const n=Sv(t);this._settings=n,this.loadingCount=0,OR(n,this),RR(n,this),this.update(e)};Hi.prototype={update:function(t){const e=this._settings,n=Zh(t,e);Iv(this,n.length),Ev?this.loadAll(n):Wv(e)?CR(n,e,this):TR(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),IR(this),cs(this._settings).forEach((t=>{Nv(t)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){const e=this._settings;Zh(t,e).forEach((n=>{js(n,this),Dl(n,e,this)}))},restoreAll:function(){const t=this._settings;cs(t).forEach((e=>{_R(e,t)}))}},Hi.load=(t,e)=>{const n=Sv(e);Dl(t,n)},Hi.resetStatus=t=>{Ls(t)},_i&&DP(Hi,window.lazyLoadOptions);const Xt=(t,e)=>{const{o:n,i,u:o}=t;let r=n,s;const a=(u,d)=>{const h=r,v=u,f=d||(i?!i(h,v):h!==v);return(f||o)&&(r=v,s=h),[r,f,s]};return[e?u=>a(e(r,s),u):a,u=>[r,!!u,s]]},MR=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,Bt=MR?window:{},Yv=Math.max,DR=Math.min,Fl=Math.round,li=Math.abs,ep=Math.sign,Bc=Bt.cancelAnimationFrame,zo=Bt.requestAnimationFrame,Hc=Bt.setTimeout,Gv=Bt.clearTimeout,zs=t=>typeof Bt[t]<"u"?Bt[t]:void 0,FR=zs("MutationObserver"),tp=zs("IntersectionObserver"),qi=zs("ResizeObserver"),To=zs("ScrollTimeline"),qc=t=>t===void 0,Vs=t=>t===null,di=t=>typeof t=="number",mo=t=>typeof t=="string",Bs=t=>typeof t=="boolean",xn=t=>typeof t=="function",dn=t=>Array.isArray(t),us=t=>typeof t=="object"&&!dn(t)&&!Vs(t),Wc=t=>{const e=!!t&&t.length,n=di(e)&&e>-1&&e%1==0;return dn(t)||!xn(t)&&n?e>0&&us(t)?e-1 in t:!0:!1},Vo=t=>!!t&&t.constructor===Object,ds=t=>t instanceof HTMLElement,Hs=t=>t instanceof Element;function ot(t,e){if(Wc(t))for(let n=0;n<t.length&&e(t[n],n,t)!==!1;n++);else t&&ot(Object.keys(t),(n=>e(t[n],n,t)));return t}const Qv=(t,e)=>t.indexOf(e)>=0,ao=(t,e)=>t.concat(e),ct=(t,e,n)=>(!mo(e)&&Wc(e)?Array.prototype.push.apply(t,e):t.push(e),t),bi=t=>Array.from(t||[]),Kc=t=>dn(t)?t:!mo(t)&&Wc(t)?bi(t):[t],hs=t=>!!t&&!t.length,ps=t=>bi(new Set(t)),Zt=(t,e,n)=>{ot(t,o=>o?o.apply(void 0,e||[]):!0),n||(t.length=0)},Xv="paddingTop",Jv="paddingRight",Zv="paddingLeft",eg="paddingBottom",tg="marginLeft",ng="marginRight",ig="marginBottom",Yc="overflowX",Gc="overflowY",sr="width",ar="height",Yn="visible",yn="hidden",Pi="scroll",LR=t=>{const e=String(t||"");return e?e[0].toUpperCase()+e.slice(1):""},qs=(t,e,n,i)=>{if(t&&e){let o=!0;return ot(n,(r=>{const s=t[r],a=e[r];s!==a&&(o=!1)})),o}return!1},Qc=(t,e)=>qs(t,e,["w","h"]),Jr=(t,e)=>qs(t,e,["x","y"]),jR=(t,e)=>qs(t,e,["t","r","b","l"]),Le=(t,...e)=>t.bind(0,...e),Wi=t=>{let e;const n=t?Hc:zo,i=t?Gv:Bc;return[o=>{i(e),e=n((()=>o()),xn(t)?t():t)},()=>i(e)]},np=t=>{const e=xn(t)?t():t;if(di(e)){const n=e?Hc:zo,i=e?Gv:Bc;return o=>{const r=n((()=>o()),e);return()=>{i(r)}}}return e&&e._},og=(t,e)=>{const{p:n,v:i,S:o,m:r}=e||{};let s,a,l,c;const u=function(p){a&&a(),s&&s(),c=a=s=l=void 0,t.apply(this,p)},d=f=>r&&l?r(l,f):f,h=()=>{a&&l&&u(d(l)||l)},v=function(){const p=bi(arguments),_=np(n);if(_){const C=typeof o=="function"?o():o,w=np(i),b=d(p)||p,S=u.bind(0,b);a&&a(),C&&!c?(S(),c=!0,a=_((()=>c=void 0))):(a=_(S),w&&!s&&(s=w(h))),l=b}else u(p)};return v.O=h,v},rg=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ut=t=>t?Object.keys(t):[],Ze=(t,e,n,i,o,r,s)=>{const a=[e,n,i,o,r,s];return(typeof t!="object"||Vs(t))&&!xn(t)&&(t={}),ot(a,(l=>{ot(l,((c,u)=>{const d=l[u];if(t===d)return!0;const h=dn(d);if(d&&Vo(d)){const v=t[u];let f=v;h&&!dn(v)?f=[]:!h&&!Vo(v)&&(f={}),t[u]=Ze(f,d)}else t[u]=h?d.slice():d}))})),t},sg=(t,e)=>ot(Ze({},t),((n,i,o)=>{n===void 0?delete o[i]:n&&Vo(n)&&(o[i]=sg(n))})),Xc=t=>!Ut(t).length,Bo=()=>{},ag=(t,e,n)=>Yv(t,DR(e,n)),Ri=t=>ps((dn(t)?t:(t||"").split(" ")).filter((e=>e))),Jc=(t,e)=>t&&t.getAttribute(e),ip=(t,e)=>t&&t.hasAttribute(e),Wn=(t,e,n)=>{ot(Ri(e),(i=>{t&&t.setAttribute(i,String(n||""))}))},$n=(t,e)=>{ot(Ri(e),(n=>t&&t.removeAttribute(n)))},Ws=(t,e)=>{const n=Ri(Jc(t,e)),i=Le(Wn,t,e),o=(r,s)=>{const a=new Set(n);return ot(Ri(r),(l=>{a[s](l)})),bi(a).join(" ")};return{C:r=>i(o(r,"delete")),$:r=>i(o(r,"add")),H:r=>{const s=Ri(r);return s.reduce(((a,l)=>a&&n.includes(l)),s.length>0)}}},lg=(t,e,n)=>(Ws(t,e).C(n),Le(Zc,t,e,n)),Zc=(t,e,n)=>(Ws(t,e).$(n),Le(lg,t,e,n)),fs=(t,e,n,i)=>(i?Zc:lg)(t,e,n),eu=(t,e,n)=>Ws(t,e).H(n),cg=t=>Ws(t,"class"),ug=(t,e)=>{cg(t).C(e)},Ks=(t,e)=>(cg(t).$(e),Le(ug,t,e)),dg=(t,e)=>{const n=e?Hs(e)&&e:document;return n?bi(n.querySelectorAll(t)):[]},NR=(t,e)=>{const n=e?Hs(e)&&e:document;return n&&n.querySelector(t)},Ll=(t,e)=>Hs(t)&&t.matches(e),hg=t=>Ll(t,"body"),jl=t=>t?bi(t.childNodes):[],Ho=t=>t&&t.parentElement,Ki=(t,e)=>Hs(t)&&t.closest(e),Nl=t=>document.activeElement,UR=(t,e,n)=>{const i=Ki(t,e),o=t&&NR(n,i),r=Ki(o,e)===i;return i&&o?i===t||o===t||r&&Ki(Ki(t,n),e)!==i:!1},lo=t=>{ot(Kc(t),(e=>{const n=Ho(e);e&&n&&n.removeChild(e)}))},It=(t,e)=>Le(lo,t&&e&&ot(Kc(e),(n=>{n&&t.appendChild(n)})));let pg;const zR=()=>pg,VR=t=>{pg=t},Xi=t=>{const e=document.createElement("div");return Wn(e,"class",t),e},tu=t=>{const e=Xi(),n=zR(),i=t.trim();return e.innerHTML=n?n.createHTML(i):i,ot(jl(e),(o=>lo(o)))},op=(t,e)=>t.getPropertyValue(e)||t[e]||"",fg=t=>{const e=t||0;return isFinite(e)?e:0},Lr=t=>fg(parseFloat(t||"")),Ul=t=>Math.round(t*1e4)/1e4,mg=t=>`${Ul(fg(t))}px`;function co(t,e){t&&e&&ot(e,((n,i)=>{try{const o=t.style,r=Vs(n)||Bs(n)?"":di(n)?mg(n):n;i.indexOf("--")===0?o.setProperty(i,r):o[i]=r}catch{}}))}function jn(t,e,n){const i=mo(e);let o=i?"":{};if(t){const r=Bt.getComputedStyle(t,n)||t.style;o=i?op(r,e):bi(e).reduce(((s,a)=>(s[a]=op(r,a),s)),o)}return o}const rp=(t,e,n)=>{const i=e?`${e}-`:"",o=n?`-${n}`:"",r=`${i}top${o}`,s=`${i}right${o}`,a=`${i}bottom${o}`,l=`${i}left${o}`,c=jn(t,[r,s,a,l]);return{t:Lr(c[r]),r:Lr(c[s]),b:Lr(c[a]),l:Lr(c[l])}},Va=(t,e)=>`translate${us(t)?`(${t.x},${t.y})`:`${e?"X":"Y"}(${t})`}`,BR=t=>!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length),HR={w:0,h:0},Ys=(t,e)=>e?{w:e[`${t}Width`],h:e[`${t}Height`]}:HR,qR=t=>Ys("inner",t||Bt),hi=Le(Ys,"offset"),vg=Le(Ys,"client"),ms=Le(Ys,"scroll"),nu=t=>{const e=parseFloat(jn(t,sr))||0,n=parseFloat(jn(t,ar))||0;return{w:e-Fl(e),h:n-Fl(n)}},Ba=t=>t.getBoundingClientRect(),WR=t=>!!t&&BR(t),zl=t=>!!(t&&(t[ar]||t[sr])),gg=(t,e)=>{const n=zl(t);return!zl(e)&&n},sp=(t,e,n,i)=>{ot(Ri(e),(o=>{t&&t.removeEventListener(o,n,i)}))},st=(t,e,n,i)=>{var o;const r=(o=i&&i.D)!=null?o:!0,s=i&&i.I||!1,a=i&&i.A||!1,l={passive:r,capture:s};return Le(Zt,Ri(e).map((c=>{const u=a?d=>{sp(t,c,u,s),n&&n(d)}:n;return t&&t.addEventListener(c,u,l),Le(sp,t,c,u,s)})))},iu=t=>t.stopPropagation(),Vl=t=>t.preventDefault(),_g=t=>iu(t)||Vl(t),ln=(t,e)=>{const{x:n,y:i}=di(e)?{x:e,y:e}:e||{};di(n)&&(t.scrollLeft=n),di(i)&&(t.scrollTop=i)},Jt=t=>({x:t.scrollLeft,y:t.scrollTop}),yg=()=>({T:{x:0,y:0},k:{x:0,y:0}}),KR=(t,e)=>{const{T:n,k:i}=t,{w:o,h:r}=e,s=(d,h,v)=>{let f=ep(d)*v,p=ep(h)*v;if(f===p){const _=li(d),C=li(h);p=_>C?0:p,f=_<C?0:f}return f=f===p?0:f,[f+0,p+0]},[a,l]=s(n.x,i.x,o),[c,u]=s(n.y,i.y,r);return{T:{x:a,y:c},k:{x:l,y:u}}},Ha=({T:t,k:e})=>{const n=(i,o)=>i===0&&i<=o;return{x:n(t.x,e.x),y:n(t.y,e.y)}},ap=({T:t,k:e},n)=>{const i=(o,r,s)=>ag(0,1,(o-s)/(o-r)||0);return{x:i(t.x,e.x,n.x),y:i(t.y,e.y,n.y)}},Bl=t=>{t&&t.focus&&t.focus({preventScroll:!0,focusVisible:!1})},lp=(t,e)=>{ot(Kc(e),t)},Hl=t=>{const e=new Map,n=(r,s)=>{if(r){const a=e.get(r);lp((l=>{a&&a[l?"delete":"clear"](l)}),s)}else e.forEach((a=>{a.clear()})),e.clear()},i=(r,s)=>{if(mo(r)){const c=e.get(r)||new Set;return e.set(r,c),lp((u=>{xn(u)&&c.add(u)}),s),Le(n,r,s)}Bs(s)&&s&&n();const a=Ut(r),l=[];return ot(a,(c=>{const u=r[c];u&&ct(l,i(c,u))})),Le(Zt,l)},o=(r,s)=>{ot(bi(e.get(r)),(a=>{s&&!hs(s)?a.apply(0,s):a()}))};return i(t||{}),[i,n,o]},bg={},wg={},YR=t=>{ot(t,(e=>ot(e,((n,i)=>{bg[i]=e[i]}))))},Eg=(t,e,n)=>Ut(t).map((i=>{const{static:o,instance:r}=t[i],[s,a,l]=n||[],c=n?r:o;if(c){const u=n?c(s,a,e):c(e);return(l||wg)[i]=u}})),GR=(t,e)=>t[e],vo=t=>GR(wg,t),QR="__osOptionsValidationPlugin",go="data-overlayscrollbars",Zr="os-environment",jr=`${Zr}-scrollbar-hidden`,qa=`${go}-initialize`,es="noClipping",cp=`${go}-body`,pi=go,XR="host",Kn=`${go}-viewport`,JR=Yc,ZR=Gc,eI="arrange",Cg="measuring",tI="scrolling",Sg="scrollbarHidden",nI="noContent",ql=`${go}-padding`,up=`${go}-content`,ou="os-size-observer",iI=`${ou}-appear`,ru=`${ou}-listener`,oI=`${ru}-scroll`,ts=`${ru}-item`,dp=`${ts}-final`,rI="os-trinsic-observer",sI="os-theme-none",en="os-scrollbar",aI=`${en}-rtl`,lI=`${en}-horizontal`,cI=`${en}-vertical`,xg=`${en}-track`,su=`${en}-handle`,uI=`${en}-visible`,dI=`${en}-cornerless`,hp=`${en}-interaction`,pp=`${en}-unusable`,Wl=`${en}-auto-hide`,hI=`${Wl}-hidden`,fp=`${en}-wheel`,pI=`${xg}-interactive`,fI=`${su}-interactive`,Tg="__osSizeObserverPlugin",mI={[Tg]:{static:()=>(t,e,n)=>{const o="scroll",r=tu(`<div class="${ts}" dir="ltr"><div class="${ts}"><div class="${dp}"></div></div><div class="${ts}"><div class="${dp}" style="width: 200%; height: 200%"></div></div></div>`),s=r[0],a=s.lastChild,l=s.firstChild,c=l?.firstChild;let u=hi(s),d=u,h=!1,v;const f=()=>{ln(l,3333333),ln(a,3333333)},p=w=>{v=0,h&&(u=d,e(w===!0))},_=w=>{d=hi(s),h=!w||!Qc(d,u),w?(iu(w),h&&!v&&(Bc(v),v=zo(p))):p(w===!1),f()},C=[It(t,r),st(l,o,_),st(a,o,_)];return Ks(t,oI),co(c,{[sr]:3333333,[ar]:3333333}),zo(f),[n?Le(_,!1):f,C]}}},vI=(t,e)=>{const{M:n}=e,[i,o]=t("showNativeOverlaidScrollbars");return[i&&n.x&&n.y,o]},Yi=t=>t.indexOf(Yn)===0,gI=t=>t.replace(`${Yn}-`,""),Kl=(t,e)=>{if(t==="auto")return e?Pi:yn;const n=t||yn;return[yn,Pi,Yn].includes(n)?n:yn},_I=(t,e)=>{const{overflowX:n,overflowY:i}=jn(t,[Yc,Gc]);return{x:Kl(n,e.x),y:Kl(i,e.y)}},au="__osScrollbarsHidingPlugin",yI="__osClickScrollPlugin",mp=t=>JSON.stringify(t,((e,n)=>{if(xn(n))throw 0;return n})),vp=(t,e)=>t?`${e}`.split(".").reduce(((n,i)=>n&&rg(n,i)?n[i]:void 0),t):void 0,bI=[0,33],Og=[33,99],$g=[222,666,!0],wI={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:bI,resize:null,event:Og,env:$g},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"]}},kg=(t,e)=>{const n={},i=ao(Ut(e),Ut(t));return ot(i,(o=>{const r=t[o],s=e[o];if(us(r)&&us(s))Ze(n[o]={},kg(r,s)),Xc(n[o])&&delete n[o];else if(rg(e,o)&&s!==r){let a=!0;if(dn(r)||dn(s))try{mp(r)===mp(s)&&(a=!1)}catch{}a&&(n[o]=s)}})),n},Wa=(t,e,n)=>i=>[vp(t,i),n||vp(e,i)!==void 0];let Ag;const EI=()=>Ag,CI=t=>{Ag=t};let Ka;const SI=()=>{const t=(b,S,x)=>{It(document.body,b),It(document.body,b);const k=vg(b),O=hi(b),K=nu(S);return x&&lo(b),{x:O.h-k.h+K.h,y:O.w-k.w+K.w}},e=b=>{let S=!1;const x=Ks(b,jr);try{S=jn(b,"scrollbar-width")==="none"||jn(b,"display","::-webkit-scrollbar")==="none"}catch{}return x(),S},n=`.${Zr}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Zr} div{width:200%;height:200%;margin:10px 0}.${jr}{scrollbar-width:none!important}.${jr}::-webkit-scrollbar,.${jr}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,o=tu(`<div class="${Zr}"><div></div><style>${n}</style></div>`)[0],r=o.firstChild,s=o.lastChild,a=EI();a&&(s.nonce=a);const[l,,c]=Hl(),[u,d]=Xt({o:t(o,r),i:Jr},Le(t,o,r,!0)),[h]=d(),v=e(o),f={x:h.x===0,y:h.y===0},p={elements:{host:null,padding:!v,viewport:b=>v&&hg(b)&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},_=Ze({},wI),C=Le(Ze,{},_),w=Le(Ze,{},p),E={U:h,M:f,P:v,J:!!To,G:Le(l,"r"),K:w,Z:b=>Ze(p,b)&&w(),tt:C,nt:b=>Ze(_,b)&&C(),ot:Ze({},p),st:Ze({},_)};if($n(o,"style"),lo(o),st(Bt,"resize",(()=>{c("r",[])})),xn(Bt.matchMedia)&&!v&&(!f.x||!f.y)){const b=S=>{const x=Bt.matchMedia(`(resolution: ${Bt.devicePixelRatio}dppx)`);st(x,"change",(()=>{S(),b(S)}),{A:!0})};b((()=>{const[S,x]=u();Ze(E.U,S),c("r",[x])}))}return E},zn=()=>(Ka||(Ka=SI()),Ka),xI=(t,e,n)=>{let i=!1;const o=n?new WeakMap:!1,r=()=>{i=!0},s=a=>{if(o&&n){const l=n.map((c=>{const[u,d]=c||[];return[d&&u?(a||dg)(u,t):[],d]}));ot(l,(c=>ot(c[0],(u=>{const d=c[1],h=o.get(u)||[];if(t.contains(u)&&d){const f=st(u,d,(p=>{i?(f(),o.delete(u)):e(p)}));o.set(u,ct(h,f))}else Zt(h),o.delete(u)}))))}};return s(),[r,s]},gp=(t,e,n,i)=>{let o=!1;const{et:r,ct:s,rt:a,it:l,lt:c,ut:u}=i||{},[d,h]=xI(t,(()=>o&&n(!0)),a),v=r||[],f=s||[],p=ao(v,f),_=(w,E)=>{if(!hs(E)){const b=c||Bo,S=u||Bo,x=[],k=[];let O=!1,K=!1;if(ot(E,(D=>{const{attributeName:P,target:U,type:M,oldValue:q,addedNodes:le,removedNodes:de}=D,Y=M==="attributes",I=M==="childList",A=t===U,Q=Y&&P,z=Q&&Jc(U,P||""),ie=mo(z)?z:null,ve=Q&&q!==ie,re=Qv(f,P)&&ve;if(e&&(I||!A)){const ge=Y&&ve,_e=ge&&l&&Ll(U,l),$=(_e?!b(U,P,q,ie):!Y||ge)&&!S(D,!!_e,t,i);ot(le,(N=>ct(x,N))),ot(de,(N=>ct(x,N))),K=K||$}!e&&A&&ve&&!b(U,P,q,ie)&&(ct(k,P),O=O||re)})),h((D=>ps(x).reduce(((P,U)=>(ct(P,dg(D,U)),Ll(U,D)?ct(P,U):P)),[]))),e)return!w&&K&&n(!1),[!1];if(!hs(k)||O){const D=[ps(k),O];return w||n.apply(0,D),D}}},C=new FR(Le(_,!1));return[()=>(C.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:p,subtree:e,childList:e,characterData:e}),o=!0,()=>{o&&(d(),C.disconnect(),o=!1)}),()=>{if(o)return _(!0,C.takeRecords())}]};let Ci=null;const Pg=(t,e,n)=>{const{ft:i}=n||{},o=vo(Tg),[r]=Xt({o:!1,u:!0});return()=>{const s=[],l=tu(`<div class="${ou}"><div class="${ru}"></div></div>`)[0],c=l.firstChild,u=d=>{const h=dn(d)&&!hs(d);let v=!1,f=!1;if(h){const p=d[0],[_,,C]=r(p.contentRect),w=zl(_);f=gg(_,C),v=!f&&!w}else f=d===!0;v||e({_t:!0,ft:f})};if(qi){if(!Bs(Ci)){const f=new qi(Bo);f.observe(t,{get box(){Ci=!0}}),Ci=Ci||!1,f.disconnect()}const d=og(u,{p:0,v:0}),h=f=>d(f),v=new qi(h);if(v.observe(Ci?t:c),ct(s,[()=>{v.disconnect()},!Ci&&It(t,l)]),Ci){const f=new qi(h);f.observe(t,{box:"border-box"}),ct(s,(()=>f.disconnect()))}}else if(o){const[d,h]=o(c,u,i);ct(s,ao([Ks(l,iI),st(l,"animationstart",d),It(t,l)],h))}else return Bo;return Le(Zt,s)}},TI=(t,e)=>{let n;const i=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,o=Xi(rI),[r]=Xt({o:!1}),s=(l,c)=>{if(l){const u=r(i(l)),[,d]=u;return d&&!c&&e(u)&&[u]}},a=(l,c)=>s(c.pop(),l);return[()=>{const l=[];if(tp)n=new tp(Le(a,!1),{root:t}),n.observe(o),ct(l,(()=>{n.disconnect()}));else{const c=()=>{const u=hi(o);s(u)};ct(l,Pg(o,c)()),c()}return Le(Zt,ct(l,It(t,o)))},()=>n&&a(!0,n.takeRecords())]},OI=(t,e,n,i)=>{let o,r,s,a,l,c,u,d;const h=`[${pi}]`,v=`[${Kn}]`,f=["id","class","style","open","wrap","cols","rows"],{dt:p,vt:_,L:C,gt:w,ht:E,V:b,bt:S,yt:x,wt:k,St:O}=t,K=R=>jn(R,"direction")==="rtl",D=()=>{let R,$,N;const F=og(i,{p:()=>R,v:()=>$,S:()=>N,m(oe,ee){const[G]=oe,[he]=ee;return[ao(Ut(G),Ut(he)).reduce(((me,$e)=>(me[$e]=G[$e]||he[$e],me)),{})]}}),B=(oe,ee)=>{if(dn(ee)){const[G,he,me]=ee;R=G,$=he,N=me}else di(ee)?(R=ee,$=!1,N=!1):(R=!1,$=!1,N=!1);F(oe)};return B.O=F.O,B},P={Ot:!1,B:K(p)},U=zn(),M=vo(au),[q]=Xt({i:Qc,o:{w:0,h:0}},(()=>{const R=M&&M.R(t,e,P,U,n).Y,N=!(S&&b)&&eu(_,pi,es),F=!b&&x(eI),B=F&&Jt(w),oe=B&&O(),ee=k(Cg,N),G=F&&R&&R(),he=ms(C),me=nu(C);return G&&G(),ln(w,B),oe&&oe(),N&&ee(),{w:he.w+me.w,h:he.h+me.h}})),le=D(),de=R=>{const $=K(p);Ze(R,{Ct:d!==$}),Ze(P,{B:$}),d=$},Y=(R,$)=>{const[N,F]=R,B={$t:F};return Ze(P,{Ot:N}),$||i(B),B},I=({_t:R,ft:$})=>{const N=$?i:le,F={_t:R||$,ft:$};de(F),N(F,r)},A=(R,$)=>{const[,N]=q(),F={xt:N};return de(F),N&&!$&&le(F,R?s:o),F},Q=(R,$,N)=>{const F={Ht:$};return de(F),$&&!N&&le(F,o),F},[z,ie]=E?TI(_,Y):[],ve=!b&&Pg(_,I,{ft:!0}),[re,ge]=gp(_,!1,Q,{ct:f,et:f}),_e=b&&qi&&new qi((R=>{const $=R[R.length-1].contentRect;I({_t:!0,ft:gg($,u)}),u=$}));return[()=>{_e&&_e.observe(_);const R=ve&&ve(),$=z&&z(),N=re(),F=U.G((B=>{const[,oe]=q();le({Et:B,xt:oe,_t:S},a)}));return()=>{_e&&_e.disconnect(),R&&R(),$&&$(),c&&c(),N(),F()}},({Dt:R,zt:$,It:N})=>{const F={},[B]=R("update.ignoreMutation"),[oe,ee]=R("update.attributes"),[G,he]=R("update.elementEvents"),[me,$e]=R("update.debounce"),Se=he||ee,Ne=$||N,Pe=Ue=>xn(B)&&!!B(Ue);if(Se){l&&l(),c&&c();const[Ue,ut]=gp(E||C,!0,A,{et:ao(f,oe||[]),rt:G,it:h,ut:(Qe,at)=>{const{target:tt,attributeName:pt}=Qe;return(!at&&pt&&!b?UR(tt,h,v):!1)||!!Ki(tt,`.${en}`)||Pe(Qe)}});c=Ue(),l=ut}if($e&&(le.O(),dn(me)||di(me)?(o=me,r=!1,s=Og,a=$g):Vo(me)?(o=me.mutation,r=me.resize,s=me.event,a=me.env):(o=!1,r=!1,s=!1,a=!1)),Ne){const Ue=ge(),ut=ie&&ie(),Qe=l&&l();Ue&&Ze(F,Q(Ue[0],Ue[1],Ne)),ut&&Ze(F,Y(ut[0],Ne)),Qe&&Ze(F,A(Qe[0],Ne))}return de(F),F},P]},Rg=(t,e)=>xn(e)?e.apply(0,t):e,$I=(t,e,n,i)=>{const o=qc(i)?n:i;return Rg(t,o)||e.apply(0,t)},Ig=(t,e,n,i)=>{const o=qc(i)?n:i,r=Rg(t,o);return!!r&&(ds(r)?r:e.apply(0,t))},kI=(t,e)=>{const{nativeScrollbarsOverlaid:n,body:i}=e||{},{M:o,P:r,K:s}=zn(),{nativeScrollbarsOverlaid:a,body:l}=s().cancel,c=n??a,u=qc(i)?l:i,d=(o.x||o.y)&&c,h=t&&(Vs(u)?!r:u);return!!d||!!h},AI=(t,e,n,i)=>{const o="--os-viewport-percent",r="--os-scroll-percent",s="--os-scroll-direction",{K:a}=zn(),{scrollbars:l}=a(),{slot:c}=l,{dt:u,vt:d,L:h,At:v,gt:f,bt:p,V:_}=e,{scrollbars:C}=v?{}:t,{slot:w}=C||{},E=[],b=[],S=[],x=Ig([u,d,h],(()=>_&&p?u:d),c,w),k=z=>{if(To){let ie=null,ve=[];const re=new To({source:f,axis:z}),ge=()=>{ie&&ie.cancel(),ie=null};return{Mt:R=>{const{Tt:$}=n,N=Ha($)[z],F=z==="x",B=[Va(0,F),Va(`calc(-100% + 100cq${F?"w":"h"})`,F)],oe=N?B:B.reverse();return ve[0]===oe[0]&&ve[1]===oe[1]||(ve=oe,ge(),ie=R.kt.animate({clear:["left"],transform:oe},{timeline:re})),ge}}}},O={x:k("x"),y:k("y")},K=()=>{const{Rt:z,Vt:ie}=n,ve=(re,ge)=>ag(0,1,re/(re+ge)||0);return{x:ve(ie.x,z.x),y:ve(ie.y,z.y)}},D=(z,ie,ve)=>{const re=ve?Ks:ug;ot(z,(ge=>{re(ge.Lt,ie)}))},P=(z,ie)=>{ot(z,(ve=>{const[re,ge]=ie(ve);co(re,ge)}))},U=(z,ie,ve)=>{const re=Bs(ve),ge=re?ve:!0,_e=re?!ve:!0;ge&&D(b,z,ie),_e&&D(S,z,ie)},M=()=>{const z=K(),ie=ve=>re=>[re.Lt,{[o]:Ul(ve)+""}];P(b,ie(z.x)),P(S,ie(z.y))},q=()=>{if(!To){const{Tt:z}=n,ie=ap(z,Jt(f)),ve=re=>ge=>[ge.Lt,{[r]:Ul(re)+""}];P(b,ve(ie.x)),P(S,ve(ie.y))}},le=()=>{const{Tt:z}=n,ie=Ha(z),ve=re=>ge=>[ge.Lt,{[s]:re?"0":"1"}];P(b,ve(ie.x)),P(S,ve(ie.y)),To&&(b.forEach(O.x.Mt),S.forEach(O.y.Mt))},de=()=>{if(_&&!p){const{Rt:z,Tt:ie}=n,ve=Ha(ie),re=ap(ie,Jt(f)),ge=_e=>{const{Lt:R}=_e,$=Ho(R)===h&&R,N=(F,B,oe)=>{const ee=B*F;return mg(oe?ee:-ee)};return[$,$&&{transform:Va({x:N(re.x,z.x,ve.x),y:N(re.y,z.y,ve.y)})}]};P(b,ge),P(S,ge)}},Y=z=>{const ie=z?"x":"y",re=Xi(`${en} ${z?lI:cI}`),ge=Xi(xg),_e=Xi(su),R={Lt:re,Pt:ge,kt:_e},$=O[ie];return ct(z?b:S,R),ct(E,[It(re,ge),It(ge,_e),Le(lo,re),$&&$.Mt(R),i(R,U,z)]),R},I=Le(Y,!0),A=Le(Y,!1),Q=()=>(It(x,b[0].Lt),It(x,S[0].Lt),Le(Zt,E));return I(),A(),[{Ut:M,Nt:q,qt:le,Bt:de,Ft:U,jt:{Xt:b,Yt:I,Wt:Le(P,b)},Jt:{Xt:S,Yt:A,Wt:Le(P,S)}},Q]},PI=(t,e,n,i,o)=>(r,s,a)=>{const{vt:l,L:c,V:u,gt:d,Gt:h,St:v}=e,{Lt:f,Pt:p,kt:_}=r,[C,w]=Wi(333),[E,b]=Wi(444),S=O=>{xn(d.scrollBy)&&d.scrollBy({behavior:"smooth",left:O.x,top:O.y})},x=()=>{const O="pointerup pointercancel lostpointercapture",K=`client${a?"X":"Y"}`,D=a?sr:ar,P=a?"left":"top",U=a?"w":"h",M=a?"x":"y",q=[];return st(p,"pointerdown",i((le=>{const de=Ki(le.target,`.${su}`)===_,Y=de?_:p,I=t.scrollbars,A=I[de?"dragScroll":"clickScroll"],{button:Q,isPrimary:z,pointerType:ie}=le,{pointers:ve}=I;if(Q===0&&z&&A&&(ve||[]).includes(ie)){Zt(q),b();const ge=!de&&(le.shiftKey||A==="instant"),_e=Le(Ba,_),R=Le(Ba,p),$=(tt,pt)=>(tt||_e())[P]-(pt||R())[P],N=Fl(Ba(d)[D])/hi(d)[U]||1,F=Jt(d)[M],B=tt=>{ln(d,{[M]:F+tt})},oe=tt=>{const{Rt:pt}=n,dt=hi(p)[U]-hi(_)[U],ft=1/N*tt/dt;B(ft*pt[M])},ee=le[K],G=_e(),he=R(),me=G[D],$e=$(G,he)+me/2,Ne=ee-he[P]-$e,Pe=de?0:Ne,Ue=tt=>{Zt(at),Y.releasePointerCapture(tt.pointerId)},ut=de||ge,Qe=v(),at=[st(h,O,Ue),st(h,"selectstart",(tt=>Vl(tt)),{D:!1}),st(p,O,Ue),ut&&st(p,"pointermove",(tt=>oe(Pe+tt[K]-ee))),ut&&(()=>{const tt=Jt(d);Qe();const pt=Jt(d),dt={x:pt.x-tt.x,y:pt.y-tt.y};(li(dt.x)>3||li(dt.y)>3)&&(v(),ln(d,tt),S(dt),E(Qe))})];if(Y.setPointerCapture(le.pointerId),ge)oe(Ne);else if(!de){const tt=vo(yI);if(tt){const{Vt:pt}=n,dt=tt(B,oe,Le($),Ne,pt[M],A,!!a,(ft=>{ft?Qe():ct(at,Qe)}));ct(at,dt),ct(q,Le(dt,!0))}}}})))};let k=!0;return Le(Zt,[st(_,"pointermove pointerleave",i(o)),st(f,"pointerenter",i((()=>{s(hp,!0)}))),st(f,"pointerleave pointercancel",i((()=>{s(hp,!1)}))),st(f,"wheel",i((O=>{const{deltaX:K,deltaY:D,deltaMode:P}=O;k&&P===0&&Ho(f)===l&&S({x:K,y:D}),k=!1,s(fp,!0),C((()=>{k=!0,s(fp)})),Vl(O)})),{D:!1,I:!0}),!u&&st(f,"mousedown",i((()=>{const O=Nl();(ip(O,Kn)||ip(O,pi)||O===document.body)&&Hc(Le(Bl,c),25)}))),st(f,"pointerdown",(()=>{const O=st(h,"click",(D=>{K(),_g(D)}),{A:!0,I:!0,D:!1}),K=st(h,"pointerup pointercancel",(()=>{K(),setTimeout(O,150)}),{I:!0,D:!0})}),{I:!0,D:!0}),x(),w,b])},RI=(t,e,n,i,o,r,s)=>{let a,l,c,u,d,h=Bo,v=0;const f=["mouse","pen"],p=_e=>R=>{n.Kt||_e(R)},_=_e=>f.includes(_e.pointerType),[C,w]=Wi(),[E,b]=Wi(100),[S,x]=Wi(50),[k,O]=Wi((()=>v)),[K,D]=AI(t,r,o,PI(e,r,o,p,(_e=>_(_e)&&Q()))),{vt:P,Qt:U,bt:M}=r,{Ft:q,Ut:le,Nt:de,qt:Y,Bt:I}=K,A=(_e,R)=>{O();const $=N=>{n.Kt||q(hI,N)};if(_e)$();else{const N=c?!a:!0;v>0&&!R?k(Le($,N)):$(N)}},Q=()=>{(c?!a:!u)&&(A(!0),E((()=>{A(!1)})))},z=_e=>{_(_e)&&(a=!0,!n.Kt&&c&&A(!0))},ie=_e=>{_(_e)&&(a=!1,!n.Kt&&c&&A(!1))},ve=_e=>{q(Wl,_e,!0),q(Wl,_e,!1)},re=[O,b,x,w,()=>h(),st(P,"pointerover",z,{A:!0}),st(P,"pointerenter",z),st(P,"pointerleave",ie),st(P,"pointermove",p((_e=>{_(_e)&&l&&Q()}))),st(U,"scroll",p((_e=>{C((()=>{de(),Q()})),s(_e),I()})))],ge=vo(au);return[()=>Le(Zt,ct(re,D())),({Dt:_e,It:R,Zt:$,tn:N})=>{const{nn:F,sn:B,en:oe,cn:ee}=N||{},{Ct:G,ft:he}=$||{},{B:me}=i,{M:$e,P:Se}=zn(),{rn:Ne,j:Pe}=o,[Ue,ut]=_e("showNativeOverlaidScrollbars"),[Qe,at]=_e("scrollbars.theme"),[tt,pt]=_e("scrollbars.visibility"),[dt,ft]=_e("scrollbars.autoHide"),[Dt,fn]=_e("scrollbars.autoHideSuspend"),[X]=_e("scrollbars.autoHideDelay"),[V,J]=_e("scrollbars.dragScroll"),[ye,xe]=_e("scrollbars.clickScroll"),[se,Me]=_e("overflow"),Z=he&&!R,ae=F||B||ee||G||R,fe=oe||pt||Me,ce=Ue&&$e.x&&$e.y,be=!Se&&!ge,On=ce||be,Qt=(nn,Ft,yt)=>{const ur=nn.includes(Pi)&&(tt===Yn||tt==="auto"&&Ft===Pi);return q(uI,ur,yt),ur};if(v=X,(ut||be)&&q(sI,On),at&&(q(d),q(Qe,!0),d=Qe),(fn||Z)&&(ve(!Dt),Z&&Dt&&(Pe.x||Pe.y?(h(),S((()=>{h=st(U,Pi,p(Le(ve,!0)),{A:!0})}))):ve(!0))),ft&&(l=dt==="move",c=dt==="leave",u=dt==="never",A(u,!0)),J&&q(fI,V),xe&&q(pI,!!ye),fe){const nn=Qt(se.x,Ne.x,!0),Ft=Qt(se.y,Ne.y,!1);q(dI,!(nn&&Ft))}ae&&(de(),le(),I(),ee&&Y(),q(pp,!Pe.x,!0),q(pp,!Pe.y,!1),q(aI,me&&!M))},{},K]},II=t=>{const e=zn(),{K:n,P:i}=e,{elements:o}=n(),{padding:r,viewport:s,content:a}=o,l=ds(t),c=l?{}:t,{elements:u}=c,{padding:d,viewport:h,content:v}=u||{},f=l?t:c.target,p=hg(f),_=f.ownerDocument,C=_.documentElement,w=()=>_.defaultView||Bt,E=Le($I,[f]),b=Le(Ig,[f]),S=Le(Xi,""),x=Le(E,S,s),k=Le(b,S,a),O=G=>{const he=hi(G),me=ms(G),$e=jn(G,Yc),Se=jn(G,Gc);return me.w-he.w>0&&!Yi($e)||me.h-he.h>0&&!Yi(Se)},K=x(h),D=K===f,P=D&&p,U=!D&&k(v),M=!D&&K===U,q=P?C:K,le=P?q:f,de=!D&&b(S,r,d),Y=!M&&U,I=[Y,q,de,le].map((G=>ds(G)&&!Ho(G)&&G)),A=G=>G&&Qv(I,G),Q=!A(q)&&O(q)?q:f,z=P?C:q,ve={dt:f,vt:le,L:q,ln:de,ht:Y,gt:z,Qt:P?_:q,an:p?C:Q,Gt:_,bt:p,At:l,V:D,un:w,yt:G=>eu(q,Kn,G),wt:(G,he)=>fs(q,Kn,G,he),St:()=>fs(z,Kn,tI,!0)},{dt:re,vt:ge,ln:_e,L:R,ht:$}=ve,N=[()=>{$n(ge,[pi,qa]),$n(re,qa),p&&$n(C,[qa,pi])}];let F=jl([$,R,_e,ge,re].find((G=>G&&!A(G))));const B=P?re:$||R,oe=Le(Zt,N);return[ve,()=>{const G=w(),he=Nl(),me=Ue=>{It(Ho(Ue),jl(Ue)),lo(Ue)},$e=Ue=>st(Ue,"focusin focusout focus blur",_g,{I:!0,D:!1}),Se="tabindex",Ne=Jc(R,Se),Pe=$e(he);return Wn(ge,pi,D?"":XR),Wn(_e,ql,""),Wn(R,Kn,""),Wn($,up,""),D||(Wn(R,Se,Ne||"-1"),p&&Wn(C,cp,"")),It(B,F),It(ge,_e),It(_e||ge,!D&&R),It(R,$),ct(N,[Pe,()=>{const Ue=Nl(),ut=A(R),Qe=ut&&Ue===R?re:Ue,at=$e(Qe);$n(_e,ql),$n($,up),$n(R,Kn),p&&$n(C,cp),Ne?Wn(R,Se,Ne):$n(R,Se),A($)&&me($),ut&&me(R),A(_e)&&me(_e),Bl(Qe),at()}]),i&&!D&&(Zc(R,Kn,Sg),ct(N,Le($n,R,Kn))),Bl(!D&&p&&he===re&&G.top===G?R:he),Pe(),F=0,oe},oe]},MI=({ht:t})=>({Zt:e,fn:n,It:i})=>{const{$t:o}=e||{},{Ot:r}=n;t&&(o||i)&&co(t,{[ar]:r&&"100%"})},DI=({vt:t,ln:e,L:n,V:i},o)=>{const[r,s]=Xt({i:jR,o:rp()},Le(rp,t,"padding",""));return({Dt:a,Zt:l,fn:c,It:u})=>{let[d,h]=s(u);const{P:v}=zn(),{_t:f,xt:p,Ct:_}=l||{},{B:C}=c,[w,E]=a("paddingAbsolute");(f||h||(u||p))&&([d,h]=r(u));const S=!i&&(E||_||h);if(S){const x=!w||!e&&!v,k=d.r+d.l,O=d.t+d.b,K={[ng]:x&&!C?-k:0,[ig]:x?-O:0,[tg]:x&&C?-k:0,top:x?-d.t:0,right:x?C?-d.r:"auto":0,left:x?C?"auto":-d.l:0,[sr]:x&&`calc(100% + ${k}px)`},D={[Xv]:x?d.t:0,[Jv]:x?d.r:0,[eg]:x?d.b:0,[Zv]:x?d.l:0};co(e||n,K),co(n,D),Ze(o,{ln:d,_n:!x,F:e?D:Ze({},K,D)})}return{dn:S}}},FI=(t,e)=>{const n=zn(),{vt:i,ln:o,L:r,V:s,Qt:a,gt:l,bt:c,wt:u,un:d}=t,{P:h}=n,v=c&&s,f=Le(Yv,0),p={display:()=>!1,direction:re=>re!=="ltr",flexDirection:re=>re.endsWith("-reverse"),writingMode:re=>re!=="horizontal-tb"},_=Ut(p),C={i:Qc,o:{w:0,h:0}},w={i:Jr,o:{}},E=re=>{u(Cg,!v&&re)},b=()=>jn(r,_),S=(re,ge)=>{const _e=!Ut(re).length,R=ge?!0:_.some((Se=>{const Ne=re[Se];return mo(Ne)&&p[Se](Ne)}));if(_e||!R||!WR(r))return{T:{x:0,y:0},k:{x:1,y:1}};E(!0);const $=Jt(l),N=st(a,Pi,(Se=>{const Ne=Jt(l);Se.isTrusted&&Ne.x===$.x&&Ne.y===$.y&&iu(Se)}),{I:!0,A:!0}),F=u(nI,!0);ln(l,{x:0,y:0}),F();const B=Jt(l),oe=ms(l);ln(l,{x:oe.w,y:oe.h});const ee=Jt(l),G={x:ee.x-B.x,y:ee.y-B.y};ln(l,{x:-oe.w,y:-oe.h});const he=Jt(l),me={x:he.x-B.x,y:he.y-B.y},$e={x:li(G.x)>=li(me.x)?ee.x:he.x,y:li(G.y)>=li(me.y)?ee.y:he.y};return ln(l,$),zo((()=>N())),{T:B,k:$e}},x=(re,ge)=>{const _e=Bt.devicePixelRatio%1!==0?1:0,R={w:f(re.w-ge.w),h:f(re.h-ge.h)};return{w:R.w>_e?R.w:0,h:R.h>_e?R.h:0}},k=(re,ge)=>{const _e=(R,$,N,F)=>{const B=R===Yn?yn:gI(R),oe=Yi(R),ee=Yi(N);return!$&&!F?yn:oe&&ee?Yn:oe?$&&F?B:$?Yn:yn:$?B:ee&&F?Yn:yn};return{x:_e(ge.x,re.x,ge.y,re.y),y:_e(ge.y,re.y,ge.x,re.x)}},O=re=>{const ge=R=>[Yn,yn,Pi].map(($=>ve(Kl($),R))),_e=ge(!0).concat(ge()).join(" ");u(_e),u(Ut(re).map((R=>ve(re[R],R==="x"))).join(" "),!0)},[K,D]=Xt(C,Le(nu,r)),[P,U]=Xt(C,Le(ms,r)),[M,q]=Xt(C),[le]=Xt(w),[de,Y]=Xt(C),[I]=Xt(w),[A]=Xt({i:(re,ge)=>qs(re,ge,ps(ao(Ut(re),Ut(ge)))),o:{}}),[Q,z]=Xt({i:(re,ge)=>Jr(re.T,ge.T)&&Jr(re.k,ge.k),o:yg()}),ie=vo(au),ve=(re,ge)=>`${ge?JR:ZR}${LR(re)}`;return({Dt:re,Zt:ge,fn:_e,It:R},{dn:$})=>{const{_t:N,Ht:F,xt:B,Ct:oe,ft:ee,Et:G}=ge||{},he=ie&&ie.R(t,e,_e,n,re),{X:me,Y:$e,W:Se}=he||{},[Ne,Pe]=vI(re,n),[Ue,ut]=re("overflow"),Qe=Yi(Ue.x),at=Yi(Ue.y),tt=N||$||B||oe||G||Pe;let pt=D(R),dt=U(R),ft=q(R),Dt=Y(R);if(Pe&&h&&u(Sg,!Ne),tt){eu(i,pi,es)&&E(!0);const Su=$e&&$e(),[dr]=pt=K(R),[hr]=dt=P(R),pr=vg(r),fr=v&&qR(d()),d_={w:f(hr.w+dr.w),h:f(hr.h+dr.h)},xu={w:f((fr?fr.w:pr.w+f(pr.w-hr.w))+dr.w),h:f((fr?fr.h:pr.h+f(pr.h-hr.h))+dr.h)};Su&&Su(),Dt=de(xu),ft=M(x(d_,xu),R)}const[fn,X]=Dt,[V,J]=ft,[ye,xe]=dt,[se,Me]=pt,[Z]=le({x:V.w>0,y:V.h>0}),ae=Qe&&at&&(Z.x||Z.y)||Qe&&Z.x&&!Z.y||at&&Z.y&&!Z.x,fe=$||oe||G||Me||xe||X||J||ut||Pe||tt||F&&v,[ce]=re("update.flowDirectionStyles"),[be,On]=A(ce?ce(r)||{}:b(),R),Qt=oe||ee||On||R,[nn,Ft]=Qt?Q(S(be,!!ce),R):z();let yt=k(Z,Ue);E(!1),fe&&(O(yt),yt=_I(r,Z),Se&&me&&(me(yt,ye,se),co(r,Se(yt))));const[ur,u_]=I(yt);return fs(i,pi,es,ae),fs(o,ql,es,ae),Ze(e,{rn:ur,Vt:{x:fn.w,y:fn.h},Rt:{x:V.w,y:V.h},j:Z,Tt:KR(nn,V)}),{en:u_,nn:X,sn:J,cn:Ft||J}}},LI=t=>{const[e,n,i]=II(t),o={ln:{t:0,r:0,b:0,l:0},_n:!1,F:{[ng]:0,[ig]:0,[tg]:0,[Xv]:0,[Jv]:0,[eg]:0,[Zv]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},rn:{x:yn,y:yn},j:{x:!1,y:!1},Tt:yg()},{dt:r,gt:s,V:a,St:l}=e,{P:c,M:u}=zn(),d=!c&&(u.x||u.y),h=[MI(e),DI(e,o),FI(e,o)];return[n,v=>{const f={},_=d&&Jt(s),C=_&&l();return ot(h,(w=>{Ze(f,w(v,f)||{})})),ln(s,_),C&&C(),a||ln(r,0),f},o,e,i]},jI=(t,e,n,i)=>{let o=!1;const r={Kt:!1,pn:!1},s=Wa(e,{}),[a,l,c,u,d]=LI(t),[h,v,f]=OI(u,c,s,(b=>{E({},b)})),[p,_,,C]=RI(t,e,r,f,c,u,i),w=b=>Ut(b).some((S=>!!b[S])),E=(b,S)=>{const{Kt:x,pn:k}=r;if(k||x&&o)return!1;const{vn:O,It:K,zt:D}=b,P=O||{},U=!!K||!o,M={Dt:Wa(e,P,U),vn:P,It:U},q=S||v(Ze({},M,{zt:D})),le=l(Ze({},M,{fn:f,Zt:q}));_(Ze({},M,{Zt:q,tn:le}));const de=w(q),Y=w(le),I=de||Y||!Xc(P)||U;return o=!0,I&&n(b,{Zt:q,tn:le}),I};return[()=>{const{an:b,gt:S,St:x}=u,k=Jt(b),O=[h(),a(),p(),()=>{r.pn=!0}],K=x();return ln(S,k),K(),Le(Zt,O)},E,b=>{const S=r.Kt;r.Kt=b,!b&&S!==b&&E({It:!0,zt:!0})},()=>{_({Dt:Wa(e,{},!1),vn:{},It:!1})},()=>({gn:r,hn:f,bn:c}),{yn:u,wn:C},d]},lu=new WeakMap,NI=(t,e)=>{lu.set(t,e)},UI=t=>{lu.delete(t)},Mg=t=>lu.get(t),hn=(t,e,n)=>{const{tt:i}=zn(),o=ds(t),r=o?t:t.target,s=Mg(r);if(e&&!s){const a=[],l={},c=U=>{const M=sg(U),q=vo(QR);return q?q(M,!0):M},u=Ze({},i(),c(e)),[d,h,v]=Hl(),[f,p,_]=Hl(n),C=(U,M)=>{_(U,M),v(U,M)},[w,E,b,S,x,k,O]=jI(t,u,(({vn:U,It:M},{Zt:q,tn:le})=>{const{_t:de,Ct:Y,$t:I,xt:A,Ht:Q,ft:z}=q,{nn:ie,sn:ve,en:re,cn:ge}=le;C("updated",[P,{updateHints:{sizeChanged:!!de,directionChanged:!!Y,heightIntrinsicChanged:!!I,overflowEdgeChanged:!!ie,overflowAmountChanged:!!ve,overflowStyleChanged:!!re,scrollCoordinatesChanged:!!ge,contentMutation:!!A,hostMutation:!!Q,appear:!!z},changedOptions:U||{},force:!!M}])}),(U=>C("scroll",[P,U]))),K=U=>{const{gn:M}=x(),{pn:q}=M;q||(UI(r),Zt(a),C("destroyed",[P,U]),h(),p())},P={options(U,M){if(U){const q=M?i():{},le=kg(u,Ze(q,c(U)));Xc(le)||(Ze(u,le),E({vn:le}))}return Ze({},u)},on:f,off:(U,M)=>{U&&M&&p(U,M)},state(){const{gn:U,hn:M,bn:q}=x(),{pn:le,Kt:de}=U,{B:Y}=M,{Vt:I,Rt:A,rn:Q,j:z,ln:ie,_n:ve,Tt:re}=q;return Ze({},{overflowEdge:I,overflowAmount:A,overflowStyle:Q,hasOverflow:z,scrollCoordinates:{start:re.T,end:re.k},padding:ie,paddingAbsolute:ve,directionRTL:Y,sleeping:de,destroyed:le})},elements(){const{dt:U,vt:M,ln:q,L:le,ht:de,gt:Y,Qt:I}=k.yn,{jt:A,Jt:Q}=k.wn,z=ve=>{const{kt:re,Pt:ge,Lt:_e}=ve;return{scrollbar:_e,track:ge,handle:re}},ie=ve=>{const{Xt:re,Yt:ge}=ve,_e=z(re[0]);return Ze({},_e,{clone:()=>{const R=z(ge());return S(),R}})};return Ze({},{target:U,host:M,padding:q||le,viewport:le,content:de||le,scrollOffsetElement:Y,scrollEventElement:I,scrollbarHorizontal:ie(A),scrollbarVertical:ie(Q)})},update:U=>E({It:U,zt:!0}),destroy:Le(K,!1),sleep:b,plugin:U=>l[Ut(U)[0]]};return ct(a,[O]),NI(r,P),Eg(bg,hn,[P,d,l]),kI(k.yn.bt,!o&&t.cancel)?(K(!0),P):(ct(a,w()),C("initialized",[P]),P.update(),P)}return s};hn.plugin=t=>{const e=dn(t),n=e?t:[t],i=n.map((o=>Eg(o,hn)[0]));return YR(n),e?i:i[0]};hn.valid=t=>{const e=t&&t.elements,n=xn(e)&&e();return Vo(n)&&!!Mg(n.target)};hn.env=()=>{const{U:t,M:e,P:n,J:i,ot:o,st:r,K:s,Z:a,tt:l,nt:c}=zn();return Ze({},{scrollbarsSize:t,scrollbarsOverlaid:e,scrollbarsHiding:n,scrollTimeline:i,staticDefaultInitialization:o,staticDefaultOptions:r,getDefaultInitialization:s,setDefaultInitialization:a,getDefaultOptions:l,setDefaultOptions:c})};hn.nonce=CI;hn.trustedTypePolicy=VR;class zI{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,n){const i=this._listeners.get(e)??new Set;return this._listeners.set(e,i),i.add(n),this}removeEventListener(e,n){var i;return(i=this._listeners.get(e))==null||i.delete(n),this}dispatchEvent(e,...n){let i=!0;for(const o of this._listeners.get(e)??[])i=o(...n)!==!1&&i;return i}unbindAllListeners(){this._listeners.clear()}}const _p=(t,e="px")=>typeof t=="number"?t+e:t,ii=({style:t},e,n)=>{if(typeof e=="object")for(const[i,o]of Object.entries(e))o!==void 0&&(t[i]=_p(o));else n!==void 0&&(t[e]=_p(n))},yp=(t=0,e=0,n=0,i=0)=>{const o={x:t,y:e,width:n,height:i,top:e,left:t,right:t+n,bottom:e+i};return{...o,toJSON:()=>JSON.stringify(o)}},VI=t=>{let e,n=-1,i=!1;return{next:(...o)=>{e=o,i||(i=!0,n=requestAnimationFrame(()=>{t(...e),i=!1}))},cancel:()=>{cancelAnimationFrame(n),i=!1}}},bp=(t,e,n="touch")=>{switch(n){case"center":{const i=e.left+e.width/2,o=e.top+e.height/2;return i>=t.left&&i<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},BI=()=>matchMedia("(hover: none), (pointer: coarse)").matches,HI=()=>"safari"in window,Yl=t=>Array.isArray(t)?t:[t],Dg=t=>(e,n,i,o={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=Yl(n),e=Yl(e);for(const r of e)if(r)for(const s of n)r[t](s,i,{capture:!1,...o})},oi=Dg("addEventListener"),vn=Dg("removeEventListener"),Nr=t=>{var e;const{clientX:n,clientY:i,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:i,target:o}},Ui=(t,e=document)=>Yl(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),qI=(t,e)=>e.some(n=>typeof n=="number"?t.button===n:typeof n=="object"?n.button!==t.button?!1:n.modifiers.every(i=>{switch(i){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:Si,max:wp,min:Ep,ceil:Cp}=Math,Sp=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Fg=class extends zI{constructor(e){var n,i,o,r,s;super(),this._selection=Sp(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=yp(),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",...e,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...e.behaviour,startThreshold:(n=e.behaviour)!=null&&n.startThreshold?typeof e.behaviour.startThreshold=="number"?e.behaviour.startThreshold:{x:10,y:10,...e.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(i=e.behaviour)==null?void 0:i.scrolling,startScrollMargins:{x:0,y:0,...(r=(o=e.behaviour)==null?void 0:o.scrolling)==null?void 0:r.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...e.features,singleTap:{allow:!0,intersect:"native",...(s=e.features)==null?void 0:s.singleTap}}};for(const u of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[u]=="function"&&(this[u]=this[u].bind(this));const{document:a,selectionAreaClass:l,selectionContainerClass:c}=this._options;this._area=a.createElement("div"),this._clippingElement=a.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),c&&this._clippingElement.classList.add(c),ii(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),ii(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=VI(u=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",u),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(e=!0){const{document:n,features:i}=this._options,o=e?oi:vn;o(n,"mousedown",this._onTapStart),i.touch&&o(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,n=!1){const{x:i,y:o,target:r}=Nr(e),{document:s,startAreas:a,boundaries:l,features:c,behaviour:u}=this._options,d=r.getBoundingClientRect();if(e instanceof MouseEvent&&!qI(e,u.triggers))return;const h=Ui(a,s),v=Ui(l,s);this._targetElement=v.find(C=>bp(C.getBoundingClientRect(),d));const f=e.composedPath(),p=h.find(C=>f.includes(C));if(this._targetBoundary=v.find(C=>f.includes(C)),!this._targetElement||!p||!this._targetBoundary||!n&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:i,y1:o,x2:0,y2:0};const _=s.scrollingElement??s.body;this._scrollDelta={x:_.scrollLeft,y:_.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),oi(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),oi(s,["mouseup","touchcancel","touchend"],this._onTapStop),oi(s,"scroll",this._onScroll),c.deselectOnBlur&&(this._targetBoundaryScrolled=!1,oi(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(e){const{singleTap:{intersect:n},range:i}=this._options.features,o=Nr(e);let r;if(n==="native")r=o.target;else if(n==="touch"){this.resolveSelectables();const{x:a,y:l}=o;r=this._selectables.find(c=>{const{right:u,left:d,top:h,bottom:v}=c.getBoundingClientRect();return a<u&&a>d&&l<v&&l>h})}if(!r)return;for(this.resolveSelectables();!this._selectables.includes(r);)if(r.parentElement)r=r.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&i&&this._latestElement){const a=this._latestElement,[l,c]=a.compareDocumentPosition(r)&4?[r,a]:[a,r],u=[...this._selectables.filter(d=>d.compareDocumentPosition(l)&4&&d.compareDocumentPosition(c)&2),l,c];this.select(u),this._latestElement=a}else s.includes(r)&&(s.length===1||e.ctrlKey||s.every(a=>this._selection.stored.includes(a)))?this.deselect(r):(this.select(r),this._latestElement=r)}_delayedTapMove(e){const{container:n,document:i,behaviour:{startThreshold:o}}=this._options,{x1:r,y1:s}=this._areaLocation,{x:a,y:l}=Nr(e);if(typeof o=="number"&&Si(a+l-(r+s))>=o||typeof o=="object"&&Si(a-r)>=o.x||Si(l-s)>=o.y){if(vn(i,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){vn(i,["mouseup","touchcancel","touchend"],this._onTapStop);return}oi(i,["mousemove","touchmove"],this._onTapMove,{passive:!1}),ii(this._area,"display","block"),Ui(n,i)[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&&(oi(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),oi(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(c=>this._targetElement.contains(c))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:n,_area:i}=this,o=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(ii(e,{top:o.top,left:o.left,width:o.width,height:o.height}),ii(i,{marginTop:-o.top,marginLeft:-o.left})):(ii(e,{top:0,left:0,width:"100%",height:"100%"}),ii(i,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{_scrollSpeed:n,_areaLocation:i,_options:o,_frame:r}=this,{speedDivider:s}=o.behaviour.scrolling,a=this._targetElement,{x:l,y:c}=Nr(e);if(i.x2=l,i.y2=c,this._lastMousePosition.x=l,this._lastMousePosition.y=c,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const u=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:d,scrollLeft:h}=a;n.y&&(a.scrollTop+=Cp(n.y/s),i.y1-=a.scrollTop-d),n.x&&(a.scrollLeft+=Cp(n.x/s),i.x1-=a.scrollLeft-h),r.next(e),requestAnimationFrame(u)};requestAnimationFrame(u)}else r.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:n}=this._options;(n.touch&&BI()||this._scrollAvailable&&HI())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:n}}=this,{scrollTop:i,scrollLeft:o}=n.scrollingElement??n.body;this._areaLocation.x1+=e.x-o,this._areaLocation.y1+=e.y-i,e.x=o,e.y=i,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,vn(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(e){const{manualSpeed:n}=this._options.behaviour.scrolling,i=e.deltaY?e.deltaY>0?1:-1:0,o=e.deltaX?e.deltaX>0?1:-1:0;this._scrollSpeed.y+=i*n,this._scrollSpeed.x+=o*n,this._onTapMove(e),e.preventDefault()}_keyboardScroll(e){const{manualSpeed:n}=this._options.behaviour.scrolling,i=e.key==="ArrowLeft"?-1:e.key==="ArrowRight"?1:0,o=e.key==="ArrowUp"?-1:e.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(i)*n,this._scrollSpeed.y+=Math.sign(o)*n,e.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:e,_areaLocation:n,_targetElement:i,_options:o}=this,{scrollTop:r,scrollHeight:s,clientHeight:a,scrollLeft:l,scrollWidth:c,clientWidth:u}=i,d=this._targetRect,{x1:h,y1:v}=n;let{x2:f,y2:p}=n;const{behaviour:{scrolling:{startScrollMargins:_}}}=o;f<d.left+_.x?(e.x=l?-Si(d.left-f+_.x):0,f=f<d.left?d.left:f):f>d.right-_.x?(e.x=c-l-u?Si(d.left+d.width-f-_.x):0,f=f>d.right?d.right:f):e.x=0,p<d.top+_.y?(e.y=r?-Si(d.top-p+_.y):0,p=p<d.top?d.top:p):p>d.bottom-_.y?(e.y=s-r-a?Si(d.top+d.height-p-_.y):0,p=p>d.bottom?d.bottom:p):e.y=0;const C=Ep(h,f),w=Ep(v,p),E=wp(h,f),b=wp(v,p);this._areaRect=yp(C,w,E-C,b-w)}_redrawSelectionArea(){const{x:e,y:n,width:i,height:o}=this._areaRect,{style:r}=this._area;r.left=`${e}px`,r.top=`${n}px`,r.width=`${i}px`,r.height=`${o}px`}_onTapStop(e,n){var i;const{document:o,features:r}=this._options,{_singleClick:s}=this;vn(this._targetElement,"scroll",this._onStartAreaScroll),vn(o,["mousemove","touchmove"],this._delayedTapMove),vn(o,["touchmove","mousemove"],this._onTapMove),vn(o,["mouseup","touchcancel","touchend"],this._onTapStop),vn(o,"scroll",this._onScroll),this._keepSelection(),e&&s&&r.singleTap.allow?this._onSingleTap(e):!s&&!n&&(this._updateElementSelection(),this._emitEvent("stop",e)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,vn(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),vn(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(i=this._frame)==null||i.cancel(),ii(this._area,"display","none")}_updateElementSelection(){const{_selectables:e,_options:n,_selection:i,_areaRect:o}=this,{stored:r,selected:s,touched:a}=i,{intersect:l,overlap:c}=n.behaviour,u=c==="invert",d=[],h=[],v=[];for(let p=0;p<e.length;p++){const _=e[p];if(bp(o,_.getBoundingClientRect(),l)){if(s.includes(_))r.includes(_)&&!a.includes(_)&&a.push(_);else if(u&&r.includes(_)){v.push(_);continue}else h.push(_);d.push(_)}}u&&h.push(...r.filter(p=>!s.includes(p)));const f=c==="keep";for(let p=0;p<s.length;p++){const _=s[p];!d.includes(_)&&!(f&&r.includes(_))&&v.push(_)}i.selected=d,i.changed={added:h,removed:v},this._latestElement=void 0}_emitEvent(e,n){return this.emit(e,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:e,_selection:n}=this,{selected:i,changed:o,touched:r,stored:s}=n,a=i.filter(l=>!s.includes(l));switch(e.behaviour.overlap){case"drop":{n.stored=[...a,...s.filter(l=>!r.includes(l))];break}case"invert":{n.stored=[...a,...s.filter(l=>!o.removed.includes(l))];break}case"keep":{n.stored=[...s,...i.filter(l=>!s.includes(l))];break}}}trigger(e,n=!0){this._onTapStart(e,n)}resolveSelectables(){this._selectables=Ui(this._options.selectables,this._options.document)}clearSelection(e=!0,n=!1){const{selected:i,stored:o,changed:r}=this._selection;r.added=[],r.removed.push(...i,...e?o:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=Sp(e?[]:o)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(e){Object.assign(this._areaLocation,e),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,n=!1){const{changed:i,selected:o,stored:r}=this._selection,s=Ui(e,this._options.document).filter(a=>!o.includes(a)&&!r.includes(a));return r.push(...s),o.push(...s),i.added.push(...s),i.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(e,n=!1){const{selected:i,stored:o,changed:r}=this._selection,s=Ui(e,this._options.document).filter(a=>i.includes(a)||o.includes(a));this._selection.stored=o.filter(a=>!s.includes(a)),this._selection.selected=i.filter(a=>!s.includes(a)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(a=>!r.removed.includes(a))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Fg.version="3.9.0";let WI=Fg;const KI="5.2.0",YI={version:KI},GI={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function QI(t,e){let n=e;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})),hA(t)?(n=new Tl(n,t),n):(n.request=t,n)}function xp(t){return t.data.slice(0,t.data.size,t.meta.type)}const XI={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:""};class JI extends vA{static VERSION=YI.version;#e;#t;uploaderEvents;constructor(e,n){if(super(e,{...XI,fieldName:n.bundle?"files[]":"file",...n}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=GI,this.i18nInit(),this.#t=new pA({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=i=>async(o,r)=>{try{const s=await iA(o,{...r,onBeforeRequest:(c,u)=>this.opts.onBeforeRequest?.(c,u,i),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:c=>{const u=Math.ceil(c/1e3),d=new Error(this.i18n("uploadStalled",{seconds:u}));this.uppy.emit("upload-stalled",d,i)},onUploadProgress:c=>{if(c.lengthComputable)for(const{id:u}of i){const d=this.uppy.getFile(u);d!=null&&this.uppy.emit("upload-progress",d,{uploadStarted:d.progress.uploadStarted??0,bytesUploaded:c.loaded/c.total*d.size,bytesTotal:d.size})}}});let a=await this.opts.getResponseData?.(s);if(s.responseType==="json")a??=s.response;else try{a??=JSON.parse(s.responseText)}catch(c){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:c})}const l=typeof a?.url=="string"?a.url:void 0;for(const{id:c}of i)this.uppy.emit("upload-success",this.uppy.getFile(c),{status:s.status,body:a,uploadURL:l});return s}catch(s){if(s.name==="AbortError")return;const a=s.request;for(const l of i)this.uppy.emit("upload-error",this.uppy.getFile(l.id),QI(a,s),a);throw s}}}getOptions(e){const n=this.uppy.getState().xhrUpload,{headers:i}=this.opts,o={...this.opts,...n||{},...e.xhrUpload||{},headers:{}};return typeof i=="function"?o.headers=i(e):Object.assign(o.headers,this.opts.headers),n&&Object.assign(o.headers,n.headers),e.xhrUpload&&Object.assign(o.headers,e.xhrUpload.headers),o}addMetadata(e,n,i){_h(i.allowedMetaFields,n).forEach(r=>{const s=n[r];Array.isArray(s)?s.forEach(a=>e.append(r,a)):e.append(r,s)})}createFormDataUpload(e,n){const i=new FormData;this.addMetadata(i,e.meta,n);const o=xp(e);return e.name?i.append(n.fieldName,o,e.meta.name):i.append(n.fieldName,o),i}createBundledUpload(e,n){const i=new FormData,{meta:o}=this.uppy.getState();return this.addMetadata(i,o,n),e.forEach(r=>{const s=this.getOptions(r),a=xp(r);r.name?i.append(s.fieldName,a,r.name):i.append(s.fieldName,a)}),i}async#n(e){const n=new gA(this.uppy),i=new AbortController;n.onFileRemove(e.id,()=>i.abort()),n.onCancelAll(e.id,()=>i.abort());try{await this.#t.add(async o=>{const r=this.getOptions(e),s=this.#e([e]),a=r.formData?this.createFormDataUpload(e,r):e.data,l=typeof r.endpoint=="string"?r.endpoint:await r.endpoint(e);return s(l,{...r,body:a,signal:AbortSignal.any([o,i.signal])})})}catch(o){if(o.name==="AbortError")return;throw o}finally{n.remove()}}async#i(e){const n=new AbortController;function i(){n.abort()}this.uppy.once("cancel-all",i);try{await this.#t.add(async o=>{const r=this.uppy.getState().xhrUpload??{},s=this.#e(e),a=this.createBundledUpload(e,{...this.opts,...r}),l=typeof this.opts.endpoint=="string"?this.opts.endpoint:await this.opts.endpoint(e);return s(l,{...this.opts,body:a,signal:AbortSignal.any([o,n.signal])})})}catch(o){if(o.name==="AbortError")return;throw o}finally{this.uppy.off("cancel-all",i)}}#r(e){const n=this.getOptions(e),i=_h(n.allowedMetaFields,e.meta);return{...e.remote?.body,protocol:"multipart",endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:Object.fromEntries(i.map(o=>[o,e.meta[o]])),httpMethod:n.method,useFormData:n.formData,headers:n.headers}}async#o(e){await Promise.allSettled(e.map(n=>{if(n.isRemote){const i=()=>this.#t,o=new AbortController,r=s=>{s.id===n.id&&o.abort()};return this.uppy.on("file-removed",r),this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,this.#r(n),{signal:o.signal,getQueue:i}).finally(()=>{this.uppy.off("file-removed",r)})}return this.#n(n)}))}#a=async e=>{if(e.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(e),i=sA(n),o=aA(i);if(this.uppy.emit("upload-start",o),this.opts.bundle){if(i.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.#i(i)}else await this.#o(i)};install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.#a)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.#a)}}const cu=new Map,Gl=Symbol("ServiceContainerId");function ZI(t,e){cu.set(t,e)}function eM(t){cu.delete(t)}function je(t){const e=t??ko(Gl);if(!e)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=cu.get(e);if(!n)throw new Error(`VueFinder app instance with id "${e}" was not found. Make sure the VueFinder component with id="${e}" is mounted.`);return n}function tM(t){const e=localStorage.getItem(t+"_storage"),n=Mt(JSON.parse(e??"{}"));Oe(n,i);function i(){Object.keys(n).length?localStorage.setItem(t+"_storage",JSON.stringify(n)):localStorage.removeItem(t+"_storage")}function o(a,l){n[a]=l}function r(a){delete n[a]}function s(){Object.keys(n).forEach(a=>r(a))}return{getStore:(a,l=null)=>a in n?n[a]:l,setStore:o,removeStore:r,clearStore:s}}function Yt(t,e="An error occurred"){if(!t)return e;if(typeof t=="string")return t||e;if(t instanceof Error)return t.message||e;if(typeof t=="object"&&t!==null){const n=t;if(typeof n.message=="string"&&n.message)return n.message;if(typeof n.error=="string"&&n.error)return n.error}return e}function nM(t,e){return zm(t,e,{encode:JSON.stringify,decode:JSON.parse})}function iM(t){if(!t?.config?.get)return!0;try{return!!t.config.get("notificationsEnabled")}catch{return!0}}function Bi(t,e,n){const i={type:e,message:n};if(t?.emitter?.emit?.("vf-notify",i),!!iM(t))switch(e){case"success":Tr.success(n);break;case"error":Tr.error(n);break;case"warning":Tr.warning(n);break;default:Tr.info(n);break}}function Gt(t){return{success(e){Bi(t,"success",e)},error(e){Bi(t,"error",e)},info(e){Bi(t,"info",e)},warning(e){Bi(t,"warning",e)},emit(e,n){Bi(t,e,n)}}}const Ya=new Map;async function Ga(t,e){const n=e[t];return typeof n=="function"?(await n()).default:n}function oM(t,e,n,i,o){const r=Gt({emitter:n,config:o}),s="vuefinder_locale",a="global";let l;if(Ya.has(a))l=Ya.get(a),e&&e!==l.get()&&l.set(e);else{const b=localStorage.getItem(s)?JSON.parse(localStorage.getItem(s)):null;l=nM(s,e||b||"en"),Ya.set(a,l)}const c="vuefinder_translations",u=b=>{try{const S=localStorage.getItem(c);if(S)return JSON.parse(S)[b]||null}catch{}return null},d=(b,S)=>{try{const x=localStorage.getItem(c),k=x?JSON.parse(x):{};k[b]=S,localStorage.setItem(c,JSON.stringify(k))}catch{}},h=ke(l),v=String(h.value),f=u(v),p=H(f||{});let _=!1;!f&&Object.keys(i).length>0&&Ga(v,i).then(b=>{p.value=b,d(v,b)}).catch(()=>{}),Oe(h,async(b,S)=>{if(S&&b===S)return;if(!_){_=!0;const k=u(String(b));if(k)p.value=k;else if(Object.keys(i).length>0)try{const O=await Ga(String(b),i);p.value=O,d(String(b),O)}catch{}return}const x=u(String(b));if(x)p.value=x;else try{const k=await Ga(String(b),i);p.value=k,d(String(b),k)}catch(k){const O=Yt(k,"Locale cannot be loaded!");r.error(O);return}Object.values(i).length>1&&(r.success("The language is set to "+b),n.emit("vf-language-saved"))},{immediate:!1});const C=(b,...S)=>S.length?C(b=b.replace("%s",String(S.shift())),...S):b;function w(b,...S){return p.value&&Object.prototype.hasOwnProperty.call(p.value,b)?C(p.value[b]||b,...S):C(b,...S)}const E=te({get:()=>h.value,set:b=>{l.set(b)}});return Mt({t:w,locale:E,localeAtom:l})}const rM=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],Lg={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:rM.reduce((t,e)=>(t[e]=!0,t),{})};function Tp(){return Lg.advanced}function jg(t){return t?t==="simple"||t==="advanced"?{...Lg[t]}:{...Tp(),...t}:Tp()}const sM="4.1.2";function uu(t,e,n,i,o){return e=Math,n=e.log,i=1024,o=n(t)/n(i)|0,(t/e.pow(i,o)).toFixed(0)+" "+(o?"KMGTPEZY"[--o]+"iB":"B")}function Ng(t,e,n,i,o){return e=Math,n=e.log,i=1e3,o=n(t)/n(i)|0,(t/e.pow(i,o)).toFixed(0)+" "+(o?"KMGTPEZY"[--o]+"B":"B")}function aM(t){if(typeof t=="number")return t;const e={k:1,m:2,g:3,t:4},n=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t);if(!n)return 0;const i=parseFloat(n[1]||"0"),o=(n[2]||"").toLowerCase(),r=e[o]??0;return Math.round(i*Math.pow(1024,r))}function lM(t){const e=Yo(null),n=H(!1),i=H(),o=H(!1);return{visible:n,type:e,data:i,open:(r,s=null)=>{t.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),n.value=!0,e.value=r,i.value=s},close:()=>{t.get("fullScreen")||(document.querySelector("body").style.overflow=""),n.value=!1,e.value=null},setEditMode:r=>{o.value=r},editMode:o}}const vs={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},gs={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},cM=new Set(Object.keys(gs));function uM(t){return t||"silver"}function Ug(t){return cM.has(t)}function Op(t){const e={},n={},i=t;for(const o in i)if(Ug(o))n[o]=i[o];else if(o in vs){const r=o;e[r]=i[o]}return{persistenceConfig:e,nonPersistenceConfig:n}}function $p(t,e){const n={...vs,...e,...t};return n.theme=uM(n.theme),n}function kp(t,e){return{...gs,...e,...t}}const dM=(t,e={})=>{const n=`vuefinder_config_${t}`,{persistenceConfig:i,nonPersistenceConfig:o}=Op(e),r=$p(i,vs),s=kp(o,gs),a=zm(n,r,{encode:JSON.stringify,decode:JSON.parse}),l=Tt(s),c=ri([a,l],(f,p)=>({...f,...p})),u=(f={})=>{const p=a.get(),_=l.get(),{persistenceConfig:C,nonPersistenceConfig:w}=Op(f),E=$p(C,p),b=kp(w,_);a.set(E),l.set(b)},d=f=>Ug(f)?l.get()[f]:a.get()[f],h=()=>({...a.get(),...l.get()}),v=(f,p)=>{const _=a.get();typeof f=="object"&&f!==null?a.set({..._,...f}):a.set({..._,[f]:p})};return{state:c,init:u,get:d,set:v,toggle:f=>{const p=a.get();v(f,!p[f])},all:h,reset:()=>{a.set({...vs}),l.set({...gs})}}};function hM(t,e){if(typeof t=="string"&&typeof e=="string")return t.toLowerCase().localeCompare(e.toLowerCase());const n=Number(t)||0,i=Number(e)||0;return n===i?0:n<i?-1:1}const pM=()=>{const t=Tt(""),e=Tt([]),n=Tt(!1),i=Tt([]),o=Tt({active:!1,column:"",order:""}),r=Tt({kind:"all",showHidden:!1}),s=Tt(new Set),a=Tt({type:"copy",path:"",items:new Set}),l=Tt(null),c=Tt(0),u=Tt(!1),d=Tt([]),h=Tt(-1),v=ri([t],ee=>{const G=(ee??"").trim(),he=G.indexOf("://"),me=he>=0?G.slice(0,he):"",$e=(he>=0?G.slice(he+3):G).split("/").filter(Boolean);let Se="";const Ne=$e.map(Pe=>(Se=Se?`${Se}/${Pe}`:Pe,{basename:Pe,name:Pe,path:me?`${me}://${Se}`:Se,type:"dir"}));return{storage:me,breadcrumb:Ne,path:G}}),f=ri([i,o,r],(ee,G,he)=>{let me=ee;he.kind==="files"?me=me.filter(Ue=>Ue.type==="file"):he.kind==="folders"&&(me=me.filter(Ue=>Ue.type==="dir")),he.showHidden||(me=me.filter(Ue=>!Ue.basename.startsWith(".")));const{active:$e,column:Se,order:Ne}=G;if(!$e||!Se)return me;const Pe=Ne==="asc"?1:-1;return me.slice().sort((Ue,ut)=>hM(Ue[Se],ut[Se])*Pe)}),p=ri([i,s],(ee,G)=>G.size===0?[]:ee.filter(he=>G.has(he.path))),_=(ee,G)=>{const he=t.get();if((G??!0)&&he!==ee){const me=d.get(),$e=h.get();$e<me.length-1&&me.splice($e+1),me.length===0&&he&&me.push(he),me.push(ee),d.set([...me]),h.set(me.length-1)}t.set(ee)},C=ee=>{i.set(ee??[])},w=ee=>{e.set(ee??[])},E=(ee,G)=>{o.set({active:!0,column:ee,order:G})},b=ee=>{const G=o.get();G.active&&G.column===ee?o.set({active:G.order==="asc",column:ee,order:"desc"}):o.set({active:!0,column:ee,order:"asc"})},S=()=>{o.set({active:!1,column:"",order:""})},x=(ee,G)=>{r.set({kind:ee,showHidden:G})},k=()=>{r.set({kind:"all",showHidden:!1})},O=(ee,G="multiple")=>{const he=new Set(s.get());G==="single"&&he.clear(),he.add(ee),s.set(he)},K=(ee,G="multiple")=>{const he=new Set(s.get());G==="single"&&he.clear(),ee.forEach(me=>he.add(me)),s.set(he)},D=ee=>{const G=new Set(s.get());G.delete(ee),s.set(G)},P=ee=>s.get().has(ee),U=(ee,G="multiple")=>{const he=new Set(s.get());he.has(ee)?he.delete(ee):(G==="single"&&he.clear(),he.add(ee)),s.set(he)},M=(ee="multiple",G)=>{if(ee==="single"){const he=i.get()[0];if(he){const me=he.path;s.set(new Set([me])),c.set(1)}}else{if(G?.selectionFilterType||G?.selectionFilterMimeIncludes&&G.selectionFilterMimeIncludes.length>0){const he=i.get().filter(me=>{const $e=G.selectionFilterType,Se=G.selectionFilterMimeIncludes;return $e==="files"&&me.type==="dir"||$e==="dirs"&&me.type==="file"?!1:Se&&Array.isArray(Se)&&Se.length>0&&me.type!=="dir"?me.mime_type?Se.some(Ne=>me.mime_type?.startsWith(Ne)):!1:!0}).map(me=>me.path);s.set(new Set(he))}else{const he=new Set(i.get().map(me=>me.path));s.set(he)}de(s.get().size)}},q=()=>{s.set(new Set),c.set(0)},le=ee=>{const G=new Set(ee??[]);s.set(G),c.set(G.size)},de=ee=>{c.set(ee)},Y=ee=>{u.set(!!ee)},I=()=>u.get(),A=(ee,G)=>{const he=i.get().filter(me=>G.has(me.path));a.set({type:ee,path:v.get().path,items:new Set(he)})},Q=ee=>ri([a],G=>G.type==="cut"&&Array.from(G.items).some(he=>he.path===ee)),z=ee=>ri([a],G=>G.type==="copy"&&Array.from(G.items).some(he=>he.path===ee));return{files:i,storages:e,currentPath:t,sort:o,filter:r,selectedKeys:s,selectedCount:c,loading:u,draggedItem:l,clipboardItems:a,path:v,sortedFiles:f,selectedItems:p,setPath:_,setFiles:C,setStorages:w,setSort:E,toggleSort:b,clearSort:S,setFilter:x,clearFilter:k,select:O,selectMultiple:K,deselect:D,toggleSelect:U,selectAll:M,isSelected:P,clearSelection:q,setSelection:le,setSelectedCount:de,setLoading:Y,isLoading:I,setClipboard:A,createIsCut:Q,createIsCopied:z,isCut:ee=>{const G=Q(ee);return ke(G).value??!1},isCopied:ee=>{const G=z(ee);return ke(G).value??!1},clearClipboard:()=>{a.set({type:"copy",path:"",items:new Set})},getClipboard:()=>a.get(),setDraggedItem:ee=>{l.set(ee)},getDraggedItem:()=>l.get(),clearDraggedItem:()=>{l.set(null)},setReadOnly:ee=>{n.set(ee)},getReadOnly:()=>n.get(),isReadOnly:ee=>n.get()?!0:ee.read_only??!1,goBack:()=>{const ee=d.get(),G=h.get();if(G>0){const he=G-1,me=ee[he];me&&(h.set(he),_(me,!1))}},goForward:()=>{const ee=d.get(),G=h.get();if(G<ee.length-1){const he=G+1,me=ee[he];me&&(h.set(he),_(me,!1))}},canGoBack:ri([h],ee=>ee>0),canGoForward:ri([d,h],(ee,G)=>G<ee.length-1),navigationHistory:d,historyIndex:h}};class fM{validateParam(e,n){if(e==null)throw new Error(`${n} is required`)}validatePath(e){if(!e)throw new Error("Path must be a non-empty string")}parsePath(e){if(!e)return{};if(e.includes("://")){const[n,...i]=e.split("://");return{storage:n,path:i.join("://")}}return{path:e}}combinePath(e,n){return e&&n?`${e}://${n}`:n||""}}function Ap(t,e,n){const i=`HTTP ${e}: ${n}`;if(!t)return i;try{const o=JSON.parse(t);if(o.message)return o.message;if(o.error){if(typeof o.error=="string")return o.error;if(o.error.message)return o.error.message}if(o.errors&&Array.isArray(o.errors)&&o.errors.length>0){const r=o.errors.map(s=>s.message).filter(s=>!!s);if(r.length>0)return r.join(", ")}return o.detail?o.detail:o.title?o.title:t}catch{return t||i}}class zg extends fM{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(e){super();const n={...zg.DEFAULT_URLS,...e.url||{}};this.config={...e,baseURL:e.baseURL||"",url:n}}setBaseURL(e){this.config.baseURL=e||""}setToken(e){this.config.token=e}configureUploader(e,n){const i=this.getHeaders();delete i["Content-Type"],e.use(JI,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:i,formData:!0}),e.on("upload",()=>{const o=n.getTargetPath();e.getFiles().forEach(r=>{e.setFileMeta(r.id,{path:o})})})}getHeaders(){const e={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(e.Authorization=`Bearer ${this.config.token}`),e}async request(e,n={}){const i=`${this.config.baseURL}${e}`,o=await fetch(i,{...n,headers:{...this.getHeaders(),...n.headers}});if(!o.ok){const r=await o.text(),s=Ap(r,o.status,o.statusText);throw new Error(s)}return(o.headers.get("content-type")||"").includes("application/json")?await o.json():await o.text()}async list(e){const n=new URLSearchParams;e?.path&&n.append("path",e.path);const i=n.toString()?`${this.config.url.list}?${n.toString()}`:this.config.url.list;return await this.request(i,{method:"GET"})}async delete(e){return this.validateParam(e.items,"items"),this.validateParam(e.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:e.path,items:e.items})})}async rename(e){return this.validateParam(e.path,"path"),this.validateParam(e.item,"item"),this.validateParam(e.name,"name"),this.validatePath(e.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:e.path,item:e.item,name:e.name})})}async copy(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async move(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async archive(e){return this.validateParam(e.items,"items"),this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:e.items,path:e.path,name:e.name})})}async unarchive(e){return this.validateParam(e.item,"item"),this.validateParam(e.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:e.item,path:e.path})})}async createFile(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}async createFolder(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}getPreviewUrl(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`}async getContent(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path}),i=`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`,o=await fetch(i,{headers:this.getHeaders()});if(!o.ok){const r=await o.text(),s=Ap(r,o.status,o.statusText);throw new Error(s)}return{content:await o.text(),mimeType:o.headers.get("Content-Type")||void 0}}getDownloadUrl(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.download}?${n.toString()}`}async search(e){const n=this.config.url.search,i=new URLSearchParams;e.path&&i.set("path",e.path),e.filter&&i.set("filter",e.filter),e.deep&&i.set("deep","1"),e.size&&e.size!=="all"&&i.set("size",e.size);const o=i.toString()?`${n}?${i.toString()}`:n;return(await this.request(o,{method:"GET"})).files||[]}async save(e){return this.validateParam(e.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:e.path,content:e.content}),headers:this.getHeaders()})}}const Pp={list:t=>["adapter","list",t],search:(t,e,n,i)=>["adapter","search",t,e,n,i],delete:t=>["adapter","delete",t],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class mM{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(e,n={}){this.driver=e,this.onBeforeOpen=n.onBeforeOpen,this.onAfterOpen=n.onAfterOpen,this.queryClient=n.queryClient||new tA({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(e){const n=Pp.list(e);return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.list({path:e}),staleTime:this.config.staleTime})}async open(e){this.onBeforeOpen&&this.onBeforeOpen();const n=await this.list(e);return this.onAfterOpen&&this.onAfterOpen(n),n}async delete(e){const n=await this.driver.delete(e);return this.invalidateListQueries(),n}async rename(e){const n=await this.driver.rename(e);return this.invalidateListQueries(),n}async copy(e){const n=await this.driver.copy(e);return this.invalidateListQueries(),n}async move(e){const n=await this.driver.move(e);return this.invalidateListQueries(),n}async archive(e){const n=await this.driver.archive(e);return this.invalidateListQueries(),n}async unarchive(e){const n=await this.driver.unarchive(e);return this.invalidateListQueries(),n}async createFile(e){const n=await this.driver.createFile(e);return this.invalidateListQueries(),n}async createFolder(e){const n=await this.driver.createFolder(e);return this.invalidateListQueries(),n}async getContent(e){const n=["adapter","content",e.path];return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.getContent(e),staleTime:this.config.staleTime})}getPreviewUrl(e){return this.driver.getPreviewUrl(e)}getDownloadUrl(e){return this.driver.getDownloadUrl(e)}async search(e){const n=Pp.search(e.path,e.filter,e.deep,e.size);return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.search(e),staleTime:this.config.staleTime})}async save(e){const n=await this.driver.save(e);return this.invalidateListQueries(),n}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(e){this.queryClient.invalidateQueries({queryKey:["adapter","list",e],exact:!0})}clearCache(){this.queryClient.clear()}}function vM(t){const e=ke(t.state);return{current:te(()=>e.value.theme||"silver"),set:n=>{t.set("theme",n)}}}const gM=(t,e)=>{const n=tM(t.id??"vf"),i=C$(),o=e.i18n,r=t.locale??e.locale,s=dM(t.id??"vf",t.config??{}),a=pM();if(!t.driver)throw new Error("Driver is required for VueFinder");const l=new mM(t.driver);return Mt({version:sM,config:s,theme:(()=>{const c=vM(s);return{current:c.current,set:c.set}})(),fs:a,root:null,debug:t.debug??!1,emitter:i,storage:n,i18n:oM(n,r,i,o,s),modal:lM(s),adapter:Gn(l),features:jg(t.features),selectionMode:t.selectionMode||"multiple",selectionFilterType:te(()=>t.selectionFilterType||"both"),selectionFilterMimeIncludes:te(()=>t.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:s.get("metricUnits")?Ng:uu,contextMenuItems:t.contextMenuItems,customUploader:t.customUploader})},_M=["data-theme"],yM={class:"vuefinder__modal-layout__container"},bM={class:"vuefinder__modal-layout__content"},wM={key:0,class:"vuefinder__modal-layout__footer"},EM={key:0,class:"vuefinder__modal-drag-overlay"},CM={class:"vuefinder__modal-drag-message"},tn=Ce({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{}},setup(t){const e=H(null),n=je();n.config;const i=t;et(()=>{const r=document.querySelector(".v-f-modal input");r&&r.focus(),Ge(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&e.value){const s=e.value.getBoundingClientRect().bottom+16;window.scrollTo({top:s,left:0,behavior:"smooth"})}})});const o=r=>{r.target.classList.contains("vuefinder__modal-layout__wrapper")&&(r.preventDefault(),r.stopPropagation())};return(r,s)=>(y(),T("div",{"data-theme":m(n).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:s[1]||(s[1]=ho(a=>m(n).modal.close(),["esc"]))},[s[2]||(s[2]=g("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),g("div",yM,[g("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:o,onMousedown:s[0]||(s[0]=Ye(a=>m(n).modal.close(),["self"]))},[g("div",{ref_key:"modalBody",ref:e,class:"vuefinder__modal-layout__body"},[g("div",bM,[Ve(r.$slots,"default")]),r.$slots.buttons?(y(),T("div",wM,[Ve(r.$slots,"buttons")])):ue("",!0)],512)],32)]),i.showDragOverlay?(y(),T("div",EM,[g("div",CM,L(i.dragOverlayText||"Drag and drop the files/folders to here."),1)])):ue("",!0)],40,_M))}}),SM={class:"vuefinder__modal-header"},xM={class:"vuefinder__modal-header__icon-container"},TM={id:"modal-title",class:"vuefinder__modal-header__title"},pn=Ce({__name:"ModalHeader",props:{title:{},icon:{}},setup(t){return(e,n)=>(y(),T("div",SM,[g("div",xM,[(y(),ne(Ot(t.icon),{class:"vuefinder__modal-header__icon"}))]),g("div",TM,L(t.title),1)]))}}),OM={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function $M(t,e){return y(),T("svg",OM,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"9"},null,-1),g("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 Vg={render:$M},kM={class:"vuefinder__about-modal__content"},AM={class:"vuefinder__about-modal__main"},PM={class:"vuefinder__about-modal__tab-content"},RM={class:"vuefinder__about-modal__lead"},IM={class:"vuefinder__about-modal__description"},MM={class:"vuefinder__about-modal__links"},DM={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},FM={class:"vuefinder__about-modal__meta"},LM={class:"vuefinder__about-modal__meta-item"},jM={class:"vuefinder__about-modal__meta-label"},NM={class:"vuefinder__about-modal__meta-value"},UM={class:"vuefinder__about-modal__meta-item"},zM={class:"vuefinder__about-modal__meta-label"},Bg=Ce({__name:"ModalAbout",setup(t){const e=je(),{t:n}=e.i18n;return(i,o)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:o[0]||(o[0]=r=>m(e).modal.close())},L(m(n)("Close")),1)]),default:we(()=>[g("div",kM,[j(pn,{icon:m(Vg),title:"Vuefinder "+m(e).version},null,8,["icon","title"]),g("div",AM,[g("div",PM,[g("div",RM,L(m(n)("A modern, customizable file manager component built for Vue.")),1),g("div",IM,L(m(n)("If you like it, please follow and ⭐ star on GitHub.")),1),g("div",MM,[g("a",DM,L(m(n)("Project Home")),1),o[1]||(o[1]=g("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),g("div",FM,[g("div",LM,[g("span",jM,L(m(n)("Version")),1),g("span",NM,L(m(e).version),1)]),g("div",UM,[g("span",zM,L(m(n)("License")),1),o[2]||(o[2]=g("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),VM={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function BM(t,e){return y(),T("svg",VM,[...e[0]||(e[0]=[g("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 Hg={render:BM},HM={class:"vuefinder__delete-modal__content"},qM={class:"vuefinder__delete-modal__form"},WM={class:"vuefinder__delete-modal__description"},KM={class:"vuefinder__delete-modal__files vf-scrollbar"},YM={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"},GM={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"},QM={class:"vuefinder__delete-modal__file-name"},XM={class:"vuefinder__delete-modal__confirmation"},JM={class:"vuefinder__delete-modal__confirmation-label"},ZM={class:"vuefinder__delete-modal__confirmation-text"},eD=["disabled"],Gs=Ce({__name:"ModalDelete",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(e.modal.data.items),a=H(!1),l=()=>{s.value.length&&a.value&&e.adapter.delete({path:r.value.path,items:s.value.map(({path:c,type:u})=>({path:c,type:u}))}).then(c=>{n.success(i("Files deleted.")),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,i("Failed to delete files")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("div",XM,[g("label",JM,[it(g("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>a.value=d),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[Es,a.value]]),g("span",ZM,L(m(i)("I'm sure delete it, This action cannot be undone.")),1)])]),g("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!a.value,onClick:l},L(m(i)("Yes, Delete!")),9,eD),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=d=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(Hg),title:m(i)("Delete files")},null,8,["icon","title"]),g("div",HM,[g("div",qM,[g("p",WM,L(m(i)("Are you sure you want to delete these files?")),1),g("div",KM,[(y(!0),T(Ie,null,He(s.value,d=>(y(),T("p",{key:d.path,class:"vuefinder__delete-modal__file"},[d.type==="dir"?(y(),T("svg",YM,[...u[2]||(u[2]=[g("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)])])):(y(),T("svg",GM,[...u[3]||(u[3]=[g("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)])])),g("span",QM,L(d.basename),1)]))),128))])])])])]),_:1}))}}),tD={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function nD(t,e){return y(),T("svg",tD,[...e[0]||(e[0]=[g("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 qg={render:nD},iD={class:"vuefinder__rename-modal__content"},oD={class:"vuefinder__rename-modal__item"},rD={class:"vuefinder__rename-modal__item-info"},sD={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"},aD={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"},lD={class:"vuefinder__rename-modal__item-name"},Qs=Ce({__name:"ModalRename",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(e.modal.data.items[0]),a=H(s.value.basename),l=()=>{a.value!=s.value.basename&&e.adapter.rename({path:r.value.path,item:s.value.path,name:a.value}).then(c=>{n.success(i("%s is renamed.",a.value)),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,i("Failed to rename")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},L(m(i)("Rename")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=d=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(qg),title:m(i)("Rename")},null,8,["icon","title"]),g("div",iD,[g("div",oD,[g("p",rD,[s.value.type==="dir"?(y(),T("svg",sD,[...u[2]||(u[2]=[g("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)])])):(y(),T("svg",aD,[...u[3]||(u[3]=[g("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)])])),g("span",lD,L(s.value.basename),1)]),it(g("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>a.value=d),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:ho(l,["enter"])},null,544),[[Go,a.value]])])])])]),_:1}))}});function Tn(){const t=je(),e=te(()=>t.features);return{enabled:n=>e.value[n]??!1}}const cD={class:"vuefinder__text-preview"},uD={class:"vuefinder__text-preview__header"},dD=["title"],hD={class:"vuefinder__text-preview__actions"},pD={key:0,class:"vuefinder__text-preview__content"},fD={key:1},mD=Ce({__name:"Text",emits:["success"],setup(t,{emit:e}){const n=e,i=H(""),o=H(""),r=H(null),s=H(!1),a=je(),l=Gt(a),{enabled:c}=Tn(),{t:u}=a.i18n;et(async()=>{try{const v=await a.adapter.getContent({path:a.modal.data.item.path});i.value=v.content,n("success")}catch(v){Yt(v,"Failed to load text content"),n("success")}});const d=()=>{s.value=!s.value,o.value=i.value,a.modal.setEditMode(s.value)},h=async()=>{try{const v=a.modal.data.item.path;await a.adapter.save({path:v,content:o.value}),i.value=o.value,l.success(u("Updated.")),n("success"),s.value=!s.value}catch(v){l.error(Yt(v,u("Failed to save file")))}};return(v,f)=>(y(),T("div",cD,[g("div",uD,[g("div",{id:"modal-title",class:"vuefinder__text-preview__title",title:m(a).modal.data.item.path},L(m(a).modal.data.item.basename),9,dD),g("div",hD,[s.value?(y(),T("button",{key:0,class:"vuefinder__text-preview__save-button",onClick:h},L(m(u)("Save")),1)):ue("",!0),m(c)("edit")?(y(),T("button",{key:1,class:"vuefinder__text-preview__edit-button",onClick:f[0]||(f[0]=p=>d())},L(s.value?m(u)("Cancel"):m(u)("Edit")),1)):ue("",!0)])]),g("div",null,[s.value?(y(),T("div",fD,[it(g("textarea",{ref_key:"editInput",ref:r,"onUpdate:modelValue":f[1]||(f[1]=p=>o.value=p),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512),[[Go,o.value]])])):(y(),T("pre",pD,L(i.value),1))])]))}}),du=async(t,e)=>{if(e){if(e.isFile){const n=await new Promise(i=>{e.file(i)});t(e,n)}if(e.isDirectory){const n=e.createReader(),i=await new Promise(o=>{n.readEntries(o)});for(const o of i)await du(t,o)}}},vt={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function Wg(t){const e=je(),{t:n}=e.i18n,i=e.fs,o=ke(i.path),r=e.config,s=H({QUEUE_ENTRY_STATUS:vt}),a=H(null),l=H(null),c=H(null),u=H(null),d=H(null),h=H([]),v=H(""),f=H(!1),p=H(!1),_=H(null);let C;const w=Y=>{Y.preventDefault(),Y.stopPropagation(),p.value=!0},E=Y=>{Y.preventDefault(),Y.stopPropagation(),p.value=!0},b=Y=>{Y.preventDefault(),Y.stopPropagation(),(!Y.relatedTarget||Y.relatedTarget===document.body)&&(p.value=!1)},S=Y=>{Y.preventDefault(),Y.stopPropagation(),p.value=!1;const I=/^[/\\](.+)/,A=Y.dataTransfer;A&&(A.items&&A.items.length?Array.from(A.items).forEach(Q=>{if(Q.kind==="file"){const z=Q.webkitGetAsEntry?.();if(z)du((ie,ve)=>{const re=I.exec(ie?.fullPath||"");k(ve,re?re[1]:ve.name)},z);else{const ie=Q.getAsFile?.();ie&&k(ie)}}}):A.files&&A.files.length&&Array.from(A.files).forEach(Q=>k(Q)))},x=Y=>h.value.findIndex(I=>I.id===Y),k=(Y,I)=>C.addFile({name:I||Y.name,type:Y.type,data:Y,source:"Local"}),O=Y=>Y.status===vt.DONE?"text-green-600":Y.status===vt.ERROR||Y.status===vt.CANCELED?"text-red-600":"",K=Y=>Y.status===vt.DONE?"✓":Y.status===vt.ERROR||Y.status===vt.CANCELED?"!":"...",D=()=>u.value?.click(),P=()=>e.modal.close(),U=Y=>{if(f.value||!h.value.filter(I=>I.status!==vt.DONE).length){f.value||(v.value=n("Please select file to upload first."));return}v.value="",_.value=Y||o.value,C.upload()},M=()=>{C.cancelAll(),h.value.forEach(Y=>{Y.status!==vt.DONE&&(Y.status=vt.CANCELED,Y.statusName=n("Canceled"))}),f.value=!1},q=Y=>{f.value||(C.removeFile(Y.id),h.value.splice(x(Y.id),1))},le=Y=>{if(!f.value)if(C.cancelAll(),Y){const I=h.value.filter(A=>A.status!==vt.DONE);h.value=[],I.forEach(A=>k(A.originalFile,A.name))}else h.value=[]},de=Y=>{Y.forEach(I=>{k(I)})};return et(()=>{C=new kc({debug:e.debug,restrictions:{maxFileSize:aM(r.get("maxFileSize")??"10mb")},locale:e.i18n.t("uppy"),onBeforeFileAdded:(Q,z)=>{if(z[Q.id]!=null){const ie=x(Q.id);h.value[ie]?.status===vt.PENDING&&(v.value=C.i18n("noDuplicates",{fileName:Q.name})),h.value=h.value.filter(ve=>ve.id!==Q.id)}return h.value.push({id:Q.id,name:Q.name,size:e.filesize(Q.size),status:vt.PENDING,statusName:n("Pending upload"),percent:null,originalFile:Q.data}),!0}});const Y={getTargetPath:()=>(_.value||o.value).path};if(t)t(C,Y);else if(e.adapter.getDriver().configureUploader)e.adapter.getDriver().configureUploader(C,Y);else throw new Error("No uploader configured");C.on("restriction-failed",(Q,z)=>{const ie=h.value[x(Q.id)];ie&&q(ie),v.value=z.message}),C.on("upload-start",Q=>{Q.forEach(z=>{const ie=h.value[x(z.id)];ie&&(ie.status=vt.UPLOADING,ie.statusName=n("Uploading"),ie.percent="0%")})}),C.on("upload-progress",(Q,z)=>{const ie=z.bytesTotal??1,ve=Math.floor(z.bytesUploaded/ie*100),re=x(Q.id);re!==-1&&h.value[re]&&(h.value[re].percent=`${ve}%`)}),C.on("upload-success",Q=>{const z=h.value[x(Q.id)];z&&(z.status=vt.DONE,z.statusName=n("Done"))}),C.on("upload-error",(Q,z)=>{const ie=h.value[x(Q.id)];ie&&(ie.percent=null,ie.status=vt.ERROR,ie.statusName=z?.isNetworkError?n("Network Error, Unable establish connection to the server or interrupted."):z?.message||n("Unknown Error"))}),C.on("error",Q=>{v.value=Q.message,f.value=!1}),C.on("complete",Q=>{f.value=!1;const z=_.value||o.value;e.adapter.invalidateListQuery(z.path),e.adapter.open(z.path);const ie=h.value.filter(ve=>ve.status===vt.DONE&&Q.successful.includes(ve.id)).map(ve=>ve.name);e.emitter.emit("vf-upload-complete",ie)}),u.value?.addEventListener("click",()=>l.value?.click()),d.value?.addEventListener("click",()=>c.value?.click());const I={capture:!0};document.addEventListener("dragover",w,I),document.addEventListener("dragenter",E,I),document.addEventListener("dragleave",b,I),document.addEventListener("drop",S,I);const A=Q=>{const z=Q.target,ie=z.files;if(ie){for(const ve of ie)k(ve);z.value=""}};l.value?.addEventListener("change",A),c.value?.addEventListener("change",A)}),Ct(()=>{const Y={capture:!0};document.removeEventListener("dragover",w,Y),document.removeEventListener("dragenter",E,Y),document.removeEventListener("dragleave",b,Y),document.removeEventListener("drop",S,Y)}),{container:a,internalFileInput:l,internalFolderInput:c,pickFiles:u,pickFolders:d,queue:h,message:v,uploading:f,hasFilesInDropArea:p,definitions:s,openFileSelector:D,upload:U,cancel:M,remove:q,clear:le,close:P,getClassNameForEntry:O,getIconForEntry:K,addExternalFiles:de}}const vD={class:"vuefinder__image-preview"},gD={class:"vuefinder__image-preview__header"},_D=["title"],yD={class:"vuefinder__image-preview__actions"},bD={class:"vuefinder__image-preview__image-container"},wD=["src"],ED=Ce({name:"ImagePreview",__name:"Image",emits:["success"],setup(t,{emit:e}){const n=e,i=je(),o=Gt(i),{enabled:r}=Tn(),{t:s}=i.i18n,a=H(!1),l=H(i.modal.data.item.previewUrl??i.adapter.getPreviewUrl({path:i.modal.data.item.path})),c=H(l.value),{addExternalFiles:u,upload:d,queue:h}=Wg(i.customUploader),v=i.fs,f=ke(v.path),p=In("cropperRef"),_=async()=>{a.value=!a.value,i.modal.setEditMode(a.value)},C=async()=>{const w=p.value?.getResult({size:{width:795,height:341},fillColor:"#ffffff"})?.canvas;if(!w)return;let E=w;if(w.width>1200||w.height>1200){const O=Math.min(1200/w.width,1200/w.height),K=document.createElement("canvas");K.width=Math.floor(w.width*O),K.height=Math.floor(w.height*O);const D=K.getContext("2d");D&&(D.drawImage(w,0,0,K.width,K.height),E=K)}const b=i.modal.data.item.basename,S=b.split(".").pop()?.toLowerCase()||"jpg",x=S==="png"?"image/png":S==="gif"?"image/gif":"image/jpeg",k=await new Promise(O=>{E.toBlob(K=>O(K),x)});if(!k){o.error(s("Failed to save image"));return}try{const O=new File([k],b,{type:x}),K=i.modal.data.item.path.split("/");K.pop();const D={path:K.join("/")||(f.value?.path??"")};u([O]),await new Promise(q=>setTimeout(q,100));const P=h.value.find(q=>q.name===O.name);if(!P)throw new Error("File was not added to upload queue");d(D);let U=0;for(;U<150;){await new Promise(le=>setTimeout(le,200));const q=h.value.find(le=>le.id===P.id);if(q?.status===vt.DONE)break;if(q?.status===vt.ERROR)throw new Error(q.statusName||"Upload failed");U++}o.success(s("Updated.")),await fetch(l.value,{cache:"reload",mode:"no-cors"});const M=i.root?.querySelector?.('[data-src="'+l.value+'"]');M&&M instanceof HTMLElement&&Hi.resetStatus(M),i.emitter.emit("vf-refresh-thumbnails"),await _(),n("success")}catch(O){o.error(Yt(O,s("Failed to save image")))}};return et(()=>{n("success")}),(w,E)=>(y(),T("div",vD,[g("div",gD,[g("h3",{id:"modal-title",class:"vuefinder__image-preview__title",title:m(i).modal.data.item.path},L(m(i).modal.data.item.basename),9,_D),g("div",yD,[a.value?(y(),T("button",{key:0,class:"vuefinder__image-preview__crop-button",onClick:C},L(m(s)("Crop")),1)):ue("",!0),m(r)("edit")?(y(),T("button",{key:1,class:"vuefinder__image-preview__edit-button",onClick:E[0]||(E[0]=b=>_())},L(a.value?m(s)("Cancel"):m(s)("Edit")),1)):ue("",!0)])]),g("div",bD,[a.value?(y(),ne(m(wv),{key:1,ref_key:"cropperRef",ref:p,class:"h-full w-full",crossorigin:"anonymous",src:c.value,"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src"])):(y(),T("img",{key:0,style:{},src:m(i).modal.data.item.previewUrl??m(i).adapter.getPreviewUrl({path:m(i).modal.data.item.path}),class:"vuefinder__image-preview__image h-full w-full"},null,8,wD))])]))}}),CD={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function SD(t,e){return y(),T("svg",CD,[...e[0]||(e[0]=[g("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 qo={render:SD},xD={class:"vuefinder__default-preview"},TD={class:"vuefinder__default-preview__content"},OD={class:"vuefinder__default-preview__header"},$D=["title"],kD={class:"vuefinder__default-preview__icon-container"},AD=["title"],PD=Ce({__name:"Default",emits:["success"],setup(t,{emit:e}){const n=je(),i=e;return et(()=>{i("success")}),(o,r)=>(y(),T("div",xD,[g("div",TD,[g("div",OD,[g("h3",{id:"modal-title",class:"vuefinder__default-preview__title",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,$D)]),g("div",kD,[j(m(qo),{class:"vuefinder__default-preview__file-icon"}),g("div",{id:"modal-title",class:"vuefinder__default-preview__file-name",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,AD)])])]))}}),RD={class:"vuefinder__video-preview"},ID=["title"],MD={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},DD=["src"],FD=Ce({__name:"Video",emits:["success"],setup(t,{emit:e}){const n=je(),i=e,o=()=>n.adapter.getPreviewUrl({path:n.modal.data.item.path});return et(()=>{i("success")}),(r,s)=>(y(),T("div",RD,[g("h3",{id:"modal-title",class:"vuefinder__video-preview__title",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,ID),g("div",null,[g("video",MD,[g("source",{src:o(),type:"video/mp4"},null,8,DD),s[0]||(s[0]=Ke(" Your browser does not support the video tag. ",-1))])])]))}}),LD={class:"vuefinder__audio-preview"},jD=["title"],ND={class:"vuefinder__audio-preview__audio",controls:""},UD=["src"],zD=Ce({__name:"Audio",emits:["success"],setup(t,{emit:e}){const n=e,i=je(),o=()=>{const r=je();return r.adapter.getPreviewUrl({path:r.modal.data.item.path})};return et(()=>{n("success")}),(r,s)=>(y(),T("div",LD,[g("h3",{id:"modal-title",class:"vuefinder__audio-preview__title",title:m(i).modal.data.item.path},L(m(i).modal.data.item.basename),9,jD),g("div",null,[g("audio",ND,[g("source",{src:o(),type:"audio/mpeg"},null,8,UD),s[0]||(s[0]=Ke(" Your browser does not support the audio element. ",-1))])])]))}}),VD={class:"vuefinder__pdf-preview"},BD=["title"],HD=["data"],qD=["src"],WD=Ce({__name:"Pdf",emits:["success"],setup(t,{emit:e}){const n=je(),i=e,o=()=>{const r=je();return r.adapter.getPreviewUrl({path:r.modal.data.item.path})};return et(()=>{i("success")}),(r,s)=>(y(),T("div",VD,[g("h3",{id:"modal-title",class:"vuefinder__pdf-preview__title",title:m(n).modal.data.item.path},L(m(n).modal.data.item.basename),9,BD),g("div",null,[g("object",{class:"vuefinder__pdf-preview__object",data:o(),type:"application/pdf",width:"100%",height:"100%"},[g("iframe",{class:"vuefinder__pdf-preview__iframe",src:o(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,qD)],8,HD)])]))}});function KD(t,e=null){return new Date(t*1e3).toLocaleString(e??navigator.language??"en-US")}const YD={key:0,class:"vuefinder__preview-modal__nav-overlay"},GD=["disabled","title"],QD=["disabled","title"],XD={class:"vuefinder__preview-modal__content"},JD={key:0},ZD={class:"vuefinder__preview-modal__loading"},eF={key:0,class:"vuefinder__preview-modal__loading-indicator"},tF={class:"vuefinder__preview-modal__details"},nF={class:"font-bold"},iF={class:"pl-2 font-bold"},oF={key:0,class:"vuefinder__preview-modal__note"},rF=["download","href"],lr=Ce({__name:"ModalPreview",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n,o=H(!1),r=w=>{const E=(w||"").split("/").pop()||"",b=E.lastIndexOf(".");return b>=0?E.slice(b+1).toLowerCase():""},s=(w,E)=>E?w==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(E):w==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(E):w==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(E):w==="text"?new Set(["txt","md","json","js","ts","css","scss","html","xml","csv","log","yml","yaml"]).has(E):w==="application/pdf"?E==="pdf":!1:!1,a=w=>{const E=e.modal.data.item.mime_type;if(E&&typeof E=="string")return E.startsWith(w);const b=r(e.modal.data.item.path);return s(w,b)},l=n("preview");l||(o.value=!0);const c=te(()=>e.modal.data.item),u=ke(e.fs.sortedFiles),d=te(()=>u.value.filter(w=>w.type==="file")),h=te(()=>d.value.findIndex(w=>w.path===c.value.path)),v=te(()=>h.value>0),f=te(()=>h.value<d.value.length-1),p=()=>{if(e.modal.editMode||!v.value)return;const w=d.value[h.value-1];w&&(e.fs.clearSelection(),e.fs.select(w.path),e.modal.data.item=w)},_=()=>{if(e.modal.editMode||!f.value)return;const w=d.value[h.value+1];w&&(e.fs.clearSelection(),e.fs.select(w.path),e.modal.data.item=w)},C=w=>{if(w.key==="Escape"){w.preventDefault(),w.stopPropagation(),e.modal.close();return}(w.key==="ArrowLeft"||w.key==="ArrowRight")&&(w.preventDefault(),w.stopPropagation(),w.key==="ArrowLeft"?p():_())};return et(()=>{const w=document.querySelector(".vuefinder__preview-modal");w&&w.focus()}),(w,E)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:E[6]||(E[6]=b=>m(e).modal.close())},L(m(i)("Close")),1),m(n)("download")?(y(),T("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:m(e).adapter.getDownloadUrl(m(e).modal.data.item),href:m(e).adapter.getDownloadUrl(m(e).modal.data.item)},L(m(i)("Download")),9,rF)):ue("",!0)]),default:we(()=>[g("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:C},[m(e).modal.editMode?ue("",!0):(y(),T("div",YD,[g("button",{disabled:!v.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:m(i)("Previous file"),onClick:p},[...E[7]||(E[7]=[g("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[g("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,GD),g("button",{disabled:!f.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:m(i)("Next file"),onClick:_},[...E[8]||(E[8]=[g("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[g("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,QD)])),g("div",XD,[m(l)?(y(),T("div",JD,[a("text")?(y(),ne(mD,{key:`text-${c.value.path}`,onSuccess:E[0]||(E[0]=b=>o.value=!0)})):a("image")?(y(),ne(ED,{key:`image-${c.value.path}`,onSuccess:E[1]||(E[1]=b=>o.value=!0)})):a("video")?(y(),ne(FD,{key:`video-${c.value.path}`,onSuccess:E[2]||(E[2]=b=>o.value=!0)})):a("audio")?(y(),ne(zD,{key:`audio-${c.value.path}`,onSuccess:E[3]||(E[3]=b=>o.value=!0)})):a("application/pdf")?(y(),ne(WD,{key:`pdf-${c.value.path}`,onSuccess:E[4]||(E[4]=b=>o.value=!0)})):(y(),ne(PD,{key:`default-${c.value.path}`,onSuccess:E[5]||(E[5]=b=>o.value=!0)}))])):ue("",!0),g("div",ZD,[o.value===!1?(y(),T("div",eF,[E[9]||(E[9]=g("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[g("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("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)),g("span",null,L(m(i)("Loading")),1)])):ue("",!0)])])],32),g("div",tF,[g("div",null,[g("span",nF,L(m(i)("File Size"))+": ",1),Ke(L(m(e).filesize(m(e).modal.data.item.file_size)),1)]),g("div",null,[g("span",iF,L(m(i)("Last Modified"))+": ",1),Ke(" "+L(m(KD)(m(e).modal.data.item.last_modified)),1)])]),m(n)("download")?(y(),T("div",oF,[g("span",null,L(m(i)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):ue("",!0)]),_:1}))}}),sF={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 aF(t,e){return y(),T("svg",sF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("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 lF={render:aF},cF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function uF(t,e){return y(),T("svg",cF,[...e[0]||(e[0]=[g("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 hu={render:uF},dF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function hF(t,e){return y(),T("svg",dF,[...e[0]||(e[0]=[g("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 Nn={render:hF},pF={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 fF(t,e){return y(),T("svg",pF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const Xs={render:fF},mF={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 vF(t,e){return y(),T("svg",mF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("path",{d:"M5 12h14"},null,-1)])])}const Js={render:vF},gF={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 _F(t,e){return y(),T("svg",gF,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("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 pu={render:_F},yF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function bF(t,e){return y(),T("svg",yF,[...e[0]||(e[0]=[g("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 fu={render:bF},wF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function EF(t,e){return y(),T("svg",wF,[...e[0]||(e[0]=[g("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 mu={render:EF},CF={class:"vuefinder__modal-tree__folder-item"},SF={class:"vuefinder__modal-tree__folder-content"},xF={key:1,class:"vuefinder__modal-tree__folder-spacer"},TF={class:"vuefinder__modal-tree__folder-text"},OF={key:0,class:"vuefinder__modal-tree__subfolders"},$F={key:0,class:"vuefinder__modal-tree__more-note"},kF=300,AF=Ce({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(t,{emit:e}){const n=je(),{t:i}=n.i18n,o=n.fs,r=H({}),s=t,a=e;ke(o.path);const l=te(()=>{const k=`${s.storage}:${s.folder.path}`;return s.expandedFolders[k]||!1}),c=te(()=>s.modelValue?.path===s.folder.path),u=te(()=>s.currentPath?.path===s.folder.path),d=te(()=>s.modalTreeData[s.folder.path]||[]),h=te(()=>{const k=d.value,O=r.value[s.folder.path]||50;return k.length>O?k.slice(0,O):k}),v=te(()=>d.value.length),f=te(()=>r.value[s.folder.path]||50),p=te(()=>v.value>f.value),_=()=>{r.value[s.folder.path]=(f.value||50)+50},C=te(()=>d.value.length>0||s.folder.type==="dir"),w=()=>{a("toggleFolder",s.storage,s.folder.path)},E=()=>{a("update:modelValue",s.folder)},b=()=>{a("update:modelValue",s.folder),a("selectAndClose",s.folder)};let S=0;const x=()=>{const k=Date.now();k-S<kF?b():E(),S=k};return(k,O)=>{const K=ze("ModalTreeFolderItem",!0);return y(),T("div",CF,[g("div",SF,[C.value?(y(),T("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:w},[l.value?(y(),ne(m(Js),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(y(),ne(m(Xs),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(y(),T("div",xF)),g("div",{class:Ae(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":c.value,"vuefinder__modal-tree__folder-link--current":u.value}]),onClick:E,onDblclick:b,onTouchend:x},[l.value?(y(),ne(m(mu),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(y(),ne(m(Nn),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),g("span",TF,L(t.folder.basename),1)],34)]),l.value&&C.value?(y(),T("div",OF,[(y(!0),T(Ie,null,He(h.value,D=>(y(),ne(K,{key:D.path,folder:D,storage:t.storage,"model-value":t.modelValue,"expanded-folders":t.expandedFolders,"modal-tree-data":t.modalTreeData,"current-path":t.currentPath,"onUpdate:modelValue":O[0]||(O[0]=P=>k.$emit("update:modelValue",P)),onSelectAndClose:O[1]||(O[1]=P=>k.$emit("selectAndClose",P)),onToggleFolder:O[2]||(O[2]=(P,U)=>k.$emit("toggleFolder",P,U))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),p.value?(y(),T("div",$F,[g("div",{class:"vuefinder__modal-tree__load-more",onClick:_},L(m(i)("load more")),1)])):ue("",!0)])):ue("",!0)])}}}),PF={class:"vuefinder__modal-tree"},RF={class:"vuefinder__modal-tree__header"},IF={class:"vuefinder__modal-tree__title"},MF={key:0,class:"vuefinder__modal-tree__section"},DF={class:"vuefinder__modal-tree__section-title"},FF={class:"vuefinder__modal-tree__list"},LF=["onClick","onDblclick","onTouchend"],jF={class:"vuefinder__modal-tree__text"},NF={class:"vuefinder__modal-tree__text-storage"},UF={class:"vuefinder__modal-tree__section-title"},zF={class:"vuefinder__modal-tree__list"},VF={class:"vuefinder__modal-tree__storage-item"},BF={class:"vuefinder__modal-tree__storage-content"},HF=["onClick"],qF=["onClick","onDblclick","onTouchend"],WF={class:"vuefinder__modal-tree__storage-text"},KF={key:0,class:"vuefinder__modal-tree__subfolders"},YF={key:0,class:"vuefinder__modal-tree__more-note"},GF=["onClick"],Rp=300,vu=Ce({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(t,{emit:e}){const n=je(),{t:i}=n.i18n,o=n.fs,r=n.config,s=e,a=ke(o.sortedFiles),l=ke(o.storages),c=te(()=>l.value||[]),u=ke(o.path),d=H(null),h=H({}),v=H({}),f=H({});Oe(a,M=>{const q=M.filter(de=>de.type==="dir"),le=u.value?.path||"";le&&(v.value[le]=q.map(de=>({...de,type:"dir"})))});const p=(M,q)=>{const le=`${M}:${q}`;h.value={...h.value,[le]:!h.value[le]},h.value[le]&&!v.value[q]&&n.adapter.list(q).then(de=>{const Y=(de.files||[]).filter(I=>I.type==="dir");v.value[q]=Y.map(I=>({...I,type:"dir"}))})},_=M=>v.value[M]||[],C=M=>f.value[M]||50,w=M=>{const q=_(M),le=C(M);return q.length>le?q.slice(0,le):q},E=M=>_(M).length,b=M=>E(M)>C(M),S=M=>{f.value[M]=C(M)+50},x=M=>{M&&s("update:modelValue",M)},k=M=>{M&&(s("update:modelValue",M),s("selectAndClose",M))},O=M=>{const q={storage:M,path:M+"://",basename:M,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:M+"://"};s("update:modelValue",q)},K=M=>{const q={storage:M,path:M+"://",basename:M,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:M+"://"};s("update:modelValue",q),s("selectAndClose",q)};let D=0;const P=M=>{if(!M)return;const q=Date.now();q-D<Rp?k(M):x(M),D=q},U=M=>{const q=Date.now();q-D<Rp?K(M):O(M),D=q};return et(()=>{d.value&&hn(d.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(M,q)=>(y(),T("div",PF,[g("div",RF,[g("div",IF,L(m(i)("Select Target Folder")),1)]),g("div",{ref_key:"modalContentElement",ref:d,class:"vuefinder__modal-tree__content"},[t.showPinnedFolders&&m(n).features.pinned&&m(r).get("pinnedFolders").length?(y(),T("div",MF,[g("div",DF,L(m(i)("Pinned Folders")),1),g("div",FF,[(y(!0),T(Ie,null,He(m(r).get("pinnedFolders"),le=>(y(),T("div",{key:le.path,class:Ae(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":t.modelValue?.path===le.path}]),onClick:de=>x(le),onDblclick:de=>k(le),onTouchend:de=>P(le)},[j(m(Nn),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),g("div",jF,L(le.basename),1),g("div",NF,L(le.storage),1),j(m(pu),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,LF))),128))])])):ue("",!0),g("div",UF,L(m(i)("Storages")),1),(y(!0),T(Ie,null,He(c.value,le=>(y(),T("div",{key:le,class:"vuefinder__modal-tree__section"},[g("div",zF,[g("div",VF,[g("div",BF,[g("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:Ye(de=>p(le,le+"://"),["stop"])},[h.value[`${le}:${le}://`]?(y(),ne(m(Js),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(y(),ne(m(Xs),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,HF),g("div",{class:Ae(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":t.modelValue?.path===le+"://"}]),onClick:de=>O(le),onDblclick:de=>K(le),onTouchend:de=>U(le)},[j(m(fu),{class:"vuefinder__modal-tree__storage-icon"}),g("span",WF,L(le),1)],42,qF)]),h.value[`${le}:${le}://`]?(y(),T("div",KF,[(y(!0),T(Ie,null,He(w(le+"://"),de=>(y(),ne(AF,{key:de.path,folder:de,storage:le,"model-value":t.modelValue,"expanded-folders":h.value,"modal-tree-data":v.value,"current-path":t.currentPath,"onUpdate:modelValue":x,onSelectAndClose:k,onToggleFolder:p},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),b(le+"://")?(y(),T("div",YF,[g("div",{class:"vuefinder__modal-tree__load-more",onClick:de=>S(le+"://")},L(m(i)("load more")),9,GF)])):ue("",!0)])):ue("",!0)])])]))),128))],512)]))}}),QF=["title"],Ql=Ce({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(t,{emit:e}){const n=e,i=je(),{t:o}=i.i18n,r=H(!1),s=H(null),a=H(s.value?.innerHTML);Oe(a,()=>r.value=!1);const l=()=>{n("hidden"),r.value=!0};return(c,u)=>(y(),T("div",null,[r.value?ue("",!0):(y(),T("div",{key:0,ref_key:"strMessage",ref:s,class:Ae(["vuefinder__message",t.error?"vuefinder__message--error":"vuefinder__message--success"])},[Ve(c.$slots,"default"),g("div",{class:"vuefinder__message__close",title:m(o)("Close"),onClick:l},[...u[0]||(u[0]=[g("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"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,QF)],2))]))}}),XF={class:"vuefinder__move-modal__content"},JF={class:"vuefinder__move-modal__description"},ZF={class:"vuefinder__move-modal__files vf-scrollbar"},e5={class:"vuefinder__move-modal__file-name"},t5={class:"vuefinder__move-modal__target-title"},n5={class:"vuefinder__move-modal__target-container"},i5={class:"vuefinder__move-modal__target-path"},o5={class:"vuefinder__move-modal__target-storage"},r5={key:0,class:"vuefinder__move-modal__destination-folder"},s5={class:"vuefinder__move-modal__target-badge"},a5={key:0,class:"vuefinder__move-modal__options"},l5={class:"vuefinder__move-modal__checkbox-label"},c5={class:"vuefinder__move-modal__checkbox-text"},u5=["disabled"],d5={class:"vuefinder__move-modal__selected-items"},Kg=Ce({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(t){const e=je(),n=Gt(e),{enabled:i}=Tn(),{t:o}=e.i18n,r=t,s=H(e.modal.data.items.from),a=H(e.modal.data.items.to),l=H(""),c=H(r.copy||!i("move")),u=te(()=>c.value?"copy":"move"),d=H(!1),h=ke(e.fs.path),v=te(()=>c.value?o("Copy files"):o("Move files")),f=te(()=>c.value?o("Are you sure you want to copy these files?"):o("Are you sure you want to move these files?")),p=te(()=>c.value?o("Yes, Copy!"):o("Yes, Move!")),_=x=>{x&&(a.value=x)},C=x=>{x&&(a.value=x,d.value=!1)},w=te(()=>{const x=a.value;return x?s.value.some(k=>!!(x.path===k.path||k.path.startsWith(x.path+"/")||k.type==="dir"&&x.path.startsWith(k.path+"/"))):!0}),E=te(()=>{if(!w.value)return"";const x=a.value;return x?s.value.find(k=>x.path===k.path||k.path.startsWith(x.path+"/")||k.type==="dir"&&x.path.startsWith(k.path+"/"))?o("Cannot move/copy item to itself or its parent/child directory"):o("Invalid destination directory"):o("Please select a destination directory")}),b=()=>{const x=a.value.path;if(!x)return{storage:"local",path:""};if(x.endsWith("://"))return{storage:x.replace("://",""),path:""};const k=x.split("://");return{storage:k[0]||"local",path:k[1]||""}},S=async()=>{if(s.value.length)try{const{files:x}=await e.adapter[u.value]({path:h.value.path,sources:s.value.map(({path:k})=>k),destination:a.value.path});e.fs.setFiles(x),e.modal.close()}catch(x){n.error(Yt(x,o("Failed to transfer files")))}};return(x,k)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:w.value,onClick:S},L(p.value),9,u5),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:k[4]||(k[4]=O=>m(e).modal.close())},L(m(o)("Cancel")),1),g("div",d5,L(m(o)("%s item(s) selected.",s.value.length)),1)]),default:we(()=>[g("div",null,[j(pn,{icon:c.value?m(hu):m(lF),title:v.value},null,8,["icon","title"]),g("div",XF,[g("p",JF,L(f.value),1),g("div",ZF,[(y(!0),T(Ie,null,He(s.value,O=>(y(),T("div",{key:O.path,class:"vuefinder__move-modal__file"},[g("div",null,[O.type==="dir"?(y(),ne(m(Nn),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(y(),ne(m(qo),{key:1,class:"vuefinder__move-modal__icon"}))]),g("div",e5,L(O.path),1)]))),128))]),g("h4",t5,L(m(o)("Target Directory")),1),g("div",n5,[g("div",{class:"vuefinder__move-modal__target-display",onClick:k[0]||(k[0]=O=>d.value=!d.value)},[g("div",i5,[g("span",o5,L(b().storage)+"://",1),b().path?(y(),T("span",r5,L(b().path),1)):ue("",!0)]),g("span",s5,L(m(o)("Browse")),1)])]),g("div",{class:Ae(["vuefinder__move-modal__tree-selector",d.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[j(vu,{modelValue:a.value,"onUpdate:modelValue":[k[1]||(k[1]=O=>a.value=O),_],"show-pinned-folders":!0,onSelectAndClose:C},null,8,["modelValue"])],2),m(i)("copy")&&m(i)("move")?(y(),T("div",a5,[g("label",l5,[it(g("input",{"onUpdate:modelValue":k[2]||(k[2]=O=>c.value=O),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[Es,c.value]]),g("span",c5,L(m(o)("Create a copy instead of moving")),1)])])):ue("",!0),E.value?(y(),ne(Ql,{key:1,error:""},{default:we(()=>[Ke(L(E.value),1)]),_:1})):ue("",!0),l.value.length&&!E.value?(y(),ne(Ql,{key:2,error:"",onHidden:k[3]||(k[3]=O=>l.value="")},{default:we(()=>[Ke(L(l.value),1)]),_:1})):ue("",!0)])])]),_:1}))}}),uo=Ce({__name:"ModalMove",setup(t){return(e,n)=>(y(),ne(Kg,{copy:!1}))}}),gu=Ce({__name:"ModalCopy",setup(t){return(e,n)=>(y(),ne(Kg,{copy:!0}))}}),h5=(t,e=0,n=!1)=>{let i;return(...o)=>{n&&!i&&t(...o),clearTimeout(i),i=setTimeout(()=>{t(...o)},e)}},Yg=(t,e,n)=>{const i=H(t);return x_((o,r)=>({get(){return o(),i.value},set:h5(s=>{i.value=s,r()},e,!1)}))},p5={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function f5(t,e){return y(),T("svg",p5,[...e[0]||(e[0]=[g("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 _u={render:f5},m5={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 v5(t,e){return y(),T("svg",m5,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),g("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 Zs={render:v5},g5={class:"vuefinder__search-modal__search-input"},_5=["value","placeholder","disabled"],y5={key:0,class:"vuefinder__search-modal__loading"},b5=Ce({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(t,{expose:e,emit:n}){const i=n,o=je(),{t:r}=o.i18n,s=H(null),a=c=>{const u=c.target;i("update:modelValue",u.value)},l=c=>{i("keydown",c)};return e({focus:()=>{s.value&&s.value.focus()}}),(c,u)=>(y(),T("div",g5,[j(m(_u),{class:"vuefinder__search-modal__search-icon"}),g("input",{ref_key:"searchInput",ref:s,value:t.modelValue,type:"text",placeholder:m(r)("Search files"),disabled:t.disabled,class:"vuefinder__search-modal__input",onKeydown:l,onKeyup:u[0]||(u[0]=Ye(()=>{},["stop"])),onInput:a},null,40,_5),t.isSearching?(y(),T("div",y5,[j(m(Zs),{class:"vuefinder__search-modal__loading-icon"})])):ue("",!0)]))}}),w5={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function E5(t,e){return y(),T("svg",w5,[...e[0]||(e[0]=[g("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),g("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 Gg={render:E5},C5=["disabled","title"],S5=["data-theme"],x5={class:"vuefinder__search-modal__dropdown-content"},T5={class:"vuefinder__search-modal__dropdown-section"},O5={class:"vuefinder__search-modal__dropdown-title"},$5={class:"vuefinder__search-modal__dropdown-options"},k5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},A5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},P5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},R5={key:0,class:"vuefinder__search-modal__dropdown-option-check"},I5=Ce({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","keydown"],setup(t,{expose:e,emit:n}){const i=t,o=n,r=je(),{t:s}=r.i18n,a=H(null),l=H(null);let c=null;const u=p=>{if(o("update:selectedOption",p),p.startsWith("size-")){const _=p.split("-")[1];o("update:sizeFilter",_)}},d=async()=>{i.disabled||(i.visible?(o("update:visible",!1),c&&(c(),c=null)):(o("update:visible",!0),await Ge(),await h()))},h=async()=>{if(!(!a.value||!l.value)&&(await Ge(),!(!a.value||!l.value))){Object.assign(l.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:p,y:_}=await Zi(a.value,l.value,{placement:"bottom-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(l.value.style,{left:`${p}px`,top:`${_}px`}),requestAnimationFrame(()=>{l.value&&Object.assign(l.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(p){console.warn("Floating UI initial positioning error:",p);return}try{c=oc(a.value,l.value,async()=>{if(!(!a.value||!l.value))try{const{x:p,y:_}=await Zi(a.value,l.value,{placement:"bottom-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(l.value.style,{left:`${p}px`,top:`${_}px`})}catch(p){console.warn("Floating UI positioning error:",p)}})}catch(p){console.warn("Floating UI autoUpdate setup error:",p),c=null}}},v=p=>{if(!i.visible)return;const _=["size-all","size-small","size-medium","size-large"],C=_.findIndex(w=>w===i.selectedOption);if(p.key==="ArrowDown"){p.preventDefault();const w=(C+1)%_.length;o("update:selectedOption",_[w]||null)}else if(p.key==="ArrowUp"){p.preventDefault();const w=C<=0?_.length-1:C-1;o("update:selectedOption",_[w]||null)}else p.key==="Enter"?(p.preventDefault(),i.selectedOption?.startsWith("size-")&&o("update:sizeFilter",i.selectedOption.split("-")[1])):p.key==="Escape"&&(p.preventDefault(),o("update:visible",!1),c&&(c(),c=null))},f=()=>{c&&(c(),c=null)};return Oe(()=>i.visible,p=>{!p&&c&&(c(),c=null)}),Ct(()=>{f()}),e({cleanup:f}),(p,_)=>(y(),T(Ie,null,[g("button",{ref_key:"dropdownBtn",ref:a,class:Ae(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":t.visible}]),disabled:t.disabled,title:m(s)("Search Options"),onClick:Ye(d,["stop"])},[j(m(Gg),{class:"vuefinder__search-modal__dropdown-icon"})],10,C5),(y(),ne(ws,{to:"body"},[t.visible?(y(),T("div",{key:0,ref_key:"dropdownContent",ref:l,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":m(r).theme.current,tabindex:"-1",onClick:_[4]||(_[4]=Ye(()=>{},["stop"])),onKeydown:v},[g("div",x5,[g("div",T5,[g("div",O5,L(m(s)("File Size")),1),g("div",$5,[g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="all"}]),onClick:_[0]||(_[0]=Ye(C=>u("size-all"),["stop"]))},[g("span",null,L(m(s)("All Files")),1),t.sizeFilter==="all"?(y(),T("div",k5,[..._[5]||(_[5]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2),g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="small"}]),onClick:_[1]||(_[1]=Ye(C=>u("size-small"),["stop"]))},[g("span",null,L(m(s)("Small (< 1MB)")),1),t.sizeFilter==="small"?(y(),T("div",A5,[..._[6]||(_[6]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2),g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="medium"}]),onClick:_[2]||(_[2]=Ye(C=>u("size-medium"),["stop"]))},[g("span",null,L(m(s)("Medium (1-10MB)")),1),t.sizeFilter==="medium"?(y(),T("div",P5,[..._[7]||(_[7]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2),g("div",{class:Ae(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="large"}]),onClick:_[3]||(_[3]=Ye(C=>u("size-large"),["stop"]))},[g("span",null,L(m(s)("Large (> 10MB)")),1),t.sizeFilter==="large"?(y(),T("div",R5,[..._[8]||(_[8]=[g("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[g("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)])])):ue("",!0)],2)])])])],40,S5)):ue("",!0)]))],64))}});function Qg(t,e=40){const n=t.match(/^([^:]+:\/\/)(.*)$/);if(!n)return t;const i=n[1],o=n[2]??"",r=o.split("/").filter(Boolean),s=r.pop();if(!s)return i+o;let a=`${i}${r.join("/")}${r.length?"/":""}${s}`;if(a.length<=e)return a;const l=s.split(/\.(?=[^\.]+$)/),c=l[0]??"",u=l[1]??"",d=c.length>10?`${c.slice(0,6)}...${c.slice(-5)}`:c,h=u?`${d}.${u}`:d;return a=`${i}${r.join("/")}${r.length?"/":""}${h}`,a.length>e&&(a=`${i}.../${h}`),a}async function Xg(t){try{await navigator.clipboard.writeText(t)}catch{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}async function Wo(t){await Xg(t)}async function M5(t){await Xg(t)}const D5={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function F5(t,e){return y(),T("svg",D5,[...e[0]||(e[0]=[g("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 Jg={render:F5},L5=["title"],j5={class:"vuefinder__search-modal__result-icon"},N5={class:"vuefinder__search-modal__result-content"},U5={class:"vuefinder__search-modal__result-name"},z5={key:0,class:"vuefinder__search-modal__result-size"},V5=["title"],B5=["title"],H5=["data-item-dropdown","data-theme"],q5={class:"vuefinder__search-modal__item-dropdown-content"},W5=Ce({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","preview"],setup(t,{emit:e}){const n=t,i=e,o=je(),{t:r}=o.i18n,s=H(null);let a=null,l=null,c=[],u=null;Oe(()=>n.activeDropdown,k=>{a&&(a(),a=null),l&&(c.forEach(O=>{O===window?window.removeEventListener("scroll",l,!0):O.removeEventListener("scroll",l,!0)}),l=null,c=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null),k===n.item.path&&s.value&&Ge(()=>{C(n.item.path,s.value),h(),v()})});const d=k=>{const O=[];let K=k;for(;K&&K!==document.body&&K!==document.documentElement;){const D=window.getComputedStyle(K),P=D.overflow+D.overflowX+D.overflowY;(P.includes("scroll")||P.includes("auto"))&&O.push(K),K=K.parentElement}return O},h=()=>{if(n.activeDropdown!==n.item.path)return;const k=d(s.value);c=[window,...k],l=()=>{n.activeDropdown===n.item.path&&i("toggleItemDropdown",n.item.path,new MouseEvent("click"))};const O=l;O&&c.forEach(K=>{K===window?window.addEventListener("scroll",O,!0):K.addEventListener("scroll",O,!0)})},v=()=>{n.activeDropdown===n.item.path&&(u=k=>{if(n.activeDropdown!==n.item.path)return;const O=k.target;if(!O)return;const K=document.querySelector(`[data-item-dropdown="${n.item.path}"]`);if(K&&K.contains(O)||s.value&&s.value.contains(O))return;const D=o.root;if(D&&D.contains(O)){i("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}const P=document.querySelector(".vuefinder__modal-layout");if(P&&P.contains(O)){i("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}i("toggleItemDropdown",n.item.path,new MouseEvent("click"))},setTimeout(()=>{u&&(document.addEventListener("mousedown",u,!0),document.addEventListener("touchstart",u,!0))},100))};Ct(()=>{a&&(a(),a=null),l&&(c.forEach(k=>{k===window?window.removeEventListener("scroll",l,!0):k.removeEventListener("scroll",l,!0)}),l=null,c=[]),u&&(document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),u=null)});const f=k=>n.expandedPaths.has(k),p=k=>k.type==="dir"||!k.file_size?"":uu(k.file_size),_=(k,O)=>{O.stopPropagation(),i("toggleItemDropdown",k,O)},C=async(k,O)=>{const K=document.querySelector(`[data-item-dropdown="${k}"]`);if(!(!K||!O)&&(await Ge(),!(!K||!O))){Object.assign(K.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:D,y:P}=await Zi(O,K,{placement:"left-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(K.style,{left:`${D}px`,top:`${P}px`}),requestAnimationFrame(()=>{K&&Object.assign(K.style,{opacity:"1",transform:"translateY(0)"})})}catch(D){console.warn("Floating UI initial positioning error:",D);return}try{a=oc(O,K,async()=>{if(!(!O||!K))try{const{x:D,y:P}=await Zi(O,K,{placement:"left-start",strategy:"fixed",middleware:[Po(8),Ro({padding:16}),Io({padding:16})]});Object.assign(K.style,{left:`${D}px`,top:`${P}px`})}catch(D){console.warn("Floating UI positioning error:",D)}})}catch(D){console.warn("Floating UI autoUpdate setup error:",D),a=null}}},w=k=>{i("update:selectedItemDropdownOption",k)},E=async k=>{await Wo(k.path),i("copyPath",k)},b=k=>{i("openContainingFolder",k)},S=k=>{i("preview",k)},x=k=>{if(!n.activeDropdown)return;const O=["copy-path","open-folder","preview"],K=n.selectedItemDropdownOption,D=O.findIndex(P=>K?.includes(P));if(k.key==="ArrowDown"){k.preventDefault();const P=(D+1)%O.length;i("update:selectedItemDropdownOption",`${O[P]||""}-${n.activeDropdown}`)}else if(k.key==="ArrowUp"){k.preventDefault();const P=D<=0?O.length-1:D-1;i("update:selectedItemDropdownOption",`${O[P]||""}-${n.activeDropdown}`)}else k.key==="Enter"?(k.preventDefault(),K&&(K.includes("copy-path")?E(n.item):K.includes("open-folder")?b(n.item):K.includes("preview")&&S(n.item))):k.key==="Escape"&&(k.preventDefault(),i("update:selectedItemDropdownOption",null))};return(k,O)=>(y(),T("div",{class:Ae(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":t.index===t.selectedIndex}]),title:t.item.basename,onClick:O[9]||(O[9]=K=>i("select",t.index))},[g("div",j5,[t.item.type==="dir"?(y(),ne(m(Nn),{key:0})):(y(),ne(m(qo),{key:1}))]),g("div",N5,[g("div",U5,[Ke(L(t.item.basename)+" ",1),p(t.item)?(y(),T("span",z5,L(p(t.item)),1)):ue("",!0)]),g("div",{class:"vuefinder__search-modal__result-path",title:t.item.path,onClick:O[0]||(O[0]=Ye(K=>{i("select",t.index),i("togglePathExpansion",t.item.path)},["stop"]))},L(f(t.item.path)?t.item.path:m(Qg)(t.item.path)),9,V5)]),g("button",{ref_key:"buttonElementRef",ref:s,class:"vuefinder__search-modal__result-actions",title:m(r)("More actions"),onClick:O[1]||(O[1]=K=>{i("selectWithDropdown",t.index),_(t.item.path,K)})},[j(m(Jg),{class:"vuefinder__search-modal__result-actions-icon"})],8,B5),(y(),ne(ws,{to:"body"},[t.activeDropdown===t.item.path?(y(),T("div",{key:0,"data-item-dropdown":t.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":m(o).theme.current,tabindex:"-1",onClick:O[8]||(O[8]=Ye(()=>{},["stop"])),onKeydown:x},[g("div",q5,[g("div",{class:Ae(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`copy-path-${t.item.path}`}]),onClick:O[2]||(O[2]=K=>{w(`copy-path-${t.item.path}`),E(t.item)}),onFocus:O[3]||(O[3]=K=>w(`copy-path-${t.item.path}`))},[j(m(hu),{class:"vuefinder__search-modal__item-dropdown-icon"}),g("span",null,L(m(r)("Copy Path")),1)],34),g("div",{class:Ae(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`open-folder-${t.item.path}`}]),onClick:O[4]||(O[4]=K=>{w(`open-folder-${t.item.path}`),b(t.item)}),onFocus:O[5]||(O[5]=K=>w(`open-folder-${t.item.path}`))},[j(m(Nn),{class:"vuefinder__search-modal__item-dropdown-icon"}),g("span",null,L(m(r)("Open Containing Folder")),1)],34),g("div",{class:Ae(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`preview-${t.item.path}`}]),onClick:O[6]||(O[6]=K=>{w(`preview-${t.item.path}`),S(t.item)}),onFocus:O[7]||(O[7]=K=>w(`preview-${t.item.path}`))},[j(m(qo),{class:"vuefinder__search-modal__item-dropdown-icon"}),g("span",null,L(m(r)("Preview")),1)],34)])],40,H5)):ue("",!0)]))],10,L5))}}),K5={key:0,class:"vuefinder__search-modal__searching"},Y5={class:"vuefinder__search-modal__loading-icon"},G5={key:1,class:"vuefinder__search-modal__no-results"},Q5={key:2,class:"vuefinder__search-modal__results-list"},X5={class:"vuefinder__search-modal__results-header"},xi=60,Ip=5,J5=Ce({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","preview"],setup(t,{expose:e,emit:n}){const i=t,o=n,r=je(),{t:s}=r.i18n,a=In("scrollableContainer"),l=te(()=>i.searchResults.length>0),c=te(()=>i.searchResults.length),u=H(0),d=H(600),h=te(()=>i.searchResults.length*xi),v=te(()=>{const E=Math.max(0,Math.floor(u.value/xi)-Ip),b=Math.min(i.searchResults.length,Math.ceil((u.value+d.value)/xi)+Ip);return{start:E,end:b}}),f=te(()=>{const{start:E,end:b}=v.value;return i.searchResults.slice(E,b).map((S,x)=>({item:S,index:E+x,top:(E+x)*xi}))}),p=E=>{const b=E.target;u.value=b.scrollTop},_=()=>{a.value&&(d.value=a.value.clientHeight)},C=()=>{if(i.selectedIndex>=0&&a.value){const E=i.selectedIndex*xi,b=E+xi,S=a.value.scrollTop,x=a.value.clientHeight,k=S+x;let O=S;E<S?O=E:b>k&&(O=b-x),O!==S&&a.value.scrollTo({top:O,behavior:"smooth"})}},w=()=>{a.value&&(a.value.scrollTop=0,u.value=0)};return et(()=>{_(),window.addEventListener("resize",_)}),Ct(()=>{window.removeEventListener("resize",_)}),Oe(()=>a.value,()=>{_()}),e({scrollSelectedIntoView:C,resetScroll:w,getContainerHeight:()=>d.value,scrollTop:()=>u.value}),(E,b)=>(y(),T("div",{class:Ae(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":t.resultsEnter}])},[t.isSearching?(y(),T("div",K5,[g("div",Y5,[j(m(Zs),{class:"vuefinder__search-modal__loading-icon"})]),g("span",null,L(m(s)("Searching...")),1)])):l.value?(y(),T("div",Q5,[g("div",X5,[g("span",null,L(m(s)("Found %s results",c.value)),1)]),g("div",{ref_key:"scrollableContainer",ref:a,class:"vuefinder__search-modal__results-scrollable",onScroll:p},[g("div",{class:"vuefinder__search-modal__results-items",style:At({height:`${h.value}px`,position:"relative"})},[(y(!0),T(Ie,null,He(f.value,S=>(y(),T("div",{key:S.item.path,style:At({position:"absolute",top:`${S.top}px`,left:"0",width:"100%",height:`${xi}px`})},[j(W5,{item:S.item,index:S.index,"selected-index":t.selectedIndex,"expanded-paths":t.expandedPaths,"active-dropdown":t.activeDropdown,"selected-item-dropdown-option":t.selectedItemDropdownOption,onSelect:b[0]||(b[0]=x=>o("selectResultItem",x)),onSelectWithDropdown:b[1]||(b[1]=x=>o("selectResultItemWithDropdown",x)),onTogglePathExpansion:b[2]||(b[2]=x=>o("togglePathExpansion",x)),onToggleItemDropdown:b[3]||(b[3]=(x,k)=>o("toggleItemDropdown",x,k)),"onUpdate:selectedItemDropdownOption":b[4]||(b[4]=x=>o("update:selectedItemDropdownOption",x)),onCopyPath:b[5]||(b[5]=x=>o("copyPath",x)),onOpenContainingFolder:b[6]||(b[6]=x=>o("openContainingFolder",x)),onPreview:b[7]||(b[7]=x=>o("preview",x))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(y(),T("div",G5,[g("span",null,L(m(s)("No results found")),1)]))],2))}}),Z5={class:"vuefinder__search-modal"},eL={class:"vuefinder__search-modal__content"},tL={class:"vuefinder__search-modal__search-bar"},nL={class:"vuefinder__search-modal__search-location"},iL=["title"],oL=["disabled"],rL={key:0,class:"vuefinder__search-modal__folder-selector"},sL={class:"vuefinder__search-modal__folder-selector-content"},aL={key:1,class:"vuefinder__search-modal__instructions"},lL={class:"vuefinder__search-modal__instructions-text"},yu=Ce({name:"ModalSearch",__name:"ModalSearch",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=H(null),s=H(null),a=H(null),l=Yg("",300),c=H([]),u=H(!1),d=H(-1),h=H(!1),v=H(!1),f=H(null),p=H("all"),_=H(!1),C=H(`size-${p.value}`),w=H(null),E=H(new Set),b=H(null),S=ke(o.path),x=A=>{E.value.has(A)?E.value.delete(A):E.value.add(A)},k=(A,Q)=>{Q&&typeof Q.stopPropagation=="function"&&Q.stopPropagation(),b.value===A?b.value=null:b.value=A},O=()=>{b.value=null},K=A=>{try{const Q=A.dir||`${A.storage}://`;e.adapter.open(Q),e.modal.close(),O()}catch{n.error(i("Failed to open containing folder"))}},D=A=>{e.modal.open(lr,{storage:S?.value?.storage??"local",item:A}),O()},P=A=>{d.value=A,O()},U=A=>{d.value=A},M=async A=>{await Wo(A.path),O()};Oe(l,async A=>{A.trim()?(await q(A.trim()),d.value=0):(c.value=[],u.value=!1,d.value=-1)}),Oe(p,async A=>{C.value=`size-${A}`,l.value.trim()&&!v.value&&(await q(l.value.trim()),d.value=0)}),Oe(_,async()=>{l.value.trim()&&!v.value&&(await q(l.value.trim()),d.value=0)});const q=async A=>{if(A){u.value=!0;try{const Q=f.value?.path||S?.value?.path,z=await e.adapter.search({path:Q,filter:A,deep:_.value,size:p.value});c.value=z||[],u.value=!1}catch(Q){n.error(Yt(Q,i("Search failed"))),c.value=[],u.value=!1}}};et(()=>{document.addEventListener("click",I),C.value=`size-${p.value}`});const le=()=>{v.value?(v.value=!1,l.value.trim()&&(q(l.value.trim()),d.value=0)):(h.value=!1,v.value=!0)},de=A=>{A&&(f.value=A)},Y=A=>{A&&(de(A),v.value=!1,l.value.trim()&&(q(l.value.trim()),d.value=0))};Ct(()=>{document.removeEventListener("click",I),s.value&&s.value.cleanup()});const I=A=>{const Q=A.target;if(h.value&&(Q.closest(".vuefinder__search-modal__dropdown")||(h.value=!1,Ge(()=>{r.value&&r.value.focus()}))),b.value){const z=Q.closest(".vuefinder__search-modal__item-dropdown"),ie=Q.closest(".vuefinder__search-modal__result-item");!z&&!ie&&O()}};return(A,Q)=>(y(),ne(tn,{class:"vuefinder__search-modal-layout"},{default:we(()=>[g("div",Z5,[j(pn,{icon:m(_u),title:m(i)("Search files")},null,8,["icon","title"]),g("div",eL,[g("div",tL,[j(b5,{ref_key:"searchInputRef",ref:r,modelValue:m(l),"onUpdate:modelValue":Q[0]||(Q[0]=z=>ys(l)?l.value=z:null),"is-searching":u.value,disabled:v.value},null,8,["modelValue","is-searching","disabled"]),j(I5,{ref_key:"searchOptionsDropdownRef",ref:s,visible:h.value,"onUpdate:visible":Q[1]||(Q[1]=z=>h.value=z),"size-filter":p.value,"onUpdate:sizeFilter":Q[2]||(Q[2]=z=>p.value=z),"selected-option":C.value,"onUpdate:selectedOption":Q[3]||(Q[3]=z=>C.value=z),disabled:v.value},null,8,["visible","size-filter","selected-option","disabled"])]),g("div",{class:"vuefinder__search-modal__options",onClick:Q[7]||(Q[7]=Ye(()=>{},["stop"]))},[g("div",nL,[g("button",{class:Ae(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":v.value}]),onClick:Ye(le,["stop"])},[j(m(Nn),{class:"vuefinder__search-modal__location-icon"}),g("span",{class:"vuefinder__search-modal__location-text",title:f.value?.path||m(S).path},L(m(Qg)(f.value?.path||m(S).path)),9,iL),Q[10]||(Q[10]=g("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[g("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)]),g("label",{class:"vuefinder__search-modal__deep-search",onClick:Q[6]||(Q[6]=Ye(()=>{},["stop"]))},[it(g("input",{"onUpdate:modelValue":Q[4]||(Q[4]=z=>_.value=z),type:"checkbox",disabled:v.value,class:"vuefinder__search-modal__checkbox",onClick:Q[5]||(Q[5]=Ye(()=>{},["stop"]))},null,8,oL),[[Es,_.value]]),g("span",null,L(m(i)("Include subfolders")),1)])]),v.value?(y(),T("div",rL,[g("div",sL,[j(vu,{modelValue:f.value,"onUpdate:modelValue":[Q[8]||(Q[8]=z=>f.value=z),de],"show-pinned-folders":!0,"current-path":m(S),onSelectAndClose:Y},null,8,["modelValue","current-path"])])])):ue("",!0),!m(l).trim()&&!v.value?(y(),T("div",aL,[g("p",lL,L(m(i)("Start typing to search files. Use options to filter or include subfolders.")),1)])):ue("",!0),m(l).trim()&&!v.value?(y(),ne(J5,{key:2,ref_key:"searchResultsListRef",ref:a,"search-results":c.value,"is-searching":u.value,"selected-index":d.value,"expanded-paths":E.value,"active-dropdown":b.value,"selected-item-dropdown-option":w.value,"results-enter":!0,onSelectResultItem:P,onSelectResultItemWithDropdown:U,onTogglePathExpansion:x,onToggleItemDropdown:k,"onUpdate:selectedItemDropdownOption":Q[9]||(Q[9]=z=>w.value=z),onCopyPath:M,onOpenContainingFolder:K,onPreview:D},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):ue("",!0)])])]),_:1}))}}),cL={props:{on:{type:String,required:!0}},setup(t,{emit:e,slots:n}){const i=je(),o=H(!1),{t:r}=i.i18n;let s=null;const a=()=>{s&&clearTimeout(s),o.value=!0,s=setTimeout(()=>{o.value=!1},2e3)};return et(()=>{i.emitter.on(t.on,a)}),Ct(()=>{s&&clearTimeout(s)}),{shown:o,t:r}}},uL=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},dL={key:1};function hL(t,e,n,i,o,r){return y(),T("div",{class:Ae(["vuefinder__action-message",{"vuefinder__action-message--hidden":!i.shown}])},[t.$slots.default?Ve(t.$slots,"default",{key:0}):(y(),T("span",dL,L(i.t("Saved.")),1))],2)}const Mp=uL(cL,[["render",hL]]),pL=[{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"}],fL={class:"vuefinder__settings-modal__content"},mL={class:"vuefinder__settings-modal__main"},vL={class:"vuefinder__settings-modal__sections"},gL={key:0,class:"vuefinder__settings-modal__section"},_L={for:"theme",class:"vuefinder__settings-modal__label"},yL={class:"vuefinder__settings-modal__input-group"},bL=["value"],wL=["value"],EL={key:1,class:"vuefinder__settings-modal__section"},CL={for:"language",class:"vuefinder__settings-modal__label"},SL={class:"vuefinder__settings-modal__input-group"},xL=["value"],TL={class:"vuefinder__settings-modal__reset-section"},OL={class:"vuefinder__settings-modal__reset-content"},$L={class:"vuefinder__settings-modal__reset-title"},kL={class:"vuefinder__settings-modal__reset-description"},Zg=Ce({__name:"ModalSettings",setup(t){const e=je(),{enabled:n}=Tn(),i=e.config,{clearStore:o}=e.storage,{t:r,localeAtom:s}=e.i18n,a=ke(s),l=te({get:()=>String(a.value||"en"),set:p=>s.set(p||"en")}),c=ke(i.state),u=te(()=>c.value.theme||"silver"),d=async()=>{i.reset(),o(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},h=p=>{i.set("theme",p),e.emitter.emit("vf-theme-saved")},{i18n:v}=ko("VueFinderOptions"),f=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(([p])=>Object.keys(v).includes(p)));return(p,_)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:_[2]||(_[2]=C=>m(e).modal.close())},L(m(r)("Close")),1)]),default:we(()=>[g("div",fL,[j(pn,{icon:m(Gg),title:m(r)("Settings")},null,8,["icon","title"]),g("div",mL,[g("div",vL,[m(n)("theme")?(y(),T("div",gL,[g("label",_L,[Ke(L(m(r)("Theme"))+" ",1),j(Mp,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:we(()=>[Ke(L(m(r)("Saved.")),1)]),_:1})]),g("div",yL,[g("select",{id:"theme",value:u.value,class:"vuefinder__settings-modal__select",onChange:_[0]||(_[0]=C=>h(C.target?.value))},[(y(!0),T(Ie,null,He(m(pL),C=>(y(),T("option",{key:C.name,value:C.name},L(C.displayName),9,wL))),128))],40,bL)])])):ue("",!0),Object.keys(m(f)).length>1?(y(),T("div",EL,[g("label",CL,[Ke(L(m(r)("Language"))+" ",1),j(Mp,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:we(()=>[Ke(L(m(r)("Saved.")),1)]),_:1})]),g("div",SL,[it(g("select",{id:"language","onUpdate:modelValue":_[1]||(_[1]=C=>l.value=C),class:"vuefinder__settings-modal__select"},[(y(!0),T(Ie,null,He(m(f),(C,w)=>(y(),T("option",{key:w,value:w},L(C),9,xL))),128))],512),[[Za,l.value]])])])):ue("",!0)]),g("div",TL,[g("div",OL,[g("div",$L,L(m(r)("Reset")),1),g("div",kL,L(m(r)("Reset all settings to default")),1)]),g("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:d},L(m(r)("Reset Settings")),1)])])])]),_:1}))}}),Lt={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 AL(){const t=je(),e=Gt(t),n=t.fs,i=t.config,{enabled:o}=Tn(),r=ke(n.path),s=ke(n.selectedItems),a=l=>{if(l.code===Lt.ESCAPE&&(t.modal.close(),t.root.focus()),!t.modal.visible){if(l.metaKey&&l.code===Lt.KEY_R&&!l.shiftKey&&(t.adapter.invalidateListQuery(r.value.path),t.adapter.open(r.value.path),l.preventDefault()),l.metaKey&&l.shiftKey&&l.code===Lt.KEY_R&&o("rename")&&s.value.length===1&&(t.modal.open(Qs,{items:s.value}),l.preventDefault()),l.code===Lt.DELETE&&s.value.length!==0&&t.modal.open(Gs,{items:s.value}),l.metaKey&&l.code===Lt.BACKSLASH&&t.modal.open(Bg),l.metaKey&&l.code===Lt.KEY_F&&o("search")&&(t.modal.open(yu),l.preventDefault()),l.metaKey&&l.code===Lt.KEY_E&&(i.toggle("showTreeView"),l.preventDefault()),l.metaKey&&l.code===Lt.KEY_S&&(t.modal.open(Zg),l.preventDefault()),l.metaKey&&l.code===Lt.ENTER&&(i.toggle("fullScreen"),t.root.focus()),l.metaKey&&l.code===Lt.KEY_A&&(n.selectAll(t.selectionMode||"multiple",t),l.preventDefault()),l.code===Lt.SPACE&&s.value.length===1&&s.value[0]?.type!=="dir"&&t.modal.open(lr,{storage:n.path.get().storage,item:s.value[0]}),l.metaKey&&l.code===Lt.KEY_C&&o("copy")){if(s.value.length===0){e.error(t.i18n.t("No items selected"));return}n.setClipboard("copy",new Set(s.value.map(c=>c.path))),e.success(s.value.length===1?t.i18n.t("Item copied to clipboard"):t.i18n.t("%s items copied to clipboard",s.value.length)),l.preventDefault()}if(l.metaKey&&l.code===Lt.KEY_X&&o("copy")){if(s.value.length===0){e.error(t.i18n.t("No items selected"));return}n.setClipboard("cut",new Set(s.value.map(c=>c.path))),e.success(s.value.length===1?t.i18n.t("Item cut to clipboard"):t.i18n.t("%s items cut to clipboard",s.value.length)),l.preventDefault()}if(l.metaKey&&l.code===Lt.KEY_V&&o("copy")){if(n.getClipboard().items.size===0){e.error(t.i18n.t("No items in clipboard"));return}if(n.getClipboard().path===n.path.get().path){e.error(t.i18n.t("Cannot paste items to the same directory"));return}if(n.getClipboard().type==="cut"){t.modal.open(uo,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}}),n.clearClipboard();return}if(n.getClipboard().type==="copy"){t.modal.open(gu,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}});return}l.preventDefault()}}};et(async()=>{if(await Ge(),!t.root){console.warn("app.root is not available. Event listeners will not be attached.");return}t.root.addEventListener("keydown",a)}),bs(()=>{t.root&&t.root.removeEventListener("keydown",a)})}function PL(){const t=H(!1),e=H([]);return{isDraggingExternal:t,externalFiles:e,handleDragEnter:n=>{n.preventDefault(),n.stopPropagation();const i=n.dataTransfer?.items;i&&Array.from(i).some(o=>o.kind==="file")&&(t.value=!0,n.isExternalDrag=!0)},handleDragOver:n=>{t.value&&n.dataTransfer&&(n.dataTransfer.dropEffect="copy",n.preventDefault(),n.stopPropagation())},handleDragLeave:n=>{n.preventDefault();const i=n.currentTarget.getBoundingClientRect(),o=n.clientX,r=n.clientY;(o<i.left||o>i.right||r<i.top||r>i.bottom)&&(t.value=!1)},handleDrop:async n=>{n.preventDefault(),n.stopPropagation(),t.value=!1;const i=n.dataTransfer?.items;if(i){const o=Array.from(i).filter(r=>r.kind==="file");if(o.length>0){e.value=[];for(const r of o){const s=r.webkitGetAsEntry?.();if(s)await du((a,l)=>{e.value.push({name:l.name,size:l.size,type:l.type,lastModified:new Date(l.lastModified),file:l})},s);else{const a=r.getAsFile();a&&e.value.push({name:a.name,size:a.size,type:a.type,lastModified:new Date(a.lastModified),file:a})}}return e.value}}return[]},clearExternalFiles:()=>{e.value=[]}}}const RL={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 IL(t,e){return y(),T("svg",RL,[...e[0]||(e[0]=[g("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 e_={render:IL},ML={class:"vuefinder__new-folder-modal__content"},DL={class:"vuefinder__new-folder-modal__form"},FL={class:"vuefinder__new-folder-modal__description"},LL=["placeholder"],bu=Ce({__name:"ModalNewFolder",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(""),a=()=>{s.value!==""&&e.adapter.createFolder({path:r.value.path,name:s.value}).then(l=>{n.success(i("%s is created.",s.value)),e.fs.setFiles(l.files),e.modal.close()}).catch(l=>{n.error(Yt(l,i("Failed to create folder")))})};return(l,c)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:a},L(m(i)("Create")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=u=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(e_),title:m(i)("New Folder")},null,8,["icon","title"]),g("div",ML,[g("div",DL,[g("p",FL,L(m(i)("Create a new folder")),1),it(g("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),class:"vuefinder__new-folder-modal__input",placeholder:m(i)("Folder Name"),type:"text",autofocus:"",onKeyup:ho(a,["enter"])},null,40,LL),[[Go,s.value]])])])])]),_:1}))}}),jL={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 NL(t,e){return y(),T("svg",jL,[...e[0]||(e[0]=[g("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 t_={render:NL},UL={class:"vuefinder__new-file-modal__content"},zL={class:"vuefinder__new-file-modal__form"},VL={class:"vuefinder__new-file-modal__description"},BL=["placeholder"],n_=Ce({__name:"ModalNewFile",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(""),a=()=>{s.value!==""&&e.adapter.createFile({path:r.value.path,name:s.value}).then(l=>{n.success(i("%s is created.",s.value)),e.fs.setFiles(l.files),e.modal.close()}).catch(l=>{n.error(Yt(l,i("Failed to create file")))})};return(l,c)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:a},L(m(i)("Create")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=u=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(t_),title:m(i)("New File")},null,8,["icon","title"]),g("div",UL,[g("div",zL,[g("p",VL,L(m(i)("Create a new file")),1),it(g("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),class:"vuefinder__new-file-modal__input",placeholder:m(i)("File Name"),type:"text",onKeyup:ho(a,["enter"])},null,40,BL),[[Go,s.value]])])])])]),_:1}))}}),HL={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 qL(t,e){return y(),T("svg",HL,[...e[0]||(e[0]=[g("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 i_={render:qL};function Xl(t,e=14){const n=`((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e+1},})([\\w\\W]{8,}))`;return t.replace(new RegExp(n),"$2..$4")}const WL={class:"vuefinder__upload-modal__content relative"},KL={class:"vuefinder__upload-modal__target-section"},YL={class:"vuefinder__upload-modal__target-label"},GL={class:"vuefinder__upload-modal__target-container"},QL={class:"vuefinder__upload-modal__target-path"},XL={class:"vuefinder__upload-modal__target-storage"},JL={key:0,class:"vuefinder__upload-modal__target-folder"},ZL={class:"vuefinder__upload-modal__target-badge"},e4={class:"vuefinder__upload-modal__drag-hint"},t4={class:"vuefinder__upload-modal__file-list vf-scrollbar"},n4=["textContent"],i4={class:"vuefinder__upload-modal__file-info"},o4={class:"vuefinder__upload-modal__file-name hidden md:block"},r4={class:"vuefinder__upload-modal__file-name md:hidden"},s4={key:0,class:"ml-auto"},a4=["title","disabled","onClick"],l4={key:0,class:"py-2"},c4=["aria-expanded"],u4={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},d4=["disabled"],h4=["aria-expanded"],p4={key:0,class:"vuefinder__upload-actions__menu"},wu=Ce({__name:"ModalUpload",setup(t){const e=je(),{t:n}=e.i18n,i=e.fs,o=ke(i.path),r=H(o.value),s=H(!1),a=()=>{const Y=r.value.path;if(!Y)return{storage:"local",path:""};if(Y.endsWith("://"))return{storage:Y.replace("://",""),path:""};const I=Y.split("://");return{storage:I[0]||"local",path:I[1]||""}},l=Y=>{Y&&(r.value=Y)},c=Y=>{Y&&(r.value=Y,s.value=!1)},{container:u,internalFileInput:d,internalFolderInput:h,pickFiles:v,queue:f,message:p,uploading:_,hasFilesInDropArea:C,definitions:w,openFileSelector:E,upload:b,cancel:S,remove:x,clear:k,close:O,getClassNameForEntry:K,getIconForEntry:D,addExternalFiles:P}=Wg(e.customUploader),U=()=>{b(r.value)};et(()=>{e.emitter.on("vf-external-files-dropped",Y=>{P(Y)})}),Ct(()=>{e.emitter.off("vf-external-files-dropped")});const M=H(!1),q=H(null),le=H(null),de=Y=>{if(!M.value)return;const I=Y.target,A=q.value?.contains(I)??!1,Q=le.value?.contains(I)??!1;!A&&!Q&&(M.value=!1)};return et(()=>document.addEventListener("click",de)),Ct(()=>document.removeEventListener("click",de)),(Y,I)=>(y(),ne(tn,{"show-drag-overlay":m(C),"drag-overlay-text":m(n)("Drag and drop the files/folders to here.")},{buttons:we(()=>[g("div",{ref_key:"actionsMenuMobileRef",ref:q,class:"relative mb-2 w-full sm:hidden"},[g("div",{class:Ae(["vuefinder__upload-actions","vuefinder__upload-actions--block",M.value?"vuefinder__upload-actions--ring":""])},[g("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:I[3]||(I[3]=A=>m(E)())},L(m(n)("Select Files")),1),g("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":M.value?"true":"false",onClick:I[4]||(I[4]=Ye(A=>M.value=!M.value,["stop"]))},[...I[17]||(I[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[g("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,c4)],2),M.value?(y(),T("div",u4,[g("div",{class:"vuefinder__upload-actions__item",onClick:I[5]||(I[5]=A=>{m(E)(),M.value=!1})},L(m(n)("Select Files")),1),g("div",{class:"vuefinder__upload-actions__item",onClick:I[6]||(I[6]=A=>{m(h)?.click(),M.value=!1})},L(m(n)("Select Folders")),1),I[18]||(I[18]=g("div",{class:"vuefinder__upload-actions__separator"},null,-1)),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[7]||(I[7]=A=>m(_)?null:(m(k)(!1),M.value=!1))},L(m(n)("Clear all")),3),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[8]||(I[8]=A=>m(_)?null:(m(k)(!0),M.value=!1))},L(m(n)("Clear only successful")),3)])):ue("",!0)],512),g("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:m(_)||!m(f).length,onClick:Ye(U,["prevent"])},L(m(n)("Upload")),9,d4),m(_)?(y(),T("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:I[9]||(I[9]=Ye((...A)=>m(S)&&m(S)(...A),["prevent"]))},L(m(n)("Cancel")),1)):(y(),T("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:I[10]||(I[10]=Ye((...A)=>m(O)&&m(O)(...A),["prevent"]))},L(m(n)("Close")),1)),g("div",{ref_key:"actionsMenuDesktopRef",ref:le,class:"relative mr-auto hidden sm:block"},[g("div",{class:Ae(["vuefinder__upload-actions",M.value?"vuefinder__upload-actions--ring":""])},[g("button",{ref_key:"pickFiles",ref:v,type:"button",class:"vuefinder__upload-actions__main"},L(m(n)("Select Files")),513),g("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":M.value?"true":"false",onClick:I[11]||(I[11]=Ye(A=>M.value=!M.value,["stop"]))},[...I[19]||(I[19]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[g("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,h4)],2),M.value?(y(),T("div",p4,[g("div",{class:"vuefinder__upload-actions__item",onClick:I[12]||(I[12]=A=>{m(E)(),M.value=!1})},L(m(n)("Select Files")),1),g("div",{class:"vuefinder__upload-actions__item",onClick:I[13]||(I[13]=A=>{m(h)?.click(),M.value=!1})},L(m(n)("Select Folders")),1),I[20]||(I[20]=g("div",{class:"vuefinder__upload-actions__separator"},null,-1)),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[14]||(I[14]=A=>m(_)?null:(m(k)(!1),M.value=!1))},L(m(n)("Clear all")),3),g("div",{class:Ae(["vuefinder__upload-actions__item",m(_)?"disabled":""]),onClick:I[15]||(I[15]=A=>m(_)?null:(m(k)(!0),M.value=!1))},L(m(n)("Clear only successful")),3)])):ue("",!0)],512)]),default:we(()=>[g("div",null,[j(pn,{icon:m(i_),title:m(n)("Upload Files")},null,8,["icon","title"]),g("div",WL,[g("div",KL,[g("div",YL,L(m(n)("Target Directory")),1),g("div",GL,[g("div",{class:"vuefinder__upload-modal__target-display",onClick:I[0]||(I[0]=A=>s.value=!s.value)},[g("div",QL,[g("span",XL,L(a().storage)+"://",1),a().path?(y(),T("span",JL,L(a().path),1)):ue("",!0)]),g("span",ZL,L(m(n)("Browse")),1)])]),g("div",{class:Ae(["vuefinder__upload-modal__tree-selector",s.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[j(vu,{modelValue:r.value,"onUpdate:modelValue":[I[1]||(I[1]=A=>r.value=A),l],"show-pinned-folders":!0,onSelectAndClose:c},null,8,["modelValue"])],2)]),g("div",e4,L(m(n)("You can drag & drop files anywhere while this modal is open.")),1),g("div",{ref_key:"container",ref:u,class:"hidden"},null,512),g("div",t4,[(y(!0),T(Ie,null,He(m(f),A=>(y(),T("div",{key:A.id,class:"vuefinder__upload-modal__file-entry"},[g("span",{class:Ae(["vuefinder__upload-modal__file-icon",m(K)(A)])},[g("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:L(m(D)(A))},null,8,n4)],2),g("div",i4,[g("div",o4,L(m(Xl)(A.name,40))+" ("+L(A.size)+") ",1),g("div",r4,L(m(Xl)(A.name,16))+" ("+L(A.size)+") ",1),g("div",{class:Ae(["vuefinder__upload-modal__file-status",m(K)(A)])},[Ke(L(A.statusName)+" ",1),A.status===m(w).QUEUE_ENTRY_STATUS.UPLOADING?(y(),T("b",s4,L(A.percent),1)):ue("",!0)],2)]),g("button",{type:"button",class:Ae(["vuefinder__upload-modal__file-remove",m(_)?"disabled":""]),title:m(n)("Delete"),disabled:m(_),onClick:Q=>m(x)(A)},[...I[16]||(I[16]=[g("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"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,a4)]))),128)),m(f).length?ue("",!0):(y(),T("div",l4,L(m(n)("No files selected!")),1))]),m(p).length?(y(),ne(Ql,{key:0,error:"",onHidden:I[2]||(I[2]=A=>p.value="")},{default:we(()=>[Ke(L(m(p)),1)]),_:1})):ue("",!0)])]),g("input",{ref_key:"internalFileInput",ref:d,type:"file",multiple:"",class:"hidden"},null,512),g("input",{ref_key:"internalFolderInput",ref:h,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),f4={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 m4(t,e){return y(),T("svg",f4,[...e[0]||(e[0]=[g("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 o_={render:m4},v4={class:"vuefinder__unarchive-modal__content"},g4={class:"vuefinder__unarchive-modal__items"},_4={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"},y4={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"},b4={class:"vuefinder__unarchive-modal__item-name"},w4={class:"vuefinder__unarchive-modal__info"},Eu=Ce({__name:"ModalUnarchive",setup(t){const e=je(),n=Gt(e),i=e.fs,o=ke(i.path),{t:r}=e.i18n,s=H(e.modal.data.items[0]),a=H([]),l=()=>{e.adapter.unarchive({item:s.value.path,path:o.value.path}).then(c=>{n.success(r("The file unarchived.")),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,r("Failed to unarchive")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},L(m(r)("Unarchive")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[0]||(u[0]=d=>m(e).modal.close())},L(m(r)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(o_),title:m(r)("Unarchive")},null,8,["icon","title"]),g("div",v4,[g("div",g4,[(y(!0),T(Ie,null,He(a.value,d=>(y(),T("p",{key:d.path,class:"vuefinder__unarchive-modal__item"},[d.type==="dir"?(y(),T("svg",_4,[...u[1]||(u[1]=[g("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)])])):(y(),T("svg",y4,[...u[2]||(u[2]=[g("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)])])),g("span",b4,L(d.basename),1)]))),128)),g("p",w4,L(m(r)("The archive will be unarchived at"))+" ("+L(m(o).path)+") ",1)])])])]),_:1}))}}),E4={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function C4(t,e){return y(),T("svg",E4,[...e[0]||(e[0]=[g("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 r_={render:C4},S4={class:"vuefinder__archive-modal__content"},x4={class:"vuefinder__archive-modal__form"},T4={class:"vuefinder__archive-modal__files vf-scrollbar"},O4={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"},$4={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"},k4={class:"vuefinder__archive-modal__file-name"},A4=["placeholder"],Cu=Ce({__name:"ModalArchive",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=ke(o.path),s=H(""),a=H(e.modal.data.items),l=()=>{a.value.length&&e.adapter.archive({path:r.value.path,items:a.value.map(({path:c,type:u})=>({path:c,type:u})),name:s.value}).then(c=>{n.success(i("The file(s) archived.")),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{n.error(Yt(c,i("Failed to archive files")))})};return(c,u)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},L(m(i)("Archive")),1),g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=d=>m(e).modal.close())},L(m(i)("Cancel")),1)]),default:we(()=>[g("div",null,[j(pn,{icon:m(r_),title:m(i)("Archive the files")},null,8,["icon","title"]),g("div",S4,[g("div",x4,[g("div",T4,[(y(!0),T(Ie,null,He(a.value,d=>(y(),T("p",{key:d.path,class:"vuefinder__archive-modal__file"},[d.type==="dir"?(y(),T("svg",O4,[...u[2]||(u[2]=[g("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)])])):(y(),T("svg",$4,[...u[3]||(u[3]=[g("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)])])),g("span",k4,L(d.basename),1)]))),128))]),it(g("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>s.value=d),class:"vuefinder__archive-modal__input",placeholder:m(i)("Archive name. (.zip file will be created)"),type:"text",onKeyup:ho(l,["enter"])},null,40,A4),[[Go,s.value]])])])])]),_:1}))}}),P4={class:"vuefinder__about-modal__content"},R4={class:"vuefinder__about-modal__main"},I4={class:"vuefinder__about-modal__shortcuts"},M4={class:"vuefinder__about-modal__shortcut"},D4={key:0,class:"vuefinder__about-modal__shortcut"},F4={key:1,class:"vuefinder__about-modal__shortcut"},L4={class:"vuefinder__about-modal__shortcut"},j4={class:"vuefinder__about-modal__shortcut"},N4={key:2,class:"vuefinder__about-modal__shortcut"},U4={key:3,class:"vuefinder__about-modal__shortcut"},z4={key:4,class:"vuefinder__about-modal__shortcut"},V4={key:5,class:"vuefinder__about-modal__shortcut"},B4={class:"vuefinder__about-modal__shortcut"},H4={class:"vuefinder__about-modal__shortcut"},q4={key:6,class:"vuefinder__about-modal__shortcut"},W4={key:7,class:"vuefinder__about-modal__shortcut"},K4=Ce({__name:"ModalShortcuts",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n;return(o,r)=>(y(),ne(tn,null,{buttons:we(()=>[g("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:r[0]||(r[0]=s=>m(e).modal.close())},L(m(i)("Close")),1)]),default:we(()=>[g("div",P4,[j(pn,{icon:m(Vg),title:m(i)("Shortcuts")},null,8,["icon","title"]),g("div",R4,[g("div",I4,[g("div",M4,[g("div",null,L(m(i)("Refresh")),1),r[1]||(r[1]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"R")],-1))]),m(n)("rename")?(y(),T("div",D4,[g("div",null,L(m(i)("Rename")),1),r[2]||(r[2]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"Shift"),Ke(" + "),g("kbd",null,"R")],-1))])):ue("",!0),m(n)("delete")?(y(),T("div",F4,[g("div",null,L(m(i)("Delete")),1),r[3]||(r[3]=g("kbd",null,"Del",-1))])):ue("",!0),g("div",L4,[g("div",null,L(m(i)("Escape")),1),r[4]||(r[4]=g("kbd",null,"Esc",-1))]),g("div",j4,[g("div",null,L(m(i)("Select All")),1),r[5]||(r[5]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"A")],-1))]),m(n)("copy")?(y(),T("div",N4,[g("div",null,L(m(i)("Cut")),1),r[6]||(r[6]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"X")],-1))])):ue("",!0),m(n)("copy")?(y(),T("div",U4,[g("div",null,L(m(i)("Copy")),1),r[7]||(r[7]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"C")],-1))])):ue("",!0),m(n)("copy")?(y(),T("div",z4,[g("div",null,L(m(i)("Paste")),1),r[8]||(r[8]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"V")],-1))])):ue("",!0),m(n)("search")?(y(),T("div",V4,[g("div",null,L(m(i)("Search")),1),r[9]||(r[9]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"F")],-1))])):ue("",!0),g("div",B4,[g("div",null,L(m(i)("Toggle Sidebar")),1),r[10]||(r[10]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"E")],-1))]),g("div",H4,[g("div",null,L(m(i)("Open Settings")),1),r[11]||(r[11]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"S")],-1))]),m(n)("fullscreen")?(y(),T("div",q4,[g("div",null,L(m(i)("Toggle Full Screen")),1),r[12]||(r[12]=g("div",null,[g("kbd",null,"⌘"),Ke(" + "),g("kbd",null,"Enter")],-1))])):ue("",!0),m(n)("preview")?(y(),T("div",W4,[g("div",null,L(m(i)("Preview")),1),r[13]||(r[13]=g("kbd",null,"Space",-1))])):ue("",!0)])])])]),_:1}))}}),Y4={class:"vuefinder__menubar__container"},G4=["onClick","onMouseenter"],Q4={class:"vuefinder__menubar__label"},X4=["onMouseenter"],J4=["onClick"],Z4={key:0,class:"vuefinder__menubar__dropdown__label"},ej={key:1,class:"vuefinder__menubar__dropdown__checkmark"},tj=Ce({__name:"MenuBar",setup(t){const e=je(),n=Gt(e),{enabled:i}=Tn(),{t:o}=e?.i18n||{t:E=>E},r=e?.fs,s=e?.config,a=ke(s.state),l=ke(r.selectedItems),c=ke(r?.storages||[]),u=H(null),d=H(!1),h=te(()=>window.opener!==null||window.name!==""||window.history.length<=1),v=te(()=>[{id:"file",label:o("File"),items:[{id:"new-folder",label:o("New Folder"),action:()=>e?.modal?.open(bu,{items:l.value}),hidden:()=>!i("newfolder")},{id:"new-file",label:o("New File"),action:()=>e?.modal?.open(n_,{items:l.value}),hidden:()=>!i("newfile")},{type:"separator",hidden:()=>!i("newfolder")&&!i("newfile")||!i("upload")},{id:"upload",label:o("Upload"),action:()=>e?.modal?.open(wu,{items:l.value}),hidden:()=>!i("upload")},{type:"separator",hidden:()=>!i("search")},{id:"search",label:o("Search"),action:()=>e.modal.open(yu),hidden:()=>!i("search")},{type:"separator",hidden:()=>!i("archive")&&!i("unarchive")},{id:"archive",label:o("Archive"),action:()=>{l.value.length>0&&e?.modal?.open(Cu,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!i("archive")},{id:"unarchive",label:o("Unarchive"),action:()=>{l.value.length===1&&l.value[0]?.mime_type==="application/zip"&&e?.modal?.open(Eu,{items:l.value})},enabled:()=>l.value.length===1&&l.value[0]?.mime_type==="application/zip",hidden:()=>!i("unarchive")},{type:"separator",hidden:()=>!i("preview")},{id:"preview",label:o("Preview"),action:()=>{l.value.length===1&&l.value[0]?.type!=="dir"&&e?.modal?.open(lr,{storage:r?.path?.get()?.storage,item:l.value[0]})},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!i("preview")},...h.value?[{type:"separator"},{id:"exit",label:o("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:o("Edit"),items:[...e?.selectionMode==="multiple"?[{id:"select-all",label:o("Select All"),action:()=>r?.selectAll(e?.selectionMode||"multiple",e),enabled:()=>!0},{id:"deselect",label:o("Deselect All"),action:()=>r?.clearSelection(),enabled:()=>l.value.length>0},{type:"separator"}]:[],...i("copy")?[{id:"cut",label:o("Cut"),action:()=>{l.value.length>0&&r?.setClipboard("cut",new Set(l.value.map(E=>E.path)))},enabled:()=>l.value.length>0},{id:"copy",label:o("Copy"),action:()=>{l.value.length>0&&r?.setClipboard("copy",new Set(l.value.map(E=>E.path)))},enabled:()=>l.value.length>0},{id:"paste",label:o("Paste"),action:()=>{const E=r?.getClipboard();E?.items?.size>0&&e?.modal?.open(E.type==="cut"?uo:gu,{items:{from:Array.from(E.items),to:r?.path?.get()}})},enabled:()=>r?.getClipboard()?.items?.size>0}]:[],...i("move")?[{id:"move",label:o("Move files"),action:()=>{if(l.value.length>0){const E=e?.fs,b={storage:E?.path?.get()?.storage||"",path:E?.path?.get()?.path||"",type:"dir"};e?.modal?.open(uo,{items:{from:l.value,to:b}})}},enabled:()=>l.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:o("Copy Path"),action:async()=>{if(l.value.length===1){const E=l.value[0];await Wo(E.path)}else{const E=r?.path?.get();E?.path&&await Wo(E.path)}},enabled:()=>!0},{id:"copy-download-url",label:o("Copy Download URL"),action:async()=>{if(l.value.length===1){const E=l.value[0];r?.path?.get()?.storage;const b=e?.adapter?.getDownloadUrl({path:E.path});b&&await M5(b)}},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!i("rename")&&!i("delete")},{id:"rename",label:o("Rename"),action:()=>{l.value.length===1&&e?.modal?.open(Qs,{items:l.value})},enabled:()=>l.value.length===1,hidden:()=>!i("rename")},{id:"delete",label:o("Delete"),action:()=>{l.value.length>0&&e?.modal?.open(Gs,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!i("delete")}]},{id:"view",label:o("View"),items:[{id:"refresh",label:o("Refresh"),action:()=>{e.adapter.invalidateListQuery(r.path.get().path),e.adapter.open(r.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:o("Grid View"),action:()=>s?.set("view","grid"),enabled:()=>!0,checked:()=>a.value?.view==="grid"},{id:"list-view",label:o("List View"),action:()=>s?.set("view","list"),enabled:()=>!0,checked:()=>a.value?.view==="list"},{type:"separator"},{id:"tree-view",label:o("Tree View"),action:()=>s?.toggle("showTreeView"),enabled:()=>!0,checked:()=>a.value?.showTreeView},{id:"thumbnails",label:o("Show Thumbnails"),action:()=>s?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>a.value?.showThumbnails},{id:"show-hidden-files",label:o("Show Hidden Files"),action:()=>s?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>a.value?.showHiddenFiles},{type:"separator",hidden:()=>!i("fullscreen")},{id:"fullscreen",label:o("Full Screen"),action:()=>s?.toggle("fullScreen"),enabled:()=>i("fullscreen"),checked:()=>a.value?.fullScreen,hidden:()=>!i("fullscreen")},{type:"separator"},{id:"persist-path",label:o("Persist Path"),action:()=>{s?.toggle("persist"),e.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>a.value?.persist},{id:"metric-units",label:o("Metric Units"),action:()=>{s?.toggle("metricUnits"),e.filesize=s?.get("metricUnits")?Ng:uu,e.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>a.value?.metricUnits}]},{id:"go",label:o("Go"),items:[...i("history")?[{id:"forward",label:o("Forward"),action:()=>{r?.goForward();const E=r?.path?.get();E?.path&&e?.adapter.open(E.path)},enabled:()=>r?.canGoForward?.get()??!1},{id:"back",label:o("Back"),action:()=>{r?.goBack();const E=r?.path?.get();E?.path&&e?.adapter.open(E.path)},enabled:()=>r?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:o("Open containing folder"),action:()=>{const E=r?.path?.get();if(E?.breadcrumb&&E.breadcrumb.length>1){const b=E.breadcrumb[E.breadcrumb.length-2]?.path??`${E.storage}://`;e?.adapter.open(b)}},enabled:()=>{const E=r?.path?.get();return E?.breadcrumb&&E.breadcrumb.length>1}},{type:"separator"},...(c.value||[]).map(E=>({id:`storage-${E}`,label:E,action:()=>{const b=`${E}://`;e?.adapter.open(b)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:o("Go to Folder"),action:async()=>{const E=prompt(o("Enter folder path:"));if(E){if(!E.includes("://")){alert(o("Invalid path format. Path must be in format: storage://path/to/folder"));return}const b=E.indexOf("://"),S=E.slice(0,b);if(!c.value||!c.value.includes(S)){alert(o('Invalid storage. Storage "%s" is not available.',S));return}try{await e?.adapter.open(E)}catch(x){const k=Yt(x,o("Failed to navigate to folder"));n.error(k),e.fs.setLoading(!1)}}},enabled:()=>!0}]},{id:"help",label:o("Help"),items:[{id:"settings",label:o("Settings"),action:()=>e?.modal?.open(Zg),enabled:()=>!0},{id:"shortcuts",label:o("Shortcuts"),action:()=>e?.modal?.open(K4),enabled:()=>!0},{id:"about",label:o("About"),action:()=>e?.modal?.open(Bg),enabled:()=>!0}]}]),f=E=>{u.value===E?_():(u.value=E,d.value=!0)},p=E=>{d.value&&(u.value=E)},_=()=>{u.value=null,d.value=!1},C=E=>{_(),E()},w=E=>{E.target.closest(".vuefinder__menubar")||_()};return et(()=>{document.addEventListener("click",w)}),Ct(()=>{document.removeEventListener("click",w)}),(E,b)=>(y(),T("div",{class:"vuefinder__menubar",onClick:b[0]||(b[0]=Ye(()=>{},["stop"]))},[g("div",Y4,[(y(!0),T(Ie,null,He(v.value,S=>(y(),T("div",{key:S.id,class:Ae(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":u.value===S.id}]),onClick:x=>f(S.id),onMouseenter:x=>p(S.id)},[g("span",Q4,L(S.label),1),u.value===S.id?(y(),T("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:x=>p(S.id)},[(y(!0),T(Ie,null,He(S.items,x=>(y(),T("div",{key:x.id||x.type,class:Ae(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":x.type==="separator","vuefinder__menubar__dropdown__item--disabled":x.enabled&&!x.enabled(),"vuefinder__menubar__dropdown__item--checked":x.checked&&x.checked(),"vuefinder__menubar__dropdown__item--hidden":x.hidden&&x.hidden()}]),onClick:Ye(k=>x.type!=="separator"&&x.enabled&&x.enabled()?C(x.action):null,["stop"])},[x.type!=="separator"?(y(),T("span",Z4,L(x.label),1)):ue("",!0),x.checked&&x.checked()?(y(),T("span",ej," ✓ ")):ue("",!0)],10,J4))),128))],40,X4)):ue("",!0)],42,G4))),128))])]))}}),nj={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function ij(t,e){return y(),T("svg",nj,[...e[0]||(e[0]=[g("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 oj={render:ij},rj={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 sj(t,e){return y(),T("svg",rj,[...e[0]||(e[0]=[g("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 aj={render:sj},lj={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 cj(t,e){return y(),T("svg",lj,[...e[0]||(e[0]=[g("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 uj={render:cj},dj={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 hj(t,e){return y(),T("svg",dj,[...e[0]||(e[0]=[g("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 pj={render:hj},fj={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function mj(t,e){return y(),T("svg",fj,[...e[0]||(e[0]=[g("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 vj={render:mj},gj={class:"vuefinder__toolbar"},_j={class:"vuefinder__toolbar__actions"},yj=["title"],bj=["title"],wj=["title"],Ej=["title"],Cj=["title"],Sj=["title"],xj=["title"],Tj={class:"vuefinder__toolbar__controls"},Oj=["title"],$j={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},kj=["title"],Aj={class:"relative"},Pj={key:0,class:"vuefinder__toolbar__filter-indicator"},Rj={key:0,class:"vuefinder__toolbar__dropdown"},Ij={class:"vuefinder__toolbar__dropdown-content"},Mj={class:"vuefinder__toolbar__dropdown-section"},Dj={class:"vuefinder__toolbar__dropdown-label"},Fj={class:"vuefinder__toolbar__dropdown-row"},Lj={value:"name"},jj={value:"size"},Nj={value:"modified"},Uj={value:""},zj={value:"asc"},Vj={value:"desc"},Bj={class:"vuefinder__toolbar__dropdown-section"},Hj={class:"vuefinder__toolbar__dropdown-label"},qj={class:"vuefinder__toolbar__dropdown-options"},Wj={class:"vuefinder__toolbar__dropdown-option"},Kj={class:"vuefinder__toolbar__option-text"},Yj={class:"vuefinder__toolbar__dropdown-option"},Gj={class:"vuefinder__toolbar__option-text"},Qj={class:"vuefinder__toolbar__dropdown-option"},Xj={class:"vuefinder__toolbar__option-text"},Jj={class:"vuefinder__toolbar__dropdown-toggle"},Zj={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},e3={class:"vuefinder__toolbar__dropdown-reset"},t3=["title"],n3=["title"],i3=Ce({name:"VfToolbar",__name:"Toolbar",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n,o=e.fs,r=e.config,s=ke(r.state),a=ke(o.selectedItems),l=ke(o.sort),c=ke(o.filter);Oe(()=>s.value.fullScreen,()=>{const _=document.querySelector("body");_&&(_.style.overflow=s.value.fullScreen?"hidden":"")},{immediate:!0});const u=H(!1),d=_=>{_.target.closest(".vuefinder__toolbar__dropdown-container")||(u.value=!1)};et(()=>{const _=document.querySelector("body");_&&s.value.fullScreen&&setTimeout(()=>_.style.overflow="hidden"),document.addEventListener("click",d)}),Ct(()=>{document.removeEventListener("click",d)});const h=H({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:s.value.showHiddenFiles});Oe(()=>h.value.sortBy,_=>{if(!h.value.sortOrder){o.clearSort();return}_==="name"?o.setSort("basename",h.value.sortOrder):_==="size"?o.setSort("file_size",h.value.sortOrder):_==="modified"&&o.setSort("last_modified",h.value.sortOrder)}),Oe(()=>h.value.sortOrder,_=>{if(!_){o.clearSort();return}h.value.sortBy==="name"?o.setSort("basename",_):h.value.sortBy==="size"?o.setSort("file_size",_):h.value.sortBy==="modified"&&o.setSort("last_modified",_)}),Oe(l,_=>{_.active?(_.column==="basename"?h.value.sortBy="name":_.column==="file_size"?h.value.sortBy="size":_.column==="last_modified"&&(h.value.sortBy="modified"),h.value.sortOrder=_.order):h.value.sortOrder=""},{immediate:!0}),Oe(()=>h.value.filterKind,_=>{o.setFilter(_,s.value.showHiddenFiles)}),Oe(()=>h.value.showHidden,_=>{r.set("showHiddenFiles",_),o.setFilter(h.value.filterKind,_)}),Oe(c,_=>{h.value.filterKind=_.kind},{immediate:!0}),Oe(()=>s.value.showHiddenFiles,_=>{h.value.showHidden=_,o.setFilter(h.value.filterKind,_)},{immediate:!0});const v=()=>r.set("view",s.value.view==="grid"?"list":"grid"),f=te(()=>c.value.kind!=="all"||!s.value.showHiddenFiles||l.value.active),p=()=>{h.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},r.set("showHiddenFiles",!0),o.clearSort(),o.clearFilter()};return(_,C)=>(y(),T("div",gj,[g("div",_j,[m(n)("newfolder")?(y(),T("div",{key:0,class:"mx-1.5",title:m(i)("New Folder"),onClick:C[0]||(C[0]=w=>m(e).modal.open(bu,{items:m(a)}))},[j(m(e_))],8,yj)):ue("",!0),m(n)("newfile")?(y(),T("div",{key:1,class:"mx-1.5",title:m(i)("New File"),onClick:C[1]||(C[1]=w=>m(e).modal.open(n_,{items:m(a)}))},[j(m(t_))],8,bj)):ue("",!0),m(n)("rename")?(y(),T("div",{key:2,class:"mx-1.5",title:m(i)("Rename"),onClick:C[2]||(C[2]=w=>m(a).length!==1||m(e).modal.open(Qs,{items:m(a)}))},[j(m(qg),{class:Ae(m(a).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,wj)):ue("",!0),m(n)("delete")?(y(),T("div",{key:3,class:"mx-1.5",title:m(i)("Delete"),onClick:C[3]||(C[3]=w=>!m(a).length||m(e).modal.open(Gs,{items:m(a)}))},[j(m(Hg),{class:Ae(m(a).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ej)):ue("",!0),m(n)("upload")?(y(),T("div",{key:4,class:"mx-1.5",title:m(i)("Upload"),onClick:C[4]||(C[4]=w=>m(e).modal.open(wu,{items:m(a)}))},[j(m(i_))],8,Cj)):ue("",!0),m(n)("unarchive")&&m(a).length===1&&m(a)[0].mime_type==="application/zip"?(y(),T("div",{key:5,class:"mx-1.5",title:m(i)("Unarchive"),onClick:C[5]||(C[5]=w=>!m(a).length||m(e).modal.open(Eu,{items:m(a)}))},[j(m(o_),{class:Ae(m(a).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Sj)):ue("",!0),m(n)("archive")?(y(),T("div",{key:6,class:"mx-1.5",title:m(i)("Archive"),onClick:C[6]||(C[6]=w=>!m(a).length||m(e).modal.open(Cu,{items:m(a)}))},[j(m(r_),{class:Ae(m(a).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,xj)):ue("",!0)]),g("div",Tj,[m(n)("search")?(y(),T("div",{key:0,class:"mx-1.5",title:m(i)("Search Files"),onClick:C[7]||(C[7]=w=>m(e).modal.open(yu))},[j(m(_u),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,Oj)):ue("",!0),g("div",$j,[g("div",{title:m(i)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:C[8]||(C[8]=w=>u.value=!u.value)},[g("div",Aj,[j(m(vj),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),f.value?(y(),T("div",Pj)):ue("",!0)])],8,kj),u.value?(y(),T("div",Rj,[g("div",Ij,[g("div",Mj,[g("div",Dj,L(m(i)("Sorting")),1),g("div",Fj,[it(g("select",{"onUpdate:modelValue":C[9]||(C[9]=w=>h.value.sortBy=w),class:"vuefinder__toolbar__dropdown-select"},[g("option",Lj,L(m(i)("Name")),1),g("option",jj,L(m(i)("Size")),1),g("option",Nj,L(m(i)("Date")),1)],512),[[Za,h.value.sortBy]]),it(g("select",{"onUpdate:modelValue":C[10]||(C[10]=w=>h.value.sortOrder=w),class:"vuefinder__toolbar__dropdown-select"},[g("option",Uj,L(m(i)("None")),1),g("option",zj,L(m(i)("Asc")),1),g("option",Vj,L(m(i)("Desc")),1)],512),[[Za,h.value.sortOrder]])])]),g("div",Bj,[g("div",Hj,L(m(i)("Show")),1),g("div",qj,[g("label",Wj,[it(g("input",{"onUpdate:modelValue":C[11]||(C[11]=w=>h.value.filterKind=w),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[ea,h.value.filterKind]]),g("span",Kj,L(m(i)("All items")),1)]),g("label",Yj,[it(g("input",{"onUpdate:modelValue":C[12]||(C[12]=w=>h.value.filterKind=w),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[ea,h.value.filterKind]]),g("span",Gj,L(m(i)("Files only")),1)]),g("label",Qj,[it(g("input",{"onUpdate:modelValue":C[13]||(C[13]=w=>h.value.filterKind=w),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[ea,h.value.filterKind]]),g("span",Xj,L(m(i)("Folders only")),1)])])]),g("div",Jj,[g("label",Zj,L(m(i)("Show hidden files")),1),it(g("input",{id:"showHidden","onUpdate:modelValue":C[14]||(C[14]=w=>h.value.showHidden=w),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[Es,h.value.showHidden]])]),g("div",e3,[g("button",{class:"vuefinder__toolbar__reset-button",onClick:p},L(m(i)("Reset")),1)])])])):ue("",!0)]),m(n)("fullscreen")?(y(),T("div",{key:1,class:"mx-1.5",title:m(i)("Toggle Full Screen"),onClick:C[15]||(C[15]=w=>m(r).toggle("fullScreen"))},[m(s).fullScreen?(y(),ne(m(aj),{key:0,class:"vf-toolbar-icon"})):(y(),ne(m(oj),{key:1,class:"vf-toolbar-icon"}))],8,t3)):ue("",!0),g("div",{class:"mx-1.5",title:m(i)("Change View"),onClick:C[16]||(C[16]=w=>v())},[m(s).view==="grid"?(y(),ne(m(uj),{key:0,class:"vf-toolbar-icon"})):ue("",!0),m(s).view==="list"?(y(),ne(m(pj),{key:1,class:"vf-toolbar-icon"})):ue("",!0)],8,n3)])]))}}),o3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function r3(t,e){return y(),T("svg",o3,[...e[0]||(e[0]=[g("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 s3={render:r3},a3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function l3(t,e){return y(),T("svg",a3,[...e[0]||(e[0]=[g("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 c3={render:l3},u3={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 d3(t,e){return y(),T("svg",u3,[...e[0]||(e[0]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const h3={render:d3},p3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function f3(t,e){return y(),T("svg",p3,[...e[0]||(e[0]=[g("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 m3={render:f3},v3={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 g3(t,e){return y(),T("svg",v3,[...e[0]||(e[0]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const _3={render:g3},y3={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 b3(t,e){return y(),T("svg",y3,[...e[0]||(e[0]=[g("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),g("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const w3={render:b3},E3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function C3(t,e){return y(),T("svg",E3,[...e[0]||(e[0]=[g("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 S3={render:C3};function cr(t,e=[]){const n="vfDragEnterCounter",i=t.fs,o=ke(i.selectedItems);function r(d,h){return!!(!d||d.type!=="dir"||d.path.startsWith(h)||o.value.some(v=>v.path===h?!1:!!d.path.startsWith(v.path)))}function s(d,h){if(d.isExternalDrag)return;if(!(t.features?.move??!1)){d.dataTransfer&&(d.dataTransfer.dropEffect="none",d.dataTransfer.effectAllowed="none");return}d.preventDefault();const v=i.getDraggedItem();r(h,v)?d.dataTransfer&&(d.dataTransfer.dropEffect="none",d.dataTransfer.effectAllowed="none"):(d.dataTransfer&&(d.dataTransfer.dropEffect="copy",d.dataTransfer.effectAllowed="all"),d.currentTarget.classList.add(...e))}function a(d){if(d.isExternalDrag||!(t.features?.move??!1))return;d.preventDefault();const h=d.currentTarget,v=Number(h.dataset[n]||0);h.dataset[n]=String(v+1)}function l(d){if(d.isExternalDrag||!(t.features?.move??!1))return;d.preventDefault();const h=d.currentTarget,v=Number(h.dataset[n]||0)-1;v<=0?(delete h.dataset[n],h.classList.remove(...e)):h.dataset[n]=String(v)}function c(d,h){if(d.isExternalDrag||!(t.features?.move??!1)||!h)return;d.preventDefault();const v=d.currentTarget;delete v.dataset[n],v.classList.remove(...e);const f=d.dataTransfer?.getData("items")||"[]",p=JSON.parse(f).map(_=>i.sortedFiles.get().find(C=>C.path===_));i.clearDraggedItem(),t.modal.open(uo,{items:{from:p,to:h}})}function u(d){return{dragover:h=>s(h,d),dragenter:a,dragleave:l,drop:h=>c(h,d)}}return{events:u}}const x3={class:"vuefinder__breadcrumb__container"},T3=["title"],O3=["title"],$3=["title"],k3=["title"],A3={class:"vuefinder__breadcrumb__path-container"},P3={class:"vuefinder__breadcrumb__list"},R3={key:0,class:"vuefinder__breadcrumb__hidden-list"},I3={class:"relative"},M3=["title","onClick"],D3=["title"],F3={class:"vuefinder__breadcrumb__path-mode"},L3={class:"vuefinder__breadcrumb__path-mode-content"},j3=["title"],N3={class:"vuefinder__breadcrumb__path-text"},U3=["title"],z3=["data-theme"],V3=["onClick"],B3={class:"vuefinder__breadcrumb__hidden-item-content"},H3={class:"vuefinder__breadcrumb__hidden-item-text"},q3=Ce({__name:"Breadcrumb",setup(t){const e=je(),n=Gt(e),{t:i}=e.i18n,o=e.fs,r=e.config,s=ke(r.state),a=ke(o.path),l=ke(o.loading),c=H(null),u=Yg(0,100),d=H(5),h=H(!1),v=H(!1),f=te(()=>a.value?.breadcrumb??[]);function p(Y,I){return Y.length>I?[Y.slice(-I),Y.slice(0,-I)]:[Y,[]]}const _=te(()=>p(f.value,d.value)[0]),C=te(()=>p(f.value,d.value)[1]);Oe(u,()=>{if(!c.value)return;const Y=c.value.children;let I=0,A=0;const Q=5,z=1;d.value=Q,Ge(()=>{for(let ie=Y.length-1;ie>=0;ie--){const ve=Y[ie];if(I+ve.offsetWidth>u.value-40)break;I+=parseInt(ve.offsetWidth.toString(),10),A++}A<z&&(A=z),A>Q&&(A=Q),d.value=A})});const w=()=>{c.value&&(u.value=c.value.offsetWidth)},E=H(null);et(()=>{E.value=new ResizeObserver(w),c.value&&E.value.observe(c.value)}),Ct(()=>{E.value&&E.value.disconnect()});const b=cr(e,["vuefinder__drag-over"]);function S(Y=null){Y??=f.value.length-2;const I={basename:a.value?.storage??"local",extension:"",path:(a.value?.storage??"local")+"://",storage:a.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return f.value[Y]??I}const x=()=>{e.adapter.invalidateListQuery(a.value.path),e.adapter.open(a.value.path)},k=()=>{_.value.length>0&&e.adapter.open(f.value[f.value.length-2]?.path??(a.value?.storage??"local")+"://")},O=Y=>{e.adapter.open(Y.path),h.value=!1},K=()=>{h.value&&(h.value=!1)},D={mounted(Y,I){Y.clickOutsideEvent=function(A){Y===A.target||Y.contains(A.target)||I.value()},document.body.addEventListener("click",Y.clickOutsideEvent)},beforeUnmount(Y){document.body.removeEventListener("click",Y.clickOutsideEvent)}},P=()=>{r.toggle("showTreeView")},U=H({x:0,y:0}),M=(Y,I=null)=>{if(Y.currentTarget instanceof HTMLElement){const{x:A,y:Q,height:z}=Y.currentTarget.getBoundingClientRect();U.value={x:A,y:Q+z}}h.value=I??!h.value},q=()=>{v.value=!v.value},le=async()=>{await Wo(a.value?.path||""),n.success(i("Path copied to clipboard"))},de=()=>{v.value=!1};return(Y,I)=>(y(),T("div",x3,[g("span",{title:m(i)("Toggle Tree View")},[j(m(w3),{class:Ae(["vuefinder__breadcrumb__toggle-tree",m(s).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:P},null,8,["class"])],8,T3),g("span",{title:m(i)("Go up a directory")},[j(m(c3),We({class:f.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},bn(f.value.length?m(b).events(S()):{}),{onClick:k}),null,16,["class"])],8,O3),m(o).isLoading()?(y(),T("span",{key:1,title:m(i)("Cancel")},[j(m(h3),{onClick:I[0]||(I[0]=A=>m(e).emitter.emit("vf-fetch-abort"))})],8,k3)):(y(),T("span",{key:0,title:m(i)("Refresh")},[j(m(s3),{onClick:x})],8,$3)),it(g("div",A3,[g("div",null,[j(m(m3),We({class:"vuefinder__breadcrumb__home-icon"},bn(m(b).events(S(-1))),{onClick:I[1]||(I[1]=Ye(A=>m(e).adapter.open(m(a).storage+"://"),["stop"]))}),null,16)]),g("div",P3,[C.value.length?it((y(),T("div",R3,[I[3]||(I[3]=g("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),g("div",I3,[g("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:I[2]||(I[2]=A=>M(A,!0)),onClick:Ye(M,["stop"])},[j(m(Jg),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[D,K]]):ue("",!0)]),g("div",{ref_key:"breadcrumbContainer",ref:c,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(y(!0),T(Ie,null,He(_.value,(A,Q)=>(y(),T("div",{key:Q},[I[4]||(I[4]=g("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),g("span",We({class:"vuefinder__breadcrumb__item pointer-events-auto",title:A.basename},bn(m(b).events(A),!0),{onClick:Ye(z=>m(e).adapter.open(A.path),["stop"])}),L(A.name),17,M3)]))),128))],512),m(r).get("loadingIndicator")==="circular"&&m(l)?(y(),ne(m(Zs),{key:0})):ue("",!0),g("span",{title:m(i)("Toggle Path Copy Mode"),onClick:q},[j(m(S3),{class:"vuefinder__breadcrumb__toggle-icon"})],8,D3)],512),[[En,!v.value]]),it(g("div",F3,[g("div",L3,[g("div",{title:m(i)("Copy Path")},[j(m(hu),{class:"vuefinder__breadcrumb__copy-icon",onClick:le})],8,j3),g("div",N3,L(m(a).path),1),g("div",{title:m(i)("Exit")},[j(m(_3),{class:"vuefinder__breadcrumb__exit-icon",onClick:de})],8,U3)])],512),[[En,v.value]]),(y(),ne(ws,{to:"body"},[g("div",null,[it(g("div",{style:At({position:"absolute",top:U.value.y+"px",left:U.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":m(e).theme.current},[(y(!0),T(Ie,null,He(C.value,(A,Q)=>(y(),T("div",We({key:Q,class:"vuefinder__breadcrumb__hidden-item"},bn(m(b).events(A),!0),{onClick:z=>O(A)}),[g("div",B3,[g("span",null,[j(m(Nn),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),g("span",H3,L(A.name),1)])],16,V3))),128))],12,z3),[[En,h.value]])])]))]))}}),W3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function K3(t,e){return y(),T("svg",W3,[...e[0]||(e[0]=[g("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 Dp={render:K3},Y3={class:"vuefinder__drag-item__container"},G3={class:"vuefinder__drag-item__count"},Q3=Ce({__name:"DragItem",props:{count:{}},setup(t){const e=t;return(n,i)=>(y(),T("div",Y3,[e.count>1?(y(),ne(m(Dp),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):ue("",!0),j(m(Dp),{class:"vuefinder__drag-item__icon"}),g("div",G3,L(e.count),1)]))}}),X3={key:2,class:"vuefinder__item-icon__extension"},Fp=Ce({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(t){const e=t,n=je(),i=ke(n.config.state),o=te(()=>e.small!==void 0?e.small?"small":"large":e.view==="list"?"small":"large"),r=te(()=>{const a=o.value,l=i.value?.listIconSize,c=i.value?.gridIconSize;return i.value?.gridItemWidth,i.value?.gridItemHeight,e.view==="list"||a==="small"?{"--vf-icon-size":`${l??16}px`}:{"--vf-icon-size":`${c??48}px`}}),s={app:n,config:i.value,item:e.item,view:e.view};return(a,l)=>(y(),T("div",{class:Ae(["vuefinder__item-icon",{"vuefinder__item-icon--small":o.value==="small","vuefinder__item-icon--large":o.value==="large","vuefinder__item-icon--grid":t.view==="grid","vuefinder__item-icon--list":t.view==="list"}]),style:At(r.value)},[Ve(a.$slots,"icon",wn(Jn(s)),()=>[t.item.type==="dir"?(y(),ne(m(Nn),{key:0,class:"vuefinder__item-icon__folder"})):(y(),ne(m(qo),{key:1,class:"vuefinder__item-icon__file"})),t.ext&&t.item.type!=="dir"&&t.item.extension?(y(),T("div",X3,L(t.item.extension.substring(0,3)),1)):ue("",!0)])],6))}}),J3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function Z3(t,e){return y(),T("svg",J3,[...e[0]||(e[0]=[g("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),g("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 Lp={render:Z3},eN=["data-key","data-row","data-col","draggable"],tN={key:0},nN={class:"vuefinder__explorer__item-grid-content"},iN=["data-src","alt"],oN={class:"vuefinder__explorer__item-title"},rN={key:1,class:"vuefinder__explorer__item-list-content"},sN={class:"vuefinder__explorer__item-list-name"},aN={class:"vuefinder__explorer__item-list-icon"},lN={class:"vuefinder__explorer__item-name"},cN={key:0,class:"vuefinder__explorer__item-path"},uN={key:1,class:"vuefinder__explorer__item-size"},dN={key:0},hN={key:2,class:"vuefinder__explorer__item-date"},pN=Ce({__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(t,{emit:e}){const n=t,i=e,o=je(),r=o.fs,s=o.config,a=te(()=>{const P=o.selectionFilterType;return!P||P==="both"?!0:P==="files"&&n.item.type==="file"||P==="dirs"&&n.item.type==="dir"}),l=te(()=>{const P=o.selectionFilterMimeIncludes;return!P||!P.length||n.item.type==="dir"?!0:n.item.mime_type?P.some(U=>n.item.mime_type?.startsWith(U)):!1}),c=te(()=>a.value&&l.value),u=te(()=>["file-item-"+n.explorerId,n.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",n.isSelected?"vf-explorer-selected":"",c.value?"":"vf-explorer-item--unselectable"]),d=te(()=>({opacity:n.isDragging||r.isCut(n.item.path)||!c.value?.5:""})),h=H(null);let v=!1,f=null,p=null,_=!1;const{enabled:C}=Tn(),w=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),E=te(()=>w?!1:C("move")),b=()=>{f&&(clearTimeout(f),f=null),p=null},S=P=>{b(),p=P,_=!1,P.stopPropagation(),f=setTimeout(()=>{!p||f===null||(_=!0,p.cancelable&&p.preventDefault(),p.stopPropagation(),i("contextmenu",p),b())},500)},x=P=>{if(_){P.preventDefault(),P.stopPropagation(),b();return}setTimeout(()=>{_||(b(),D(P))},100)},k=P=>{if(!p)return;const U=p.touches[0]||p.changedTouches[0],M=P.touches[0]||P.changedTouches[0];if(U&&M){const q=Math.abs(M.clientX-U.clientX),le=Math.abs(M.clientY-U.clientY);(q>15||le>15)&&b()}},O=P=>{w&&P.type!=="click"||i("click",P)},K=P=>{if(_)return P.preventDefault(),P.stopPropagation(),!1;i("dragstart",P)},D=P=>{if(!v)v=!0,i("click",P),h.value=setTimeout(()=>{v=!1},300);else return v=!1,i("dblclick",P),!1};return(P,U)=>(y(),T("div",{class:Ae(u.value),style:At(d.value),"data-key":t.item.path,"data-row":t.rowIndex,"data-col":t.colIndex,draggable:E.value,onTouchstartCapture:U[1]||(U[1]=M=>S(M)),onTouchendCapture:U[2]||(U[2]=M=>x(M)),onTouchmoveCapture:k,onTouchcancelCapture:U[3]||(U[3]=()=>b()),onClick:O,onDblclick:U[4]||(U[4]=M=>i("dblclick",M)),onContextmenu:U[5]||(U[5]=Ye(M=>i("contextmenu",M),["prevent","stop"])),onDragstart:K,onDragend:U[6]||(U[6]=M=>i("dragend",M))},[t.view==="grid"?(y(),T("div",tN,[m(r).isReadOnly(t.item)?(y(),ne(m(Lp),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):ue("",!0),g("div",nN,[(t.item.mime_type??"").startsWith("image")&&t.showThumbnails?(y(),T("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":t.item.previewUrl??m(o).adapter.getPreviewUrl({path:t.item.path}),alt:t.item.basename,onTouchstart:U[0]||(U[0]=M=>M.preventDefault())},null,40,iN)):(y(),ne(Fp,{key:1,item:t.item,ext:!0,view:t.view},{icon:we(M=>[Ve(P.$slots,"icon",wn(Jn(M)))]),_:3},8,["item","view"]))]),g("span",oN,L(m(Xl)(t.item.basename)),1)])):(y(),T("div",rN,[g("div",sN,[g("div",aN,[j(Fp,{item:t.item,view:t.view},{icon:we(M=>[Ve(P.$slots,"icon",wn(Jn(M)))]),_:3},8,["item","view"])]),g("span",lN,L(t.item.basename),1),g("div",null,[m(r).isReadOnly(t.item)?(y(),ne(m(Lp),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):ue("",!0)])]),t.showPath?(y(),T("div",cN,L(t.item.path),1)):ue("",!0),t.showPath?ue("",!0):(y(),T("div",uN,[t.item.file_size?(y(),T("div",dN,L(m(o).filesize(t.item.file_size)),1)):ue("",!0)])),!t.showPath&&t.item.last_modified?(y(),T("div",hN,L(new Date(t.item.last_modified*1e3).toLocaleString()),1)):ue("",!0)])),m(C)("pinned")&&m(s).get("pinnedFolders").find(M=>M.path===t.item.path)?(y(),ne(m(pu),{key:2,class:"vuefinder__item--pinned"})):ue("",!0)],46,eN))}}),fN=["data-row"],jp=Ce({__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(t,{emit:e}){const n=t,i=e,o=te(()=>[n.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),r=te(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${n.rowHeight}px`,transform:`translateY(${n.rowIndex*n.rowHeight}px)`})),s=te(()=>n.view==="grid"?{gridTemplateColumns:`repeat(${n.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(a,l)=>(y(),T("div",{class:Ae(o.value),"data-row":t.rowIndex,style:At(r.value)},[g("div",{class:Ae(["grid justify-self-start",{"w-full":t.view==="list"}]),style:At(s.value)},[(y(!0),T(Ie,null,He(t.items,(c,u)=>(y(),ne(pN,We({key:c.path,item:c,view:t.view,"show-thumbnails":t.showThumbnails,"show-path":t.showPath,"is-selected":t.isSelected(c.path),"is-dragging":t.isDraggingItem(c.path),"row-index":t.rowIndex,"col-index":u,"explorer-id":t.explorerId},bn(t.dragNDropEvents(c)),{onClick:l[0]||(l[0]=d=>i("click",d)),onDblclick:l[1]||(l[1]=d=>i("dblclick",d)),onContextmenu:l[2]||(l[2]=d=>i("contextmenu",d)),onDragstart:l[3]||(l[3]=d=>i("dragstart",d)),onDragend:l[4]||(l[4]=d=>i("dragend",d))}),{icon:we(d=>[Ve(a.$slots,"icon",We({ref_for:!0},d))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,fN))}}),mN={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function vN(t,e){return y(),T("svg",mN,[...e[0]||(e[0]=[g("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 gN={render:vN},_N={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function yN(t,e){return y(),T("svg",_N,[...e[0]||(e[0]=[g("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 bN={render:yN},Qa=Ce({__name:"SortIcon",props:{direction:{}},setup(t){return(e,n)=>(y(),T("div",null,[t.direction==="asc"?(y(),ne(m(gN),{key:0,class:"vuefinder__explorer__sort-icon"})):ue("",!0),t.direction==="desc"?(y(),ne(m(bN),{key:1,class:"vuefinder__explorer__sort-icon"})):ue("",!0)]))}}),wN={class:"vuefinder__explorer__header"},EN=Ce({__name:"ExplorerHeader",setup(t){const e=je(),n=e.fs,{t:i}=e.i18n,o=ke(n.sort);return(r,s)=>(y(),T("div",wN,[g("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:s[0]||(s[0]=a=>m(n).toggleSort("basename"))},[Ke(L(m(i)("Name"))+" ",1),it(j(Qa,{direction:m(o).order},null,8,["direction"]),[[En,m(o).active&&m(o).column==="basename"]])]),g("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:s[1]||(s[1]=a=>m(n).toggleSort("file_size"))},[Ke(L(m(i)("Size"))+" ",1),it(j(Qa,{direction:m(o).order},null,8,["direction"]),[[En,m(o).active&&m(o).column==="file_size"]])]),g("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:s[2]||(s[2]=a=>m(n).toggleSort("last_modified"))},[Ke(L(m(i)("Date"))+" ",1),it(j(Qa,{direction:m(o).order},null,8,["direction"]),[[En,m(o).active&&m(o).column==="last_modified"]])])]))}});function CN(t,e){const{scrollContainer:n,itemWidth:i=100,rowHeight:o,overscan:r=2,containerPadding:s=48,lockItemsPerRow:a}=e,l=t,c=()=>typeof o=="number"?o:o.value,u=()=>i?typeof i=="number"?i:i.value:100,d=()=>s?typeof s=="number"?s:s.value:0,h=H(0),v=H(6),f=H(600);let p=null;const _=te(()=>Math.ceil(l.value.length/v.value)),C=te(()=>_.value*c()),w=te(()=>{const P=c(),U=Math.max(0,Math.floor(h.value/P)-r),M=Math.min(_.value,Math.ceil((h.value+f.value)/P)+r);return{start:U,end:M}}),E=te(()=>{const{start:P,end:U}=w.value;return Array.from({length:U-P},(M,q)=>P+q)}),b=()=>f.value,S=()=>typeof a=="object"?a.value:!1,x=()=>{if(S()){v.value=1;return}if(n.value){const P=d(),U=n.value.clientWidth-P,M=u();M>0&&(v.value=Math.max(Math.floor(U/M),2))}},k=P=>{const U=P.target;h.value=U.scrollTop};Oe(()=>l.value.length,()=>{x()}),i&&typeof i!="number"&&Oe(i,()=>{x()}),s&&typeof s!="number"&&Oe(s,()=>{x()}),o&&typeof o!="number"&&Oe(o,()=>{});const O=(P,U)=>{if(!P||!Array.isArray(P))return[];const M=U*v.value;return P.slice(M,M+v.value)},K=(P,U,M,q,le)=>{if(!P||!Array.isArray(P))return[];const de=[];for(let Y=U;Y<=M;Y++)for(let I=q;I<=le;I++){const A=Y*v.value+I;A<P.length&&P[A]&&de.push(P[A])}return de},D=P=>({row:Math.floor(P/v.value),col:P%v.value});return et(async()=>{await Ge(),n.value&&(f.value=n.value.clientHeight||600),x(),window.addEventListener("resize",()=>{n.value&&(f.value=n.value.clientHeight||600),x()}),n.value&&"ResizeObserver"in window&&(p=new ResizeObserver(P=>{const U=P[0];U&&(f.value=Math.round(U.contentRect.height)),x()}),p.observe(n.value))}),Ct(()=>{window.removeEventListener("resize",x),p&&(p.disconnect(),p=null)}),{scrollTop:h,itemsPerRow:v,totalRows:_,totalHeight:C,visibleRange:w,visibleRows:E,updateItemsPerRow:x,handleScroll:k,getRowItems:O,getItemsInRange:K,getItemPosition:D,getContainerHeight:b}}function SN(t){const{itemsPerRow:e,totalHeight:n,getItemsInRange:i,getKey:o,selectionObject:r,rowHeight:s,itemWidth:a,osInstance:l}=t,c=()=>typeof a=="number"?a:a.value,u=Math.floor(Math.random()*2**32).toString(),d=je(),h=d.fs,v=ke(h.selectedKeys),f=ke(h.sortedFiles),p=te(()=>{const I=new Map;return f.value&&f.value.forEach(A=>{I.set(o(A),A)}),I}),_=H(new Set),C=H(!1),w=H(!1),E=I=>I.map(A=>A.getAttribute("data-key")).filter(A=>!!A),b=I=>{I.selection.clearSelection(!0,!0)},S=I=>{if(v.value&&v.value.size>0){const A=document.querySelectorAll(`.file-item-${u}[data-key]`),Q=new Map;A.forEach(ie=>{const ve=ie.getAttribute("data-key");ve&&Q.set(ve,ie)});const z=[];v.value.forEach(ie=>{const ve=Q.get(ie);ve&&x(ie)&&z.push(ve)}),z.forEach(ie=>{I.selection.select(ie,!0)})}},x=I=>{const A=p.value.get(I);if(!A)return!1;const Q=d.selectionFilterType,z=d.selectionFilterMimeIncludes;return Q==="files"&&A.type==="dir"||Q==="dirs"&&A.type==="file"?!1:z&&Array.isArray(z)&&z.length>0?A.type==="dir"?!0:A.mime_type?z.some(ie=>A.mime_type?.startsWith(ie)):!1:!0},k=I=>{if(d.selectionMode==="single")return!1;C.value=!1,!I.event?.metaKey&&!I.event?.ctrlKey&&(w.value=!0),I.selection.resolveSelectables(),b(I),S(I)},O=H(0),K=({event:I,selection:A})=>{O.value=(r.value?.getAreaLocation().y1??0)-(d.root.getBoundingClientRect().top??0);const Q=document.querySelector(".selection-area-container");if(Q&&(Q.dataset.theme=d.theme.current),d.selectionMode==="single")return;const z=I;z&&"type"in z&&z.type==="touchend"&&z.preventDefault();const ie=I;!ie?.ctrlKey&&!ie?.metaKey&&(h.clearSelection(),A.clearSelection(!0,!0)),_.value.clear()},D=I=>{if(d.selectionMode==="single")return;const A=E(I.store.changed.added),Q=E(I.store.changed.removed);w.value=!1,C.value=!0,A.forEach(z=>{v.value&&!v.value.has(z)&&x(z)&&(_.value.add(z),h.select(z,d.selectionMode||"multiple"))}),Q.forEach(z=>{document.querySelector(`[data-key="${z}"]`)&&p.value.has(z)&&_.value.delete(z),h.deselect(z)}),I.selection.resolveSelectables(),S(I)},P=()=>{_.value.clear()},U=I=>{if(!I.event)return;const A=document.querySelector(".scroller-"+u);if(!A)return;const Q=A.getBoundingClientRect(),z=Q.left,ie=Q.top;let ve=A.scrollTop;if(l?.value){const{viewport:ft}=l.value.elements();ft&&(ve=ft.scrollTop)}const re=r.value?.getAreaLocation();if(!re)return;const ge=Math.min(re.x1,re.x2),_e=ve+Math.min(re.y1,re.y2),R=Math.max(re.x1,re.x2),$=ve+Math.max(re.y1,re.y2),N=4,F=c();let B=Math.floor((ge-z-N)/F),oe=Math.floor((R-z-N)/F);const ee=ge-z-N-B*F,G=R-z-N-oe*F;ee>F-N&&(B=B+1),G<N&&(oe=oe-1);const he=Math.max(0,B),me=Math.min(e.value-1,oe);let $e=Math.floor((_e-ie-N)/s.value),Se=Math.floor(($-ie-N)/s.value);const Ne=_e-ie-N-$e*s.value,Pe=$-ie-N-Se*s.value,Ue=Math.floor((n.value-N)/s.value);Ne>s.value-N&&($e=$e+1),Pe<N&&(Se=Se-1);const ut=Math.max(0,$e),Qe=Math.min(Se,Ue),at=i(f.value,ut,Qe,he,me),tt=document.querySelectorAll(`.file-item-${u}[data-key]`),pt=new Map;tt.forEach(ft=>{const Dt=ft.getAttribute("data-key");Dt&&pt.set(Dt,ft)});const dt=[];if(at.forEach(ft=>{const Dt=o(ft);pt.get(Dt)||dt.push(Dt)}),dt.length>0){const ft=d.selectionMode||"multiple";h.selectMultiple(dt,ft)}},M=I=>{U(I),b(I),S(I),h.setSelectedCount(v.value?.size||0),C.value=!1},q=()=>{let I=[".scroller-"+u];if(l?.value){const{viewport:A}=l.value.elements();A&&(I=A)}r.value=new WI({selectables:[".file-item-"+u+":not(.vf-explorer-item--unselectable)"],boundaries:I,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"}}}),r.value.on("beforestart",k),r.value.on("start",K),r.value.on("move",D),r.value.on("stop",M)},le=()=>{r.value&&(r.value.destroy(),r.value=null)},de=()=>{r.value&&(Array.from(v.value??new Set).forEach(I=>{x(I)||h.deselect(I)}),le(),q())},Y=I=>{w.value&&(r.value?.clearSelection(),P(),w.value=!1);const A=I;!_.value.size&&!w.value&&!A?.ctrlKey&&!A?.metaKey&&(h.clearSelection(),r.value?.clearSelection())};return et(()=>{const I=A=>{!A.buttons&&C.value&&(C.value=!1)};document.addEventListener("dragleave",I),Ct(()=>{document.removeEventListener("dragleave",I)})}),{explorerId:u,isDragging:C,initializeSelectionArea:q,updateSelectionArea:de,handleContentClick:Y}}function xN(t){const e=n=>{if(!n)return{typeAllowed:!1,mimeAllowed:!1};const i=t.selectionFilterType,o=t.selectionFilterMimeIncludes,r=!i||i==="both"||i==="files"&&n.type==="file"||i==="dirs"&&n.type==="dir";let s=!0;return o&&Array.isArray(o)&&o.length>0&&(n.type==="dir"?s=!0:n.mime_type?s=o.some(a=>n.mime_type.startsWith(a)):s=!1),{typeAllowed:r,mimeAllowed:s}};return{isItemSelectable:e,canSelectItem:n=>{const{typeAllowed:i,mimeAllowed:o}=e(n);return i&&o}}}function TN(t){const e=n=>({item:n,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:e,openItem:(n,i,o)=>{const r=e(n);if(n.type==="file"&&i){if(t.emitter.emit("vf-file-dclick",r),r.defaultPrevented)return}else if(n.type==="dir"&&o&&(t.emitter.emit("vf-folder-dclick",r),r.defaultPrevented))return;const s=t.contextMenuItems?.find(a=>a.show(t,{items:[n],target:n,searchQuery:""}));s&&s.action(t,[n])}}}function ON(t,e,n,i,o,r,s){const a=t.fs,{canSelectItem:l}=xN(t),{openItem:c}=TN(t),u=h=>{const v=h.target?.closest(".file-item-"+e);if(!v)return null;const f=String(v.getAttribute("data-key")),p=n.value?.find(_=>_.path===f);return{key:f,item:p}},d=()=>{const h=i.value;return n.value?.filter(v=>h?.has(v.path))||[]};return{handleItemClick:h=>{const v=u(h);if(!v)return;const{key:f,item:p}=v,_=h;if(!l(p))return;const C=t.selectionMode||"multiple";!_?.ctrlKey&&!_?.metaKey&&(h.type!=="touchstart"||!a.isSelected(f))&&(a.clearSelection(),o.value?.clearSelection(!0,!0)),o.value?.resolveSelectables(),h.type==="touchstart"&&a.isSelected(f)?a.select(f,C):a.toggleSelect(f,C),a.setSelectedCount(i.value?.size||0)},handleItemDblClick:h=>{const v=u(h);if(!v)return;const{item:f}=v;l(f)&&f&&c(f,r,s)},handleItemContextMenu:h=>{h.preventDefault(),h.stopPropagation();const v=u(h);if(!v)return;const{key:f,item:p}=v;l(p)&&(i.value?.has(f)||(a.clearSelection(),a.select(f)),t.emitter.emit("vf-contextmenu-show",{event:h,items:d(),target:p}))},handleContentContextMenu:h=>{h.preventDefault(),t.emitter.emit("vf-contextmenu-show",{event:h,items:d()})},getSelectedItems:d}}function $N(t,e){const n=H(null);return et(()=>{if(hn.plugin([mI]),t.value){const i=hn(t.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:o=>{n.value=o;const{viewport:r}=o.elements();r&&r.addEventListener("scroll",e)},updated:o=>{const{viewport:r}=o.elements()}});n.value=i}}),Ct(()=>{if(n.value){const{viewport:i}=n.value.elements();i&&i.removeEventListener("scroll",e),n.value.destroy(),n.value=null}}),{osInstance:n}}function kN(t,e){const n=H(null);return et(()=>{t.value&&(n.value=new Hi({elements_selector:".lazy",container:t.value})),e?.emitter&&e.emitter.on("vf-refresh-thumbnails",()=>{n.value&&n.value.update()})}),Vp(()=>{n.value&&n.value.update()}),Ct(()=>{n.value&&(n.value.destroy(),n.value=null)}),{vfLazyLoad:n}}const AN={class:"vuefinder__explorer__container"},PN={key:0,class:"vuefinder__linear-loader"},RN=Ce({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(t){const e=t,n=je(),i=cr(n,["vuefinder__drag-over"]),o=In("dragImage"),r=Yo(null),s=In("scrollContainer"),a=In("scrollContent"),l=n.fs,c=n.config,u=ke(c.state),d=ke(l.sortedFiles),h=ke(l.selectedKeys),v=ke(l.loading),f=F=>h.value?.has(F)??!1,p=te(()=>{if(u.value?.view==="grid"){const oe=u.value?.gridItemHeight??80,ee=u.value?.gridItemGap??8;return oe+ee*2}const F=u.value?.listItemHeight??32,B=u.value?.listItemGap??2;return F+B*2}),_=te(()=>{if(u.value?.view==="grid"){const F=u.value?.gridItemWidth??96,B=u.value?.gridItemGap??8;return F+B*2}return 104}),C=te(()=>u.value?.view==="grid"?(u.value?.gridItemGap??8)*2:0),{t:w}=n.i18n,{itemsPerRow:E,totalHeight:b,visibleRows:S,handleScroll:x,getRowItems:k,getItemsInRange:O,updateItemsPerRow:K}=CN(te(()=>d.value??[]),{scrollContainer:s,itemWidth:_,rowHeight:p,overscan:2,containerPadding:C,lockItemsPerRow:te(()=>u.value.view==="list")}),{osInstance:D}=$N(s,x),{explorerId:P,isDragging:U,initializeSelectionArea:M,updateSelectionArea:q,handleContentClick:le}=SN({itemsPerRow:E,totalHeight:b,getItemsInRange:O,getKey:F=>F.path,selectionObject:r,rowHeight:p,itemWidth:_,osInstance:D}),de=H(null),Y=F=>{if(!F||!de.value)return!1;const B=h.value?.has(de.value)??!1;return U.value&&(B?h.value?.has(F)??!1:F===de.value)};Oe(()=>c.get("view"),F=>{F==="list"?E.value=1:K()},{immediate:!0}),Oe(E,F=>{c.get("view")==="list"&&F!==1&&(E.value=1)});const I=F=>d.value?.[F];kN(s,n);const{handleItemClick:A,handleItemDblClick:Q,handleItemContextMenu:z,handleContentContextMenu:ie}=ON(n,P,d,h,r,e.onFileDclick,e.onFolderDclick);et(()=>{const F=()=>{r.value||M(),r.value&&r.value.on("beforestart",({event:B})=>{const oe=B?.target===a.value;if(!B?.metaKey&&!B?.ctrlKey&&!B?.altKey&&!oe)return!1})};if(D.value)F();else{const B=setInterval(()=>{D.value&&(clearInterval(B),F())},50);setTimeout(()=>{clearInterval(B),r.value||F()},500)}Oe(()=>[n.selectionFilterType,n.selectionFilterMimeIncludes],q,{deep:!0})});const ve=F=>{if(!(n.features?.move??!1)||F.altKey||F.ctrlKey||F.metaKey)return F.preventDefault(),!1;U.value=!0;const B=F.target?.closest(".file-item-"+P);if(de.value=B?String(B.dataset.key):null,F.dataTransfer&&de.value){F.dataTransfer.setDragImage(o.value,0,15),F.dataTransfer.effectAllowed="all",F.dataTransfer.dropEffect="copy";const oe=h.value?.has(de.value)?Array.from(h.value):[de.value];F.dataTransfer.setData("items",JSON.stringify(oe)),l.setDraggedItem(de.value)}},re=()=>{de.value=null};let ge=null,_e=null;const R=F=>{F.target?.closest(".file-item-"+P)||(_e=F,ge&&clearTimeout(ge),ge=setTimeout(()=>{_e&&(_e.cancelable&&_e.preventDefault(),_e.stopPropagation(),ie(_e)),_e=null,ge=null},500))},$=F=>{ge&&(clearTimeout(ge),ge=null),_e=null},N=F=>{if(!_e)return;const B=_e.touches[0]||_e.changedTouches[0],oe=F.touches[0]||F.changedTouches[0];if(B&&oe){const ee=Math.abs(oe.clientX-B.clientX),G=Math.abs(oe.clientY-B.clientY);(ee>15||G>15)&&(ge&&(clearTimeout(ge),ge=null),_e=null)}};return(F,B)=>(y(),T("div",AN,[m(u).view==="list"?(y(),ne(EN,{key:0})):ue("",!0),g("div",{ref_key:"scrollContainer",ref:s,class:Ae(["vuefinder__explorer__selector-area","scroller-"+m(P)])},[m(c).get("loadingIndicator")==="linear"&&m(v)?(y(),T("div",PN)):ue("",!0),g("div",{ref_key:"scrollContent",ref:a,class:"scrollContent vuefinder__explorer__scroll-content",style:At({height:`${m(b)}px`,position:"relative",width:"100%"}),onContextmenu:B[0]||(B[0]=Ye((...oe)=>m(ie)&&m(ie)(...oe),["self","prevent"])),onClick:B[1]||(B[1]=Ye((...oe)=>m(le)&&m(le)(...oe),["self"])),onTouchstartCapture:Ye(R,["self"]),onTouchendCapture:Ye($,["self"]),onTouchmoveCapture:Ye(N,["self"]),onTouchcancelCapture:Ye($,["self"])},[g("div",{ref_key:"dragImage",ref:o,class:"vuefinder__explorer__drag-item"},[j(Q3,{count:de.value&&m(h).has(de.value)?m(h).size:1},null,8,["count"])],512),m(u).view==="grid"?(y(!0),T(Ie,{key:0},He(m(S),oe=>(y(),ne(jp,{key:oe,"row-index":oe,"row-height":p.value,view:"grid","items-per-row":m(E),items:m(k)(m(d),oe),"show-thumbnails":m(u).showThumbnails,"is-dragging-item":Y,"is-selected":f,"drag-n-drop-events":ee=>m(i).events(ee),"explorer-id":m(P),onClick:m(A),onDblclick:m(Q),onContextmenu:m(z),onDragstart:ve,onDragend:re},{icon:we(ee=>[Ve(F.$slots,"icon",We({ref_for:!0},ee))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(y(!0),T(Ie,{key:1},He(m(S),oe=>(y(),ne(jp,{key:oe,"row-index":oe,"row-height":p.value,view:"list",items:I(oe)?[I(oe)]:[],"is-dragging-item":Y,"is-selected":f,"drag-n-drop-events":ee=>m(i).events(ee),"explorer-id":m(P),onClick:m(A),onDblclick:m(Q),onContextmenu:m(z),onDragstart:ve,onDragend:re},{icon:we(ee=>[Ve(F.$slots,"icon",We({ref_for:!0},ee))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),IN=["href","download"],MN=["onClick"],DN=Ce({__name:"ContextMenu",setup(t){const e=je(),n=H(null),i=H([]);let o=null,r=null,s=null,a=[],l=null;const c=Mt({active:!1,items:[],positions:{}});e.emitter.on("vf-context-selected",v=>{i.value=v});const u=v=>v.link(e,i.value),d=v=>{e.emitter.emit("vf-contextmenu-hide"),v.action(e,i.value)};e.emitter.on("vf-contextmenu-show",v=>{const{event:f,items:p,target:_=null}=v||{};c.items=(e.contextMenuItems||[]).filter(C=>C.show(e,{items:p,target:_})).sort((C,w)=>{const E=C.order??1/0,b=w.order??1/0;return E-b}),_?p.length>1&&p.some(C=>C.path===_.path)?e.emitter.emit("vf-context-selected",p):e.emitter.emit("vf-context-selected",[_]):e.emitter.emit("vf-context-selected",[]),h(f)}),e.emitter.on("vf-contextmenu-hide",()=>{c.active=!1,o&&(o(),o=null),s&&(a.forEach(v=>{v===window?window.removeEventListener("scroll",s,!0):v.removeEventListener("scroll",s,!0)}),s=null,a=[]),l&&(document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),l=null),r=null,c.positions={}});const h=async v=>{o&&(o(),o=null);const f=(b=>{if("clientX"in b&&"clientY"in b)return{x:b.clientX,y:b.clientY};const S="touches"in b&&b.touches[0]||"changedTouches"in b&&b.changedTouches[0];return S?{x:S.clientX,y:S.clientY}:{x:0,y:0}})(v);if(r={getBoundingClientRect:()=>({width:0,height:0,x:f.x,y:f.y,top:f.y,left:f.x,right:f.x,bottom:f.y})},c.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},c.active=!0,await Ge(),!n.value||!r)return;await new Promise(b=>{requestAnimationFrame(()=>{requestAnimationFrame(b)})});const p=[Po(8),Ro({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),Io({padding:16})];let _=0,C=0;try{const b=await Zi(r,n.value,{placement:"right-start",strategy:"fixed",middleware:p});_=b.x,C=b.y}catch(b){console.warn("[ContextMenu] Floating UI initial positioning error:",b);return}c.positions={position:"fixed",zIndex:"10001",left:`${_}px`,top:`${C}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{n.value&&(c.positions={...c.positions,opacity:"1",transform:"translateY(0)"})});const w=(b=>{const S=[];let x=b;for(;x&&x!==document.body&&x!==document.documentElement;){const k=window.getComputedStyle(x),O=k.overflow+k.overflowX+k.overflowY;(O.includes("scroll")||O.includes("auto"))&&S.push(x),x=x.parentElement}return S})(n.value);a=[window,...w],s=()=>{c.active&&e.emitter.emit("vf-contextmenu-hide")};const E=s;E&&a.forEach(b=>{b===window?window.addEventListener("scroll",E,!0):b.addEventListener("scroll",E,!0)}),l=b=>{if(!c.active)return;const S=b.target;if(!S||n.value&&n.value.contains(S))return;const x=e.root;x&&x.contains(S)||e.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{l&&(document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0))},100),setTimeout(()=>{if(!(!n.value||!r))try{o=oc(r,n.value,async()=>{if(!(!r||!n.value))try{const{x:b,y:S}=await Zi(r,n.value,{placement:"right-start",strategy:"fixed",middleware:p});c.positions={...c.positions,left:`${b}px`,top:`${S}px`}}catch(b){console.warn("Floating UI positioning error:",b)}})}catch(b){console.warn("Floating UI autoUpdate setup error:",b),o=null}},200)};return Ct(()=>{o&&(o(),o=null),s&&(a.forEach(v=>{v===window?window.removeEventListener("scroll",s,!0):v.removeEventListener("scroll",s,!0)}),s=null,a=[]),l&&(document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),l=null),r=null}),(v,f)=>it((y(),T("ul",{ref_key:"contextmenu",ref:n,class:Ae([{"vuefinder__context-menu--active":c.active,"vuefinder__context-menu--inactive":!c.active},"vuefinder__context-menu"]),style:At(c.positions)},[(y(!0),T(Ie,null,He(c.items,p=>(y(),T("li",{key:p.title,class:"vuefinder__context-menu__item"},[p.link?(y(),T("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:u(p),download:u(p),onClick:f[0]||(f[0]=_=>m(e).emitter.emit("vf-contextmenu-hide"))},[g("span",null,L(p.title(m(e).i18n)),1)],8,IN)):(y(),T("div",{key:1,class:"vuefinder__context-menu__action",onClick:_=>d(p)},[g("span",null,L(p.title(m(e).i18n)),1)],8,MN))]))),128))],6)),[[En,c.active]])}}),FN={class:"vuefinder__status-bar__wrapper"},LN={class:"vuefinder__status-bar__storage"},jN=["title"],NN={class:"vuefinder__status-bar__storage-icon"},UN=["value"],zN=["value"],VN={class:"vuefinder__status-bar__info space-x-2"},BN={key:0},HN={key:1},qN={key:0,class:"vuefinder__status-bar__size"},WN={class:"vuefinder__status-bar__actions"},KN=Ce({__name:"Statusbar",setup(t){const e=je(),{t:n}=e.i18n,i=e.fs,o=ke(i.sortedFiles),r=ke(i.path),s=ke(i.selectedCount),a=ke(i.storages),l=ke(i.selectedItems),c=ke(i.path),u=_=>{const C=_.target.value;e.adapter.open(C+"://")},d=te(()=>!l.value||l.value.length===0?0:l.value.reduce((_,C)=>_+(C.file_size||0),0)),h=te(()=>a.value),v=te(()=>o.value),f=te(()=>s.value||0),p=te(()=>l.value||[]);return(_,C)=>(y(),T("div",FN,[g("div",LN,[g("div",{class:"vuefinder__status-bar__storage-container",title:m(n)("Storage")},[g("div",NN,[j(m(fu))]),g("select",{name:"vuefinder-media-selector",value:m(r).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:u},[(y(!0),T(Ie,null,He(h.value,w=>(y(),T("option",{key:w,value:w},L(w),9,zN))),128))],40,UN),C[0]||(C[0]=g("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,jN),g("div",VN,[f.value===0?(y(),T("span",BN,L(v.value.length)+" "+L(m(n)("items")),1)):(y(),T("span",HN,[Ke(L(f.value)+" "+L(m(n)("selected"))+" ",1),d.value?(y(),T("span",qN,L(m(e).filesize(d.value)),1)):ue("",!0)]))])]),g("div",WN,[Ve(_.$slots,"actions",{path:m(c).path,count:f.value||0,selected:p.value})])]))}}),YN={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function GN(t,e){return y(),T("svg",YN,[...e[0]||(e[0]=[g("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),g("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 QN={render:GN};function s_(t,e){const n=t.findIndex(i=>i.path===e.path);n>-1?t[n]=e:t.push(e)}const XN={class:"vuefinder__folder-loader-indicator"},JN={key:1,class:"vuefinder__folder-loader-indicator--icon"},a_=Ce({__name:"FolderLoaderIndicator",props:zp({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=je(),i=Zl(t,"modelValue"),o=H(!1);Oe(()=>i.value,()=>r());const r=async()=>{o.value=!0;try{const s=(await n.adapter.list(e.path)).files.filter(a=>a.type==="dir");s_(n.treeViewData,{path:e.path,type:"dir",folders:s})}catch(s){Yt(s,"Failed to fetch subfolders")}finally{o.value=!1}};return(s,a)=>(y(),T("div",XN,[o.value?(y(),ne(m(Zs),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(y(),T("div",JN,[i.value?(y(),ne(m(Js),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):ue("",!0),i.value?ue("",!0):(y(),ne(m(Xs),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),ZN={key:0},eU={class:"vuefinder__treesubfolderlist__no-folders"},tU={class:"vuefinder__treesubfolderlist__item-content"},nU=["onClick"],iU=["title","onDblclick","onClick"],oU={class:"vuefinder__treesubfolderlist__item-icon"},rU={class:"vuefinder__treesubfolderlist__subfolder"},sU={key:1,class:"vuefinder__treesubfolderlist__more-note"},aU=Ce({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(t){const e=je(),n=e.fs,i=cr(e,["vuefinder__drag-over"]),o=H({}),r=e.config,s=ke(r.state),{t:a}=e.i18n,l=ke(n.path),c=t,u=H(null),d=H(50);et(()=>{c.path===c.storage+"://"&&u.value&&hn(u.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const h=te(()=>{const w=e.treeViewData.find(E=>E.path===c.path)?.folders||[];return w.length>d.value?w.slice(0,d.value):w}),v=te(()=>e.treeViewData.find(w=>w.path===c.path)?.folders?.length||0),f=te(()=>v.value>d.value),p=te(()=>`${c.storage}://`),_=(w,E)=>w===E||w.startsWith(`${E}/`);Oe(h,w=>{const E=s.value.expandTreeByDefault&&c.path===p.value,b=s.value.expandedTreePaths||[];w.forEach(S=>{const x=b.some(k=>_(k,S.path));(E||x)&&o.value[S.path]===void 0&&(o.value[S.path]=!0)})},{immediate:!0});const C=()=>{d.value+=50};return(w,E)=>{const b=ze("TreeSubfolderList",!0);return y(),T("ul",{ref_key:"parentSubfolderList",ref:u,class:"vuefinder__treesubfolderlist__container"},[h.value.length?ue("",!0):(y(),T("li",ZN,[g("div",eU,L(m(a)("No folders")),1)])),(y(!0),T(Ie,null,He(h.value,S=>(y(),T("li",{key:S.path,class:"vuefinder__treesubfolderlist__item"},[g("div",tU,[g("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:x=>o.value[S.path]=!o.value[S.path]},[j(a_,{modelValue:o.value[S.path],"onUpdate:modelValue":x=>o.value[S.path]=x,storage:t.storage,path:S.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,nU),g("div",We({class:"vuefinder__treesubfolderlist__item-link",title:S.path},bn(m(i).events({...S,dir:S.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:x=>o.value[S.path]=!o.value[S.path],onClick:x=>m(e).adapter.open(S.path)}),[g("div",oU,[m(l)?.path===S.path?(y(),ne(m(mu),{key:0,class:"vuefinder__item-icon__folder--open"})):(y(),ne(m(Nn),{key:1,class:"vuefinder__item-icon__folder"}))]),g("div",{class:Ae(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":m(l).path===S.path}])},L(S.basename),3)],16,iU)]),g("div",rU,[it(j(b,{storage:c.storage,path:S.path},null,8,["storage","path"]),[[En,o.value[S.path]]])])]))),128)),f.value?(y(),T("li",sU,[g("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:C},L(m(a)("load more")),1)])):ue("",!0)],512)}}}),lU=Ce({__name:"TreeStorageItem",props:{storage:{}},setup(t){const e=je(),n=e.fs,i=e.config,o=t,r=ke(i.state),s=te(()=>{const v=r.value.expandedTreePaths||[],f=`${o.storage}://`;return v.some(p=>p===f||p.startsWith(`${f}`))}),a=H(r.value.expandTreeByDefault||s.value),l=cr(e,["vuefinder__drag-over"]),c=ke(n.path),u=te(()=>o.storage===c.value?.storage);Oe(()=>({expandTreeByDefault:r.value.expandTreeByDefault,hasExpandedPathInStorage:s.value}),v=>{(v.expandTreeByDefault||v.hasExpandedPathInStorage)&&(a.value=!0)});const d={storage:o.storage,path:o.storage+"://",dir:o.storage+"://",type:"dir",basename:o.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function h(v){v===c.value?.storage?a.value=!a.value:e.adapter.open(v+"://")}return(v,f)=>(y(),T(Ie,null,[g("div",{class:"vuefinder__treestorageitem__header",onClick:f[2]||(f[2]=p=>h(t.storage))},[g("div",We({class:["vuefinder__treestorageitem__info",u.value?"vuefinder__treestorageitem__info--active":""]},bn(m(l).events(d),!0)),[g("div",{class:Ae(["vuefinder__treestorageitem__icon",u.value?"vuefinder__treestorageitem__icon--active":""])},[j(m(fu))],2),g("div",null,L(t.storage),1)],16),g("div",{class:"vuefinder__treestorageitem__loader",onClick:f[1]||(f[1]=Ye(p=>a.value=!a.value,["stop"]))},[j(a_,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=p=>a.value=p),storage:t.storage,path:t.storage+"://"},null,8,["modelValue","storage","path"])])]),it(j(aU,{storage:t.storage,path:t.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[En,a.value]])],64))}}),cU={class:"vuefinder__folder-indicator"},uU={class:"vuefinder__folder-indicator--icon"},dU=Ce({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=Zl(t,"modelValue");return(n,i)=>(y(),T("div",cU,[g("div",uU,[e.value?(y(),ne(m(Js),{key:0,class:"vuefinder__folder-indicator--minus"})):ue("",!0),e.value?ue("",!0):(y(),ne(m(Xs),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),hU={key:0,class:"vuefinder__treeview__header"},pU={class:"vuefinder__treeview__pinned-label"},fU={class:"vuefinder__treeview__pin-text text-nowrap"},mU={key:0,class:"vuefinder__treeview__pinned-list"},vU=["onClick"],gU=["title"],_U=["onClick"],yU={key:0},bU={class:"vuefinder__treeview__no-pinned"},wU=Ce({__name:"TreeView",setup(t){const e=je(),{enabled:n}=Tn(),{t:i}=e.i18n,{getStore:o,setStore:r}=e.storage,s=e.fs,a=e.config,l=ke(a.state),c=ke(s.sortedFiles),u=ke(s.storages),d=te(()=>u.value||[]),h=ke(s.path),v=cr(e,["vuefinder__drag-over"]),f=H(190),p=H(o("pinned-folders-opened",!0));Oe(p,E=>r("pinned-folders-opened",E));const _=E=>{const b=a.get("pinnedFolders");a.set("pinnedFolders",b.filter(S=>S.path!==E.path))},C=E=>{const b=E.clientX,S=E.target.parentElement;if(!S)return;const x=S.getBoundingClientRect().width;S.classList.remove("transition-[width]"),S.classList.add("transition-none");const k=K=>{f.value=x+K.clientX-b,f.value<50&&(f.value=0,a.set("showTreeView",!1)),f.value>50&&a.set("showTreeView",!0)},O=()=>{const K=S.getBoundingClientRect();f.value=K.width,S.classList.add("transition-[width]"),S.classList.remove("transition-none"),window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",O)};window.addEventListener("mousemove",k),window.addEventListener("mouseup",O)},w=H(null);return et(()=>{w.value&&hn(w.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),Oe(c,E=>{const b=E.filter(S=>S.type==="dir");s_(e.treeViewData,{path:h.value.path||"",folders:b.map(S=>({storage:S.storage,path:S.path,basename:S.basename,type:"dir"}))})}),(E,b)=>(y(),T(Ie,null,[g("div",{class:Ae(["vuefinder__treeview__overlay",m(l).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:b[0]||(b[0]=S=>m(a).toggle("showTreeView"))},null,2),g("div",{style:At(m(l).showTreeView?"min-width:100px;max-width:75%; width: "+f.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[g("div",{ref_key:"treeViewScrollElement",ref:w,class:"vuefinder__treeview__scroll"},[m(n)("pinned")?(y(),T("div",hU,[g("div",{class:"vuefinder__treeview__pinned-toggle",onClick:b[2]||(b[2]=S=>p.value=!p.value)},[g("div",pU,[j(m(pu),{class:"vuefinder__treeview__pin-icon"}),g("div",fU,L(m(i)("Pinned Folders")),1)]),j(dU,{modelValue:p.value,"onUpdate:modelValue":b[1]||(b[1]=S=>p.value=S)},null,8,["modelValue"])]),p.value?(y(),T("ul",mU,[(y(!0),T(Ie,null,He(m(l).pinnedFolders,S=>(y(),T("li",{key:S.path,class:"vuefinder__treeview__pinned-item"},[g("div",We({class:"vuefinder__treeview__pinned-folder"},bn(m(v).events(S),!0),{onClick:x=>m(e).adapter.open(S.path)}),[m(h).path!==S.path?(y(),ne(m(Nn),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):ue("",!0),m(h).path===S.path?(y(),ne(m(mu),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):ue("",!0),g("div",{title:S.path,class:Ae(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":m(h).path===S.path}])},L(S.basename),11,gU)],16,vU),g("div",{class:"vuefinder__treeview__remove-folder",onClick:x=>_(S)},[j(m(QN),{class:"vuefinder__treeview__remove-icon"})],8,_U)]))),128)),m(l).pinnedFolders.length?ue("",!0):(y(),T("li",yU,[g("div",bU,L(m(i)("No folders pinned")),1)]))])):ue("",!0)])):ue("",!0),(y(!0),T(Ie,null,He(d.value,S=>(y(),T("div",{key:S,class:"vuefinder__treeview__storage"},[j(lU,{storage:S},null,8,["storage"])]))),128))],512),g("div",{class:"vuefinder__treeview__resize-handle",onMousedown:C},null,32)],4)],64))}}),xt={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function EU(t){return t.items.length>1&&t.items.some(e=>e.path===t.target?.path)?"many":t.target?"one":"none"}function mt(t){const e=Object.assign({needsSearchQuery:!1},t);return(n,i)=>!(e.needsSearchQuery!==!!i.searchQuery||e.target!==void 0&&e.target!==EU(i)||e.targetType!==void 0&&e.targetType!==i.target?.type||e.mimeType!==void 0&&e.mimeType!==i.target?.mime_type||e.feature!==void 0&&!(n.features[e.feature]??!1))}function Co(...t){return(e,n)=>t.some(i=>i(e,n))}function So(...t){return(e,n)=>t.every(i=>i(e,n))}const l_=[{id:xt.openDir,title:({t})=>t("Open containing folder"),action:(t,e)=>{const n=e[0];n&&t.adapter.open(n.dir)},show:mt({target:"one",needsSearchQuery:!0}),order:10},{id:xt.refresh,title:({t})=>t("Refresh"),action:t=>{const e=t.fs;t.adapter.invalidateListQuery(e.path.get().path),t.adapter.open(e.path.get().path)},show:Co(mt({target:"none"}),mt({target:"many"})),order:20},{id:xt.selectAll,title:({t})=>t("Select All"),action:t=>{t.fs.selectAll(t.selectionMode||"multiple")},show:(t,e)=>t.selectionMode==="multiple"&&mt({target:"none"})(t,e),order:30},{id:xt.new_folder,title:({t})=>t("New Folder"),action:t=>t.modal.open(bu),show:mt({target:"none",feature:"newfolder"}),order:40},{id:xt.open,title:({t})=>t("Open"),action:(t,e)=>{e[0]&&t.adapter.open(e[0].path)},show:mt({target:"one",targetType:"dir"}),order:50},{id:xt.pinFolder,title:({t})=>t("Pin Folder"),action:(t,e)=>{const n=t.config,i=n.get("pinnedFolders"),o=i.concat(e.filter(r=>i.findIndex(s=>s.path===r.path)===-1));n.set("pinnedFolders",o)},show:So(mt({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(n=>n.path===e.target?.path)===-1),order:60},{id:xt.unpinFolder,title:({t})=>t("Unpin Folder"),action:(t,e)=>{const n=t.config,i=n.get("pinnedFolders");n.set("pinnedFolders",i.filter(o=>!e.find(r=>r.path===o.path)))},show:So(mt({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(n=>n.path===e.target?.path)!==-1),order:70},{id:xt.preview,title:({t})=>t("Preview"),action:(t,e)=>t.modal.open(lr,{storage:e[0]?.storage,item:e[0]}),show:So(mt({target:"one",feature:"preview"}),(t,e)=>e.target?.type!=="dir"),order:80},{id:xt.download,link:(t,e)=>{if(e[0])return t.adapter.getDownloadUrl(e[0])},title:({t})=>t("Download"),action:()=>{},show:So(mt({target:"one",feature:"download"}),(t,e)=>e.target?.type!=="dir"),order:90},{id:xt.rename,title:({t})=>t("Rename"),action:(t,e)=>t.modal.open(Qs,{items:e}),show:mt({target:"one",feature:"rename"}),order:100},{id:xt.move,title:({t})=>t("Move files"),action:(t,e)=>{const n=t.fs,i={storage:n.path.get().storage||"",path:n.path.get().path||"",type:"dir"};t.modal.open(uo,{items:{from:e,to:i}})},show:Co(mt({target:"one",feature:"move"}),mt({target:"many",feature:"move"})),order:110},{id:xt.copy,title:({t})=>t("Copy"),action:(t,e)=>{e.length>0&&t.fs.setClipboard("copy",new Set(e.map(n=>n.path)))},show:Co(mt({target:"one",feature:"copy"}),mt({target:"many",feature:"copy"})),order:120},{id:xt.paste,title:({t})=>t("Paste"),action:(t,e)=>{const n=t.fs.getClipboard();if(n?.items?.size>0){const i=t.fs.path.get();let o=i.path,r=i.storage;e.length===1&&e[0]?.type==="dir"&&(o=e[0].path,r=e[0].storage);const s={storage:r||"",path:o||"",type:"dir"};t.modal.open(n.type==="cut"?uo:gu,{items:{from:Array.from(n.items),to:s}})}},show:(t,e)=>t.features?.copy??!1?t.fs.getClipboard()?.items?.size>0:!1,order:130},{id:xt.archive,title:({t})=>t("Archive"),action:(t,e)=>t.modal.open(Cu,{items:e}),show:Co(mt({target:"many",feature:"archive"}),So(mt({target:"one",feature:"archive"}),(t,e)=>e.target?.mime_type!=="application/zip")),order:140},{id:xt.unarchive,title:({t})=>t("Unarchive"),action:(t,e)=>t.modal.open(Eu,{items:e}),show:mt({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:xt.delete,title:({t})=>t("Delete"),action:(t,e)=>{t.modal.open(Gs,{items:e})},show:Co(mt({feature:"delete",target:"one"}),mt({feature:"delete",target:"many"})),order:160}],CU=["data-theme"],SU={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},xU={class:"vuefinder__external-drop-message"},TU={class:"vuefinder__main__content"},OU=Ce({__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(t,{emit:e}){const n=e,i=t,o=je(),r=In("root"),s=o.config;Oe(()=>i.features,w=>{const E=jg(w);Object.keys(o.features).forEach(b=>{delete o.features[b]}),Object.assign(o.features,E)},{deep:!0});const a=o.fs,l=ke(o.i18n.localeAtom),c=ke(s.state),u=te(()=>{const w=c.value;return{"--vf-grid-item-width":`${w.gridItemWidth}px`,"--vf-grid-item-height":`${w.gridItemHeight}px`,"--vf-grid-item-gap":`${w.gridItemGap}px`,"--vf-grid-icon-size":`${w.gridIconSize}px`,"--vf-list-item-height":`${w.listItemHeight}px`,"--vf-list-item-gap":`${w.listItemGap}px`,"--vf-list-icon-size":`${w.listIconSize}px`}});AL();const{isDraggingExternal:d,handleDragEnter:h,handleDragOver:v,handleDragLeave:f,handleDrop:p}=PL();function _(w){a.setPath(w.dirname),s.get("persist")&&s.set("path",w.dirname),a.setReadOnly(w.read_only??!1),o.modal.close(),a.setFiles(w.files),a.clearSelection(),a.setSelectedCount(0),a.setStorages(w.storages)}o.adapter.onBeforeOpen=()=>{a.setLoading(!0)},o.adapter.onAfterOpen=w=>{_(w),a.setLoading(!1)},o.emitter.on("vf-upload-complete",w=>{n("upload-complete",w)}),o.emitter.on("vf-delete-complete",w=>{n("delete-complete",w)}),o.emitter.on("vf-notify",w=>{n("notify",w)}),o.emitter.on("vf-file-dclick",w=>{n("file-dclick",w)}),o.emitter.on("vf-folder-dclick",w=>{n("folder-dclick",w)}),Oe(()=>i.config?.theme,w=>{w&&s.set("theme",m(w))},{immediate:!0}),Oe(l,(w,E)=>{w!==E&&n("update:locale",String(w))},{immediate:!1}),et(()=>{o.root=r.value,Oe(()=>s.get("path"),E=>{o.adapter.open(E)});const w=s.get("persist")?s.get("path"):s.get("initialPath")??"";a.setPath(w),o.adapter.open(w),a.path.listen(E=>{n("path-change",E.path)}),a.selectedItems.listen(E=>{n("select",E)}),n("ready")});const C=async w=>{const E=await p(w);E.length>0&&(o.modal.open(wu),setTimeout(()=>{o.emitter.emit("vf-external-files-dropped",E.map(b=>b.file))},100))};return(w,E)=>(y(),T("div",{ref_key:"root",ref:r,tabindex:"0",class:Ae(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":m(d)}]),"data-theme":m(o).theme.current,style:At(u.value),onDragenter:E[2]||(E[2]=(...b)=>m(h)&&m(h)(...b)),onDragover:E[3]||(E[3]=(...b)=>m(v)&&m(v)(...b)),onDragleave:E[4]||(E[4]=(...b)=>m(f)&&m(f)(...b)),onDrop:C},[g("div",{class:Ae(m(o).theme.current),style:{height:"100%",width:"100%"}},[g("div",{class:Ae([m(c)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:E[0]||(E[0]=b=>m(o).emitter.emit("vf-contextmenu-hide")),onTouchstart:E[1]||(E[1]=b=>m(o).emitter.emit("vf-contextmenu-hide"))},[m(d)?(y(),T("div",SU,[g("div",xU,L(m(o).i18n.t("Drag and drop the files/folders to here.")),1)])):ue("",!0),m(c).showMenuBar?(y(),ne(tj,{key:1})):ue("",!0),m(c).showToolbar?(y(),ne(i3,{key:2})):ue("",!0),j(q3),g("div",TU,[j(wU),j(RN,{"on-file-dclick":i.onFileDclick,"on-folder-dclick":i.onFolderDclick},{icon:we(b=>[Ve(w.$slots,"icon",wn(Jn(b)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),j(KN,null,{actions:we(b=>[Ve(w.$slots,"status-bar",wn(Jn(b)))]),_:3})],34),(y(),ne(ws,{to:"body"},[j(Up,{name:"fade"},{default:we(()=>[m(o).modal.visible?(y(),ne(Ot(m(o).modal.type),{key:0})):ue("",!0)]),_:1})])),j(DN,{items:m(l_)},null,8,["items"]),m(c).notificationsEnabled?(y(),ne(m(Ek),{key:0,position:m(c).notificationPosition,duration:m(c).notificationDuration,"visible-toasts":m(c).notificationVisibleToasts,"rich-colors":m(c).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):ue("",!0)],2)],46,CU))}}),$U=Ce({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>l_},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(t){const e=t,n=e.id??ko(Gl);if(!n)throw new Error('VueFinderProvider requires an "id" prop.');const i=gM(e,ko("VueFinderOptions")||{});return Oe(()=>e.config,o=>{if(o){const r={};for(const s in o){const a=m(o[s]);a!==void 0&&(r[s]=a)}i.config.init(r)}},{deep:!0,immediate:!0}),Oe(()=>e.locale,o=>{o&&i.i18n.localeAtom&&i.i18n.localeAtom.get()!==o&&i.i18n.localeAtom.set(o)},{immediate:!0}),ZI(n,i),Bp(Gl,n),bs(()=>{eM(n)}),(o,r)=>(y(),ne(OU,wn(Jn(e)),{icon:we(s=>[Ve(o.$slots,"icon",wn(Jn(s)))]),"status-bar":we(s=>[Ve(o.$slots,"status-bar",wn(Jn(s)))]),_:3},16))}});function Az(t){const e=je(t),n=o=>o||e.fs.path.get().path||"",i=o=>{Array.isArray(o.files)&&e.fs.setFiles(o.files)};return{async refresh(){const o=e.fs.path.get().path||"";e.adapter.invalidateListQuery(o),await e.adapter.open(o)},async open(o){await e.adapter.open(o)},preview(o){const r=(e.fs.files.get()||[]).find(s=>s.path===o);!r||r.type!=="file"||e.modal.open(lr,{storage:r.storage,item:r})},notify(o,r){Bi(e,o,r)},getPath(){return e.fs.path.get().path||""},select(o){const r=new Set((e.fs.files.get()||[]).map(a=>a.path)),s=(o||[]).filter(a=>r.has(a));e.fs.setSelection(s)},selectOne(o){new Set((e.fs.files.get()||[]).map(r=>r.path)).has(o)&&e.fs.setSelection([o])},clearSelection(){e.fs.clearSelection()},getSelectedPaths(){return(e.fs.selectedItems.get()||[]).map(o=>o.path)},async createFolder(o,r){const s=await e.adapter.createFolder({path:n(r),name:o});i(s)},async createFile(o,r){const s=await e.adapter.createFile({path:n(r),name:o});i(s)},async delete(o,r){const s=n(r),a=new Map((e.fs.files.get()||[]).map(u=>[u.path,u])),l=(o||[]).map(u=>a.get(u)).filter(u=>!!u).map(u=>({path:u.path,type:u.type})),c=await e.adapter.delete({path:s,items:l});i(c)},async rename(o,r,s){const a=await e.adapter.rename({path:n(s),item:o,name:r});i(a)},async copy(o,r,s){const a=await e.adapter.copy({path:n(s),sources:o,destination:r});i(a)},async move(o,r,s){const a=await e.adapter.move({path:n(s),sources:o,destination:r});i(a)},getFiles(){return e.fs.files.get()||[]},getStorages(){return e.fs.storages.get()||[]},isLoading(){return e.fs.isLoading()},isReadOnly(){return e.fs.getReadOnly()}}}const kU={install(t,e={}){e.i18n=e.i18n??{};const[n]=Object.keys(e.i18n);e.locale=e.locale??n??"en",t.provide("VueFinderOptions",e),t.component("VueFinder",$U)}};function AU(t){t.use(kU,{i18n:{zhCN:()=>nt(()=>import("./zhCN-0_iHo67e.js"),[],import.meta.url),en:()=>nt(()=>import("./en-C_Tot-hO.js"),[],import.meta.url)}})}const PU=()=>{const{i18n:t}=_c;let e=!1,n=null,i=[];async function o(){return e&&n||(e=!0,n=(async()=>{try{return(await ki.v1Token.tokencontrollerRefresh({headers:{[Ti]:wi.generateBearerToken(j0())}})).code===0}catch(p){return console.error(p),!1}finally{e=!1,n=null}})()),n}async function r(p){return l(p)?(vr.error(t.global.t("message.error.loginExpired")),Qi().logoutDialog(),Promise.reject(t.global.t("message.error.loginExpired"))):new Promise((_,C)=>{i.push({resolve:_,reject:C,config:p}),e||o().then(w=>{w?i.forEach(({resolve:E,reject:b,config:S})=>{S.headers[si]=wi.generateBearerToken(is()),a(S),d.request(S).then(E).catch(b)}):(i.forEach(({reject:E})=>E(t.global.t("message.error.refreshFailed"))),vr.error(t.global.t("message.error.loginExpired")),Qi().logoutDialog()),i=[]})})}function s(p){return p.headers[bt.CSRF_TOKEN_HEADER_NAME]=pm.get(bt.CSRF_KEY),p.headers[si]=wi.generateBearerToken(is()),p.headers[bt.ACCEPT_LANGUAGE_HEADER_NAME]=t.global.locale.value,p}function a(p){p.headers["X-Token-Refreshed"]="true"}function l(p){return p.headers["X-Token-Refreshed"]==="true"}async function c(p){if(p.headers[si]){const _=wi.extractBearerToken(p.headers[si]);F0(_),p.config.headers[si]=wi.generateBearerToken(_)}if(p.headers[Ti]){const _=wi.extractBearerToken(p.headers[Ti]);N0(_),p.config.headers[Ti]=wi.generateBearerToken(_)}if(p.data.code===jd.Unauthorized&&!p.config.url?.includes("/api/v1/token/refresh"))return r(p.config);if(p.data.code===jd.Forbidden)return Qi().logoutDialog(),Promise.reject(t.global.t("user.notLoggedIn"));if(p.data.code!==0){const _=p.data.message||t.global.t("message.error.requestFailed");return vr.error(_),Promise.reject(_)}return p.data}function u(p){return console.error(p),vr.error(p.message),Promise.reject(p)}const d=Nd(bt.REMOTE_SERVICE_PREFIX,{baseURL:`/${bt.REMOTE_SERVICE_PREFIX}`});d.interceptors.request.use(s,u),d.interceptors.response.use(c,u);const h=A0(),v=window.__GLOBAL_CONFIG__?.projectHash,f=Nd(bt.LOCAL_SERVICE_PREFIX,{baseURL:`${h}/${v}`});f.interceptors.request.use(s,u),f.interceptors.response.use(c,u)},c_=vi("setting",{state:()=>({dependencies:[],devDependencies:[],packageJson:{}}),getters:{vueVersion:t=>t.dependencies.find(e=>e.name==="vue")?.version||"",deps:t=>[...t.dependencies,...t.devDependencies],compHubVersion:()=>window.__GLOBAL_CONFIG__.version||""},actions:{setDependencies(t){this.$patch(e=>{e.dependencies=t})},setDevDependencies(t){this.$patch(e=>{e.devDependencies=t})},setPackageJson(t){this.$patch(e=>{e.packageJson=t})},async initSetting(){await this.fetchPackageJson(),await this.initPreviewSetting()},async fetchPackageJson(){await aS.v1Comp.compcontrollerPackagejson().then(t=>{const e=t.data?.packageJson??{};this.setPackageJson(e)})},async initPreviewSetting(){const t=Ji(H0,{dependencies:[],devDependencies:[]}),{dependencies:e=[],devDependencies:n=[]}=t.value,i=Object.entries(this.packageJson?.dependencies??{}).map(([r,s])=>{const a=e.find(l=>l.name===r);return{name:r,version:s,match:a?.match??bt.COMP_MATCH_TYPE_AUTO}}),o=Object.entries(this.packageJson?.devDependencies??{}).map(([r,s])=>{const a=n.find(l=>l.name===r);return{name:r,version:s,match:a?.match??bt.COMP_MATCH_TYPE_AUTO}});t.value={dependencies:i,devDependencies:o},this.setDependencies(i),this.setDevDependencies(o)}}}),RU=vi("upgrade",{state:()=>({upgradeInfo:{}}),getters:{isForceUpgrade:t=>t.upgradeInfo.hasUpgrade&&t.upgradeInfo.isForce,isUpgrade:t=>t.upgradeInfo.hasUpgrade,upgradeDesc:t=>t.upgradeInfo.desc,latestVersion:t=>t.upgradeInfo.latestVersion,hasUpgrade:t=>t.upgradeInfo.hasUpgrade},actions:{setUpgradeInfo(t){this.$patch(e=>{e.upgradeInfo=t})},async getUpgradeInfo(){if(Object.keys(this.upgradeInfo).length>0)return;const t=c_(),e=await ki.v2Upgrade.upgradecontrollerv2Check({compHubVersion:t.compHubVersion});this.setUpgradeInfo(e.data)}}});var ns={exports:{}};var IU=ns.exports,Np;function MU(){return Np||(Np=1,(function(t,e){(function(n,i){t.exports=i()})(IU,function(){var n={};n.version="0.2.0";var i=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(f){var p,_;for(p in f)_=f[p],_!==void 0&&f.hasOwnProperty(p)&&(i[p]=_);return this},n.status=null,n.set=function(f){var p=n.isStarted();f=o(f,i.minimum,1),n.status=f===1?null:f;var _=n.render(!p),C=_.querySelector(i.barSelector),w=i.speed,E=i.easing;return _.offsetWidth,a(function(b){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),l(C,s(f,w,E)),f===1?(l(_,{transition:"none",opacity:1}),_.offsetWidth,setTimeout(function(){l(_,{transition:"all "+w+"ms linear",opacity:0}),setTimeout(function(){n.remove(),b()},w)},w)):setTimeout(b,w)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var f=function(){setTimeout(function(){n.status&&(n.trickle(),f())},i.trickleSpeed)};return i.trickle&&f(),this},n.done=function(f){return!f&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(f){var p=n.status;return p?(typeof f!="number"&&(f=(1-p)*o(Math.random()*p,.1,.95)),p=o(p+f,0,.994),n.set(p)):n.start()},n.trickle=function(){return n.inc(Math.random()*i.trickleRate)},(function(){var f=0,p=0;n.promise=function(_){return!_||_.state()==="resolved"?this:(p===0&&n.start(),f++,p++,_.always(function(){p--,p===0?(f=0,n.done()):n.set((f-p)/f)}),this)}})(),n.render=function(f){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var p=document.createElement("div");p.id="nprogress",p.innerHTML=i.template;var _=p.querySelector(i.barSelector),C=f?"-100":r(n.status||0),w=document.querySelector(i.parent),E;return l(_,{transition:"all 0 linear",transform:"translate3d("+C+"%,0,0)"}),i.showSpinner||(E=p.querySelector(i.spinnerSelector),E&&v(E)),w!=document.body&&u(w,"nprogress-custom-parent"),w.appendChild(p),p},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(i.parent),"nprogress-custom-parent");var f=document.getElementById("nprogress");f&&v(f)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var f=document.body.style,p="WebkitTransform"in f?"Webkit":"MozTransform"in f?"Moz":"msTransform"in f?"ms":"OTransform"in f?"O":"";return p+"Perspective"in f?"translate3d":p+"Transform"in f?"translate":"margin"};function o(f,p,_){return f<p?p:f>_?_:f}function r(f){return(-1+f)*100}function s(f,p,_){var C;return i.positionUsing==="translate3d"?C={transform:"translate3d("+r(f)+"%,0,0)"}:i.positionUsing==="translate"?C={transform:"translate("+r(f)+"%,0)"}:C={"margin-left":r(f)+"%"},C.transition="all "+p+"ms "+_,C}var a=(function(){var f=[];function p(){var _=f.shift();_&&_(p)}return function(_){f.push(_),f.length==1&&p()}})(),l=(function(){var f=["Webkit","O","Moz","ms"],p={};function _(b){return b.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(S,x){return x.toUpperCase()})}function C(b){var S=document.body.style;if(b in S)return b;for(var x=f.length,k=b.charAt(0).toUpperCase()+b.slice(1),O;x--;)if(O=f[x]+k,O in S)return O;return b}function w(b){return b=_(b),p[b]||(p[b]=C(b))}function E(b,S,x){S=w(S),b.style[S]=x}return function(b,S){var x=arguments,k,O;if(x.length==2)for(k in S)O=S[k],O!==void 0&&S.hasOwnProperty(k)&&E(b,k,O);else E(b,x[1],x[2])}})();function c(f,p){var _=typeof f=="string"?f:h(f);return _.indexOf(" "+p+" ")>=0}function u(f,p){var _=h(f),C=_+p;c(_,p)||(f.className=C.substring(1))}function d(f,p){var _=h(f),C;c(f,p)&&(C=_.replace(" "+p+" "," "),f.className=C.substring(1,C.length-1))}function h(f){return(" "+(f.className||"")+" ").replace(/\s+/gi," ")}function v(f){f&&f.parentNode&&f.parentNode.removeChild(f)}return n})})(ns)),ns.exports}var DU=MU();const Jl=Fi(DU),{i18n:FU}=_c;function LU(){no.beforeEach(async(t,e)=>{Jl.start();const n=Qo(),i=Qi(),o=c_(),r=RU();if(t.path!==e.path&&(await o.initSetting(),await i.fetchCsrfToken(),await r.getUpgradeInfo()),r.isForceUpgrade&&!t.path.startsWith("/upgrade"))return{path:"/upgrade"};if(t.path===e.path&&t.fullPath!==e.fullPath)return;const s=n.visitedViews.find(a=>a.path===t.path);if(s){if(t.fullPath===s.fullPath)return;const{hash:a="",query:l={}}=t,{query:c={},hash:u=""}=s,d=ty(c);if(!t.redirectedFrom){const h={query:{...d,...l},hash:a||u};return{path:t.path,...h}}}if(i.isAccessTokenExist()){if(t.meta.noAuth){if(t.path.startsWith("/login")){const a=t.query.type==="logout";if(i.isAccessTokenExist()&&!a)return"/"}else i.isRealUserLogin()||await i.fetchWhoAmI();return}if(i.isRealUserLogin()||await i.fetchWhoAmI(),!i.isRealUserLogin())return i.logoutDialog(),!1}else if(!t.meta.noAuth)return i.logoutDialog(),!1}),no.afterEach(t=>{const e=t.meta.title;document.title=FU.global.t(e)||bt.SITE_TITLE,Jl.done()})}Jl.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,parent:"body"});async function jU(t){await b$(),PU(),mm(t),vm(t),bx(t),zx(t),LU(),Bx(),Yx(),y$(t),w$(t),E$(t),AU(t)}async function NU(){const t=nc(I0);await jU(t),t.mount("#app")}NU();export{Qo as A,z1 as B,JU as C,H0 as D,M2 as E,RU as F,l_ as G,iz as H,Qw as I,Qi as J,oz as K,HU as L,nz as M,nd as O,GU as R,ZU as S,YU as T,az as Z,nt as _,qU as a,KU as b,zg as c,sz as d,tz as e,ez as f,XU as g,QU as h,WU as i,Tb as j,$1 as k,rc as l,X0 as m,ki as n,bt as o,_c as p,rz as q,Az as r,aS as s,VU as t,W1 as u,gc as v,BU as w,A0 as x,R2 as y,c_ as z};