vviinn-widgets 2.7.2 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/dist/components/Handler.js +270 -0
  2. package/dist/components/NonEmptyArray.js +5699 -0
  3. package/dist/components/cropper-handler.js +6 -0
  4. package/dist/components/cropper-handler2.js +39 -0
  5. package/dist/{cjs/customized-slots-06ca4007.js → components/customized-slots.js} +3 -6
  6. package/dist/components/highlight-box.js +6 -0
  7. package/dist/components/highlight-box2.js +52 -0
  8. package/dist/components/image-cropper.js +6 -0
  9. package/dist/components/image-cropper2.js +138 -0
  10. package/dist/components/imageSearch.store.js +10686 -0
  11. package/dist/components/index.js +1 -0
  12. package/dist/{esm/index-443468c7.js → components/index2.js} +2 -2
  13. package/dist/components/index3.js +130 -0
  14. package/dist/components/recommendations-sidebar.js +101 -0
  15. package/dist/components/resizer.worker.js +11 -0
  16. package/dist/components/search-filters.js +6 -0
  17. package/dist/components/search-filters2.js +89 -0
  18. package/dist/components/tracking.worker.js +11 -0
  19. package/dist/components/vviinn-carousel.js +6 -0
  20. package/dist/components/vviinn-carousel2.js +235 -0
  21. package/dist/components/vviinn-detected-object.js +6 -0
  22. package/dist/components/vviinn-detected-object2.js +67 -0
  23. package/dist/components/vviinn-empty-results.js +6 -0
  24. package/dist/components/vviinn-empty-results2.js +35 -0
  25. package/dist/components/vviinn-error.js +6 -0
  26. package/dist/components/vviinn-error2.js +28 -0
  27. package/dist/components/vviinn-example-image.js +6 -0
  28. package/dist/components/vviinn-example-image2.js +57 -0
  29. package/dist/components/vviinn-example-images.js +6 -0
  30. package/dist/components/vviinn-example-images2.js +53 -0
  31. package/dist/components/vviinn-image-selector.js +6 -0
  32. package/dist/components/vviinn-image-selector2.js +135 -0
  33. package/dist/components/vviinn-image-view.js +6 -0
  34. package/dist/components/vviinn-image-view2.js +95 -0
  35. package/dist/components/vviinn-modal.js +6 -0
  36. package/dist/components/vviinn-modal2.js +46 -0
  37. package/dist/components/vviinn-onboarding-card-1.js +6 -0
  38. package/dist/components/vviinn-onboarding-card-12.js +34 -0
  39. package/dist/components/vviinn-onboarding-card-2.js +6 -0
  40. package/dist/components/vviinn-onboarding-card-22.js +34 -0
  41. package/dist/components/vviinn-onboarding-card-3.js +6 -0
  42. package/dist/components/vviinn-onboarding-card-32.js +34 -0
  43. package/dist/components/vviinn-onboarding.js +6 -0
  44. package/dist/components/vviinn-onboarding2.js +63 -0
  45. package/dist/components/vviinn-overlay.js +6 -0
  46. package/dist/components/vviinn-overlay2.js +28 -0
  47. package/dist/components/vviinn-overlayed-modal.js +6 -0
  48. package/dist/components/vviinn-overlayed-modal2.js +45 -0
  49. package/dist/components/vviinn-preloader.js +6 -0
  50. package/dist/components/vviinn-preloader2.js +34 -0
  51. package/dist/components/vviinn-privacy-badge.js +6 -0
  52. package/dist/components/vviinn-privacy-badge2.js +33 -0
  53. package/dist/components/vviinn-product-card.js +6 -0
  54. package/dist/components/vviinn-product-card2.js +216 -0
  55. package/dist/components/vviinn-recommendations-sidebar.js +6 -0
  56. package/dist/components/vviinn-server-error.js +6 -0
  57. package/dist/components/vviinn-server-error2.js +35 -0
  58. package/dist/components/vviinn-slide.js +6 -0
  59. package/dist/components/vviinn-slide2.js +28 -0
  60. package/dist/components/vviinn-slider.js +6 -0
  61. package/dist/components/vviinn-slider2.js +159 -0
  62. package/dist/components/vviinn-teaser.js +6 -0
  63. package/dist/components/vviinn-teaser2.js +33 -0
  64. package/dist/components/vviinn-vpr-button.js +93 -0
  65. package/dist/components/vviinn-vpr-vidget.js +3360 -0
  66. package/dist/components/vviinn-vpr-widget.js +6 -0
  67. package/dist/components/vviinn-vps-button.js +224 -0
  68. package/dist/components/vviinn-vps-widget.js +6 -0
  69. package/dist/components/vviinn-vps-widget2.js +350 -0
  70. package/dist/components/vviinn-wrong-format.js +6 -0
  71. package/dist/components/vviinn-wrong-format2.js +35 -0
  72. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
  73. package/dist/types/components/vviinn-vpr-button/stories/lol.d.ts +2 -0
  74. package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -1
  75. package/dist/vviinn-widgets/Array-bdfc75db.js +4870 -0
  76. package/dist/vviinn-widgets/Handler-edcb46f4.js +1422 -0
  77. package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +4411 -0
  78. package/dist/{esm/app-globals-865bc7a7.js → vviinn-widgets/app-globals-c0aa8ec3.js} +922 -10
  79. package/dist/vviinn-widgets/cropper-handler.entry.js +23 -0
  80. package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
  81. package/dist/{esm/customized-slots-96902edf.js → vviinn-widgets/customized-slots-5c1c623a.js} +1 -1
  82. package/dist/vviinn-widgets/dom-db0073f0.js +73 -0
  83. package/dist/vviinn-widgets/highlight-box.entry.js +41 -0
  84. package/dist/{collection/components/image-search/image-view/image-cropper/image-cropper.js → vviinn-widgets/image-cropper.entry.js} +33 -70
  85. package/dist/{cjs/index-df6896e2.js → vviinn-widgets/imageSearch.store-0eed9a5c.js} +11598 -15320
  86. package/dist/{esm/index-2fdd499d.js → vviinn-widgets/imageSearch.store-b28bddb0.js} +11971 -15281
  87. package/dist/{collection/components/vviinn-icons/index.js → vviinn-widgets/index-44058ea2.js} +14 -11
  88. package/dist/vviinn-widgets/index-6c6de682.js +3857 -0
  89. package/dist/vviinn-widgets/index-de3e14da.js +3010 -0
  90. package/dist/vviinn-widgets/index.esm.js +1 -0
  91. package/dist/vviinn-widgets/number-171db649.js +1499 -0
  92. package/dist/vviinn-widgets/search-filters.entry.js +76 -0
  93. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +389 -0
  94. package/dist/{collection/components/vviinn-carousel/vviinn-carousel.js → vviinn-widgets/vviinn-carousel.entry.js} +18 -113
  95. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +54 -0
  96. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +16 -0
  97. package/dist/vviinn-widgets/vviinn-error.entry.js +15 -0
  98. package/dist/vviinn-widgets/vviinn-example-image.entry.js +38 -0
  99. package/dist/vviinn-widgets/vviinn-example-images.entry.js +28 -0
  100. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +31 -0
  101. package/dist/vviinn-widgets/vviinn-image-view.entry.js +55 -0
  102. package/dist/vviinn-widgets/vviinn-modal.entry.js +30 -0
  103. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +21 -0
  104. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +21 -0
  105. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +21 -0
  106. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +20 -0
  107. package/dist/vviinn-widgets/vviinn-overlay.entry.js +15 -0
  108. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +18 -0
  109. package/dist/vviinn-widgets/vviinn-preloader.entry.js +25 -0
  110. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
  111. package/dist/vviinn-widgets/vviinn-product-card.entry.js +188 -0
  112. package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +2 -2
  113. package/dist/vviinn-widgets/vviinn-server-error.entry.js +16 -0
  114. package/dist/vviinn-widgets/vviinn-slide.entry.js +15 -0
  115. package/dist/vviinn-widgets/vviinn-slider.entry.js +120 -0
  116. package/dist/vviinn-widgets/vviinn-teaser.entry.js +20 -0
  117. package/dist/{esm → vviinn-widgets}/vviinn-vpr-button.entry.js +2 -2
  118. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +4588 -0
  119. package/dist/{esm → vviinn-widgets}/vviinn-vps-button.entry.js +3 -3
  120. package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +170 -0
  121. package/dist/vviinn-widgets/vviinn-widgets.css +6 -1
  122. package/dist/vviinn-widgets/vviinn-widgets.esm.js +125 -1
  123. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +16 -0
  124. package/package.json +8 -2
  125. package/www/build/p-06c76b5e.js +1 -0
  126. package/www/build/p-07e16d04.js +15 -0
  127. package/{dist/vviinn-widgets/p-a6e0710f.entry.js → www/build/p-44bc50de.entry.js} +1 -1
  128. package/www/build/p-510922c6.js +1 -0
  129. package/www/build/p-57ce8de3.css +1 -0
  130. package/www/build/p-591cb193.entry.js +1 -0
  131. package/www/build/p-6b9d242e.js +1 -0
  132. package/www/build/p-880bccf1.js +1 -0
  133. package/www/build/p-b0ada114.entry.js +1 -0
  134. package/www/build/p-b7be7c70.entry.js +1 -0
  135. package/{dist/vviinn-widgets/p-166970f3.js → www/build/p-ea8dea5c.js} +1 -1
  136. package/www/build/vviinn-widgets.css +1 -1
  137. package/www/build/vviinn-widgets.esm.js +1 -1
  138. package/www/index.html +32261 -1
  139. package/www/sw.js +66 -0
  140. package/dist/cjs/app-globals-8db3bcbe.js +0 -6912
  141. package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
  142. package/dist/cjs/index-3c3ab815.js +0 -1354
  143. package/dist/cjs/index-f66cd8d1.js +0 -39
  144. package/dist/cjs/index.cjs.js +0 -2
  145. package/dist/cjs/loader.cjs.js +0 -23
  146. package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
  147. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +0 -65
  148. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +0 -49
  149. package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
  150. package/dist/cjs/vviinn-widgets.cjs.js +0 -21
  151. package/dist/collection/Image/error.js +0 -14
  152. package/dist/collection/Image/form.js +0 -5
  153. package/dist/collection/Image/fromFile.js +0 -18
  154. package/dist/collection/Image/imageToB64.js +0 -9
  155. package/dist/collection/Image/index.js +0 -0
  156. package/dist/collection/Image/renderPromise.js +0 -6
  157. package/dist/collection/Image/resizeImage.js +0 -28
  158. package/dist/collection/Image/sizing.js +0 -39
  159. package/dist/collection/Image/toFile.js +0 -17
  160. package/dist/collection/analytics/GAnalytics.js +0 -32
  161. package/dist/collection/analytics/GeneralAnalytics.js +0 -9
  162. package/dist/collection/analytics/GtagAnalytics.js +0 -35
  163. package/dist/collection/analytics/ProductAnalytics.js +0 -1
  164. package/dist/collection/campaign/Campaign.js +0 -8
  165. package/dist/collection/campaign/CampaignService.js +0 -5
  166. package/dist/collection/campaign/VCSCampaign.js +0 -1
  167. package/dist/collection/campaign/VCSCampaignResponse.js +0 -1
  168. package/dist/collection/campaign/VCSCampaignService.js +0 -7
  169. package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
  170. package/dist/collection/campaign/VPRCampaignService.js +0 -7
  171. package/dist/collection/collection-manifest.json +0 -43
  172. package/dist/collection/components/customized-slots.js +0 -47
  173. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -71
  174. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -25
  175. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -49
  176. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -64
  177. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
  178. package/dist/collection/components/image-search/search-filters/search-filters.css +0 -120
  179. package/dist/collection/components/image-search/search-filters/search-filters.js +0 -125
  180. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -142
  181. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +0 -7
  182. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +0 -36
  183. package/dist/collection/components/vviinn-error/vviinn-error.css +0 -38
  184. package/dist/collection/components/vviinn-error/vviinn-error.js +0 -18
  185. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +0 -3
  186. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +0 -34
  187. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +0 -3
  188. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +0 -34
  189. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +0 -34
  190. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +0 -129
  191. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +0 -19
  192. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +0 -80
  193. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +0 -25
  194. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +0 -64
  195. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -47
  196. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +0 -100
  197. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -31
  198. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +0 -61
  199. package/dist/collection/components/vviinn-modal/vviinn-modal.css +0 -105
  200. package/dist/collection/components/vviinn-modal/vviinn-modal.js +0 -98
  201. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +0 -41
  202. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +0 -26
  203. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +0 -26
  204. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +0 -26
  205. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +0 -58
  206. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +0 -28
  207. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +0 -33
  208. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +0 -15
  209. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -29
  210. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +0 -71
  211. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +0 -37
  212. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +0 -20
  213. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -19
  214. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +0 -27
  215. package/dist/collection/components/vviinn-product-card/render-helpers.js +0 -32
  216. package/dist/collection/components/vviinn-product-card/stories/args.js +0 -73
  217. package/dist/collection/components/vviinn-product-card/stories/decorators.js +0 -51
  218. package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +0 -105
  219. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +0 -95
  220. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +0 -462
  221. package/dist/collection/components/vviinn-slider/arrow.js +0 -11
  222. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +0 -4
  223. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +0 -15
  224. package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -109
  225. package/dist/collection/components/vviinn-slider/vviinn-slider.js +0 -181
  226. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +0 -14
  227. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +0 -29
  228. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -238
  229. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +0 -220
  230. package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -213
  231. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -91
  232. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +0 -35
  233. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -179
  234. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -197
  235. package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +0 -29
  236. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -211
  237. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
  238. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -510
  239. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +0 -79
  240. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +0 -35
  241. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -3
  242. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -195
  243. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -37
  244. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -350
  245. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +0 -375
  246. package/dist/collection/cropper/Cropper.js +0 -1
  247. package/dist/collection/cropper/Handler.js +0 -61
  248. package/dist/collection/dom/index.js +0 -3
  249. package/dist/collection/error.js +0 -14
  250. package/dist/collection/file/index.js +0 -4
  251. package/dist/collection/geometry/Clip.js +0 -14
  252. package/dist/collection/geometry/Point.js +0 -32
  253. package/dist/collection/geometry/Rectangle.js +0 -95
  254. package/dist/collection/geometry/RectangleAlt.js +0 -1
  255. package/dist/collection/geometry/Sized.js +0 -8
  256. package/dist/collection/global.js +0 -19
  257. package/dist/collection/index.js +0 -1
  258. package/dist/collection/interfaces/generated.js +0 -5
  259. package/dist/collection/interfaces/recommendation.js +0 -1
  260. package/dist/collection/network/apiClient.js +0 -9
  261. package/dist/collection/network/ion/File.js +0 -14
  262. package/dist/collection/network/ion/Form.js +0 -64
  263. package/dist/collection/network/ion/Link.js +0 -8
  264. package/dist/collection/network/ion/ValueObject.js +0 -23
  265. package/dist/collection/network/request.js +0 -19
  266. package/dist/collection/network/utils.js +0 -37
  267. package/dist/collection/openApi/index.js +0 -27
  268. package/dist/collection/recommendation/events.js +0 -1
  269. package/dist/collection/recommendation/recommendation.js +0 -1
  270. package/dist/collection/searchSession/searchSession.js +0 -31
  271. package/dist/collection/sentry.js +0 -14
  272. package/dist/collection/slider/GridMode.js +0 -1
  273. package/dist/collection/store/file-processing.js +0 -13
  274. package/dist/collection/store/imageSearch.store.js +0 -133
  275. package/dist/collection/store/store.js +0 -3
  276. package/dist/collection/store/tracking.store.js +0 -3
  277. package/dist/collection/stories/Button.js +0 -21
  278. package/dist/collection/stories/Button.stories.js +0 -42
  279. package/dist/collection/stories/Header.js +0 -45
  280. package/dist/collection/stories/Header.stories.js +0 -15
  281. package/dist/collection/stories/Page.js +0 -61
  282. package/dist/collection/stories/Page.stories.js +0 -19
  283. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  284. package/dist/collection/stories/assets/colors.svg +0 -1
  285. package/dist/collection/stories/assets/comments.svg +0 -1
  286. package/dist/collection/stories/assets/direction.svg +0 -1
  287. package/dist/collection/stories/assets/flow.svg +0 -1
  288. package/dist/collection/stories/assets/plugin.svg +0 -1
  289. package/dist/collection/stories/assets/repo.svg +0 -1
  290. package/dist/collection/stories/assets/stackalt.svg +0 -1
  291. package/dist/collection/stories/image-selector.stories.js +0 -6
  292. package/dist/collection/stories/image-view.stories.js +0 -6
  293. package/dist/collection/stories/modal.stories.js +0 -12
  294. package/dist/collection/stories/onboarding.stories.js +0 -11
  295. package/dist/collection/stories/overlay.stories.js +0 -5
  296. package/dist/collection/stories/overlayedModal.stories.js +0 -8
  297. package/dist/collection/stories/privacy-badge.stories.js +0 -11
  298. package/dist/collection/stories/slider.stories.js +0 -17
  299. package/dist/collection/stories/teaser.stories.js +0 -5
  300. package/dist/collection/stories/vps-widget.stories.js +0 -47
  301. package/dist/collection/stories/vviinn-product.stories.js +0 -19
  302. package/dist/collection/tracking/event.js +0 -3
  303. package/dist/collection/tracking/filter.js +0 -5
  304. package/dist/collection/tracking/index.js +0 -13
  305. package/dist/collection/tracking/models.js +0 -6
  306. package/dist/collection/tracking/product.js +0 -18
  307. package/dist/collection/tracking/search.js +0 -5
  308. package/dist/collection/tracking/widget.js +0 -10
  309. package/dist/collection/utils/collections/collectionsUtils.js +0 -5
  310. package/dist/collection/utils/either.js +0 -3
  311. package/dist/collection/utils/enum/enumUtils.js +0 -3
  312. package/dist/collection/utils/event/Events.js +0 -1
  313. package/dist/collection/utils/number/index.js +0 -4
  314. package/dist/collection/utils/option/option.js +0 -4
  315. package/dist/collection/utils/semigroup/semigroupDiff.js +0 -6
  316. package/dist/collection/utils/token/tokenUtils.js +0 -9
  317. package/dist/esm/cropper-handler_27.entry.js +0 -1105
  318. package/dist/esm/index-51f71d18.js +0 -1323
  319. package/dist/esm/index.js +0 -1
  320. package/dist/esm/loader.js +0 -19
  321. package/dist/esm/polyfills/core-js.js +0 -11
  322. package/dist/esm/polyfills/css-shim.js +0 -1
  323. package/dist/esm/polyfills/dom.js +0 -79
  324. package/dist/esm/polyfills/es5-html-element.js +0 -1
  325. package/dist/esm/polyfills/index.js +0 -34
  326. package/dist/esm/polyfills/system.js +0 -6
  327. package/dist/esm/vviinn-carousel_2.entry.js +0 -996
  328. package/dist/esm/vviinn-widgets.js +0 -19
  329. package/dist/index.cjs.js +0 -1
  330. package/dist/index.js +0 -1
  331. package/dist/loader/cdn.js +0 -3
  332. package/dist/loader/index.cjs.js +0 -3
  333. package/dist/loader/index.d.ts +0 -12
  334. package/dist/loader/index.es2017.js +0 -3
  335. package/dist/loader/index.js +0 -4
  336. package/dist/loader/package.json +0 -10
  337. package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
  338. package/dist/vviinn-widgets/p-3469b71a.js +0 -1
  339. package/dist/vviinn-widgets/p-40bea5b5.entry.js +0 -1
  340. package/dist/vviinn-widgets/p-465d043d.js +0 -15
  341. package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
  342. package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
  343. package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
  344. package/dist/vviinn-widgets/p-cd995515.js +0 -1
  345. package/www/build/p-166970f3.js +0 -1
  346. package/www/build/p-2dd35f19.entry.js +0 -1
  347. package/www/build/p-3469b71a.js +0 -1
  348. package/www/build/p-40bea5b5.entry.js +0 -1
  349. package/www/build/p-465d043d.js +0 -15
  350. package/www/build/p-59bd2a99.js +0 -1
  351. package/www/build/p-61933b75.js +0 -1
  352. package/www/build/p-74ed36af.entry.js +0 -1
  353. package/www/build/p-9def6b8b.entry.js +0 -1
  354. package/www/build/p-a67898be.css +0 -1
  355. package/www/build/p-a6e0710f.entry.js +0 -1
  356. package/www/build/p-cd995515.js +0 -1
  357. package/www/favicon.ico +0 -0
@@ -0,0 +1,67 @@
1
+ import { attachShadow, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { _ as _function, O as Option } from './NonEmptyArray.js';
3
+ import { i as imageSearchState, f as fromAlt, b as foldValueObject, c as scaleWithSized, d as center, a as makeRectangularSearchRequest, e as detectedObjectEq } from './imageSearch.store.js';
4
+
5
+ const vviinnDetectedObjectCss = ":host{--color-primary-system:#0f62fe;--color-primary-hover-system:#014cda;--color-icons-system:#2f8edf;--spacer:8px}:host{--size:32px;--x-position:0;--y-position:0;background:hsla(0,0%,9%,.5);border:none;border-radius:50%;cursor:pointer;display:block;height:var(--size);position:absolute;transform:translate(calc(var(--x-position) - var(--size)*.5),calc(var(--y-position) - var(--size)*.5));transition:opacity .25s;transition:background .1 ease-in-out;width:var(--size);z-index:1}:host(:hover){background:hsla(0,0%,9%,.75)}:host(.active){background:var(--color-primary,var(--color-primary-system))!important;border:2px solid #fff}:host:after{--size:32px;background:#fff;border-radius:50%;content:\"\";cursor:pointer;display:block;height:calc(var(--size)*.25);transform:translate(calc(-50% + var(--size)*.5),calc(-50% + var(--size)*.5));width:calc(var(--size)*.25)}";
6
+
7
+ let VviinnDetectedObject = class extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ attachShadow(this);
12
+ this.detectedObjectClicked = createEvent(this, "detectedObjectClicked", 7);
13
+ this.position = ["0", "0"];
14
+ }
15
+ getObjectPosition() {
16
+ return _function.pipe(imageSearchState.imageBounds, Option.map((bounds) => {
17
+ const objectRectangle = fromAlt(foldValueObject(this.detectedObject).rectangle);
18
+ const { x, y } = _function.pipe(objectRectangle, scaleWithSized(bounds), center);
19
+ return [`${x}px`, `${y}px`];
20
+ }), Option.getOrElse(() => ["0", "0"]));
21
+ }
22
+ selectDetectedObject() {
23
+ _function.pipe(imageSearchState.imageBounds, Option.map((bounds) => {
24
+ const rectangle = foldValueObject(this.detectedObject).rectangle;
25
+ const transformedRect = fromAlt(rectangle);
26
+ const scaledRect = scaleWithSized(bounds)(transformedRect);
27
+ imageSearchState.detectedObject = this.detectedObject;
28
+ imageSearchState.searchArea = Option.some(scaledRect);
29
+ }));
30
+ makeRectangularSearchRequest();
31
+ this.detectedObjectClicked.emit();
32
+ }
33
+ isActive() {
34
+ if (!this.detectedObject)
35
+ return false;
36
+ if (!imageSearchState.detectedObject)
37
+ return false;
38
+ const thisObject = foldValueObject(this.detectedObject);
39
+ const savedObject = foldValueObject(imageSearchState.detectedObject);
40
+ return detectedObjectEq.equals(thisObject, savedObject);
41
+ }
42
+ render() {
43
+ return (h(Host, { class: {
44
+ active: this.isActive(),
45
+ }, onClick: () => this.selectDetectedObject(), style: {
46
+ "--x-position": this.getObjectPosition()[0],
47
+ "--y-position": this.getObjectPosition()[1],
48
+ } }));
49
+ }
50
+ static get style() { return vviinnDetectedObjectCss; }
51
+ };
52
+ VviinnDetectedObject = /*@__PURE__*/ proxyCustomElement(VviinnDetectedObject, [1, "vviinn-detected-object", {
53
+ "detectedObject": [16],
54
+ "position": [32]
55
+ }]);
56
+ function defineCustomElement() {
57
+ const components = ["vviinn-detected-object"];
58
+ components.forEach(tagName => { switch (tagName) {
59
+ case "vviinn-detected-object":
60
+ if (!customElements.get(tagName)) {
61
+ customElements.define(tagName, VviinnDetectedObject);
62
+ }
63
+ break;
64
+ } });
65
+ }
66
+
67
+ export { VviinnDetectedObject as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnEmptyResults$1, d as defineCustomElement$1 } from './vviinn-empty-results2.js';
2
+
3
+ const VviinnEmptyResults = VviinnEmptyResults$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnEmptyResults, defineCustomElement };
@@ -0,0 +1,35 @@
1
+ import { attachShadow, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './vviinn-error2.js';
3
+
4
+ const vviinnEmptyResultsCss = ":host{display:grid}vviinn-error{justify-items:center}";
5
+
6
+ let VviinnEmptyResults = class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ attachShadow(this);
11
+ this.actionClick = createEvent(this, "actionClick", 7);
12
+ }
13
+ render() {
14
+ return (h(Host, null, h("vviinn-error", null, h("svg", { slot: "icon", class: "icon", width: "32", height: "32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z", fill: "#525252" }), h("path", { d: "M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z", fill: "#525252" })), h("h4", { slot: "title" }, "Leider nichts gefunden"), h("span", { slot: "text" }, "Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal."))));
15
+ }
16
+ static get style() { return vviinnEmptyResultsCss; }
17
+ };
18
+ VviinnEmptyResults = /*@__PURE__*/ proxyCustomElement(VviinnEmptyResults, [1, "vviinn-empty-results"]);
19
+ function defineCustomElement() {
20
+ const components = ["vviinn-empty-results", "vviinn-error"];
21
+ components.forEach(tagName => { switch (tagName) {
22
+ case "vviinn-empty-results":
23
+ if (!customElements.get(tagName)) {
24
+ customElements.define(tagName, VviinnEmptyResults);
25
+ }
26
+ break;
27
+ case "vviinn-error":
28
+ if (!customElements.get(tagName)) {
29
+ defineCustomElement$1();
30
+ }
31
+ break;
32
+ } });
33
+ }
34
+
35
+ export { VviinnEmptyResults as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnError$1, d as defineCustomElement$1 } from './vviinn-error2.js';
2
+
3
+ const VviinnError = VviinnError$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnError, defineCustomElement };
@@ -0,0 +1,28 @@
1
+ import { attachShadow, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+
3
+ const vviinnErrorCss = ":host{grid-gap:20px;background:#f4f4f4;border-radius:8px;display:grid;padding:24px;text-align:center}::slotted(svg){align-self:center;display:grid}::slotted(h4){font-size:18px;font-weight:600;line-height:24px;margin:unset}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;color:var(--color-primary,var(--color-primary-system));cursor:pointer;font-size:16px;font-weight:600;line-height:20px}";
4
+
5
+ let VviinnError = class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ attachShadow(this);
10
+ }
11
+ render() {
12
+ return (h(Host, null, h("slot", { name: "icon" }), h("slot", { name: "title" }), h("slot", { name: "text" }), h("slot", { name: "action" })));
13
+ }
14
+ static get style() { return vviinnErrorCss; }
15
+ };
16
+ VviinnError = /*@__PURE__*/ proxyCustomElement(VviinnError, [1, "vviinn-error"]);
17
+ function defineCustomElement() {
18
+ const components = ["vviinn-error"];
19
+ components.forEach(tagName => { switch (tagName) {
20
+ case "vviinn-error":
21
+ if (!customElements.get(tagName)) {
22
+ customElements.define(tagName, VviinnError);
23
+ }
24
+ break;
25
+ } });
26
+ }
27
+
28
+ export { VviinnError as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnExampleImage$1, d as defineCustomElement$1 } from './vviinn-example-image2.js';
2
+
3
+ const VviinnExampleImage = VviinnExampleImage$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnExampleImage, defineCustomElement };
@@ -0,0 +1,57 @@
1
+ import { attachShadow, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { g as toFile, i as imageSearchState } from './imageSearch.store.js';
3
+ import { d as defineCustomElement$1 } from './vviinn-preloader2.js';
4
+
5
+ const vviinnExampleImageCss = ":host{display:block;margin-bottom:8px;position:relative}img{cursor:pointer;height:auto;width:100%}.image-preloader{background:rgba(0,0,0,.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;pointer-events:none;position:absolute;right:12px;z-index:1}vviinn-preloader{--preloader-size:12px}@media (max-width:640px){.image-preloader{display:block}}";
6
+
7
+ let VviinnExampleImage = class extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ attachShadow(this);
12
+ this.exampleImageSelected = createEvent(this, "exampleImageSelected", 7);
13
+ this.exampleImageError = createEvent(this, "exampleImageError", 7);
14
+ this.src = "";
15
+ this.width = 0;
16
+ this.height = 0;
17
+ this.selected = false;
18
+ }
19
+ async selectImage() {
20
+ this.selected = true;
21
+ const file = await toFile(this.src);
22
+ imageSearchState.imageSelectedObserver.next(file);
23
+ this.selected = false;
24
+ }
25
+ showPreloader() {
26
+ return ((imageSearchState.objectDetectionInProgress ||
27
+ imageSearchState.status === "pending") &&
28
+ this.selected);
29
+ }
30
+ render() {
31
+ return (h(Host, null, this.showPreloader() ? (h("div", { class: "image-preloader" }, h("vviinn-preloader", null))) : null, h("img", { onClick: () => this.selectImage(), src: this.src, width: this.width, height: this.height })));
32
+ }
33
+ static get style() { return vviinnExampleImageCss; }
34
+ };
35
+ VviinnExampleImage = /*@__PURE__*/ proxyCustomElement(VviinnExampleImage, [1, "vviinn-example-image", {
36
+ "src": [1],
37
+ "width": [2],
38
+ "height": [2],
39
+ "selected": [32]
40
+ }]);
41
+ function defineCustomElement() {
42
+ const components = ["vviinn-example-image", "vviinn-preloader"];
43
+ components.forEach(tagName => { switch (tagName) {
44
+ case "vviinn-example-image":
45
+ if (!customElements.get(tagName)) {
46
+ customElements.define(tagName, VviinnExampleImage);
47
+ }
48
+ break;
49
+ case "vviinn-preloader":
50
+ if (!customElements.get(tagName)) {
51
+ defineCustomElement$1();
52
+ }
53
+ break;
54
+ } });
55
+ }
56
+
57
+ export { VviinnExampleImage as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnExampleImages$1, d as defineCustomElement$1 } from './vviinn-example-images2.js';
2
+
3
+ const VviinnExampleImages = VviinnExampleImages$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnExampleImages, defineCustomElement };
@@ -0,0 +1,53 @@
1
+ import { attachShadow, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { s as slotChangeListener } from './customized-slots.js';
3
+ import { d as defineCustomElement$2 } from './vviinn-example-image2.js';
4
+ import { d as defineCustomElement$1 } from './vviinn-preloader2.js';
5
+
6
+ const vviinnExampleImagesCss = "h3{font-size:22px;font-weight:600;line-height:32px;margin:0 0 16px;text-align:center}.images{-moz-column-count:2;column-count:2;-moz-column-gap:16px;column-gap:16px;display:block}";
7
+
8
+ let VviinnExampleImages = class extends HTMLElement {
9
+ constructor() {
10
+ super();
11
+ this.__registerHost();
12
+ attachShadow(this);
13
+ this.imageSelected = createEvent(this, "imageSelected", 7);
14
+ this.imageSelectedError = createEvent(this, "imageSelectedError", 7);
15
+ }
16
+ handleImageSelection() {
17
+ this.imageSelected.emit();
18
+ }
19
+ handleImageSelectionError() {
20
+ this.imageSelectedError.emit();
21
+ }
22
+ componentWillLoad() {
23
+ slotChangeListener(this, this.el);
24
+ }
25
+ render() {
26
+ return (h(Host, null, h("slot", { name: "vviinn-example-images-title" }, h("h3", null, "Mit den Beispielbildern die Suche direkt ausprobieren")), h("div", { class: "images" }, h("slot", { name: "vviinn-example-images-1" }, h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=" })), h("slot", { name: "vviinn-example-images-2" }, h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=" })), h("slot", { name: "vviinn-example-images-3" }, h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=" })), h("slot", { name: "vviinn-example-images-4" }, h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=" })))));
27
+ }
28
+ get el() { return this; }
29
+ static get style() { return vviinnExampleImagesCss; }
30
+ };
31
+ VviinnExampleImages = /*@__PURE__*/ proxyCustomElement(VviinnExampleImages, [1, "vviinn-example-images", undefined, [[0, "exampleImageSelected", "handleImageSelection"], [0, "exampleImageError", "handleImageSelectionError"]]]);
32
+ function defineCustomElement() {
33
+ const components = ["vviinn-example-images", "vviinn-example-image", "vviinn-preloader"];
34
+ components.forEach(tagName => { switch (tagName) {
35
+ case "vviinn-example-images":
36
+ if (!customElements.get(tagName)) {
37
+ customElements.define(tagName, VviinnExampleImages);
38
+ }
39
+ break;
40
+ case "vviinn-example-image":
41
+ if (!customElements.get(tagName)) {
42
+ defineCustomElement$2();
43
+ }
44
+ break;
45
+ case "vviinn-preloader":
46
+ if (!customElements.get(tagName)) {
47
+ defineCustomElement$1();
48
+ }
49
+ break;
50
+ } });
51
+ }
52
+
53
+ export { VviinnExampleImages as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnImageSelector$1, d as defineCustomElement$1 } from './vviinn-image-selector2.js';
2
+
3
+ const VviinnImageSelector = VviinnImageSelector$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnImageSelector, defineCustomElement };
@@ -0,0 +1,135 @@
1
+ import { attachShadow, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { E as Either, h as matchW, j as imageSearcStateListener, i as imageSearchState } from './imageSearch.store.js';
3
+ import { _ as _function, O as Option } from './NonEmptyArray.js';
4
+ import { o as isSome, n as none } from './Handler.js';
5
+ import { d as defineCustomElement$1 } from './vviinn-preloader2.js';
6
+
7
+ /**
8
+ * Find the first element returned by an option based selector function
9
+ *
10
+ * @example
11
+ * import { findFirstMap } from 'fp-ts/ReadonlyArray'
12
+ * import { some, none } from 'fp-ts/Option'
13
+ *
14
+ * interface Person {
15
+ * readonly name: string
16
+ * readonly age?: number
17
+ * }
18
+ *
19
+ * const persons: ReadonlyArray<Person> = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]
20
+ *
21
+ * // returns the name of the first person that has an age
22
+ * assert.deepStrictEqual(findFirstMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Mary'))
23
+ *
24
+ * @since 2.5.0
25
+ */
26
+ var findFirstMap$1 = function (f) { return function (as) {
27
+ for (var i = 0; i < as.length; i++) {
28
+ var out = f(as[i]);
29
+ if (isSome(out)) {
30
+ return out;
31
+ }
32
+ }
33
+ return none;
34
+ }; };
35
+
36
+ /**
37
+ * Given a selector function which takes an element and returns an option,
38
+ * this function applies the selector to each element of the array and
39
+ * returns the first `Some` result. Otherwise it returns `None`.
40
+ *
41
+ * @example
42
+ * import { findFirstMap } from 'fp-ts/Array'
43
+ * import { some, none } from 'fp-ts/Option'
44
+ *
45
+ * interface Person {
46
+ * readonly name: string;
47
+ * readonly age: number;
48
+ * }
49
+ *
50
+ * const persons: Array<Person> = [
51
+ * { name: "John", age: 16 },
52
+ * { name: "Mary", age: 45 },
53
+ * { name: "Joey", age: 28 },
54
+ * ];
55
+ *
56
+ * const nameOfPersonAbove18 = (p: Person) => (p.age <= 18 ? none : some(p.name));
57
+ * const nameOfPersonAbove70 = (p: Person) => (p.age <= 70 ? none : some(p.name));
58
+ * assert.deepStrictEqual(findFirstMap(nameOfPersonAbove18)(persons), some("Mary"));
59
+ * assert.deepStrictEqual(findFirstMap(nameOfPersonAbove70)(persons), none);
60
+ *
61
+ * @category destructors
62
+ * @since 2.0.0
63
+ */
64
+ var findFirstMap = findFirstMap$1;
65
+
66
+ const SUPPORTED_FILE_TYPES = ["jpg", "jpeg", "png", "webp"];
67
+ const unsupportedFileTypeError = {
68
+ kind: "client",
69
+ inner: "File format not supported",
70
+ };
71
+ const checkImageType = (file) => {
72
+ const fileType = file.type.split("/")[1];
73
+ const supportedFileType = findFirstMap((supportedType) => supportedType === fileType ? Option.some(file) : Option.none)(SUPPORTED_FILE_TYPES);
74
+ return _function.pipe(supportedFileType, Either.fromOption(() => unsupportedFileTypeError));
75
+ };
76
+
77
+ const fileDoesntExistError = {
78
+ kind: "app",
79
+ inner: "File doesnt exist",
80
+ };
81
+
82
+ const checkFileWithExtention = (file) => _function.pipe(file, Option.fromNullable, Either.fromOption(() => fileDoesntExistError), Either.chain(checkImageType));
83
+
84
+ const vviinnImageSelectorCss = ":host{display:block}:host(::hover){background:#f5f5f5}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}label{cursor:pointer;display:grid;padding:.5rem;transition:background .1s ease-in-out}";
85
+
86
+ let VviinnImageSelector = class extends HTMLElement {
87
+ constructor() {
88
+ super();
89
+ this.__registerHost();
90
+ attachShadow(this);
91
+ this.imageSelected = createEvent(this, "imageSelected", 7);
92
+ this.imageSelectedError = createEvent(this, "imageSelectedError", 7);
93
+ }
94
+ async handleInputChange(event) {
95
+ const input = event.target;
96
+ _function.pipe(checkFileWithExtention(input.files[0]), matchW(() => this.imageSelectedError.emit(), (file) => {
97
+ imageSearchState.imageSelectedObserver.next(file);
98
+ }));
99
+ input.value = null;
100
+ }
101
+ componentWillLoad() {
102
+ imageSearcStateListener("status", (status) => {
103
+ if (status !== "imageProcessed")
104
+ return;
105
+ this.imageSelected.emit();
106
+ });
107
+ }
108
+ isLoading() {
109
+ return (imageSearchState.status === "imageSelected" ||
110
+ imageSearchState.status === "pending" ||
111
+ imageSearchState.objectDetectionInProgress);
112
+ }
113
+ render() {
114
+ return (h(Host, { exportparts: "button" }, this.isLoading() ? h("vviinn-preloader", null) : null, this.isLoading() ? null : (h("label", { htmlFor: "fileInput", part: "button" }, h("slot", { name: "upload-button-text" }, "Upload image"))), h("input", { id: "fileInput", class: "visually-hidden", type: "file", accept: "image/*", onChange: (event) => this.handleInputChange(event) })));
115
+ }
116
+ static get style() { return vviinnImageSelectorCss; }
117
+ };
118
+ VviinnImageSelector = /*@__PURE__*/ proxyCustomElement(VviinnImageSelector, [1, "vviinn-image-selector"]);
119
+ function defineCustomElement() {
120
+ const components = ["vviinn-image-selector", "vviinn-preloader"];
121
+ components.forEach(tagName => { switch (tagName) {
122
+ case "vviinn-image-selector":
123
+ if (!customElements.get(tagName)) {
124
+ customElements.define(tagName, VviinnImageSelector);
125
+ }
126
+ break;
127
+ case "vviinn-preloader":
128
+ if (!customElements.get(tagName)) {
129
+ defineCustomElement$1();
130
+ }
131
+ break;
132
+ } });
133
+ }
134
+
135
+ export { VviinnImageSelector as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnImageView$1, d as defineCustomElement$1 } from './vviinn-image-view2.js';
2
+
3
+ const VviinnImageView = VviinnImageView$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnImageView, defineCustomElement };
@@ -0,0 +1,95 @@
1
+ import { attachShadow, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { m as move, i as imageSearchState, k as fromImage, l as dimensionsFromImage, n as scaleByLargestSide } from './imageSearch.store.js';
3
+ import { O as Option, _ as _function, s as sequenceToOption } from './NonEmptyArray.js';
4
+ import { d as defineCustomElement$5 } from './cropper-handler2.js';
5
+ import { d as defineCustomElement$4 } from './highlight-box2.js';
6
+ import { d as defineCustomElement$3 } from './image-cropper2.js';
7
+ import { d as defineCustomElement$2 } from './vviinn-detected-object2.js';
8
+ import { d as defineCustomElement$1 } from './vviinn-preloader2.js';
9
+
10
+ const vviinnImageViewCss = ":host{display:grid;justify-self:center;position:relative}img{box-sizing:border-box;filter:brightness(60%);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:-1}.image-preloader{background:rgba(0,0,0,.25);border-radius:4px;bottom:18px;padding:4px 6px;pointer-events:none;position:absolute;right:18px;z-index:4}vviinn-preloader{--preloader-size:12px}";
11
+
12
+ const getImageSizes = (i) => {
13
+ const dimensions = dimensionsFromImage(i);
14
+ const resize = scaleByLargestSide(288);
15
+ const newDimensions = resize(dimensions);
16
+ const sizes = newDimensions.map(d => d.size);
17
+ return [sizes[0], sizes[1]];
18
+ };
19
+ let VviinnImageView = class extends HTMLElement {
20
+ constructor() {
21
+ super();
22
+ this.__registerHost();
23
+ attachShadow(this);
24
+ }
25
+ handleInitialImageLoad(ev) {
26
+ const target = ev.target;
27
+ const imageBounds = fromImage(target);
28
+ const padding = 12;
29
+ const { x, y } = move(imageBounds, { x: padding, y: padding });
30
+ const searchArea = {
31
+ x,
32
+ y,
33
+ width: imageBounds.width - padding * 2,
34
+ height: imageBounds.height - padding * 2,
35
+ };
36
+ imageSearchState.imageBounds = Option.some(imageBounds);
37
+ imageSearchState.searchArea = Option.some(searchArea);
38
+ }
39
+ renderDetectedObject(object) {
40
+ return h("vviinn-detected-object", { detectedObject: object });
41
+ }
42
+ renderImage() {
43
+ return _function.pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), Option.map(([url, refImage]) => {
44
+ const [width, height] = getImageSizes(refImage);
45
+ const image = (h("img", { decoding: "async", width: width, height: height, src: url, onLoad: (el) => this.handleInitialImageLoad(el), draggable: false }));
46
+ return image;
47
+ }), Option.getOrElse(() => null));
48
+ }
49
+ renderCropper() {
50
+ return _function.pipe(imageSearchState.imageUrl, Option.map(() => h("image-cropper", null)), Option.getOrElse(() => null));
51
+ }
52
+ render() {
53
+ return (h(Host, null, imageSearchState.loading ||
54
+ imageSearchState.objectDetectionInProgress ? (h("div", { class: "image-preloader" }, h("vviinn-preloader", null))) : null, h("highlight-box", null), this.renderImage(), this.renderCropper(), imageSearchState.detectedObjects.map((o) => this.renderDetectedObject(o))));
55
+ }
56
+ static get style() { return vviinnImageViewCss; }
57
+ };
58
+ VviinnImageView = /*@__PURE__*/ proxyCustomElement(VviinnImageView, [1, "vviinn-image-view"]);
59
+ function defineCustomElement() {
60
+ const components = ["vviinn-image-view", "cropper-handler", "highlight-box", "image-cropper", "vviinn-detected-object", "vviinn-preloader"];
61
+ components.forEach(tagName => { switch (tagName) {
62
+ case "vviinn-image-view":
63
+ if (!customElements.get(tagName)) {
64
+ customElements.define(tagName, VviinnImageView);
65
+ }
66
+ break;
67
+ case "cropper-handler":
68
+ if (!customElements.get(tagName)) {
69
+ defineCustomElement$5();
70
+ }
71
+ break;
72
+ case "highlight-box":
73
+ if (!customElements.get(tagName)) {
74
+ defineCustomElement$4();
75
+ }
76
+ break;
77
+ case "image-cropper":
78
+ if (!customElements.get(tagName)) {
79
+ defineCustomElement$3();
80
+ }
81
+ break;
82
+ case "vviinn-detected-object":
83
+ if (!customElements.get(tagName)) {
84
+ defineCustomElement$2();
85
+ }
86
+ break;
87
+ case "vviinn-preloader":
88
+ if (!customElements.get(tagName)) {
89
+ defineCustomElement$1();
90
+ }
91
+ break;
92
+ } });
93
+ }
94
+
95
+ export { VviinnImageView as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnModal$1, d as defineCustomElement$1 } from './vviinn-modal2.js';
2
+
3
+ const VviinnModal = VviinnModal$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnModal, defineCustomElement };
@@ -0,0 +1,46 @@
1
+ import { attachShadow, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+
3
+ const vviinnModalCss = ":host{background:#fff;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;max-width:960px}@media (max-width:415px){:host{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-name:a;animation-name:a}:host(.closed){-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-name:b;animation-name:b}.body{overflow-y:auto}}@media (max-width:640px) and (min-width:415px){:host{max-width:80%}}.head{grid-gap:16px;align-items:center;border-bottom:1px solid #f4f4f4;display:grid;grid-template-columns:-webkit-min-content auto -webkit-min-content;grid-template-columns:min-content auto min-content;justify-items:center;padding:16px}.title{font-size:18px;font-weight:600;line-height:24px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:unset}@-webkit-keyframes a{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes a{0%{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes b{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes b{0%{transform:translateY(0)}to{transform:translateY(100%)}}";
4
+
5
+ let VviinnModal = class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ attachShadow(this);
10
+ this.modalClosed = createEvent(this, "modalClosed", 7);
11
+ this.secondaryActionClicked = createEvent(this, "secondaryActionClicked", 7);
12
+ this.active = false;
13
+ this.slider = false;
14
+ }
15
+ close() {
16
+ this.active = false;
17
+ setTimeout(() => {
18
+ this.modalClosed.emit();
19
+ }, this.slider ? 500 : 0);
20
+ }
21
+ handleAnimationEnd(ev) {
22
+ if (ev.animationName !== "fade-in")
23
+ return;
24
+ this.slider = true;
25
+ }
26
+ render() {
27
+ return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, h("button", { part: "secondary-action", onClick: () => this.secondaryActionClicked.emit() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { class: "title", part: "title" }, "Bildsuche"), h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#333333" })))), h("div", { class: "body" }, h("slot", null))));
28
+ }
29
+ static get style() { return vviinnModalCss; }
30
+ };
31
+ VviinnModal = /*@__PURE__*/ proxyCustomElement(VviinnModal, [1, "vviinn-modal", {
32
+ "active": [1540],
33
+ "slider": [32]
34
+ }]);
35
+ function defineCustomElement() {
36
+ const components = ["vviinn-modal"];
37
+ components.forEach(tagName => { switch (tagName) {
38
+ case "vviinn-modal":
39
+ if (!customElements.get(tagName)) {
40
+ customElements.define(tagName, VviinnModal);
41
+ }
42
+ break;
43
+ } });
44
+ }
45
+
46
+ export { VviinnModal as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnOnboardingCard1$1, d as defineCustomElement$1 } from './vviinn-onboarding-card-12.js';
2
+
3
+ const VviinnOnboardingCard1 = VviinnOnboardingCard1$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnOnboardingCard1, defineCustomElement };
@@ -0,0 +1,34 @@
1
+ import { attachShadow, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
+ import { s as slotChangeListener } from './customized-slots.js';
3
+ import { O as OnboardingCard1Icon } from './index2.js';
4
+
5
+ const onboardingCardCss = ":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2,1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons,var(--color-icons-system))}.text{grid-gap:8px;display:grid}";
6
+
7
+ let VviinnOnboardingCard1 = class extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ attachShadow(this);
12
+ }
13
+ componentWillLoad() {
14
+ slotChangeListener(this, this.el);
15
+ }
16
+ render() {
17
+ return (h(Host, null, h("slot", { name: "onboarding-card-1-icon" }, h(OnboardingCard1Icon, null)), h("slot", { name: "onboarding-card-1-text" }, h("div", { class: "text" }, h("h4", null, "Starte die Bildsuche"), h("p", null, "Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera.")))));
18
+ }
19
+ get el() { return this; }
20
+ static get style() { return onboardingCardCss; }
21
+ };
22
+ VviinnOnboardingCard1 = /*@__PURE__*/ proxyCustomElement(VviinnOnboardingCard1, [1, "vviinn-onboarding-card-1"]);
23
+ function defineCustomElement() {
24
+ const components = ["vviinn-onboarding-card-1"];
25
+ components.forEach(tagName => { switch (tagName) {
26
+ case "vviinn-onboarding-card-1":
27
+ if (!customElements.get(tagName)) {
28
+ customElements.define(tagName, VviinnOnboardingCard1);
29
+ }
30
+ break;
31
+ } });
32
+ }
33
+
34
+ export { VviinnOnboardingCard1 as V, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { V as VviinnOnboardingCard2$1, d as defineCustomElement$1 } from './vviinn-onboarding-card-22.js';
2
+
3
+ const VviinnOnboardingCard2 = VviinnOnboardingCard2$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { VviinnOnboardingCard2, defineCustomElement };