@paperless/core 2.0.1-beta.151 → 2.0.1-beta.152

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 (253) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{paperless/p-c879f50c.entry.js → build/p-0103e9ac.entry.js} +2 -2
  3. package/dist/build/{p-0740b690.entry.js → p-133e9259.entry.js} +2 -2
  4. package/dist/build/{p-71666551.entry.js → p-213bc400.entry.js} +2 -2
  5. package/dist/build/{p-e33a56c8.entry.js → p-219db898.entry.js} +2 -2
  6. package/dist/build/{p-cc3307b8.entry.js → p-2da67519.entry.js} +2 -2
  7. package/dist/build/{p-8981247d.entry.js → p-302eedc6.entry.js} +2 -2
  8. package/dist/build/p-32f997e7.entry.js +2 -0
  9. package/dist/build/p-3322c57a.js +2 -0
  10. package/dist/build/p-3f02cbe4.entry.js +2 -0
  11. package/dist/build/p-3f02cbe4.entry.js.map +1 -0
  12. package/dist/{paperless/p-add932d6.entry.js → build/p-4fb1f39b.entry.js} +2 -2
  13. package/dist/{paperless/p-5048c4c2.entry.js → build/p-50a816b0.entry.js} +2 -2
  14. package/dist/{paperless/p-8fcf3bb8.entry.js → build/p-7b7c60de.entry.js} +2 -2
  15. package/dist/build/{p-e2054751.entry.js → p-9e4cbacf.entry.js} +2 -2
  16. package/dist/build/p-ad3595e3.entry.js +3 -0
  17. package/dist/build/p-ad3595e3.entry.js.map +1 -0
  18. package/dist/build/p-b137cbd4.entry.js +2 -0
  19. package/dist/build/{p-d6828011.entry.js → p-bb7a5be7.entry.js} +2 -2
  20. package/dist/build/{p-2edd87f3.entry.js → p-c3558fb4.entry.js} +2 -2
  21. package/dist/build/{p-26a3990a.entry.js → p-c892b87a.entry.js} +2 -2
  22. package/dist/build/p-cropper.entry.esm.js.map +1 -1
  23. package/dist/build/{p-fa0234e9.entry.js → p-dc5fab19.entry.js} +2 -2
  24. package/dist/{paperless/p-0875bbbb.entry.js → build/p-e596d429.entry.js} +2 -2
  25. package/dist/build/{p-d4152f66.entry.js → p-fa78c45a.entry.js} +2 -2
  26. package/dist/build/p-range.entry.esm.js.map +1 -0
  27. package/dist/build/paperless.esm.js +1 -1
  28. package/dist/cjs/index-BDuPp9vl.js +4 -0
  29. package/dist/cjs/loader.cjs.js +1 -1
  30. package/dist/cjs/p-accordion.cjs.entry.js +2 -2
  31. package/dist/cjs/p-attachment.cjs.entry.js +6 -6
  32. package/dist/cjs/p-button-group.cjs.entry.js +1 -1
  33. package/dist/cjs/p-calendar.cjs.entry.js +1 -1
  34. package/dist/cjs/p-checkbox_4.cjs.entry.js +3 -3
  35. package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
  36. package/dist/cjs/p-cropper.cjs.entry.js +6 -19
  37. package/dist/cjs/p-cropper.cjs.entry.js.map +1 -1
  38. package/dist/cjs/p-cropper.entry.cjs.js.map +1 -1
  39. package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
  40. package/dist/cjs/p-empty-state_9.cjs.entry.js +8 -8
  41. package/dist/cjs/p-field_2.cjs.entry.js +3 -3
  42. package/dist/cjs/p-label.cjs.entry.js +3 -3
  43. package/dist/cjs/p-listing.cjs.entry.js +2 -2
  44. package/dist/cjs/p-navbar.cjs.entry.js +1 -1
  45. package/dist/cjs/p-navigation-item.cjs.entry.js +2 -2
  46. package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
  47. package/dist/cjs/p-pagination_3.cjs.entry.js +4 -4
  48. package/dist/cjs/p-portal.cjs.entry.js +1 -1
  49. package/dist/cjs/p-range.cjs.entry.js +44 -0
  50. package/dist/cjs/p-range.cjs.entry.js.map +1 -0
  51. package/dist/cjs/p-range.entry.cjs.js.map +1 -0
  52. package/dist/cjs/p-select.cjs.entry.js +1 -1
  53. package/dist/cjs/p-toast.cjs.entry.js +1 -1
  54. package/dist/cjs/paperless.cjs.js +1 -1
  55. package/dist/collection/collection-manifest.json +2 -1
  56. package/dist/collection/components/helpers/portal/portal.component.js +1 -1
  57. package/dist/collection/components/molecules/accordion/accordion.component.js +2 -2
  58. package/dist/collection/components/molecules/attachment/attachment.component.js +6 -6
  59. package/dist/collection/components/molecules/button-group/button-group.component.js +1 -1
  60. package/dist/collection/components/molecules/calendar/calendar.component.js +1 -1
  61. package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
  62. package/dist/collection/components/molecules/cropper/cropper.component.css +1 -0
  63. package/dist/collection/components/{deprecated/molecules → molecules}/cropper/cropper.component.js +8 -41
  64. package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -0
  65. package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
  66. package/dist/collection/components/molecules/dropdown/dropdown.component.js +3 -3
  67. package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
  68. package/dist/collection/components/molecules/field/field/field.component.js +3 -3
  69. package/dist/collection/components/molecules/label/label.component.js +3 -3
  70. package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +2 -2
  71. package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
  72. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
  73. package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
  74. package/dist/collection/components/molecules/range/range.component.css +1 -0
  75. package/dist/collection/components/molecules/range/range.component.js +144 -0
  76. package/dist/collection/components/molecules/range/range.component.js.map +1 -0
  77. package/dist/collection/components/molecules/select/select.component.js +1 -1
  78. package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
  79. package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
  80. package/dist/collection/components/molecules/table/row/table-row.component.js +3 -3
  81. package/dist/collection/components/molecules/toast/toast.component.js +1 -1
  82. package/dist/collection/components/organisms/listing/listing.component.js +2 -2
  83. package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
  84. package/dist/components/p--NCbtXAT.js +69 -0
  85. package/dist/components/p--NCbtXAT.js.map +1 -0
  86. package/dist/components/{p-D07Uh9cR.js → p-6G9LqZu0.js} +3 -3
  87. package/dist/components/{p-D07Uh9cR.js.map → p-6G9LqZu0.js.map} +1 -1
  88. package/dist/components/{p-CU2NvmYF.js → p-B60b7s3F.js} +9 -9
  89. package/dist/components/{p-CU2NvmYF.js.map → p-B60b7s3F.js.map} +1 -1
  90. package/dist/components/{p-DQE2U_Lj.js → p-BPFWBp7T.js} +9 -9
  91. package/dist/components/{p-DQE2U_Lj.js.map → p-BPFWBp7T.js.map} +1 -1
  92. package/dist/components/{p-DfRQHBer.js → p-BuB74H5T.js} +3 -3
  93. package/dist/components/{p-DfRQHBer.js.map → p-BuB74H5T.js.map} +1 -1
  94. package/dist/components/{p-Du_Am2CT.js → p-C0ZWBE1t.js} +6 -6
  95. package/dist/components/{p-Du_Am2CT.js.map → p-C0ZWBE1t.js.map} +1 -1
  96. package/dist/components/{p-FA9hEJhK.js → p-C4qAvszO.js} +4 -4
  97. package/dist/components/{p-FA9hEJhK.js.map → p-C4qAvszO.js.map} +1 -1
  98. package/dist/components/{p-Dh_4gXYW.js → p-C6mKH4oI.js} +3 -3
  99. package/dist/components/{p-Dh_4gXYW.js.map → p-C6mKH4oI.js.map} +1 -1
  100. package/dist/components/{p-jSbWZMTW.js → p-CJPrTM14.js} +3 -3
  101. package/dist/components/{p-jSbWZMTW.js.map → p-CJPrTM14.js.map} +1 -1
  102. package/dist/components/{p-C7SA9Zu6.js → p-COcP6KwP.js} +5 -5
  103. package/dist/components/{p-C7SA9Zu6.js.map → p-COcP6KwP.js.map} +1 -1
  104. package/dist/components/{p-DnE_NWa3.js → p-CSK_X0tW.js} +9 -9
  105. package/dist/components/{p-DnE_NWa3.js.map → p-CSK_X0tW.js.map} +1 -1
  106. package/dist/components/{p-5BV5XA3F.js → p-CdJmhxHE.js} +5 -5
  107. package/dist/components/{p-5BV5XA3F.js.map → p-CdJmhxHE.js.map} +1 -1
  108. package/dist/components/{p-Bs_oUMiX.js → p-QH6YwDKn.js} +4 -4
  109. package/dist/components/{p-Bs_oUMiX.js.map → p-QH6YwDKn.js.map} +1 -1
  110. package/dist/components/{p-v8w9H3NB.js → p-S7p7V6sq.js} +4 -4
  111. package/dist/components/{p-v8w9H3NB.js.map → p-S7p7V6sq.js.map} +1 -1
  112. package/dist/components/p-accordion.js +2 -2
  113. package/dist/components/p-attachment.js +10 -10
  114. package/dist/components/p-button-group.js +1 -1
  115. package/dist/components/{p-DqpPnj1P.js → p-c2_LHyBE.js} +3 -3
  116. package/dist/components/{p-DqpPnj1P.js.map → p-c2_LHyBE.js.map} +1 -1
  117. package/dist/components/p-calendar.js +1 -1
  118. package/dist/components/p-content-slider.js +2 -2
  119. package/dist/components/p-cropper.js +15 -23
  120. package/dist/components/p-cropper.js.map +1 -1
  121. package/dist/components/p-datepicker.js +9 -9
  122. package/dist/components/p-dropdown.js +1 -1
  123. package/dist/components/p-empty-state.js +1 -1
  124. package/dist/components/p-field-container.js +1 -1
  125. package/dist/components/p-field.js +1 -1
  126. package/dist/components/p-helper.js +1 -1
  127. package/dist/components/p-label.js +3 -3
  128. package/dist/components/p-listing.js +2 -2
  129. package/dist/components/p-navbar.js +1 -1
  130. package/dist/components/p-navigation-item.js +2 -2
  131. package/dist/components/p-navigation-section.js +1 -1
  132. package/dist/components/p-pagination-pages.js +1 -1
  133. package/dist/components/p-pagination-size.js +1 -1
  134. package/dist/components/p-pagination.js +1 -1
  135. package/dist/components/p-portal.js +1 -1
  136. package/dist/components/p-profile.js +2 -2
  137. package/dist/components/p-range.d.ts +11 -0
  138. package/dist/components/p-range.js +9 -0
  139. package/dist/components/p-range.js.map +1 -0
  140. package/dist/components/p-select.js +7 -7
  141. package/dist/components/p-table-cell.js +1 -1
  142. package/dist/components/p-table-footer.js +1 -1
  143. package/dist/components/p-table-header.js +1 -1
  144. package/dist/components/p-table-row.js +1 -1
  145. package/dist/components/p-table.js +14 -14
  146. package/dist/components/p-toast.js +1 -1
  147. package/dist/components/p-tooltip.js +1 -1
  148. package/dist/components/{p-B1sC2mve.js → p-z7y5Yxgj.js} +7 -7
  149. package/dist/components/{p-B1sC2mve.js.map → p-z7y5Yxgj.js.map} +1 -1
  150. package/dist/esm/index-DhGo7hbh.js +4 -0
  151. package/dist/esm/loader.js +1 -1
  152. package/dist/esm/p-accordion.entry.js +2 -2
  153. package/dist/esm/p-attachment.entry.js +6 -6
  154. package/dist/esm/p-button-group.entry.js +1 -1
  155. package/dist/esm/p-calendar.entry.js +1 -1
  156. package/dist/esm/p-checkbox_4.entry.js +3 -3
  157. package/dist/esm/p-content-slider.entry.js +2 -2
  158. package/dist/esm/p-cropper.entry.js +6 -19
  159. package/dist/esm/p-cropper.entry.js.map +1 -1
  160. package/dist/esm/p-datepicker.entry.js +2 -2
  161. package/dist/esm/p-empty-state_9.entry.js +8 -8
  162. package/dist/esm/p-field_2.entry.js +3 -3
  163. package/dist/esm/p-label.entry.js +3 -3
  164. package/dist/esm/p-listing.entry.js +2 -2
  165. package/dist/esm/p-navbar.entry.js +1 -1
  166. package/dist/esm/p-navigation-item.entry.js +2 -2
  167. package/dist/esm/p-navigation-section.entry.js +1 -1
  168. package/dist/esm/p-pagination_3.entry.js +4 -4
  169. package/dist/esm/p-portal.entry.js +1 -1
  170. package/dist/esm/p-range.entry.js +42 -0
  171. package/dist/esm/p-range.entry.js.map +1 -0
  172. package/dist/esm/p-select.entry.js +1 -1
  173. package/dist/esm/p-toast.entry.js +1 -1
  174. package/dist/esm/paperless.js +1 -1
  175. package/dist/index.html +1 -1
  176. package/dist/{build/p-c879f50c.entry.js → paperless/p-0103e9ac.entry.js} +2 -2
  177. package/dist/paperless/{p-0740b690.entry.js → p-133e9259.entry.js} +2 -2
  178. package/dist/paperless/{p-71666551.entry.js → p-213bc400.entry.js} +2 -2
  179. package/dist/paperless/{p-e33a56c8.entry.js → p-219db898.entry.js} +2 -2
  180. package/dist/paperless/{p-cc3307b8.entry.js → p-2da67519.entry.js} +2 -2
  181. package/dist/paperless/{p-8981247d.entry.js → p-302eedc6.entry.js} +2 -2
  182. package/dist/paperless/p-32f997e7.entry.js +2 -0
  183. package/dist/paperless/p-3f02cbe4.entry.js +2 -0
  184. package/dist/paperless/p-3f02cbe4.entry.js.map +1 -0
  185. package/dist/{build/p-add932d6.entry.js → paperless/p-4fb1f39b.entry.js} +2 -2
  186. package/dist/{build/p-5048c4c2.entry.js → paperless/p-50a816b0.entry.js} +2 -2
  187. package/dist/{build/p-8fcf3bb8.entry.js → paperless/p-7b7c60de.entry.js} +2 -2
  188. package/dist/paperless/{p-e2054751.entry.js → p-9e4cbacf.entry.js} +2 -2
  189. package/dist/paperless/p-ad3595e3.entry.js +3 -0
  190. package/dist/paperless/p-ad3595e3.entry.js.map +1 -0
  191. package/dist/paperless/p-b137cbd4.entry.js +2 -0
  192. package/dist/paperless/{p-d6828011.entry.js → p-bb7a5be7.entry.js} +2 -2
  193. package/dist/paperless/{p-2edd87f3.entry.js → p-c3558fb4.entry.js} +2 -2
  194. package/dist/paperless/{p-26a3990a.entry.js → p-c892b87a.entry.js} +2 -2
  195. package/dist/paperless/p-cropper.entry.esm.js.map +1 -1
  196. package/dist/paperless/{p-fa0234e9.entry.js → p-dc5fab19.entry.js} +2 -2
  197. package/dist/{build/p-0875bbbb.entry.js → paperless/p-e596d429.entry.js} +2 -2
  198. package/dist/paperless/{p-d4152f66.entry.js → p-fa78c45a.entry.js} +2 -2
  199. package/dist/paperless/p-range.entry.esm.js.map +1 -0
  200. package/dist/paperless/paperless.esm.js +1 -1
  201. package/dist/sw.js +1 -1
  202. package/dist/sw.js.map +1 -1
  203. package/dist/types/components/{deprecated/molecules → molecules}/cropper/cropper.component.d.ts +2 -6
  204. package/dist/types/components/molecules/range/range.component.d.ts +24 -0
  205. package/dist/types/components.d.ts +66 -10
  206. package/package.json +2 -2
  207. package/dist/build/p-2d60e194.js +0 -2
  208. package/dist/build/p-30f6e463.entry.js +0 -3
  209. package/dist/build/p-30f6e463.entry.js.map +0 -1
  210. package/dist/build/p-474a16ab.entry.js +0 -2
  211. package/dist/build/p-eef52967.entry.js +0 -2
  212. package/dist/collection/components/deprecated/molecules/cropper/cropper.component.css +0 -1
  213. package/dist/collection/components/deprecated/molecules/cropper/cropper.component.js.map +0 -1
  214. package/dist/paperless/p-30f6e463.entry.js +0 -3
  215. package/dist/paperless/p-30f6e463.entry.js.map +0 -1
  216. package/dist/paperless/p-474a16ab.entry.js +0 -2
  217. package/dist/paperless/p-eef52967.entry.js +0 -2
  218. /package/dist/build/{p-c879f50c.entry.js.map → p-0103e9ac.entry.js.map} +0 -0
  219. /package/dist/build/{p-0740b690.entry.js.map → p-133e9259.entry.js.map} +0 -0
  220. /package/dist/build/{p-71666551.entry.js.map → p-213bc400.entry.js.map} +0 -0
  221. /package/dist/build/{p-e33a56c8.entry.js.map → p-219db898.entry.js.map} +0 -0
  222. /package/dist/build/{p-cc3307b8.entry.js.map → p-2da67519.entry.js.map} +0 -0
  223. /package/dist/build/{p-8981247d.entry.js.map → p-302eedc6.entry.js.map} +0 -0
  224. /package/dist/build/{p-474a16ab.entry.js.map → p-32f997e7.entry.js.map} +0 -0
  225. /package/dist/build/{p-add932d6.entry.js.map → p-4fb1f39b.entry.js.map} +0 -0
  226. /package/dist/build/{p-5048c4c2.entry.js.map → p-50a816b0.entry.js.map} +0 -0
  227. /package/dist/build/{p-8fcf3bb8.entry.js.map → p-7b7c60de.entry.js.map} +0 -0
  228. /package/dist/build/{p-e2054751.entry.js.map → p-9e4cbacf.entry.js.map} +0 -0
  229. /package/dist/build/{p-eef52967.entry.js.map → p-b137cbd4.entry.js.map} +0 -0
  230. /package/dist/build/{p-d6828011.entry.js.map → p-bb7a5be7.entry.js.map} +0 -0
  231. /package/dist/build/{p-2edd87f3.entry.js.map → p-c3558fb4.entry.js.map} +0 -0
  232. /package/dist/build/{p-26a3990a.entry.js.map → p-c892b87a.entry.js.map} +0 -0
  233. /package/dist/build/{p-fa0234e9.entry.js.map → p-dc5fab19.entry.js.map} +0 -0
  234. /package/dist/build/{p-0875bbbb.entry.js.map → p-e596d429.entry.js.map} +0 -0
  235. /package/dist/build/{p-d4152f66.entry.js.map → p-fa78c45a.entry.js.map} +0 -0
  236. /package/dist/paperless/{p-c879f50c.entry.js.map → p-0103e9ac.entry.js.map} +0 -0
  237. /package/dist/paperless/{p-0740b690.entry.js.map → p-133e9259.entry.js.map} +0 -0
  238. /package/dist/paperless/{p-71666551.entry.js.map → p-213bc400.entry.js.map} +0 -0
  239. /package/dist/paperless/{p-e33a56c8.entry.js.map → p-219db898.entry.js.map} +0 -0
  240. /package/dist/paperless/{p-cc3307b8.entry.js.map → p-2da67519.entry.js.map} +0 -0
  241. /package/dist/paperless/{p-8981247d.entry.js.map → p-302eedc6.entry.js.map} +0 -0
  242. /package/dist/paperless/{p-474a16ab.entry.js.map → p-32f997e7.entry.js.map} +0 -0
  243. /package/dist/paperless/{p-add932d6.entry.js.map → p-4fb1f39b.entry.js.map} +0 -0
  244. /package/dist/paperless/{p-5048c4c2.entry.js.map → p-50a816b0.entry.js.map} +0 -0
  245. /package/dist/paperless/{p-8fcf3bb8.entry.js.map → p-7b7c60de.entry.js.map} +0 -0
  246. /package/dist/paperless/{p-e2054751.entry.js.map → p-9e4cbacf.entry.js.map} +0 -0
  247. /package/dist/paperless/{p-eef52967.entry.js.map → p-b137cbd4.entry.js.map} +0 -0
  248. /package/dist/paperless/{p-d6828011.entry.js.map → p-bb7a5be7.entry.js.map} +0 -0
  249. /package/dist/paperless/{p-2edd87f3.entry.js.map → p-c3558fb4.entry.js.map} +0 -0
  250. /package/dist/paperless/{p-26a3990a.entry.js.map → p-c892b87a.entry.js.map} +0 -0
  251. /package/dist/paperless/{p-fa0234e9.entry.js.map → p-dc5fab19.entry.js.map} +0 -0
  252. /package/dist/paperless/{p-0875bbbb.entry.js.map → p-e596d429.entry.js.map} +0 -0
  253. /package/dist/paperless/{p-d4152f66.entry.js.map → p-fa78c45a.entry.js.map} +0 -0
@@ -413,11 +413,7 @@ export namespace Components {
413
413
  /**
414
414
  * The image to crop (url or base64)
415
415
  */
416
- "value": any;
417
- /**
418
- * Variant of the image that's being cropped
419
- */
420
- "variant": 'user' | 'company';
416
+ "value": string;
421
417
  }
422
418
  interface PDatepicker {
423
419
  /**
@@ -1287,6 +1283,24 @@ export namespace Components {
1287
1283
  */
1288
1284
  "value": string;
1289
1285
  }
1286
+ interface PRange {
1287
+ /**
1288
+ * The max value of the range
1289
+ */
1290
+ "max": number;
1291
+ /**
1292
+ * The min value of the range
1293
+ */
1294
+ "min": number;
1295
+ /**
1296
+ * The steps to go by
1297
+ */
1298
+ "step": number;
1299
+ /**
1300
+ * The current value of the range
1301
+ */
1302
+ "value": number;
1303
+ }
1290
1304
  interface PSegmentContainer {
1291
1305
  }
1292
1306
  interface PSegmentItem {
@@ -2135,6 +2149,10 @@ export interface PRadioCustomEvent<T> extends CustomEvent<T> {
2135
2149
  detail: T;
2136
2150
  target: HTMLPRadioElement;
2137
2151
  }
2152
+ export interface PRangeCustomEvent<T> extends CustomEvent<T> {
2153
+ detail: T;
2154
+ target: HTMLPRangeElement;
2155
+ }
2138
2156
  export interface PSelectCustomEvent<T> extends CustomEvent<T> {
2139
2157
  detail: T;
2140
2158
  target: HTMLPSelectElement;
@@ -2780,6 +2798,23 @@ declare global {
2780
2798
  prototype: HTMLPRadioElement;
2781
2799
  new (): HTMLPRadioElement;
2782
2800
  };
2801
+ interface HTMLPRangeElementEventMap {
2802
+ "valueChange": string;
2803
+ }
2804
+ interface HTMLPRangeElement extends Components.PRange, HTMLStencilElement {
2805
+ addEventListener<K extends keyof HTMLPRangeElementEventMap>(type: K, listener: (this: HTMLPRangeElement, ev: PRangeCustomEvent<HTMLPRangeElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2806
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2807
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2808
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2809
+ removeEventListener<K extends keyof HTMLPRangeElementEventMap>(type: K, listener: (this: HTMLPRangeElement, ev: PRangeCustomEvent<HTMLPRangeElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2810
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2811
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2812
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2813
+ }
2814
+ var HTMLPRangeElement: {
2815
+ prototype: HTMLPRangeElement;
2816
+ new (): HTMLPRangeElement;
2817
+ };
2783
2818
  interface HTMLPSegmentContainerElement extends Components.PSegmentContainer, HTMLStencilElement {
2784
2819
  }
2785
2820
  var HTMLPSegmentContainerElement: {
@@ -3081,6 +3116,7 @@ declare global {
3081
3116
  "p-portal": HTMLPPortalElement;
3082
3117
  "p-profile": HTMLPProfileElement;
3083
3118
  "p-radio": HTMLPRadioElement;
3119
+ "p-range": HTMLPRangeElement;
3084
3120
  "p-segment-container": HTMLPSegmentContainerElement;
3085
3121
  "p-segment-item": HTMLPSegmentItemElement;
3086
3122
  "p-select": HTMLPSelectElement;
@@ -3513,11 +3549,7 @@ declare namespace LocalJSX {
3513
3549
  /**
3514
3550
  * The image to crop (url or base64)
3515
3551
  */
3516
- "value"?: any;
3517
- /**
3518
- * Variant of the image that's being cropped
3519
- */
3520
- "variant"?: 'user' | 'company';
3552
+ "value"?: string;
3521
3553
  }
3522
3554
  interface PDatepicker {
3523
3555
  /**
@@ -4476,6 +4508,28 @@ declare namespace LocalJSX {
4476
4508
  */
4477
4509
  "value"?: string;
4478
4510
  }
4511
+ interface PRange {
4512
+ /**
4513
+ * The max value of the range
4514
+ */
4515
+ "max"?: number;
4516
+ /**
4517
+ * The min value of the range
4518
+ */
4519
+ "min"?: number;
4520
+ /**
4521
+ * Event whenever the value changes
4522
+ */
4523
+ "onValueChange"?: (event: PRangeCustomEvent<string>) => void;
4524
+ /**
4525
+ * The steps to go by
4526
+ */
4527
+ "step"?: number;
4528
+ /**
4529
+ * The current value of the range
4530
+ */
4531
+ "value"?: number;
4532
+ }
4479
4533
  interface PSegmentContainer {
4480
4534
  }
4481
4535
  interface PSegmentItem {
@@ -5413,6 +5467,7 @@ declare namespace LocalJSX {
5413
5467
  "p-portal": PPortal;
5414
5468
  "p-profile": PProfile;
5415
5469
  "p-radio": PRadio;
5470
+ "p-range": PRange;
5416
5471
  "p-segment-container": PSegmentContainer;
5417
5472
  "p-segment-item": PSegmentItem;
5418
5473
  "p-select": PSelect;
@@ -5498,6 +5553,7 @@ declare module "@stencil/core" {
5498
5553
  "p-portal": LocalJSX.PPortal & JSXBase.HTMLAttributes<HTMLPPortalElement>;
5499
5554
  "p-profile": LocalJSX.PProfile & JSXBase.HTMLAttributes<HTMLPProfileElement>;
5500
5555
  "p-radio": LocalJSX.PRadio & JSXBase.HTMLAttributes<HTMLPRadioElement>;
5556
+ "p-range": LocalJSX.PRange & JSXBase.HTMLAttributes<HTMLPRangeElement>;
5501
5557
  "p-segment-container": LocalJSX.PSegmentContainer & JSXBase.HTMLAttributes<HTMLPSegmentContainerElement>;
5502
5558
  "p-segment-item": LocalJSX.PSegmentItem & JSXBase.HTMLAttributes<HTMLPSegmentItemElement>;
5503
5559
  "p-select": LocalJSX.PSelect & JSXBase.HTMLAttributes<HTMLPSelectElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "2.0.1-beta.151",
3
+ "version": "2.0.1-beta.152",
4
4
  "description": "Stencil Component Starter",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -41,7 +41,7 @@
41
41
  "@stencil/core": "4.29.3",
42
42
  "class-variance-authority": "^0.7.1",
43
43
  "clsx": "^2.1.1",
44
- "cropperjs": "^2.0.0-beta.4",
44
+ "cropperjs": "^2.0.0",
45
45
  "date-fns": "2.30.0",
46
46
  "rxjs": "^7.5.5",
47
47
  "tailwind-merge": "^3.0.1",
@@ -1,2 +0,0 @@
1
- import{p as e,b as a}from"./p-DhGo7hbh.js";export{s as setNonce}from"./p-DhGo7hbh.js";import{g as t}from"./p-DQuL1Twl.js";var o=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};o().then((async e=>{await t();return a(JSON.parse('[["p-ee5222ce",[[4,"p-button",{"label":[1],"as":[1],"variant":[1],"active":[4],"error":[4],"underline":[4],"href":[1],"target":[1],"size":[1],"type":[1],"loading":[4],"chevron":[8],"chevronPosition":[1,"chevron-position"],"disabled":[4],"icon":[1],"iconOnly":[4,"icon-only"],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"inheritText":[4,"inherit-text"],"buttonGroupPosition":[1,"button-group-position"],"class":[1]},[[2,"click","handleClick"]]],[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}],[1,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-c74c4740",[[4,"p-table",{"items":[1],"loading":[4],"headerLoading":[4,"header-loading"],"footerLoading":[4,"footer-loading"],"amountOfLoadingRows":[2,"amount-of-loading-rows"],"enableRowSelection":[4,"enable-row-selection"],"rowSelectionLimit":[2,"row-selection-limit"],"enableRowClick":[4,"enable-row-click"],"selectedRows":[16,"selected-rows"],"enableFloatingMenu":[4,"enable-floating-menu"],"floatingMenuAmountSelectedTemplate":[16,"floating-menu-amount-selected-template"],"selectionKey":[1,"selection-key"],"canSelectKey":[1,"can-select-key"],"enableHeader":[4,"enable-header"],"quickFilters":[16,"quick-filters"],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"enableSearch":[4,"enable-search"],"query":[1025],"enableFilter":[4,"enable-filter"],"enableFilterDesktop":[4,"enable-filter-desktop"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16,"filter-button-template"],"enableAction":[4,"enable-action"],"actionButtonLoading":[4,"action-button-loading"],"actionButtonEnabled":[4,"action-button-enabled"],"actionButtonIcon":[1,"action-button-icon"],"actionButtonText":[1,"action-button-text"],"actionButtonTemplate":[16,"action-button-template"],"enableFooter":[4,"enable-footer"],"enablePaginationSize":[4,"enable-pagination-size"],"enablePaginationPages":[4,"enable-pagination-pages"],"enableExport":[4,"enable-export"],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16,"page-size-options"],"hideOnSinglePage":[4,"hide-on-single-page"],"emptyStateHeader":[16,"empty-state-header"],"emptyStateContent":[16,"empty-state-content"],"emptyStateAction":[16,"empty-state-action"],"enableEmptyStateAction":[4,"enable-empty-state-action"],"emptyStateFilteredHeader":[16,"empty-state-filtered-header"],"emptyStateFilteredContent":[16,"empty-state-filtered-content"],"shadow":[4],"_locales":[32],"_columns":[32],"_items":[32],"_enableRowSelection":[32],"_rowSelectionLimit":[32],"_rowActionsFloating":[32],"_rowActionsRow":[32],"_footerHidden":[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"],[9,"resize","_setRowSelectionData"]],{"items":["_parseItems"],"enableRowSelection":["_setRowSelectionData"],"rowSelectionLimit":["_setRowSelectionData"],"selectedRows":["_setRowSelectionData"]}]]],["p-fa0234e9",[[64,"p-select",{"items":[1],"multi":[516],"usePortal":[4,"use-portal"],"strategy":[1],"icon":[1],"query":[1],"placeholder":[1],"autocompletePlaceholder":[1,"autocomplete-placeholder"],"value":[8],"displayKey":[1,"display-key"],"dropdownDisplayKey":[1,"dropdown-display-key"],"selectionDisplayKey":[1,"selection-display-key"],"valueKey":[1,"value-key"],"avatarKey":[1,"avatar-key"],"iconKey":[1,"icon-key"],"showIconOnSelectedItem":[1,"show-icon-on-selected-item"],"classKey":[1,"class-key"],"applyClassOnSelectedItem":[1,"apply-class-on-selected-item"],"avatarLettersKey":[1,"avatar-letters-key"],"identifierKey":[1,"identifier-key"],"queryKey":[1,"query-key"],"autoSelectFirst":[4,"auto-select-first"],"showChevron":[4,"show-chevron"],"maxDisplayedItems":[2,"max-displayed-items"],"enableAutocomplete":[4,"enable-autocomplete"],"asyncFilter":[4,"async-filter"],"loading":[4],"enableSelectAll":[4,"enable-select-all"],"selectAllText":[1,"select-all-text"],"selectAllIcon":[1,"select-all-icon"],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"showAddItem":[4,"show-add-item"],"addItemText":[1,"add-item-text"],"emptyStateText":[1,"empty-state-text"],"_showDropdown":[32],"_selectedItem":[32],"_allSelected":[32],"_amountHidden":[32]},[[6,"click","documentClickHandler"]],{"value":["_valueChange"],"items":["itemChanges"],"_showDropdown":["_showDropdownChanges"],"multi":["multiChanges"]}]]],["p-5048c4c2",[[64,"p-datepicker",{"placeholder":[1],"value":[1],"preselectToday":[4,"preselect-today"],"enableNativePicker":[4,"enable-native-picker"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"format":[1],"hideIconWhenFilled":[4,"hide-icon-when-filled"],"size":[1],"prefix":[1],"label":[1],"loading":[4],"helper":[1],"required":[516],"error":[513],"disabled":[516],"strategy":[1],"placement":[513],"_showDropdown":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32],"_isMobileBrowser":[32]},[[6,"click","documentClickHandler"]],{"value":["parseValue"],"minDate":["parseMinDate"],"maxDate":["parseMaxDate"],"disabledDates":["parseDisabledDates"]}]]],["p-00e39694",[[1,"p-modal",{"size":[1],"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"showMobileFooter":[4,"show-mobile-footer"],"backdropClickClose":[4,"backdrop-click-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeModal","handleCloseModal"]]]]],["p-9c277029",[[1,"p-drawer",{"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"backdropClickClose":[4,"backdrop-click-close"],"canClose":[4,"can-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeDrawer","handleCloseDrawer"],[8,"forceCloseDrawer","handleForceCloseDrawer"]]]]],["p-0875bbbb",[[1,"p-attachment",{"enableCameraOnMobile":[4,"enable-camera-on-mobile"],"value":[1],"fileId":[1,"file-id"],"accept":[1],"label":[1],"helper":[1],"required":[516],"mode":[1],"placeholder":[1],"cameraTooltip":[1,"camera-tooltip"],"downloadTooltip":[1,"download-tooltip"],"uploadTooltip":[1,"upload-tooltip"],"deleteTooltip":[1,"delete-tooltip"],"loading":[4],"error":[1]}]]],["p-856f3266",[[1,"p-profile",{"dropdownLocation":[1,"dropdown-location"],"_dropdownOpen":[32],"_hasDropdownSlot":[32]},[[0,"slotchange","slotchange"]]]]],["p-e2054751",[[1,"p-navbar",{"_show":[32]},[[8,"closeNavbar","handleCloseNavbar"],[8,"openNavbar","handleOpenNavbar"]]]]],["p-0f468b1a",[[1,"p-card-header",{"variant":[1],"header":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}]]],["p-2edd87f3",[[4,"p-navigation-item",{"icon":[1],"active":[4],"loading":[4],"as":[1],"counter":[8],"href":[1],"target":[1],"class":[1]}]]],["p-cc3307b8",[[1,"p-toast",{"variant":[1],"header":[1],"content":[1],"enableAction":[4,"enable-action"],"actionIcon":[1,"action-icon"],"actionIconFlip":[1,"action-icon-flip"],"actionIconRotate":[2,"action-icon-rotate"]}]]],["p-e33a56c8",[[1,"p-accordion",{"variant":[1],"header":[1],"open":[4],"closeable":[4],"openable":[4]}]]],["p-45948742",[[1,"p-stepper",{"steps":[1],"activeStep":[2,"active-step"],"enableAutoStatus":[4,"enable-auto-status"],"direction":[1],"align":[1],"contentPosition":[1,"content-position"],"_generatedOnce":[32],"_loaded":[32]},null,{"align":["_onAlignChange"],"direction":["_onDirectionChange"],"activeStep":["_onActiveStepChange"]}]]],["p-30f6e463",[[1,"p-cropper",{"variant":[513],"value":[8],"returnType":[1,"return-type"],"_loaded":[32],"_currentScale":[32]},[[9,"resize","onResize"]]]]],["p-098720f9",[[1,"p-info-panel",{"variant":[1],"header":[1],"content":[1],"closeable":[4]}]]],["p-26a3990a",[[1,"p-label",{"variant":[513],"iconOnly":[516,"icon-only"],"icon":[513],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"keepMobileContent":[516,"keep-mobile-content"]}]]],["p-d4152f66",[[1,"p-listing",{"_generatedOnce":[32]}]]],["p-abd13a2a",[[1,"p-listing-item",{"icon":[1]}]]],["p-474a16ab",[[4,"p-navigation-section",{"header":[1]}]]],["p-08cff47b",[[1,"p-tab-container"]]],["p-5451207c",[[4,"p-avatar-group",{"extra":[2]}]]],["p-d6828011",[[1,"p-button-group",{"size":[1]},[[0,"slotchange","slotchange"]]]]],["p-1a544806",[[1,"p-card-body"]]],["p-87c300c8",[[1,"p-card-container",{"variant":[1],"active":[4],"hoverable":[4],"shadow":[4]}]]],["p-0740b690",[[1,"p-content-slider",{"hideMobileIndicator":[4,"hide-mobile-indicator"],"disableDrag":[4,"disable-drag"],"disableAutoCenter":[4,"disable-auto-center"],"disableIndicatorClick":[4,"disable-indicator-click"],"_visibleIndex":[32],"_outerHeight":[32],"_totalWidth":[32],"_dragging":[32]},[[9,"mouseup","mouseUpHandler"],[9,"touchend","mouseUpHandler"],[9,"resize","resizeHandler"]]]]],["p-01a2b5af",[[1,"p-iban-icon",{"iban":[513],"variant":[513]}]]],["p-0fe51ad0",[[0,"p-illustration-deprecated",{"variant":[1]}]]],["p-9409dfd7",[[1,"p-layout",{"variant":[1]}]]],["p-3d341a83",[[68,"p-radio",{"value":[1],"disabled":[516],"required":[516],"id":[513],"name":[513],"checked":[516],"_nonce":[32]}]]],["p-561cd302",[[1,"p-tab-item",{"active":[4]}]]],["p-4c81bb03",[[0,"p-table-column",{"path":[1537],"type":[1537],"name":[1537],"useSlot":[1540,"use-slot"],"hasCheckbox":[1540,"has-checkbox"],"align":[1537],"parsedSizes":[1040,"parsed-sizes"],"sizes":[1032]}]]],["p-37bdbb19",[[0,"p-table-row-action",{"type":[1537],"icon":[1],"iconOnly":[4,"icon-only"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"label":[1],"action":[16],"disabled":[4],"loading":[4],"showFunction":[16,"show-function"]}]]],["p-a5f29193",[[1,"p-toast-container",{"placement":[1]}]]],["p-41e620ae",[[68,"p-toggle",{"checked":[4],"disabled":[516],"required":[516],"id":[513],"name":[513],"_nonce":[32]}]]],["p-c879f50c",[[0,"p-calendar",{"variant":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"_view":[32],"_viewDate":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},null,{"value":["_parseValue"],"minDate":["_parseMinDate"],"maxDate":["_parseMaxDate"],"disabledDates":["_parseDisabledDates"]}]]],["p-8249382f",[[0,"p-avatar",{"size":[513],"defaultImage":[1,"default-image"],"src":[1],"letters":[1],"_src":[32],"_failed":[32]},null,{"src":["onSrchChange"]}]]],["p-868f9ee9",[[1,"p-listing-line"]]],["p-7ddf5875",[[1,"p-navigation-title"]]],["p-42ae8573",[[1,"p-stepper-item",{"number":[2],"align":[1],"contentPosition":[1,"content-position"],"finished":[4],"active":[4]}],[1,"p-stepper-line",{"active":[516],"direction":[513]}]]],["p-05afbc63",[[0,"p-illustration",{"variant":[1]}]]],["p-a48262c6",[[1,"p-drawer-header",{"showClose":[4,"show-close"]}],[1,"p-drawer-body"],[1,"p-drawer-container",{"closing":[4]}]]],["p-5fa74e2e",[[1,"p-backdrop",{"variant":[1],"applyBlur":[4,"apply-blur"],"closing":[4],"scrollLock":[4,"scroll-lock"],"class":[1]},[[2,"click","handleClick"]]]]],["p-d18ee52f",[[1,"p-modal-header",{"showClose":[4,"show-close"]}],[1,"p-modal-footer"],[1,"p-modal-body",{"roundedBottom":[4,"rounded-bottom"],"roundedTop":[4,"rounded-top"]}],[1,"p-modal-container",{"size":[1],"closing":[4]}]]],["p-52149e0e",[[4,"p-pagination-pages-item",{"variant":[1],"active":[4],"hover":[4],"disabled":[4]}]]],["p-1778732a",[[0,"p-smile",{"variant":[1]}]]],["p-e0f3894d",[[4,"p-segment-item",{"variant":[1],"active":[4],"iconOnly":[4,"icon-only"],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-segment-container"],[1,"p-badge"]]],["p-9674eb14",[[4,"p-divider",{"variant":[513]}]]],["p-eef52967",[[4,"p-portal"]]],["p-add932d6",[[1,"p-dropdown-menu-item",{"active":[4],"checkbox":[4],"variant":[1],"enableHover":[4,"enable-hover"],"disabled":[4],"icon":[1],"iconWave":[4,"icon-wave"],"useContainer":[4,"use-container"]}],[68,"p-checkbox",{"checked":[4],"indeterminate":[4],"disabled":[516],"required":[516],"id":[513],"name":[513],"_nonce":[32]}],[1,"p-dropdown",{"variant":[1],"placement":[513],"offset":[2],"strategy":[1],"show":[4],"usePortal":[4,"use-portal"],"calculateWidth":[4,"calculate-width"],"applyMaxWidth":[4,"apply-max-width"],"applyFullWidth":[4,"apply-full-width"],"allowOverflow":[4,"allow-overflow"],"scrollable":[8],"insideClick":[4,"inside-click"],"disableTriggerClick":[4,"disable-trigger-click"],"applyChevron":[4,"apply-chevron"],"chevronPosition":[1,"chevron-position"],"chevronDirection":[1,"chevron-direction"]},[[6,"click","documentClickHandler"]],{"show":["onShowChange"]}],[1,"p-dropdown-menu-container",{"variant":[1],"maxWidth":[4,"max-width"],"class":[1],"fullWidth":[4,"full-width"],"allowOverflow":[4,"allow-overflow"],"scrollable":[8]}]]],["p-8981247d",[[0,"p-pagination",{"hideOnSinglePage":[4,"hide-on-single-page"],"enablePaginationSize":[4,"enable-pagination-size"],"enablePaginationPages":[4,"enable-pagination-pages"],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16,"page-size-options"],"_hasPaginationPages":[32]}],[1,"p-pagination-size",{"size":[1538],"sizeOptions":[16,"size-options"],"itemTemplate":[16,"item-template"],"hidden":[4],"dropdownIsOpen":[32],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[0,"p-pagination-pages",{"page":[1538],"pageSize":[2,"page-size"],"hideOnSinglePage":[4,"hide-on-single-page"],"total":[2]},null,{"page":["pageChangeHandler"],"pageSize":["pageChangeHandler"],"total":["pageChangeHandler"]}]]],["p-4b479552",[[1,"p-helper",{"strategy":[1],"placement":[1]}],[1,"p-tooltip",{"variant":[1],"content":[8],"placement":[1],"offset":[2],"strategy":[1],"enableUserInput":[4,"enable-user-input"],"show":[4],"usePortal":[4,"use-portal"],"canManuallyClose":[4,"can-manually-close"]},[[2,"click","clickHandler"],[6,"click","documentClickHandler"],[1,"mouseenter","mouseEnterHandler"],[0,"focus","mouseEnterHandler"],[1,"mouseleave","mouseLeaveHandler"],[0,"blur","mouseLeaveHandler"]],{"show":["onShowChange"]}]]],["p-8fcf3bb8",[[65,"p-field",{"align":[1],"variant":[1],"id":[1],"size":[1],"type":[1],"properties":[8],"prefix":[1],"suffix":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"iconPosition":[1,"icon-position"],"value":[1],"label":[1],"loading":[4],"placeholder":[1],"helper":[1],"required":[516],"autofocus":[516],"error":[513],"errorPlacement":[1,"error-placement"],"disabled":[516],"focused":[516],"forceShowTooltip":[516,"force-show-tooltip"],"selectAllOnFocus":[516,"select-all-on-focus"],"focusMethod":[1,"focus-method"],"optionalTemplate":[16,"optional-template"],"_focused":[32],"_nonce":[32]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[2,"keyup","handleKeyup"]]],[1,"p-field-container",{"id":[1],"align":[1],"label":[1],"loading":[4],"loadingSize":[1,"loading-size"],"variant":[1],"helper":[1],"required":[516],"error":[513],"errorPlacement":[1,"error-placement"],"forceShowTooltip":[516,"force-show-tooltip"],"optionalTemplate":[16,"optional-template"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]]]],["p-71666551",[[1,"p-table-header",{"quickFilters":[16,"quick-filters"],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"loading":[4],"enableSearch":[4,"enable-search"],"itemsSelectedAmount":[2,"items-selected-amount"],"query":[1025],"enableFilter":[4,"enable-filter"],"enableExport":[4,"enable-export"],"enableFilterDesktop":[4,"enable-filter-desktop"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16,"filter-button-template"],"enableAction":[4,"enable-action"],"actionLoading":[4,"action-loading"],"actionIcon":[1,"action-icon"],"actionText":[1,"action-text"],"canUseAction":[1028,"can-use-action"],"actionButtonTemplate":[16,"action-button-template"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[1,"p-table-footer",{"enablePaginationSize":[4,"enable-pagination-size"],"enablePaginationPages":[4,"enable-pagination-pages"],"loading":[4],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16,"page-size-options"],"hideOnSinglePage":[4,"hide-on-single-page"],"_isPinned":[32],"_hasPaginationPages":[32]},[[9,"scroll","onScroll"]]],[1,"p-empty-state",{"illustration":[8],"header":[1],"content":[1],"enableAction":[4,"enable-action"],"actionText":[1,"action-text"],"actionVariant":[1,"action-variant"],"actionIcon":[1,"action-icon"],"actionLoading":[4,"action-loading"]}],[1,"p-floating-menu-container",{"usedInTable":[4,"used-in-table"],"enableAmountSelected":[4,"enable-amount-selected"],"amount":[2],"enableClose":[4,"enable-close"],"amountSelectedTemplate":[16,"amount-selected-template"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[4,"p-floating-menu-item",{"hover":[4],"disabled":[4],"loading":[4],"icon":[1],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-table-cell",{"variant":[1],"index":[2],"rowIndex":[2,"row-index"],"definition":[16],"item":[8],"value":[8],"checkbox":[8],"template":[16]}],[1,"p-table-row",{"variant":[1],"enableHover":[4,"enable-hover"],"checked":[4]}],[4,"p-table-container"],[1,"p-table-row-actions-container"]]]]'),e)}));
2
- //# sourceMappingURL=paperless.esm.js.map
@@ -1,3 +0,0 @@
1
- import{r as t,c as s,h as i,H as e}from"./p-DhGo7hbh.js";import{c as n}from"./p-ChV9xqsO.js";const h=typeof window!=="undefined"&&typeof window.document!=="undefined";const o=h?window:{};const r=h?"ontouchstart"in o.document.documentElement:false;const a=h?"PointerEvent"in o:false;const c="cropper";const l=`${c}-canvas`;const f=`${c}-crosshair`;const u=`${c}-grid`;const d=`${c}-handle`;const p=`${c}-image`;const b=`${c}-selection`;const m=`${c}-shade`;const g=`${c}-viewer`;const w="select";const v="move";const $="scale";const k="rotate";const y="transform";const x="none";const z="n-resize";const M="e-resize";const C="s-resize";const A="w-resize";const j="ne-resize";const O="nw-resize";const S="se-resize";const T="sw-resize";const E="action";const I=r?"touchend touchcancel":"mouseup";const N=r?"touchmove":"mousemove";const _=r?"touchstart":"mousedown";const R=a?"pointerdown":_;const X=a?"pointermove":N;const Y=a?"pointerup pointercancel":I;const P="error";const W="keydown";const D="load";const L="wheel";const H="action";const U="actionend";const B="actionmove";const F="actionstart";const q="change";const G="transform";function K(t){return typeof t==="string"}const V=Number.isNaN||o.isNaN;function Z(t){return typeof t==="number"&&!V(t)}function J(t){return Z(t)&&t>0&&t<Infinity}function Q(t){return typeof t==="undefined"}function tt(t){return typeof t==="object"&&t!==null}const{hasOwnProperty:st}=Object.prototype;function it(t){if(!tt(t)){return false}try{const{constructor:s}=t;const{prototype:i}=s;return s&&i&&st.call(i,"isPrototypeOf")}catch(t){return false}}function et(t){return typeof t==="function"}function nt(t){return typeof t==="object"&&t!==null&&t.nodeType===1}const ht=/([a-z\d])([A-Z])/g;function ot(t){return String(t).replace(ht,"$1-$2").toLowerCase()}const rt=/-[A-z\d]/g;function at(t){return t.replace(rt,(t=>t.slice(1).toUpperCase()))}const ct=/\s\s*/;function lt(t,s,i,e){s.trim().split(ct).forEach((s=>{t.removeEventListener(s,i,e)}))}function ft(t,s,i,e){s.trim().split(ct).forEach((s=>{t.addEventListener(s,i,e)}))}function ut(t,s,i,e){ft(t,s,i,Object.assign(Object.assign({},e),{once:true}))}const dt={bubbles:true,cancelable:true,composed:true};function pt(t,s,i,e){return t.dispatchEvent(new CustomEvent(s,Object.assign(Object.assign(Object.assign({},dt),{detail:i}),e)))}const bt=Promise.resolve();function mt(t,s){return s?bt.then(t?s.bind(t):s):bt}function gt(t){const{documentElement:s}=t.ownerDocument;const i=t.getBoundingClientRect();return{left:i.left+(o.pageXOffset-s.clientLeft),top:i.top+(o.pageYOffset-s.clientTop)}}const wt=/deg|g?rad|turn$/i;function vt(t){const s=parseFloat(t)||0;if(s!==0){const[i="rad"]=String(t).match(wt)||[];switch(i.toLowerCase()){case"deg":return s/360*(Math.PI*2);case"grad":return s/400*(Math.PI*2);case"turn":return s*(Math.PI*2)}}return s}const $t="contain";const kt="cover";function yt(t,s=$t){const{aspectRatio:i}=t;let{width:e,height:n}=t;const h=J(e);const o=J(n);if(h&&o){const t=n*i;if(s===$t&&t>e||s===kt&&t<e){n=e/i}else{e=n*i}}else if(h){n=e/i}else if(o){e=n*i}return{width:e,height:n}}function xt(t,...s){if(s.length===0){return t}const[i,e,n,h,o,r]=t;const[a,c,l,f,u,d]=s[0];t=[i*a+n*c,e*a+h*c,i*l+n*f,e*l+h*f,i*u+n*d+o,e*u+h*d+r];return xt(t,...s.slice(1))}var zt=`:host([hidden]){display:none!important}`;const Mt=/left|top|width|height/i;const Ct="open";const At=new WeakMap;const jt=new WeakMap;const Ot=new Map;const St=o.document&&Array.isArray(o.document.adoptedStyleSheets)&&"replaceSync"in o.CSSStyleSheet.prototype;class Tt extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${zt}`}constructor(){var t,s;super();this.shadowRootMode=Ct;this.slottable=true;const i=(s=(t=Object.getPrototypeOf(this))===null||t===void 0?void 0:t.constructor)===null||s===void 0?void 0:s.$name;if(i){Ot.set(i,this.tagName.toLowerCase())}}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(t,s,i){if(Object.is(i,s)){return}const e=at(t);const n=this[e];let h=i;switch(typeof n){case"boolean":h=i!==null&&i!=="false";break;case"number":h=Number(i);break}this[e]=h;switch(t){case"theme-color":{const t=jt.get(this);const s=this.$sharedStyle;if(t&&s){if(St){t.replaceSync(s)}else{t.textContent=s}}break}}}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}t=ot(t);switch(typeof i){case"boolean":if(i===true){if(!this.hasAttribute(t)){this.setAttribute(t,"")}}else{this.removeAttribute(t)}break;case"number":if(V(i)){i=""}else{i=String(i)}default:if(i){if(this.getAttribute(t)!==i){this.setAttribute(t,i)}}else{this.removeAttribute(t)}}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach((t=>{const s=at(t);let i=this[s];if(!Q(i)){this.$propertyChangedCallback(s,undefined,i)}Object.defineProperty(this,s,{enumerable:true,configurable:true,get(){return i},set(t){const e=i;i=t;this.$propertyChangedCallback(s,e,t)}})}));const t=this.attachShadow({mode:this.shadowRootMode||Ct});if(!this.shadowRoot){At.set(this,t)}jt.set(this,this.$addStyles(this.$sharedStyle));if(this.$style){this.$addStyles(this.$style)}if(this.$template){const s=document.createElement("template");s.innerHTML=this.$template;t.appendChild(s.content)}if(this.slottable){const s=document.createElement("slot");t.appendChild(s)}}disconnectedCallback(){if(jt.has(this)){jt.delete(this)}if(At.has(this)){At.delete(this)}}$getTagNameOf(t){var s;return(s=Ot.get(t))!==null&&s!==void 0?s:t}$setStyles(t){Object.keys(t).forEach((s=>{let i=t[s];if(Z(i)){if(i!==0&&Mt.test(s)){i=`${i}px`}else{i=String(i)}}this.style[s]=i}));return this}$getShadowRoot(){return this.shadowRoot||At.get(this)}$addStyles(t){let s;const i=this.$getShadowRoot();if(St){s=new CSSStyleSheet;s.replaceSync(t);i.adoptedStyleSheets=i.adoptedStyleSheets.concat(s)}else{s=document.createElement("style");s.textContent=t;i.appendChild(s)}return s}$emit(t,s,i){return pt(this,t,s,i)}$nextTick(t){return mt(this,t)}static $define(t,s){if(tt(t)){s=t;t=""}if(!t){t=this.$name||this.name}t=ot(t);if(h&&o.customElements&&!o.customElements.get(t)){customElements.define(t,this,s)}}}Tt.$version="2.0.0";var Et=`:host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}`;class It extends Tt{constructor(){super(...arguments);this.$onPointerDown=null;this.$onPointerMove=null;this.$onPointerUp=null;this.$onWheel=null;this.$wheeling=false;this.$pointers=new Map;this.$style=Et;this.$action=x;this.background=false;this.disabled=false;this.scaleStep=.1;this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback();if(!this.disabled){this.$bind()}}disconnectedCallback(){if(!this.disabled){this.$unbind()}super.disconnectedCallback()}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"disabled":if(i){this.$unbind()}else{this.$bind()}break}}$bind(){if(!this.$onPointerDown){this.$onPointerDown=this.$handlePointerDown.bind(this);ft(this,R,this.$onPointerDown)}if(!this.$onPointerMove){this.$onPointerMove=this.$handlePointerMove.bind(this);ft(this.ownerDocument,X,this.$onPointerMove)}if(!this.$onPointerUp){this.$onPointerUp=this.$handlePointerUp.bind(this);ft(this.ownerDocument,Y,this.$onPointerUp)}if(!this.$onWheel){this.$onWheel=this.$handleWheel.bind(this);ft(this,L,this.$onWheel,{passive:false,capture:true})}}$unbind(){if(this.$onPointerDown){lt(this,R,this.$onPointerDown);this.$onPointerDown=null}if(this.$onPointerMove){lt(this.ownerDocument,X,this.$onPointerMove);this.$onPointerMove=null}if(this.$onPointerUp){lt(this.ownerDocument,Y,this.$onPointerUp);this.$onPointerUp=null}if(this.$onWheel){lt(this,L,this.$onWheel,{capture:true});this.$onWheel=null}}$handlePointerDown(t){const{buttons:s,button:i,type:e}=t;if(this.disabled||(e==="pointerdown"&&t.pointerType==="mouse"||e==="mousedown")&&(Z(s)&&s!==1||Z(i)&&i!==0||t.ctrlKey)){return}const{$pointers:n}=this;let h="";if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t,pageX:s,pageY:i})=>{n.set(t,{startX:s,startY:i,endX:s,endY:i})}))}else{const{pointerId:s=0,pageX:i,pageY:e}=t;n.set(s,{startX:i,startY:e,endX:i,endY:e})}if(n.size>1){h=y}else if(nt(t.target)){h=t.target.action||t.target.getAttribute(E)||""}if(this.$emit(F,{action:h,relatedEvent:t})===false){return}t.preventDefault();this.$action=h;this.style.willChange="transform"}$handlePointerMove(t){const{$action:s,$pointers:i}=this;if(this.disabled||s===x||i.size===0){return}if(this.$emit(B,{action:s,relatedEvent:t})===false){return}t.preventDefault();if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t,pageX:s,pageY:e})=>{const n=i.get(t);if(n){Object.assign(n,{endX:s,endY:e})}}))}else{const{pointerId:s=0,pageX:e,pageY:n}=t;const h=i.get(s);if(h){Object.assign(h,{endX:e,endY:n})}}const e={action:s,relatedEvent:t};if(s===y){const s=new Map(i);let n=0;let h=0;let o=0;let r=0;let a=t.pageX;let c=t.pageY;i.forEach(((t,i)=>{s.delete(i);s.forEach((s=>{let i=s.startX-t.startX;let e=s.startY-t.startY;let l=s.endX-t.endX;let f=s.endY-t.endY;let u=0;let d=0;let p=0;let b=0;if(i===0){if(e<0){p=Math.PI*2}else if(e>0){p=Math.PI}}else if(i>0){p=Math.PI/2+Math.atan(e/i)}else if(i<0){p=Math.PI*1.5+Math.atan(e/i)}if(l===0){if(f<0){b=Math.PI*2}else if(f>0){b=Math.PI}}else if(l>0){b=Math.PI/2+Math.atan(f/l)}else if(l<0){b=Math.PI*1.5+Math.atan(f/l)}if(b>0||p>0){const i=b-p;const e=Math.abs(i);if(e>n){n=e;o=i;a=(t.startX+s.startX)/2;c=(t.startY+s.startY)/2}}i=Math.abs(i);e=Math.abs(e);l=Math.abs(l);f=Math.abs(f);if(i>0&&e>0){u=Math.sqrt(i*i+e*e)}else if(i>0){u=i}else if(e>0){u=e}if(l>0&&f>0){d=Math.sqrt(l*l+f*f)}else if(l>0){d=l}else if(f>0){d=f}if(u>0&&d>0){const i=(d-u)/u;const e=Math.abs(i);if(e>h){h=e;r=i;a=(t.startX+s.startX)/2;c=(t.startY+s.startY)/2}}}))}));const l=n>0;const f=h>0;if(l&&f){e.rotate=o;e.scale=r;e.centerX=a;e.centerY=c}else if(l){e.action=k;e.rotate=o;e.centerX=a;e.centerY=c}else if(f){e.action=$;e.scale=r;e.centerX=a;e.centerY=c}else{e.action=x}}else{const[t]=Array.from(i.values());Object.assign(e,t)}i.forEach((t=>{t.startX=t.endX;t.startY=t.endY}));if(e.action!==x){this.$emit(H,e,{cancelable:false})}}$handlePointerUp(t){const{$action:s,$pointers:i}=this;if(this.disabled||s===x){return}if(this.$emit(U,{action:s,relatedEvent:t})===false){return}t.preventDefault();if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t})=>{i.delete(t)}))}else{const{pointerId:s=0}=t;i.delete(s)}if(i.size===0){this.style.willChange="";this.$action=x}}$handleWheel(t){if(this.disabled){return}t.preventDefault();if(this.$wheeling){return}this.$wheeling=true;setTimeout((()=>{this.$wheeling=false}),50);const s=t.deltaY>0?-1:1;const i=s*this.scaleStep;this.$emit(H,{action:$,scale:i,relatedEvent:t},{cancelable:false})}$setAction(t){if(K(t)){this.$action=t}return this}$toCanvas(t){return new Promise(((s,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const e=document.createElement("canvas");let n=this.offsetWidth;let h=this.offsetHeight;let o=1;if(it(t)&&(J(t.width)||J(t.height))){({width:n,height:h}=yt({aspectRatio:n/h,width:t.width,height:t.height}));o=n/this.offsetWidth}e.width=n;e.height=h;const r=this.querySelector(this.$getTagNameOf(p));if(!r){s(e);return}r.$ready().then((i=>{const a=e.getContext("2d");if(a){const[s,c,l,f,u,d]=r.$getTransform();let p=u;let b=d;let m=i.naturalWidth;let g=i.naturalHeight;if(o!==1){p*=o;b*=o;m*=o;g*=o}const w=m/2;const v=g/2;a.fillStyle="transparent";a.fillRect(0,0,n,h);if(it(t)&&et(t.beforeDraw)){t.beforeDraw.call(this,a,e)}a.save();a.translate(w,v);a.transform(s,c,l,f,p,b);a.translate(-w,-v);a.drawImage(i,0,0,m,g);a.restore()}s(e)})).catch(i)}))}}It.$name=l;It.$version="2.0.0";var Nt=`:host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}`;const _t=new WeakMap;const Rt=["alt","crossorigin","decoding","importance","loading","referrerpolicy","sizes","src","srcset"];class Xt extends Tt{constructor(){super(...arguments);this.$matrix=[1,0,0,1,0,0];this.$onLoad=null;this.$onCanvasAction=null;this.$onCanvasActionEnd=null;this.$onCanvasActionStart=null;this.$actionStartTarget=null;this.$style=Nt;this.$image=new Image;this.initialCenterSize="contain";this.rotatable=false;this.scalable=false;this.skewable=false;this.slottable=false;this.translatable=false}set $canvas(t){_t.set(this,t)}get $canvas(){return _t.get(this)}static get observedAttributes(){return super.observedAttributes.concat(Rt,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(t,s,i){if(Object.is(i,s)){return}super.attributeChangedCallback(t,s,i);if(Rt.includes(t)){this.$image.setAttribute(t,i)}}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"initialCenterSize":this.$nextTick((()=>{this.$center(i)}));break}}connectedCallback(){super.connectedCallback();const{$image:t}=this;const s=this.closest(this.$getTagNameOf(l));if(s){this.$canvas=s;this.$setStyles({display:"block",position:"absolute"});this.$onCanvasActionStart=t=>{var s,i;this.$actionStartTarget=(i=(s=t.detail)===null||s===void 0?void 0:s.relatedEvent)===null||i===void 0?void 0:i.target};this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null};this.$onCanvasAction=this.$handleAction.bind(this);ft(s,F,this.$onCanvasActionStart);ft(s,U,this.$onCanvasActionEnd);ft(s,H,this.$onCanvasAction)}this.$onLoad=this.$handleLoad.bind(this);ft(t,D,this.$onLoad);this.$getShadowRoot().appendChild(t)}disconnectedCallback(){const{$image:t,$canvas:s}=this;if(s){if(this.$onCanvasActionStart){lt(s,F,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){lt(s,U,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasAction){lt(s,H,this.$onCanvasAction);this.$onCanvasAction=null}}if(t&&this.$onLoad){lt(t,D,this.$onLoad);this.$onLoad=null}this.$getShadowRoot().removeChild(t);super.disconnectedCallback()}$handleLoad(){const{$image:t}=this;this.$setStyles({width:t.naturalWidth,height:t.naturalHeight});if(this.$canvas){this.$center(this.initialCenterSize)}}$handleAction(t){if(this.hidden||!(this.rotatable||this.scalable||this.translatable)){return}const{$canvas:s}=this;const{detail:i}=t;if(i){const{relatedEvent:t}=i;let{action:e}=i;if(e===y&&(!this.rotatable||!this.scalable)){if(this.rotatable){e=k}else if(this.scalable){e=$}else{e=x}}switch(e){case v:if(this.translatable){let e=null;if(t){e=t.target.closest(this.$getTagNameOf(b))}if(!e){e=s.querySelector(this.$getTagNameOf(b))}if(e&&e.multiple&&!e.active){e=s.querySelector(`${this.$getTagNameOf(b)}[active]`)}if(!e||e.hidden||!e.movable||e.dynamic||!(this.$actionStartTarget&&e.contains(this.$actionStartTarget))){this.$move(i.endX-i.startX,i.endY-i.startY)}}break;case k:if(this.rotatable){if(t){const{x:s,y:e}=this.getBoundingClientRect();this.$rotate(i.rotate,t.clientX-s,t.clientY-e)}else{this.$rotate(i.rotate)}}break;case $:if(this.scalable){if(t){const s=t.target.closest(this.$getTagNameOf(b));if(!s||!s.zoomable||s.zoomable&&s.dynamic){const{x:s,y:e}=this.getBoundingClientRect();this.$zoom(i.scale,t.clientX-s,t.clientY-e)}}else{this.$zoom(i.scale)}}break;case y:if(this.rotatable&&this.scalable){const{rotate:s}=i;let{scale:e}=i;if(e<0){e=1/(1-e)}else{e+=1}const n=Math.cos(s);const h=Math.sin(s);const[o,r,a,c]=[n*e,h*e,-h*e,n*e];if(t){const s=this.getBoundingClientRect();const i=t.clientX-s.x;const e=t.clientY-s.y;const[n,h,l,f]=this.$matrix;const u=s.width/2;const d=s.height/2;const p=i-u;const b=e-d;const m=(p*f-l*b)/(n*f-l*h);const g=(b*n-h*p)/(n*f-l*h);this.$transform(o,r,a,c,m*(1-o)+g*a,g*(1-c)+m*r)}else{this.$transform(o,r,a,c,0,0)}}break}}}$ready(t){const{$image:s}=this;const i=new Promise(((t,i)=>{const e=new Error("Failed to load the image source");if(s.complete){if(s.naturalWidth>0&&s.naturalHeight>0){t(s)}else{i(e)}}else{const n=()=>{lt(s,P,h);t(s)};const h=()=>{lt(s,D,n);i(e)};ut(s,D,n);ut(s,P,h)}}));if(et(t)){i.then((s=>{t(s);return s}))}return i}$center(t){const{parentElement:s}=this;if(!s){return this}const i=s.getBoundingClientRect();const e=i.width;const n=i.height;const{x:h,y:o,width:r,height:a}=this.getBoundingClientRect();const c=h+r/2;const l=o+a/2;const f=i.x+e/2;const u=i.y+n/2;this.$move(f-c,u-l);if(t&&(r!==e||a!==n)){const s=e/r;const i=n/a;switch(t){case"cover":this.$scale(Math.max(s,i));break;case"contain":this.$scale(Math.min(s,i));break}}return this}$move(t,s=t){if(this.translatable&&Z(t)&&Z(s)){const[i,e,n,h]=this.$matrix;const o=(t*h-n*s)/(i*h-n*e);const r=(s*i-e*t)/(i*h-n*e);this.$translate(o,r)}return this}$moveTo(t,s=t){if(this.translatable&&Z(t)&&Z(s)){const[i,e,n,h]=this.$matrix;const o=(t*h-n*s)/(i*h-n*e);const r=(s*i-e*t)/(i*h-n*e);this.$setTransform(i,e,n,h,o,r)}return this}$rotate(t,s,i){if(this.rotatable){const e=vt(t);const n=Math.cos(e);const h=Math.sin(e);const[o,r,a,c]=[n,h,-h,n];if(Z(s)&&Z(i)){const[t,e,n,h]=this.$matrix;const{width:l,height:f}=this.getBoundingClientRect();const u=l/2;const d=f/2;const p=s-u;const b=i-d;const m=(p*h-n*b)/(t*h-n*e);const g=(b*t-e*p)/(t*h-n*e);this.$transform(o,r,a,c,m*(1-o)-g*a,g*(1-c)-m*r)}else{this.$transform(o,r,a,c,0,0)}}return this}$zoom(t,s,i){if(!this.scalable||t===0){return this}if(t<0){t=1/(1-t)}else{t+=1}if(Z(s)&&Z(i)){const[e,n,h,o]=this.$matrix;const{width:r,height:a}=this.getBoundingClientRect();const c=r/2;const l=a/2;const f=s-c;const u=i-l;const d=(f*o-h*u)/(e*o-h*n);const p=(u*e-n*f)/(e*o-h*n);this.$transform(t,0,0,t,d*(1-t),p*(1-t))}else{this.$scale(t)}return this}$scale(t,s=t){if(this.scalable){this.$transform(t,0,0,s,0,0)}return this}$skew(t,s=0){if(this.skewable){const i=vt(t);const e=vt(s);this.$transform(1,Math.tan(e),Math.tan(i),1,0,0)}return this}$translate(t,s=t){if(this.translatable&&Z(t)&&Z(s)){this.$transform(1,0,0,1,t,s)}return this}$transform(t,s,i,e,n,h){if(Z(t)&&Z(s)&&Z(i)&&Z(e)&&Z(n)&&Z(h)){return this.$setTransform(xt(this.$matrix,[t,s,i,e,n,h]))}return this}$setTransform(t,s,i,e,n,h){if(this.rotatable||this.scalable||this.skewable||this.translatable){if(Array.isArray(t)){[t,s,i,e,n,h]=t}if(Z(t)&&Z(s)&&Z(i)&&Z(e)&&Z(n)&&Z(h)){const o=[...this.$matrix];const r=[t,s,i,e,n,h];if(this.$emit(G,{matrix:r,oldMatrix:o})===false){return this}this.$matrix=r;this.style.transform=`matrix(${r.join(", ")})`}}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}}Xt.$name=p;Xt.$version="2.0.0";var Yt=`:host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}`;const Pt=new WeakMap;class Wt extends Tt{constructor(){super(...arguments);this.$onCanvasChange=null;this.$onCanvasActionEnd=null;this.$onCanvasActionStart=null;this.$style=Yt;this.x=0;this.y=0;this.width=0;this.height=0;this.slottable=false;this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(t){Pt.set(this,t)}get $canvas(){return Pt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(l));if(t){this.$canvas=t;this.style.position="absolute";const s=t.querySelector(this.$getTagNameOf(b));if(s){this.$onCanvasActionStart=t=>{if(s.hidden&&t.detail.action===w){this.hidden=false}};this.$onCanvasActionEnd=t=>{if(s.hidden&&t.detail.action===w){this.hidden=true}};this.$onCanvasChange=t=>{const{x:i,y:e,width:n,height:h}=t.detail;this.$change(i,e,n,h);if(s.hidden||i===0&&e===0&&n===0&&h===0){this.hidden=true}};ft(t,F,this.$onCanvasActionStart);ft(t,U,this.$onCanvasActionEnd);ft(t,q,this.$onCanvasChange)}}this.$render()}disconnectedCallback(){const{$canvas:t}=this;if(t){if(this.$onCanvasActionStart){lt(t,F,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){lt(t,U,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasChange){lt(t,q,this.$onCanvasChange);this.$onCanvasChange=null}}super.disconnectedCallback()}$change(t,s,i=this.width,e=this.height){if(!Z(t)||!Z(s)||!Z(i)||!Z(e)||t===this.x&&s===this.y&&i===this.width&&e===this.height){return this}if(this.hidden){this.hidden=false}this.x=t;this.y=s;this.width=i;this.height=e;return this.$render()}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:o.innerWidth})}}Wt.$name=m;Wt.$version="2.0.0";var Dt=`:host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}`;class Lt extends Tt{constructor(){super(...arguments);this.$onCanvasCropEnd=null;this.$onCanvasCropStart=null;this.$style=Dt;this.action=x;this.plain=false;this.slottable=false;this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}}Lt.$name=d;Lt.$version="2.0.0";var Ht=`:host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}`;const Ut=new WeakMap;class Bt extends Tt{constructor(){super(...arguments);this.$onCanvasAction=null;this.$onCanvasActionStart=null;this.$onCanvasActionEnd=null;this.$onDocumentKeyDown=null;this.$action="";this.$actionStartTarget=null;this.$changing=false;this.$style=Ht;this.$initialSelection={x:0,y:0,width:0,height:0};this.x=0;this.y=0;this.width=0;this.height=0;this.aspectRatio=NaN;this.initialAspectRatio=NaN;this.initialCoverage=NaN;this.active=false;this.linked=false;this.dynamic=false;this.movable=false;this.resizable=false;this.zoomable=false;this.multiple=false;this.keyboard=false;this.outlined=false;this.precise=false}set $canvas(t){Ut.set(this,t)}get $canvas(){return Ut.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"x":case"y":case"width":case"height":if(!this.$changing){this.$nextTick((()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,true)}))}break;case"aspectRatio":case"initialAspectRatio":this.$nextTick((()=>{this.$initSelection()}));break;case"initialCoverage":this.$nextTick((()=>{if(J(i)&&i<=1){this.$initSelection(true,true)}}));break;case"keyboard":this.$nextTick((()=>{if(this.$canvas){if(i){if(!this.$onDocumentKeyDown){this.$onDocumentKeyDown=this.$handleKeyDown.bind(this);ft(this.ownerDocument,W,this.$onDocumentKeyDown)}}else if(this.$onDocumentKeyDown){lt(this.ownerDocument,W,this.$onDocumentKeyDown);this.$onDocumentKeyDown=null}}}));break;case"multiple":this.$nextTick((()=>{if(this.$canvas){const t=this.$getSelections();if(i){t.forEach((t=>{t.active=false}));this.active=true;this.$emit(q,{x:this.x,y:this.y,width:this.width,height:this.height})}else{this.active=false;t.slice(1).forEach((t=>{this.$removeSelection(t)}))}}}));break;case"precise":this.$nextTick((()=>{this.$change(this.x,this.y)}));break;case"linked":if(i){this.dynamic=true}break}}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(l));if(t){this.$canvas=t;this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`});if(!this.hidden){this.$render()}this.$initSelection(true);this.$onCanvasActionStart=this.$handleActionStart.bind(this);this.$onCanvasActionEnd=this.$handleActionEnd.bind(this);this.$onCanvasAction=this.$handleAction.bind(this);ft(t,F,this.$onCanvasActionStart);ft(t,U,this.$onCanvasActionEnd);ft(t,H,this.$onCanvasAction)}else{this.$render()}}disconnectedCallback(){const{$canvas:t}=this;if(t){if(this.$onCanvasActionStart){lt(t,F,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){lt(t,U,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasAction){lt(t,H,this.$onCanvasAction);this.$onCanvasAction=null}}super.disconnectedCallback()}$getSelections(){let t=[];if(this.parentElement){t=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(b)))}return t}$initSelection(t=false,s=false){const{initialCoverage:i,parentElement:e}=this;if(J(i)&&e){const n=this.aspectRatio||this.initialAspectRatio;let h=(s?0:this.width)||e.offsetWidth*i;let o=(s?0:this.height)||e.offsetHeight*i;if(J(n)){({width:h,height:o}=yt({aspectRatio:n,width:h,height:o}))}this.$change(this.x,this.y,h,o);if(t){this.$center()}this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){const t=this.cloneNode(true);if(this.hasAttribute("id")){t.removeAttribute("id")}t.initialCoverage=NaN;this.active=false;if(this.parentElement){this.parentElement.insertBefore(t,this.nextSibling)}return t}$removeSelection(t=this){if(this.parentElement){const s=this.$getSelections();if(s.length>1){const i=s.indexOf(t);const e=s[i+1]||s[i-1];if(e){t.active=false;this.parentElement.removeChild(t);e.active=true;e.$emit(q,{x:e.x,y:e.y,width:e.width,height:e.height})}}else{this.$clear()}}}$handleActionStart(t){var s,i;const e=(i=(s=t.detail)===null||s===void 0?void 0:s.relatedEvent)===null||i===void 0?void 0:i.target;this.$action="";this.$actionStartTarget=e;if(!this.hidden&&this.multiple&&!this.active&&e===this&&this.parentElement){this.$getSelections().forEach((t=>{t.active=false}));this.active=true;this.$emit(q,{x:this.x,y:this.y,width:this.width,height:this.height})}}$handleAction(t){const{currentTarget:s,detail:i}=t;if(!s||!i){return}const{relatedEvent:e}=i;let{action:n}=i;if(!n&&this.multiple){n=this.$action||(e===null||e===void 0?void 0:e.target.action);this.$action=n}if(!n||this.hidden&&n!==w||this.multiple&&!this.active&&n!==$){return}const h=i.endX-i.startX;const o=i.endY-i.startY;const{width:r,height:a}=this;let{aspectRatio:c}=this;if(!J(c)&&e.shiftKey){c=J(r)&&J(a)?r/a:1}switch(n){case w:if(h!==0&&o!==0){const{$canvas:t}=this;const e=gt(s);(this.multiple&&!this.hidden?this.$createSelection():this).$change(i.startX-e.left,i.startY-e.top,Math.abs(h),Math.abs(o),c);if(h<0){if(o<0){n=O}else if(o>0){n=T}}else if(h>0){if(o<0){n=j}else if(o>0){n=S}}if(t){t.$action=n}}break;case v:if(this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))){this.$move(h,o)}break;case $:if(e&&this.zoomable&&(this.dynamic||this.contains(e.target))){const t=gt(s);this.$zoom(i.scale,e.pageX-t.left,e.pageY-t.top)}break;default:this.$resize(n,h,o,c)}}$handleActionEnd(){this.$action="";this.$actionStartTarget=null}$handleKeyDown(t){if(this.hidden||!this.keyboard||this.multiple&&!this.active||t.defaultPrevented){return}const{activeElement:s}=document;if(s&&(["INPUT","TEXTAREA"].includes(s.tagName)||["true","plaintext-only"].includes(s.contentEditable))){return}switch(t.key){case"Backspace":if(t.metaKey){t.preventDefault();this.$removeSelection()}break;case"Delete":t.preventDefault();this.$removeSelection();break;case"ArrowLeft":t.preventDefault();this.$move(-1,0);break;case"ArrowRight":t.preventDefault();this.$move(1,0);break;case"ArrowUp":t.preventDefault();this.$move(0,-1);break;case"ArrowDown":t.preventDefault();this.$move(0,1);break;case"+":t.preventDefault();this.$zoom(.1);break;case"-":t.preventDefault();this.$zoom(-.1);break}}$center(){const{parentElement:t}=this;if(!t){return this}const s=(t.offsetWidth-this.width)/2;const i=(t.offsetHeight-this.height)/2;return this.$change(s,i)}$move(t,s=t){return this.$moveTo(this.x+t,this.y+s)}$moveTo(t,s=t){if(!this.movable){return this}return this.$change(t,s)}$resize(t,s=0,i=0,e=this.aspectRatio){if(!this.resizable){return this}const n=J(e);const{$canvas:h}=this;let{x:o,y:r,width:a,height:c}=this;switch(t){case z:r+=i;c-=i;if(c<0){t=C;c=-c;r-=c}if(n){s=i*e;o+=s/2;a-=s;if(a<0){a=-a;o-=a}}break;case M:a+=s;if(a<0){t=A;a=-a;o-=a}if(n){i=s/e;r-=i/2;c+=i;if(c<0){c=-c;r-=c}}break;case C:c+=i;if(c<0){t=z;c=-c;r-=c}if(n){s=i*e;o-=s/2;a+=s;if(a<0){a=-a;o-=a}}break;case A:o+=s;a-=s;if(a<0){t=M;a=-a;o-=a}if(n){i=s/e;r+=i/2;c-=i;if(c<0){c=-c;r-=c}}break;case j:if(n){i=-s/e}r+=i;c-=i;a+=s;if(a<0&&c<0){t=T;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=O;a=-a;o-=a}else if(c<0){t=S;c=-c;r-=c}break;case O:if(n){i=s/e}o+=s;r+=i;a-=s;c-=i;if(a<0&&c<0){t=S;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=j;a=-a;o-=a}else if(c<0){t=T;c=-c;r-=c}break;case S:if(n){i=s/e}a+=s;c+=i;if(a<0&&c<0){t=O;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=T;a=-a;o-=a}else if(c<0){t=j;c=-c;r-=c}break;case T:if(n){i=-s/e}o+=s;a-=s;c+=i;if(a<0&&c<0){t=j;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=S;a=-a;o-=a}else if(c<0){t=O;c=-c;r-=c}break}if(h){h.$setAction(t)}return this.$change(o,r,a,c)}$zoom(t,s,i){if(!this.zoomable||t===0){return this}if(t<0){t=1/(1-t)}else{t+=1}const{width:e,height:n}=this;const h=e*t;const o=n*t;let r=this.x;let a=this.y;if(Z(s)&&Z(i)){r-=(h-e)*((s-this.x)/e);a-=(o-n)*((i-this.y)/n)}else{r-=(h-e)/2;a-=(o-n)/2}return this.$change(r,a,h,o)}$change(t,s,i=this.width,e=this.height,n=this.aspectRatio,h=false){if(this.$changing||!Z(t)||!Z(s)||!Z(i)||!Z(e)||i<0||e<0){return this}if(J(n)){({width:i,height:e}=yt({aspectRatio:n,width:i,height:e},"cover"))}if(!this.precise){t=Math.round(t);s=Math.round(s);i=Math.round(i);e=Math.round(e)}if(t===this.x&&s===this.y&&i===this.width&&e===this.height&&Object.is(n,this.aspectRatio)&&!h){return this}if(this.hidden){this.hidden=false}if(this.$emit(q,{x:t,y:s,width:i,height:e})===false){return this}this.$changing=true;this.x=t;this.y=s;this.width=i;this.height=e;this.$changing=false;return this.$render()}$reset(){const{x:t,y:s,width:i,height:e}=this.$initialSelection;return this.$change(t,s,i,e)}$clear(){this.$change(0,0,0,0,NaN,true);this.hidden=true;return this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(t){return new Promise(((s,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const e=document.createElement("canvas");let{width:n,height:h}=this;let o=1;if(it(t)&&(J(t.width)||J(t.height))){({width:n,height:h}=yt({aspectRatio:n/h,width:t.width,height:t.height}));o=n/this.width}e.width=n;e.height=h;if(!this.$canvas){s(e);return}const r=this.$canvas.querySelector(this.$getTagNameOf(p));if(!r){s(e);return}r.$ready().then((i=>{const a=e.getContext("2d");if(a){const[s,c,l,f,u,d]=r.$getTransform();const p=-this.x;const b=-this.y;const m=(p*f-l*b)/(s*f-l*c);const g=(b*s-c*p)/(s*f-l*c);let w=s*m+l*g+u;let v=c*m+f*g+d;let $=i.naturalWidth;let k=i.naturalHeight;if(o!==1){w*=o;v*=o;$*=o;k*=o}const y=$/2;const x=k/2;a.fillStyle="transparent";a.fillRect(0,0,n,h);if(it(t)&&et(t.beforeDraw)){t.beforeDraw.call(this,a,e)}a.save();a.translate(y,x);a.transform(s,c,l,f,w,v);a.translate(-y,-x);a.drawImage(i,0,0,$,k);a.restore()}s(e)})).catch(i)}))}}Bt.$name=b;Bt.$version="2.0.0";var Ft=`:host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}`;class qt extends Tt{constructor(){super(...arguments);this.$style=Ft;this.bordered=false;this.columns=3;this.covered=false;this.rows=3;this.slottable=false;this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);if(t==="rows"||t==="columns"){this.$nextTick((()=>{this.$render()}))}}connectedCallback(){super.connectedCallback();this.$render()}$render(){const t=this.$getShadowRoot();const s=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){const t=document.createElement("span");t.setAttribute("role","row");for(let s=0;s<this.columns;s+=1){const s=document.createElement("span");s.setAttribute("role","gridcell");t.appendChild(s)}s.appendChild(t)}if(t){t.innerHTML="";t.appendChild(s)}}}qt.$name=u;qt.$version="2.0.0";var Gt=`:host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}`;class Kt extends Tt{constructor(){super(...arguments);this.$style=Gt;this.centered=false;this.slottable=false;this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}}Kt.$name=f;Kt.$version="2.0.0";var Vt=`:host{display:block;height:100%;overflow:hidden;position:relative;width:100%}`;const Zt=new WeakMap;const Jt=new WeakMap;const Qt=new WeakMap;const ts=new WeakMap;const ss="both";const is="horizontal";const es="vertical";const ns="none";class hs extends Tt{constructor(){super(...arguments);this.$onSelectionChange=null;this.$onSourceImageLoad=null;this.$onSourceImageTransform=null;this.$scale=1;this.$style=Vt;this.resize=es;this.selection="";this.slottable=false}set $image(t){Jt.set(this,t)}get $image(){return Jt.get(this)}set $sourceImage(t){ts.set(this,t)}get $sourceImage(){return ts.get(this)}set $canvas(t){Zt.set(this,t)}get $canvas(){return Zt.get(this)}set $selection(t){Qt.set(this,t)}get $selection(){return Qt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){super.connectedCallback();let t=null;if(this.selection){t=this.ownerDocument.querySelector(this.selection)}else{t=this.closest(this.$getTagNameOf(b))}if(nt(t)){this.$selection=t;this.$onSelectionChange=this.$handleSelectionChange.bind(this);ft(t,q,this.$onSelectionChange);const s=t.closest(this.$getTagNameOf(l));if(s){this.$canvas=s;const t=s.querySelector(this.$getTagNameOf(p));if(t){this.$sourceImage=t;this.$image=t.cloneNode(true);this.$getShadowRoot().appendChild(this.$image);this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this);this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this);ft(t.$image,D,this.$onSourceImageLoad);ft(t,G,this.$onSourceImageTransform)}}this.$render()}}disconnectedCallback(){const{$selection:t,$sourceImage:s}=this;if(t&&this.$onSelectionChange){lt(t,q,this.$onSelectionChange);this.$onSelectionChange=null}if(s&&this.$onSourceImageLoad){lt(s.$image,D,this.$onSourceImageLoad);this.$onSourceImageLoad=null}if(s&&this.$onSourceImageTransform){lt(s,G,this.$onSourceImageTransform);this.$onSourceImageTransform=null}super.disconnectedCallback()}$handleSelectionChange(t){this.$render(t.detail)}$handleSourceImageLoad(){const{$image:t,$sourceImage:s}=this;const i=t.getAttribute("src");const e=s.getAttribute("src");if(e&&e!==i){t.setAttribute("src",e);t.$ready((()=>{setTimeout((()=>{this.$render()}),50)}))}}$handleSourceImageTransform(t){this.$render(undefined,t.detail.matrix)}$render(t,s){const{$canvas:i,$selection:e}=this;if(!t&&!e.hidden){t=e}if(!t||t.x===0&&t.y===0&&t.width===0&&t.height===0){t={x:0,y:0,width:i.offsetWidth,height:i.offsetHeight}}const{x:n,y:h,width:o,height:r}=t;const a={};const{clientWidth:c,clientHeight:l}=this;let f=c;let u=l;let d=NaN;switch(this.resize){case ss:d=1;f=o;u=r;a.width=o;a.height=r;break;case is:d=r>0?l/r:0;f=o*d;a.width=f;break;case es:d=o>0?c/o:0;u=r*d;a.height=u;break;case ns:default:if(c>0){d=o>0?c/o:0}else if(l>0){d=r>0?l/r:0}}this.$scale=d;this.$setStyles(a);if(this.$sourceImage){this.$transformImageByOffset(s!==null&&s!==void 0?s:this.$sourceImage.$getTransform(),-n,-h)}}$transformImageByOffset(t,s,i){const{$image:e,$scale:n,$sourceImage:h}=this;if(h&&e&&n>=0){const[h,o,r,a,c,l]=t;const f=(s*a-r*i)/(h*a-r*o);const u=(i*h-o*s)/(h*a-r*o);const d=h*f+r*u+c;const p=o*f+a*u+l;e.$ready((t=>{this.$setStyles.call(e,{width:t.naturalWidth*n,height:t.naturalHeight*n})}));e.$setTransform(h,o,r,a,d*n,p*n)}}}hs.$name=g;hs.$version="2.0.0";
2
- /*! Cropper.js v2.0.0 | (c) 2015-present Chen Fengyuan | MIT */It.$define();Kt.$define();qt.$define();Lt.$define();Xt.$define();Bt.$define();Wt.$define();hs.$define();const os=".mb-6{margin-bottom:1.5rem!important}.flex{display:flex!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}*{box-sizing:border-box}:host{align-items:center;display:flex;flex-direction:column;gap:1.5rem;justify-content:space-between;margin-bottom:1.5rem;width:100%}.static{position:static!important}.hidden{display:none!important}.h-\\[17\\.5rem\\]{height:17.5rem!important}.transform{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))!important}.resize{resize:both!important}.gap-2{gap:.5rem!important}.rounded{border-radius:.25rem!important}.border-0{border-width:0!important}.border-b{border-bottom-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-medium{--tw-border-opacity:1!important;border-color:rgb(0 255 0/var(--tw-border-opacity,1))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.px-14{padding-left:3.5rem!important;padding-right:3.5rem!important}.text-storm-vague{--tw-text-opacity:1!important;color:rgb(0 255 255/var(--tw-text-opacity,1))!important}@media (min-width:40rem){.tablet\\:max-w-xs{max-width:20rem!important}.tablet\\:px-1{padding-left:.25rem!important;padding-right:.25rem!important}}";const rs=class{constructor(i){t(this,i);this.valueChange=s(this,"valueChange",3)}variant="user";value;returnType="base64";valueChange;_imageRef;_selectionRef;_maxScale=0;_minScale=0;_resizeDebounceTimeout;_toCanvasDebounceTimeout;_loaded=false;_currentScale=0;onResize(){if(this._resizeDebounceTimeout){clearTimeout(this._resizeDebounceTimeout)}this._resizeDebounceTimeout=setTimeout((()=>{this._selectionRef.$center();this._imageRef.$center()}),200)}componentDidLoad(){setTimeout((()=>{this._loaded=true}),200)}render(){return i(e,{key:"a66d380b44bc45224bfdc14bb5fca2b2ed362b30",class:"p-cropper"},this._loaded&&i("cropper-canvas",{key:"e1fd99544823302d65acd18a728c1de356e71568",class:"h-[17.5rem] w-full border-0 border-b border-solid border-mystic-medium bg-white",onAction:()=>this._onAction()},i("cropper-image",{key:"102da7dfafb0978769d01769dd612181ee827c21",src:this.value,alt:"Picture",ref:t=>this._setImageRef(t),scalable:true,crossorigin:"anonymous"}),i("cropper-shade",{key:"85d8dd61a002f97cde353c6b596bc565cdf0dd03",class:n({"rounded-round":this.variant==="user",rounded:this.variant==="company"}),"theme-color":"rgba(255, 255, 255, 0.5)",hidden:true}),i("cropper-selection",{key:"b6f27be2918f2d37db9c2e357edbf43c9437d948","initial-coverage":"0.7","aspect-ratio":"1",ref:t=>this._selectionRef=t}),i("cropper-handle",{key:"f344a4f9329f0f95388cbb9d244e9874bb122872",action:"move",plain:true})),i("div",{key:"fac0f650ad1c0f90cf76b1988c5b0868fca46433",class:"flex w-full items-center gap-2 px-14 text-storm-vague tablet:max-w-xs tablet:px-1"},i("p-icon",{key:"cab454265a498a58246f560214a9773a05b64a9d",variant:"minus"}),i("input",{key:"6e290864b2b72b195dcf3bc0499a7c15cf95dfb7",class:"p-input w-full",type:"range",min:"0",max:"100",value:this._currentScale,onInput:t=>this._onInput(t.target.value),step:"0.5"}),i("p-icon",{key:"eae0f43ac06be2eb63ceaeba98890a9bc423f003",variant:"plus"})))}_setImageRef(t){if(this._imageRef){return}this._imageRef=t;this._imageRef.$ready((t=>setTimeout((()=>this._setInitialState(t)),200)))}_setInitialState(t){let s;if(t.naturalWidth>t.naturalHeight){s=200/t.naturalHeight}if(t.naturalHeight>=t.naturalWidth){s=200/t.naturalWidth}const i=this._imageRef.$getTransform();this._minScale=s;this._maxScale=i[0];this._selectionRef.$resize("nw-resize",200,200,1);this._selectionRef.$center();this._setScale(s);this._toCanvas()}_onAction(){this._setCurrentScale();this._toCanvas()}_setScale(t,s=true,i=true){const e=this._imageRef.$getTransform();this._imageRef.$setTransform([t,0,0,t,e[4],e[5]]);if(s){this._imageRef.$center()}if(i){this._setCurrentScale()}}_setCurrentScale(){const t=this._imageRef.$getTransform();const s=t[0];if(s<this._minScale){this._setScale(this._minScale,true,false);this._currentScale=0;return}if(s>this._maxScale){this._setScale(this._maxScale,true,false);this._currentScale=100;return}if(s===this._minScale){this._currentScale=0;return}if(s===this._maxScale){this._currentScale=100;return}const i=this._maxScale-this._minScale;const e=s-this._minScale;const n=e/i*100;this._currentScale=n}_onInput(t){const s=this._imageRef.$getTransform();const i=s[0];const e=this._maxScale-this._minScale;const n=e*(t/100);if(n===i){return}this._setScale(n+this._minScale,false,false);this._currentScale=t;this._toCanvas()}_toCanvas(){if(this._toCanvasDebounceTimeout){clearTimeout(this._toCanvasDebounceTimeout)}this._toCanvasDebounceTimeout=setTimeout((async()=>{const t=await this._selectionRef.$toCanvas();if(this.returnType==="canvas"){this.valueChange.emit(t);return}const s=t.toDataURL("image/png");this.valueChange.emit(s)}),200)}};rs.style=os;export{rs as p_cropper};
3
- //# sourceMappingURL=p-30f6e463.entry.js.map