@orangelogic/design-system 2.60.0 → 2.61.0

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 (248) hide show
  1. package/library/apps/cortex/src/types.d.ts +2 -0
  2. package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
  3. package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
  4. package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
  5. package/library/chunks/animate.El-MpOws.js +37 -0
  6. package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
  7. package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
  8. package/library/chunks/array.DCtvHiLS.js +81 -0
  9. package/library/chunks/asset.CG_yXtWK.js +288 -0
  10. package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
  11. package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
  12. package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
  13. package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
  14. package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
  15. package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
  16. package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
  17. package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
  18. package/library/chunks/color.vLD2sNTs.js +164 -0
  19. package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
  20. package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
  21. package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
  22. package/library/chunks/converters.DkDtLstb.js +11 -0
  23. package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
  24. package/library/chunks/custom-element.L4WJXn1j.js +14 -0
  25. package/library/chunks/debounce.DaHuiSGU.js +15 -0
  26. package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
  27. package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
  28. package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
  29. package/library/chunks/dom.CZrJ64Dm.js +92 -0
  30. package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
  31. package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
  32. package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
  33. package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
  34. package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
  35. package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
  36. package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
  37. package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
  38. package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
  39. package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
  40. package/library/chunks/identity.ByMq8VxU.js +6 -0
  41. package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
  42. package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
  43. package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
  44. package/library/chunks/image.mbpyiQpQ.js +82 -0
  45. package/library/chunks/index.S0wy3rzm.js +373 -0
  46. package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
  47. package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
  48. package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
  49. package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
  50. package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
  51. package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
  52. package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
  53. package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
  54. package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
  55. package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
  56. package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
  57. package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
  58. package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
  59. package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
  60. package/library/chunks/responsive.CA6dcNiM.js +17 -0
  61. package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
  62. package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
  63. package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
  64. package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
  65. package/library/chunks/string.Cp_XNbnV.js +160 -0
  66. package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
  67. package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
  68. package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
  69. package/library/chunks/template.CsJd8Pb_.js +20 -0
  70. package/library/chunks/time.D_uFZqqe.js +118 -0
  71. package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
  72. package/library/chunks/toast.BXNbwZV8.js +25 -0
  73. package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
  74. package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
  75. package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
  76. package/library/chunks/url.LjsR2sB5.js +15 -0
  77. package/library/chunks/user-agent.D9aPuOyL.js +4 -0
  78. package/library/chunks/watch.q1sEjPWL.js +501 -0
  79. package/library/components/alert.js +38 -35
  80. package/library/components/animated-image.js +25 -23
  81. package/library/components/animation.js +7 -5
  82. package/library/components/array-line-clamp.d.ts +3 -0
  83. package/library/components/array-line-clamp.js +195 -0
  84. package/library/components/asset-link-format.js +223 -212
  85. package/library/components/atoms.js +164 -162
  86. package/library/components/avatar.js +28 -26
  87. package/library/components/badge.js +10 -8
  88. package/library/components/bicolor-picker.js +21 -19
  89. package/library/components/border-input-group.js +11 -9
  90. package/library/components/breadcrumb-item.js +14 -12
  91. package/library/components/breadcrumb.js +24 -22
  92. package/library/components/button-group.js +26 -24
  93. package/library/components/button.js +14 -13
  94. package/library/components/card.js +28 -19
  95. package/library/components/checkbox.js +29 -23
  96. package/library/components/color-picker.js +19 -17
  97. package/library/components/color-swatch-group.js +20 -17
  98. package/library/components/color-swatch.js +16 -13
  99. package/library/components/confirm-popover.js +11 -9
  100. package/library/components/copy-button.js +15 -13
  101. package/library/components/corner-position-input-group.js +13 -11
  102. package/library/components/cortex-element.d.ts +3 -0
  103. package/library/components/cortex-element.js +5 -0
  104. package/library/components/cropper.js +7 -5
  105. package/library/components/details.js +23 -20
  106. package/library/components/dialog.js +19 -16
  107. package/library/components/divider.js +13 -11
  108. package/library/components/dot-pagination.js +11 -9
  109. package/library/components/dot-status.js +10 -8
  110. package/library/components/drawer.js +63 -51
  111. package/library/components/dropdown.js +29 -26
  112. package/library/components/dynamic-select.js +12 -10
  113. package/library/components/element-clamp.js +28 -25
  114. package/library/components/file-on-demand.js +21 -20
  115. package/library/components/folder-select.js +12 -10
  116. package/library/components/format-bytes.js +11 -10
  117. package/library/components/format-date.js +11 -9
  118. package/library/components/format-number.js +16 -15
  119. package/library/components/format-time.js +118 -9
  120. package/library/components/grid-item.js +48 -46
  121. package/library/components/grid.js +31 -29
  122. package/library/components/header.js +10 -9
  123. package/library/components/hub-connection.js +6 -5
  124. package/library/components/icon-button.js +20 -18
  125. package/library/components/icon.js +17 -15
  126. package/library/components/iframe.js +10 -8
  127. package/library/components/image-comparer.js +27 -25
  128. package/library/components/image.js +14 -11
  129. package/library/components/include.js +26 -24
  130. package/library/components/input-group.js +15 -13
  131. package/library/components/input.js +23 -21
  132. package/library/components/line-clamp.js +12 -10
  133. package/library/components/list-editor.js +17 -15
  134. package/library/components/markdown.js +80 -78
  135. package/library/components/masonry.js +46 -44
  136. package/library/components/menu-item.js +151 -136
  137. package/library/components/menu-label.js +15 -13
  138. package/library/components/menu-section.js +18 -16
  139. package/library/components/menu.js +10 -8
  140. package/library/components/molecules.js +5 -5
  141. package/library/components/mutation-observer.js +12 -10
  142. package/library/components/option.js +10 -8
  143. package/library/components/organisms.js +2 -2
  144. package/library/components/padding-input-group.js +30 -28
  145. package/library/components/pagination.js +14 -12
  146. package/library/components/popup.js +3296 -9
  147. package/library/components/position-picker.js +12 -10
  148. package/library/components/progress-bar.js +13 -11
  149. package/library/components/progress-ring.js +15 -13
  150. package/library/components/qr-code.js +54 -52
  151. package/library/components/radio-button.js +19 -17
  152. package/library/components/radio-card.js +14 -12
  153. package/library/components/radio-group.js +20 -18
  154. package/library/components/radio.js +15 -13
  155. package/library/components/range.js +25 -23
  156. package/library/components/rating.js +17 -15
  157. package/library/components/relative-time.js +16 -14
  158. package/library/components/resize-observer.js +21 -19
  159. package/library/components/select.js +1442 -25
  160. package/library/components/shadow-input-group.js +19 -17
  161. package/library/components/share-option-list.js +20 -18
  162. package/library/components/sidebar.js +14 -12
  163. package/library/components/size-input-group.js +35 -33
  164. package/library/components/skeleton.js +12 -10
  165. package/library/components/space.js +12 -10
  166. package/library/components/spinner.js +17 -15
  167. package/library/components/split-panel.js +15 -13
  168. package/library/components/step.js +18 -16
  169. package/library/components/stepper-wizard.js +11 -9
  170. package/library/components/stepper.js +13 -11
  171. package/library/components/switch.js +21 -19
  172. package/library/components/tab-group.js +15 -13
  173. package/library/components/tab-panel.js +20 -18
  174. package/library/components/tab.js +18 -16
  175. package/library/components/table.js +69 -67
  176. package/library/components/tag.js +11 -9
  177. package/library/components/textarea.js +20 -18
  178. package/library/components/timecode.js +98 -8
  179. package/library/components/tooltip.js +24 -21
  180. package/library/components/tree-item.js +14 -11
  181. package/library/components/tree.js +12 -10
  182. package/library/components/typeface.js +13 -11
  183. package/library/components/types.js +15487 -15444
  184. package/library/components/typography.js +6 -4
  185. package/library/components/video.js +13 -11
  186. package/library/components/visually-hidden.js +15 -13
  187. package/library/events.d.ts +1 -0
  188. package/library/events.js +1 -0
  189. package/library/package.json +11 -2
  190. package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
  191. package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
  192. package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
  193. package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
  194. package/library/packages/atoms/src/components/include/include.d.ts +1 -0
  195. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
  196. package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
  197. package/library/packages/atoms/src/index.d.ts +1 -0
  198. package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
  199. package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
  200. package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
  201. package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
  202. package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
  203. package/library/packages/events/src/events.d.ts +6 -2
  204. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
  205. package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
  206. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
  207. package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
  208. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
  209. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
  210. package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
  211. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
  212. package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
  213. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
  214. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
  215. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
  216. package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
  217. package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
  218. package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
  219. package/library/packages/services/src/api/folder/folder.d.ts +4 -8
  220. package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
  221. package/library/packages/types/src/file-on-demand.d.ts +4 -0
  222. package/library/packages/types/src/folder-select.d.ts +9 -2
  223. package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
  224. package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
  225. package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
  226. package/library/packages/utils/src/font/font.d.ts +26 -0
  227. package/library/packages/utils/src/font/index.d.ts +1 -0
  228. package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
  229. package/library/packages/utils/src/history-manager/index.d.ts +1 -0
  230. package/library/packages/utils/src/index.d.ts +45 -0
  231. package/library/packages/utils/src/template/index.d.ts +1 -0
  232. package/library/packages/utils/src/template/template.d.ts +3 -0
  233. package/library/react-web-component.d.ts +418 -360
  234. package/library/utils.d.ts +1 -0
  235. package/library/utils.js +180 -0
  236. package/package.json +11 -2
  237. package/library/chunks/animation-registry.DavRkTTr.js +0 -69
  238. package/library/chunks/asset.Ba-CxnNM.js +0 -309
  239. package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
  240. package/library/chunks/dom.C0OFx7ND.js +0 -78
  241. package/library/chunks/format-time.BW6-ZWCX.js +0 -226
  242. package/library/chunks/isObjectLike.z36Fu426.js +0 -34
  243. package/library/chunks/popup._w5T7x8f.js +0 -3307
  244. package/library/chunks/select.DfO4de04.js +0 -1441
  245. package/library/chunks/string.BCk3SmdZ.js +0 -144
  246. package/library/chunks/timecode.D7XTiQ_3.js +0 -105
  247. package/library/chunks/watch.BCJD77bD.js +0 -547
  248. package/library/packages/events/src/cx-load-more.d.ts +0 -8
@@ -1,98 +1,105 @@
1
- import lt from "../components/icon.js";
2
- import dt from "../components/line-clamp.js";
3
- import { C as pt, s as ht, a as ut, b as Q } from "./tree.CUfvIDyA.js";
4
- import { n as p, C as Y, x as r, c as K, i as gt, E as bt } from "./custom-element.vnXBMQxc.js";
5
- import { c as xt } from "./component.styles.CI-v8BZa.js";
6
- import { L as Z } from "./i18n.BP2FRO1v.js";
7
- import { k as $t, h as mt, i as _t, w as L, j as wt, l as St, f as It, g as Ct, d as At, m as Dt, n as Tt } from "./watch.BCJD77bD.js";
8
- import { p as P } from "./string.BCk3SmdZ.js";
9
- import { r as x } from "./state.Cw55xXlb.js";
10
- import { e as R } from "./query.BBf1UFkC.js";
11
- import { e as A } from "./class-map.CoZTSvbM.js";
12
- import { c as F } from "./repeat.CauKaXyy.js";
13
- import { n as g } from "./when.Dr1es41R.js";
14
- import { a as zt, i as ft, c as Et, b as tt } from "./_baseUniq.BUihBa8c.js";
15
- import Lt from "../components/avatar.js";
16
- import { C as Rt } from "./button.CtCSNRB3.js";
17
- import { C as Pt } from "./dialog.B1TORO6S.js";
18
- import Ft from "../components/divider.js";
19
- import Ut from "../components/format-bytes.js";
20
- import kt from "../components/icon-button.js";
21
- import Ot from "../components/input.js";
22
- import { C as Nt } from "./option.D9KJhzHs.js";
23
- import jt from "../components/progress-bar.js";
24
- import Mt from "../components/relative-time.js";
25
- import { C as Bt } from "./select.DfO4de04.js";
26
- import Vt from "../components/space.js";
27
- import Ht from "../components/tab.js";
28
- import { C as Wt } from "./tab-group.5fLnWflv.js";
29
- import Gt from "../components/tab-panel.js";
30
- import qt from "../components/tooltip.js";
31
- import { C as Yt } from "./typography.BFpl0WMA.js";
32
- import { C as Kt } from "./confirm-popover.D2TF1x6K.js";
33
- import { d as Zt } from "./popup._w5T7x8f.js";
34
- import { a as H } from "./number.CjNxU7Xs.js";
35
- import { o as Xt } from "./style-map.CZovMmo_.js";
36
- import { a as Jt } from "./toString.CL_lYXbK.js";
37
- import { S as et, i as Qt } from "./isObjectLike.z36Fu426.js";
38
- function te(t, e, i, o) {
39
- for (var s = -1, a = t == null ? 0 : t.length; ++s < a; ) {
1
+ import J from "../components/icon.js";
2
+ import Q from "../components/line-clamp.js";
3
+ import { C as ft, s as vt, a as yt, b as lt } from "./tree.CNbrP8cY.js";
4
+ import { n as d, C as H } from "./lib-cortex-element.CVMmyPMC.js";
5
+ import { c as tt } from "./component.styles.DMSLciL5.js";
6
+ import { c as W } from "./custom-element.L4WJXn1j.js";
7
+ import { L as q } from "./i18n.DrzK7TPf.js";
8
+ import { k as Dt, a as bt, i as $t, w as P, S as Tt, b as Pt, c as zt, d as Et, e as Ft, f as Lt } from "./watch.q1sEjPWL.js";
9
+ import { p as R } from "./string.Cp_XNbnV.js";
10
+ import { x as n, i as at, E as Ut } from "./lit-element.jLBm65_O.js";
11
+ import { r as u } from "./state.CSDxrqLd.js";
12
+ import { e as z } from "./query.BBf1UFkC.js";
13
+ import { e as A } from "./class-map.BiVq-cVR.js";
14
+ import { c as U } from "./repeat.DbF2p5ae.js";
15
+ import { n as p } from "./when.Dr1es41R.js";
16
+ import { a as Rt, c as kt, b as dt } from "./_baseUniq.Df-fLIBx.js";
17
+ import Ot from "../components/avatar.js";
18
+ import { C as Nt } from "./button.P71VJ5xh.js";
19
+ import { C as jt } from "./dialog.C_75RVVz.js";
20
+ import Bt from "../components/divider.js";
21
+ import ot from "../components/format-bytes.js";
22
+ import St from "../components/icon-button.js";
23
+ import Mt from "../components/input.js";
24
+ import { C as Vt } from "./option.D1u5-cTt.js";
25
+ import It from "../components/relative-time.js";
26
+ import Ht from "../components/select.js";
27
+ import Wt from "../components/space.js";
28
+ import qt from "../components/tab.js";
29
+ import { C as Gt } from "./tab-group.DxSlcWK0.js";
30
+ import Yt from "../components/tab-panel.js";
31
+ import wt from "../components/tooltip.js";
32
+ import { C as nt } from "./typography.oDzoLbZS.js";
33
+ import { C as Kt } from "./confirm-popover.C1uA36JR.js";
34
+ import { d as Xt } from "./debounce.DaHuiSGU.js";
35
+ import { a as et } from "./number.CjNxU7Xs.js";
36
+ import { i as K, a as ht } from "./url.LjsR2sB5.js";
37
+ import { b as Zt } from "./_baseRest.ClTMQtN1.js";
38
+ import { a as Jt } from "./toString.CRT5zqEU.js";
39
+ import { S as pt, i as Qt } from "./isObjectLike.D3cpZO39.js";
40
+ import te from "../components/progress-bar.js";
41
+ import ee from "../components/spinner.js";
42
+ import { o as se } from "./style-map.llVFPd__.js";
43
+ import { r as ie } from "./choose.BTbF6BAn.js";
44
+ function ae(t, e, i, a) {
45
+ for (var s = -1, o = t == null ? 0 : t.length; ++s < o; ) {
40
46
  var l = t[s];
41
- e(o, l, i(l), t);
47
+ e(a, l, i(l), t);
42
48
  }
43
- return o;
49
+ return a;
44
50
  }
45
- function ee(t) {
46
- return function(e, i, o) {
47
- for (var s = -1, a = Object(e), l = o(e), d = l.length; d--; ) {
48
- var m = l[++s];
49
- if (i(a[m], m, a) === !1)
51
+ function oe(t) {
52
+ return function(e, i, a) {
53
+ for (var s = -1, o = Object(e), l = a(e), h = l.length; h--; ) {
54
+ var _ = l[++s];
55
+ if (i(o[_], _, o) === !1)
50
56
  break;
51
57
  }
52
58
  return e;
53
59
  };
54
60
  }
55
- var se = ee();
56
- function ie(t, e) {
57
- return t && se(t, e, $t);
61
+ var ne = oe();
62
+ function re(t, e) {
63
+ return t && ne(t, e, Dt);
58
64
  }
59
- function oe(t, e) {
60
- return function(i, o) {
65
+ function ce(t, e) {
66
+ return function(i, a) {
61
67
  if (i == null)
62
68
  return i;
63
- if (!mt(i))
64
- return t(i, o);
65
- for (var s = i.length, a = -1, l = Object(i); ++a < s && o(l[a], a, l) !== !1; )
69
+ if (!bt(i))
70
+ return t(i, a);
71
+ for (var s = i.length, o = -1, l = Object(i); ++o < s && a(l[o], o, l) !== !1; )
66
72
  ;
67
73
  return i;
68
74
  };
69
75
  }
70
- var ae = oe(ie);
71
- function re(t, e, i, o) {
72
- return ae(t, function(s, a, l) {
73
- e(o, s, i(s), l);
74
- }), o;
76
+ var le = ce(re);
77
+ function de(t, e, i, a) {
78
+ return le(t, function(s, o, l) {
79
+ e(a, s, i(s), l);
80
+ }), a;
75
81
  }
76
- function ne(t, e) {
77
- return function(i, o) {
78
- var s = _t(i) ? te : re, a = e ? e() : {};
79
- return s(i, t, zt(o), a);
82
+ function he(t, e) {
83
+ return function(i, a) {
84
+ var s = $t(i) ? ae : de, o = e ? e() : {};
85
+ return s(i, t, Rt(a), o);
80
86
  };
81
87
  }
82
- var ce = ne(function(t, e, i) {
88
+ var pe = he(function(t, e, i) {
83
89
  t[i ? 0 : 1].push(e);
84
90
  }, function() {
85
91
  return [[], []];
86
92
  });
87
- const le = {
93
+ const ue = {
88
94
  error: "Upload error",
89
95
  loaded: "Up-to-date",
90
96
  loading: "Syncing"
91
- }, b = {
97
+ }, x = {
92
98
  FAVORITES: "favorites",
99
+ PINNED: "pinned",
93
100
  RECENT: "recent",
94
101
  UPLOADS: "uploads"
95
- }, W = 20, de = {
102
+ }, X = 20, ge = {
96
103
  GET_CONTENT: "/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1"
97
104
  }, C = {
98
105
  ASSET_PATH: "Document.AssetPath",
@@ -102,53 +109,53 @@ const le = {
102
109
  HAS_BROWSER_CHILDREN: "Document.HasBrowserChildren",
103
110
  PARENT_FOLDER_IDENTIFIER: "Document.ParentRecordID",
104
111
  TITLE_WITH_FALLBACK: "CoreField.TitleWithFallback"
105
- }, B = "GB", U = 6e4, pe = ["album", "story", "project", "merchandise"], st = (t) => {
112
+ }, Z = "GB", O = 6e4, xe = ["album", "story", "project", "merchandise"], ut = (t) => {
106
113
  const e = /* @__PURE__ */ new Date(), i = new Date(
107
114
  e.getFullYear(),
108
115
  e.getMonth(),
109
116
  e.getDate()
110
- ).getTime(), o = new Date(
117
+ ).getTime(), a = new Date(
111
118
  e.getFullYear(),
112
119
  e.getMonth(),
113
120
  e.getDate() + 1
114
121
  ).getTime();
115
- return ce(
116
- t.toSorted((s, a) => a.uploadTimestamp - s.uploadTimestamp),
117
- (s) => s.uploadTimestamp >= i && s.uploadTimestamp < o
122
+ return pe(
123
+ t.toSorted((s, o) => o.uploadTimestamp - s.uploadTimestamp),
124
+ (s) => s.uploadTimestamp >= i && s.uploadTimestamp < a
118
125
  );
119
- }, he = ({
126
+ }, me = ({
120
127
  excludesRecordIDs: t,
121
128
  searchText: e
122
129
  }) => {
123
130
  let i = "";
124
131
  e?.trim() && (i = `Story_Title:${e}`);
125
- let o = "";
126
- t?.length && (o = t.map((a) => `RecordID:NOT ${a}`).join(" AND "));
132
+ let a = "";
133
+ t?.length && (a = t.map((o) => `RecordID:NOT ${o}`).join(" AND "));
127
134
  let s = i ? ` AND (${[i].filter(Boolean).join(" OR ")})` : "";
128
- return o && (s = `${s} AND (${o})`), `(MediaType:Story OR MediaType:Album)${s}`;
129
- }, ue = 10, vt = async ({
135
+ return a && (s = `${s} AND (${a})`), `(MediaType:Story OR MediaType:Album)${s}`;
136
+ }, _e = 10, Ct = async ({
130
137
  excludes: t = [],
131
138
  folderId: e,
132
139
  folderPath: i = [],
133
- folderPathsSet: o,
134
- limit: s = ue,
135
- searchText: a,
140
+ folderPathsSet: a,
141
+ limit: s = _e,
142
+ searchText: o,
136
143
  seeThru: l,
137
- siteUrl: d,
138
- start: m = 0,
139
- token: u
144
+ siteUrl: h,
145
+ start: _ = 0,
146
+ token: m
140
147
  }) => {
141
- if (!d)
148
+ if (!h)
142
149
  return { data: [], totalCount: 0 };
143
- let h = d;
144
- h.endsWith("/") && (h = h.slice(0, -1));
145
- const f = de.GET_CONTENT, _ = [
146
- ["Token", u],
150
+ let g = h;
151
+ g.endsWith("/") && (g = g.slice(0, -1));
152
+ const b = ge.GET_CONTENT, f = [
153
+ ["Token", m],
147
154
  [
148
155
  "extraFilters",
149
- he({
156
+ me({
150
157
  excludesRecordIDs: t,
151
- searchText: a
158
+ searchText: o
152
159
  })
153
160
  ],
154
161
  ["fields", C.ASSET_PATH],
@@ -159,63 +166,63 @@ const le = {
159
166
  ["fields", C.PARENT_FOLDER_IDENTIFIER],
160
167
  ["fields", C.CHILD_COUNT],
161
168
  ["objectRecordID", e],
162
- ["seeThru", a?.trim() || l ? "true" : "false"],
169
+ ["seeThru", o?.trim() || l ? "true" : "false"],
163
170
  ["limit", s.toString()],
164
- ["start", m.toString()]
165
- ], z = new URL(`${h}${f}`);
166
- _.forEach(([S, E]) => {
167
- z.searchParams.append(S, E);
171
+ ["start", _.toString()]
172
+ ], L = new URL(`${g}${b}`);
173
+ f.forEach(([w, E]) => {
174
+ L.searchParams.append(w, E);
168
175
  });
169
- const I = await fetch(z.toString(), {
176
+ const k = await fetch(L.toString(), {
170
177
  headers: {
171
- Authorization: `Bearer ${u}`
178
+ Authorization: `Bearer ${m}`
172
179
  },
173
180
  method: "GET"
174
181
  });
175
- if (!I.ok) {
176
- const S = new Error();
177
- throw S.message = "Failed to fetch", S;
178
- }
179
- const j = await I.json();
180
- let M = /* @__PURE__ */ new Set();
181
- o && (M = me(o));
182
- const X = j.contentItems?.map((S) => {
183
- let E = N(
184
- S.fields,
182
+ if (!k.ok) {
183
+ const w = new Error();
184
+ throw w.message = "Failed to fetch", w;
185
+ }
186
+ const G = await k.json();
187
+ let Y = /* @__PURE__ */ new Set();
188
+ a && (Y = ye(a));
189
+ const rt = G.contentItems?.map((w) => {
190
+ let E = M(
191
+ w.fields,
185
192
  C.TITLE_WITH_FALLBACK
186
- ) ?? "", O = xe(
187
- (N(
188
- S.fields,
193
+ ) ?? "", B = ve(
194
+ (M(
195
+ w.fields,
189
196
  C.ASSET_PATH
190
197
  ) ?? "").replace(/^Root\//i, "")
191
198
  ) || E;
192
- if (o) {
193
- if (o.has(O)) {
194
- const J = O.split("/"), yt = J.pop();
195
- O = `${J.join("/")}/${S.recordID}-${yt}`, E = `${S.recordID}-${E}`;
199
+ if (a) {
200
+ if (a.has(B)) {
201
+ const ct = B.split("/"), At = ct.pop();
202
+ B = `${ct.join("/")}/${w.recordID}-${At}`, E = `${w.recordID}-${E}`;
196
203
  }
197
- a?.trim() && M.has(E) && (E = O), o.add(O), M.add(E);
204
+ o?.trim() && Y.has(E) && (E = B), a.add(B), Y.add(E);
198
205
  }
199
206
  return {
200
207
  childCount: Number(
201
- N(
202
- S.fields,
208
+ M(
209
+ w.fields,
203
210
  C.CHILD_COUNT
204
211
  ) ?? 0
205
212
  ),
206
213
  children: [],
207
- docType: N(
208
- S.fields,
214
+ docType: M(
215
+ w.fields,
209
216
  C.DOC_TYPE
210
217
  ) ?? "",
211
- fullPath: O,
212
- hasChildren: N(
213
- S.fields,
218
+ fullPath: B,
219
+ hasChildren: M(
220
+ w.fields,
214
221
  C.HAS_BROWSER_CHILDREN
215
222
  ) === "1",
216
- id: S.recordID,
217
- parentFolderIdentifier: N(
218
- S.fields,
223
+ id: w.recordID,
224
+ parentFolderIdentifier: M(
225
+ w.fields,
219
226
  C.PARENT_FOLDER_IDENTIFIER
220
227
  ) ?? "",
221
228
  parents: [],
@@ -223,49 +230,52 @@ const le = {
223
230
  title: E
224
231
  };
225
232
  }) ?? [];
226
- return { data: X, totalCount: j.totalCount ?? X.length };
233
+ return { data: rt, totalCount: G.totalCount ?? rt.length };
227
234
  };
228
- function N(t, e) {
229
- const i = e.toLowerCase(), o = Object.keys(t).find(
235
+ function M(t, e) {
236
+ const i = e.toLowerCase(), a = Object.keys(t).find(
230
237
  (s) => s.toLowerCase() === i
231
238
  );
232
- return o ? t[o] : void 0;
239
+ return a ? t[a] : void 0;
233
240
  }
234
- const q = "-", $ = (t) => {
235
- const e = t.split(q), i = e.pop() ?? "", o = e.join(q);
236
- return { id: i, path: o };
237
- }, k = ({ id: t, path: e }) => [e, t].join(q), ge = (t) => {
241
+ const it = "-", S = (t) => {
242
+ const e = t.split(it), i = e.pop() ?? "", a = e.join(it);
243
+ return { id: i, path: a };
244
+ }, N = ({ id: t, path: e }) => [e, t].join(it), fe = (t) => {
238
245
  const e = t.split(".");
239
246
  return e.length > 1 ? e.pop() ?? "" : "";
240
- }, it = (t) => {
247
+ }, gt = (t) => {
241
248
  const e = t.match(/(?:V\.?)?(\d+(?:\.\d+)*)/);
242
249
  return e ? e[1] : "";
243
- }, ot = (t, e) => {
250
+ }, xt = (t, e) => {
244
251
  let i = e?.trim();
245
- const o = e ? e.split("/").length : 0;
246
- return (t ? t.length : 0) >= o && (i = t.join("/") ?? ""), i;
247
- }, xe = (t) => t.split("/").map((e) => e.trim()).join("/"), me = (t) => {
252
+ const a = e ? e.split("/").length : 0;
253
+ return (t ? t.length : 0) >= a && (i = t.join("/") ?? ""), i;
254
+ }, ve = (t) => t.split("/").map((e) => e.trim()).join("/"), ye = (t) => {
248
255
  const e = /* @__PURE__ */ new Set();
249
256
  for (const i of t) {
250
- const o = i.split("/"), s = o[o.length - 1];
257
+ const a = i.split("/"), s = a[a.length - 1];
251
258
  s && e.add(s);
252
259
  }
253
260
  return e;
254
- }, _e = (t, e) => {
255
- const i = t.split("/"), o = e.split("/");
256
- return i.slice(0, o.length + 1).join("/");
261
+ }, be = (t, e) => {
262
+ const i = t.split("/"), a = e.split("/");
263
+ return i.slice(0, a.length + 1).join("/");
257
264
  };
258
- var fe = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, D = (t, e, i, o) => {
259
- for (var s = o > 1 ? void 0 : o ? ve(e, i) : e, a = t.length - 1, l; a >= 0; a--)
260
- (l = t[a]) && (s = (o ? l(e, i, s) : l(s)) || s);
261
- return o && s && fe(e, i, s), s;
265
+ function mt(t) {
266
+ return t.toSorted((e, i) => i.uploadTimestamp - e.uploadTimestamp);
267
+ }
268
+ var $e = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, D = (t, e, i, a) => {
269
+ for (var s = a > 1 ? void 0 : a ? Se(e, i) : e, o = t.length - 1, l; o >= 0; o--)
270
+ (l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
271
+ return a && s && $e(e, i, s), s;
262
272
  };
263
- let v = class extends Y {
273
+ let v = class extends H {
264
274
  constructor() {
265
- super(...arguments), this.localize = new Z(this), this.role = "treeitem", this.siteUrl = "", this.token = "", this.searchText = "", this.folder = null, this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.data = null, this.totalCount = 0, this.isLoading = !1, this.fetchFolders = async ({
275
+ super(...arguments), this.localize = new q(this), this.role = "treeitem", this.siteUrl = "", this.token = "", this.searchText = "", this.folder = null, this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.data = null, this.totalCount = 0, this.isLoading = !1, this.fetchFolders = async ({
266
276
  folderId: t,
267
277
  start: e = 0
268
- }) => await vt({
278
+ }) => await Ct({
269
279
  folderId: t,
270
280
  folderPath: this.folder?.path ?? [],
271
281
  folderPathsSet: this.folderPathsSet,
@@ -278,11 +288,11 @@ let v = class extends Y {
278
288
  if (e >= this.totalCount)
279
289
  return;
280
290
  this.isLoading = !0;
281
- const { data: i, totalCount: o } = await this.fetchFolders({
291
+ const { data: i, totalCount: a } = await this.fetchFolders({
282
292
  folderId: this.folder?.id ?? "",
283
293
  start: e
284
294
  });
285
- this.data = [...this.data ?? [], ...i], this.totalCount = o, this.isLoading = !1;
295
+ this.data = [...this.data ?? [], ...i], this.totalCount = a, this.isLoading = !1;
286
296
  }, this.onLazyLoad = async (t) => {
287
297
  if (t.target !== this.treeItem)
288
298
  return;
@@ -290,10 +300,10 @@ let v = class extends Y {
290
300
  folderId: this.folder?.id ?? ""
291
301
  });
292
302
  if (this.data = e, this.totalCount = i, await this.updateComplete, !this.treeItem.selected && !this.treeItem.indeterminate) {
293
- let o = !0, s = !0;
294
- for (const a of this.treeItem.getChildrenItems())
295
- a.selected ? (ht(a, !0, "multiple"), s = !1) : o = !1;
296
- this.treeItem.indeterminate = !o && !s;
303
+ let a = !0, s = !0;
304
+ for (const o of this.treeItem.getChildrenItems())
305
+ o.selected ? (vt(o, !0, "multiple"), s = !1) : a = !1;
306
+ this.treeItem.indeterminate = !a && !s;
297
307
  }
298
308
  };
299
309
  }
@@ -326,52 +336,52 @@ let v = class extends Y {
326
336
  if (await this.updateComplete, !this.treeItem)
327
337
  return;
328
338
  let t = !1;
329
- const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), o = ot(this.folder?.path ?? [], this.folder?.fullPath ?? ""), s = [...this.currentRootIDsSet], a = (u, h) => {
330
- u.forEach((f) => {
331
- const _ = $(f);
332
- if (!_.path.trim() || !_.id.trim())
339
+ const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = xt(this.folder?.path ?? [], this.folder?.fullPath ?? ""), s = [...this.currentRootIDsSet], o = (m, g) => {
340
+ m.forEach((b) => {
341
+ const f = S(b);
342
+ if (!f.path.trim() || !f.id.trim())
333
343
  return !1;
334
- const z = P(_.path), I = P(o);
335
- o && z.startsWith(I) && z !== I && h.add(_e(_.path, o));
344
+ const L = R(f.path), k = R(a);
345
+ a && L.startsWith(k) && L !== k && g.add(be(f.path, a));
336
346
  });
337
347
  };
338
- a(this.removedIDs, i), a(s, e);
339
- let l = !!s.some((u) => {
340
- const h = $(u);
341
- if (!h.path.trim() || !h.id.trim())
348
+ o(this.removedIDs, i), o(s, e);
349
+ let l = !!s.some((m) => {
350
+ const g = S(m);
351
+ if (!g.path.trim() || !g.id.trim())
342
352
  return !1;
343
- const f = k({
353
+ const b = N({
344
354
  id: this.folder?.id ?? "",
345
- path: o
346
- }), _ = P(h.path), z = P(o), I = h.id === this.folder?.id, j = !this.removedIDs.includes(f) && z.startsWith(_);
347
- return I || j;
355
+ path: a
356
+ }), f = R(g.path), L = R(a), k = g.id === this.folder?.id, G = !this.removedIDs.includes(b) && L.startsWith(f);
357
+ return k || G;
348
358
  });
349
- const d = this.folder?.childCount && e.size === this.folder?.childCount;
359
+ const h = this.folder?.childCount && e.size === this.folder?.childCount;
350
360
  if (this.folder?.childCount && i.size === this.folder?.childCount) {
351
361
  this.currentRootIDsSet.delete(
352
- k({
362
+ N({
353
363
  id: this.folder?.id ?? "",
354
- path: o
364
+ path: a
355
365
  })
356
366
  );
357
- const u = this.parentElement?.parentElement;
358
- u && u instanceof v && u.syncBoxes(), l = !1;
367
+ const m = this.parentElement?.parentElement;
368
+ m && m instanceof v && m.syncBoxes(), l = !1;
359
369
  } else if (!l)
360
- if (d) {
370
+ if (h) {
361
371
  this.currentRootIDsSet.add(
362
- k({
372
+ N({
363
373
  id: this.folder?.id ?? "",
364
- path: o
374
+ path: a
365
375
  })
366
376
  );
367
- const u = this.parentElement?.parentElement;
368
- u && u instanceof v && u.syncBoxes(), l = !0;
377
+ const m = this.parentElement?.parentElement;
378
+ m && m instanceof v && m.syncBoxes(), l = !0;
369
379
  } else e.size > 0 && (t = !0);
370
380
  l ? (t = i.size > 0, this.treeItem.selected = !0) : (t = e.size > 0, this.treeItem.selected = !1, await this.treeItem.updateComplete), t ? (this.treeItem.selected = !1, await this.treeItem.updateComplete, this.treeItem.indeterminate = !0) : this.treeItem.indeterminate = !1;
371
381
  }
372
382
  render() {
373
- const t = ot(this.folder?.path ?? [], this.folder?.fullPath ?? "");
374
- return r`
383
+ const t = xt(this.folder?.path ?? [], this.folder?.fullPath ?? "");
384
+ return n`
375
385
  <cx-tree-item
376
386
  aria-label=${this.folder?.title ?? ""}
377
387
  class=${A({
@@ -389,10 +399,10 @@ let v = class extends Y {
389
399
  ${this.folder?.title}
390
400
  </cx-line-clamp>
391
401
  </div>
392
- ${F(
402
+ ${U(
393
403
  this.data ?? [],
394
404
  (e) => e.id,
395
- (e) => r`<cx-folder-item
405
+ (e) => n`<cx-folder-item
396
406
  slot="children"
397
407
  .folder=${e}
398
408
  .siteUrl=${this.siteUrl}
@@ -402,9 +412,9 @@ let v = class extends Y {
402
412
  .folderPathsSet=${this.folderPathsSet}
403
413
  ></cx-folder-item>`
404
414
  )}
405
- ${g(
415
+ ${p(
406
416
  this.data && this.data.length < this.totalCount,
407
- () => r`
417
+ () => n`
408
418
  <div slot="children" class="load-more-button">
409
419
  <cx-button
410
420
  data-testid="load-more-button"
@@ -421,64 +431,66 @@ let v = class extends Y {
421
431
  `;
422
432
  }
423
433
  };
424
- v.styles = [xt];
434
+ v.styles = [tt];
425
435
  v.dependencies = {
426
- "cx-icon": lt,
427
- "cx-line-clamp": dt,
428
- "cx-tree-item": pt
436
+ "cx-icon": J,
437
+ "cx-line-clamp": Q,
438
+ "cx-tree-item": ft
429
439
  };
430
440
  D([
431
- R("cx-tree-item")
441
+ z("cx-tree-item")
432
442
  ], v.prototype, "treeItem", 2);
433
443
  D([
434
- p({
444
+ d({
435
445
  attribute: "site-url",
436
- reflect: !0
446
+ reflect: !0,
447
+ type: String
437
448
  })
438
449
  ], v.prototype, "siteUrl", 2);
439
450
  D([
440
- p({ reflect: !0, type: String })
451
+ d({ reflect: !0, type: String })
441
452
  ], v.prototype, "token", 2);
442
453
  D([
443
- p({ attribute: "search-text", reflect: !0, type: String })
454
+ d({ attribute: "search-text", reflect: !0, type: String })
444
455
  ], v.prototype, "searchText", 2);
445
456
  D([
446
- p()
457
+ d({ type: Object })
447
458
  ], v.prototype, "folder", 2);
448
459
  D([
449
- p({
460
+ d({
450
461
  attribute: "current-root-ids-set",
451
462
  type: Object
452
463
  })
453
464
  ], v.prototype, "currentRootIDsSet", 2);
454
465
  D([
455
- p({ attribute: "folder-paths-set" })
466
+ d({ attribute: "folder-paths-set", type: Object })
456
467
  ], v.prototype, "folderPathsSet", 2);
457
468
  D([
458
- p({
469
+ d({
459
470
  attribute: "removed-ids",
460
471
  converter: {
461
472
  fromAttribute: (t) => t.split(" "),
462
473
  toAttribute: (t) => t.join(" ")
463
- }
474
+ },
475
+ type: String
464
476
  })
465
477
  ], v.prototype, "removedIDs", 2);
466
478
  D([
467
- x()
479
+ u()
468
480
  ], v.prototype, "data", 2);
469
481
  D([
470
- x()
482
+ u()
471
483
  ], v.prototype, "totalCount", 2);
472
484
  D([
473
- x()
485
+ u()
474
486
  ], v.prototype, "isLoading", 2);
475
487
  D([
476
- L(["currentRootIDsSet", "removedIDs"])
488
+ P(["currentRootIDsSet", "removedIDs"])
477
489
  ], v.prototype, "syncBoxes", 1);
478
490
  v = D([
479
- K("cx-folder-item")
491
+ W("cx-folder-item")
480
492
  ], v);
481
- const ye = gt`
493
+ const Ie = at`
482
494
  .folder-tree {
483
495
  overflow: auto;
484
496
  flex: 1;
@@ -533,15 +545,15 @@ const ye = gt`
533
545
  line-height: var(--cx-line-height-small);
534
546
  }
535
547
  `;
536
- var be = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, w = (t, e, i, o) => {
537
- for (var s = o > 1 ? void 0 : o ? $e(e, i) : e, a = t.length - 1, l; a >= 0; a--)
538
- (l = t[a]) && (s = (o ? l(e, i, s) : l(s)) || s);
539
- return o && s && be(e, i, s), s;
548
+ var we = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, I = (t, e, i, a) => {
549
+ for (var s = a > 1 ? void 0 : a ? Ce(e, i) : e, o = t.length - 1, l; o >= 0; o--)
550
+ (l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
551
+ return a && s && we(e, i, s), s;
540
552
  };
541
- let y = class extends Y {
553
+ let y = class extends H {
542
554
  constructor() {
543
- super(...arguments), this.localize = new Z(this), this.role = "tree", this.siteUrl = "", this.bearerToken = "", this.token = "", this.searchText = "", this.folders = [], this.rootIDs = [], this.totalCount = 0, this.loadMore = () => {
544
- }, this.isLoading = !1, this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.renderFolder = (t) => r`<cx-folder-item
555
+ super(...arguments), this.localize = new q(this), this.role = "tree", this.siteUrl = "", this.bearerToken = "", this.token = "", this.searchText = "", this.folders = [], this.rootIDs = [], this.totalCount = 0, this.loadMore = () => {
556
+ }, this.isLoading = !1, this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.renderFolder = (t) => n`<cx-folder-item
545
557
  .currentRootIDsSet=${this.currentRootIDsSet}
546
558
  .folder=${t}
547
559
  .folderPathsSet=${this.folderPathsSet}
@@ -561,7 +573,7 @@ let y = class extends Y {
561
573
  resetTree() {
562
574
  this.currentRootIDsSet = new Set(this.rootIDs), this.tree.querySelectorAll("cx-folder-item").forEach((t) => {
563
575
  t.selected = this.currentRootIDsSet.has(
564
- k({
576
+ N({
565
577
  id: t.id,
566
578
  path: t.dataset.path ?? ""
567
579
  })
@@ -569,38 +581,38 @@ let y = class extends Y {
569
581
  });
570
582
  }
571
583
  async handleSelectedChange(t) {
572
- const e = t.target, i = e.dataset.id ?? "", o = e.dataset.path ?? "";
573
- if (await e.updateComplete, !i.trim() || !o.trim())
584
+ const e = t.target, i = e.dataset.id ?? "", a = e.dataset.path ?? "";
585
+ if (await e.updateComplete, !i.trim() || !a.trim())
574
586
  return;
575
- const s = k({
587
+ const s = N({
576
588
  id: i,
577
- path: o
589
+ path: a
578
590
  });
579
591
  if (!(e.indeterminate && !e.selected)) {
580
592
  if (e.selected) {
581
593
  if (!this.currentRootIDsSet.has(s)) {
582
- Q(e, "multiple"), this.currentRootIDsSet.add(s);
583
- for (const a of e.getChildrenItems())
584
- !a.id.trim() || !a.dataset.path?.trim() || this.currentRootIDsSet.add(
585
- k({
586
- id: a.id,
587
- path: a.dataset.path ?? ""
594
+ lt(e, "multiple"), this.currentRootIDsSet.add(s);
595
+ for (const o of e.getChildrenItems())
596
+ !o.id.trim() || !o.dataset.path?.trim() || this.currentRootIDsSet.add(
597
+ N({
598
+ id: o.id,
599
+ path: o.dataset.path ?? ""
588
600
  })
589
601
  );
590
602
  }
591
603
  this.removedIDs = this.removedIDs.filter(
592
- (a) => a !== s && !$(a).path.startsWith(o + "/")
604
+ (o) => o !== s && !S(o).path.startsWith(a + "/")
593
605
  );
594
606
  } else
595
- this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s), Q(e, "multiple"));
596
- [...this.currentRootIDsSet].forEach((a) => {
597
- const l = P(o), d = $(a).path, m = P(d);
598
- m.startsWith(l) && m !== l && (e.selected || this.currentRootIDsSet.delete(a));
607
+ this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s), lt(e, "multiple"));
608
+ [...this.currentRootIDsSet].forEach((o) => {
609
+ const l = R(a), h = S(o).path, _ = R(h);
610
+ _.startsWith(l) && _ !== l && (e.selected || this.currentRootIDsSet.delete(o));
599
611
  }), this.currentRootIDsSet = new Set(this.currentRootIDsSet);
600
612
  }
601
613
  }
602
614
  render() {
603
- return r`
615
+ return n`
604
616
  <div class="folder-tree selectable">
605
617
  <cx-tree
606
618
  class=${A({
@@ -611,14 +623,14 @@ let y = class extends Y {
611
623
  disabled-auto-expand
612
624
  disabled-sync-checkboxes
613
625
  >
614
- ${F(
626
+ ${U(
615
627
  this.folders,
616
628
  (t) => t.id,
617
629
  (t) => this.renderFolder(t)
618
630
  )}
619
- ${g(
631
+ ${p(
620
632
  this.folders && this.folders.length < this.totalCount,
621
- () => r`
633
+ () => n`
622
634
  <div class="load-more-button">
623
635
  <cx-button
624
636
  variant="text"
@@ -635,361 +647,1078 @@ let y = class extends Y {
635
647
  `;
636
648
  }
637
649
  };
638
- y.styles = [xt, ye];
650
+ y.styles = [tt, Ie];
639
651
  y.dependencies = {
640
652
  "cx-folder-item": v,
641
- "cx-tree": ut
653
+ "cx-tree": yt
642
654
  };
643
- w([
644
- R("cx-tree")
655
+ I([
656
+ z("cx-tree")
645
657
  ], y.prototype, "tree", 2);
646
- w([
647
- p({ attribute: "site-url", reflect: !0, type: String })
658
+ I([
659
+ d({ attribute: "site-url", reflect: !0, type: String })
648
660
  ], y.prototype, "siteUrl", 2);
649
- w([
650
- p({ attribute: "bearer-token", reflect: !0, type: String })
661
+ I([
662
+ d({ attribute: "bearer-token", reflect: !0, type: String })
651
663
  ], y.prototype, "bearerToken", 2);
652
- w([
653
- p({ attribute: "token", reflect: !0, type: String })
664
+ I([
665
+ d({ attribute: "token", reflect: !0, type: String })
654
666
  ], y.prototype, "token", 2);
655
- w([
656
- p({ attribute: "search-text", reflect: !0, type: String })
667
+ I([
668
+ d({ attribute: "search-text", reflect: !0, type: String })
657
669
  ], y.prototype, "searchText", 2);
658
- w([
659
- p({ type: Array })
670
+ I([
671
+ d({ type: Array })
660
672
  ], y.prototype, "folders", 2);
661
- w([
662
- p({ attribute: "root-ids", reflect: !0, type: Array })
673
+ I([
674
+ d({ attribute: "root-ids", reflect: !0, type: Array })
663
675
  ], y.prototype, "rootIDs", 2);
664
- w([
665
- p({ attribute: "total-count", reflect: !0, type: Number })
676
+ I([
677
+ d({ attribute: "total-count", reflect: !0, type: Number })
666
678
  ], y.prototype, "totalCount", 2);
667
- w([
668
- p({ attribute: "load-more", type: Function })
679
+ I([
680
+ d({ attribute: "load-more", type: Function })
669
681
  ], y.prototype, "loadMore", 2);
670
- w([
671
- p({ attribute: "is-loading", reflect: !0, type: Boolean })
682
+ I([
683
+ d({ attribute: "is-loading", reflect: !0, type: Boolean })
672
684
  ], y.prototype, "isLoading", 2);
673
- w([
674
- p({ attribute: "folder-paths-set" })
685
+ I([
686
+ d({ attribute: "folder-paths-set", type: Object })
675
687
  ], y.prototype, "folderPathsSet", 2);
676
- w([
677
- x()
688
+ I([
689
+ u()
678
690
  ], y.prototype, "removedIDs", 2);
679
- w([
680
- x()
691
+ I([
692
+ u()
681
693
  ], y.prototype, "currentRootIDsSet", 2);
682
- w([
683
- L("rootIDs")
694
+ I([
695
+ P("rootIDs")
684
696
  ], y.prototype, "handleRootIDsChange", 1);
685
- y = w([
686
- K("cx-folder-tree")
697
+ y = I([
698
+ W("cx-folder-tree")
687
699
  ], y);
688
- var T = /* @__PURE__ */ ((t) => (t.Canceled = "CANCELED", t.Failed = "FAILED", t.InProgress = "INPROGRESS", t.PendingComplete = "PENDINGCOMPLETE", t.Success = "SUCCESS", t))(T || {});
689
- const at = (t, e = "https://", i = !1) => i && t.match(we) || t.match(/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//) ? t : `${e}${t}`, V = (t) => {
690
- try {
691
- return new URL(t), new RegExp(Se, "i").test(t);
692
- } catch {
693
- return !1;
694
- }
695
- }, we = "^(?![a-zA-Z][a-zA-Z\\d+\\-.]*:\\/\\/)(?!([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}($|\\/))[^\\s]+$", Se = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$", As = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.){2,}[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$";
696
- function Ie(t, e, i) {
697
- switch (i.length) {
698
- case 0:
699
- return t.call(e);
700
- case 1:
701
- return t.call(e, i[0]);
702
- case 2:
703
- return t.call(e, i[0], i[1]);
704
- case 3:
705
- return t.call(e, i[0], i[1], i[2]);
706
- }
707
- return t.apply(e, i);
708
- }
709
- var rt = Math.max;
710
- function Ce(t, e, i) {
711
- return e = rt(e === void 0 ? t.length - 1 : e, 0), function() {
712
- for (var o = arguments, s = -1, a = rt(o.length - e, 0), l = Array(a); ++s < a; )
713
- l[s] = o[e + s];
714
- s = -1;
715
- for (var d = Array(e + 1); ++s < e; )
716
- d[s] = o[s];
717
- return d[e] = i(l), Ie(t, this, d);
718
- };
719
- }
720
- function Ae(t) {
721
- return function() {
722
- return t;
723
- };
724
- }
725
- var nt = function() {
726
- try {
727
- var t = wt(Object, "defineProperty");
728
- return t({}, "", {}), t;
729
- } catch {
730
- }
731
- }(), De = nt ? function(t, e) {
732
- return nt(t, "toString", {
733
- configurable: !0,
734
- enumerable: !1,
735
- value: Ae(e),
736
- writable: !0
737
- });
738
- } : ft, Te = 800, ze = 16, Ee = Date.now;
739
- function Le(t) {
740
- var e = 0, i = 0;
741
- return function() {
742
- var o = Ee(), s = ze - (o - i);
743
- if (i = o, s > 0) {
744
- if (++e >= Te)
745
- return arguments[0];
746
- } else
747
- e = 0;
748
- return t.apply(void 0, arguments);
749
- };
750
- }
751
- var Re = Le(De);
752
- function Pe(t, e) {
753
- return Re(Ce(t, e, ft), t + "");
754
- }
755
- var Fe = 200;
756
- function Ue(t, e, i, o) {
757
- var s = -1, a = Et, l = !0, d = t.length, m = [], u = e.length;
758
- if (!d)
759
- return m;
760
- i && (e = Jt(e, St(i))), e.length >= Fe && (a = Ct, l = !1, e = new It(e));
700
+ var Ae = 200;
701
+ function De(t, e, i, a) {
702
+ var s = -1, o = kt, l = !0, h = t.length, _ = [], m = e.length;
703
+ if (!h)
704
+ return _;
705
+ i && (e = Jt(e, Pt(i))), e.length >= Ae && (o = zt, l = !1, e = new Tt(e));
761
706
  t:
762
- for (; ++s < d; ) {
763
- var h = t[s], f = i == null ? h : i(h);
764
- if (h = h !== 0 ? h : 0, l && f === f) {
765
- for (var _ = u; _--; )
766
- if (e[_] === f)
707
+ for (; ++s < h; ) {
708
+ var g = t[s], b = i == null ? g : i(g);
709
+ if (g = g !== 0 ? g : 0, l && b === b) {
710
+ for (var f = m; f--; )
711
+ if (e[f] === b)
767
712
  continue t;
768
- m.push(h);
769
- } else a(e, f, o) || m.push(h);
713
+ _.push(g);
714
+ } else o(e, b, a) || _.push(g);
770
715
  }
771
- return m;
716
+ return _;
772
717
  }
773
- var ct = et ? et.isConcatSpreadable : void 0;
774
- function ke(t) {
775
- return _t(t) || At(t) || !!(ct && t && t[ct]);
718
+ var _t = pt ? pt.isConcatSpreadable : void 0;
719
+ function Te(t) {
720
+ return $t(t) || Et(t) || !!(_t && t && t[_t]);
776
721
  }
777
- function Oe(t, e, i, o, s) {
778
- var a = -1, l = t.length;
779
- for (i || (i = ke), s || (s = []); ++a < l; ) {
780
- var d = t[a];
781
- i(d) ? Dt(s, d) : o || (s[s.length] = d);
722
+ function Pe(t, e, i, a, s) {
723
+ var o = -1, l = t.length;
724
+ for (i || (i = Te), s || (s = []); ++o < l; ) {
725
+ var h = t[o];
726
+ i(h) ? Ft(s, h) : a || (s[s.length] = h);
782
727
  }
783
728
  return s;
784
729
  }
785
- function Ne(t, e, i) {
786
- var o = t.length;
787
- if (o < 2)
788
- return o ? tt(t[0]) : [];
789
- for (var s = -1, a = Array(o); ++s < o; )
790
- for (var l = t[s], d = -1; ++d < o; )
791
- d != s && (a[s] = Ue(a[s] || l, t[d], e, i));
792
- return tt(Oe(a), e, i);
730
+ function ze(t, e, i) {
731
+ var a = t.length;
732
+ if (a < 2)
733
+ return a ? dt(t[0]) : [];
734
+ for (var s = -1, o = Array(a); ++s < a; )
735
+ for (var l = t[s], h = -1; ++h < a; )
736
+ h != s && (o[s] = De(o[s] || l, t[h], e, i));
737
+ return dt(Pe(o), e, i);
793
738
  }
794
- function je(t) {
795
- return Qt(t) && mt(t);
739
+ function Ee(t) {
740
+ return Qt(t) && bt(t);
796
741
  }
797
- var G = Pe(function(t) {
798
- return Ne(Tt(t, je));
799
- });
800
- const Me = gt`
801
- :host {
802
- --asset-height: 40px;
803
- display: block;
804
- color: var(--cx-color-neutral-900);
805
- height: 100%;
806
- --cx-button-text-transform: none;
807
- --tooltip-max-width: min(80vw, 640px);
742
+ var st = Zt(function(t) {
743
+ return ze(Lt(t, Ee));
744
+ }), $ = /* @__PURE__ */ ((t) => (t.Canceled = "CANCELED", t.Failed = "FAILED", t.InProgress = "INPROGRESS", t.PendingComplete = "PENDINGCOMPLETE", t.Success = "SUCCESS", t))($ || {}), Fe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, j = (t, e, i, a) => {
745
+ for (var s = a > 1 ? void 0 : a ? Le(e, i) : e, o = t.length - 1, l; o >= 0; o--)
746
+ (l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
747
+ return a && s && Fe(e, i, s), s;
748
+ };
749
+ let T = class extends H {
750
+ constructor() {
751
+ super(...arguments), this.localize = new q(this), this.size = 0, this.remainingSize = 0, this.childrenCount = 0, this.assetsCount = 0;
808
752
  }
809
-
810
- .container {
811
- display: block;
812
- height: 100%;
753
+ get cachedSize() {
754
+ return Math.max(0, this.size - this.remainingSize);
813
755
  }
814
-
815
- .container--user-interaction-blocked {
816
- pointer-events: none;
817
- user-select: none;
756
+ get percentage() {
757
+ return this.size ? this.cachedSize / this.size * 100 : 0;
818
758
  }
819
-
820
- .loading-overlay {
821
- position: absolute;
822
- top: 0;
823
- left: 0;
824
- width: 100%;
825
- height: 100%;
826
- background-color: var(--cx-color-neutral-50);
827
- opacity: 0.8;
828
- display: flex;
829
- justify-content: center;
830
- align-items: center;
831
- z-index: var(--cx-z-index-tooltip); /* Ensure it is above other content */
759
+ createRenderRoot() {
760
+ return this;
832
761
  }
833
-
834
- .assets,
835
- .welcome {
836
- height: 100%;
837
- display: flex;
838
- flex-direction: column;
762
+ renderFolderSuccessText() {
763
+ return n`${this.childrenCount} ${this.localize.term("subfolders")},
764
+ ${this.assetsCount} ${this.localize.term("assets")}`;
765
+ }
766
+ renderSuccess() {
767
+ return n`<div class="file-on-demand-pinned-status__success progress">
768
+ <cx-icon name="file_download" variant="filled"></cx-icon>
769
+ <cx-typography variant="small">
770
+ <cx-line-clamp lines="1">
771
+ ${p(this.isFolder, this.renderFolderSuccessText.bind(this), () => n`${this.localize.term("cached")}`)}
772
+ </cx-line-clamp>
773
+ </cx-typography>
774
+ </div>`;
839
775
  }
840
-
841
- /* #region Icons */
842
- .assets-list__tab-group .empty-icon {
843
- color: var(--cx-color-neutral-600);
844
- font-size: var(--cx-font-size-3x-large);
776
+ renderFailed() {
777
+ return n`<div class="file-on-demand-pinned-status__failed progress">
778
+ <cx-icon name="file_download_off" variant="filled"></cx-icon>
779
+ <cx-typography variant="small">
780
+ <cx-line-clamp lines="1">
781
+ ${this.localize.term("syncFailedCacheFull")}
782
+ </cx-line-clamp>
783
+ </cx-typography>
784
+ </div>`;
845
785
  }
846
-
847
- cx-tab {
848
- line-height: var(--cx-line-height-large);
786
+ renderCanceled() {
787
+ return n`<div class="file-on-demand-pinned-status__canceled progress">
788
+ <cx-icon name="file_download_off" variant="filled"></cx-icon>
789
+ <cx-typography variant="small">
790
+ <cx-line-clamp lines="1">
791
+ ${this.localize.term("syncCanceled")}
792
+ </cx-line-clamp>
793
+ </cx-typography>
794
+ </div>`;
849
795
  }
850
-
851
- .assets-list__tab-group cx-tab {
852
- width: calc(100% / 3);
796
+ renderInProgress() {
797
+ return n`<div class="file-on-demand-pinned-status__in-progress progress">
798
+ <cx-icon name="downloading" variant="filled"></cx-icon>
799
+ <cx-typography variant="small">
800
+ <cx-line-clamp lines="1">
801
+ ${this.localize.term("caching")} ${this.percentage}% (<cx-format-bytes .value=${this.cachedSize}></cx-format-bytes>/
802
+ <cx-format-bytes .value=${this.size}></cx-format-bytes>)
803
+ </cx-line-clamp>
804
+ </cx-typography>
805
+ </div>`;
806
+ }
807
+ render() {
808
+ return n`<div class="file-on-demand-pinned-status">
809
+ ${ie(this.uploadStatus, [
810
+ [$.Success, this.renderSuccess.bind(this)],
811
+ [$.Failed, this.renderFailed.bind(this)],
812
+ [$.InProgress, this.renderInProgress.bind(this)],
813
+ [$.PendingComplete, this.renderInProgress.bind(this)],
814
+ [$.Canceled, this.renderCanceled.bind(this)]
815
+ ])}
816
+ </div>`;
817
+ }
818
+ };
819
+ T.styles = [tt];
820
+ T.dependencies = {
821
+ "cx-format-bytes": ot,
822
+ "cx-icon": J,
823
+ "cx-line-clamp": Q,
824
+ "cx-typography": nt
825
+ };
826
+ j([
827
+ d({
828
+ attribute: "upload-status",
829
+ type: String
830
+ })
831
+ ], T.prototype, "uploadStatus", 2);
832
+ j([
833
+ d({ type: Number })
834
+ ], T.prototype, "size", 2);
835
+ j([
836
+ d({
837
+ attribute: "remaining-size",
838
+ type: Number
839
+ })
840
+ ], T.prototype, "remainingSize", 2);
841
+ j([
842
+ d({
843
+ attribute: "is-folder",
844
+ type: Boolean
845
+ })
846
+ ], T.prototype, "isFolder", 2);
847
+ j([
848
+ d({
849
+ attribute: "children-count",
850
+ type: Number
851
+ })
852
+ ], T.prototype, "childrenCount", 2);
853
+ j([
854
+ d({
855
+ attribute: "assets-count",
856
+ type: Number
857
+ })
858
+ ], T.prototype, "assetsCount", 2);
859
+ T = j([
860
+ W("cx-file-on-demand-pinned-status")
861
+ ], T);
862
+ const Ue = at`
863
+ :host {
864
+ padding: var(--cx-spacing-2x-small) var(--cx-spacing-small);
865
+ display: block;
853
866
  }
854
867
 
855
- .settings__tab-group cx-tab {
856
- width: calc(100% / 2);
868
+ .asset {
869
+ max-height: var(--asset-height);
870
+ display: flex;
871
+ gap: var(--cx-spacing-small);
872
+ }
873
+ .asset:hover {
874
+ background-color: var(--cx-input-filled-background-color-hover);
857
875
  }
858
876
 
859
- cx-tab::part(base) {
877
+ .asset__description {
878
+ flex: 1;
879
+ width: 0;
860
880
  display: flex;
881
+ flex-direction: column;
861
882
  justify-content: center;
862
883
  }
863
-
864
- cx-tab::part(label) {
865
- text-align: center;
884
+ .asset__description__label {
885
+ display: flex;
866
886
  }
867
-
868
- cx-tab-panel {
869
- --padding: 0 0 var(--cx-spacing-x-small) 0;
887
+ .asset__description__label__text {
888
+ flex-grow: 1;
889
+ flex-shrink: 1;
890
+ overflow: hidden;
870
891
  }
871
-
872
- cx-icon[slot='prefix'] {
873
- font-size: var(--cx-font-size-large);
892
+ .asset__description__status {
893
+ color: var(--cx-color-neutral-500);
894
+ line-height: var(--cx-line-height-medium);
874
895
  }
875
896
 
876
- .error-message {
877
- color: var(--cx-color-danger);
878
- min-height: 1ch;
897
+ .asset__actions {
898
+ display: flex;
899
+ min-width: 64px;
900
+ justify-content: flex-end;
901
+ align-items: center;
902
+ }
903
+ .asset:hover .asset__actions {
904
+ visibility: visible;
905
+ opacity: 1;
906
+ }
907
+ .asset__actions {
908
+ visibility: hidden;
909
+ opacity: 0;
879
910
  }
880
911
 
881
- /** welcome */
882
- .welcome {
912
+ .asset__actions__spinner {
913
+ min-height: var(--cx-input-height-medium);
914
+ min-width: var(--cx-input-height-medium);
915
+ display: flex;
883
916
  justify-content: center;
884
917
  align-items: center;
885
- padding: var(--cx-spacing-x-large) var(--cx-spacing-medium)
886
- var(--cx-spacing-medium) var(--cx-spacing-medium);
887
- gap: var(--cx-spacing-x-large);
918
+ }
919
+ .asset__actions__spinner::part(base) {
920
+ flex-grow: 0;
888
921
  }
889
922
 
890
- .welcome__message {
923
+ .asset__thumbnail {
924
+ width: 56px;
925
+ height: var(--asset-height);
891
926
  display: flex;
892
- flex-direction: column;
893
927
  justify-content: center;
894
928
  align-items: center;
895
- gap: var(--cx-spacing-x-small);
929
+ position: relative;
930
+ border-radius: var(--cx-border-radius-medium);
931
+ }
932
+ .asset__thumbnail--placeholder {
933
+ background-color: var(--cx-color-primary-50);
934
+ }
935
+ .asset__thumbnail--folder {
936
+ background-color: var(--cx-color-neutral-100);
896
937
  }
897
938
 
898
- .welcome__actions {
939
+ .asset__thumbnail__image {
940
+ height: 100%;
899
941
  width: 100%;
900
- display: flex;
901
- flex-direction: column;
902
- justify-content: center;
903
- gap: var(--cx-spacing-x-small);
942
+ object-fit: cover;
943
+ flex-shrink: 0;
944
+ border-radius: var(--cx-border-radius-medium);
945
+ }
946
+ .asset__thumbnail__icon {
947
+ --font-size: 38px;
948
+ display: none;
949
+ color: var(--cx-color-primary-400);
904
950
  }
905
951
 
906
- .welcome__connect-button,
907
- .welcome__cancel-connection-button,
908
- .welcome__input {
909
- width: 100%;
952
+ .asset__folder__icon {
953
+ --font-size: var(--cx-font-size-x-large);
954
+ color: var(--cx-color-neutral-600);
910
955
  }
911
956
 
912
- .welcome__connect-button--disabled::part(base) {
913
- cursor: help;
957
+ .asset__thumbnail__extension {
958
+ display: none;
959
+ position: absolute;
960
+ bottom: var(--cx-spacing-3x-small);
961
+ left: 50%;
962
+ transform: translateX(-50%);
963
+ width: 26px;
964
+ color: var(--cx-color-primary-50);
914
965
  }
915
966
 
916
- .welcome .error-message {
967
+ .asset__thumbnail__extension__line-clamp {
968
+ width: 100%;
917
969
  text-align: center;
918
970
  }
919
971
 
920
- /** header */
921
- .header {
922
- display: flex;
923
- justify-content: space-between;
924
- background-color: var(--cx-color-neutral-50);
925
- padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
926
- line-height: 1;
927
- }
928
- .header__user {
929
- display: flex;
930
- align-items: center;
931
- gap: var(--cx-spacing-x-small);
932
- overflow: hidden;
933
- }
934
- .header__username {
935
- display: flex;
936
- overflow: hidden;
937
- }
938
- .header__username__text {
972
+ .asset__thumbnail__extension__text {
939
973
  flex-grow: 1;
940
974
  flex-shrink: 1;
941
975
  overflow: hidden;
942
- }
943
- .header__avatar {
944
- --size: 24px;
945
- }
946
- .header__actions {
947
- min-width: fit-content;
976
+ text-transform: uppercase;
977
+ display: contents;
948
978
  }
949
979
 
950
- .settings__version__badge::part(base) {
951
- width: var(--cx-spacing-x-small);
952
- padding: 0;
980
+ .asset__thumbnail--placeholder .asset__thumbnail__image {
981
+ display: none;
953
982
  }
954
983
 
955
- /** assets list */
956
- .assets-list {
957
- flex: 1;
958
- height: 0;
984
+ .asset__thumbnail--placeholder .asset__thumbnail__icon,
985
+ .asset__thumbnail--placeholder .asset__thumbnail__extension {
986
+ display: flex;
959
987
  }
960
988
 
961
- /** Make sure the overflown element is .recent__list
962
- * to trigger scroll event for infinite scroll
963
- */
964
- .assets-list__tab-group,
965
- .assets-list__tab-group::part(base),
966
- .assets-list__tab-group::part(body),
967
- .assets-list__tab-group cx-tab-panel,
968
- .assets-list__tab-group cx-tab-panel::part(base) {
969
- height: 100%;
970
- overflow: hidden;
989
+ /** uploads assets */
990
+ cx-progress-bar {
991
+ --height: 4px;
992
+ --indicator-color: var(--color);
993
+ --track-color: var(--cx-color-neutral-300);
994
+ z-index: 0;
971
995
  }
972
- .assets-list__tab-group .recent-empty,
973
- .assets-list__tab-group .favorites-empty,
974
- .assets-list__tab-group .uploads-empty {
996
+ .progress {
975
997
  display: flex;
976
- flex-direction: column;
977
- justify-content: center;
978
998
  align-items: center;
979
- gap: var(--cx-spacing-medium);
999
+ width: 100%;
1000
+ gap: var(--cx-spacing-2x-small);
1001
+ margin-top: var(--cx-spacing-3x-small);
1002
+ }
1003
+
1004
+ .syncing-progress,
1005
+ .completed-progress,
1006
+ .failed-progress,
1007
+ .canceled-progress {
1008
+ margin-top: var(--cx-spacing-2x-small);
1009
+ }
1010
+
1011
+ .progress * {
1012
+ white-space: nowrap;
1013
+ }
1014
+
1015
+ .progress cx-icon {
1016
+ --font-size: var(--cx-font-size-medium);
1017
+ }
1018
+
1019
+ .progress cx-typography::part(base) {
1020
+ line-height: var(--cx-font-size-medium);
1021
+ }
1022
+
1023
+ .uploading-progress cx-icon {
1024
+ color: var(--cx-color-primary-500);
1025
+ }
1026
+
1027
+ .syncing-progress cx-icon {
1028
+ color: var(--cx-color-warning);
1029
+ }
1030
+
1031
+ .completed-progress cx-icon {
1032
+ color: var(--cx-color-success);
1033
+ }
1034
+
1035
+ .failed-progress cx-icon,
1036
+ .failed-progress__text {
1037
+ color: var(--cx-color-danger);
1038
+ cursor: help;
1039
+ }
1040
+
1041
+ .canceled-progress cx-icon {
1042
+ color: var(--cx-color-neutral-600);
1043
+ }
1044
+
1045
+ .file-on-demand-pinned-status__success cx-icon,
1046
+ .file-on-demand-pinned-status__in-progress cx-icon {
1047
+ color: var(--cx-color-success-500);
1048
+ }
1049
+
1050
+ .file-on-demand-pinned-status__failed cx-icon {
1051
+ color: var(--cx-color-danger-500);
1052
+ }
1053
+
1054
+ .file-on-demand-pinned-status__canceled cx-icon {
1055
+ color: var(--cx-color-neutral-500);
1056
+ }
1057
+ `;
1058
+ var Re = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, V = (t, e, i, a) => {
1059
+ for (var s = a > 1 ? void 0 : a ? ke(e, i) : e, o = t.length - 1, l; o >= 0; o--)
1060
+ (l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
1061
+ return a && s && Re(e, i, s), s;
1062
+ };
1063
+ let F = class extends H {
1064
+ constructor() {
1065
+ super(...arguments), this.localize = new q(this), this.favoriteInProgressAssets = [], this.pinInProgressAssets = [], this.thumbnailLoadError = !1;
1066
+ }
1067
+ get showFailedActions() {
1068
+ return this.listType === x.PINNED ? !1 : this.asset.uploadStatus === $.Failed;
1069
+ }
1070
+ get showInProgressActions() {
1071
+ return this.listType === x.PINNED ? !1 : this.asset.uploadStatus === $.InProgress;
1072
+ }
1073
+ get showNormalActions() {
1074
+ return this.listType === x.PINNED ? !1 : [$.Success, $.PendingComplete].includes(
1075
+ this.asset.uploadStatus
1076
+ ) || !this.asset.uploadStatus?.trim();
1077
+ }
1078
+ get showPinnedActions() {
1079
+ return this.listType === x.PINNED;
1080
+ }
1081
+ get isFolder() {
1082
+ return xe.includes((this.asset.docType ?? "").toLowerCase());
1083
+ }
1084
+ get thumbnailUrl() {
1085
+ return this.asset.thumbnail?.trim() ?? "";
1086
+ }
1087
+ get showThumbnailPlaceholder() {
1088
+ return !this.thumbnailUrl || this.thumbnailLoadError;
1089
+ }
1090
+ willUpdate(t) {
1091
+ if (super.willUpdate(t), !t.has("asset"))
1092
+ return;
1093
+ (t.get("asset")?.thumbnail?.trim() ?? "") !== this.thumbnailUrl && (this.thumbnailLoadError = !1);
1094
+ }
1095
+ handleImgError() {
1096
+ this.thumbnailLoadError = !0;
1097
+ }
1098
+ handleImgLoad() {
1099
+ this.thumbnailLoadError = !1;
1100
+ }
1101
+ handleOpenDriveClick() {
1102
+ this.openDrive(this.asset);
1103
+ }
1104
+ openDrive(t) {
1105
+ this.emit("cx-open-drive", {
1106
+ detail: {
1107
+ asset: t
1108
+ }
1109
+ });
1110
+ }
1111
+ unmarkFavorite(t) {
1112
+ this.emit("cx-unmark-favorite", {
1113
+ detail: {
1114
+ assetId: t
1115
+ }
1116
+ });
1117
+ }
1118
+ markFavorite(t) {
1119
+ this.emit("cx-mark-favorite", {
1120
+ detail: {
1121
+ assetId: t
1122
+ }
1123
+ });
1124
+ }
1125
+ pinAsset(t) {
1126
+ this.emit("cx-file-on-demand-pin", {
1127
+ detail: {
1128
+ assetId: t
1129
+ }
1130
+ });
1131
+ }
1132
+ unpinAsset(t) {
1133
+ this.emit("cx-file-on-demand-unpin", {
1134
+ detail: {
1135
+ assetId: t
1136
+ }
1137
+ });
1138
+ }
1139
+ handlePinClick() {
1140
+ this.asset.isPinned ? this.unpinAsset(this.asset.recordId) : this.pinAsset(this.asset.recordId);
1141
+ }
1142
+ handleFavoriteClick() {
1143
+ this.asset.isInFavorite ? this.unmarkFavorite(this.asset.recordId) : this.markFavorite(this.asset.recordId);
1144
+ }
1145
+ retryUpload(t) {
1146
+ this.emit("cx-retry-upload", {
1147
+ detail: {
1148
+ assetId: t
1149
+ }
1150
+ });
1151
+ }
1152
+ handleRetryUploadClick() {
1153
+ this.asset.uploadId && this.retryUpload(this.asset.uploadId);
1154
+ }
1155
+ resumeUpload(t) {
1156
+ this.emit("cx-resume-upload", {
1157
+ detail: {
1158
+ assetId: t
1159
+ }
1160
+ });
1161
+ }
1162
+ pauseUpload(t) {
1163
+ this.emit("cx-pause-upload", {
1164
+ detail: {
1165
+ assetId: t
1166
+ }
1167
+ });
1168
+ }
1169
+ handlePauseUploadClick() {
1170
+ this.asset.uploadId && (this.asset.isPaused ? this.resumeUpload(this.asset.uploadId) : this.pauseUpload(this.asset.uploadId));
1171
+ }
1172
+ renderProgress({
1173
+ isPaused: t = !1,
1174
+ progress: e = 0,
1175
+ remainingTime: i,
1176
+ size: a = 0,
1177
+ timestamp: s = Date.now(),
1178
+ uploadErrorMessage: o,
1179
+ uploadStatus: l = $.InProgress
1180
+ }) {
1181
+ const h = a > 0 ? e * 100 / a : 0, _ = l === $.InProgress ? h : 100, m = n`
1182
+ <div class="progress uploading-progress">
1183
+ ${p(!t, () => n`<cx-icon name="arrow_upward"></cx-icon>`)}
1184
+ <cx-typography variant="small">
1185
+ <cx-line-clamp lines="1">
1186
+ ${p(t, () => n`${this.localize.term("paused")} ‧`)}
1187
+ <cx-format-bytes .value=${e}></cx-format-bytes>
1188
+ ${this.localize.term("of")}
1189
+ <cx-format-bytes .value=${a}></cx-format-bytes>
1190
+ (${new Intl.NumberFormat(void 0, {
1191
+ maximumFractionDigits: 2
1192
+ }).format(h)}%)
1193
+ ${p(
1194
+ !!i && !t,
1195
+ () => n`‧
1196
+ <cx-relative-time
1197
+ format="narrow"
1198
+ numeric="always"
1199
+ date=${new Date(Date.now() + (i ?? 0))}
1200
+ sync
1201
+ sync-interval=${O}
1202
+ ></cx-relative-time>`
1203
+ )}
1204
+ </cx-line-clamp>
1205
+ </cx-typography>
1206
+ </div>
1207
+ `, g = n`
1208
+ <div class="progress syncing-progress">
1209
+ <cx-icon name="cached"></cx-icon>
1210
+ <cx-typography variant="small">
1211
+ <cx-line-clamp lines="1">
1212
+ ${this.localize.term("syncing")} ‧
1213
+ <cx-relative-time
1214
+ format="narrow"
1215
+ numeric="always"
1216
+ date=${new Date(s)}
1217
+ sync
1218
+ sync-interval=${O}
1219
+ ></cx-relative-time>
1220
+ </cx-line-clamp>
1221
+ </cx-typography>
1222
+ </div>
1223
+ `, b = n`
1224
+ <div class="progress completed-progress">
1225
+ <cx-icon name="check"></cx-icon>
1226
+ <cx-typography variant="small">
1227
+ <cx-line-clamp lines="1">
1228
+ ${this.localize.term("readyToUse")} ‧
1229
+ <cx-relative-time
1230
+ format="narrow"
1231
+ numeric="always"
1232
+ date=${new Date(s)}
1233
+ sync
1234
+ sync-interval=${O}
1235
+ ></cx-relative-time>
1236
+ </cx-line-clamp>
1237
+ </cx-typography>
1238
+ </div>
1239
+ `, f = n`
1240
+ <div class="progress failed-progress">
1241
+ <cx-typography variant="small">
1242
+ <cx-line-clamp lines="1">
1243
+ <cx-tooltip content=${o || this.localize.term("uploadFailed")}>
1244
+ <span class="failed-progress__text">
1245
+ ${this.localize.term("uploadFailed")} ‧
1246
+ </span>
1247
+ </cx-tooltip>
1248
+ <cx-relative-time
1249
+ format="narrow"
1250
+ numeric="always"
1251
+ date=${new Date(s)}
1252
+ sync
1253
+ sync-interval=${O}
1254
+ ></cx-relative-time>
1255
+ </cx-line-clamp>
1256
+ </cx-typography>
1257
+ </div>
1258
+ `, L = n`
1259
+ <div class="progress canceled-progress">
1260
+ <cx-icon name="cancel"></cx-icon>
1261
+ <cx-typography variant="small">
1262
+ <cx-line-clamp lines="1">
1263
+ ${this.localize.term("canceled")} ‧
1264
+ <cx-relative-time
1265
+ format="narrow"
1266
+ numeric="always"
1267
+ date=${new Date(s)}
1268
+ sync
1269
+ sync-interval=${O}
1270
+ ></cx-relative-time>
1271
+ </cx-line-clamp>
1272
+ </cx-typography>
1273
+ </div>
1274
+ `;
1275
+ return n`
1276
+ ${p(
1277
+ l === $.InProgress,
1278
+ () => n`<cx-progress-bar
1279
+ style=${se({
1280
+ "--color": t ? "var(--cx-color-warning-500)" : "var(--cx-color-primary-500)"
1281
+ })}
1282
+ .value=${_.toFixed(0)}
1283
+ class="progress-bar"
1284
+ ></cx-progress-bar
1285
+ >${m}`
1286
+ )}
1287
+ ${p(
1288
+ l === $.PendingComplete,
1289
+ () => g
1290
+ )}
1291
+ ${p(l === $.Success, () => b)}
1292
+ ${p(l === $.Failed, () => f)}
1293
+ ${p(l === $.Canceled, () => L)}
1294
+ `;
1295
+ }
1296
+ renderUploadingStatus() {
1297
+ return n`
1298
+ ${this.renderProgress({
1299
+ isPaused: this.asset.isPaused,
1300
+ progress: (this.asset.size ?? 0) - (this.asset.remainingSize ?? 0),
1301
+ remainingTime: this.asset.remainingTime,
1302
+ size: this.asset.size ?? 0,
1303
+ timestamp: this.asset.uploadTimestamp,
1304
+ uploadErrorMessage: this.asset.uploadErrorMessage,
1305
+ uploadStatus: this.asset.uploadStatus
1306
+ })}
1307
+ `;
1308
+ }
1309
+ renderPinnedStatus() {
1310
+ return n`<cx-file-on-demand-pinned-status
1311
+ size=${this.asset.size ?? 0}
1312
+ remaining-size=${this.asset.remainingSize ?? 0}
1313
+ upload-status=${this.asset.uploadStatus}
1314
+ ?is-folder=${this.isFolder}
1315
+ children-count=${this.asset.childrenCount ?? 0}
1316
+ assets-count=${this.asset.assetsCount ?? 0}
1317
+ ></cx-file-on-demand-pinned-status>`;
1318
+ }
1319
+ renderThumbnailContent() {
1320
+ return this.isFolder ? this.listType === x.FAVORITES ? n`<cx-icon
1321
+ class="asset__folder__icon"
1322
+ name="folder_special"
1323
+ ></cx-icon>` : n`<cx-icon class="asset__folder__icon" name="topic"></cx-icon>` : n`${p(
1324
+ !!this.thumbnailUrl,
1325
+ () => n`<img
1326
+ alt=${this.asset.fileName}
1327
+ class="asset__thumbnail__image"
1328
+ src=${this.thumbnailUrl}
1329
+ @error=${this.handleImgError}
1330
+ @load=${this.handleImgLoad}
1331
+ />`
1332
+ )}
1333
+ <cx-icon
1334
+ class="asset__thumbnail__icon"
1335
+ name="insert_drive_file"
1336
+ variant="filled"
1337
+ ></cx-icon>
1338
+ <div class="asset__thumbnail__extension">
1339
+ <cx-line-clamp
1340
+ class="asset__thumbnail__extension__line-clamp"
1341
+ lines="1"
1342
+ >
1343
+ <cx-typography
1344
+ class="asset__thumbnail__extension__text"
1345
+ variant="small"
1346
+ >
1347
+ ${fe(this.asset.fileName)}
1348
+ </cx-typography>
1349
+ </cx-line-clamp>
1350
+ </div>`;
1351
+ }
1352
+ renderThumbnail() {
1353
+ return n`<div
1354
+ class=${A({
1355
+ asset__thumbnail: !0,
1356
+ "asset__thumbnail--folder": this.isFolder,
1357
+ "asset__thumbnail--placeholder": this.showThumbnailPlaceholder
1358
+ })}
1359
+ >
1360
+ ${this.renderThumbnailContent()}
1361
+ </div>`;
1362
+ }
1363
+ renderNormalActions() {
1364
+ return n`<cx-tooltip content=${this.localize.term("openInDrive")} hoist>
1365
+ <cx-icon-button
1366
+ data-testid="asset__drive-button"
1367
+ name="folder_open"
1368
+ @click=${this.handleOpenDriveClick}
1369
+ ></cx-icon-button>
1370
+ </cx-tooltip>
1371
+ ${p(
1372
+ this.favoriteInProgressAssets.includes(this.asset.recordId),
1373
+ () => n`<cx-spinner class="asset__actions__spinner"></cx-spinner>`,
1374
+ () => n`<cx-tooltip
1375
+ content=${this.asset.isInFavorite ? this.localize.term("unfavorite") : this.localize.term("favorite")}
1376
+ hoist
1377
+ >
1378
+ <cx-icon-button
1379
+ data-testid="asset__favorite-button"
1380
+ name="star"
1381
+ variant=${this.asset.isInFavorite ? "filled" : "outlined"}
1382
+ @click=${this.handleFavoriteClick}
1383
+ ></cx-icon-button>
1384
+ </cx-tooltip>`
1385
+ )} `;
1386
+ }
1387
+ renderFailedActions() {
1388
+ return n`<cx-tooltip content=${this.localize.term("retry")} hoist>
1389
+ <cx-icon-button
1390
+ data-testid="asset__retry-button"
1391
+ name="refresh"
1392
+ @click=${this.handleRetryUploadClick}
1393
+ ></cx-icon-button>
1394
+ </cx-tooltip>`;
1395
+ }
1396
+ renderInProgressActions() {
1397
+ return n`<cx-tooltip
1398
+ content=${this.asset.isPaused ? this.localize.term("resume") : this.localize.term("pause")}
1399
+ hoist
1400
+ >
1401
+ <cx-icon-button
1402
+ data-testid=${this.asset.isPaused ? "asset__resume-button" : "asset__pause-button"}
1403
+ name=${this.asset.isPaused ? "play_arrow" : "pause"}
1404
+ variant="filled"
1405
+ @click=${this.handlePauseUploadClick}
1406
+ ></cx-icon-button>
1407
+ </cx-tooltip>`;
1408
+ }
1409
+ renderPinnedActions() {
1410
+ return n`${p(
1411
+ this.pinInProgressAssets.includes(this.asset.recordId),
1412
+ () => n`<cx-spinner class="asset__actions__spinner"></cx-spinner>`,
1413
+ () => n`<cx-tooltip
1414
+ content=${this.asset.isPinned ? this.localize.term("unpin") : this.localize.term("pin")}
1415
+ hoist
1416
+ >
1417
+ <cx-icon-button
1418
+ data-testid="asset__pin-button"
1419
+ name="keep"
1420
+ variant=${this.asset.isPinned ? "filled" : "outlined"}
1421
+ @click=${this.handlePinClick}
1422
+ ></cx-icon-button>
1423
+ </cx-tooltip>`
1424
+ )} `;
1425
+ }
1426
+ render() {
1427
+ return n`
1428
+ <div
1429
+ data-id=${this.asset.recordId}
1430
+ data-testid=${`asset-${this.asset.uploadStatus}`}
1431
+ class="asset"
1432
+ >
1433
+ ${this.renderThumbnail()}
1434
+ <div class="asset__description">
1435
+ <div class="asset__description__label">
1436
+ <cx-line-clamp class="asset__description__label__text" lines="1">
1437
+ <cx-typography variant="body3"
1438
+ >${this.asset.fileName}</cx-typography
1439
+ >
1440
+ </cx-line-clamp>
1441
+ </div>
1442
+ <div class="asset__description__status">
1443
+ ${p(
1444
+ this.listType === x.RECENT,
1445
+ () => n`
1446
+ <cx-typography
1447
+ variant="small"
1448
+ class="asset__description__status__time"
1449
+ >
1450
+ <cx-relative-time
1451
+ format="narrow"
1452
+ numeric="always"
1453
+ date=${new Date(this.asset.uploadTimestamp)}
1454
+ sync
1455
+ sync-interval=${O}
1456
+ ></cx-relative-time>
1457
+ </cx-typography>
1458
+ `
1459
+ )}
1460
+ ${p(
1461
+ this.listType === x.UPLOADS,
1462
+ () => this.renderUploadingStatus()
1463
+ )}
1464
+ ${p(
1465
+ this.listType === x.PINNED,
1466
+ () => this.renderPinnedStatus()
1467
+ )}
1468
+ </div>
1469
+ </div>
1470
+ <div class="asset__actions">
1471
+ ${p(this.showNormalActions, () => this.renderNormalActions())}
1472
+ ${p(
1473
+ this.showInProgressActions,
1474
+ () => this.renderInProgressActions()
1475
+ )}
1476
+ ${p(this.showFailedActions, () => this.renderFailedActions())}
1477
+ ${p(this.showPinnedActions, () => this.renderPinnedActions())}
1478
+ </div>
1479
+ </div>
1480
+ `;
1481
+ }
1482
+ };
1483
+ F.styles = [tt, Ue];
1484
+ F.dependencies = {
1485
+ "cx-file-on-demand-pinned-status": T,
1486
+ "cx-format-bytes": ot,
1487
+ "cx-icon": J,
1488
+ "cx-icon-button": St,
1489
+ "cx-line-clamp": Q,
1490
+ "cx-progress-bar": te,
1491
+ "cx-relative-time": It,
1492
+ "cx-spinner": ee,
1493
+ "cx-tooltip": wt,
1494
+ "cx-typography": nt
1495
+ };
1496
+ V([
1497
+ d({ type: Object })
1498
+ ], F.prototype, "asset", 2);
1499
+ V([
1500
+ d({
1501
+ attribute: "list-type",
1502
+ type: String
1503
+ })
1504
+ ], F.prototype, "listType", 2);
1505
+ V([
1506
+ d({
1507
+ attribute: "favorite-in-progress-assets",
1508
+ converter: {
1509
+ fromAttribute: (t) => t.split(" ").filter(Boolean),
1510
+ toAttribute: (t) => t.join(" ")
1511
+ },
1512
+ type: String
1513
+ })
1514
+ ], F.prototype, "favoriteInProgressAssets", 2);
1515
+ V([
1516
+ d({
1517
+ attribute: "pin-in-progress-assets",
1518
+ converter: {
1519
+ fromAttribute: (t) => t.split(" ").filter(Boolean),
1520
+ toAttribute: (t) => t.join(" ")
1521
+ },
1522
+ type: String
1523
+ })
1524
+ ], F.prototype, "pinInProgressAssets", 2);
1525
+ V([
1526
+ u()
1527
+ ], F.prototype, "thumbnailLoadError", 2);
1528
+ F = V([
1529
+ W("cx-file-on-demand-asset")
1530
+ ], F);
1531
+ const Oe = at`
1532
+ :host {
1533
+ --asset-height: 40px;
1534
+ display: block;
1535
+ color: var(--cx-color-neutral-900);
1536
+ height: 100%;
1537
+ --cx-button-text-transform: none;
1538
+ --tooltip-max-width: min(80vw, 640px);
1539
+ }
1540
+
1541
+ .container {
1542
+ display: block;
1543
+ height: 100%;
1544
+ }
1545
+
1546
+ .container--user-interaction-blocked {
1547
+ pointer-events: none;
1548
+ user-select: none;
1549
+ }
1550
+
1551
+ .loading-overlay {
1552
+ position: absolute;
1553
+ top: 0;
1554
+ left: 0;
1555
+ width: 100%;
1556
+ height: 100%;
1557
+ background-color: var(--cx-color-neutral-50);
1558
+ opacity: 0.8;
1559
+ display: flex;
1560
+ justify-content: center;
1561
+ align-items: center;
1562
+ z-index: var(--cx-z-index-tooltip); /* Ensure it is above other content */
1563
+ }
1564
+
1565
+ .assets,
1566
+ .welcome {
1567
+ height: 100%;
1568
+ display: flex;
1569
+ flex-direction: column;
1570
+ }
1571
+
1572
+ /* #region Icons */
1573
+ .assets-list__tab-group .empty-icon {
1574
+ color: var(--cx-color-neutral-600);
1575
+ font-size: var(--cx-font-size-3x-large);
1576
+ }
1577
+
1578
+ cx-tab {
1579
+ line-height: var(--cx-line-height-large);
1580
+ }
1581
+
1582
+ .assets-list__tab-group cx-tab {
1583
+ width: calc(100% / 4);
1584
+ }
1585
+
1586
+ .settings__tab-group cx-tab {
1587
+ width: calc(100% / 2);
1588
+ }
1589
+
1590
+ cx-tab::part(base) {
1591
+ display: flex;
1592
+ justify-content: center;
1593
+ }
1594
+
1595
+ cx-tab::part(label) {
1596
+ text-align: center;
1597
+ }
1598
+
1599
+ cx-tab-panel {
1600
+ --padding: 0 0 var(--cx-spacing-x-small) 0;
1601
+ }
1602
+
1603
+ cx-icon[slot='prefix'] {
1604
+ font-size: var(--cx-font-size-large);
1605
+ }
1606
+
1607
+ .error-message {
1608
+ color: var(--cx-color-danger);
1609
+ min-height: 1ch;
1610
+ }
1611
+
1612
+ /** welcome */
1613
+ .welcome {
1614
+ justify-content: center;
1615
+ align-items: center;
1616
+ padding: var(--cx-spacing-x-large) var(--cx-spacing-medium)
1617
+ var(--cx-spacing-medium) var(--cx-spacing-medium);
1618
+ gap: var(--cx-spacing-x-large);
1619
+ }
1620
+
1621
+ .welcome__message {
1622
+ display: flex;
1623
+ flex-direction: column;
1624
+ justify-content: center;
1625
+ align-items: center;
1626
+ gap: var(--cx-spacing-x-small);
1627
+ }
1628
+
1629
+ .welcome__actions {
1630
+ width: 100%;
1631
+ display: flex;
1632
+ flex-direction: column;
1633
+ justify-content: center;
1634
+ gap: var(--cx-spacing-x-small);
1635
+ }
1636
+
1637
+ .welcome__connect-button,
1638
+ .welcome__cancel-connection-button,
1639
+ .welcome__input {
1640
+ width: 100%;
1641
+ }
1642
+
1643
+ .welcome__connect-button--disabled::part(base) {
1644
+ cursor: help;
1645
+ }
1646
+
1647
+ .welcome .error-message {
1648
+ text-align: center;
1649
+ }
1650
+
1651
+ /** header */
1652
+ .header {
1653
+ display: flex;
1654
+ justify-content: space-between;
1655
+ background-color: var(--cx-color-neutral-50);
1656
+ padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
1657
+ line-height: 1;
1658
+ }
1659
+ .header__user {
1660
+ display: flex;
1661
+ align-items: center;
1662
+ gap: var(--cx-spacing-x-small);
1663
+ overflow: hidden;
1664
+ }
1665
+ .header__username {
1666
+ display: flex;
1667
+ overflow: hidden;
1668
+ }
1669
+ .header__username__text {
1670
+ flex-grow: 1;
1671
+ flex-shrink: 1;
1672
+ overflow: hidden;
1673
+ }
1674
+ .header__avatar {
1675
+ --size: 24px;
1676
+ }
1677
+ .header__actions {
1678
+ min-width: fit-content;
1679
+ }
1680
+
1681
+ .settings__version__badge::part(base) {
1682
+ width: var(--cx-spacing-x-small);
1683
+ padding: 0;
1684
+ }
1685
+
1686
+ /** assets list */
1687
+ .assets-list {
1688
+ flex: 1;
1689
+ height: 0;
1690
+ }
1691
+
1692
+ /** Make sure the overflown element is .recent__list
1693
+ * to trigger scroll event for infinite scroll
1694
+ */
1695
+ .assets-list__tab-group,
1696
+ .assets-list__tab-group::part(base),
1697
+ .assets-list__tab-group::part(body),
1698
+ .assets-list__tab-group cx-tab-panel,
1699
+ .assets-list__tab-group cx-tab-panel::part(base) {
1700
+ height: 100%;
1701
+ overflow: hidden;
1702
+ }
1703
+ .assets-list__tab-group .assets-list__tab-group__empty-message {
1704
+ display: flex;
1705
+ flex-direction: column;
1706
+ justify-content: center;
1707
+ align-items: center;
1708
+ gap: var(--cx-spacing-medium);
980
1709
  font-size: var(--cx-font-size-x-large);
981
1710
  padding: var(--cx-spacing-large) 0;
982
1711
  text-align: center;
983
1712
  }
984
1713
 
985
- .assets-list__tab-group .recent-empty,
986
- .assets-list__tab-group .uploads-empty {
1714
+ .assets-list__tab-group .assets-list__tab-group__empty-message:not(.favorites-empty) {
987
1715
  margin-top: 40px; /** to that they are aligned with favorite tab */
988
1716
  }
989
1717
 
990
1718
  .assets-list__tab-group .recent__list,
991
1719
  .assets-list__tab-group .favorites__list,
992
- .assets-list__tab-group .uploads__list {
1720
+ .assets-list__tab-group .uploads__list,
1721
+ .assets-list__tab-group .pinned__list {
993
1722
  height: 100%;
994
1723
  display: flex;
995
1724
  flex-direction: column;
@@ -997,7 +1726,8 @@ const Me = gt`
997
1726
  padding: 0 0 var(--cx-spacing-x-small) 0;
998
1727
  }
999
1728
 
1000
- .favorites-tab-panel__content {
1729
+ .favorites-tab-panel__content,
1730
+ .pinned-tab-panel__content {
1001
1731
  display: flex;
1002
1732
  flex-direction: column;
1003
1733
  height: 100%;
@@ -1009,7 +1739,8 @@ const Me = gt`
1009
1739
  align-items: center;
1010
1740
  }
1011
1741
 
1012
- .assets-list__tab-group .favorites__list {
1742
+ .assets-list__tab-group .favorites__list,
1743
+ .assets-list__tab-group .pinned__list {
1013
1744
  flex: 1;
1014
1745
  height: 0;
1015
1746
  }
@@ -1038,293 +1769,115 @@ const Me = gt`
1038
1769
  .status-footer .label {
1039
1770
  color: var(--cx-color-neutral-600);
1040
1771
  }
1772
+ .status-footer .cache-usage,
1041
1773
  .status-footer .connected-url,
1042
1774
  .status-footer .connection-status,
1043
- .status-footer .asset-index-sync-status {
1044
- display: flex;
1045
- justify-content: space-between;
1046
- align-items: center;
1047
- }
1048
-
1049
- .status-footer .label {
1050
- color: var(--cx-color-neutral-600);
1051
- }
1052
-
1053
- .status-footer__divider {
1054
- --spacing: 0;
1055
- margin-bottom: var(--cx-spacing-small);
1056
- }
1057
-
1058
- .connected-url .label {
1059
- white-space: nowrap;
1060
- }
1061
-
1062
- .connected-url .value-line-clamp {
1063
- padding: 0 var(--cx-spacing-2x-small);
1064
- }
1065
-
1066
- .connected-url .value::part(base) {
1067
- font-weight: var(--cx-font-weight-medium);
1068
- color: var(--cx-color-neutral-900);
1069
- }
1070
-
1071
- .connection-status__value {
1072
- display: flex;
1073
- align-items: center;
1074
- justify-content: center;
1075
- gap: var(--cx-spacing-2x-small);
1076
- cursor: help;
1077
- }
1078
- .connection-status__value cx-typography {
1079
- display: inline-flex;
1080
- }
1081
- .connection-status__value cx-typography::part(base) {
1082
- text-transform: capitalize;
1083
- font-weight: var(--cx-font-weight-medium);
1084
- }
1085
- .connection-status--excellent .connection-status__value {
1086
- color: var(--cx-color-success);
1087
- }
1088
- .connection-status--good .connection-status__value {
1089
- color: var(--cx-color-warning);
1090
- }
1091
- .connection-status--bad .connection-status__value {
1092
- color: var(--cx-color-danger);
1093
- }
1094
- .connection-status cx-icon {
1095
- font-size: var(--cx-font-size-medium);
1096
- }
1097
-
1098
- .asset-index-sync-status .value {
1099
- display: flex;
1100
- align-items: center;
1101
- justify-content: center;
1102
- gap: var(--cx-spacing-2x-small);
1103
- }
1104
- .asset-index-sync-status .value cx-typography {
1105
- display: inline-flex;
1106
- }
1107
- .asset-index-sync-status .value cx-typography::part(base) {
1108
- text-transform: capitalize;
1109
- font-weight: var(--cx-font-weight-medium);
1110
- }
1111
- .asset-index-sync-status--loaded .value {
1112
- color: var(--cx-color-success);
1113
- }
1114
- .asset-index-sync-status--loading .value {
1115
- color: var(--cx-color-warning);
1116
- }
1117
- .asset-index-sync-status--error .value {
1118
- color: var(--cx-color-danger);
1119
- }
1120
- .asset-index-sync-status cx-icon {
1121
- font-size: var(--cx-font-size-medium);
1122
- }
1123
-
1124
- /** asset */
1125
- .asset {
1126
- max-height: var(--asset-height);
1127
- display: flex;
1128
- gap: var(--cx-spacing-small);
1129
- padding: var(--cx-spacing-2x-small) var(--cx-spacing-small);
1130
- }
1131
- .asset:hover {
1132
- background-color: var(--cx-input-filled-background-color-hover);
1133
- }
1134
- .asset__actions {
1135
- display: flex;
1136
- min-width: 64px;
1137
- justify-content: flex-end;
1138
- align-items: center;
1139
- }
1140
- .asset:hover .asset__actions {
1141
- visibility: visible;
1142
- opacity: 1;
1143
- }
1144
- .asset__actions {
1145
- visibility: hidden;
1146
- opacity: 0;
1147
- }
1148
- .favorite__spinner {
1149
- min-height: var(--cx-input-height-medium);
1150
- min-width: var(--cx-input-height-medium);
1151
- display: flex;
1152
- justify-content: center;
1153
- align-items: center;
1154
- }
1155
- .favorite__spinner::part(base) {
1156
- flex-grow: 0;
1157
- }
1158
- .asset__thumbnail {
1159
- width: 56px;
1160
- height: var(--asset-height);
1161
- display: flex;
1162
- justify-content: center;
1163
- align-items: center;
1164
- position: relative;
1165
- border-radius: var(--cx-border-radius-medium);
1166
- }
1167
- .asset__thumbnail--placeholder {
1168
- background-color: var(--cx-color-primary-50);
1169
- }
1170
- .asset__thumbnail--folder {
1171
- background-color: var(--cx-color-neutral-100);
1172
- }
1173
-
1174
- .asset__thumbnail__image {
1175
- height: 100%;
1176
- width: 100%;
1177
- object-fit: cover;
1178
- flex-shrink: 0;
1179
- border-radius: var(--cx-border-radius-medium);
1180
- }
1181
- .asset__thumbnail__icon {
1182
- --font-size: 38px;
1183
- display: none;
1184
- color: var(--cx-color-primary-400);
1185
- }
1186
- .asset__folder__icon {
1187
- --font-size: var(--cx-font-size-x-large);
1188
- color: var(--cx-color-neutral-600);
1189
- }
1190
-
1191
- .asset__thumbnail__extension {
1192
- display: none;
1193
- position: absolute;
1194
- bottom: var(--cx-spacing-3x-small);
1195
- left: 50%;
1196
- transform: translateX(-50%);
1197
- width: 26px;
1198
- color: var(--cx-color-primary-50);
1199
- }
1200
-
1201
- .asset__thumbnail__extension__line-clamp {
1202
- width: 100%;
1203
- text-align: center;
1204
- }
1205
-
1206
- .asset__thumbnail__extension__text {
1207
- flex-grow: 1;
1208
- flex-shrink: 1;
1209
- overflow: hidden;
1210
- text-transform: uppercase;
1211
- }
1212
-
1213
- .asset__thumbnail--placeholder .asset__thumbnail__image {
1214
- display: none;
1215
- }
1216
-
1217
- .asset__thumbnail--placeholder .asset__thumbnail__icon,
1218
- .asset__thumbnail--placeholder .asset__thumbnail__extension {
1219
- display: flex;
1220
- }
1221
- .asset__description {
1222
- flex: 1;
1223
- width: 0;
1224
- display: flex;
1225
- flex-direction: column;
1226
- justify-content: center;
1227
- }
1228
- .asset__description__label {
1229
- display: flex;
1230
- }
1231
- .asset__description__label__text {
1232
- flex-grow: 1;
1233
- flex-shrink: 1;
1234
- overflow: hidden;
1235
- }
1236
- .asset__description__status {
1237
- color: var(--cx-color-neutral-500);
1238
- line-height: var(--cx-line-height-medium);
1239
- }
1240
-
1241
- .uploads__list .asset-group__label {
1242
- display: flex;
1243
- justify-content: space-between;
1244
- align-items: center;
1245
- }
1246
-
1247
- .asset-group__clear-button::part(base) {
1248
- color: var(--cx-color-primary-500);
1249
- font-size: var(--cx-font-size-x-small);
1250
- }
1251
-
1252
- .asset-group__label {
1253
- padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
1254
- color: var(--cx-color-neutral-400);
1255
- line-height: var(--cx-line-height-large);
1256
- }
1257
-
1258
- /** uploads assets */
1259
- cx-progress-bar {
1260
- --height: 4px;
1261
- --indicator-color: var(--color);
1262
- --track-color: var(--cx-color-neutral-300);
1263
- z-index: 0;
1264
- }
1265
- .uploading-progress,
1266
- .syncing-progress,
1267
- .completed-progress,
1268
- .failed-progress,
1269
- .canceled-progress {
1775
+ .status-footer .asset-index-sync-status {
1270
1776
  display: flex;
1777
+ justify-content: space-between;
1271
1778
  align-items: center;
1272
- width: 100%;
1273
- gap: var(--cx-spacing-2x-small);
1274
- margin-top: var(--cx-spacing-3x-small);
1275
1779
  }
1276
1780
 
1277
- .syncing-progress,
1278
- .completed-progress,
1279
- .failed-progress,
1280
- .canceled-progress {
1281
- margin-top: var(--cx-spacing-2x-small);
1781
+ .status-footer .label {
1782
+ color: var(--cx-color-neutral-600);
1783
+ }
1784
+
1785
+ .status-footer__divider {
1786
+ --spacing: 0;
1787
+ margin-bottom: var(--cx-spacing-small);
1282
1788
  }
1283
1789
 
1284
- .uploading-progress *,
1285
- .syncing-progress *,
1286
- .completed-progress *,
1287
- .failed-progress *,
1288
- .canceled-progress * {
1790
+ .connected-url .label {
1289
1791
  white-space: nowrap;
1290
1792
  }
1291
1793
 
1292
- .uploading-progress cx-icon,
1293
- .syncing-progress cx-icon,
1294
- .completed-progress cx-icon,
1295
- .failed-progress cx-icon,
1296
- .canceled-progress cx-icon {
1297
- --font-size: var(--cx-font-size-medium);
1794
+ .connected-url .value-line-clamp {
1795
+ padding: 0 var(--cx-spacing-2x-small);
1298
1796
  }
1299
1797
 
1300
- .uploading-progress cx-typography::part(base),
1301
- .syncing-progress cx-typography::part(base),
1302
- .completed-progress cx-typography::part(base),
1303
- .failed-progress cx-typography::part(base),
1304
- .canceled-progress cx-typography::part(base) {
1305
- line-height: var(--cx-font-size-medium);
1798
+ .connected-url .value::part(base) {
1799
+ font-weight: var(--cx-font-weight-medium);
1800
+ color: var(--cx-color-neutral-900);
1306
1801
  }
1307
1802
 
1308
- .uploading-progress cx-icon {
1309
- color: var(--cx-color-primary-500);
1803
+ .cache-usage__warning-icon {
1804
+ color: var(--cx-color-warning-500);
1310
1805
  }
1311
1806
 
1312
- .syncing-progress cx-icon {
1313
- color: var(--cx-color-warning);
1807
+ .status-footer .cache-usage .label {
1808
+ color: var(--cx-color-primary-600);
1314
1809
  }
1315
1810
 
1316
- .completed-progress cx-icon {
1811
+ .connection-status__value {
1812
+ display: flex;
1813
+ align-items: center;
1814
+ justify-content: center;
1815
+ gap: var(--cx-spacing-2x-small);
1816
+ cursor: help;
1817
+ }
1818
+ .connection-status__value cx-typography {
1819
+ display: inline-flex;
1820
+ }
1821
+ .connection-status__value cx-typography::part(base) {
1822
+ text-transform: capitalize;
1823
+ font-weight: var(--cx-font-weight-medium);
1824
+ }
1825
+ .connection-status--excellent .connection-status__value {
1317
1826
  color: var(--cx-color-success);
1318
1827
  }
1828
+ .connection-status--good .connection-status__value {
1829
+ color: var(--cx-color-warning);
1830
+ }
1831
+ .connection-status--bad .connection-status__value {
1832
+ color: var(--cx-color-danger);
1833
+ }
1834
+ .connection-status cx-icon {
1835
+ font-size: var(--cx-font-size-medium);
1836
+ }
1319
1837
 
1320
- .failed-progress cx-icon,
1321
- .failed-progress__text {
1838
+ .asset-index-sync-status .value {
1839
+ display: flex;
1840
+ align-items: center;
1841
+ justify-content: center;
1842
+ gap: var(--cx-spacing-2x-small);
1843
+ }
1844
+ .asset-index-sync-status .value cx-typography {
1845
+ display: inline-flex;
1846
+ }
1847
+ .asset-index-sync-status .value cx-typography::part(base) {
1848
+ text-transform: capitalize;
1849
+ font-weight: var(--cx-font-weight-medium);
1850
+ }
1851
+ .asset-index-sync-status--loaded .value {
1852
+ color: var(--cx-color-success);
1853
+ }
1854
+ .asset-index-sync-status--loading .value {
1855
+ color: var(--cx-color-warning);
1856
+ }
1857
+ .asset-index-sync-status--error .value {
1322
1858
  color: var(--cx-color-danger);
1323
- cursor: help;
1324
1859
  }
1860
+ .asset-index-sync-status cx-icon {
1861
+ font-size: var(--cx-font-size-medium);
1862
+ }
1863
+
1325
1864
 
1326
- .canceled-progress cx-icon {
1327
- color: var(--cx-color-neutral-600);
1865
+ /** asset */
1866
+ .uploads__list .asset-group__label {
1867
+ display: flex;
1868
+ justify-content: space-between;
1869
+ align-items: center;
1870
+ }
1871
+
1872
+ .asset-group__clear-button::part(base) {
1873
+ color: var(--cx-color-primary-500);
1874
+ font-size: var(--cx-font-size-x-small);
1875
+ }
1876
+
1877
+ .asset-group__label {
1878
+ padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
1879
+ color: var(--cx-color-neutral-400);
1880
+ line-height: var(--cx-line-height-large);
1328
1881
  }
1329
1882
 
1330
1883
  /** #region Settings */
@@ -1423,8 +1976,9 @@ const Me = gt`
1423
1976
 
1424
1977
  .settings__cache__size {
1425
1978
  display: flex;
1426
- gap: var(--cx-spacing-small);
1427
- align-items: center;
1979
+ gap: var(--cx-spacing-x-small);
1980
+ justify-content: center;
1981
+ flex-direction: column;
1428
1982
  }
1429
1983
  .settings__cache__size cx-input {
1430
1984
  width: 150px;
@@ -1434,7 +1988,8 @@ const Me = gt`
1434
1988
  flex-direction: column;
1435
1989
  gap: var(--cx-spacing-small);
1436
1990
  }
1437
- .settings__cache__location__label {
1991
+ .settings__cache__location__label,
1992
+ .settings__cache__size__label {
1438
1993
  --color: var(--cx-color-neutral-600);
1439
1994
  }
1440
1995
  .settings__cache__location__value {
@@ -1513,16 +2068,17 @@ const Me = gt`
1513
2068
  justify-content: flex-end;
1514
2069
  }
1515
2070
  `;
1516
- var Be = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, c = (t, e, i, o) => {
1517
- for (var s = o > 1 ? void 0 : o ? Ve(e, i) : e, a = t.length - 1, l; a >= 0; a--)
1518
- (l = t[a]) && (s = (o ? l(e, i, s) : l(s)) || s);
1519
- return o && s && Be(e, i, s), s;
2071
+ var Ne = Object.defineProperty, je = Object.getOwnPropertyDescriptor, c = (t, e, i, a) => {
2072
+ for (var s = a > 1 ? void 0 : a ? je(e, i) : e, o = t.length - 1, l; o >= 0; o--)
2073
+ (l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
2074
+ return a && s && Ne(e, i, s), s;
1520
2075
  };
1521
- let n = class extends Y {
2076
+ let r = class extends H {
1522
2077
  constructor() {
1523
- super(...arguments), this.localize = new Z(this), this.connectionEstablished = !1, this.connectionStatus = "excellent", this.connectionStatusTooltip = "", this.assetIndexSyncStatus = "loading", this.userAvatarUrl = "", this.username = "", this.recentAssets = { assets: [], hasMore: !1 }, this.favoriteAssets = { assets: [], hasMore: !1 }, this.favoritesLastSync = Date.now(), this.favoriteInProgressAssets = [], this.uploadingAssets = { assets: [], hasMore: !1 }, this.availableFolderIdentifiers = [], this.isLoading = !1, this.settings = {
2078
+ super(...arguments), this.localize = new q(this), this.connectionEstablished = !1, this.connectionStatus = "excellent", this.connectionStatusTooltip = "", this.assetIndexSyncStatus = "loading", this.userAvatarUrl = "", this.username = "", this.recentAssets = { assets: [], hasMore: !1 }, this.favoriteAssets = { assets: [], hasMore: !1 }, this.favoritesLastSync = Date.now(), this.favoriteInProgressAssets = [], this.pinInProgressAssets = [], this.uploadingAssets = { assets: [], hasMore: !1 }, this.pinnedAssets = { assets: [], hasMore: !1 }, this.availableFolderIdentifiers = [], this.isLoading = !1, this.settings = {
1524
2079
  cacheLocation: "Default",
1525
2080
  cacheSize: 0,
2081
+ cacheUsage: 0,
1526
2082
  config: {
1527
2083
  latestVersion: "",
1528
2084
  monitoringActivated: !1,
@@ -1537,31 +2093,31 @@ let n = class extends Y {
1537
2093
  // maxDownloadRate: 0,
1538
2094
  // maxUploadRate: 0,
1539
2095
  }
1540
- }, this.pickCacheLocation = async () => "Default", this.hasNewVersion = !1, this.aboutContent = "", this.token = "", this.userInteractionBlocked = !1, this.isConnecting = !1, this.isCancellingConnection = !1, this.isDisconnecting = !1, this.isUpgrading = !1, this.isSettingsOpened = !1, this.rootIDs = this.settings.config.rootIDs, this._activeFoldersMode = this.rootIDs.length > 0, this.removedIds = [], this.cacheSize = H({
2096
+ }, this.pickCacheLocation = async () => "Default", this.hasNewVersion = !1, this.aboutContent = "", this.token = "", this.userInteractionBlocked = !1, this.isConnecting = !1, this.isCancellingConnection = !1, this.isDisconnecting = !1, this.isUpgrading = !1, this.isSettingsOpened = !1, this.rootIDs = this.settings.config.rootIDs, this._activeFoldersMode = this.rootIDs.length > 0, this.removedIds = [], this.cacheSize = et({
1541
2097
  decimals: 2,
1542
2098
  inputUnit: "B",
1543
- targetUnit: B,
2099
+ targetUnit: Z,
1544
2100
  value: this.settings.cacheSize ?? 0
1545
- }), this.cacheLocation = this.settings.cacheLocation, this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl, this.isRecentAssetsLoading = !1, this.isFavoriteAssetsLoading = !1, this.isUploadingAssetsLoading = !1, this.connectError = "", this.disconnectError = "", this.upgradeError = "", this.totalCount = 0, this.folderPathsSet = /* @__PURE__ */ new Set(), this.validConnectionUrl = !1, this.isAddingRootIDs = !1, this.fetchFolders = async ({
2101
+ }), this.cacheLocation = this.settings.cacheLocation, this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl, this.isRecentAssetsLoading = !1, this.isFavoriteAssetsLoading = !1, this.isUploadingAssetsLoading = !1, this.isPinnedAssetsLoading = !1, this.connectError = "", this.disconnectError = "", this.upgradeError = "", this.totalCount = 0, this.folderPathsSet = /* @__PURE__ */ new Set(), this.validConnectionUrl = !1, this.isAddingRootIDs = !1, this.fetchFolders = async ({
1546
2102
  excludes: t = [],
1547
2103
  folderId: e,
1548
2104
  folderPathsSet: i,
1549
- limit: o = void 0,
2105
+ limit: a = void 0,
1550
2106
  start: s = 0
1551
2107
  }) => {
1552
2108
  try {
1553
- return await vt({
2109
+ return await Ct({
1554
2110
  excludes: t,
1555
2111
  folderId: e,
1556
2112
  folderPathsSet: i,
1557
- limit: o,
2113
+ limit: a,
1558
2114
  searchText: this.searchText,
1559
2115
  siteUrl: this.settings.config.siteUrl,
1560
2116
  start: s,
1561
2117
  token: this.token
1562
2118
  });
1563
- } catch (a) {
1564
- a instanceof Error && a.message === "Failed to fetch" && this.emit("cx-renew-token");
2119
+ } catch (o) {
2120
+ o instanceof Error && o.message === "Failed to fetch" && this.emit("cx-renew-token");
1565
2121
  }
1566
2122
  return {
1567
2123
  data: this.availableFolderIdentifiers,
@@ -1591,7 +2147,7 @@ let n = class extends Y {
1591
2147
  }
1592
2148
  fetchData() {
1593
2149
  if (!this.connectionEstablished) {
1594
- this.validConnectionUrl = V(this.settings.config.siteUrl);
2150
+ this.validConnectionUrl = K(this.settings.config.siteUrl);
1595
2151
  return;
1596
2152
  }
1597
2153
  this.folderPathsSet = /* @__PURE__ */ new Set(), this.fetchFolders({
@@ -1603,24 +2159,24 @@ let n = class extends Y {
1603
2159
  }
1604
2160
  // set recent tab as active when connection is established
1605
2161
  async showRecentTab() {
1606
- this.connectionEstablished && (await this.updateComplete, await this.assetsListTabGroup?.updateComplete, this.assetsListTabGroup?.show(b.RECENT));
2162
+ this.connectionEstablished && (await this.updateComplete, await this.assetsListTabGroup?.updateComplete, this.assetsListTabGroup?.show(x.RECENT));
1607
2163
  }
1608
2164
  updateSettingsStates() {
1609
- this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize = H({
2165
+ this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize = et({
1610
2166
  decimals: 2,
1611
2167
  inputUnit: "B",
1612
- targetUnit: B,
2168
+ targetUnit: Z,
1613
2169
  value: this.settings.cacheSize ?? 0
1614
- }), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl = V(this.settings.config.siteUrl);
2170
+ }), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl = K(this.settings.config.siteUrl);
1615
2171
  }
1616
2172
  get formHasChanges() {
1617
- return this.settings.cacheSize !== this.cacheSize || this.settings.cacheLocation !== this.cacheLocation || !!G(this.settings.config.proxyTypes, this.proxyTypes).length || !!G(this.settings.config.rootIDs, this.rootIDs).length;
2173
+ return this.settings.cacheSize !== this.cacheSize || this.settings.cacheLocation !== this.cacheLocation || !!st(this.settings.config.proxyTypes, this.proxyTypes).length || !!st(this.settings.config.rootIDs, this.rootIDs).length;
1618
2174
  }
1619
2175
  connect(t = null) {
1620
2176
  if (t?.preventDefault(), this.connectError = "", !this.siteUrl?.trim())
1621
2177
  return;
1622
- const e = at(this.siteUrl);
1623
- if (!V(e)) {
2178
+ const e = ht(this.siteUrl);
2179
+ if (!K(e)) {
1624
2180
  this.connectError = this.localize.term("pleaseEnterAValidUrl");
1625
2181
  return;
1626
2182
  }
@@ -1663,34 +2219,6 @@ let n = class extends Y {
1663
2219
  }
1664
2220
  });
1665
2221
  }
1666
- retryUpload(t) {
1667
- this.emit("cx-retry-upload", {
1668
- detail: {
1669
- assetId: t
1670
- }
1671
- });
1672
- }
1673
- pauseUpload(t) {
1674
- this.emit("cx-pause-upload", {
1675
- detail: {
1676
- assetId: t
1677
- }
1678
- });
1679
- }
1680
- resumeUpload(t) {
1681
- this.emit("cx-resume-upload", {
1682
- detail: {
1683
- assetId: t
1684
- }
1685
- });
1686
- }
1687
- cancelUpload(t) {
1688
- this.emit("cx-cancel-upload", {
1689
- detail: {
1690
- assetId: t
1691
- }
1692
- });
1693
- }
1694
2222
  clearUpload() {
1695
2223
  this.emit("cx-clear-upload");
1696
2224
  }
@@ -1699,12 +2227,13 @@ let n = class extends Y {
1699
2227
  detail: {
1700
2228
  settings: {
1701
2229
  cacheLocation: this.cacheLocation,
1702
- cacheSize: H({
2230
+ cacheSize: et({
1703
2231
  decimals: 2,
1704
- inputUnit: B,
2232
+ inputUnit: Z,
1705
2233
  targetUnit: "B",
1706
2234
  value: this.cacheSize
1707
2235
  }),
2236
+ cacheUsage: this.settings.cacheUsage,
1708
2237
  config: {
1709
2238
  latestVersion: this.settings.config.latestVersion,
1710
2239
  monitoringActivated: this.settings.config.monitoringActivated,
@@ -1725,20 +2254,6 @@ let n = class extends Y {
1725
2254
  }
1726
2255
  });
1727
2256
  }
1728
- markFavorite(t) {
1729
- this.emit("cx-mark-favorite", {
1730
- detail: {
1731
- assetId: t
1732
- }
1733
- });
1734
- }
1735
- unmarkFavorite(t) {
1736
- this.emit("cx-unmark-favorite", {
1737
- detail: {
1738
- assetId: t
1739
- }
1740
- });
1741
- }
1742
2257
  openSearch() {
1743
2258
  this.emit("cx-open-search");
1744
2259
  }
@@ -1762,7 +2277,7 @@ let n = class extends Y {
1762
2277
  if (!this.recentAssetsList)
1763
2278
  return;
1764
2279
  const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.recentAssetsList;
1765
- !this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e - W && (this.isRecentAssetsLoading = !0, this.emit("cx-load-more", {
2280
+ !this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e - X && (this.isRecentAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
1766
2281
  detail: {
1767
2282
  type: "recent"
1768
2283
  }
@@ -1775,12 +2290,25 @@ let n = class extends Y {
1775
2290
  if (!this.favoritesAssetsList)
1776
2291
  return;
1777
2292
  const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.favoritesAssetsList;
1778
- !this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e - W && (this.isFavoriteAssetsLoading = !0, this.emit("cx-load-more", {
2293
+ !this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e - X && (this.isFavoriteAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
1779
2294
  detail: {
1780
2295
  type: "favorites"
1781
2296
  }
1782
2297
  }));
1783
2298
  }
2299
+ requestMorePinnedAssets() {
2300
+ if (!this.pinnedAssetsList)
2301
+ return;
2302
+ const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.pinnedAssetsList;
2303
+ !this.isPinnedAssetsLoading && this.pinnedAssets.hasMore && i + t >= e - X && (this.isPinnedAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
2304
+ detail: {
2305
+ type: "pinned"
2306
+ }
2307
+ }));
2308
+ }
2309
+ onPinnedAssetsChanged() {
2310
+ this.isPinnedAssetsLoading = !1;
2311
+ }
1784
2312
  onFavoriteAssetsChanged() {
1785
2313
  this.isFavoriteAssetsLoading = !1;
1786
2314
  }
@@ -1788,7 +2316,7 @@ let n = class extends Y {
1788
2316
  if (!this.uploadsAssetsList)
1789
2317
  return;
1790
2318
  const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.uploadsAssetsList;
1791
- !this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e - W && (this.isUploadingAssetsLoading = !0, this.emit("cx-load-more", {
2319
+ !this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e - X && (this.isUploadingAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
1792
2320
  detail: {
1793
2321
  type: "uploads"
1794
2322
  }
@@ -1800,9 +2328,9 @@ let n = class extends Y {
1800
2328
  async updateActiveFolderIdentifiers(t) {
1801
2329
  const e = this.rootIDs;
1802
2330
  this.rootIDs = t, await this.updateComplete;
1803
- const i = this.container.querySelectorAll("cx-tree-item"), o = G(this.rootIDs, e);
2331
+ const i = this.container.querySelectorAll("cx-tree-item"), a = st(this.rootIDs, e);
1804
2332
  i.forEach((s) => {
1805
- o.includes(s.dataset.id ?? "") && ht(s);
2333
+ a.includes(s.dataset.id ?? "") && vt(s);
1806
2334
  });
1807
2335
  }
1808
2336
  // #region Render
@@ -1810,233 +2338,78 @@ let n = class extends Y {
1810
2338
  const t = () => {
1811
2339
  this.openDrive();
1812
2340
  };
1813
- return r`
2341
+ return n`
1814
2342
  <div class="header">
1815
2343
  <div class="header__user">
1816
2344
  <cx-avatar
1817
2345
  class="header__avatar"
1818
- image=${this.userAvatarUrl}
1819
- label=${this.username}
1820
- ></cx-avatar>
1821
- <div class="header__username">
1822
- <cx-line-clamp lines="1" class="header__username__text">
1823
- <cx-typography variant="body3">${this.username}</cx-typography>
1824
- </cx-line-clamp>
1825
- </div>
1826
- </div>
1827
- <div class="header__actions">
1828
- <cx-tooltip content=${this.localize.term("search")} hoist>
1829
- <cx-icon-button
1830
- data-testid="header__search-button"
1831
- name="search"
1832
- @click=${this.openSearch}
1833
- ></cx-icon-button>
1834
- </cx-tooltip>
1835
- <cx-tooltip content=${this.localize.term("openDrive")} hoist>
1836
- <cx-icon-button
1837
- data-testid="header__drive-button"
1838
- name="folder_open"
1839
- @click=${t}
1840
- ></cx-icon-button>
1841
- </cx-tooltip>
1842
- <cx-tooltip content=${this.localize.term("settings")} hoist>
1843
- <cx-icon-button
1844
- data-testid="header__settings-button"
1845
- class="header__settings"
1846
- name="settings"
1847
- @click=${this.showSettings}
1848
- >
1849
- ${g(
1850
- this.hasNewVersion,
1851
- () => r`<cx-badge
1852
- class="settings__version__badge"
1853
- slot="badge"
1854
- variant="danger"
1855
- pill
1856
- size="x-small"
1857
- ></cx-badge>`
1858
- )}
1859
- </cx-icon-button>
1860
- </cx-tooltip>
1861
- </div>
1862
- </div>
1863
- `;
1864
- }
1865
- // #region Assets
1866
- renderAsset(t, e) {
1867
- const i = r`
1868
- ${this.renderProgress({
1869
- isPaused: t.isPaused,
1870
- progress: (t.size ?? 0) - (t.remainingSize ?? 0),
1871
- remainingTime: t.remainingTime,
1872
- size: t.size ?? 0,
1873
- timestamp: t.uploadTimestamp,
1874
- uploadErrorMessage: t.uploadErrorMessage,
1875
- uploadStatus: t.uploadStatus
1876
- })}
1877
- `, o = (I) => {
1878
- I.target && I.target.parentElement.classList.add("placeholder");
1879
- }, s = (I) => {
1880
- I.target && I.target.parentElement.classList.remove("placeholder");
1881
- }, a = pe.includes(
1882
- (t.docType ?? "").toLowerCase()
1883
- ), l = r`<div
1884
- class=${A({
1885
- asset__thumbnail: !0,
1886
- "asset__thumbnail--folder": a,
1887
- "asset__thumbnail--placeholder": !t.thumbnail?.trim()
1888
- })}
1889
- >
1890
- ${g(
1891
- a,
1892
- () => r`<cx-icon
1893
- class="asset__folder__icon"
1894
- name="folder_special"
1895
- ></cx-icon>`,
1896
- () => r`<img
1897
- class="asset__thumbnail__image"
1898
- src=${t.thumbnail}
1899
- @error=${o}
1900
- @load=${s}
1901
- />
1902
- <cx-icon
1903
- class="asset__thumbnail__icon"
1904
- name="insert_drive_file"
1905
- variant="filled"
1906
- ></cx-icon>
1907
- <div class="asset__thumbnail__extension">
1908
- <cx-line-clamp
1909
- class="asset__thumbnail__extension__line-clamp"
1910
- lines="1"
1911
- >
1912
- <cx-typography
1913
- class="asset__thumbnail__extension__text"
1914
- variant="small"
1915
- >
1916
- ${ge(t.fileName)}
1917
- </cx-typography>
1918
- </cx-line-clamp>
1919
- </div>`
1920
- )}
1921
- </div>`, d = () => {
1922
- this.openDrive(t);
1923
- }, m = () => {
1924
- t.isInFavorite ? this.unmarkFavorite(t.recordId) : this.markFavorite(t.recordId);
1925
- }, u = r`<cx-tooltip
1926
- content=${this.localize.term("openInDrive")}
1927
- hoist
1928
- >
1929
- <cx-icon-button
1930
- data-testid="asset__drive-button"
1931
- name="folder_open"
1932
- @click=${d}
1933
- ></cx-icon-button>
1934
- </cx-tooltip>
1935
- ${g(
1936
- this.favoriteInProgressAssets.includes(t.recordId),
1937
- () => r`<cx-spinner class="favorite__spinner"></cx-spinner>`,
1938
- () => r`<cx-tooltip
1939
- content=${t.isInFavorite ? this.localize.term("unfavorite") : this.localize.term("favorite")}
1940
- hoist
1941
- >
1942
- <cx-icon-button
1943
- data-testid="asset__favorite-button"
1944
- name="star"
1945
- variant=${t.isInFavorite ? "filled" : "outlined"}
1946
- @click=${m}
1947
- ></cx-icon-button>
1948
- </cx-tooltip>`
1949
- )} `, h = () => {
1950
- t.uploadId && this.retryUpload(t.uploadId);
1951
- }, f = () => {
1952
- t.uploadId && (t.isPaused ? this.resumeUpload(t.uploadId) : this.pauseUpload(t.uploadId));
1953
- }, _ = r`</cx-tooltip
1954
- ><cx-tooltip content=${this.localize.term("retry")} hoist>
1955
- <cx-icon-button
1956
- data-testid="asset__retry-button"
1957
- name="refresh"
1958
- @click=${h}
1959
- ></cx-icon-button>
1960
- </cx-tooltip>`, z = r`<cx-tooltip
1961
- content=${t.isPaused ? this.localize.term("resume") : this.localize.term("pause")}
1962
- hoist
1963
- >
1964
- <cx-icon-button
1965
- data-testid=${t.isPaused ? "asset__resume-button" : "asset__pause-button"}
1966
- name=${t.isPaused ? "play_arrow" : "pause"}
1967
- variant="filled"
1968
- @click=${f}
1969
- ></cx-icon-button>
1970
- </cx-tooltip>`;
1971
- return r`
1972
- <div
1973
- data-id=${t.recordId}
1974
- data-testid=${`asset-${t.uploadStatus}`}
1975
- class="asset"
1976
- >
1977
- ${l}
1978
- <div class="asset__description">
1979
- <div class="asset__description__label">
1980
- <cx-line-clamp class="asset__description__label__text" lines="1">
1981
- <cx-typography variant="body3">${t.fileName}</cx-typography>
1982
- </cx-line-clamp>
1983
- </div>
1984
- <div class="asset__description__status">
1985
- ${g(
1986
- e === b.RECENT,
1987
- () => r`
1988
- <cx-typography
1989
- variant="small"
1990
- class="asset__description__status__time"
1991
- >
1992
- <cx-relative-time
1993
- format="narrow"
1994
- numeric="always"
1995
- date=${new Date(t.uploadTimestamp)}
1996
- sync
1997
- sync-interval=${U}
1998
- ></cx-relative-time>
1999
- </cx-typography>
2000
- `
2001
- )}
2002
- ${g(
2003
- e === b.UPLOADS,
2004
- () => i
2005
- )}
2346
+ image=${this.userAvatarUrl}
2347
+ label=${this.username}
2348
+ ></cx-avatar>
2349
+ <div class="header__username">
2350
+ <cx-line-clamp lines="1" class="header__username__text">
2351
+ <cx-typography variant="body3">${this.username}</cx-typography>
2352
+ </cx-line-clamp>
2006
2353
  </div>
2007
2354
  </div>
2008
- <div class="asset__actions">
2009
- ${g(
2010
- [T.Success, T.PendingComplete].includes(
2011
- t.uploadStatus
2012
- ) || !t.uploadStatus?.trim(),
2013
- () => u
2014
- )}
2015
- ${g(
2016
- [T.InProgress].includes(
2017
- t.uploadStatus
2018
- ),
2019
- () => z
2020
- )}
2021
- ${g(
2022
- [T.Failed].includes(t.uploadStatus),
2023
- () => _
2355
+ <div class="header__actions">
2356
+ <cx-tooltip content=${this.localize.term("search")} hoist>
2357
+ <cx-icon-button
2358
+ data-testid="header__search-button"
2359
+ name="search"
2360
+ @click=${this.openSearch}
2361
+ ></cx-icon-button>
2362
+ </cx-tooltip>
2363
+ <cx-tooltip content=${this.localize.term("openDrive")} hoist>
2364
+ <cx-icon-button
2365
+ data-testid="header__drive-button"
2366
+ name="folder_open"
2367
+ @click=${t}
2368
+ ></cx-icon-button>
2369
+ </cx-tooltip>
2370
+ <cx-tooltip content=${this.localize.term("settings")} hoist>
2371
+ <cx-icon-button
2372
+ data-testid="header__settings-button"
2373
+ class="header__settings"
2374
+ name="settings"
2375
+ @click=${this.showSettings}
2376
+ >
2377
+ ${p(
2378
+ this.hasNewVersion,
2379
+ () => n`<cx-badge
2380
+ class="settings__version__badge"
2381
+ slot="badge"
2382
+ variant="danger"
2383
+ pill
2384
+ size="x-small"
2385
+ ></cx-badge>`
2024
2386
  )}
2387
+ </cx-icon-button>
2388
+ </cx-tooltip>
2025
2389
  </div>
2026
2390
  </div>
2027
2391
  `;
2028
2392
  }
2393
+ // #region Assets
2394
+ renderAsset(t, e) {
2395
+ return n`<cx-file-on-demand-asset
2396
+ .asset=${t}
2397
+ .listType=${e}
2398
+ .favoriteInProgressAssets=${this.favoriteInProgressAssets}
2399
+ .pinInProgressAssets=${this.pinInProgressAssets}
2400
+ ></cx-file-on-demand-asset>`;
2401
+ }
2029
2402
  renderRecentAssets() {
2030
- const t = r`
2031
- <div class="recent-empty">
2403
+ const t = n`
2404
+ <div class="recent-empty assets-list__tab-group__empty-message">
2032
2405
  <cx-icon class="empty-icon" name="explore"></cx-icon>
2033
2406
  <cx-typography variant="body2">
2034
2407
  ${this.localize.term("allViewedAssetsWillBeVisibleHere")}
2035
2408
  </cx-typography>
2036
2409
  </div>
2037
- `, [e, i] = st(
2410
+ `, [e, i] = ut(
2038
2411
  this.recentAssets.assets
2039
- ), o = r`
2412
+ ), a = n`
2040
2413
  <div class="recent__list" @scroll=${this.requestMoreRecentAssets}>
2041
2414
  <div
2042
2415
  class=${A({
@@ -2050,10 +2423,10 @@ let n = class extends Y {
2050
2423
  ${this.localize.term("today")}
2051
2424
  </cx-typography>
2052
2425
  </div>
2053
- ${F(
2426
+ ${U(
2054
2427
  e,
2055
2428
  (s) => s.recordId,
2056
- (s) => this.renderAsset(s, b.RECENT)
2429
+ (s) => this.renderAsset(s, x.RECENT)
2057
2430
  )}
2058
2431
  </div>
2059
2432
  <div
@@ -2067,48 +2440,49 @@ let n = class extends Y {
2067
2440
  ${this.localize.term("allOther")}
2068
2441
  </cx-typography>
2069
2442
  </div>
2070
- ${F(
2443
+ ${U(
2071
2444
  i,
2072
2445
  (s) => s.recordId,
2073
- (s) => this.renderAsset(s, b.RECENT)
2446
+ (s) => this.renderAsset(s, x.RECENT)
2074
2447
  )}
2075
2448
  </div>
2076
2449
  </div>
2077
2450
  `;
2078
- return r`
2451
+ return n`
2079
2452
  <cx-tab-panel
2080
- name=${b.RECENT}
2453
+ name=${x.RECENT}
2081
2454
  class="assets-list__recent-tab-panel"
2082
2455
  >
2083
- ${g(
2456
+ ${p(
2084
2457
  this.recentAssets.assets.length > 0,
2085
- () => o,
2458
+ () => a,
2086
2459
  () => t
2087
2460
  )}
2088
2461
  </cx-tab-panel>
2089
2462
  `;
2090
2463
  }
2091
2464
  renderFavoriteAssets() {
2092
- const t = r`
2093
- <div class="favorites-empty">
2465
+ const t = n`
2466
+ <div class="favorites-empty assets-list__tab-group__empty-message">
2094
2467
  <cx-icon class="empty-icon" name="star"></cx-icon>
2095
2468
  <cx-typography variant="body2">
2096
2469
  ${this.localize.term("allFavoriteAssetsWillBeVisibleHere")}
2097
2470
  </cx-typography>
2098
2471
  </div>
2099
- `, e = this.favoriteAssets.assets.toSorted(
2100
- (o, s) => s.uploadTimestamp - o.uploadTimestamp
2101
- ), i = r`
2472
+ `, e = mt(this.favoriteAssets.assets), i = n`
2102
2473
  <div class="favorites__list" @scroll=${this.requestMoreFavoriteAssets}>
2103
- ${F(
2474
+ ${U(
2104
2475
  e,
2105
- (o) => o.recordId,
2106
- (o) => this.renderAsset(o, b.FAVORITES)
2476
+ (a) => a.recordId,
2477
+ (a) => this.renderAsset(a, x.FAVORITES)
2107
2478
  )}
2108
2479
  </div>
2109
2480
  `;
2110
- return r`
2111
- <cx-tab-panel name="favorites" class="assets-list__favorites-tab-panel">
2481
+ return n`
2482
+ <cx-tab-panel
2483
+ name=${x.FAVORITES}
2484
+ class="assets-list__favorites-tab-panel"
2485
+ >
2112
2486
  <div class="favorites-tab-panel__content">
2113
2487
  <div class="asset-group__label favorites__sync-time">
2114
2488
  <cx-typography variant="small">
@@ -2118,11 +2492,11 @@ let n = class extends Y {
2118
2492
  numeric="always"
2119
2493
  date=${new Date(this.favoritesLastSync)}
2120
2494
  sync
2121
- sync-interval=${U}
2495
+ sync-interval=${O}
2122
2496
  ></cx-relative-time>
2123
2497
  </cx-typography>
2124
2498
  </div>
2125
- ${g(
2499
+ ${p(
2126
2500
  e.length > 0,
2127
2501
  () => i,
2128
2502
  () => t
@@ -2131,141 +2505,17 @@ let n = class extends Y {
2131
2505
  </cx-tab-panel>
2132
2506
  `;
2133
2507
  }
2134
- renderProgress({
2135
- isPaused: t = !1,
2136
- progress: e = 0,
2137
- remainingTime: i,
2138
- size: o = 0,
2139
- timestamp: s = Date.now(),
2140
- uploadErrorMessage: a,
2141
- uploadStatus: l = T.InProgress
2142
- }) {
2143
- const d = o > 0 ? e * 100 / o : 0, m = l === T.InProgress ? d : 100, u = r`
2144
- <div class="uploading-progress">
2145
- ${g(!t, () => r`<cx-icon name="arrow_upward"></cx-icon>`)}
2146
- <cx-typography variant="small">
2147
- <cx-line-clamp lines="1">
2148
- ${g(t, () => r`${this.localize.term("paused")} ‧`)}
2149
- <cx-format-bytes .value=${e}></cx-format-bytes>
2150
- of
2151
- <cx-format-bytes .value=${o}></cx-format-bytes>
2152
- (${new Intl.NumberFormat("en-IN", {
2153
- maximumFractionDigits: 2
2154
- }).format(d)}%)
2155
- ${g(
2156
- !!i && !t,
2157
- () => r`‧
2158
- <cx-relative-time
2159
- format="narrow"
2160
- numeric="always"
2161
- date=${new Date(Date.now() + (i ?? 0))}
2162
- sync
2163
- sync-interval=${U}
2164
- ></cx-relative-time>`
2165
- )}
2166
- </cx-line-clamp>
2167
- </cx-typography>
2168
- </div>
2169
- `, h = r`
2170
- <div class="syncing-progress">
2171
- <cx-icon name="cached"></cx-icon>
2172
- <cx-typography variant="small">
2173
- <cx-line-clamp lines="1">
2174
- ${this.localize.term("syncing")} ‧
2175
- <cx-relative-time
2176
- format="narrow"
2177
- numeric="always"
2178
- date=${new Date(s)}
2179
- sync
2180
- sync-interval=${U}
2181
- ></cx-relative-time>
2182
- </cx-line-clamp>
2183
- </cx-typography>
2184
- </div>
2185
- `, f = r`
2186
- <div class="completed-progress">
2187
- <cx-icon name="check"></cx-icon>
2188
- <cx-typography variant="small">
2189
- <cx-line-clamp lines="1">
2190
- ${this.localize.term("readyToUse")} ‧
2191
- <cx-relative-time
2192
- format="narrow"
2193
- numeric="always"
2194
- date=${new Date(s)}
2195
- sync
2196
- sync-interval=${U}
2197
- ></cx-relative-time>
2198
- </cx-line-clamp>
2199
- </cx-typography>
2200
- </div>
2201
- `, _ = r`
2202
- <div class="failed-progress">
2203
- <cx-typography variant="small">
2204
- <cx-line-clamp lines="1">
2205
- <cx-tooltip content=${a}>
2206
- <span class="failed-progress__text">
2207
- ${this.localize.term("uploadFailed")} ‧
2208
- </span>
2209
- </cx-tooltip>
2210
- <cx-relative-time
2211
- format="narrow"
2212
- numeric="always"
2213
- date=${new Date(s)}
2214
- sync
2215
- sync-interval=${U}
2216
- ></cx-relative-time>
2217
- </cx-line-clamp>
2218
- </cx-typography>
2219
- </div>
2220
- `, z = r`
2221
- <div class="canceled-progress">
2222
- <cx-icon name="cancel"></cx-icon>
2223
- <cx-typography variant="small">
2224
- <cx-line-clamp lines="1">
2225
- ${this.localize.term("canceled")} ‧
2226
- <cx-relative-time
2227
- format="narrow"
2228
- numeric="always"
2229
- date=${new Date(s)}
2230
- sync
2231
- sync-interval=${U}
2232
- ></cx-relative-time>
2233
- </cx-line-clamp>
2234
- </cx-typography>
2235
- </div>
2236
- `;
2237
- return r`
2238
- ${g(
2239
- l === T.InProgress,
2240
- () => r`<cx-progress-bar
2241
- style=${Xt({
2242
- "--color": t ? "var(--cx-color-warning-500)" : "var(--cx-color-primary-500)"
2243
- })}
2244
- .value=${m.toFixed(0)}
2245
- class="progress-bar"
2246
- ></cx-progress-bar
2247
- >${u}`
2248
- )}
2249
- ${g(
2250
- l === T.PendingComplete,
2251
- () => h
2252
- )}
2253
- ${g(l === T.Success, () => f)}
2254
- ${g(l === T.Failed, () => _)}
2255
- ${g(l === T.Canceled, () => z)}
2256
- `;
2257
- }
2258
2508
  renderUploadingAssets() {
2259
- const t = r`
2260
- <div class="uploads-empty">
2509
+ const t = n`
2510
+ <div class="uploads-empty assets-list__tab-group__empty-message">
2261
2511
  <cx-icon class="empty-icon" name="arrow_upward"></cx-icon>
2262
2512
  <cx-typography variant="body2">
2263
2513
  ${this.localize.term("allAssetUploadsWillBeVisibleHere")}
2264
2514
  </cx-typography>
2265
2515
  </div>
2266
- `, [e, i] = st(
2516
+ `, [e, i] = ut(
2267
2517
  this.uploadingAssets.assets
2268
- ), o = r`
2518
+ ), a = n`
2269
2519
  <div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}>
2270
2520
  <div
2271
2521
  class=${A({
@@ -2287,10 +2537,10 @@ let n = class extends Y {
2287
2537
  ${this.localize.term("clearAll")}
2288
2538
  </cx-button>
2289
2539
  </div>
2290
- ${F(
2540
+ ${U(
2291
2541
  e,
2292
2542
  (s) => s.recordId,
2293
- (s) => this.renderAsset(s, b.UPLOADS)
2543
+ (s) => this.renderAsset(s, x.UPLOADS)
2294
2544
  )}
2295
2545
  </div>
2296
2546
  <div
@@ -2304,39 +2554,77 @@ let n = class extends Y {
2304
2554
  ${this.localize.term("allOther")}
2305
2555
  </cx-typography>
2306
2556
  </div>
2307
- ${F(
2557
+ ${U(
2308
2558
  i,
2309
2559
  (s) => s.recordId,
2310
- (s) => this.renderAsset(s, b.UPLOADS)
2560
+ (s) => this.renderAsset(s, x.UPLOADS)
2311
2561
  )}
2312
2562
  </div>
2313
2563
  </div>
2314
2564
  `;
2315
- return r`
2316
- <cx-tab-panel name="uploads" class="assets-list__uploads-tab-panel">
2317
- ${g(
2565
+ return n`
2566
+ <cx-tab-panel
2567
+ name=${x.UPLOADS}
2568
+ class="assets-list__uploads-tab-panel"
2569
+ >
2570
+ ${p(
2318
2571
  this.uploadingAssets.assets.length > 0,
2319
- () => o,
2572
+ () => a,
2573
+ () => t
2574
+ )}
2575
+ </cx-tab-panel>
2576
+ `;
2577
+ }
2578
+ renderPinnedAssets() {
2579
+ const t = n`
2580
+ <div class="pinned-empty assets-list__tab-group__empty-message">
2581
+ <cx-icon class="empty-icon" name="keep"></cx-icon>
2582
+ <cx-typography variant="body2">
2583
+ ${this.localize.term("allPinnedAssetsWillBeVisibleHere")}
2584
+ </cx-typography>
2585
+ </div>
2586
+ `, e = mt(this.pinnedAssets.assets), i = n`
2587
+ <div class="pinned__list" @scroll=${this.requestMorePinnedAssets}>
2588
+ ${U(
2589
+ e,
2590
+ (a) => a.recordId,
2591
+ (a) => this.renderAsset(a, x.PINNED)
2592
+ )}
2593
+ </div>
2594
+ `;
2595
+ return n`
2596
+ <cx-tab-panel
2597
+ name=${x.PINNED}
2598
+ class="assets-list__pinned-tab-panel"
2599
+ >
2600
+ <div class="pinned-tab-panel__content">
2601
+ ${p(
2602
+ e.length > 0,
2603
+ () => i,
2320
2604
  () => t
2321
2605
  )}
2606
+ </div>
2322
2607
  </cx-tab-panel>
2323
2608
  `;
2324
2609
  }
2325
2610
  renderAssetsList() {
2326
- return r`
2611
+ return n`
2327
2612
  <div class="assets-list">
2328
2613
  <cx-tab-group
2329
2614
  @cx-tab-show=${async (e) => {
2330
2615
  switch (await e.target.updateComplete, e.detail.name) {
2331
- case b.RECENT:
2616
+ case x.RECENT:
2332
2617
  this.requestMoreRecentAssets();
2333
2618
  break;
2334
- case b.FAVORITES:
2619
+ case x.FAVORITES:
2335
2620
  this.requestMoreFavoriteAssets();
2336
2621
  break;
2337
- case b.UPLOADS:
2622
+ case x.UPLOADS:
2338
2623
  this.requestMoreUploadingAssets();
2339
2624
  break;
2625
+ case x.PINNED:
2626
+ this.requestMorePinnedAssets();
2627
+ break;
2340
2628
  }
2341
2629
  }}
2342
2630
  no-scroll-controls
@@ -2346,32 +2634,39 @@ let n = class extends Y {
2346
2634
  active
2347
2635
  data-testid="assets-list__recent-tab"
2348
2636
  slot="nav"
2349
- panel=${b.RECENT}
2637
+ panel=${x.RECENT}
2350
2638
  >
2351
2639
  ${this.localize.term("recent")}
2352
2640
  </cx-tab>
2641
+ <cx-tab
2642
+ data-testid="assets-list__pins-tab"
2643
+ slot="nav"
2644
+ panel=${x.PINNED}
2645
+ >
2646
+ ${this.localize.term("pins")}
2647
+ </cx-tab>
2353
2648
  <cx-tab
2354
2649
  data-testid="assets-list__favorites-tab"
2355
2650
  slot="nav"
2356
- panel=${b.FAVORITES}
2651
+ panel=${x.FAVORITES}
2357
2652
  >
2358
2653
  ${this.localize.term("favorites")}
2359
2654
  </cx-tab>
2360
2655
  <cx-tab
2361
2656
  data-testid="assets-list__uploads-tab"
2362
2657
  slot="nav"
2363
- panel=${b.UPLOADS}
2658
+ panel=${x.UPLOADS}
2364
2659
  >
2365
2660
  ${this.localize.term("uploads")}
2366
2661
  </cx-tab>
2367
2662
  ${this.renderRecentAssets()} ${this.renderFavoriteAssets()}
2368
- ${this.renderUploadingAssets()}
2663
+ ${this.renderUploadingAssets()} ${this.renderPinnedAssets()}
2369
2664
  </cx-tab-group>
2370
2665
  </div>
2371
2666
  `;
2372
2667
  }
2373
2668
  renderAssetsView() {
2374
- return r`
2669
+ return n`
2375
2670
  <div class="assets">
2376
2671
  ${this.renderHeader()}${this.renderAssetsList()}${this.renderStatusFooter()}
2377
2672
  </div>
@@ -2392,49 +2687,49 @@ let n = class extends Y {
2392
2687
  s?.target && s.target !== this.dialog || (this.folderTree.resetTree(), this.folderTree.rootIDs = [], this.folderTree.removedIDs = [], this.dialog.hide(), this.searchText = "");
2393
2688
  }, i = async () => {
2394
2689
  this.isAddingRootIDs = !0, await this.updateComplete, this.searchText = "";
2395
- const s = this.rootIDs.filter((d) => {
2690
+ const s = this.rootIDs.filter((h) => {
2396
2691
  if (!this.folderTree.shadowRoot?.querySelector(
2397
- `[data-id="${$(d).id}"]`
2692
+ `[data-id="${S(h).id}"]`
2398
2693
  ))
2399
2694
  return !0;
2400
- }), a = /* @__PURE__ */ new Set([
2695
+ }), o = /* @__PURE__ */ new Set([
2401
2696
  ...this.folderTree.currentRootIDs,
2402
2697
  ...s
2403
2698
  ]);
2404
- for (const d of a) {
2405
- const m = P($(d).path), u = this.folderTree.removedIDs.filter(
2406
- (h) => P($(h).path).startsWith(m)
2699
+ for (const h of o) {
2700
+ const _ = R(S(h).path), m = this.folderTree.removedIDs.filter(
2701
+ (g) => R(S(g).path).startsWith(_)
2407
2702
  );
2408
- if (u.length > 0) {
2409
- const { totalCount: h } = await this.fetchFolders({
2410
- excludes: u.map((_) => $(_).id),
2411
- folderId: $(d).id,
2703
+ if (m.length > 0) {
2704
+ const { totalCount: g } = await this.fetchFolders({
2705
+ excludes: m.map((f) => S(f).id),
2706
+ folderId: S(h).id,
2412
2707
  start: 0
2413
- }), { data: f } = await this.fetchFolders({
2414
- excludes: u.map((_) => $(_).id),
2415
- folderId: $(d).id,
2416
- limit: h || 10,
2708
+ }), { data: b } = await this.fetchFolders({
2709
+ excludes: m.map((f) => S(f).id),
2710
+ folderId: S(h).id,
2711
+ limit: g || 10,
2417
2712
  start: 0
2418
2713
  });
2419
- f.forEach((_) => {
2420
- a.add(
2421
- k({ id: _.id, path: _.fullPath })
2714
+ b.forEach((f) => {
2715
+ o.add(
2716
+ N({ id: f.id, path: f.fullPath })
2422
2717
  );
2423
- }), a.delete(d);
2718
+ }), o.delete(h);
2424
2719
  }
2425
2720
  }
2426
- const l = Array.from(a);
2721
+ const l = Array.from(o);
2427
2722
  this.updateActiveFolderIdentifiers(l), this.removedIds = l.filter(
2428
- (d) => [...l].some((m) => {
2429
- const u = $(d), h = $(m), f = P(h.path);
2430
- return m !== d && u.path.startsWith(f);
2723
+ (h) => [...l].some((_) => {
2724
+ const m = S(h), g = S(_), b = R(g.path);
2725
+ return _ !== h && m.path.startsWith(b);
2431
2726
  })
2432
2727
  ), e(), this.isAddingRootIDs = !1;
2433
- }, o = (s) => {
2434
- const a = s.target;
2435
- this.searchText = (a.value ?? "").trim();
2728
+ }, a = (s) => {
2729
+ const o = s.target;
2730
+ this.searchText = (o.value ?? "").trim();
2436
2731
  };
2437
- return r`
2732
+ return n`
2438
2733
  <cx-dialog
2439
2734
  class="select-folders-popup"
2440
2735
  no-header
@@ -2444,7 +2739,7 @@ let n = class extends Y {
2444
2739
  <cx-input
2445
2740
  autofocus
2446
2741
  clearable
2447
- @cx-input=${o}
2742
+ @cx-input=${a}
2448
2743
  value=${this.searchText}
2449
2744
  placeholder=${this.localize.term("search")}
2450
2745
  >
@@ -2472,7 +2767,7 @@ let n = class extends Y {
2472
2767
  }
2473
2768
  renderSelectableFolderTree() {
2474
2769
  const t = this.availableFolderIdentifiers;
2475
- return r`
2770
+ return n`
2476
2771
  <cx-folder-tree
2477
2772
  class="selectable-folder-tree"
2478
2773
  .siteUrl=${this.settings.config.siteUrl}
@@ -2489,20 +2784,20 @@ let n = class extends Y {
2489
2784
  }
2490
2785
  renderRootFolderTree() {
2491
2786
  if (!this.rootIDs.length)
2492
- return bt;
2787
+ return Ut;
2493
2788
  const t = this.rootIDs.filter(
2494
- (o) => !this.removedIds.includes(o)
2495
- ), e = (o) => {
2789
+ (a) => !this.removedIds.includes(a)
2790
+ ), e = (a) => {
2496
2791
  this.updateActiveFolderIdentifiers(
2497
2792
  t.filter(
2498
- (s) => $(s).id !== o
2793
+ (s) => S(s).id !== a
2499
2794
  )
2500
2795
  ), this.folderTree.rootIDs = this.rootIDs, this.folderTree.resetTree();
2501
- }, i = (o) => {
2502
- const { id: s, path: a } = $(o), l = () => {
2796
+ }, i = (a) => {
2797
+ const { id: s, path: o } = S(a), l = () => {
2503
2798
  e(s);
2504
2799
  };
2505
- return r`
2800
+ return n`
2506
2801
  <cx-tree-item
2507
2802
  data-id=${s}
2508
2803
  class=${A({
@@ -2512,7 +2807,7 @@ let n = class extends Y {
2512
2807
  <div class="folder-tree__label">
2513
2808
  <cx-icon class="folder-tree__icon" name="folder"></cx-icon>
2514
2809
  <cx-line-clamp lines="1" class="folder-tree__label__value">
2515
- ${a}
2810
+ ${o}
2516
2811
  </cx-line-clamp>
2517
2812
  </div>
2518
2813
  <cx-tooltip
@@ -2528,94 +2823,24 @@ let n = class extends Y {
2528
2823
  </cx-tree-item>
2529
2824
  `;
2530
2825
  };
2531
- return r`
2826
+ return n`
2532
2827
  <div data-testid="root-folder-tree" class="folder-tree">
2533
2828
  <cx-tree selection="none">
2534
- ${F(
2829
+ ${U(
2535
2830
  t,
2536
- (o) => o,
2537
- (o) => i(o)
2831
+ (a) => a,
2832
+ (a) => i(a)
2538
2833
  )}
2539
2834
  >
2540
2835
  </cx-tree>
2541
2836
  </div>
2542
2837
  `;
2543
2838
  }
2544
- // renderUploadDownloadSettings(): TemplateResult {
2545
- // const maxUploadRateInput = this._unlimitedUploadRate
2546
- // ? ''
2547
- // : html`<cx-input
2548
- // class="settings__upload-rate-input"
2549
- // label=${this.localize.term('maxUploadRate')}
2550
- // type="number"
2551
- // no-spin-buttons
2552
- // value=${this.settings.maxUploadRate}
2553
- // @cx-change=${(event: CxChangeEvent) => {
2554
- // const target = event.target as CxInput;
2555
- // const value = Number(target.value);
2556
- // if (value < 0) {
2557
- // target.setCustomValidity(
2558
- // this.localize.term('maxUploadRateCannotBeNegative'),
2559
- // );
2560
- // return;
2561
- // }
2562
- // this._maxUploadRate = Number(target.value);
2563
- // }}
2564
- // ><cx-typography slot="suffix" variant="body2"
2565
- // >Mb/s</cx-typography
2566
- // ></cx-input
2567
- // >`;
2568
- // const uploadRateSetting = html`<cx-switch
2569
- // class="settings__upload-rate-switch"
2570
- // ?checked=${this.settings.unlimitedUploadRate}
2571
- // @cx-change=${(event: CxChangeEvent) => {
2572
- // this._unlimitedUploadRate = (event.target as HTMLInputElement).checked;
2573
- // }}
2574
- // >${this.localize.term('unlimitedUploadRate')}</cx-switch
2575
- // >${maxUploadRateInput}`;
2576
- // const maxDownloadRateInput = this._unlimitedDownloadRate
2577
- // ? ''
2578
- // : html`<cx-input
2579
- // class="settings__download-rate-input"
2580
- // label=${this.localize.term('maxDownloadRate')}
2581
- // type="number"
2582
- // no-spin-buttons
2583
- // value=${this.settings.maxDownloadRate}
2584
- // @cx-change=${(event: CxChangeEvent) => {
2585
- // const target = event.target as CxInput;
2586
- // const value = Number(target.value);
2587
- // if (value < 0) {
2588
- // target.setCustomValidity(
2589
- // this.localize.term('maxDownloadRateCannotBeNegative'),
2590
- // );
2591
- // return;
2592
- // }
2593
- // this._maxDownloadRate = Number(target.value);
2594
- // }}
2595
- // ><cx-typography slot="suffix" variant="body2"
2596
- // >Mb/s</cx-typography
2597
- // ></cx-input
2598
- // >`;
2599
- // const downloadRateSetting = html`<cx-switch
2600
- // class="settings__download-rate-switch"
2601
- // ?checked=${this.settings.unlimitedDownloadRate}
2602
- // @cx-change=${(event: CxChangeEvent) => {
2603
- // this._unlimitedDownloadRate = (event.target as HTMLInputElement).checked;
2604
- // }}
2605
- // >${this.localize.term('unlimitedDownloadRate')}</cx-switch
2606
- // >${maxDownloadRateInput}`;
2607
- // return html`<div class="settings-group settings__upload-download">
2608
- // <cx-typography variant="h5"
2609
- // >${this.localize.term('uploadDownload')}</cx-typography
2610
- // >
2611
- // ${uploadRateSetting} ${downloadRateSetting}
2612
- // </div>`;
2613
- // }
2614
2839
  handleActiveFolderChange(t) {
2615
2840
  t.target.value === "custom" ? (this._activeFoldersMode = !0, this.rootIDs = this.settings.config.rootIDs ?? []) : (this._activeFoldersMode = !1, this.rootIDs = []);
2616
2841
  }
2617
2842
  renderGeneralSettings() {
2618
- const t = r`
2843
+ const t = n`
2619
2844
  <div class="settings-group settings__active-folder">
2620
2845
  <cx-typography variant="h5">
2621
2846
  ${this.localize.term("activeFolders")}
@@ -2635,15 +2860,15 @@ let n = class extends Y {
2635
2860
  </cx-option>
2636
2861
  <cx-option value="custom">${this.localize.term("custom")}</cx-option>
2637
2862
  </cx-select>
2638
- ${g(
2863
+ ${p(
2639
2864
  this._activeFoldersMode,
2640
- () => r`
2865
+ () => n`
2641
2866
  ${this.renderRootFolderTree()} ${this.renderSelectFoldersPopup()}
2642
2867
  `
2643
2868
  )}
2644
2869
  </div>
2645
2870
  `;
2646
- return r`
2871
+ return n`
2647
2872
  <div class="settings__general">
2648
2873
  ${t}
2649
2874
  <div class="settings-group settings__software">
@@ -2658,13 +2883,13 @@ let n = class extends Y {
2658
2883
  >
2659
2884
  <cx-typography variant="body3">
2660
2885
  ${this.localize.term("currentVersion")}
2661
- ${it(this.settings.config.version ?? "")}
2886
+ ${gt(this.settings.config.version ?? "")}
2662
2887
  </cx-typography>
2663
2888
  </cx-line-clamp>
2664
2889
  </div>
2665
- ${g(
2890
+ ${p(
2666
2891
  this.hasNewVersion,
2667
- () => r`<div class="settings__software__version__value">
2892
+ () => n`<div class="settings__software__version__value">
2668
2893
  <cx-badge
2669
2894
  class="settings__version__badge"
2670
2895
  slot="badge"
@@ -2680,7 +2905,7 @@ let n = class extends Y {
2680
2905
  <cx-typography variant="body3">
2681
2906
  ${this.localize.term(
2682
2907
  "newVersionAvailable",
2683
- it(
2908
+ gt(
2684
2909
  this.settings.config.latestVersion ?? ""
2685
2910
  )
2686
2911
  )}
@@ -2766,7 +2991,7 @@ let n = class extends Y {
2766
2991
  await this.updateComplete, this.cacheLocationValueText?.handleResize();
2767
2992
  }
2768
2993
  renderAdvancedSettings() {
2769
- const t = r`<cx-tooltip
2994
+ const t = n`<cx-tooltip
2770
2995
  content=${this.localize.term("openDrive")}
2771
2996
  hoist
2772
2997
  >
@@ -2777,7 +3002,7 @@ let n = class extends Y {
2777
3002
  @click=${this.openCacheLocation}
2778
3003
  ></cx-icon-button>
2779
3004
  </cx-tooltip>`;
2780
- return r`
3005
+ return n`
2781
3006
  <div class="settings__advanced">
2782
3007
  <div class="settings-group settings__proxy">
2783
3008
  <cx-typography variant="h5">Proxy</cx-typography>
@@ -2789,9 +3014,21 @@ let n = class extends Y {
2789
3014
  value=${(this.proxyTypes ?? []).join(" ")}
2790
3015
  @cx-change=${this.handleProxyChange}
2791
3016
  >
2792
- <cx-option value="Image" ?disabled=${(this.proxyTypes ?? []).includes("All")}>${this.localize.term("image")}</cx-option>
2793
- <cx-option value="Video" ?disabled=${(this.proxyTypes ?? []).includes("All")}>${this.localize.term("video")}</cx-option>
2794
- <cx-option value="Audio" ?disabled=${(this.proxyTypes ?? []).includes("All")}>${this.localize.term("audio")}</cx-option>
3017
+ <cx-option
3018
+ value="Image"
3019
+ ?disabled=${(this.proxyTypes ?? []).includes("All")}
3020
+ >${this.localize.term("image")}</cx-option
3021
+ >
3022
+ <cx-option
3023
+ value="Video"
3024
+ ?disabled=${(this.proxyTypes ?? []).includes("All")}
3025
+ >${this.localize.term("video")}</cx-option
3026
+ >
3027
+ <cx-option
3028
+ value="Audio"
3029
+ ?disabled=${(this.proxyTypes ?? []).includes("All")}
3030
+ >${this.localize.term("audio")}</cx-option
3031
+ >
2795
3032
  <cx-option value="All">${this.localize.term("all")}</cx-option>
2796
3033
  </cx-select>
2797
3034
  <cx-typography variant="small">
@@ -2800,46 +3037,23 @@ let n = class extends Y {
2800
3037
  )}
2801
3038
  </cx-typography>
2802
3039
  </div>
2803
- <div class="settings-group settings__config">
2804
- <cx-typography variant="h5">
2805
- ${this.localize.term("config")}
2806
- </cx-typography>
2807
- <div class="settings__config__buttons">
2808
- <cx-button
2809
- data-testid="settings__config__export-button"
2810
- @click=${this.exportSettings}
2811
- >
2812
- <cx-icon name="file_download" slot="prefix"></cx-icon>
2813
- ${this.localize.term("export")}
2814
- </cx-button>
2815
- <cx-button
2816
- @click=${this.importSettings}
2817
- data-testid="settings__config__import-button"
2818
- >
2819
- <cx-icon name="file_upload" slot="prefix"></cx-icon>
2820
- ${this.localize.term("import")}
2821
- </cx-button>
2822
- </div>
2823
- </div>
2824
- <div class="settings-group settings__logs">
2825
- <cx-typography variant="h5">
2826
- ${this.localize.term("logs")}
2827
- </cx-typography>
2828
- <div class="settings__logs__buttons">
2829
- <cx-button
2830
- data-testid="settings__logs__view-button"
2831
- @click=${this.viewLogs}
2832
- >
2833
- <cx-icon name="code" slot="prefix"></cx-icon>
2834
- ${this.localize.term("view")}
2835
- </cx-button>
2836
- </div>
2837
- </div>
2838
3040
  <div class="settings-group settings__cache">
2839
3041
  <cx-typography variant="h5">
2840
3042
  ${this.localize.term("cache")}
2841
3043
  </cx-typography>
2842
3044
  <div class="settings__cache__size">
3045
+ <cx-typography
3046
+ variant="body3"
3047
+ class="settings__cache__size__label"
3048
+ >
3049
+ ${this.localize.term("currentUsage")}: <cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes>
3050
+ </cx-typography>
3051
+ <cx-typography
3052
+ variant="body3"
3053
+ class="settings__cache__size__label"
3054
+ >
3055
+ ${this.localize.term("capacity")}
3056
+ </cx-typography>
2843
3057
  <cx-input
2844
3058
  data-testid="settings__cache__size__input"
2845
3059
  label=${this.localize.term("size")}
@@ -2852,7 +3066,7 @@ let n = class extends Y {
2852
3066
  @cx-change=${this.handleCacheSizeChange}
2853
3067
  >
2854
3068
  <cx-typography slot="suffix" variant="body2"
2855
- >${B}</cx-typography
3069
+ >${Z}</cx-typography
2856
3070
  >
2857
3071
  </cx-input>
2858
3072
  </div>
@@ -2899,6 +3113,41 @@ let n = class extends Y {
2899
3113
  </cx-button>
2900
3114
  </div>
2901
3115
  </div>
3116
+ <div class="settings-group settings__config">
3117
+ <cx-typography variant="h5">
3118
+ ${this.localize.term("config")}
3119
+ </cx-typography>
3120
+ <div class="settings__config__buttons">
3121
+ <cx-button
3122
+ data-testid="settings__config__export-button"
3123
+ @click=${this.exportSettings}
3124
+ >
3125
+ <cx-icon name="file_download" slot="prefix"></cx-icon>
3126
+ ${this.localize.term("export")}
3127
+ </cx-button>
3128
+ <cx-button
3129
+ @click=${this.importSettings}
3130
+ data-testid="settings__config__import-button"
3131
+ >
3132
+ <cx-icon name="file_upload" slot="prefix"></cx-icon>
3133
+ ${this.localize.term("import")}
3134
+ </cx-button>
3135
+ </div>
3136
+ </div>
3137
+ <div class="settings-group settings__logs">
3138
+ <cx-typography variant="h5">
3139
+ ${this.localize.term("logs")}
3140
+ </cx-typography>
3141
+ <div class="settings__logs__buttons">
3142
+ <cx-button
3143
+ data-testid="settings__logs__view-button"
3144
+ @click=${this.viewLogs}
3145
+ >
3146
+ <cx-icon name="code" slot="prefix"></cx-icon>
3147
+ ${this.localize.term("view")}
3148
+ </cx-button>
3149
+ </div>
3150
+ </div>
2902
3151
  </div>
2903
3152
  `;
2904
3153
  }
@@ -2906,7 +3155,7 @@ let n = class extends Y {
2906
3155
  const t = () => {
2907
3156
  this.hideSettings();
2908
3157
  };
2909
- return r`
3158
+ return n`
2910
3159
  <div class="settings">
2911
3160
  <form class="settings__form" @submit=${(i) => {
2912
3161
  i.preventDefault(), this.saveSettings();
@@ -2959,33 +3208,33 @@ let n = class extends Y {
2959
3208
  }
2960
3209
  // #endregion
2961
3210
  renderStatusFooter() {
2962
- const t = r`
3211
+ const t = n`
2963
3212
  <cx-typography class="error-message" variant="small">
2964
3213
  ${this.localize.term("fileOnDemandSyncErrorMessage")}
2965
3214
  </cx-typography>
2966
3215
  `, e = () => {
2967
3216
  switch (this.connectionStatus) {
2968
3217
  case "excellent":
2969
- return r`
3218
+ return n`
2970
3219
  <cx-icon variant="filled" name="check_circle"></cx-icon>
2971
3220
  `;
2972
3221
  case "good":
2973
- return r` <cx-icon variant="filled" name="circle"></cx-icon> `;
3222
+ return n` <cx-icon variant="filled" name="circle"></cx-icon> `;
2974
3223
  case "bad":
2975
- return r` <cx-icon variant="filled" name="circle"></cx-icon> `;
3224
+ return n` <cx-icon variant="filled" name="circle"></cx-icon> `;
2976
3225
  }
2977
3226
  }, i = () => {
2978
3227
  switch (this.assetIndexSyncStatus) {
2979
3228
  case "loaded":
2980
- return r`
3229
+ return n`
2981
3230
  <cx-icon variant="filled" name="check_circle"></cx-icon>
2982
3231
  `;
2983
3232
  case "loading":
2984
- return r` <cx-icon variant="filled" name="cached"></cx-icon> `;
3233
+ return n` <cx-icon variant="filled" name="cached"></cx-icon> `;
2985
3234
  case "error":
2986
- return r` <cx-icon variant="filled" name="error"></cx-icon> `;
3235
+ return n` <cx-icon variant="filled" name="error"></cx-icon> `;
2987
3236
  }
2988
- }, o = r`<div
3237
+ }, a = n`<div
2989
3238
  class=${A({
2990
3239
  "connection-status": !0,
2991
3240
  "connection-status--bad": this.connectionStatus === "bad",
@@ -3009,8 +3258,8 @@ let n = class extends Y {
3009
3258
  ${e()}
3010
3259
  </div>
3011
3260
  </cx-tooltip>
3012
- </div>`;
3013
- return r`
3261
+ </div>`, s = this.settings.cacheUsage >= this.settings.cacheSize;
3262
+ return n`
3014
3263
  <cx-divider class="status-footer__divider"></cx-divider>
3015
3264
  <div class="status-footer">
3016
3265
  <div class="connected-url">
@@ -3023,7 +3272,7 @@ let n = class extends Y {
3023
3272
  </cx-typography>
3024
3273
  </cx-line-clamp>
3025
3274
  </div>
3026
- ${o}
3275
+ ${a}
3027
3276
  <div
3028
3277
  class=${A({
3029
3278
  "asset-index-sync-status": !0,
@@ -3037,22 +3286,39 @@ let n = class extends Y {
3037
3286
  </cx-typography>
3038
3287
  <div class="value">
3039
3288
  <cx-typography variant="small">
3040
- ${le[this.assetIndexSyncStatus]}
3289
+ ${ue[this.assetIndexSyncStatus]}
3041
3290
  </cx-typography>
3042
3291
  ${i()}
3043
3292
  </div>
3044
3293
  </div>
3045
- ${g(this.assetIndexSyncStatus === "error", () => t)}
3294
+ <div class="cache-usage">
3295
+ <cx-typography class="label" variant="small">
3296
+ ${this.localize.term("cache")}
3297
+ </cx-typography>
3298
+ <cx-tooltip ?disabled=${!s} content=${this.localize.term("cacheUsageWarning")}>
3299
+ <cx-space spacing="3x-small">
3300
+ <cx-line-clamp class="value-line-clamp" lines="1">
3301
+ <cx-typography class="value" variant="small">
3302
+ <cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes>
3303
+ /
3304
+ <cx-format-bytes .value=${this.settings.cacheSize}></cx-format-bytes>
3305
+ </cx-typography>
3306
+ </cx-line-clamp>
3307
+ ${p(s, () => n`<cx-icon class="cache-usage__warning-icon" name="warning" variant="filled"></cx-icon>`)}
3308
+ </cx-space>
3309
+ </cx-tooltip>
3310
+ </div>
3311
+ ${p(this.assetIndexSyncStatus === "error", () => t)}
3046
3312
  </div>
3047
3313
  `;
3048
3314
  }
3049
3315
  handleConnectionURLInput(t) {
3050
3316
  this.validConnectionUrl = !0, this.siteUrl = t.target.value.trim();
3051
- const e = at(this.siteUrl);
3052
- V(e) || (this.validConnectionUrl = !1);
3317
+ const e = ht(this.siteUrl);
3318
+ K(e) || (this.validConnectionUrl = !1);
3053
3319
  }
3054
3320
  renderWelcomeView() {
3055
- return r`
3321
+ return n`
3056
3322
  <div class="welcome">
3057
3323
  <div class="welcome__message">
3058
3324
  <cx-typography variant="h5">
@@ -3101,7 +3367,7 @@ let n = class extends Y {
3101
3367
  ${this.localize.term("cancel")}
3102
3368
  </cx-button>
3103
3369
  <cx-typography class="error-message" variant="body3">
3104
- ${g(
3370
+ ${p(
3105
3371
  this.connectError,
3106
3372
  () => this.connectError,
3107
3373
  () => " "
@@ -3115,14 +3381,14 @@ let n = class extends Y {
3115
3381
  return this.connectionEstablished ? this.isSettingsOpened ? this.renderSettingsView() : this.renderAssetsView() : this.renderWelcomeView();
3116
3382
  }
3117
3383
  renderLoadingOverlay() {
3118
- return r`
3384
+ return n`
3119
3385
  <div class="loading-overlay">
3120
3386
  <cx-spinner></cx-spinner>
3121
3387
  </div>
3122
3388
  `;
3123
3389
  }
3124
3390
  render() {
3125
- return r`
3391
+ return n`
3126
3392
  <div
3127
3393
  class=${A({
3128
3394
  container: !0,
@@ -3131,288 +3397,307 @@ let n = class extends Y {
3131
3397
  })}
3132
3398
  >
3133
3399
  ${this.renderView()}
3134
- ${g(this.userInteractionBlocked, () => this.renderLoadingOverlay())}
3400
+ ${p(this.userInteractionBlocked, () => this.renderLoadingOverlay())}
3135
3401
  </div>
3136
3402
  `;
3137
3403
  }
3138
3404
  // #endregion
3139
3405
  };
3140
- n.styles = Me;
3141
- n.dependencies = {
3142
- "cx-avatar": Lt,
3143
- "cx-button": Rt,
3406
+ r.styles = Oe;
3407
+ r.dependencies = {
3408
+ "cx-avatar": Ot,
3409
+ "cx-button": Nt,
3144
3410
  "cx-confirm-popover": Kt,
3145
- "cx-dialog": Pt,
3146
- "cx-divider": Ft,
3411
+ "cx-dialog": jt,
3412
+ "cx-divider": Bt,
3413
+ "cx-file-on-demand-asset": F,
3147
3414
  "cx-folder-tree": y,
3148
- "cx-format-bytes": Ut,
3149
- "cx-icon": lt,
3150
- "cx-icon-button": kt,
3151
- "cx-input": Ot,
3152
- "cx-line-clamp": dt,
3153
- "cx-option": Nt,
3154
- "cx-progress-bar": jt,
3155
- "cx-relative-time": Mt,
3156
- "cx-select": Bt,
3157
- "cx-space": Vt,
3158
- "cx-tab": Ht,
3159
- "cx-tab-group": Wt,
3160
- "cx-tab-panel": Gt,
3161
- "cx-tooltip": qt,
3162
- "cx-tree": ut,
3163
- "cx-tree-item": pt,
3164
- "cx-typography": Yt
3415
+ "cx-format-bytes": ot,
3416
+ "cx-icon": J,
3417
+ "cx-icon-button": St,
3418
+ "cx-input": Mt,
3419
+ "cx-line-clamp": Q,
3420
+ "cx-option": Vt,
3421
+ "cx-relative-time": It,
3422
+ "cx-select": Ht,
3423
+ "cx-space": Wt,
3424
+ "cx-tab": qt,
3425
+ "cx-tab-group": Gt,
3426
+ "cx-tab-panel": Yt,
3427
+ "cx-tooltip": wt,
3428
+ "cx-tree": yt,
3429
+ "cx-tree-item": ft,
3430
+ "cx-typography": nt
3165
3431
  };
3166
3432
  c([
3167
- R(".container")
3168
- ], n.prototype, "container", 2);
3433
+ z(".container")
3434
+ ], r.prototype, "container", 2);
3169
3435
  c([
3170
- R("cx-folder-tree")
3171
- ], n.prototype, "folderTree", 2);
3436
+ z("cx-folder-tree")
3437
+ ], r.prototype, "folderTree", 2);
3172
3438
  c([
3173
- R("cx-dialog")
3174
- ], n.prototype, "dialog", 2);
3439
+ z("cx-dialog")
3440
+ ], r.prototype, "dialog", 2);
3175
3441
  c([
3176
- R(".recent__list")
3177
- ], n.prototype, "recentAssetsList", 2);
3442
+ z(".recent__list")
3443
+ ], r.prototype, "recentAssetsList", 2);
3178
3444
  c([
3179
- R(".favorites__list")
3180
- ], n.prototype, "favoritesAssetsList", 2);
3445
+ z(".favorites__list")
3446
+ ], r.prototype, "favoritesAssetsList", 2);
3181
3447
  c([
3182
- R(".uploads__list")
3183
- ], n.prototype, "uploadsAssetsList", 2);
3448
+ z(".uploads__list")
3449
+ ], r.prototype, "uploadsAssetsList", 2);
3184
3450
  c([
3185
- R(".assets-list__tab-group")
3186
- ], n.prototype, "assetsListTabGroup", 2);
3451
+ z(".pinned__list")
3452
+ ], r.prototype, "pinnedAssetsList", 2);
3187
3453
  c([
3188
- R(".settings__cache__location__value__text")
3189
- ], n.prototype, "cacheLocationValueText", 2);
3454
+ z(".assets-list__tab-group")
3455
+ ], r.prototype, "assetsListTabGroup", 2);
3190
3456
  c([
3191
- p({
3457
+ z(".settings__cache__location__value__text")
3458
+ ], r.prototype, "cacheLocationValueText", 2);
3459
+ c([
3460
+ d({
3192
3461
  attribute: "connection-established",
3193
3462
  type: Boolean
3194
3463
  })
3195
- ], n.prototype, "connectionEstablished", 2);
3464
+ ], r.prototype, "connectionEstablished", 2);
3196
3465
  c([
3197
- p({
3466
+ d({
3198
3467
  attribute: "connection-status",
3199
3468
  reflect: !0,
3200
3469
  type: String
3201
3470
  })
3202
- ], n.prototype, "connectionStatus", 2);
3471
+ ], r.prototype, "connectionStatus", 2);
3203
3472
  c([
3204
- p({
3473
+ d({
3205
3474
  attribute: "connection-status-tooltip",
3206
3475
  type: String
3207
3476
  })
3208
- ], n.prototype, "connectionStatusTooltip", 2);
3477
+ ], r.prototype, "connectionStatusTooltip", 2);
3209
3478
  c([
3210
- p({
3479
+ d({
3211
3480
  attribute: "asset-index-sync-status",
3212
3481
  reflect: !0,
3213
3482
  type: String
3214
3483
  })
3215
- ], n.prototype, "assetIndexSyncStatus", 2);
3484
+ ], r.prototype, "assetIndexSyncStatus", 2);
3216
3485
  c([
3217
- p({
3486
+ d({
3218
3487
  attribute: "user-avatar-url",
3219
3488
  type: String
3220
3489
  })
3221
- ], n.prototype, "userAvatarUrl", 2);
3490
+ ], r.prototype, "userAvatarUrl", 2);
3222
3491
  c([
3223
- p({
3492
+ d({
3224
3493
  type: String
3225
3494
  })
3226
- ], n.prototype, "username", 2);
3495
+ ], r.prototype, "username", 2);
3227
3496
  c([
3228
- p({
3497
+ d({
3229
3498
  attribute: "recent-assets",
3230
3499
  type: Object
3231
3500
  })
3232
- ], n.prototype, "recentAssets", 2);
3501
+ ], r.prototype, "recentAssets", 2);
3233
3502
  c([
3234
- p({
3503
+ d({
3235
3504
  attribute: "favorite-assets",
3236
3505
  type: Object
3237
3506
  })
3238
- ], n.prototype, "favoriteAssets", 2);
3507
+ ], r.prototype, "favoriteAssets", 2);
3239
3508
  c([
3240
- p({
3509
+ d({
3241
3510
  attribute: "favorite-last-sync",
3242
3511
  type: Number
3243
3512
  })
3244
- ], n.prototype, "favoritesLastSync", 2);
3513
+ ], r.prototype, "favoritesLastSync", 2);
3245
3514
  c([
3246
- p({
3515
+ d({
3247
3516
  attribute: "favorite-in-progress-assets",
3248
3517
  converter: {
3249
- fromAttribute: (t) => t.split(" ").map(Number),
3518
+ fromAttribute: (t) => t.split(" ").filter(Boolean),
3519
+ toAttribute: (t) => t.join(" ")
3520
+ },
3521
+ type: String
3522
+ })
3523
+ ], r.prototype, "favoriteInProgressAssets", 2);
3524
+ c([
3525
+ d({
3526
+ attribute: "pin-in-progress-assets",
3527
+ converter: {
3528
+ fromAttribute: (t) => t.split(" ").filter(Boolean),
3250
3529
  toAttribute: (t) => t.join(" ")
3251
3530
  },
3252
3531
  type: String
3253
3532
  })
3254
- ], n.prototype, "favoriteInProgressAssets", 2);
3533
+ ], r.prototype, "pinInProgressAssets", 2);
3255
3534
  c([
3256
- p({
3535
+ d({
3257
3536
  attribute: "uploading-assets",
3258
3537
  type: Object
3259
3538
  })
3260
- ], n.prototype, "uploadingAssets", 2);
3539
+ ], r.prototype, "uploadingAssets", 2);
3540
+ c([
3541
+ d({
3542
+ attribute: "pinned-assets",
3543
+ type: Object
3544
+ })
3545
+ ], r.prototype, "pinnedAssets", 2);
3261
3546
  c([
3262
- x()
3263
- ], n.prototype, "availableFolderIdentifiers", 2);
3547
+ u()
3548
+ ], r.prototype, "availableFolderIdentifiers", 2);
3264
3549
  c([
3265
- x()
3266
- ], n.prototype, "isLoading", 2);
3550
+ u()
3551
+ ], r.prototype, "isLoading", 2);
3267
3552
  c([
3268
- p({
3553
+ d({
3269
3554
  attribute: "settings",
3270
3555
  type: Object
3271
3556
  })
3272
- ], n.prototype, "settings", 2);
3557
+ ], r.prototype, "settings", 2);
3273
3558
  c([
3274
- p({ attribute: "pick-cache-location" })
3275
- ], n.prototype, "pickCacheLocation", 2);
3559
+ d({ attribute: "pick-cache-location", type: Function })
3560
+ ], r.prototype, "pickCacheLocation", 2);
3276
3561
  c([
3277
- p({
3562
+ d({
3278
3563
  attribute: "has-new-version",
3279
3564
  type: Boolean
3280
3565
  })
3281
- ], n.prototype, "hasNewVersion", 2);
3566
+ ], r.prototype, "hasNewVersion", 2);
3282
3567
  c([
3283
- p({
3568
+ d({
3284
3569
  attribute: "about-content",
3285
3570
  type: String
3286
3571
  })
3287
- ], n.prototype, "aboutContent", 2);
3572
+ ], r.prototype, "aboutContent", 2);
3288
3573
  c([
3289
- p({ type: String })
3290
- ], n.prototype, "token", 2);
3574
+ d({ type: String })
3575
+ ], r.prototype, "token", 2);
3291
3576
  c([
3292
- p({
3577
+ d({
3293
3578
  attribute: "user-interaction-blocked",
3294
3579
  type: Boolean
3295
3580
  })
3296
- ], n.prototype, "userInteractionBlocked", 2);
3581
+ ], r.prototype, "userInteractionBlocked", 2);
3297
3582
  c([
3298
- p({
3583
+ d({
3299
3584
  attribute: "is-connecting",
3300
3585
  type: Boolean
3301
3586
  })
3302
- ], n.prototype, "isConnecting", 2);
3587
+ ], r.prototype, "isConnecting", 2);
3303
3588
  c([
3304
- p({
3589
+ d({
3305
3590
  attribute: "is-cancelling-connection",
3306
3591
  type: Boolean
3307
3592
  })
3308
- ], n.prototype, "isCancellingConnection", 2);
3593
+ ], r.prototype, "isCancellingConnection", 2);
3309
3594
  c([
3310
- p({
3595
+ d({
3311
3596
  attribute: "is-disconnecting",
3312
3597
  type: Boolean
3313
3598
  })
3314
- ], n.prototype, "isDisconnecting", 2);
3599
+ ], r.prototype, "isDisconnecting", 2);
3315
3600
  c([
3316
- p({
3601
+ d({
3317
3602
  attribute: "is-upgrading",
3318
3603
  type: Boolean
3319
3604
  })
3320
- ], n.prototype, "isUpgrading", 2);
3605
+ ], r.prototype, "isUpgrading", 2);
3606
+ c([
3607
+ u()
3608
+ ], r.prototype, "isSettingsOpened", 2);
3609
+ c([
3610
+ u()
3611
+ ], r.prototype, "rootIDs", 2);
3321
3612
  c([
3322
- x()
3323
- ], n.prototype, "isSettingsOpened", 2);
3613
+ u()
3614
+ ], r.prototype, "_activeFoldersMode", 2);
3324
3615
  c([
3325
- x()
3326
- ], n.prototype, "rootIDs", 2);
3616
+ u()
3617
+ ], r.prototype, "removedIds", 2);
3327
3618
  c([
3328
- x()
3329
- ], n.prototype, "_activeFoldersMode", 2);
3619
+ u()
3620
+ ], r.prototype, "cacheSize", 2);
3330
3621
  c([
3331
- x()
3332
- ], n.prototype, "removedIds", 2);
3622
+ u()
3623
+ ], r.prototype, "cacheLocation", 2);
3333
3624
  c([
3334
- x()
3335
- ], n.prototype, "cacheSize", 2);
3625
+ u()
3626
+ ], r.prototype, "proxyTypes", 2);
3336
3627
  c([
3337
- x()
3338
- ], n.prototype, "cacheLocation", 2);
3628
+ u()
3629
+ ], r.prototype, "siteUrl", 2);
3339
3630
  c([
3340
- x()
3341
- ], n.prototype, "proxyTypes", 2);
3631
+ u()
3632
+ ], r.prototype, "isRecentAssetsLoading", 2);
3342
3633
  c([
3343
- x()
3344
- ], n.prototype, "siteUrl", 2);
3634
+ u()
3635
+ ], r.prototype, "isFavoriteAssetsLoading", 2);
3345
3636
  c([
3346
- x()
3347
- ], n.prototype, "isRecentAssetsLoading", 2);
3637
+ u()
3638
+ ], r.prototype, "isUploadingAssetsLoading", 2);
3348
3639
  c([
3349
- x()
3350
- ], n.prototype, "isFavoriteAssetsLoading", 2);
3640
+ u()
3641
+ ], r.prototype, "isPinnedAssetsLoading", 2);
3351
3642
  c([
3352
- x()
3353
- ], n.prototype, "isUploadingAssetsLoading", 2);
3643
+ u()
3644
+ ], r.prototype, "connectError", 2);
3354
3645
  c([
3355
- x()
3356
- ], n.prototype, "connectError", 2);
3646
+ u()
3647
+ ], r.prototype, "disconnectError", 2);
3357
3648
  c([
3358
- x()
3359
- ], n.prototype, "disconnectError", 2);
3649
+ u()
3650
+ ], r.prototype, "upgradeError", 2);
3360
3651
  c([
3361
- x()
3362
- ], n.prototype, "upgradeError", 2);
3652
+ u()
3653
+ ], r.prototype, "totalCount", 2);
3363
3654
  c([
3364
- x()
3365
- ], n.prototype, "totalCount", 2);
3655
+ u()
3656
+ ], r.prototype, "folderPathsSet", 2);
3366
3657
  c([
3367
- x()
3368
- ], n.prototype, "folderPathsSet", 2);
3658
+ u()
3659
+ ], r.prototype, "validConnectionUrl", 2);
3369
3660
  c([
3370
- x()
3371
- ], n.prototype, "validConnectionUrl", 2);
3661
+ u()
3662
+ ], r.prototype, "isAddingRootIDs", 2);
3372
3663
  c([
3373
- x()
3374
- ], n.prototype, "isAddingRootIDs", 2);
3664
+ P(["connectionEstablished", "token"])
3665
+ ], r.prototype, "fetchData", 1);
3375
3666
  c([
3376
- L(["connectionEstablished", "token"])
3377
- ], n.prototype, "fetchData", 1);
3667
+ P(["connectionEstablished"])
3668
+ ], r.prototype, "showRecentTab", 1);
3378
3669
  c([
3379
- L(["connectionEstablished"])
3380
- ], n.prototype, "showRecentTab", 1);
3670
+ P("settings")
3671
+ ], r.prototype, "updateSettingsStates", 1);
3381
3672
  c([
3382
- L("settings")
3383
- ], n.prototype, "updateSettingsStates", 1);
3673
+ P("recentAssets")
3674
+ ], r.prototype, "onRecentAssetsChanged", 1);
3384
3675
  c([
3385
- L("recentAssets")
3386
- ], n.prototype, "onRecentAssetsChanged", 1);
3676
+ P("pinnedAssets")
3677
+ ], r.prototype, "onPinnedAssetsChanged", 1);
3387
3678
  c([
3388
- L("favoriteAssets")
3389
- ], n.prototype, "onFavoriteAssetsChanged", 1);
3679
+ P("favoriteAssets")
3680
+ ], r.prototype, "onFavoriteAssetsChanged", 1);
3390
3681
  c([
3391
- L("uploadingAssets")
3392
- ], n.prototype, "onUploadingAssetsChanged", 1);
3682
+ P("uploadingAssets")
3683
+ ], r.prototype, "onUploadingAssetsChanged", 1);
3393
3684
  c([
3394
- x()
3395
- ], n.prototype, "searchText", 2);
3685
+ u()
3686
+ ], r.prototype, "searchText", 2);
3396
3687
  c([
3397
- L(["searchText"]),
3398
- Zt(200)
3399
- ], n.prototype, "onSearch", 1);
3688
+ P(["searchText"]),
3689
+ Xt(200)
3690
+ ], r.prototype, "onSearch", 1);
3400
3691
  c([
3401
- L("cacheLocation")
3402
- ], n.prototype, "handleCacheLocationChange", 1);
3403
- n = c([
3404
- K("cx-file-on-demand")
3405
- ], n);
3692
+ P("cacheLocation")
3693
+ ], r.prototype, "handleCacheLocationChange", 1);
3694
+ r = c([
3695
+ W("cx-file-on-demand")
3696
+ ], r);
3406
3697
  export {
3407
- n as C,
3408
- As as U,
3409
- at as a,
3698
+ r as C,
3699
+ De as a,
3410
3700
  Pe as b,
3411
- Oe as c,
3412
- nt as d,
3413
- Ue as e,
3414
- Ne as f,
3415
- je as i,
3416
- Ce as o,
3417
- Re as s
3701
+ ze as c,
3702
+ Ee as i
3418
3703
  };