vviinn-widgets 2.1.0 → 2.2.2

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 (307) hide show
  1. package/dist/cjs/Handler-d1a8a86a.js +329 -0
  2. package/dist/{vviinn-widgets/app-globals-e0943e34.js → cjs/app-globals-30781f30.js} +15 -925
  3. package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
  4. package/dist/{vviinn-widgets/customized-slots-f3449695.js → cjs/customized-slots-5d904d8e.js} +6 -3
  5. package/dist/cjs/highlight-box_22.cjs.entry.js +737 -0
  6. package/{www/build/imageSearch.store-407f49f0.js → dist/cjs/imageSearch.store-128957a4.js} +11573 -11902
  7. package/dist/cjs/index-741a970d.js +1354 -0
  8. package/dist/cjs/index-c493804d.js +41 -0
  9. package/dist/cjs/index.cjs.js +2 -0
  10. package/dist/cjs/loader.cjs.js +23 -0
  11. package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
  12. package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
  13. package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
  14. package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
  15. package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +31 -30
  16. package/dist/cjs/vviinn-widgets.cjs.js +21 -0
  17. package/dist/collection/Image/error.js +14 -0
  18. package/dist/collection/Image/form.js +5 -0
  19. package/dist/collection/Image/fromFile.js +18 -0
  20. package/dist/collection/Image/imageToB64.js +9 -0
  21. package/dist/collection/Image/index.js +0 -0
  22. package/dist/collection/Image/renderPromise.js +6 -0
  23. package/dist/collection/Image/resizeImage.js +28 -0
  24. package/dist/collection/Image/sizing.js +39 -0
  25. package/dist/collection/Image/toFile.js +17 -0
  26. package/dist/collection/analytics/GAnalytics.js +32 -0
  27. package/dist/collection/analytics/GeneralAnalytics.js +9 -0
  28. package/dist/collection/analytics/GtagAnalytics.js +35 -0
  29. package/dist/collection/analytics/ProductAnalytics.js +1 -0
  30. package/dist/collection/campaign/Campaign.js +8 -0
  31. package/dist/collection/campaign/CampaignService.js +5 -0
  32. package/dist/collection/campaign/VCSCampaign.js +1 -0
  33. package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
  34. package/dist/collection/campaign/VCSCampaignService.js +5 -0
  35. package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
  36. package/dist/collection/campaign/VPRCampaignService.js +5 -0
  37. package/dist/collection/collection-manifest.json +43 -0
  38. package/dist/collection/components/customized-slots.js +47 -0
  39. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
  40. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
  41. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
  42. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
  43. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
  44. package/dist/{vviinn-widgets/image-cropper.entry.js → collection/components/image-search/image-view/image-cropper/image-cropper.js} +54 -32
  45. package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
  46. package/dist/collection/components/image-search/search-filters/search-filters.js +102 -0
  47. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +138 -0
  48. package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +115 -18
  49. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
  50. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
  51. package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
  52. package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
  53. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
  54. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
  55. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
  56. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
  57. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
  58. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
  59. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
  60. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
  61. package/dist/{vviinn-widgets/index-c9483145.js → collection/components/vviinn-icons/index.js} +13 -12
  62. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
  63. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
  64. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
  65. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +83 -0
  66. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
  67. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
  68. package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
  69. package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
  70. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
  71. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
  72. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
  73. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
  74. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
  75. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
  76. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
  77. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
  78. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
  79. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
  80. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
  81. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
  82. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
  83. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
  84. package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
  85. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
  86. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -0
  87. package/dist/collection/components/vviinn-slider/arrow.js +11 -0
  88. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
  89. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
  90. package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
  91. package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
  92. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
  93. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
  94. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
  95. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
  96. package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
  97. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
  98. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
  99. package/dist/collection/components/vviinn-vpr-widget/GridMode.js +1 -0
  100. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
  101. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +441 -0
  102. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +74 -0
  103. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -0
  104. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +177 -0
  105. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
  106. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +247 -0
  107. package/dist/collection/cropper/Cropper.js +1 -0
  108. package/dist/collection/cropper/Handler.js +61 -0
  109. package/dist/collection/dom/index.js +3 -0
  110. package/dist/collection/error.js +14 -0
  111. package/dist/collection/file/index.js +4 -0
  112. package/dist/collection/geometry/Clip.js +14 -0
  113. package/dist/collection/geometry/Point.js +32 -0
  114. package/dist/collection/geometry/Rectangle.js +95 -0
  115. package/dist/collection/geometry/RectangleAlt.js +1 -0
  116. package/dist/collection/geometry/Sized.js +8 -0
  117. package/dist/collection/global.js +19 -0
  118. package/dist/collection/index.js +1 -0
  119. package/dist/collection/interfaces/generated.js +5 -0
  120. package/dist/collection/interfaces/recommendation.js +1 -0
  121. package/dist/collection/network/apiClient.js +9 -0
  122. package/dist/collection/network/ion/File.js +14 -0
  123. package/dist/collection/network/ion/Form.js +64 -0
  124. package/dist/collection/network/ion/Link.js +8 -0
  125. package/dist/collection/network/ion/ValueObject.js +23 -0
  126. package/dist/collection/network/request.js +19 -0
  127. package/dist/collection/network/utils.js +37 -0
  128. package/dist/collection/recommendation/recommendation.js +1 -0
  129. package/dist/collection/searchSession/searchSession.js +26 -0
  130. package/dist/collection/sentry.js +14 -0
  131. package/dist/collection/slider/GridMode.js +1 -0
  132. package/dist/collection/store/file-processing.js +13 -0
  133. package/dist/collection/store/imageSearch.store.js +138 -0
  134. package/dist/collection/store/store.js +11 -0
  135. package/dist/collection/stories/Button.js +21 -0
  136. package/dist/collection/stories/Button.stories.js +42 -0
  137. package/dist/collection/stories/Header.js +45 -0
  138. package/dist/collection/stories/Header.stories.js +15 -0
  139. package/dist/collection/stories/Page.js +61 -0
  140. package/dist/collection/stories/Page.stories.js +19 -0
  141. package/dist/collection/stories/assets/code-brackets.svg +1 -0
  142. package/dist/collection/stories/assets/colors.svg +1 -0
  143. package/dist/collection/stories/assets/comments.svg +1 -0
  144. package/dist/collection/stories/assets/direction.svg +1 -0
  145. package/dist/collection/stories/assets/flow.svg +1 -0
  146. package/dist/collection/stories/assets/plugin.svg +1 -0
  147. package/dist/collection/stories/assets/repo.svg +1 -0
  148. package/dist/collection/stories/assets/stackalt.svg +1 -0
  149. package/dist/collection/stories/image-selector.stories.js +6 -0
  150. package/dist/collection/stories/image-view.stories.js +6 -0
  151. package/dist/collection/stories/modal.stories.js +12 -0
  152. package/dist/collection/stories/onboarding.stories.js +11 -0
  153. package/dist/collection/stories/overlay.stories.js +5 -0
  154. package/dist/collection/stories/overlayedModal.stories.js +8 -0
  155. package/dist/collection/stories/privacy-badge.stories.js +11 -0
  156. package/dist/collection/stories/slider.stories.js +17 -0
  157. package/dist/collection/stories/teaser.stories.js +5 -0
  158. package/dist/collection/stories/vps-widget.stories.js +47 -0
  159. package/dist/collection/stories/vviinn-product.stories.js +19 -0
  160. package/dist/collection/utils/collections/collectionsUtils.js +5 -0
  161. package/dist/collection/utils/either.js +3 -0
  162. package/dist/collection/utils/enum/enumUtils.js +3 -0
  163. package/dist/collection/utils/event/Events.js +1 -0
  164. package/dist/collection/utils/number/index.js +4 -0
  165. package/dist/collection/utils/option/option.js +4 -0
  166. package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
  167. package/dist/collection/utils/token/tokenUtils.js +9 -0
  168. package/dist/esm/Handler-639a4cb3.js +308 -0
  169. package/{www/build/app-globals-e0943e34.js → dist/esm/app-globals-345e497d.js} +10 -922
  170. package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
  171. package/{www/build/customized-slots-f3449695.js → dist/esm/customized-slots-a76a8d41.js} +1 -1
  172. package/dist/esm/highlight-box_22.entry.js +712 -0
  173. package/dist/{vviinn-widgets/imageSearch.store-407f49f0.js → esm/imageSearch.store-8eab0da1.js} +11510 -11872
  174. package/dist/esm/index-6fa21e24.js +1323 -0
  175. package/{www/build/index-c9483145.js → dist/esm/index-8cb063df.js} +6 -4
  176. package/dist/esm/index.js +1 -0
  177. package/dist/esm/loader.js +19 -0
  178. package/dist/esm/polyfills/core-js.js +11 -0
  179. package/dist/esm/polyfills/css-shim.js +1 -0
  180. package/dist/esm/polyfills/dom.js +79 -0
  181. package/dist/esm/polyfills/es5-html-element.js +1 -0
  182. package/dist/esm/polyfills/index.js +34 -0
  183. package/dist/esm/polyfills/system.js +6 -0
  184. package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
  185. package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
  186. package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
  187. package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
  188. package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +4 -7
  189. package/dist/esm/vviinn-widgets.js +19 -0
  190. package/dist/index.cjs.js +1 -0
  191. package/dist/index.js +1 -0
  192. package/dist/loader/cdn.js +3 -0
  193. package/dist/loader/index.cjs.js +3 -0
  194. package/dist/loader/index.d.ts +12 -0
  195. package/dist/loader/index.es2017.js +3 -0
  196. package/dist/loader/index.js +4 -0
  197. package/dist/loader/package.json +10 -0
  198. package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
  199. package/dist/types/components/vviinn-icons/index.d.ts +2 -0
  200. package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
  201. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
  202. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
  203. package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
  204. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
  205. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +13 -3
  206. package/dist/types/components.d.ts +54 -0
  207. package/dist/vviinn-widgets/index.esm.js +0 -1
  208. package/dist/vviinn-widgets/p-04b06ea9.entry.js +1 -0
  209. package/dist/vviinn-widgets/p-400eb62f.entry.js +1 -0
  210. package/dist/vviinn-widgets/p-56fc949a.js +1 -0
  211. package/dist/vviinn-widgets/p-59edfbe2.js +1 -0
  212. package/dist/vviinn-widgets/p-78ccc9eb.js +15 -0
  213. package/dist/vviinn-widgets/p-9d24f51e.entry.js +1 -0
  214. package/dist/vviinn-widgets/p-d085199d.entry.js +1 -0
  215. package/dist/vviinn-widgets/p-e1ba8626.js +1 -0
  216. package/dist/vviinn-widgets/p-e38f4aa2.entry.js +1 -0
  217. package/dist/vviinn-widgets/p-e67cae57.js +1 -0
  218. package/dist/vviinn-widgets/p-f47e82b2.entry.js +1 -0
  219. package/dist/vviinn-widgets/p-f582db5c.js +1 -0
  220. package/dist/vviinn-widgets/p-fb14e3cc.entry.js +1 -0
  221. package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
  222. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
  223. package/package.json +3 -1
  224. package/www/build/index.esm.js +0 -1
  225. package/www/build/p-04b06ea9.entry.js +1 -0
  226. package/www/build/p-400eb62f.entry.js +1 -0
  227. package/www/build/p-56fc949a.js +1 -0
  228. package/www/build/p-59edfbe2.js +1 -0
  229. package/www/build/p-78ccc9eb.js +15 -0
  230. package/www/build/p-7e4978d5.js +1 -0
  231. package/www/build/p-9d24f51e.entry.js +1 -0
  232. package/www/build/p-a67898be.css +1 -0
  233. package/www/build/p-d085199d.entry.js +1 -0
  234. package/www/build/p-e1ba8626.js +1 -0
  235. package/www/build/p-e38f4aa2.entry.js +1 -0
  236. package/www/build/p-e67cae57.js +1 -0
  237. package/www/build/p-f47e82b2.entry.js +1 -0
  238. package/www/build/p-f582db5c.js +1 -0
  239. package/www/build/p-fb14e3cc.entry.js +1 -0
  240. package/www/build/vviinn-widgets.css +1 -6
  241. package/www/build/vviinn-widgets.esm.js +1 -125
  242. package/www/index.html +6 -13
  243. package/dist/vviinn-widgets/Array-4b9f84cf.js +0 -4295
  244. package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
  245. package/dist/vviinn-widgets/NonEmptyArray-6ef0d207.js +0 -4370
  246. package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
  247. package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
  248. package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
  249. package/dist/vviinn-widgets/index-b6d739a9.js +0 -3010
  250. package/dist/vviinn-widgets/number-98d54dd6.js +0 -1533
  251. package/dist/vviinn-widgets/search-filters.entry.js +0 -73
  252. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
  253. package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -205
  254. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -52
  255. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
  256. package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
  257. package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
  258. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
  259. package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
  260. package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
  261. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
  262. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
  263. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
  264. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
  265. package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
  266. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
  267. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
  268. package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -176
  269. package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
  270. package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
  271. package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
  272. package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
  273. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -128
  274. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
  275. package/www/build/Array-4b9f84cf.js +0 -4295
  276. package/www/build/Handler-47db9890.js +0 -1428
  277. package/www/build/NonEmptyArray-6ef0d207.js +0 -4370
  278. package/www/build/css-shim-f0027935.js +0 -4
  279. package/www/build/dom-db0073f0.js +0 -73
  280. package/www/build/highlight-box.entry.js +0 -41
  281. package/www/build/image-cropper.entry.js +0 -113
  282. package/www/build/index-b6d739a9.js +0 -3010
  283. package/www/build/number-98d54dd6.js +0 -1533
  284. package/www/build/search-filters.entry.js +0 -73
  285. package/www/build/shadow-css-c1fdfa9f.js +0 -389
  286. package/www/build/vviinn-detected-object.entry.js +0 -52
  287. package/www/build/vviinn-empty-results.entry.js +0 -16
  288. package/www/build/vviinn-example-image.entry.js +0 -38
  289. package/www/build/vviinn-example-images.entry.js +0 -28
  290. package/www/build/vviinn-image-selector.entry.js +0 -31
  291. package/www/build/vviinn-image-view.entry.js +0 -55
  292. package/www/build/vviinn-modal.entry.js +0 -30
  293. package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
  294. package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
  295. package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
  296. package/www/build/vviinn-onboarding.entry.js +0 -20
  297. package/www/build/vviinn-overlay.entry.js +0 -15
  298. package/www/build/vviinn-overlayed-modal.entry.js +0 -18
  299. package/www/build/vviinn-privacy-badge.entry.js +0 -20
  300. package/www/build/vviinn-product-card.entry.js +0 -176
  301. package/www/build/vviinn-server-error.entry.js +0 -16
  302. package/www/build/vviinn-slide.entry.js +0 -15
  303. package/www/build/vviinn-slider.entry.js +0 -120
  304. package/www/build/vviinn-teaser.entry.js +0 -20
  305. package/www/build/vviinn-vpr-widget.entry.js +0 -128
  306. package/www/build/vviinn-vps-button.entry.js +0 -39
  307. package/www/build/vviinn-wrong-format.entry.js +0 -16
@@ -0,0 +1,737 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-741a970d.js');
6
+ const imageSearch_store = require('./imageSearch.store-128957a4.js');
7
+ const Handler = require('./Handler-d1a8a86a.js');
8
+ const index$1 = require('./index-c493804d.js');
9
+ const customizedSlots = require('./customized-slots-5d904d8e.js');
10
+
11
+ // -------------------------------------------------------------------------------------
12
+ // -------------------------------------------------------------------------------------
13
+ // instances
14
+ // -------------------------------------------------------------------------------------
15
+ /**
16
+ * @category instances
17
+ * @since 2.10.0
18
+ */
19
+ var Eq = {
20
+ equals: function (first, second) { return first === second; }
21
+ };
22
+ /**
23
+ * @category instances
24
+ * @since 2.10.0
25
+ */
26
+ var Ord = {
27
+ equals: Eq.equals,
28
+ compare: function (first, second) { return (first < second ? -1 : first > second ? 1 : 0); }
29
+ };
30
+
31
+ const fromRectangle = (shape, target) => {
32
+ const top = `${shape.y}px`;
33
+ const left = `${shape.x}px`;
34
+ const right = `${target.width - (shape.x + shape.width)}px`;
35
+ const bottom = `${target.height - (shape.y + shape.height)}px`;
36
+ return {
37
+ top,
38
+ right,
39
+ bottom,
40
+ left,
41
+ };
42
+ };
43
+ const printClip = (clip) => `inset(${clip.top} ${clip.right} ${clip.bottom} ${clip.left})`;
44
+ const getClipValue = (shape, target) => printClip(fromRectangle(shape, target));
45
+
46
+ const highlightBoxCss = ":host{display:grid;position:absolute;box-sizing:border-box;border:none;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--size:10px;--x-position:0;--y-position:0}img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pointer{position:absolute;width:var(--size);height:var(--size);background:black;border-radius:50%;z-index:2;cursor:pointer;transform:translate(var(--x-position), var(--y-position)) scale(0);-webkit-animation:0.25s linear fadein;animation:0.25s linear fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.pointer::after{content:\"\";cursor:pointer;border:5px solid black;border-radius:50%;width:var(--size);height:var(--size);display:block;transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));padding:calc(var(--size) * 0.5);opacity:.75}@-webkit-keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}@keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}";
47
+
48
+ let HighlightBox = class {
49
+ constructor(hostRef) {
50
+ index.registerInstance(this, hostRef);
51
+ }
52
+ getInsetValue() {
53
+ return Handler.pipe(imageSearch_store.sequenceToOption(imageSearch_store.imageSearchState.searchArea, imageSearch_store.imageSearchState.imageBounds), imageSearch_store.Option.map(([selection, image]) => getClipValue(selection, image)), imageSearch_store.Option.getOrElse(() => ""));
54
+ }
55
+ renderImage() {
56
+ return Handler.pipe(imageSearch_store.sequenceToOption(imageSearch_store.imageSearchState.imageUrl, imageSearch_store.imageSearchState.imageBounds), imageSearch_store.Option.map(([url, bounds]) => (index.h("img", { src: url, width: bounds.width, height: bounds.height, style: { "clip-path": `${this.getInsetValue()}` } }))), imageSearch_store.Option.getOrElse(() => ""));
57
+ }
58
+ render() {
59
+ return index.h(index.Host, null, this.renderImage());
60
+ }
61
+ };
62
+ HighlightBox.style = highlightBoxCss;
63
+
64
+ const findTarget = (ev) => {
65
+ return ev.target;
66
+ };
67
+
68
+ const imageCropperCss = ":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";
69
+
70
+ const MIN_SEARCHAREA_SIZE = 40;
71
+ let ImageCropper = class {
72
+ constructor(hostRef) {
73
+ index.registerInstance(this, hostRef);
74
+ this.disabled = false;
75
+ this.handleMove = false;
76
+ this.mouseStartPoint = undefined;
77
+ this.bounds = undefined;
78
+ }
79
+ componentDidLoad() {
80
+ this.bounds = this.el.getBoundingClientRect();
81
+ }
82
+ handleHandlerMove(event) {
83
+ event.preventDefault();
84
+ event.stopPropagation();
85
+ const destination = Handler.fromMouseEvent(event);
86
+ const distance = Handler.pointDiffSemigroup.concat(destination, this.mouseStartPoint);
87
+ const transformedHandler = {
88
+ position: distance,
89
+ direction: this.handlerMoveDirection,
90
+ };
91
+ imageSearch_store._function.pipe(imageSearch_store.imageSearchState.searchArea, imageSearch_store.Option.map((area) => {
92
+ const newSearchArea = imageSearch_store.transform(area, transformedHandler);
93
+ if (newSearchArea.width < MIN_SEARCHAREA_SIZE ||
94
+ newSearchArea.height < MIN_SEARCHAREA_SIZE ||
95
+ newSearchArea.x < 0 ||
96
+ newSearchArea.y < 0 ||
97
+ this.bounds.height - (newSearchArea.y + newSearchArea.height) < 0 ||
98
+ this.bounds.width - (newSearchArea.x + newSearchArea.width) < 0)
99
+ return;
100
+ imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.some(newSearchArea);
101
+ this.mouseStartPoint = destination;
102
+ imageSearch_store.imageSearchState.detectedObject = undefined;
103
+ }));
104
+ }
105
+ handleCropperMove(ev) {
106
+ ev.preventDefault();
107
+ ev.stopPropagation();
108
+ const destination = Handler.fromMouseEvent(ev);
109
+ const distance = Handler.pointDiffSemigroup.concat(destination, this.mouseStartPoint);
110
+ imageSearch_store._function.pipe(imageSearch_store.imageSearchState.searchArea, imageSearch_store.Option.map((searchArea) => {
111
+ const newSearchArea = imageSearch_store.move(searchArea, distance);
112
+ if (newSearchArea.x < 0 ||
113
+ newSearchArea.y < 0 ||
114
+ this.bounds.height - (newSearchArea.y + newSearchArea.height) < 0 ||
115
+ this.bounds.width - (newSearchArea.x + newSearchArea.width) < 0)
116
+ return;
117
+ imageSearch_store.imageSearchState.detectedObject = undefined;
118
+ imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.some(newSearchArea);
119
+ this.mouseStartPoint = destination;
120
+ }));
121
+ }
122
+ handlePointerDown(event) {
123
+ event.stopPropagation();
124
+ this.mouseStartPoint = Handler.fromMouseEvent(event);
125
+ // should be htmlelement or handler
126
+ const target = findTarget(event);
127
+ if (target.localName === "cropper-handler") {
128
+ this.handlerMoveDirection = target.handler.direction;
129
+ this.pointerMoveListener = this.handleHandlerMove.bind(this);
130
+ }
131
+ else {
132
+ this.pointerMoveListener = this.handleCropperMove.bind(this);
133
+ }
134
+ this.pointerReleaseListener = this.handleSearchAreaRelease.bind(this);
135
+ this.el.addEventListener("pointermove", this.pointerMoveListener);
136
+ window.addEventListener("pointerup", this.pointerReleaseListener, {
137
+ once: true,
138
+ });
139
+ }
140
+ handleSearchAreaRelease() {
141
+ this.el.removeEventListener("pointermove", this.pointerMoveListener);
142
+ document.removeEventListener("pointerup", this.pointerReleaseListener);
143
+ this.mouseStartPoint = undefined;
144
+ imageSearch_store.makeRectangularSearchRequest();
145
+ }
146
+ getStyleMap() {
147
+ return imageSearch_store._function.pipe(imageSearch_store.imageSearchState.searchArea, imageSearch_store.Option.map((rectangle) => {
148
+ return {
149
+ width: `${rectangle.width}px`,
150
+ height: `${rectangle.height}px`,
151
+ transform: `translate3d(${rectangle.x}px, ${rectangle.y}px, 0)`,
152
+ cursor: this.handleMove ? "move" : "default",
153
+ };
154
+ }), imageSearch_store.Option.getOrElse(() => {
155
+ return {};
156
+ }));
157
+ }
158
+ render() {
159
+ return (index.h(index.Host, { exportparts: "handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize" }, index.h("div", { class: {
160
+ "crop-area": true,
161
+ active: this.handleMove,
162
+ disabled: this.disabled,
163
+ }, draggable: false, style: this.getStyleMap(), onContextMenu: () => false, onPointerDown: (ev) => this.handlePointerDown(ev) }, imageSearch_store.imageSearchState.cropperHandlers.map((handler) => (index.h("cropper-handler", { disabled: this.disabled, handler: handler, onPointerDown: (ev) => this.handlePointerDown(ev) }))))));
164
+ }
165
+ get el() { return index.getElement(this); }
166
+ };
167
+ ImageCropper.style = imageCropperCss;
168
+
169
+ const searchFiltersCss = ":host{display:grid;grid-gap:1rem}.filters{display:flex;flex-direction:row;flex-wrap:wrap;gap:0.5rem}.filter{align-items:center;-webkit-animation-duration:0.25s;animation-duration:0.25s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-name:scalein;animation-name:scalein;border:1px solid lightgray;cursor:pointer;display:flex;flex-direction:row;grid-gap:8px;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;padding:0.1rem;transform:scale(0);transition-property:background;transition-duration:0.25s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:6px 16px}.filter.active{border:1px solid black;padding:6px 8px}.filter:hover{border:1px solid gray}.show-more{display:flex}.show-more.hidden{display:none}.show-more::after{content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;height:16px;margin-top:1px;margin-left:8px}.show-more.active::after{transform:rotateX(180deg)}@-webkit-keyframes scalein{from{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@keyframes scalein{from{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@media (max-width: 415px){.show-more::after{transform:rotate(-90deg)}.show-more.active::after{transform:rotate(90deg)}}@media (max-width: 800px){.filters{flex-wrap:nowrap;overflow-x:scroll;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;grid-gap:unset}.filter{scroll-snap-align:end;margin-right:0.5rem}}";
170
+
171
+ const FILTERS_COUNT = 5;
172
+ const ACTIVE_FILTER_CLASSNAME = ".filter.active";
173
+ const getFilterId = (filter) => filter.href.split("/").reverse()[0];
174
+ let SearchFilters = class {
175
+ constructor(hostRef) {
176
+ index.registerInstance(this, hostRef);
177
+ this.filter = null;
178
+ this.selectedCategoryId = null;
179
+ this.hideFilters = true;
180
+ }
181
+ handleFilterSelection(filter) {
182
+ return this.isFilterSelected(filter)
183
+ ? this.clearSelectedFilter()
184
+ : this.selectFilter(filter);
185
+ }
186
+ selectFilter(filter) {
187
+ this.selectedCategoryId = getFilterId(filter);
188
+ imageSearch_store.imageSearchState.activeIonLink = filter;
189
+ }
190
+ clearSelectedFilter() {
191
+ this.selectedCategoryId = null;
192
+ imageSearch_store.imageSearchState.activeIonLink = undefined;
193
+ this.findSelectedFilter().blur();
194
+ }
195
+ findSelectedFilter() {
196
+ return this.el.shadowRoot.querySelector(ACTIVE_FILTER_CLASSNAME);
197
+ }
198
+ toggleFilters() {
199
+ this.hideFilters = !this.hideFilters;
200
+ }
201
+ handleEnter(ev, f) {
202
+ if (ev.key !== "Enter")
203
+ return;
204
+ this.handleFilterSelection(f);
205
+ }
206
+ isFilterSelected(filterLink) {
207
+ return this.selectedCategoryId === getFilterId(filterLink);
208
+ }
209
+ render() {
210
+ return (index.h(index.Host, { exportparts: "filter, show-more-filters" }, index.h("div", { class: "filters" }, this.filter.filters
211
+ .filter((_, i) => (this.hideFilters ? i < FILTERS_COUNT : true))
212
+ .map((f, n) => (index.h("div", { role: "button", tabindex: "0", part: this.isFilterSelected(f) ? "filter active" : "filter", class: {
213
+ filter: true,
214
+ active: this.selectedCategoryId === getFilterId(f),
215
+ }, style: { "animation-delay": `${n * 10}ms` }, onPointerUp: (ev) => {
216
+ ev.stopPropagation();
217
+ this.handleFilterSelection(f);
218
+ }, onKeyPress: (ev) => this.handleEnter(ev, f) }, this.isFilterSelected(f) ? index.h(index$1.CheckIcon, null) : null, f.name))), index.h("div", { class: {
219
+ filter: true,
220
+ "show-more": true,
221
+ hidden: this.filter.filters.length <= FILTERS_COUNT,
222
+ active: !this.hideFilters,
223
+ }, role: "button", tabindex: "0", "aria-role": "button", onClick: () => this.toggleFilters(), onKeyPress: (ev) => {
224
+ if (ev.key === "Enter") {
225
+ this.toggleFilters();
226
+ }
227
+ }, part: "show-more-filters" }, this.hideFilters ? "Zeige mehr" : "Zeige weniger"))));
228
+ }
229
+ get el() { return index.getElement(this); }
230
+ };
231
+ SearchFilters.style = searchFiltersCss;
232
+
233
+ 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:rgba(22, 22, 22, 0.5);border-radius:50%;border:none;cursor:pointer;display:block;height:var(--size);position:absolute;transition:opacity 0.25s;width:var(--size);z-index:2;transform:translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));transition:background 0.1 ease-in-out}:host(:hover){background:rgba(22, 22, 22, 0.75)}:host(.active){background:var(--color-primary, var(--color-primary-system))!important;border:2px solid white}:host::after{--size:32px;border-radius:50%;content:\"\";cursor:pointer;display:block;height:calc(var(--size) * 0.25);transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));width:calc(var(--size) * 0.25);background:white}";
234
+
235
+ let VviinnDetectedObject = class {
236
+ constructor(hostRef) {
237
+ index.registerInstance(this, hostRef);
238
+ this.position = ["0", "0"];
239
+ }
240
+ getObjectPosition() {
241
+ return imageSearch_store._function.pipe(imageSearch_store.imageSearchState.imageBounds, imageSearch_store.Option.map((bounds) => {
242
+ const objectRectangle = imageSearch_store.fromAlt(imageSearch_store.foldValueObject(this.detectedObject).rectangle);
243
+ const { x, y } = imageSearch_store._function.pipe(objectRectangle, imageSearch_store.scaleWithSized(bounds), imageSearch_store.center);
244
+ return [`${x}px`, `${y}px`];
245
+ }), imageSearch_store.Option.getOrElse(() => ["0", "0"]));
246
+ }
247
+ selectDetectedObject() {
248
+ imageSearch_store._function.pipe(imageSearch_store.imageSearchState.imageBounds, imageSearch_store.Option.map((bounds) => {
249
+ const rectangle = imageSearch_store.foldValueObject(this.detectedObject).rectangle;
250
+ const transformedRect = imageSearch_store.fromAlt(rectangle);
251
+ const scaledRect = imageSearch_store.scaleWithSized(bounds)(transformedRect);
252
+ imageSearch_store.imageSearchState.detectedObject = this.detectedObject;
253
+ imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.some(scaledRect);
254
+ }));
255
+ imageSearch_store.makeRectangularSearchRequest();
256
+ }
257
+ isActive() {
258
+ if (!this.detectedObject)
259
+ return false;
260
+ if (!imageSearch_store.imageSearchState.detectedObject)
261
+ return false;
262
+ const thisObject = imageSearch_store.foldValueObject(this.detectedObject);
263
+ const savedObject = imageSearch_store.foldValueObject(imageSearch_store.imageSearchState.detectedObject);
264
+ return imageSearch_store.detectedObjectEq.equals(thisObject, savedObject);
265
+ }
266
+ render() {
267
+ return (index.h(index.Host, { class: {
268
+ active: this.isActive(),
269
+ }, onClick: () => this.selectDetectedObject(), style: {
270
+ "--x-position": this.getObjectPosition()[0],
271
+ "--y-position": this.getObjectPosition()[1],
272
+ } }));
273
+ }
274
+ };
275
+ VviinnDetectedObject.style = vviinnDetectedObjectCss;
276
+
277
+ const vviinnEmptyResultsCss = ":host{display:grid}vviinn-error{justify-items:center}";
278
+
279
+ let VviinnEmptyResults = class {
280
+ constructor(hostRef) {
281
+ index.registerInstance(this, hostRef);
282
+ this.actionClick = index.createEvent(this, "actionClick", 7);
283
+ }
284
+ render() {
285
+ return (index.h(index.Host, null, index.h("vviinn-error", null, index.h("svg", { slot: "icon", class: "icon", width: "32", height: "32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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" }), index.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" })), index.h("h4", { slot: "title" }, "Leider nichts gefunden"), index.h("span", { slot: "text" }, "Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal."))));
286
+ }
287
+ };
288
+ VviinnEmptyResults.style = vviinnEmptyResultsCss;
289
+
290
+ const vviinnExampleImageCss = ":host{display:block;margin-bottom:8px;position:relative}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;pointer-events:none;position:absolute;right:12px;z-index:4}vviinn-preloader{--preloader-size:12px}@media (max-width: 640px){.image-preloader{display:block}}";
291
+
292
+ let VviinnExampleImage = class {
293
+ constructor(hostRef) {
294
+ index.registerInstance(this, hostRef);
295
+ this.exampleImageSelected = index.createEvent(this, "exampleImageSelected", 7);
296
+ this.exampleImageError = index.createEvent(this, "exampleImageError", 7);
297
+ this.src = "";
298
+ this.width = 0;
299
+ this.height = 0;
300
+ this.selected = false;
301
+ }
302
+ async selectImage(_event) {
303
+ this.selected = true;
304
+ const file = await imageSearch_store.toFile(this.src);
305
+ const processResult = await imageSearch_store.processSelectedFile(file);
306
+ imageSearch_store._function.pipe(processResult, imageSearch_store.Either.match(() => this.exampleImageError.emit(), () => this.exampleImageSelected.emit()));
307
+ this.selected = false;
308
+ }
309
+ showPreloader() {
310
+ return ((imageSearch_store.imageSearchState.objectDetectionInProgress ||
311
+ imageSearch_store.imageSearchState.loading) &&
312
+ this.selected);
313
+ }
314
+ render() {
315
+ return (index.h(index.Host, null, this.showPreloader() ? (index.h("div", { class: "image-preloader" }, index.h("vviinn-preloader", null))) : null, index.h("img", { onClick: (ev) => this.selectImage(ev), src: this.src, width: this.width, height: this.height })));
316
+ }
317
+ };
318
+ VviinnExampleImage.style = vviinnExampleImageCss;
319
+
320
+ const vviinnExampleImagesCss = "h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}.images{display:block;-moz-column-count:2;column-count:2;-moz-column-gap:16px;column-gap:16px}";
321
+
322
+ let VviinnExampleImages = class {
323
+ constructor(hostRef) {
324
+ index.registerInstance(this, hostRef);
325
+ this.imageSelected = index.createEvent(this, "imageSelected", 7);
326
+ this.imageSelectedError = index.createEvent(this, "imageSelectedError", 7);
327
+ }
328
+ handleImageSelection() {
329
+ this.imageSelected.emit();
330
+ }
331
+ handleImageSelectionError() {
332
+ this.imageSelectedError.emit();
333
+ }
334
+ componentWillLoad() {
335
+ customizedSlots.slotChangeListener(this, this.el);
336
+ }
337
+ render() {
338
+ return (index.h(index.Host, null, index.h("slot", { name: "vviinn-example-images-title" }, index.h("h3", null, "Mit den Beispielbildern die Suche direkt ausprobieren")), index.h("div", { class: "images" }, index.h("slot", { name: "vviinn-example-images-1" }, index.h("vviinn-example-image", { width: 240, height: 320, src: "https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=" })), index.h("slot", { name: "vviinn-example-images-2" }, index.h("vviinn-example-image", { width: 240, height: 240, src: "https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=" })), index.h("slot", { name: "vviinn-example-images-3" }, index.h("vviinn-example-image", { width: 240, height: 240, src: "https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=" })), index.h("slot", { name: "vviinn-example-images-4" }, index.h("vviinn-example-image", { width: 240, height: 320, src: "https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=" })))));
339
+ }
340
+ get el() { return index.getElement(this); }
341
+ };
342
+ VviinnExampleImages.style = vviinnExampleImagesCss;
343
+
344
+ const vviinnImageSelectorCss = ":host{display:block}:host(::hover){background:whitesmoke}.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:0.5rem;transition:background 0.1s ease-in-out}";
345
+
346
+ let VviinnImageSelector = class {
347
+ constructor(hostRef) {
348
+ index.registerInstance(this, hostRef);
349
+ this.imageSelected = index.createEvent(this, "imageSelected", 7);
350
+ this.imageSelectedError = index.createEvent(this, "imageSelectedError", 7);
351
+ }
352
+ async handleInputChange(event) {
353
+ const input = event.target;
354
+ const processingResult = await imageSearch_store.processSelectedFile(input.files[0]);
355
+ imageSearch_store._function.pipe(processingResult, imageSearch_store.match(() => this.imageSelectedError.emit(), () => this.imageSelected.emit()));
356
+ input.value = null;
357
+ }
358
+ isLoading() {
359
+ return (imageSearch_store.imageSearchState.loading || imageSearch_store.imageSearchState.objectDetectionInProgress);
360
+ }
361
+ render() {
362
+ return (index.h(index.Host, { exportparts: "button" }, this.isLoading() ? index.h("vviinn-preloader", null) : null, this.isLoading() ? null : (index.h("label", { htmlFor: "fileInput", part: "button" }, index.h("slot", { name: "upload-button-text" }, "Upload image"))), index.h("input", { id: "fileInput", class: "visually-hidden", type: "file", accept: "image/*", onChange: (event) => this.handleInputChange(event) })));
363
+ }
364
+ };
365
+ VviinnImageSelector.style = vviinnImageSelectorCss;
366
+
367
+ const vviinnImageViewCss = ":host{display:grid;position:relative;justify-self:center}img{box-sizing:border-box;filter:brightness(60%);position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:-1}.image-preloader{background:rgba(0, 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}";
368
+
369
+ const getImageSizes = (i) => {
370
+ const dimensions = imageSearch_store.dimensionsFromImage(i);
371
+ const resize = imageSearch_store.scaleByLargestSide(288);
372
+ const newDimensions = resize(dimensions);
373
+ const sizes = newDimensions.map(d => d.size);
374
+ return [sizes[0], sizes[1]];
375
+ };
376
+ let VviinnImageView = class {
377
+ constructor(hostRef) {
378
+ index.registerInstance(this, hostRef);
379
+ }
380
+ handleInitialImageLoad(ev) {
381
+ const target = ev.target;
382
+ const imageBounds = imageSearch_store.fromImage(target);
383
+ const padding = 12;
384
+ const { x, y } = imageSearch_store.move(imageBounds, { x: padding, y: padding });
385
+ const searchArea = {
386
+ x,
387
+ y,
388
+ width: imageBounds.width - padding * 2,
389
+ height: imageBounds.height - padding * 2,
390
+ };
391
+ imageSearch_store.imageSearchState.imageBounds = imageSearch_store.Option.some(imageBounds);
392
+ imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.some(searchArea);
393
+ }
394
+ renderDetectedObject(object) {
395
+ return index.h("vviinn-detected-object", { detectedObject: object });
396
+ }
397
+ renderImage() {
398
+ return imageSearch_store._function.pipe(imageSearch_store.sequenceToOption(imageSearch_store.imageSearchState.imageUrl, imageSearch_store.imageSearchState.image), imageSearch_store.Option.map(([url, refImage]) => {
399
+ const [width, height] = getImageSizes(refImage);
400
+ const image = (index.h("img", { decoding: "async", width: width, height: height, src: url, onLoad: (el) => this.handleInitialImageLoad(el), draggable: false }));
401
+ return image;
402
+ }), imageSearch_store.Option.getOrElse(() => null));
403
+ }
404
+ renderCropper() {
405
+ return imageSearch_store._function.pipe(imageSearch_store.imageSearchState.imageUrl, imageSearch_store.Option.map(() => index.h("image-cropper", null)), imageSearch_store.Option.getOrElse(() => null));
406
+ }
407
+ render() {
408
+ return (index.h(index.Host, null, imageSearch_store.imageSearchState.loading ||
409
+ imageSearch_store.imageSearchState.objectDetectionInProgress ? (index.h("div", { class: "image-preloader" }, index.h("vviinn-preloader", null))) : null, index.h("highlight-box", null), this.renderImage(), this.renderCropper(), imageSearch_store.imageSearchState.detectedObjects.map((o) => this.renderDetectedObject(o))));
410
+ }
411
+ };
412
+ VviinnImageView.style = vviinnImageViewCss;
413
+
414
+ const vviinnModalCss = ":host{background:white;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-name:fade-in;animation-name:fade-in;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.closed){-webkit-animation-name:fade-out;animation-name:fade-out;-webkit-animation-fill-mode:none;animation-fill-mode:none}.body{overflow-y:auto}}@media (max-width: 640px) and (min-width: 415px){:host{max-width:80%}}.head{align-items:center;border-bottom:1px solid #F4F4F4;display:grid;grid-gap:16px;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-weight:600;font-size:18px;line-height:24px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:unset}@-webkit-keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
415
+
416
+ let VviinnModal = class {
417
+ constructor(hostRef) {
418
+ index.registerInstance(this, hostRef);
419
+ this.modalClosed = index.createEvent(this, "modalClosed", 7);
420
+ this.secondaryActionClicked = index.createEvent(this, "secondaryActionClicked", 7);
421
+ this.active = false;
422
+ this.slider = false;
423
+ }
424
+ close() {
425
+ this.active = false;
426
+ setTimeout(() => {
427
+ this.modalClosed.emit();
428
+ }, this.slider ? 500 : 0);
429
+ }
430
+ handleAnimationEnd(ev) {
431
+ if (ev.animationName !== "fade-in")
432
+ return;
433
+ this.slider = true;
434
+ }
435
+ render() {
436
+ return (index.h(index.Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, index.h("div", { class: "head" }, index.h("button", { part: "secondary-action", onClick: () => this.secondaryActionClicked.emit() }, index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M20.25 12H3.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("div", { class: "title", part: "title" }, "Bildsuche"), index.h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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" })))), index.h("div", { class: "body" }, index.h("slot", null))));
437
+ }
438
+ };
439
+ VviinnModal.style = vviinnModalCss;
440
+
441
+ const vviinnOnboardingCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}::host{display:block}h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}vviinn-slide{background:#f4f4f4;padding:24px}svg{padding:16px 0}.text{display:grid;grid-gap:8px}.text>h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}.text>p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}";
442
+
443
+ let VviinnOnboarding = class {
444
+ constructor(hostRef) {
445
+ index.registerInstance(this, hostRef);
446
+ }
447
+ componentWillLoad() {
448
+ customizedSlots.slotChangeListener(this, this.el);
449
+ }
450
+ render() {
451
+ return (index.h(index.Host, null, index.h("slot", { name: "vviinn-onboarding-title" }, index.h("h3", null, "So funktioniert es")), index.h("vviinn-slider", { showArrows: true }, index.h("vviinn-slide", null, index.h("vviinn-onboarding-card-1", null)), index.h("vviinn-slide", null, index.h("vviinn-onboarding-card-2", null)), index.h("vviinn-slide", null, index.h("vviinn-onboarding-card-3", null)))));
452
+ }
453
+ get el() { return index.getElement(this); }
454
+ };
455
+ VviinnOnboarding.style = vviinnOnboardingCss;
456
+
457
+ const onboardingCardCss$2 = ":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:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";
458
+
459
+ let VviinnOnboardingCard1 = class {
460
+ constructor(hostRef) {
461
+ index.registerInstance(this, hostRef);
462
+ }
463
+ componentWillLoad() {
464
+ customizedSlots.slotChangeListener(this, this.el);
465
+ }
466
+ render() {
467
+ return (index.h(index.Host, null, index.h("slot", { name: "onboarding-card-1-icon" }, index.h(index$1.OnboardingCard1Icon, null)), index.h("slot", { name: "onboarding-card-1-text" }, index.h("div", { class: "text" }, index.h("h4", null, "Starte die Bildsuche"), index.h("p", null, "Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera.")))));
468
+ }
469
+ get el() { return index.getElement(this); }
470
+ };
471
+ VviinnOnboardingCard1.style = onboardingCardCss$2;
472
+
473
+ const onboardingCardCss$1 = ":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:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";
474
+
475
+ let VviinnOnboardingCard2 = class {
476
+ constructor(hostRef) {
477
+ index.registerInstance(this, hostRef);
478
+ }
479
+ componentWillLoad() {
480
+ customizedSlots.slotChangeListener(this, this.el);
481
+ }
482
+ render() {
483
+ return (index.h(index.Host, null, index.h("slot", { name: "onboarding-card-2-icon" }, index.h(index$1.OnboardingCard2Icon, null)), index.h("slot", { name: "onboarding-card-2-text" }, index.h("div", { class: "text" }, index.h("h4", null, "Verfeiner deine Suche"), index.h("p", null, "Du kannst den Bildrahmen selber festlegen und so die Produkte genau ausw\u00E4hlen.")))));
484
+ }
485
+ get el() { return index.getElement(this); }
486
+ };
487
+ VviinnOnboardingCard2.style = onboardingCardCss$1;
488
+
489
+ 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:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";
490
+
491
+ let VviinnOnboardingCard3 = class {
492
+ constructor(hostRef) {
493
+ index.registerInstance(this, hostRef);
494
+ }
495
+ componentWillLoad() {
496
+ customizedSlots.slotChangeListener(this, this.el);
497
+ }
498
+ render() {
499
+ return (index.h(index.Host, null, index.h("slot", { name: "onboarding-card-3-icon" }, index.h(index$1.OnboardingCard3Icon, null)), index.h("slot", { name: "onboarding-card-3-text" }, index.h("div", { class: "text" }, index.h("h4", null, "Ohne Hintergrund"), index.h("p", null, "Die besten Ergebnisse erh\u00E4ltst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist.")))));
500
+ }
501
+ get el() { return index.getElement(this); }
502
+ };
503
+ VviinnOnboardingCard3.style = onboardingCardCss;
504
+
505
+ const vviinnOverlayCss = ":host{-webkit-animation:fade-in 0.5s ease-in-out;animation:fade-in 0.5s ease-in-out;background:rgba(0, 0, 0, 0.5);display:block;height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:9999}@-webkit-keyframes fade-in{from{opacity:0.1}to{opacity:1}}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";
506
+
507
+ let VviinnOverlay = class {
508
+ constructor(hostRef) {
509
+ index.registerInstance(this, hostRef);
510
+ }
511
+ render() {
512
+ return (index.h(index.Host, null, index.h("slot", null)));
513
+ }
514
+ };
515
+ VviinnOverlay.style = vviinnOverlayCss;
516
+
517
+ const vviinnOverlayedModalCss = ":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center}@media (max-width: 415px){vviinn-modal{border-radius:4px 4px 0 0;height:100vh;margin-top:32px;transform:translateY(100%);width:100vw}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";
518
+
519
+ let VviinnOverlayedModal = class {
520
+ constructor(hostRef) {
521
+ index.registerInstance(this, hostRef);
522
+ this.secondaryActionClicked = index.createEvent(this, "secondaryActionClicked", 7);
523
+ this.modalClosed = index.createEvent(this, "modalClosed", 7);
524
+ this.active = false;
525
+ }
526
+ render() {
527
+ return (index.h(index.Host, { class: { active: this.active } }, index.h("vviinn-overlay", null, index.h("vviinn-modal", { onSecondaryActionClicked: () => this.secondaryActionClicked.emit(), active: this.active }, index.h("slot", null, "CONTENT")))));
528
+ }
529
+ };
530
+ VviinnOverlayedModal.style = vviinnOverlayedModalCss;
531
+
532
+ const vviinnPrivacyBadgeCss = ":host{display:block;background:#F4F4F4;padding:17px}.content{display:grid;grid-template-columns:-webkit-min-content auto;grid-template-columns:min-content auto;grid-gap:9px}.content p{color:#525252;font-size:12px;line-height:16px;margin:unset}";
533
+
534
+ let VviinnPrivacyBadge = class {
535
+ constructor(hostRef) {
536
+ index.registerInstance(this, hostRef);
537
+ }
538
+ componentWillLoad() {
539
+ customizedSlots.slotChangeListener(this, this.el);
540
+ }
541
+ render() {
542
+ return (index.h(index.Host, null, index.h("slot", null, index.h("div", { class: "content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" }, index.h("defs", null), index.h("path", { fill: "#525252", d: "M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z" }), index.h("path", { fill: "#525252", d: "M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z" })), index.h("slot", { name: "vviinn-privacy-badge-text" }, index.h("p", null, "Wir gehen sorgf\u00E4ltig mit Deinen Daten um. Deine Bilder werden nur zum Zweck der Bildsuche gespeichert."))))));
543
+ }
544
+ get el() { return index.getElement(this); }
545
+ };
546
+ VviinnPrivacyBadge.style = vviinnPrivacyBadgeCss;
547
+
548
+ const vviinnServerErrorCss = ":host{display:block}";
549
+
550
+ let VviinnServerError = class {
551
+ constructor(hostRef) {
552
+ index.registerInstance(this, hostRef);
553
+ this.actionClick = index.createEvent(this, "actionClick", 7);
554
+ }
555
+ render() {
556
+ return (index.h(index.Host, null, index.h("vviinn-error", null, index.h("h4", { slot: "title" }, "Keine Verbindung"), index.h("span", { slot: "text" }, "Etwas hat leider nicht funktioniert. Bitte pr\u00FCfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."), index.h("button", { slot: "action", onClick: () => this.actionClick.emit() }, "Erneut versuchen"))));
557
+ }
558
+ };
559
+ VviinnServerError.style = vviinnServerErrorCss;
560
+
561
+ const vviinnSlideCss = ":host{display:grid;justify-items:center}";
562
+
563
+ let VviinnSlide = class {
564
+ constructor(hostRef) {
565
+ index.registerInstance(this, hostRef);
566
+ }
567
+ render() {
568
+ return (index.h(index.Host, null, index.h("slot", null)));
569
+ }
570
+ };
571
+ VviinnSlide.style = vviinnSlideCss;
572
+
573
+ const getStyleMap = (data) => {
574
+ return {
575
+ "arrow-wrapper": true,
576
+ [data.kind]: true,
577
+ disabled: data.disabled,
578
+ };
579
+ };
580
+ const Arrow = ({ kind, tabindex, disabled, onClick, onKeyDown, }) => (index.h("div", { class: getStyleMap({ kind, disabled }), onClick: onClick, tabindex: tabindex, onKeyDown: onKeyDown },
581
+ index.h(index$1.ArrowIcon, null)));
582
+
583
+ const vviinnSliderCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--num-items:0;--position:0;display:grid;grid-gap:20px;justify-items:center;position:relative}.items-wrapper{overflow:hidden;width:100%}.items{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--num-items), 100%);transform:translateX(calc(-100% * var(--position)));transition:transform 0.33s ease-in-out}.controls{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--num-items), -webkit-min-content);grid-template-columns:repeat(var(--num-items), min-content)}.bullet{background:#E0E0E0;border-radius:50%;box-sizing:border-box;cursor:pointer;height:8px;width:8px;transition:background 0.1s ease-in-out}.bullet:hover{background:#C6C6C6}.bullet.active{background:var(--color-primary, var(--color-primary-system))}.bullet:active{background:transparent;border:2px solid var(--color-primary, var(--color-primary-system))}.arrow-wrapper{align-items:center;background:white;border:2px solid white;bottom:0;box-sizing:border-box;display:grid;height:calc(var(--spacer) * 6);justify-items:center;margin:auto;position:absolute;top:0;transform:translate3d(0, -50%, 0);transition:border 0.25ms ease-in-out;width:calc(var(--spacer) * 4)}.arrow-wrapper:active{border-color:var(--color-primary, var(--color-primary-system));opacity:0.75}.arrow-wrapper:focus{border-color:var(--color-primary, var(--color-primary-system));opacity:0.5;outline:none}.prev{left:0}.next{right:0}.next>svg{transform:rotate3d(0, 1, 0, 180deg)}.arrow-wrapper>svg{transition:fill 0.25ms ease-in-out;fill:#A8A8A8}.arrow-wrapper:hover>svg{fill:#8D8D8D}";
584
+
585
+ let VviinnSlider = class {
586
+ constructor(hostRef) {
587
+ index.registerInstance(this, hostRef);
588
+ this.elementsCount = 0;
589
+ this.internalPosition = 0;
590
+ this.swipeStartPosition = imageSearch_store.Option.none;
591
+ this.showBullets = true;
592
+ this.position = 0;
593
+ this.showArrows = false;
594
+ }
595
+ positionWatchHandler(newValue) {
596
+ this.internalPosition = newValue;
597
+ this.el.style.setProperty("--position", `${newValue}`);
598
+ this.setActiveCssClassToSlide(newValue);
599
+ }
600
+ connectedCallback() {
601
+ this.handleDomContentChanges();
602
+ }
603
+ handleDomContentChanges() {
604
+ const items = this.el.querySelectorAll("vviinn-slide");
605
+ this.elementsCount = items.length;
606
+ this.el.style.setProperty("--num-items", `${this.elementsCount}`);
607
+ this.setActiveCssClassToSlide(0);
608
+ }
609
+ setActiveCssClassToSlide(index) {
610
+ const items = this.el.querySelectorAll("vviinn-slide");
611
+ items.forEach((i) => i.classList.remove("active"));
612
+ items[index].classList.add("active");
613
+ }
614
+ goToSlide(index) {
615
+ this.internalPosition = index;
616
+ this.el.style.setProperty("--position", `${index}`);
617
+ this.setActiveCssClassToSlide(index);
618
+ }
619
+ renderBullets() {
620
+ return this.showBullets ? (index.h("div", { class: "controls" }, imageSearch_store.NonEmptyArray.range(0, this.elementsCount - 1).map((i) => (index.h("div", { class: {
621
+ bullet: true,
622
+ active: i == this.internalPosition % this.elementsCount,
623
+ }, onClick: () => this.goToSlide(i) }))))) : null;
624
+ }
625
+ nextSlide() {
626
+ this.internalPosition++;
627
+ this.renderSlidePosition();
628
+ }
629
+ prevSlide() {
630
+ const nextPostion = this.internalPosition - 1;
631
+ this.internalPosition =
632
+ nextPostion > -1 ? nextPostion : this.elementsCount - 1;
633
+ this.renderSlidePosition();
634
+ }
635
+ renderSlidePosition() {
636
+ requestAnimationFrame(() => {
637
+ this.el.style.setProperty("--position", `${this.internalPosition % this.elementsCount}`);
638
+ });
639
+ }
640
+ handleKeyDown(event) {
641
+ if (event.key !== "Space" && event.key !== "Enter")
642
+ return;
643
+ const target = event.target;
644
+ const direction = target.className.includes("prev") ? "prev" : "next";
645
+ switch (direction) {
646
+ case "prev":
647
+ this.prevSlide();
648
+ break;
649
+ case "next":
650
+ this.nextSlide();
651
+ break;
652
+ }
653
+ }
654
+ handleTouchStart(event) {
655
+ if (!this.showBullets)
656
+ return;
657
+ this.swipeStartPosition = imageSearch_store._function.pipe(event.touches[0], imageSearch_store.Option.fromNullable, imageSearch_store.Option.map((t) => t.clientX));
658
+ }
659
+ handleTouchEnd(event) {
660
+ if (!this.showBullets)
661
+ return;
662
+ const swipeEndPosition = imageSearch_store._function.pipe(event.changedTouches[0], imageSearch_store.Option.fromNullable, imageSearch_store.Option.map((t) => t.clientX));
663
+ imageSearch_store._function.pipe(imageSearch_store.sequenceToOption(this.swipeStartPosition, swipeEndPosition), imageSearch_store.Option.map(([start, end]) => Ord.compare(start, end)), imageSearch_store.Option.map((swipeDirection) => {
664
+ switch (swipeDirection) {
665
+ case 1:
666
+ return this.nextSlide();
667
+ case -1:
668
+ return this.prevSlide();
669
+ }
670
+ }));
671
+ }
672
+ render() {
673
+ return (index.h(index.Host, null, index.h("div", { class: "items-wrapper" }, index.h("div", { class: "items", onTouchStart: (e) => this.handleTouchStart(e), onTouchEnd: (e) => this.handleTouchEnd(e) }, index.h("slot", null))), this.showArrows
674
+ ? [
675
+ index.h(Arrow, { kind: "prev", onClick: () => this.prevSlide(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: 1, disabled: false }),
676
+ index.h(Arrow, { kind: "next", onClick: () => this.nextSlide(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: 0, disabled: false }),
677
+ ]
678
+ : null, this.renderBullets()));
679
+ }
680
+ get el() { return index.getElement(this); }
681
+ static get watchers() { return {
682
+ "position": ["positionWatchHandler"]
683
+ }; }
684
+ };
685
+ VviinnSlider.style = vviinnSliderCss;
686
+
687
+ const vviinnTeaserCss = ":host{align-items:center;display:grid;justify-items:center;grid-gap:16px}.vviinn-teaser-text{font-size:28px;font-weight:600;line-height:40px;size:28px;text-align:center}";
688
+
689
+ let VviinnTeaser = class {
690
+ constructor(hostRef) {
691
+ index.registerInstance(this, hostRef);
692
+ }
693
+ componentWillLoad() {
694
+ customizedSlots.slotChangeListener(this, this.el);
695
+ }
696
+ render() {
697
+ return (index.h(index.Host, null, index.h("slot", null, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", fill: "none" }, index.h("defs", null), index.h("path", { fill: "#C6C6C6", d: "M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z" }), index.h("path", { fill: "#C6C6C6", d: "M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z" })), index.h("span", { class: "vviinn-teaser-text" }, index.h("slot", { name: "vviinn-teaser-text" }, "Finde Produkte auf ", index.h("br", null), " einem Foto")))));
698
+ }
699
+ get el() { return index.getElement(this); }
700
+ };
701
+ VviinnTeaser.style = vviinnTeaserCss;
702
+
703
+ const vviinnWrongFormatCss = ":host{display:block}";
704
+
705
+ let VviinnWrongFormat = class {
706
+ constructor(hostRef) {
707
+ index.registerInstance(this, hostRef);
708
+ this.actionClick = index.createEvent(this, "actionClick", 7);
709
+ }
710
+ render() {
711
+ return (index.h(index.Host, null, index.h("vviinn-error", null, index.h("h4", { slot: "title" }, "Dateityp wird nicht unterst\u00FCtzt"), index.h("span", { slot: "text" }, "Leider unterst\u00FCtzen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."), index.h("button", { slot: "action", onClick: () => this.actionClick.emit() }, "Neues Bild hochladen"))));
712
+ }
713
+ };
714
+ VviinnWrongFormat.style = vviinnWrongFormatCss;
715
+
716
+ exports.highlight_box = HighlightBox;
717
+ exports.image_cropper = ImageCropper;
718
+ exports.search_filters = SearchFilters;
719
+ exports.vviinn_detected_object = VviinnDetectedObject;
720
+ exports.vviinn_empty_results = VviinnEmptyResults;
721
+ exports.vviinn_example_image = VviinnExampleImage;
722
+ exports.vviinn_example_images = VviinnExampleImages;
723
+ exports.vviinn_image_selector = VviinnImageSelector;
724
+ exports.vviinn_image_view = VviinnImageView;
725
+ exports.vviinn_modal = VviinnModal;
726
+ exports.vviinn_onboarding = VviinnOnboarding;
727
+ exports.vviinn_onboarding_card_1 = VviinnOnboardingCard1;
728
+ exports.vviinn_onboarding_card_2 = VviinnOnboardingCard2;
729
+ exports.vviinn_onboarding_card_3 = VviinnOnboardingCard3;
730
+ exports.vviinn_overlay = VviinnOverlay;
731
+ exports.vviinn_overlayed_modal = VviinnOverlayedModal;
732
+ exports.vviinn_privacy_badge = VviinnPrivacyBadge;
733
+ exports.vviinn_server_error = VviinnServerError;
734
+ exports.vviinn_slide = VviinnSlide;
735
+ exports.vviinn_slider = VviinnSlider;
736
+ exports.vviinn_teaser = VviinnTeaser;
737
+ exports.vviinn_wrong_format = VviinnWrongFormat;