@salla.sa/twilight-components 2.14.539 → 2.14.541

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 (401) hide show
  1. package/dist/cjs/{filepond-CIpOpiw6.js → filepond-CNdvfaMJ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CPV_SZrj.js → filepond-plugin-file-poster-Di_D3w89.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-C_XGylG1.js → filepond-plugin-file-validate-size-BiRa98qd.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CmVS48lk.js → filepond-plugin-file-validate-type-Bolv-kyJ.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-KfqhH5F9.js → filepond-plugin-image-edit-AN6huMV9.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BfRIDxO-.js → filepond-plugin-image-exif-orientation-Bwa8QtGo.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DlvO4sHZ.js → filepond-plugin-image-preview-CaVYLAvG.js} +1 -1
  8. package/dist/cjs/helpers-ClOJIAG8.js +89 -0
  9. package/dist/cjs/{index-CMDyFi6Q.js → index-DX2EKTCE.js} +18 -14
  10. package/dist/cjs/{intlTelInput-BK34b4sR.js → intlTelInput-DnwdGAiP.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/{salla-booking-field_7.cjs.entry.js → salla-attachment-view_9.cjs.entry.js} +1003 -40
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +14 -5
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +303 -26
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +420 -84
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -5
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +4 -83
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +125 -0
  88. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/upload-limits-C3RarAPN.js +136 -0
  106. package/dist/cjs/{vanilla-picker-DYTpjTDj.js → vanilla-picker-BUFYPi-_.js} +1 -1
  107. package/dist/collection/collection-manifest.json +16 -11
  108. package/dist/collection/components/salla-attachment-view/salla-attachment-view.css +164 -0
  109. package/dist/collection/components/salla-attachment-view/salla-attachment-view.js +250 -0
  110. package/dist/collection/components/salla-attachments/salla-attachments.css +69 -0
  111. package/dist/collection/components/salla-attachments/salla-attachments.js +375 -0
  112. package/dist/collection/components/salla-comments/salla-comment-item.js +13 -3
  113. package/dist/collection/components/salla-comments/salla-comments.css +7 -0
  114. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +206 -56
  115. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +322 -30
  116. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  117. package/dist/collection/components/salla-file-upload/salla-file-upload.css +149 -0
  118. package/dist/collection/components/salla-file-upload/salla-file-upload.js +784 -42
  119. package/dist/collection/components/salla-file-upload/upload-limits.js +127 -0
  120. package/dist/collection/components/salla-products-slider/salla-products-slider.js +1 -1
  121. package/dist/collection/components/salla-rating-modal/rating-modal-media.js +85 -0
  122. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +348 -85
  123. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +17 -7
  124. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +1 -3
  125. package/dist/collection/components/salla-review-factors-tags/helpers.js +8 -7
  126. package/dist/collection/components/salla-review-order-item/interfaces.js +1 -0
  127. package/dist/collection/components/salla-review-order-item/salla-review-order-item.js +154 -0
  128. package/dist/components/index.js +2 -2
  129. package/dist/components/salla-add-product-button2.js +40 -28
  130. package/dist/components/salla-attachment-view.d.ts +11 -0
  131. package/dist/components/salla-attachment-view.js +9 -0
  132. package/dist/components/salla-attachment-view2.js +323 -0
  133. package/dist/components/salla-attachments.d.ts +11 -0
  134. package/dist/components/salla-attachments.js +9 -0
  135. package/dist/components/salla-attachments2.js +232 -0
  136. package/dist/components/salla-basket-gap.js +46 -34
  137. package/dist/components/salla-breadcrumb.js +1 -1
  138. package/dist/components/salla-comment-factors2.js +1 -1
  139. package/dist/components/salla-comment-item2.js +26 -4
  140. package/dist/components/salla-comments.js +14 -2
  141. package/dist/components/salla-cookies-bar.js +319 -27
  142. package/dist/components/salla-custom-fields.js +28 -4
  143. package/dist/components/salla-file-upload2.js +703 -31
  144. package/dist/components/salla-gifting.js +7 -1
  145. package/dist/components/salla-loyalty-exchange-product-card2.js +46 -34
  146. package/dist/components/salla-loyalty-panel.js +8 -2
  147. package/dist/components/salla-loyalty-program.js +8 -2
  148. package/dist/components/salla-multiple-bundle-product-cart2.js +40 -28
  149. package/dist/components/salla-multiple-bundle-product-details2.js +12 -6
  150. package/dist/components/salla-multiple-bundle-product-options-modal2.js +7 -1
  151. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  152. package/dist/components/salla-multiple-bundle-product.js +12 -6
  153. package/dist/components/salla-offer-modal.js +8 -2
  154. package/dist/components/salla-order-edit-item2.js +36 -24
  155. package/dist/components/salla-order-edit.js +42 -30
  156. package/dist/components/salla-order-options-modal2.js +34 -22
  157. package/dist/components/salla-product-card2.js +44 -32
  158. package/dist/components/salla-product-options2.js +32 -20
  159. package/dist/components/salla-products-slider2.js +8 -2
  160. package/dist/components/salla-quick-buy2.js +36 -24
  161. package/dist/components/salla-rating-modal-v22.js +449 -97
  162. package/dist/components/salla-rating-modal.js +30 -20
  163. package/dist/components/salla-review-factors-tags2.js +9 -8
  164. package/dist/components/salla-review-order-item.d.ts +11 -0
  165. package/dist/components/salla-review-order-item.js +196 -0
  166. package/dist/components/salla-reward-details2.js +8 -2
  167. package/dist/components/salla-slider2.js +1 -1
  168. package/dist/esm/{filepond-DMUE9Fyj.js → filepond-CKsbRWmS.js} +1 -1
  169. package/dist/esm/{filepond-plugin-file-poster-DBZQTm7s.js → filepond-plugin-file-poster-B_gYCESq.js} +1 -1
  170. package/dist/esm/{filepond-plugin-file-validate-size-CrKxdsNW.js → filepond-plugin-file-validate-size-Bep6fNi3.js} +1 -1
  171. package/dist/esm/{filepond-plugin-file-validate-type-DvEJrucY.js → filepond-plugin-file-validate-type-r3uRmGIr.js} +1 -1
  172. package/dist/esm/{filepond-plugin-image-edit-C6ptCg9o.js → filepond-plugin-image-edit-BJcOlOFL.js} +1 -1
  173. package/dist/esm/{filepond-plugin-image-exif-orientation-IcgeTieF.js → filepond-plugin-image-exif-orientation-DJoDaRwQ.js} +1 -1
  174. package/dist/esm/{filepond-plugin-image-preview-CDMh74os.js → filepond-plugin-image-preview-BsuTLPS0.js} +1 -1
  175. package/dist/esm/helpers-DqXpn47Z.js +85 -0
  176. package/dist/esm/{index-CjQzkU95.js → index-BVqCTDsV.js} +18 -14
  177. package/dist/esm/{intlTelInput-Dsx2z7pR.js → intlTelInput-CD2FA0nI.js} +1 -1
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  180. package/dist/esm/salla-accordion_6.entry.js +1 -1
  181. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  182. package/dist/esm/salla-advertisement.entry.js +1 -1
  183. package/dist/esm/salla-alert_2.entry.js +1 -1
  184. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  185. package/dist/esm/salla-apps-icons.entry.js +1 -1
  186. package/dist/esm/{salla-booking-field_7.entry.js → salla-attachment-view_9.entry.js} +1002 -41
  187. package/dist/esm/salla-badge.entry.js +1 -1
  188. package/dist/esm/salla-basket-gap.entry.js +1 -1
  189. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  190. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  191. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  192. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  193. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  194. package/dist/esm/salla-comment-factors.entry.js +2 -2
  195. package/dist/esm/salla-comment-form_8.entry.js +14 -5
  196. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  197. package/dist/esm/salla-contacts.entry.js +1 -1
  198. package/dist/esm/salla-cookies-bar.entry.js +303 -26
  199. package/dist/esm/salla-count-down.entry.js +1 -1
  200. package/dist/esm/salla-custom-fields.entry.js +1 -1
  201. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  202. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  203. package/dist/esm/salla-filters-widget.entry.js +1 -1
  204. package/dist/esm/salla-filters.entry.js +1 -1
  205. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  206. package/dist/esm/salla-gifting.entry.js +1 -1
  207. package/dist/esm/salla-hook.entry.js +1 -1
  208. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  209. package/dist/esm/salla-installment.entry.js +1 -1
  210. package/dist/esm/salla-list-tile.entry.js +1 -1
  211. package/dist/esm/salla-localization-modal.entry.js +1 -1
  212. package/dist/esm/salla-login-modal.entry.js +1 -1
  213. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  214. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  215. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  216. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  217. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  218. package/dist/esm/salla-loyalty.entry.js +1 -1
  219. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  220. package/dist/esm/salla-map_2.entry.js +1 -1
  221. package/dist/esm/salla-menu.entry.js +1 -1
  222. package/dist/esm/salla-metadata.entry.js +1 -1
  223. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  224. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  225. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  226. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  227. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  228. package/dist/esm/salla-offer-modal.entry.js +1 -1
  229. package/dist/esm/salla-offer.entry.js +1 -1
  230. package/dist/esm/salla-order-branch.entry.js +1 -1
  231. package/dist/esm/salla-order-cancel.entry.js +1 -1
  232. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  233. package/dist/esm/salla-order-details-options.entry.js +1 -1
  234. package/dist/esm/salla-order-details.entry.js +1 -1
  235. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  236. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  237. package/dist/esm/salla-order-edit.entry.js +1 -1
  238. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  239. package/dist/esm/salla-order-shipments.entry.js +1 -1
  240. package/dist/esm/salla-order-summary.entry.js +1 -1
  241. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  242. package/dist/esm/salla-orders.entry.js +1 -1
  243. package/dist/esm/salla-payments.entry.js +1 -1
  244. package/dist/esm/salla-placeholder.entry.js +1 -1
  245. package/dist/esm/salla-price-range.entry.js +1 -1
  246. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  247. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  248. package/dist/esm/salla-products-list.entry.js +1 -1
  249. package/dist/esm/salla-products-slider.entry.js +1 -1
  250. package/dist/esm/salla-quick-order.entry.js +1 -1
  251. package/dist/esm/salla-rating-modal-v2.entry.js +420 -84
  252. package/dist/esm/salla-rating-modal.entry.js +3 -5
  253. package/dist/esm/salla-review-factors-tags.entry.js +2 -81
  254. package/dist/esm/salla-review-order-item.entry.js +123 -0
  255. package/dist/esm/salla-scopes.entry.js +1 -1
  256. package/dist/esm/salla-search.entry.js +1 -1
  257. package/dist/esm/salla-skeleton.entry.js +1 -1
  258. package/dist/esm/salla-slider.entry.js +1 -1
  259. package/dist/esm/salla-social-share.entry.js +1 -1
  260. package/dist/esm/salla-social.entry.js +1 -1
  261. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  262. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  263. package/dist/esm/salla-tooltip.entry.js +1 -1
  264. package/dist/esm/salla-trust-badges.entry.js +1 -1
  265. package/dist/esm/salla-user-menu.entry.js +1 -1
  266. package/dist/esm/salla-user-profile.entry.js +1 -1
  267. package/dist/esm/salla-user-settings.entry.js +1 -1
  268. package/dist/esm/salla-verify.entry.js +1 -1
  269. package/dist/esm/salla-wallet.entry.js +1 -1
  270. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  271. package/dist/esm/twilight.js +3 -3
  272. package/dist/esm/upload-limits-DrXX8XG8.js +121 -0
  273. package/dist/esm/{vanilla-picker-oYjMgYry.js → vanilla-picker-Ba_za9Iy.js} +1 -1
  274. package/dist/twilight/{p-49e6fe86.entry.js → p-003499a8.entry.js} +1 -1
  275. package/dist/twilight/{p-58184ae2.entry.js → p-0974f6c6.entry.js} +1 -1
  276. package/dist/twilight/{p-3052178c.entry.js → p-0a9093f1.entry.js} +1 -1
  277. package/dist/twilight/{p-cb179aba.entry.js → p-0ce2c41f.entry.js} +1 -1
  278. package/dist/twilight/{p-bbe79568.entry.js → p-0ea8365b.entry.js} +1 -1
  279. package/dist/twilight/p-1174e53e.entry.js +4 -0
  280. package/dist/twilight/{p-fe7990b7.entry.js → p-11ef8b82.entry.js} +1 -1
  281. package/dist/twilight/{p-dd5800dd.entry.js → p-13244c52.entry.js} +1 -1
  282. package/dist/twilight/{p-187a502c.entry.js → p-14689252.entry.js} +1 -1
  283. package/dist/twilight/{p-48db7b95.entry.js → p-17940d8a.entry.js} +1 -1
  284. package/dist/twilight/{p-a802826b.entry.js → p-1974f6da.entry.js} +1 -1
  285. package/dist/twilight/{p-250d7ab2.entry.js → p-1a191989.entry.js} +1 -1
  286. package/dist/twilight/{p-1d2804ac.entry.js → p-1ec6e0fe.entry.js} +1 -1
  287. package/dist/twilight/{p-5bbf829e.entry.js → p-1fcebaad.entry.js} +1 -1
  288. package/dist/twilight/{p-51a860bc.entry.js → p-2b0cf190.entry.js} +1 -1
  289. package/dist/twilight/{p-68c8772a.entry.js → p-333ea76b.entry.js} +1 -1
  290. package/dist/twilight/{p-8ef3693b.entry.js → p-337cc9f6.entry.js} +1 -1
  291. package/dist/twilight/{p-f7298462.entry.js → p-34d5c7bf.entry.js} +1 -1
  292. package/dist/twilight/{p-b1812d5c.entry.js → p-36abc50f.entry.js} +1 -1
  293. package/dist/twilight/{p-a1494e64.entry.js → p-37d9f762.entry.js} +1 -1
  294. package/dist/twilight/{p-5e9fb02d.entry.js → p-3961522a.entry.js} +1 -1
  295. package/dist/twilight/{p-1754903f.entry.js → p-39d9e02f.entry.js} +1 -1
  296. package/dist/twilight/{p-152c657e.entry.js → p-3a4bb8de.entry.js} +1 -1
  297. package/dist/twilight/{p-7c74dc6e.entry.js → p-409f95a8.entry.js} +1 -1
  298. package/dist/twilight/{p-3bc64439.entry.js → p-42952fac.entry.js} +1 -1
  299. package/dist/twilight/{p-0a1271e1.entry.js → p-436dfe93.entry.js} +1 -1
  300. package/dist/twilight/{p-44cfb2c2.entry.js → p-50c90e0a.entry.js} +1 -1
  301. package/dist/twilight/{p-31c36417.entry.js → p-5115117b.entry.js} +1 -1
  302. package/dist/twilight/{p-1fb46b43.entry.js → p-56647774.entry.js} +1 -1
  303. package/dist/twilight/{p-e020f1c3.entry.js → p-598cadf4.entry.js} +1 -1
  304. package/dist/twilight/{p-331679d8.entry.js → p-635265d1.entry.js} +1 -1
  305. package/dist/twilight/{p-1470e96a.entry.js → p-659e2280.entry.js} +1 -1
  306. package/dist/twilight/p-6a3487de.entry.js +4 -0
  307. package/dist/twilight/{p-1c31cec0.entry.js → p-6d07d195.entry.js} +1 -1
  308. package/dist/twilight/{p-91b4a1a0.entry.js → p-6ee096e8.entry.js} +1 -1
  309. package/dist/twilight/{p-37413a02.entry.js → p-723aeda4.entry.js} +1 -1
  310. package/dist/twilight/{p-ae536a61.entry.js → p-743b79ae.entry.js} +1 -1
  311. package/dist/twilight/{p-b193c991.entry.js → p-75e692d1.entry.js} +1 -1
  312. package/dist/twilight/{p-9c7fcbb0.entry.js → p-79444897.entry.js} +1 -1
  313. package/dist/twilight/{p-6ed4c9bb.entry.js → p-7b23dec7.entry.js} +1 -1
  314. package/dist/twilight/p-7bb24ad6.entry.js +4 -0
  315. package/dist/twilight/{p-c254b6fa.entry.js → p-7d9288b0.entry.js} +1 -1
  316. package/dist/twilight/{p-82c12191.entry.js → p-85f95a58.entry.js} +1 -1
  317. package/dist/twilight/{p-67e88dc4.entry.js → p-86a1f616.entry.js} +1 -1
  318. package/dist/twilight/{p-80ff5572.entry.js → p-87115499.entry.js} +1 -1
  319. package/dist/twilight/{p-cc2b960c.entry.js → p-878c2be2.entry.js} +1 -1
  320. package/dist/twilight/{p-b69e98a8.entry.js → p-89e9a91f.entry.js} +1 -1
  321. package/dist/twilight/{p-2e112687.entry.js → p-90ee37c7.entry.js} +1 -1
  322. package/dist/twilight/{p-aeb76c46.entry.js → p-96584590.entry.js} +1 -1
  323. package/dist/twilight/{p-1dd1fef0.entry.js → p-96a57e9c.entry.js} +1 -1
  324. package/dist/twilight/{p-1c369bcf.entry.js → p-978e4164.entry.js} +1 -1
  325. package/dist/twilight/{p-4058b619.entry.js → p-97fc57c1.entry.js} +1 -1
  326. package/dist/twilight/p-98b1ff35.entry.js +4 -0
  327. package/dist/twilight/{p-5d01f25c.entry.js → p-9d18525b.entry.js} +1 -1
  328. package/dist/twilight/{p-CmQyEOxJ.js → p-B83s3cRn.js} +2 -2
  329. package/dist/twilight/{p-CjQzkU95.js → p-BVqCTDsV.js} +1 -1
  330. package/dist/twilight/{p-BtymczNp.js → p-CP29f7RQ.js} +1 -1
  331. package/dist/twilight/{p-C6w35AiQ.js → p-CS-t4QAX.js} +1 -1
  332. package/dist/twilight/{p-BiyhYWus.js → p-Cluq3aDa.js} +1 -1
  333. package/dist/twilight/{p-DfJdKB52.js → p-D-zqM6k8.js} +1 -1
  334. package/dist/twilight/{p-CGDRqU6i.js → p-DJmqmO68.js} +1 -1
  335. package/dist/twilight/{p-D2uiOzVz.js → p-DgwK96eP.js} +1 -1
  336. package/dist/twilight/p-DqXpn47Z.js +4 -0
  337. package/dist/twilight/p-DrXX8XG8.js +4 -0
  338. package/dist/twilight/{p-C1wu6qA1.js → p-DzW3U8TR.js} +1 -1
  339. package/dist/twilight/{p-B9VKgTTF.js → p-JKh0XFIn.js} +1 -1
  340. package/dist/twilight/{p-699bea26.entry.js → p-a347e701.entry.js} +1 -1
  341. package/dist/twilight/{p-9fa351ab.entry.js → p-a5d08af6.entry.js} +1 -1
  342. package/dist/twilight/{p-8230c543.entry.js → p-a774f6f0.entry.js} +7 -7
  343. package/dist/twilight/p-afaa0fbe.entry.js +4 -0
  344. package/dist/twilight/p-b389b1d3.entry.js +4 -0
  345. package/dist/twilight/{p-298ff716.entry.js → p-b6d5ae9b.entry.js} +1 -1
  346. package/dist/twilight/{p-b0e86201.entry.js → p-b862c670.entry.js} +1 -1
  347. package/dist/twilight/{p-2e43ddf0.entry.js → p-bab59319.entry.js} +1 -1
  348. package/dist/twilight/{p-437fe6f1.entry.js → p-bf4c2184.entry.js} +1 -1
  349. package/dist/twilight/{p-7f73ff43.entry.js → p-c19cf93c.entry.js} +1 -1
  350. package/dist/twilight/{p-3f26f1c5.entry.js → p-c34f8c08.entry.js} +1 -1
  351. package/dist/twilight/{p-116e7555.entry.js → p-c47ecca7.entry.js} +1 -1
  352. package/dist/twilight/{p-84f35767.entry.js → p-c48f5c6b.entry.js} +1 -1
  353. package/dist/twilight/{p-40217fcc.entry.js → p-c53c2f59.entry.js} +1 -1
  354. package/dist/twilight/{p-1151ebd7.entry.js → p-cd805a38.entry.js} +1 -1
  355. package/dist/twilight/{p-4868c03c.entry.js → p-cdd8ed7f.entry.js} +1 -1
  356. package/dist/twilight/{p-9b6db6a7.entry.js → p-ced4b7ac.entry.js} +1 -1
  357. package/dist/twilight/{p-a3f00389.entry.js → p-cf3365e2.entry.js} +1 -1
  358. package/dist/twilight/p-d78998b7.entry.js +4 -0
  359. package/dist/twilight/{p-665bca88.entry.js → p-daea3207.entry.js} +1 -1
  360. package/dist/twilight/{p-664f0936.entry.js → p-dff6d623.entry.js} +1 -1
  361. package/dist/twilight/p-e04221de.entry.js +4 -0
  362. package/dist/twilight/{p-db02986a.entry.js → p-e2934193.entry.js} +1 -1
  363. package/dist/twilight/{p-14c72ffd.entry.js → p-e3dab961.entry.js} +1 -1
  364. package/dist/twilight/{p-bf183f3a.entry.js → p-e41e5fc7.entry.js} +1 -1
  365. package/dist/twilight/{p-5b03dca8.entry.js → p-e4c9cef4.entry.js} +1 -1
  366. package/dist/twilight/{p-27a0a4cc.entry.js → p-eaf9d536.entry.js} +1 -1
  367. package/dist/twilight/{p-a669483e.entry.js → p-ee2b16d7.entry.js} +1 -1
  368. package/dist/twilight/{p-fa28a89f.entry.js → p-ee3ddc23.entry.js} +1 -1
  369. package/dist/twilight/{p-54d0db9a.entry.js → p-f0a14b18.entry.js} +1 -1
  370. package/dist/twilight/{p-8fa84b87.entry.js → p-f195a63d.entry.js} +1 -1
  371. package/dist/twilight/{p-997c4966.entry.js → p-f2c688d6.entry.js} +1 -1
  372. package/dist/twilight/{p-2c6c0844.entry.js → p-f4ac8cae.entry.js} +1 -1
  373. package/dist/twilight/{p-2babb4bd.entry.js → p-f58d14ed.entry.js} +1 -1
  374. package/dist/twilight/{p-3bdba697.entry.js → p-f82cee0c.entry.js} +1 -1
  375. package/dist/twilight/{p-8ae7bf96.entry.js → p-fa17989b.entry.js} +1 -1
  376. package/dist/twilight/{p-b3fe5e44.entry.js → p-fbc075fe.entry.js} +1 -1
  377. package/dist/twilight/{p-3b6b3c54.entry.js → p-fc5d5473.entry.js} +1 -1
  378. package/dist/twilight/twilight.esm.js +1 -1
  379. package/dist/types/components/salla-attachment-view/salla-attachment-view.d.ts +47 -0
  380. package/dist/types/components/salla-attachments/salla-attachments.d.ts +73 -0
  381. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  382. package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
  383. package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +117 -12
  384. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +127 -4
  385. package/dist/types/components/salla-file-upload/upload-limits.d.ts +49 -0
  386. package/dist/types/components/salla-rating-modal/rating-modal-media.d.ts +38 -0
  387. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +30 -7
  388. package/dist/types/components/salla-review-factors-tags/helpers.d.ts +1 -1
  389. package/dist/types/components/salla-review-factors-tags/interfaces.d.ts +7 -0
  390. package/dist/types/components/salla-review-order-item/interfaces.d.ts +30 -0
  391. package/dist/types/components/salla-review-order-item/salla-review-order-item.d.ts +30 -0
  392. package/dist/types/components.d.ts +286 -11
  393. package/package.json +6 -6
  394. package/dist/twilight/p-236f371d.entry.js +0 -4
  395. package/dist/twilight/p-3c22551b.entry.js +0 -4
  396. package/dist/twilight/p-8bce41c8.entry.js +0 -4
  397. package/dist/twilight/p-e701a3dc.entry.js +0 -4
  398. package/dist/twilight/p-f1eebeda.entry.js +0 -4
  399. package/dist/twilight/p-f4bdf19e.entry.js +0 -4
  400. package/dist/twilight/p-faaf4423.entry.js +0 -4
  401. package/dist/components/{keyboard_arrow_right.js → keyboard_arrow_left.js} +6 -6
@@ -1,13 +1,342 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CjQzkU95.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent } from './index-BVqCTDsV.js';
5
+ import { i as isVideoMimeType, a as isImageMimeType, u as usesSplitCountLimits, g as getMaxImagesCount, c as getMaxVideosCount, d as getTotalMaxFiles, p as parseSizeToBytes, e as getFilePondMaxFileSize, f as getUploadErrorMessage, h as formatBytesAsSize, j as formatDuration, s as shouldCountGalleryFile, k as shouldCountGalleryLimit } from './upload-limits-DrXX8XG8.js';
5
6
  import { S as SICalendar } from './calendar-BkmanTR_.js';
6
7
  import { A as ArrowDown } from './keyboard_arrow_down-DCZbpt2a.js';
8
+ import { C as Cancel } from './cancel-BsLF_HK7.js';
7
9
  import { p as plusIcon, m as minusIcon } from './minus-DfeagqF1.js';
8
10
  import { H as Helper } from './Helper-CBmYxrzX.js';
9
11
  import './anime.es-CgtvEd63.js';
10
12
 
13
+ var PlayIcon = `<!-- Generated by IcoMoon.io -->
14
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
15
+ <title>play-circle</title>
16
+ <path d="M22.84 13.833l-7.756-5.331c-0.884-0.607-2.021-0.671-2.977-0.169-0.888 0.469-1.44 1.363-1.44 2.336v10.661c0 0.972 0.552 1.868 1.441 2.336 0.425 0.224 0.889 0.335 1.351 0.335 0.571 0 1.137-0.169 1.625-0.505l7.756-5.331c0.727-0.499 1.16-1.308 1.16-2.165s-0.433-1.667-1.16-2.167zM13.573 21.299c-0.093 0.065-0.196 0.025-0.229 0.027-0.007 0-0.011 0.001-0.011 0.007v-10.627c0.040-0.028 0.141-0.069 0.24-0.003l7.756 5.267zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>
17
+ </svg>
18
+ `;
19
+
20
+ const sallaAttachmentViewCss = "/*!twlt*/.s-attachment-view-modal-host .s-modal-header{display:flex;flex-direction:row;align-items:center;position:relative;min-height:2.75rem}.s-attachment-view-modal-host .s-modal-close{top:50%;transform:translateY(-50%)}.s-attachment-view-modal-host .s-modal-header-inner{display:flex !important;align-items:center;justify-content:center;width:100%;margin-bottom:0;text-align:start;padding-inline:2.75rem}@media (min-width: 768px){.s-attachment-view-modal-host .s-modal-header-inner{justify-content:flex-start;padding:0 1.5rem !important;margin-top:0.5rem}}.s-attachment-view-modal-host .s-modal-header-content,.s-attachment-view-modal-host .s-modal-title{text-align:center !important}@media (min-width: 768px){.s-attachment-view-modal-host .s-modal-header-content,.s-attachment-view-modal-host .s-modal-title{text-align:start !important}}.s-attachment-view-modal-host .s-modal-title{margin-bottom:0}@media (min-width: 768px){.s-attachment-view-modal-host .s-modal-title{margin-bottom:0.5rem}}.s-attachment-view-modal{--s-attachment-view-thumb-size:2.5rem;--s-attachment-view-thumb-gap:10px;width:100%;padding:0.75rem}.s-attachment-view-modal .s-slider-block__title-nav button{background:#fff;box-shadow:0 1px 3px rgba(0, 0, 0, 0.12)}.s-attachment-view-gallery{width:100%}.s-attachment-view-thumbs{display:flex;gap:var(--s-attachment-view-thumb-gap);margin-top:0.75rem;padding-bottom:0.25rem;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.s-attachment-view-thumb-btn{flex:0 0 auto;padding:0;border:none;background:transparent;cursor:pointer;border-radius:0.25rem;transition:opacity 0.2s ease}.s-attachment-view-thumb-btn:not(.is-active){opacity:0.75}.s-attachment-view-thumb-btn:hover{opacity:1}.s-attachment-view-thumb-btn.is-active .s-attachment-view-thumb{box-shadow:0 0 0 2px var(--color-primary, #004d5a)}.s-attachment-view-slider .s-slider-container .swiper-slide{display:flex;align-items:center;justify-content:center}.s-attachment-view-slider .s-slider-container .s-attachment-view-slide{display:flex;align-items:center;justify-content:center;width:100%}.s-attachment-view-slider .s-slider-container img{width:100%;max-width:100%;height:min(50vh, 320px);object-fit:contain;margin-inline:auto}.s-attachment-view-slider video.s-attachment-view-video{display:block;width:100%;max-width:100%;height:min(50vh, 320px);object-fit:contain;margin-inline:auto;background-color:#000}.s-attachment-view-thumb{width:var(--s-attachment-view-thumb-size);height:var(--s-attachment-view-thumb-size);overflow:hidden;border-radius:0.25rem}.s-attachment-view-thumb img,.s-attachment-view-thumb video{display:block;width:100%;height:100%;object-fit:cover}.s-attachment-view-thumb.is-video{position:relative}.s-attachment-view-thumb-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:rgba(0, 0, 0, 0.25);pointer-events:none}.s-attachment-view-thumb-play svg{width:0.875rem;height:0.875rem;fill:#fff;opacity:0.95}.block{display:block}.inline{display:inline}.s-scrollbar::-webkit-scrollbar{width:5px}.s-scrollbar::-webkit-scrollbar-track{background-color:#eee}.s-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-primary);border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}";
21
+
22
+ const SallaAttachmentView = class {
23
+ constructor(hostRef) {
24
+ registerInstance(this, hostRef);
25
+ /**
26
+ * Attachments to display. Accepts an array of `{ id, url, mimeType? }` or a
27
+ * JSON string of the same shape (for consumers outside of JSX/Stencil).
28
+ */
29
+ this.attachments = [];
30
+ this.isOpen = false;
31
+ this.activeIndex = 0;
32
+ this.handleKeyDown = (event) => {
33
+ if (!this.isOpen)
34
+ return;
35
+ if (event.key === 'Escape') {
36
+ event.preventDefault();
37
+ this.close();
38
+ return;
39
+ }
40
+ const items = this.getAttachments();
41
+ if (items.length <= 1)
42
+ return;
43
+ const isRtl = document.documentElement.dir === 'rtl';
44
+ const goPrevious = () => this.goToSlide(this.activeIndex - 1);
45
+ const goNext = () => this.goToSlide(this.activeIndex + 1);
46
+ if (event.key === 'ArrowLeft') {
47
+ event.preventDefault();
48
+ (isRtl ? goNext : goPrevious)();
49
+ return;
50
+ }
51
+ if (event.key === 'ArrowRight') {
52
+ event.preventDefault();
53
+ (isRtl ? goPrevious : goNext)();
54
+ }
55
+ };
56
+ this.handleModalVisibilityChanged = (open) => {
57
+ this.isOpen = open;
58
+ if (open) {
59
+ window.addEventListener('keydown', this.handleKeyDown);
60
+ this.scrollActiveThumbIntoView();
61
+ return;
62
+ }
63
+ window.removeEventListener('keydown', this.handleKeyDown);
64
+ this.pauseVideos();
65
+ };
66
+ this.handleSlideChange = (event) => {
67
+ const swiper = event.detail;
68
+ if (swiper?.activeIndex == null) {
69
+ return;
70
+ }
71
+ this.activeIndex = swiper.activeIndex;
72
+ this.pauseVideos();
73
+ this.scrollActiveThumbIntoView();
74
+ };
75
+ }
76
+ componentWillLoad() {
77
+ Salla.lang.onLoaded(() => {
78
+ Salla.lang.addBulk({
79
+ 'blocks.comments.customer_feedback': { ar: 'مراجعة العميل', en: 'Customer feedback' },
80
+ });
81
+ });
82
+ }
83
+ /**
84
+ * Open the viewer at the given attachment index.
85
+ * @param index - Index of the attachment to show first (defaults to 0).
86
+ */
87
+ async open(index = 0) {
88
+ const items = this.getAttachments();
89
+ if (!items.length)
90
+ return;
91
+ this.activeIndex = Math.min(Math.max(index, 0), items.length - 1);
92
+ this.isOpen = true;
93
+ await this.modal?.open();
94
+ this.scrollActiveThumbIntoView();
95
+ }
96
+ /** Close the viewer. */
97
+ async close() {
98
+ this.modal?.close();
99
+ }
100
+ disconnectedCallback() {
101
+ window.removeEventListener('keydown', this.handleKeyDown);
102
+ }
103
+ getAttachments() {
104
+ if (typeof this.attachments !== 'string') {
105
+ return Array.isArray(this.attachments) ? this.attachments : [];
106
+ }
107
+ try {
108
+ const parsed = JSON.parse(this.attachments);
109
+ return Array.isArray(parsed) ? parsed : [];
110
+ }
111
+ catch {
112
+ return [];
113
+ }
114
+ }
115
+ isVideo(file) {
116
+ return isVideoMimeType(file.mimeType, file.url);
117
+ }
118
+ pauseVideos() {
119
+ this.host.querySelectorAll('video.s-attachment-view-video').forEach(element => {
120
+ const video = element;
121
+ video.pause();
122
+ video.currentTime = 0;
123
+ });
124
+ }
125
+ goToSlide(index) {
126
+ const items = this.getAttachments();
127
+ const nextIndex = Math.min(Math.max(index, 0), items.length - 1);
128
+ if (nextIndex === this.activeIndex) {
129
+ return;
130
+ }
131
+ this.activeIndex = nextIndex;
132
+ this.sliderEl?.slideTo(nextIndex);
133
+ this.pauseVideos();
134
+ this.scrollActiveThumbIntoView();
135
+ }
136
+ scrollActiveThumbIntoView() {
137
+ requestAnimationFrame(() => {
138
+ const activeThumb = this.thumbsScroller?.querySelector('.is-active');
139
+ activeThumb?.scrollIntoView({ inline: 'nearest', block: 'nearest', behavior: 'smooth' });
140
+ });
141
+ }
142
+ renderSlide(file) {
143
+ if (this.isVideo(file)) {
144
+ return (h("video", { class: "s-attachment-view-video", src: file.url, controls: true, playsInline: true, preload: "metadata" }));
145
+ }
146
+ return h("img", { src: file.url, alt: "" });
147
+ }
148
+ renderThumb(file) {
149
+ if (this.isVideo(file)) {
150
+ return (h("div", { class: "s-attachment-view-thumb is-video" }, h("video", { src: file.url, muted: true, playsInline: true, preload: "metadata" }), h("span", { class: "s-attachment-view-thumb-play", innerHTML: PlayIcon })));
151
+ }
152
+ return (h("div", { class: "s-attachment-view-thumb" }, h("img", { src: file.url, alt: "" })));
153
+ }
154
+ render() {
155
+ const items = this.getAttachments();
156
+ if (!items.length)
157
+ return null;
158
+ const itemsKey = items.map(file => file.id).join('-');
159
+ return (h(Host, null, h("salla-modal", { ref: el => (this.modal = el), class: "s-attachment-view-modal-host", width: "md", noPadding: true, onModalVisibilityChanged: event => this.handleModalVisibilityChanged(!!event.detail) }, h("div", { class: "s-attachment-view-modal" }, this.isOpen && (h("div", { class: "s-attachment-view-gallery" }, h("salla-slider", { ref: el => (this.sliderEl = el), class: "s-attachment-view-slider", key: `attachment-${itemsKey}`, id: `${this.host.id || 'attachment-view'}-preview`, autoHeight: true, showControls: items.length > 1, sliderConfig: JSON.stringify({ initialSlide: this.activeIndex }), onSlideChange: event => this.handleSlideChange(event) }, h("div", { slot: "items" }, items.map(file => (h("div", { class: "s-attachment-view-slide", key: file.id }, this.renderSlide(file)))))), items.length > 1 && (h("div", { class: "s-attachment-view-thumbs s-scrollbar", ref: el => (this.thumbsScroller = el) }, items.map((file, index) => (h("button", { type: "button", class: {
160
+ 's-attachment-view-thumb-btn': true,
161
+ 'is-active': this.activeIndex === index,
162
+ }, key: file.id, "aria-label": `${index + 1}`, "aria-current": this.activeIndex === index ? 'true' : undefined, onClick: () => this.goToSlide(index) }, this.renderThumb(file))))))))))));
163
+ }
164
+ get host() { return getElement(this); }
165
+ };
166
+ SallaAttachmentView.style = sallaAttachmentViewCss;
167
+
168
+ const sallaAttachmentsCss = "/*!twlt*/:host{display:block}.s-attachments{display:flex;max-width:100%;overflow-x:auto;flex-wrap:nowrap;gap:0.5rem}.s-attachments-image-thumb,.s-attachments-video-thumb{position:relative;width:65px;height:65px;flex-shrink:0;border-radius:0.375rem;overflow:hidden}.s-attachments.is-clickable .s-attachments-image-thumb,.s-attachments.is-clickable .s-attachments-video-thumb{cursor:pointer}.s-attachments-image-thumb img,.s-attachments-video-thumb video{display:block;width:100%;height:100%;object-fit:cover}.s-attachments-more-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:rgba(0, 0, 0, 0.55);color:#fff;font-size:1rem;font-weight:700;pointer-events:none}.s-attachments-video-thumb-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:rgba(0, 0, 0, 0.25);pointer-events:none}.s-attachments-video-thumb-play svg{width:1.5rem;height:1.5rem;fill:#fff;opacity:0.95}.visible{visibility:visible}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}";
169
+
170
+ const SallaAttachments = class {
171
+ constructor(hostRef) {
172
+ registerInstance(this, hostRef);
173
+ /**
174
+ * Attachments to display. Accepts an array of `{ id, url, mimeType? }` or a
175
+ * JSON string of the same shape.
176
+ */
177
+ this.attachments = [];
178
+ /**
179
+ * Image URLs to display. Accepts a string array or a JSON string.
180
+ */
181
+ this.images = [];
182
+ /**
183
+ * Video URLs to display. Accepts a string array or a JSON string.
184
+ */
185
+ this.videos = [];
186
+ /**
187
+ * Rating-like object with `images` / `videos` URL arrays. Used when
188
+ * `images`/`videos` are empty, and as a fallback when resolving
189
+ * `productRatings`.
190
+ */
191
+ this.rating = null;
192
+ /**
193
+ * Product ratings list. When set with `productId`, the matching rating's
194
+ * media is preferred over `rating`.
195
+ */
196
+ this.productRatings = [];
197
+ /**
198
+ * Product id used to match an entry in `productRatings`.
199
+ */
200
+ this.productId = null;
201
+ /**
202
+ * Maximum number of thumbnails to show before displaying a "+N" overlay on
203
+ * the last visible item.
204
+ */
205
+ this.maxVisible = 4;
206
+ /**
207
+ * When true, clicking a thumbnail opens the attachment lightbox.
208
+ */
209
+ this.clickable = false;
210
+ }
211
+ parseJson(value, fallback) {
212
+ if (typeof value !== 'string') {
213
+ return (value ?? fallback);
214
+ }
215
+ try {
216
+ return JSON.parse(value);
217
+ }
218
+ catch {
219
+ return fallback;
220
+ }
221
+ }
222
+ parseStringList(value) {
223
+ const parsed = this.parseJson(value, []);
224
+ return Array.isArray(parsed) ? parsed.filter(url => typeof url === 'string' && url) : [];
225
+ }
226
+ parseMediaSource(value) {
227
+ if (!value)
228
+ return null;
229
+ const parsed = this.parseJson(value, null);
230
+ return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : null;
231
+ }
232
+ parseMediaSourceList(value) {
233
+ const parsed = this.parseJson(value, []);
234
+ return Array.isArray(parsed) ? parsed : [];
235
+ }
236
+ resolveMediaSource() {
237
+ const images = this.parseStringList(this.images);
238
+ const videos = this.parseStringList(this.videos);
239
+ if (images.length || videos.length) {
240
+ return { images, videos };
241
+ }
242
+ const rating = this.parseMediaSource(this.rating);
243
+ const productRatings = this.parseMediaSourceList(this.productRatings);
244
+ const productId = this.productId == null || this.productId === ''
245
+ ? null
246
+ : String(this.productId);
247
+ if (productId && productRatings.length) {
248
+ const matched = productRatings.find(entry => entry?.product?.id != null && String(entry.product.id) === productId);
249
+ if (matched)
250
+ return matched;
251
+ }
252
+ return rating || { images: [], videos: [] };
253
+ }
254
+ mediaToAttachments(source) {
255
+ const images = (source.images || []).map(url => ({ type: 'image', url }));
256
+ const videos = (source.videos || []).map(url => ({ type: 'video', url }));
257
+ return [...images, ...videos];
258
+ }
259
+ getAttachments() {
260
+ let items = [];
261
+ if (typeof this.attachments === 'string') {
262
+ try {
263
+ const parsed = JSON.parse(this.attachments);
264
+ items = Array.isArray(parsed) ? parsed : [];
265
+ }
266
+ catch {
267
+ items = [];
268
+ }
269
+ }
270
+ else if (Array.isArray(this.attachments)) {
271
+ items = this.attachments;
272
+ }
273
+ if (!items.length) {
274
+ items = this.mediaToAttachments(this.resolveMediaSource());
275
+ }
276
+ return items
277
+ .map((attachment, index) => this.normalizeAttachment(attachment, index))
278
+ .filter(attachment => this.isRenderableAttachment(attachment));
279
+ }
280
+ normalizeAttachment(attachment, index) {
281
+ const mimeType = attachment.mimeType || this.resolveMimeType(attachment.type, attachment.url);
282
+ return {
283
+ id: attachment.id || `attachment-${index}`,
284
+ url: attachment.url,
285
+ mimeType,
286
+ };
287
+ }
288
+ resolveMimeType(type, url) {
289
+ if (type === 'image')
290
+ return 'image/jpeg';
291
+ if (type === 'video')
292
+ return 'video/mp4';
293
+ if (type?.includes('/'))
294
+ return type;
295
+ if (url && /\.(png|jpe?g|gif|webp|heic|heif)$/i.test(url))
296
+ return 'image/jpeg';
297
+ if (url && /\.(mp4|webm|mov|avi|mkv)$/i.test(url))
298
+ return 'video/mp4';
299
+ return type;
300
+ }
301
+ isRenderableAttachment(attachment) {
302
+ return isImageMimeType(attachment.mimeType, attachment.url)
303
+ || isVideoMimeType(attachment.mimeType, attachment.url);
304
+ }
305
+ isVideo(attachment) {
306
+ return isVideoMimeType(attachment.mimeType, attachment.url);
307
+ }
308
+ openAt(index) {
309
+ if (!this.clickable)
310
+ return;
311
+ this.attachmentView?.open(index);
312
+ }
313
+ render() {
314
+ const items = this.getAttachments();
315
+ if (!items.length)
316
+ return null;
317
+ const visible = items.slice(0, this.maxVisible);
318
+ const remaining = items.length - this.maxVisible;
319
+ return (h(Host, null, h("div", { class: {
320
+ 's-attachments': true,
321
+ 'is-clickable': this.clickable,
322
+ } }, visible.map((attachment, index) => {
323
+ const isLastVisible = index === this.maxVisible - 1;
324
+ const showMoreOverlay = isLastVisible && remaining > 0;
325
+ const thumbProps = this.clickable
326
+ ? { onClick: () => this.openAt(index) }
327
+ : {};
328
+ return this.isVideo(attachment)
329
+ ? h("div", { key: attachment.id, class: "s-attachments-video-thumb", ...thumbProps }, h("video", { src: attachment.url, muted: true, playsInline: true, preload: "metadata" }), showMoreOverlay
330
+ ? h("span", { class: "s-attachments-more-overlay" }, "+", remaining)
331
+ : h("span", { class: "s-attachments-video-thumb-play", innerHTML: PlayIcon }))
332
+ : h("div", { key: attachment.id, class: "s-attachments-image-thumb", ...thumbProps }, h("img", { src: attachment.url, alt: "" }), showMoreOverlay
333
+ ? h("span", { class: "s-attachments-more-overlay" }, "+", remaining)
334
+ : null);
335
+ }), this.clickable && (h("salla-attachment-view", { ref: el => (this.attachmentView = el), attachments: items })))));
336
+ }
337
+ };
338
+ SallaAttachments.style = sallaAttachmentsCss;
339
+
11
340
  var BookingTime = `<!-- Generated by IcoMoon.io -->
12
341
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
13
342
  <title>calendar-time</title>
@@ -358,7 +687,7 @@ const SallaColorPicker = class {
358
687
  }
359
688
  }
360
689
  initColorPicker() {
361
- this.pickerReady = import('./vanilla-picker-oYjMgYry.js').then(function (n) { return n.v; }).then(mod => {
690
+ this.pickerReady = import('./vanilla-picker-Ba_za9Iy.js').then(function (n) { return n.v; }).then(mod => {
362
691
  const Picker = mod.default;
363
692
  const picker = new Picker({
364
693
  parent: this.host,
@@ -806,8 +1135,9 @@ const SallaDatetimePicker = class {
806
1135
  };
807
1136
  SallaDatetimePicker.style = sallaDatetimePickerCss;
808
1137
 
809
- const sallaFileUploadCss = "/*!twlt*//*!\n * FilePond 4.32.12\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:\"\"}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity;touch-action:auto}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:\"\";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:\"\";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.4;line-height:.85;font-size:11px;color:inherit;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}\n/*!\n * FilePondPluginImagePreview 4.6.12\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--image-preview-markup {\n position: absolute;\n left: 0;\n top: 0;\n}\n.filepond--image-preview-wrapper {\n z-index: 2;\n}\n.filepond--image-preview-overlay {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n min-height: 5rem;\n max-height: 7rem;\n margin: 0;\n opacity: 0;\n z-index: 2;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.filepond--image-preview-overlay svg {\n width: 100%;\n height: auto;\n color: inherit;\n max-height: inherit;\n}\n.filepond--image-preview-overlay-idle {\n mix-blend-mode: multiply;\n color: rgba(40, 40, 40, 0.85);\n}\n.filepond--image-preview-overlay-success {\n mix-blend-mode: normal;\n color: rgba(54, 151, 99, 1);\n}\n.filepond--image-preview-overlay-failure {\n mix-blend-mode: normal;\n color: rgba(196, 78, 71, 1);\n}\n/* disable for Safari as mix-blend-mode causes the overflow:hidden of the parent container to not work */\n@supports (-webkit-marquee-repetition: infinite) and\n ((-o-object-fit: fill) or (object-fit: fill)) {\n .filepond--image-preview-overlay-idle {\n mix-blend-mode: normal;\n }\n}\n.filepond--image-preview-wrapper {\n /* no interaction */\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n /* have preview fill up all available space */\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n height: 100%;\n margin: 0;\n\n /* radius is .05em less to prevent the panel background color from shining through */\n border-radius: 0.45em;\n overflow: hidden;\n\n /* this seems to prevent Chrome from redrawing this layer constantly */\n background: rgba(0, 0, 0, 0.01);\n}\n.filepond--image-preview {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n display: flex; /* this aligns the graphic vertically if the panel is higher than the image */\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n background: #222;\n\n /* will be animated */\n will-change: transform, opacity;\n}\n.filepond--image-clip {\n position: relative;\n overflow: hidden;\n margin: 0 auto;\n\n /* transparency indicator (currently only supports grid or basic color) */\n}\n.filepond--image-clip[data-transparency-indicator='grid'] img,\n.filepond--image-clip[data-transparency-indicator='grid'] canvas {\n background-color: #fff;\n background-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E\");\n background-size: 1.25em 1.25em;\n}\n.filepond--image-bitmap,\n.filepond--image-vector {\n position: absolute;\n left: 0;\n top: 0;\n will-change: transform;\n}\n.filepond--root[data-style-panel-layout~='integrated']\n .filepond--image-preview-wrapper {\n border-radius: 0;\n}\n.filepond--root[data-style-panel-layout~='integrated']\n .filepond--image-preview {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--image-preview-wrapper {\n border-radius: 99999rem;\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--image-preview-overlay {\n top: auto;\n bottom: 0;\n -webkit-transform: scaleY(-1);\n transform: scaleY(-1);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--file\n .filepond--file-action-button[data-align*='bottom']:not([data-align*='center']) {\n margin-bottom: 0.325em;\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--file\n [data-align*='left'] {\n left: calc(50% - 3em);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--file\n [data-align*='right'] {\n right: calc(50% - 3em);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--progress-indicator[data-align*='bottom'][data-align*='left'],\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--progress-indicator[data-align*='bottom'][data-align*='right'] {\n margin-bottom: calc(0.325em + 0.1875em);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--progress-indicator[data-align*='bottom'][data-align*='center'] {\n margin-top: 0;\n margin-bottom: 0.1875em;\n margin-left: 0.1875em;\n}\n\n/*!\n * FilePondPluginImageEdit 1.6.3\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--action-edit-item.filepond--action-edit-item {\n width: 2em;\n height: 2em;\n padding: 0.1875em;\n}\n\n.filepond--action-edit-item.filepond--action-edit-item[data-align*='center'] {\n margin-left: -0.1875em;\n}\n\n.filepond--action-edit-item.filepond--action-edit-item[data-align*='bottom'] {\n margin-bottom: -0.1875em;\n}\n\n.filepond--action-edit-item-alt {\n border: none;\n line-height: inherit;\n background: transparent;\n font-family: inherit;\n color: inherit;\n outline: none;\n padding: 0;\n margin: 0 0 0 0.25em;\n pointer-events: all;\n position: absolute;\n}\n\n.filepond--action-edit-item-alt svg {\n width: 1.3125em;\n height: 1.3125em;\n}\n\n.filepond--action-edit-item-alt span {\n font-size: 0;\n opacity: 0;\n}\n.filepond--root[data-style-panel-layout~='circle'] .filepond--action-edit-item {\n opacity: 1 !important;\n visibility: visible !important;\n}\n\n.s-file-upload-wrapper .filepond--file-info-main {\n -webkit-line-clamp: 1;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n}\n.fixed{\n position: fixed;\n}\n.grid{\n display: grid;\n}\n.hidden{\n display: none;\n}\n.transform{\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.resize{\n resize: both;\n}\n.filter{\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.s-hidden{\n display: none;\n}\n.s-file-upload-wrapper .filepond--drop-label{\n height: 100%;\n cursor: pointer;\n border-radius: var(--s-radius, 0.25rem);\n border-width: 1px;\n border-style: dashed;\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1));\n}\n.s-file-upload-wrapper .filepond--drop-label label{\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n font-family: var(--font-main), -apple-system, BlinkMacSystemFont;\n}\n.s-file-upload-wrapper .filepond--label-action{\n text-decoration-color: #6b7280;\n}\n.s-file-upload-wrapper .filepond--panel-root{\n border-radius: var(--s-radius, 0.25rem);\n --tw-bg-opacity: 1 !important;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)) !important;\n}\n.s-file-upload-profile-image .filepond--panel-root{\n border-radius: 9999px !important;\n}\n.s-file-upload:not(.s-file-upload-multiple) .s-file-upload-wrapper .filepond--list-scroller{\n overflow-y: inherit !important;\n overflow: inherit !important;\n margin: 0 !important;\n cursor: pointer !important;\n}\n.filepond--root{\n min-height: 120px !important;\n font-family: inherit !important;\n}\n.s-file-upload-wrapper .filepond--item-panel{\n --tw-bg-opacity: 1;\n background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));\n}\n.s-file-upload-wrapper .filepond--drip-blob{\n --tw-bg-opacity: 1;\n background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));\n}\n.s-file-upload-wrapper .filepond--list{\n left: 0px;\n width: 100%;\n}\n.s-file-upload-wrapper .filepond--file-poster-wrapper{\n position: absolute;\n left: 0px;\n top: 0px;\n right: 0px;\n margin: 0px;\n display: flex;\n height: 100%;\n width: 100%;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 0.45em;\n background-color: #00000003;\n}\n.s-file-upload-wrapper .filepond--file-poster{\n position: absolute;\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.s-file-upload-wrapper .filepond--file-poster-overlay{\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n}\n.s-file-upload-wrapper .filepond--item{\n margin: 0px;\n}\n.s-file-upload-wrapper .filepond--file-info{\n margin: 0px;\n}\n.s-file-upload-wrapper .filepond--file-info-main{\n width: 85px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n font-size: 0.75em;\n line-height: 1.2;\n}\n.s-file-upload-wrapper .filepond--file-status{\n width: 55%;\n}\n.s-file-upload-wrapper .filepond--file-status:where([dir=\"rtl\"], [dir=\"rtl\"] *){\n margin-right: 35px;\n}\n@media (min-width: 768px){\n .s-file-upload-wrapper .filepond--file-status:where([dir=\"rtl\"], [dir=\"rtl\"] *){\n margin-right: 2.25em;\n }\n}\n.s-file-upload-wrapper .filepond--file-status .filepond--file-status-sub{\n width: 275px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.s-file-upload-profile-image .filepond--root{\n height: 80px;\n min-height: 80px !important;\n width: 80px;\n border-radius: 9999px !important;\n}\n.s-file-upload-profile-image .filepond--drop-label{\n z-index: 7;\n min-height: 70px !important;\n border-radius: 9999px !important;\n border-style: none;\n}\n.s-file-upload-profile-image .filepond--drop-label label{\n cursor: pointer;\n padding-top: 20px;\n padding-bottom: 20px;\n padding-left: 6px;\n padding-right: 6px;\n font-size: 0.8rem;\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n font-family: var(--font-main), -apple-system, BlinkMacSystemFont;\n}\n.s-file-upload-profile-image .filepond--file{\n padding: 0px;\n}\n.s-file-upload-profile-image .filepond--file .filepond--action-remove-item{\n top: auto !important;\n bottom: -4px;\n left: 50%;\n transform: translateX(-50%) translateY(25%) !important;\n background-color: rgba(255,68,58,.7);\n cursor: pointer;\n width: 20px;\n height: 20px;\n transition: 0.3s;\n}\n.s-file-upload-profile-image .filepond--file .filepond--action-remove-item:hover{\n background-color: #FF443A;\n}\n.s-file-upload-profile-image .filepond--file .filepond--file-action-button{\n top: 28px;\n right: 28px;\n}\n.s-file-upload-profile-image .filepond--file .filepond--progress-indicator,.s-file-upload-profile-image .filepond--file .filepond--load-indicator,.s-file-upload-profile-image .filepond--file .filepond--processing-complete-indicator{\n top: 48% !important;\n right: 50%;\n left: auto;\n transform: translateX(50%) translateY(-50%);\n}\n.s-file-upload-profile-image .filepond--item-panel{\n background-color: transparent !important;\n}\n.s-file-upload-.s-file-upload-profile-image .filepond--item-panel .filepond--panel-top,.s-file-upload-profile-image .filepond--item-panel .filepond--panel-center,.s-file-upload-profile-image .filepond--item-panel .filepond--panel-bottom{\n display: none;\n}\n.s-file-upload-profile-image .filepond--file-poster-overlay{\n display: none;\n}\n.s-file-upload-profile-image .filepond--item{\n margin: 0px !important;\n height: 5rem !important;\n}\n.s-file-upload-profile-image .filepond--file-poster{\n height: 100%;\n width: 100%;\n}\n.s-file-upload-profile-image .filepond--file-status{\n display: none;\n}\n.s-file-upload-profile-image .filepond--image-preview-overlay-success{\n top: auto;\n bottom: 0px;\n --tw-scale-y: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.s-file-upload-profile-image .filepond--image-preview-wrapper{\n border-radius: 9999px;\n}\n.s-file-upload-profile-image .filepond--file-info{\n display: none;\n}\n.s-file-upload-profile-image .filepond--list{\n left: 0px;\n right: 0px;\n height: 100%;\n}\n.s-file-upload-profile-image .filepond--file-poster img{\n height: 100%;\n width: 100%;\n border-radius: 9999px;\n object-fit: cover;\n}\n.s-file-upload-profile-image .filepond--file-poster-wrapper{\n overflow: hidden;\n border-radius: 9999px;\n}\n.s-file-upload-profile-image .s-file-upload-has-error .filepond--file-status{\n position: absolute;\n bottom: -62%;\n left: -190%;\n display: flex !important;\n height: auto;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n font-size: 1rem;\n line-height: 1.5rem;\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.s-file-upload-multiple .filepond--root{\n max-height: 120px;\n}\n.s-file-upload-multiple .filepond--list-scroller{\n top: 0px;\n margin-top: 0px;\n margin-bottom: 0px;\n height: 100%;\n overflow-y: scroll;\n}\n.s-file-upload-multiple .filepond--drop-label:not(.s-hidden) + .filepond--list-scroller{\n display: none;\n}\n.s-file-upload-multiple .filepond--item{\n @media(min-width: 767px){\n width: calc(33.33% - .5em);\n margin-left: .3em !important;\n }\n @media(max-width: 767px){\n margin-bottom: .3em;\n }\n}\n.s-file-upload-hint{\n margin-top: -15px;\n font-size: 0.875rem;\n line-height: 1.25rem;\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n.s-product-options-image-input .s-file-upload-wrapper{\n min-height: 120px;\n}\n";
1138
+ const sallaFileUploadCss = "/*!twlt*//*!\n * FilePond 4.32.12\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:\"\"}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity;touch-action:auto}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:\"\";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:\"\";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.4;line-height:.85;font-size:11px;color:inherit;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}\n/*!\n * FilePondPluginImagePreview 4.6.12\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--image-preview-markup {\n position: absolute;\n left: 0;\n top: 0;\n}\n.filepond--image-preview-wrapper {\n z-index: 2;\n}\n.filepond--image-preview-overlay {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n min-height: 5rem;\n max-height: 7rem;\n margin: 0;\n opacity: 0;\n z-index: 2;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.filepond--image-preview-overlay svg {\n width: 100%;\n height: auto;\n color: inherit;\n max-height: inherit;\n}\n.filepond--image-preview-overlay-idle {\n mix-blend-mode: multiply;\n color: rgba(40, 40, 40, 0.85);\n}\n.filepond--image-preview-overlay-success {\n mix-blend-mode: normal;\n color: rgba(54, 151, 99, 1);\n}\n.filepond--image-preview-overlay-failure {\n mix-blend-mode: normal;\n color: rgba(196, 78, 71, 1);\n}\n/* disable for Safari as mix-blend-mode causes the overflow:hidden of the parent container to not work */\n@supports (-webkit-marquee-repetition: infinite) and\n ((-o-object-fit: fill) or (object-fit: fill)) {\n .filepond--image-preview-overlay-idle {\n mix-blend-mode: normal;\n }\n}\n.filepond--image-preview-wrapper {\n /* no interaction */\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n /* have preview fill up all available space */\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n height: 100%;\n margin: 0;\n\n /* radius is .05em less to prevent the panel background color from shining through */\n border-radius: 0.45em;\n overflow: hidden;\n\n /* this seems to prevent Chrome from redrawing this layer constantly */\n background: rgba(0, 0, 0, 0.01);\n}\n.filepond--image-preview {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n display: flex; /* this aligns the graphic vertically if the panel is higher than the image */\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n background: #222;\n\n /* will be animated */\n will-change: transform, opacity;\n}\n.filepond--image-clip {\n position: relative;\n overflow: hidden;\n margin: 0 auto;\n\n /* transparency indicator (currently only supports grid or basic color) */\n}\n.filepond--image-clip[data-transparency-indicator='grid'] img,\n.filepond--image-clip[data-transparency-indicator='grid'] canvas {\n background-color: #fff;\n background-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E\");\n background-size: 1.25em 1.25em;\n}\n.filepond--image-bitmap,\n.filepond--image-vector {\n position: absolute;\n left: 0;\n top: 0;\n will-change: transform;\n}\n.filepond--root[data-style-panel-layout~='integrated']\n .filepond--image-preview-wrapper {\n border-radius: 0;\n}\n.filepond--root[data-style-panel-layout~='integrated']\n .filepond--image-preview {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--image-preview-wrapper {\n border-radius: 99999rem;\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--image-preview-overlay {\n top: auto;\n bottom: 0;\n -webkit-transform: scaleY(-1);\n transform: scaleY(-1);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--file\n .filepond--file-action-button[data-align*='bottom']:not([data-align*='center']) {\n margin-bottom: 0.325em;\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--file\n [data-align*='left'] {\n left: calc(50% - 3em);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--file\n [data-align*='right'] {\n right: calc(50% - 3em);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--progress-indicator[data-align*='bottom'][data-align*='left'],\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--progress-indicator[data-align*='bottom'][data-align*='right'] {\n margin-bottom: calc(0.325em + 0.1875em);\n}\n.filepond--root[data-style-panel-layout~='circle']\n .filepond--progress-indicator[data-align*='bottom'][data-align*='center'] {\n margin-top: 0;\n margin-bottom: 0.1875em;\n margin-left: 0.1875em;\n}\n\n/*!\n * FilePondPluginImageEdit 1.6.3\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--action-edit-item.filepond--action-edit-item {\n width: 2em;\n height: 2em;\n padding: 0.1875em;\n}\n\n.filepond--action-edit-item.filepond--action-edit-item[data-align*='center'] {\n margin-left: -0.1875em;\n}\n\n.filepond--action-edit-item.filepond--action-edit-item[data-align*='bottom'] {\n margin-bottom: -0.1875em;\n}\n\n.filepond--action-edit-item-alt {\n border: none;\n line-height: inherit;\n background: transparent;\n font-family: inherit;\n color: inherit;\n outline: none;\n padding: 0;\n margin: 0 0 0 0.25em;\n pointer-events: all;\n position: absolute;\n}\n\n.filepond--action-edit-item-alt svg {\n width: 1.3125em;\n height: 1.3125em;\n}\n\n.filepond--action-edit-item-alt span {\n font-size: 0;\n opacity: 0;\n}\n.filepond--root[data-style-panel-layout~='circle'] .filepond--action-edit-item {\n opacity: 1 !important;\n visibility: visible !important;\n}\n\n.s-file-upload-wrapper .filepond--file-info-main {\n -webkit-line-clamp: 1;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n}\n.s-file-upload-has-gallery.s-file-upload-multiple .filepond--list-scroller {\n display: none !important;\n}\n.s-file-upload-has-gallery.s-file-upload-multiple .filepond--drop-label:not(.s-hidden) {\n cursor: pointer;\n}\n.s-file-upload-has-gallery.s-file-upload-multiple.s-file-upload-at-max .filepond--root {\n min-height: 120px;\n}\n.s-file-upload-has-gallery.s-file-upload-multiple .filepond--drop-label.s-file-upload-drop-label-disabled {\n visibility: visible !important;\n opacity: 0.55 !important;\n transform: none !important;\n height: auto !important;\n min-height: 4.75em !important;\n pointer-events: none !important;\n cursor: not-allowed;\n}\n.s-file-upload-has-gallery.s-file-upload-multiple .filepond--drop-label.s-file-upload-drop-label-disabled label {\n opacity: 1 !important;\n}\n.s-file-upload-wrapper .filepond--root[data-disabled] .filepond--drop-label label {\n opacity: 0.55;\n}\n.s-file-upload-gallery {\n --s-file-upload-preview-size: 75px;\n --s-file-upload-remove-size: 18px;\n --s-file-upload-remove-icon-size: 10px;\n --s-file-upload-gallery-gap: 12px;\n position: relative;\n margin-top: 0.5rem;\n padding-top: calc(var(--s-file-upload-remove-size) / 2);\n padding-inline-end: calc(var(--s-file-upload-remove-size) / 2);\n overflow: visible;\n}\n.s-file-upload-gallery-track {\n display: flex;\n gap: var(--s-file-upload-gallery-gap);\n width: 100%;\n min-height: var(--s-file-upload-preview-size);\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-width: thin;\n padding-bottom: 0.25rem;\n}\n.s-file-upload-gallery-item {\n position: relative;\n display: block;\n width: var(--s-file-upload-preview-size);\n height: var(--s-file-upload-preview-size);\n flex-shrink: 0;\n overflow: visible;\n}\n.s-file-upload-gallery-thumb {\n width: var(--s-file-upload-preview-size);\n height: var(--s-file-upload-preview-size);\n aspect-ratio: 1/1;\n border-radius: 0.375rem;\n overflow: hidden;\n background-color: #f3f4f6;\n cursor: pointer;\n position: relative;\n border: 1px solid #e5e7eb;\n box-sizing: border-box;\n}\n.s-file-upload-gallery-thumb.is-processing {\n opacity: 0.7;\n}\n.s-file-upload-gallery-thumb img {\n display: block;\n width: 100%;\n height: 100%;\n aspect-ratio: 1/1;\n object-fit: cover;\n}\n.s-file-upload-gallery-thumb video.s-file-upload-gallery-video-thumb {\n display: block;\n width: 100%;\n height: 100%;\n aspect-ratio: 1/1;\n object-fit: cover;\n pointer-events: none;\n}\n.s-file-upload-gallery-remove {\n position: absolute;\n top: 0;\n inset-inline-end: 0;\n inset-inline-start: auto;\n z-index: 5;\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--s-file-upload-remove-size);\n height: var(--s-file-upload-remove-size);\n padding: 0;\n line-height: 1;\n border-radius: 9999px;\n background-color: #fff;\n border: 1px solid #9ca3af;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n}\n.s-file-upload-gallery-remove:hover {\n background-color: #f9fafb;\n}\n.s-file-upload-gallery-remove svg {\n display: block;\n width: var(--s-file-upload-remove-icon-size);\n height: var(--s-file-upload-remove-icon-size);\n fill: #1f2937;\n pointer-events: none;\n}\n.s-file-upload-gallery-video-icon {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(0, 0, 0, 0.2);\n pointer-events: none;\n}\n.s-file-upload-gallery-video-icon svg {\n width: calc(var(--s-file-upload-preview-size) * 0.28);\n height: calc(var(--s-file-upload-preview-size) * 0.28);\n max-width: 2rem;\n max-height: 2rem;\n fill: #fff;\n opacity: 0.9;\n}\n.visible{\n visibility: visible;\n}\n.fixed{\n position: fixed;\n}\n.grid{\n display: grid;\n}\n.hidden{\n display: none;\n}\n.transform{\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.resize{\n resize: both;\n}\n.ps-2{\n padding-inline-start: 0.5rem;\n}\n.filter{\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.s-hidden{\n display: none;\n}\n.s-scrollbar::-webkit-scrollbar{\n width: 5px;\n}\n.s-scrollbar::-webkit-scrollbar-track{\n background-color: #eee;\n}\n.s-scrollbar::-webkit-scrollbar-thumb{\n background-color: var(--color-primary);\n border-radius: 10px;\n -webkit-border-radius: 10px;\n -moz-border-radius: 10px;\n -ms-border-radius: 10px;\n -o-border-radius: 10px;\n}\n.s-file-upload-wrapper .filepond--drop-label{\n height: 100%;\n cursor: pointer;\n border-radius: var(--s-radius, 0.25rem);\n border-width: 1px;\n border-style: dashed;\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1));\n}\n.s-file-upload-wrapper .filepond--drop-label label{\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n font-family: var(--font-main), -apple-system, BlinkMacSystemFont;\n}\n.s-file-upload-wrapper .filepond--label-action{\n text-decoration-color: #6b7280;\n}\n.s-file-upload-wrapper .filepond--panel-root{\n border-radius: var(--s-radius, 0.25rem);\n --tw-bg-opacity: 1 !important;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)) !important;\n}\n.s-file-upload-profile-image .filepond--panel-root{\n border-radius: 9999px !important;\n}\n.s-file-upload:not(.s-file-upload-multiple) .s-file-upload-wrapper .filepond--list-scroller{\n overflow-y: inherit !important;\n overflow: inherit !important;\n margin: 0 !important;\n cursor: pointer !important;\n}\n.filepond--root{\n min-height: 120px !important;\n font-family: inherit !important;\n}\n.s-file-upload-wrapper .filepond--item-panel{\n --tw-bg-opacity: 1;\n background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));\n}\n.s-file-upload-wrapper .filepond--drip-blob{\n --tw-bg-opacity: 1;\n background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));\n}\n.s-file-upload-wrapper .filepond--list{\n left: 0px;\n width: 100%;\n}\n.s-file-upload-wrapper .filepond--file-poster-wrapper{\n position: absolute;\n left: 0px;\n top: 0px;\n right: 0px;\n margin: 0px;\n display: flex;\n height: 100%;\n width: 100%;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 0.45em;\n background-color: #00000003;\n}\n.s-file-upload-wrapper .filepond--file-poster{\n position: absolute;\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.s-file-upload-wrapper .filepond--file-poster-overlay{\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n}\n.s-file-upload-wrapper .filepond--item{\n margin: 0px;\n}\n.s-file-upload-wrapper .filepond--file-info{\n margin: 0px;\n}\n.s-file-upload-wrapper .filepond--file-info-main{\n width: 85px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n font-size: 0.75em;\n line-height: 1.2;\n}\n.s-file-upload-wrapper .filepond--file-status{\n width: 55%;\n}\n.s-file-upload-wrapper .filepond--file-status:where([dir=\"rtl\"], [dir=\"rtl\"] *){\n margin-right: 35px;\n}\n@media (min-width: 768px){\n .s-file-upload-wrapper .filepond--file-status:where([dir=\"rtl\"], [dir=\"rtl\"] *){\n margin-right: 2.25em;\n }\n}\n.s-file-upload-wrapper .filepond--file-status .filepond--file-status-sub{\n width: 275px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.s-file-upload-profile-image .filepond--root{\n height: 80px;\n min-height: 80px !important;\n width: 80px;\n border-radius: 9999px !important;\n}\n.s-file-upload-profile-image .filepond--drop-label{\n z-index: 7;\n min-height: 70px !important;\n border-radius: 9999px !important;\n border-style: none;\n}\n.s-file-upload-profile-image .filepond--drop-label label{\n cursor: pointer;\n padding-top: 20px;\n padding-bottom: 20px;\n padding-left: 6px;\n padding-right: 6px;\n font-size: 0.8rem;\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n font-family: var(--font-main), -apple-system, BlinkMacSystemFont;\n}\n.s-file-upload-profile-image .filepond--file{\n padding: 0px;\n}\n.s-file-upload-profile-image .filepond--file .filepond--action-remove-item{\n top: auto !important;\n bottom: -4px;\n left: 50%;\n transform: translateX(-50%) translateY(25%) !important;\n background-color: rgba(255,68,58,.7);\n cursor: pointer;\n width: 20px;\n height: 20px;\n transition: 0.3s;\n}\n.s-file-upload-profile-image .filepond--file .filepond--action-remove-item:hover{\n background-color: #FF443A;\n}\n.s-file-upload-profile-image .filepond--file .filepond--file-action-button{\n top: 28px;\n right: 28px;\n}\n.s-file-upload-profile-image .filepond--file .filepond--progress-indicator,.s-file-upload-profile-image .filepond--file .filepond--load-indicator,.s-file-upload-profile-image .filepond--file .filepond--processing-complete-indicator{\n top: 48% !important;\n right: 50%;\n left: auto;\n transform: translateX(50%) translateY(-50%);\n}\n.s-file-upload-profile-image .filepond--item-panel{\n background-color: transparent !important;\n}\n.s-file-upload-.s-file-upload-profile-image .filepond--item-panel .filepond--panel-top,.s-file-upload-profile-image .filepond--item-panel .filepond--panel-center,.s-file-upload-profile-image .filepond--item-panel .filepond--panel-bottom{\n display: none;\n}\n.s-file-upload-profile-image .filepond--file-poster-overlay{\n display: none;\n}\n.s-file-upload-profile-image .filepond--item{\n margin: 0px !important;\n height: 5rem !important;\n}\n.s-file-upload-profile-image .filepond--file-poster{\n height: 100%;\n width: 100%;\n}\n.s-file-upload-profile-image .filepond--file-status{\n display: none;\n}\n.s-file-upload-profile-image .filepond--image-preview-overlay-success{\n top: auto;\n bottom: 0px;\n --tw-scale-y: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.s-file-upload-profile-image .filepond--image-preview-wrapper{\n border-radius: 9999px;\n}\n.s-file-upload-profile-image .filepond--file-info{\n display: none;\n}\n.s-file-upload-profile-image .filepond--list{\n left: 0px;\n right: 0px;\n height: 100%;\n}\n.s-file-upload-profile-image .filepond--file-poster img{\n height: 100%;\n width: 100%;\n border-radius: 9999px;\n object-fit: cover;\n}\n.s-file-upload-profile-image .filepond--file-poster-wrapper{\n overflow: hidden;\n border-radius: 9999px;\n}\n.s-file-upload-profile-image .s-file-upload-has-error .filepond--file-status{\n position: absolute;\n bottom: -62%;\n left: -190%;\n display: flex !important;\n height: auto;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n font-size: 1rem;\n line-height: 1.5rem;\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.s-file-upload-multiple .filepond--root{\n max-height: 120px;\n}\n.s-file-upload-multiple .filepond--list-scroller{\n top: 0px;\n margin-top: 0px;\n margin-bottom: 0px;\n height: 100%;\n overflow-y: scroll;\n}\n.s-file-upload-multiple .filepond--drop-label:not(.s-hidden) + .filepond--list-scroller{\n display: none;\n}\n.s-file-upload-multiple .filepond--item{\n @media(min-width: 767px){\n width: calc(33.33% - .5em);\n margin-left: .3em !important;\n }\n @media(max-width: 767px){\n margin-bottom: .3em;\n }\n}\n.s-file-upload-hint{\n margin-top: -15px;\n font-size: 0.875rem;\n line-height: 1.25rem;\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n.s-product-options-image-input .s-file-upload-wrapper{\n min-height: 120px;\n}\n";
810
1139
 
1140
+ const VIDEO_METADATA_TIMEOUT_MS = 10000;
811
1141
  const SallaFileUpload = class {
812
1142
  /**
813
1143
  * Lazy load FilePond and all plugins
@@ -818,13 +1148,13 @@ const SallaFileUpload = class {
818
1148
  return;
819
1149
  try {
820
1150
  const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
821
- import('./filepond-DMUE9Fyj.js').then(function (n) { return n.f; }),
822
- import('./filepond-plugin-file-validate-size-CrKxdsNW.js').then(function (n) { return n.f; }),
823
- import('./filepond-plugin-image-exif-orientation-IcgeTieF.js').then(function (n) { return n.f; }),
824
- import('./filepond-plugin-image-preview-CDMh74os.js').then(function (n) { return n.f; }),
825
- import('./filepond-plugin-image-edit-C6ptCg9o.js').then(function (n) { return n.f; }),
826
- import('./filepond-plugin-file-validate-type-DvEJrucY.js').then(function (n) { return n.f; }),
827
- import('./filepond-plugin-file-poster-DBZQTm7s.js').then(function (n) { return n.f; })
1151
+ import('./filepond-CKsbRWmS.js').then(function (n) { return n.f; }),
1152
+ import('./filepond-plugin-file-validate-size-Bep6fNi3.js').then(function (n) { return n.f; }),
1153
+ import('./filepond-plugin-image-exif-orientation-DJoDaRwQ.js').then(function (n) { return n.f; }),
1154
+ import('./filepond-plugin-image-preview-BsuTLPS0.js').then(function (n) { return n.f; }),
1155
+ import('./filepond-plugin-image-edit-BJcOlOFL.js').then(function (n) { return n.f; }),
1156
+ import('./filepond-plugin-file-validate-type-r3uRmGIr.js').then(function (n) { return n.f; }),
1157
+ import('./filepond-plugin-file-poster-B_gYCESq.js').then(function (n) { return n.f; })
828
1158
  ]);
829
1159
  this.FilePond = FilePondModule;
830
1160
  // Register plugins
@@ -843,12 +1173,32 @@ const SallaFileUpload = class {
843
1173
  this.invalidInput = createEvent(this, "invalidInput");
844
1174
  this.uploaded = createEvent(this, "uploaded");
845
1175
  this.removed = createEvent(this, "removed");
1176
+ this.galleryUpdated = createEvent(this, "galleryUpdated");
846
1177
  this.filePondLoaded = false;
847
1178
  this.max_images_count = (count) => salla.lang.get('common.uploader.max_images_count', { count });
1179
+ this.max_videos_count = (count) => salla.lang.get('common.uploader.max_videos_count', { count });
848
1180
  this.max_count_hint = (count) => salla.lang.get('common.uploader.max_count_hint', { count });
1181
+ this.video_too_large = (size) => salla.lang.get('common.uploader.video_too_large', { size });
1182
+ this.video_too_long = (duration) => salla.lang.get('common.uploader.video_too_long', { duration });
849
1183
  this.uploadedFiles = [];
850
1184
  this.isListScrollerListenerAdded = false;
851
1185
  this.showMaxCountHint = false;
1186
+ this.previewFiles = [];
1187
+ this.maxFilesNotified = false;
1188
+ this.validationRejectedFileIds = new Set();
1189
+ this.previewFilesSyncRaf = null;
1190
+ /**
1191
+ * Transient reservations for files currently passing add-validation, keyed by
1192
+ * FilePond file id. FilePond runs beforeAddFile async and only inserts a file
1193
+ * into `getFiles()` after validation resolves, so a batch of parallel picks
1194
+ * would race if we counted the pond alone. We reserve a slot here synchronously
1195
+ * for the in-flight window and always release it in `onaddfile` (once the file
1196
+ * is committed to the pond and counted from there). Because committed files are
1197
+ * always counted from `getFiles()` — never from this map — it cannot drift and
1198
+ * "stick" the uploader at its limit across delete/re-upload cycles.
1199
+ */
1200
+ this.inFlightFiles = new Map();
1201
+ this.previewObjectUrls = new Map();
852
1202
  /**
853
1203
  * Set the component to be profile image uploader with a preview and a circular shape
854
1204
  */
@@ -877,6 +1227,10 @@ const SallaFileUpload = class {
877
1227
  * Enable or disable file browser
878
1228
  */
879
1229
  this.allowBrowse = true;
1230
+ /**
1231
+ * Enable the custom gallery preview instead of FilePond thumbnails.
1232
+ */
1233
+ this.enableGallery = false;
880
1234
  /**
881
1235
  * Allow drop to replace a file, only works when allowMultiple is false
882
1236
  */
@@ -894,7 +1248,8 @@ const SallaFileUpload = class {
894
1248
  */
895
1249
  this.allowImagePreview = true;
896
1250
  /**
897
- * Fixed image preview height, overrides min and max preview height
1251
+ * Fixed image preview height, overrides min and max preview height.
1252
+ * Also sets the gallery thumbnail size when using the swiper preview (default: 75px).
898
1253
  */
899
1254
  this.imagePreviewHeight = null;
900
1255
  /**
@@ -962,8 +1317,9 @@ const SallaFileUpload = class {
962
1317
  */
963
1318
  this.iconUndo = '<svg>...</svg>';
964
1319
  this.openFileBrowser = () => {
965
- this.filepond.browse();
1320
+ this.filepond?.browse();
966
1321
  };
1322
+ this.usesGalleryPreview = () => this.enableGallery;
967
1323
  //if cartItemIdIsPassed, we need to set the url
968
1324
  if (!this.url && this.cartItemId) {
969
1325
  this.url = salla.cart.getUploadImageEndpoint();
@@ -1003,13 +1359,22 @@ const SallaFileUpload = class {
1003
1359
  });
1004
1360
  };
1005
1361
  const setTranslations = async () => {
1006
- await setNestedAsync('ar.trans', 'common.uploader.max_images_count', '.أضف :count صور كحد أقصى');
1362
+ await setNestedAsync('ar.trans', 'common.uploader.max_images_count', 'أضف :count صور كحد أقصى');
1007
1363
  await setNestedAsync('en.trans', 'common.uploader.max_images_count', 'Add up to :count images maximum.');
1008
1364
  await setNestedAsync('ar.trans', 'common.uploader.max_count_hint', 'يمكنك رفع حتى :count صور');
1009
1365
  await setNestedAsync('en.trans', 'common.uploader.max_count_hint', 'You can upload up to :count images.');
1366
+ await setNestedAsync('ar.trans', 'common.uploader.max_videos_count', 'أضف :count فيديوهات كحد أقصى');
1367
+ await setNestedAsync('en.trans', 'common.uploader.max_videos_count', 'Add up to :count videos maximum.');
1368
+ await setNestedAsync('ar.trans', 'common.uploader.video_too_large', 'حجم الفيديو يتجاوز الحد المسموح (:size)');
1369
+ await setNestedAsync('en.trans', 'common.uploader.video_too_large', 'Video size exceeds the allowed limit (:size)');
1370
+ await setNestedAsync('ar.trans', 'common.uploader.video_too_long', 'مدة الفيديو تتجاوز الحد المسموح (:duration)');
1371
+ await setNestedAsync('en.trans', 'common.uploader.video_too_long', 'Video duration exceeds the allowed limit (:duration)');
1010
1372
  };
1011
1373
  this.max_count_hint = (count) => salla.lang.get('common.uploader.max_count_hint', { count });
1012
1374
  this.max_images_count = (count) => salla.lang.get('common.uploader.max_images_count', { count });
1375
+ this.max_videos_count = (count) => salla.lang.get('common.uploader.max_videos_count', { count });
1376
+ this.video_too_large = (size) => salla.lang.get('common.uploader.video_too_large', { size });
1377
+ this.video_too_long = (duration) => salla.lang.get('common.uploader.video_too_long', { duration });
1013
1378
  setTranslations();
1014
1379
  });
1015
1380
  }
@@ -1031,13 +1396,23 @@ const SallaFileUpload = class {
1031
1396
  }
1032
1397
  uploadedHandler() {
1033
1398
  let fileInput = this.getFormDataFileInput();
1399
+ const hiddenValue = this.getHiddenInputValue();
1034
1400
  fileInput.type = 'hidden';
1035
- fileInput.value = this.value;
1036
- this.hiddenInput.value = this.value;
1401
+ fileInput.value = hiddenValue;
1402
+ this.hiddenInput.value = hiddenValue;
1037
1403
  fileInput.dispatchEvent(new window.Event('change', { bubbles: true }));
1038
1404
  return this.uploaded.emit(this.value);
1039
1405
  }
1040
- removedHandler(deletedFile) {
1406
+ emitRemovedFile(deletedFile) {
1407
+ const removedId = deletedFile.getMetadata('id') ||
1408
+ deletedFile.getMetadata('url') ||
1409
+ deletedFile.serverId ||
1410
+ deletedFile.id;
1411
+ return this.removed.emit(removedId);
1412
+ }
1413
+ removedHandler(deletedFile, options = {}) {
1414
+ this.releaseAcceptedFile(deletedFile.id);
1415
+ this.releasePreviewObjectUrl(deletedFile.id);
1041
1416
  let fileInput = this.getFormDataFileInput();
1042
1417
  fileInput.type = 'hidden';
1043
1418
  fileInput.value = '';
@@ -1048,10 +1423,13 @@ const SallaFileUpload = class {
1048
1423
  if (this.height) {
1049
1424
  setTimeout(() => this.host.querySelector('.filepond--root').style.height = this.height, 1000);
1050
1425
  }
1051
- this.hiddenInput.value = '';
1426
+ if (!this.usesGalleryPreview()) {
1427
+ this.hiddenInput.value = '';
1428
+ }
1052
1429
  fileInput.dispatchEvent(new window.Event('change', { bubbles: true }));
1053
- let toDelete = this.allowMultiple ? deletedFile.getMetadata('id') : deletedFile;
1054
- return this.removed.emit(toDelete);
1430
+ if (!options.skipEmit) {
1431
+ this.emitRemovedFile(deletedFile);
1432
+ }
1055
1433
  }
1056
1434
  /**
1057
1435
  * Method to set option for filepond
@@ -1059,6 +1437,12 @@ const SallaFileUpload = class {
1059
1437
  async setOption(key, value) {
1060
1438
  this.filepond[key] = value;
1061
1439
  }
1440
+ generateUploadFileId() {
1441
+ if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
1442
+ return `${this.host.id}-${crypto.randomUUID()}`;
1443
+ }
1444
+ return `${this.host.id}-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
1445
+ }
1062
1446
  getLabel() {
1063
1447
  if (this.labelIdle) {
1064
1448
  //some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
@@ -1081,6 +1465,514 @@ const SallaFileUpload = class {
1081
1465
  getFormDataFileInput() {
1082
1466
  return this.host.querySelector('.filepond--data input');
1083
1467
  }
1468
+ isValidPreviewUrl(url) {
1469
+ return typeof url === 'string' && (url.startsWith('http') ||
1470
+ url.startsWith('blob:') ||
1471
+ url.startsWith('data:') ||
1472
+ url.startsWith('/'));
1473
+ }
1474
+ getHiddenInputValue() {
1475
+ if (this.usesGalleryPreview()) {
1476
+ return this.previewFiles.map(file => file.url).join(',');
1477
+ }
1478
+ if (typeof this.value === 'object' && this.value?.url) {
1479
+ return this.value.url;
1480
+ }
1481
+ return this.value || '';
1482
+ }
1483
+ usesSplitCountLimits() {
1484
+ return usesSplitCountLimits(this.maxImagesCount, this.maxVideosCount);
1485
+ }
1486
+ hasImageLimit() {
1487
+ return this.maxImagesCount != null;
1488
+ }
1489
+ hasVideoLimit() {
1490
+ return this.maxVideosCount != null;
1491
+ }
1492
+ getMaxImagesCount() {
1493
+ return getMaxImagesCount(this.maxImagesCount);
1494
+ }
1495
+ getMaxVideosCount() {
1496
+ return getMaxVideosCount(this.maxVideosCount);
1497
+ }
1498
+ getTotalMaxFiles() {
1499
+ return getTotalMaxFiles(this.maxFilesCount, this.maxImagesCount, this.maxVideosCount);
1500
+ }
1501
+ getImageMaxFileSizeString() {
1502
+ const storeSize = salla.config.get('store.settings.upload_size');
1503
+ if (storeSize)
1504
+ return `${storeSize}KB`;
1505
+ return this.maxFileSize;
1506
+ }
1507
+ getImageMaxFileSizeBytes() {
1508
+ const size = this.getImageMaxFileSizeString();
1509
+ return size ? parseSizeToBytes(size) : null;
1510
+ }
1511
+ getVideoMaxFileSizeBytes() {
1512
+ if (this.maxVideoFileSize)
1513
+ return parseSizeToBytes(this.maxVideoFileSize);
1514
+ return this.getImageMaxFileSizeBytes();
1515
+ }
1516
+ getFilePondMaxFileSizeValue() {
1517
+ return getFilePondMaxFileSize(this.maxFileSize, salla.config.get('store.settings.upload_size'), this.maxVideoFileSize);
1518
+ }
1519
+ getFileMimeType(file) {
1520
+ if (file instanceof File) {
1521
+ return file.type;
1522
+ }
1523
+ return file.mimeType;
1524
+ }
1525
+ getFileUrlOrName(file) {
1526
+ if (file instanceof File) {
1527
+ return file.name;
1528
+ }
1529
+ return file.url;
1530
+ }
1531
+ isVideoFile(file) {
1532
+ return isVideoMimeType(this.getFileMimeType(file), this.getFileUrlOrName(file));
1533
+ }
1534
+ getPondItemNameOrUrl(item) {
1535
+ const file = item.file;
1536
+ // Pre-loaded (local) files may not have a populated File object yet, so fall
1537
+ // back to metadata url/name for reliable type detection.
1538
+ return (file?.name ||
1539
+ item.getMetadata?.('url') ||
1540
+ item.getMetadata?.('name') ||
1541
+ item.getMetadata?.('poster'));
1542
+ }
1543
+ isVideoFileFromPond(item) {
1544
+ const file = item.file;
1545
+ return isVideoMimeType(file?.type || item.fileType, this.getPondItemNameOrUrl(item));
1546
+ }
1547
+ isImageFileFromPond(item) {
1548
+ const file = item.file;
1549
+ return isImageMimeType(file?.type || item.fileType, this.getPondItemNameOrUrl(item));
1550
+ }
1551
+ getFileTypeCategory(item) {
1552
+ if (this.isVideoFileFromPond(item))
1553
+ return 'video';
1554
+ if (this.isImageFileFromPond(item))
1555
+ return 'image';
1556
+ return 'other';
1557
+ }
1558
+ /**
1559
+ * Effective count for a type = files committed to the pond + still-in-flight
1560
+ * reservations that are not yet in the pond. Committed files come straight from
1561
+ * `getFiles()` (the source of truth), so this self-heals after deletes and can
1562
+ * never leave the uploader stuck at its limit.
1563
+ */
1564
+ countAcceptedByType(type, excludeId) {
1565
+ const pondItems = this.getCountableGalleryItems();
1566
+ const pondIds = new Set(pondItems.map(item => item.id));
1567
+ let count = pondItems.filter(item => item.id !== excludeId && this.getFileTypeCategory(item) === type).length;
1568
+ this.inFlightFiles.forEach((value, id) => {
1569
+ if (value === type && id !== excludeId && !pondIds.has(id))
1570
+ count += 1;
1571
+ });
1572
+ return count;
1573
+ }
1574
+ /** Effective total across all types (committed pond files + in-flight reservations). */
1575
+ countAcceptedTotal(excludeId) {
1576
+ const pondItems = this.getCountableGalleryItems().filter(item => item.id !== excludeId);
1577
+ const pondIds = new Set(pondItems.map(item => item.id));
1578
+ let count = pondItems.length;
1579
+ this.inFlightFiles.forEach((_value, id) => {
1580
+ if (id !== excludeId && !pondIds.has(id))
1581
+ count += 1;
1582
+ });
1583
+ return count;
1584
+ }
1585
+ reserveAcceptedFile(id, type) {
1586
+ this.inFlightFiles.set(id, type);
1587
+ }
1588
+ releaseAcceptedFile(id) {
1589
+ this.inFlightFiles.delete(id);
1590
+ }
1591
+ getVideoDuration(file) {
1592
+ return new Promise((resolve, reject) => {
1593
+ const video = document.createElement('video');
1594
+ video.preload = 'metadata';
1595
+ const url = URL.createObjectURL(file);
1596
+ let settled = false;
1597
+ const cleanup = () => {
1598
+ clearTimeout(timeoutId);
1599
+ video.onloadedmetadata = null;
1600
+ video.onerror = null;
1601
+ video.removeAttribute('src');
1602
+ video.load();
1603
+ URL.revokeObjectURL(url);
1604
+ };
1605
+ const finish = (duration, error) => {
1606
+ if (settled) {
1607
+ return;
1608
+ }
1609
+ settled = true;
1610
+ cleanup();
1611
+ if (error) {
1612
+ reject(error);
1613
+ return;
1614
+ }
1615
+ resolve(duration ?? 0);
1616
+ };
1617
+ const timeoutId = window.setTimeout(() => {
1618
+ finish(undefined, new Error('Timed out loading video metadata'));
1619
+ }, VIDEO_METADATA_TIMEOUT_MS);
1620
+ video.onloadedmetadata = () => {
1621
+ finish(video.duration);
1622
+ };
1623
+ video.onerror = () => {
1624
+ finish(undefined, new Error('Failed to load video metadata'));
1625
+ };
1626
+ video.src = url;
1627
+ });
1628
+ }
1629
+ notifyMaxImagesLimit() {
1630
+ if (this.maxFilesNotified)
1631
+ return;
1632
+ this.maxFilesNotified = true;
1633
+ salla.notify.error(this.max_images_count(this.getMaxImagesCount()));
1634
+ setTimeout(() => {
1635
+ this.maxFilesNotified = false;
1636
+ }, 500);
1637
+ }
1638
+ notifyMaxVideosLimit() {
1639
+ if (this.maxFilesNotified)
1640
+ return;
1641
+ this.maxFilesNotified = true;
1642
+ salla.notify.error(this.max_videos_count(this.getMaxVideosCount()));
1643
+ setTimeout(() => {
1644
+ this.maxFilesNotified = false;
1645
+ }, 500);
1646
+ }
1647
+ notifyMaxFilesLimit() {
1648
+ if (this.maxFilesNotified)
1649
+ return;
1650
+ this.maxFilesNotified = true;
1651
+ if (this.usesSplitCountLimits() && this.hasImageLimit()) {
1652
+ salla.notify.error(this.max_images_count(this.getMaxImagesCount()));
1653
+ }
1654
+ else {
1655
+ salla.notify.error(this.max_images_count(this.maxFilesCount));
1656
+ }
1657
+ setTimeout(() => {
1658
+ this.maxFilesNotified = false;
1659
+ }, 500);
1660
+ }
1661
+ markValidationRejected(fileId) {
1662
+ this.validationRejectedFileIds.add(fileId);
1663
+ window.setTimeout(() => this.validationRejectedFileIds.delete(fileId), 1000);
1664
+ }
1665
+ getUploadErrorMessageForFile(error, file) {
1666
+ const fileType = file ? this.getFileTypeCategory(file) : 'other';
1667
+ const maxVideoBytes = this.getVideoMaxFileSizeBytes();
1668
+ return getUploadErrorMessage(error, {
1669
+ isVideo: fileType === 'video',
1670
+ maxVideoFileSizeLabel: this.maxVideoFileSize,
1671
+ maxVideoBytes: maxVideoBytes,
1672
+ tooLargeLabel: salla.lang.get('common.uploader.too_large'),
1673
+ invalidTypeLabel: salla.lang.get('common.uploader.invalid_type'),
1674
+ genericErrorLabel: salla.lang.get('common.errors.error_occurred'),
1675
+ videoTooLarge: (size) => this.video_too_large(size || formatBytesAsSize(maxVideoBytes || 0)),
1676
+ });
1677
+ }
1678
+ notifyUploadError(error, file) {
1679
+ salla.notify?.error?.(this.getUploadErrorMessageForFile(error, file));
1680
+ }
1681
+ removeFailedFile(file) {
1682
+ if (!this.filepond?.getFiles().some(pondFile => pondFile.id === file.id)) {
1683
+ return;
1684
+ }
1685
+ this.filepond.removeFile(file.id, { revert: false });
1686
+ }
1687
+ async validateBeforeAddFile(item) {
1688
+ const file = item.file instanceof Blob ? item.file : undefined;
1689
+ const fileType = this.getFileTypeCategory(item);
1690
+ if (this.usesSplitCountLimits()) {
1691
+ if (fileType === 'other') {
1692
+ salla.notify.error(salla.lang.get('common.uploader.invalid_type'));
1693
+ this.markValidationRejected(item.id);
1694
+ return false;
1695
+ }
1696
+ if (fileType === 'image' && !this.hasImageLimit()) {
1697
+ salla.notify.error(salla.lang.get('common.uploader.invalid_type'));
1698
+ this.markValidationRejected(item.id);
1699
+ return false;
1700
+ }
1701
+ if (fileType === 'video' && !this.hasVideoLimit()) {
1702
+ salla.notify.error(salla.lang.get('common.uploader.invalid_type'));
1703
+ this.markValidationRejected(item.id);
1704
+ return false;
1705
+ }
1706
+ const maxForType = fileType === 'video' ? this.getMaxVideosCount() : this.getMaxImagesCount();
1707
+ if (this.countAcceptedByType(fileType, item.id) >= maxForType) {
1708
+ if (fileType === 'video') {
1709
+ this.notifyMaxVideosLimit();
1710
+ }
1711
+ else {
1712
+ this.notifyMaxImagesLimit();
1713
+ }
1714
+ this.markValidationRejected(item.id);
1715
+ return false;
1716
+ }
1717
+ }
1718
+ else {
1719
+ if (this.countAcceptedTotal(item.id) >= this.maxFilesCount) {
1720
+ this.notifyMaxFilesLimit();
1721
+ this.markValidationRejected(item.id);
1722
+ return false;
1723
+ }
1724
+ }
1725
+ // Reserve the slot synchronously so parallel batch adds can't exceed the limit.
1726
+ this.reserveAcceptedFile(item.id, fileType);
1727
+ // Pre-loaded local files (edit mode) may not have a Blob yet; metadata is enough.
1728
+ if (!file) {
1729
+ return true;
1730
+ }
1731
+ if (fileType === 'video') {
1732
+ const maxSize = this.getVideoMaxFileSizeBytes();
1733
+ if (maxSize && file.size > maxSize) {
1734
+ salla.notify.error(this.video_too_large(this.maxVideoFileSize || formatBytesAsSize(maxSize)));
1735
+ this.releaseAcceptedFile(item.id);
1736
+ this.markValidationRejected(item.id);
1737
+ return false;
1738
+ }
1739
+ if (this.maxVideoDuration) {
1740
+ try {
1741
+ const duration = await this.getVideoDuration(file);
1742
+ if (duration > this.maxVideoDuration) {
1743
+ salla.notify.error(this.video_too_long(formatDuration(this.maxVideoDuration)));
1744
+ this.releaseAcceptedFile(item.id);
1745
+ this.markValidationRejected(item.id);
1746
+ return false;
1747
+ }
1748
+ }
1749
+ catch {
1750
+ salla.notify.error(salla.lang.get('common.uploader.failed_to_load'));
1751
+ this.releaseAcceptedFile(item.id);
1752
+ this.markValidationRejected(item.id);
1753
+ return false;
1754
+ }
1755
+ }
1756
+ }
1757
+ else if (fileType === 'image') {
1758
+ const maxSize = this.getImageMaxFileSizeBytes();
1759
+ if (maxSize && file.size > maxSize) {
1760
+ salla.notify.error(salla.lang.get('common.uploader.too_large'));
1761
+ this.releaseAcceptedFile(item.id);
1762
+ this.markValidationRejected(item.id);
1763
+ return false;
1764
+ }
1765
+ }
1766
+ else if (this.usesSplitCountLimits()) {
1767
+ salla.notify.error(salla.lang.get('common.uploader.invalid_type'));
1768
+ this.releaseAcceptedFile(item.id);
1769
+ this.markValidationRejected(item.id);
1770
+ return false;
1771
+ }
1772
+ return true;
1773
+ }
1774
+ renderGalleryThumb(file) {
1775
+ if (this.isVideoFile(file)) {
1776
+ return [
1777
+ h("video", { class: "s-file-upload-gallery-video-thumb", src: file.url, muted: true, playsInline: true, preload: "metadata" }),
1778
+ h("span", { class: "s-file-upload-gallery-video-icon", innerHTML: PlayIcon }),
1779
+ ];
1780
+ }
1781
+ return h("img", { src: file.url, alt: "", loading: "lazy" });
1782
+ }
1783
+ releasePreviewObjectUrl(fileId) {
1784
+ const url = this.previewObjectUrls.get(fileId);
1785
+ if (!url)
1786
+ return;
1787
+ URL.revokeObjectURL(url);
1788
+ this.previewObjectUrls.delete(fileId);
1789
+ }
1790
+ prunePreviewObjectUrls(activeFileIds) {
1791
+ [...this.previewObjectUrls.keys()].forEach(id => {
1792
+ if (!activeFileIds.has(id)) {
1793
+ this.releasePreviewObjectUrl(id);
1794
+ }
1795
+ });
1796
+ }
1797
+ revokeAllPreviewObjectUrls() {
1798
+ [...this.previewObjectUrls.keys()].forEach(id => this.releasePreviewObjectUrl(id));
1799
+ }
1800
+ getFilePreviewUrl(item) {
1801
+ const fromMeta = item.getMetadata('url') || item.getMetadata('poster');
1802
+ if (this.isValidPreviewUrl(fromMeta)) {
1803
+ this.releasePreviewObjectUrl(item.id);
1804
+ return fromMeta;
1805
+ }
1806
+ const uploaded = this.uploadedFiles.find(file => file.id === item.serverId || file.id === item.getMetadata('id'));
1807
+ if (uploaded?.url) {
1808
+ this.releasePreviewObjectUrl(item.id);
1809
+ return uploaded.url;
1810
+ }
1811
+ const file = item.file;
1812
+ if (file instanceof Blob) {
1813
+ const existing = this.previewObjectUrls.get(item.id);
1814
+ if (existing)
1815
+ return existing;
1816
+ const url = URL.createObjectURL(file);
1817
+ this.previewObjectUrls.set(item.id, url);
1818
+ return url;
1819
+ }
1820
+ return '';
1821
+ }
1822
+ isFileUploading(item) {
1823
+ return item.status === 3 || item.status === 7 || item.status === 9;
1824
+ }
1825
+ getPreviewGalleryItems() {
1826
+ return (this.filepond?.getFiles() || []).filter(item => shouldCountGalleryFile(item.status));
1827
+ }
1828
+ getCountableGalleryItems() {
1829
+ return (this.filepond?.getFiles() || []).filter(item => shouldCountGalleryLimit(item.status));
1830
+ }
1831
+ schedulePreviewFilesSync() {
1832
+ if (!this.usesGalleryPreview())
1833
+ return;
1834
+ if (this.previewFilesSyncRaf != null) {
1835
+ cancelAnimationFrame(this.previewFilesSyncRaf);
1836
+ }
1837
+ this.previewFilesSyncRaf = requestAnimationFrame(() => {
1838
+ this.previewFilesSyncRaf = requestAnimationFrame(() => {
1839
+ this.previewFilesSyncRaf = null;
1840
+ this.syncPreviewFiles();
1841
+ });
1842
+ });
1843
+ }
1844
+ mapItemsToPreviewFiles(items) {
1845
+ return items.map(item => ({
1846
+ id: String(item.getMetadata('id') || item.serverId || item.id),
1847
+ url: this.getFilePreviewUrl(item),
1848
+ mimeType: item.file?.type || item.fileType,
1849
+ processing: this.isFileUploading(item),
1850
+ })).filter(file => file.url);
1851
+ }
1852
+ emitGalleryCounts(items) {
1853
+ // Derive display counts from the settled pond items. This runs deferred
1854
+ // (schedulePreviewFilesSync), so batch-rejected/over-limit files are already
1855
+ // gone and the numbers always match what is actually on screen. Admission is
1856
+ // guarded synchronously by the in-flight reservations in validateBeforeAddFile,
1857
+ // so the pond never exceeds the configured limits — counting it here always
1858
+ // reflects the real state (e.g. after deletes) instead of a stale number.
1859
+ let imageCount = 0;
1860
+ let videoCount = 0;
1861
+ items.forEach(item => {
1862
+ const type = this.getFileTypeCategory(item);
1863
+ if (type === 'video')
1864
+ videoCount += 1;
1865
+ else if (type === 'image')
1866
+ imageCount += 1;
1867
+ });
1868
+ let count = items.length;
1869
+ if (this.hasImageLimit()) {
1870
+ imageCount = Math.min(imageCount, this.getMaxImagesCount());
1871
+ }
1872
+ if (this.hasVideoLimit()) {
1873
+ videoCount = Math.min(videoCount, this.getMaxVideosCount());
1874
+ }
1875
+ if (this.usesSplitCountLimits()) {
1876
+ count = Math.min(count, this.getTotalMaxFiles());
1877
+ }
1878
+ const uploading = items.some(item => this.isFileUploading(item));
1879
+ this.galleryUpdated.emit({
1880
+ count,
1881
+ imageCount,
1882
+ videoCount,
1883
+ uploading,
1884
+ });
1885
+ }
1886
+ syncPreviewFiles() {
1887
+ if (!this.usesGalleryPreview())
1888
+ return;
1889
+ const previewItems = this.getPreviewGalleryItems();
1890
+ this.previewFiles = this.mapItemsToPreviewFiles(previewItems);
1891
+ this.prunePreviewObjectUrls(new Set(previewItems.map(item => item.id)));
1892
+ this.emitGalleryCounts(this.getCountableGalleryItems());
1893
+ if (this.hiddenInput) {
1894
+ this.hiddenInput.value = this.getHiddenInputValue();
1895
+ }
1896
+ }
1897
+ enforceDropLabelVisibility(fileCount) {
1898
+ if (!this.usesGalleryPreview())
1899
+ return;
1900
+ const dropLabel = this.host.querySelector('.filepond--drop-label');
1901
+ if (!dropLabel)
1902
+ return;
1903
+ const imageCount = this.countAcceptedByType('image');
1904
+ const videoCount = this.countAcceptedByType('video');
1905
+ let isMaxReached = false;
1906
+ if (this.usesSplitCountLimits()) {
1907
+ const imagesBlocked = this.hasImageLimit() && imageCount >= this.getMaxImagesCount();
1908
+ const videosBlocked = this.hasVideoLimit() && videoCount >= this.getMaxVideosCount();
1909
+ if (this.hasImageLimit() && this.hasVideoLimit()) {
1910
+ isMaxReached = imagesBlocked && videosBlocked;
1911
+ }
1912
+ else if (this.hasImageLimit()) {
1913
+ isMaxReached = imagesBlocked;
1914
+ }
1915
+ else if (this.hasVideoLimit()) {
1916
+ isMaxReached = videosBlocked;
1917
+ }
1918
+ }
1919
+ else {
1920
+ isMaxReached = (fileCount ?? this.countAcceptedTotal()) >= this.maxFilesCount;
1921
+ }
1922
+ this.host.classList.toggle('s-file-upload-at-max', isMaxReached);
1923
+ dropLabel.classList.toggle('s-file-upload-drop-label-disabled', isMaxReached);
1924
+ dropLabel.classList.remove('s-hidden');
1925
+ if (isMaxReached) {
1926
+ dropLabel.style.setProperty('opacity', '0.55', 'important');
1927
+ dropLabel.style.setProperty('visibility', 'visible', 'important');
1928
+ dropLabel.style.setProperty('transform', 'none', 'important');
1929
+ dropLabel.style.setProperty('height', 'auto', 'important');
1930
+ dropLabel.style.setProperty('min-height', '4.75em', 'important');
1931
+ return;
1932
+ }
1933
+ ['opacity', 'visibility', 'transform', 'height', 'min-height'].forEach(prop => {
1934
+ dropLabel.style.removeProperty(prop);
1935
+ });
1936
+ }
1937
+ scheduleDropLabelVisibilityEnforcement(fileCount) {
1938
+ this.enforceDropLabelVisibility(fileCount);
1939
+ requestAnimationFrame(() => this.enforceDropLabelVisibility(fileCount));
1940
+ setTimeout(() => this.enforceDropLabelVisibility(fileCount), 200);
1941
+ }
1942
+ removePreviewFile(event, fileId) {
1943
+ event.stopPropagation();
1944
+ const pondFile = this.filepond?.getFiles().find(file => String(file.getMetadata('id')) === String(fileId) || file.id === fileId);
1945
+ if (pondFile) {
1946
+ this.filepond.removeFile(pondFile.id);
1947
+ }
1948
+ }
1949
+ openPreview(index) {
1950
+ const file = this.previewFiles[index];
1951
+ if (!file || file.processing)
1952
+ return;
1953
+ this.attachmentView?.open(index);
1954
+ }
1955
+ getGalleryThumbSize() {
1956
+ return this.imagePreviewHeight || 75;
1957
+ }
1958
+ getGalleryStyles() {
1959
+ const size = this.getGalleryThumbSize();
1960
+ return {
1961
+ '--s-file-upload-preview-size': `${size}px`,
1962
+ '--s-file-upload-remove-size': `${Math.max(18, Math.round(size * 0.24))}px`,
1963
+ '--s-file-upload-remove-icon-size': `${Math.max(10, Math.round(size * 0.13))}px`,
1964
+ };
1965
+ }
1966
+ renderPreviewGallery() {
1967
+ if (!this.usesGalleryPreview() || !this.previewFiles.length)
1968
+ return null;
1969
+ const galleryThumbSize = this.getGalleryThumbSize();
1970
+ return (h("div", { class: "s-file-upload-gallery", style: this.getGalleryStyles() }, h("div", { class: "s-file-upload-gallery-track s-scrollbar ps-2" }, this.previewFiles.map((file, index) => (h("div", { class: "s-file-upload-gallery-item", key: file.id }, this.allowRemove && (h("button", { type: "button", class: "s-file-upload-gallery-remove", "aria-label": salla.lang.get('common.elements.remove'), onClick: (event) => this.removePreviewFile(event, file.id) }, h("span", { innerHTML: Cancel }))), h("div", { class: {
1971
+ 's-file-upload-gallery-thumb': true,
1972
+ 'is-processing': file.processing,
1973
+ 'is-video': this.isVideoFile(file),
1974
+ }, onClick: () => this.openPreview(index) }, this.renderGalleryThumb(file), file.processing && h("salla-loading", { size: Math.max(16, Math.round(galleryThumbSize * 0.22)) })))))), this.previewFiles.length > 0 && (h("salla-attachment-view", { ref: el => (this.attachmentView = el), attachments: this.previewFiles }))));
1975
+ }
1084
1976
  getFiles() {
1085
1977
  if (!this.value && !this.files) {
1086
1978
  return [];
@@ -1117,12 +2009,20 @@ const SallaFileUpload = class {
1117
2009
  this.host.innerHTML = '';
1118
2010
  }
1119
2011
  }
2012
+ disconnectedCallback() {
2013
+ if (this.previewFilesSyncRaf != null) {
2014
+ cancelAnimationFrame(this.previewFilesSyncRaf);
2015
+ this.previewFilesSyncRaf = null;
2016
+ }
2017
+ this.revokeAllPreviewObjectUrls();
2018
+ }
1120
2019
  render() {
1121
- return (h(Host, { key: '518fef1a108d79f9aeb9efdbce74e4e721a145dc', class: {
2020
+ return (h(Host, { key: '9c9bb99746270f2511bd86344a135d05f9b3cf29', class: {
1122
2021
  "s-file-upload": true,
1123
2022
  "s-file-upload-profile-image": this.profileImage,
1124
2023
  "s-file-upload-multiple": this.allowMultiple,
1125
- } }, h("input", { key: '0c01117f1e59577833b106d5825a08dd2ca51bd0', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', h("input", { key: '69276b5e95c8bc35f42c3f1f307abea8c1761621', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
2024
+ "s-file-upload-has-gallery": this.usesGalleryPreview(),
2025
+ } }, h("input", { key: 'd033124b1829ee4b9f0c4d44041a525e73769b77', type: "file", name: this.name, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.getTotalMaxFiles())) : '', h("input", { key: '95608637f6b52dabbad4a7374d329549cb6d3862', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.getHiddenInputValue(), ref: input => this.hiddenInput = input }), this.renderPreviewGallery()));
1126
2026
  }
1127
2027
  async componentDidLoad() {
1128
2028
  await Salla.onReady();
@@ -1131,6 +2031,7 @@ const SallaFileUpload = class {
1131
2031
  this.value = Salla.config.get('user.avatar');
1132
2032
  }
1133
2033
  let files = this.getFiles();
2034
+ const filePondMaxFileSize = this.getFilePondMaxFileSizeValue();
1134
2035
  this.filepond = this.FilePond.create(this.fileUploader, {
1135
2036
  name: this.payloadName || this.name,
1136
2037
  //@ts-ignore
@@ -1147,10 +2048,13 @@ const SallaFileUpload = class {
1147
2048
  allowReorder: this.allowReorder,
1148
2049
  storeAsFile: this.storeAsFile,
1149
2050
  forceRevert: this.forceRevert,
1150
- maxFiles: this.maxFilesCount,
2051
+ // FilePond hides the drop label (opacity 0 + height 0) when maxFiles is reached.
2052
+ // In gallery mode we enforce the limit ourselves so labels stay visible, dimmed at max.
2053
+ maxFiles: this.usesGalleryPreview() ? null : this.getTotalMaxFiles(),
2054
+ beforeAddFile: (item) => this.validateBeforeAddFile(item),
1151
2055
  imagePreviewHeight: this.imagePreviewHeight,
1152
2056
  filePosterHeight: this.filePosterHeight,
1153
- allowImagePreview: this.allowImagePreview,
2057
+ allowImagePreview: this.usesGalleryPreview() ? false : this.allowImagePreview,
1154
2058
  maxParallelUploads: this.maxParallelUploads,
1155
2059
  checkValidity: this.checkValidity,
1156
2060
  itemInsertLocation: this.itemInsertLocation,
@@ -1160,36 +2064,80 @@ const SallaFileUpload = class {
1160
2064
  dropOnElement: this.dropOnElement,
1161
2065
  dropValidation: this.dropValidation,
1162
2066
  ignoredFiles: this.ignoredFiles,
1163
- onaddfile: (error, file) => this.addedHandler(error, file),
2067
+ onaddfile: (error, file) => {
2068
+ // The file is now committed to the pond (or errored out), so it is
2069
+ // counted from getFiles() from here on — drop the in-flight reservation
2070
+ // either way to keep the map transient and drift-free.
2071
+ this.releaseAcceptedFile(file.id);
2072
+ if (error) {
2073
+ if (!this.validationRejectedFileIds.has(file.id)) {
2074
+ this.notifyUploadError(error, file);
2075
+ }
2076
+ this.validationRejectedFileIds.delete(file.id);
2077
+ }
2078
+ this.addedHandler(error, file);
2079
+ if (this.usesGalleryPreview()) {
2080
+ this.schedulePreviewFilesSync();
2081
+ }
2082
+ },
1164
2083
  onwarning: (error, _file, _status) => {
1165
2084
  if (error.body === "Max files") {
1166
- salla.notify.error(this.max_images_count(this.maxFilesCount));
2085
+ this.notifyMaxFilesLimit();
1167
2086
  }
1168
2087
  },
1169
2088
  onprocessfile: (error, file) => {
2089
+ if (error) {
2090
+ this.notifyUploadError(error, file);
2091
+ this.removeFailedFile(file);
2092
+ if (this.usesGalleryPreview()) {
2093
+ this.schedulePreviewFilesSync();
2094
+ }
2095
+ return;
2096
+ }
2097
+ let syncedGallery = false;
1170
2098
  if (this.allowMultiple && !error) {
1171
2099
  // Find the uploaded file data using the serverId returned from onload
1172
2100
  const serverId = file.serverId;
1173
2101
  const uploadedFile = this.uploadedFiles.find(f => f.id === serverId);
1174
2102
  if (uploadedFile) {
1175
- // Set metadata on the file
1176
2103
  file.setMetadata('id', uploadedFile.id, true);
1177
2104
  file.setMetadata('url', uploadedFile.url, true);
1178
2105
  this.value = {
1179
2106
  id: uploadedFile.id,
1180
2107
  url: uploadedFile.url
1181
2108
  };
2109
+ if (this.usesGalleryPreview()) {
2110
+ this.syncPreviewFiles();
2111
+ syncedGallery = true;
2112
+ }
1182
2113
  this.uploadedHandler();
1183
2114
  }
1184
2115
  }
2116
+ if (this.usesGalleryPreview() && !syncedGallery) {
2117
+ this.schedulePreviewFilesSync();
2118
+ }
2119
+ },
2120
+ onremovefile: (_error, file) => {
2121
+ if (this.usesGalleryPreview()) {
2122
+ if (file) {
2123
+ this.emitRemovedFile(file);
2124
+ }
2125
+ this.schedulePreviewFilesSync();
2126
+ }
1185
2127
  },
1186
2128
  onupdatefiles: (fileItems) => {
1187
2129
  const dropLabel = this.host.querySelector('.filepond--drop-label');
1188
2130
  const listScroller = this.host.querySelector('.filepond--list-scroller');
2131
+ if (this.usesGalleryPreview()) {
2132
+ listScroller?.classList.add('s-hidden');
2133
+ this.scheduleDropLabelVisibilityEnforcement();
2134
+ this.schedulePreviewFilesSync();
2135
+ return;
2136
+ }
1189
2137
  if (this.allowMultiple) {
1190
2138
  if (fileItems.length > 0) {
1191
2139
  dropLabel.classList.add('s-hidden');
1192
- if (!this.isListScrollerListenerAdded && fileItems.length < this.maxFilesCount) {
2140
+ if (!this.isListScrollerListenerAdded && fileItems.length < this.getTotalMaxFiles()) {
1193
2141
  this.showMaxCountHint = true;
1194
2142
  listScroller.addEventListener('click', this.openFileBrowser);
1195
2143
  this.isListScrollerListenerAdded = true;
@@ -1202,8 +2150,7 @@ const SallaFileUpload = class {
1202
2150
  this.isListScrollerListenerAdded = false;
1203
2151
  }
1204
2152
  }
1205
- // Check if fileItems length equals maxFilesCount and remove event listener
1206
- if (fileItems.length === this.maxFilesCount && this.isListScrollerListenerAdded) {
2153
+ if (fileItems.length === this.getTotalMaxFiles() && this.isListScrollerListenerAdded) {
1207
2154
  listScroller.removeEventListener('click', this.openFileBrowser);
1208
2155
  this.isListScrollerListenerAdded = false;
1209
2156
  this.showMaxCountHint = false;
@@ -1219,21 +2166,28 @@ const SallaFileUpload = class {
1219
2166
  onload: (response) => {
1220
2167
  let responseData = JSON.parse(response).data;
1221
2168
  if ((this.instantUpload || this.allowMultiple) && Array.isArray(responseData) && responseData.length > 0) {
1222
- const fileId = `${this.host.id}-${Math.floor(100 + Math.random() * 900)}`;
1223
- const fileUrl = responseData[0];
2169
+ const item = responseData[0];
2170
+ const fileUrl = typeof item === 'object' && item !== null ? item.filePath || item.url : item;
2171
+ const fileId = this.generateUploadFileId();
1224
2172
  // Store the upload result to be picked up by onprocessfile
1225
- this.uploadedFiles.push({
1226
- id: fileId,
1227
- url: fileUrl
1228
- });
2173
+ this.uploadedFiles = [
2174
+ ...this.uploadedFiles,
2175
+ { id: fileId, url: fileUrl }
2176
+ ];
1229
2177
  // Return the serverId that FilePond will use to identify this file
1230
2178
  // We'll use the fileId as the serverId
1231
2179
  return fileId;
1232
2180
  }
1233
2181
  else {
1234
- this.value = responseData.filePath || responseData.url;
2182
+ const fileUrl = typeof responseData === 'object' && responseData !== null
2183
+ ? responseData.filePath || responseData.url
2184
+ : responseData;
2185
+ const fileId = typeof responseData === 'object' && responseData !== null && responseData.id
2186
+ ? responseData.id
2187
+ : this.generateUploadFileId();
2188
+ this.value = { id: fileId, url: fileUrl };
1235
2189
  this.uploadedHandler();
1236
- return this.value;
2190
+ return fileUrl;
1237
2191
  }
1238
2192
  },
1239
2193
  headers: salla.api.getHeaders(),
@@ -1298,12 +2252,19 @@ const SallaFileUpload = class {
1298
2252
  fileValidateTypeLabelExpectedTypes: '{allButLastType}, {lastType}',
1299
2253
  labelMaxFileSizeExceeded: salla.lang.get('common.uploader.too_large'),
1300
2254
  labelMaxFileSize: '{filesize}',
1301
- maxFileSize: `${salla.config.get('store.settings.upload_size')}KB` || this.maxFileSize,
2255
+ ...(filePondMaxFileSize ? { maxFileSize: filePondMaxFileSize } : {}),
1302
2256
  beforeRemoveFile: (deletedFile) => new Promise((resolve) => {
1303
- this.removedHandler(deletedFile);
2257
+ this.removedHandler(deletedFile, { skipEmit: this.usesGalleryPreview() });
1304
2258
  resolve(true);
1305
2259
  }),
1306
2260
  });
2261
+ this.syncPreviewFiles();
2262
+ if (this.usesGalleryPreview()) {
2263
+ this.filepond.on('updatefiles', () => {
2264
+ this.scheduleDropLabelVisibilityEnforcement();
2265
+ });
2266
+ this.scheduleDropLabelVisibilityEnforcement();
2267
+ }
1307
2268
  this.hiddenInput.addEventListener('invalid', e => {
1308
2269
  this.invalidInput.emit(e);
1309
2270
  });
@@ -1425,7 +2386,7 @@ const SallaTelInput = class {
1425
2386
  if (this.TelInput)
1426
2387
  return;
1427
2388
  try {
1428
- const telInputModule = await import('./intlTelInput-Dsx2z7pR.js').then(function (n) { return n.i; });
2389
+ const telInputModule = await import('./intlTelInput-CD2FA0nI.js').then(function (n) { return n.i; });
1429
2390
  this.TelInput = telInputModule.default;
1430
2391
  }
1431
2392
  catch (error) {
@@ -1564,4 +2525,4 @@ const SallaTelInput = class {
1564
2525
  };
1565
2526
  SallaTelInput.style = sallaTelInputCss;
1566
2527
 
1567
- export { SallaBookingField as salla_booking_field, SallaColorPicker as salla_color_picker, SallaConditionalFields as salla_conditional_fields, SallaDatetimePicker as salla_datetime_picker, SallaFileUpload as salla_file_upload, SallaQuantityInput as salla_quantity_input, SallaTelInput as salla_tel_input };
2528
+ export { SallaAttachmentView as salla_attachment_view, SallaAttachments as salla_attachments, SallaBookingField as salla_booking_field, SallaColorPicker as salla_color_picker, SallaConditionalFields as salla_conditional_fields, SallaDatetimePicker as salla_datetime_picker, SallaFileUpload as salla_file_upload, SallaQuantityInput as salla_quantity_input, SallaTelInput as salla_tel_input };