vviinn-widgets 2.5.0 → 2.5.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 (330) hide show
  1. package/dist/cjs/Handler-176539c8.js +331 -0
  2. package/dist/{vviinn-widgets/app-globals-4fe0376b.js → cjs/app-globals-d15b4c2c.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-5dbf778c.js → cjs/customized-slots-0c0d0665.js} +6 -3
  5. package/dist/cjs/highlight-box_22.cjs.entry.js +747 -0
  6. package/{www/build/imageSearch.store-3204bc99.js → dist/cjs/imageSearch.store-865c23f4.js} +11902 -11653
  7. package/{www/build/index-89e62050.js → dist/cjs/index-0eb3036a.js} +76 -698
  8. package/dist/cjs/index-0f5516a6.js +1354 -0
  9. package/dist/cjs/index-31b9cb7a.js +39 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +23 -0
  12. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +1174 -0
  13. package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
  14. package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
  15. package/{www/build/vviinn-recommendations-sidebar.entry.js → dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js} +12 -8
  16. package/dist/{vviinn-widgets/vviinn-vpr-button.entry.js → cjs/vviinn-vpr-button.cjs.entry.js} +9 -5
  17. package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
  18. package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +51 -49
  19. package/dist/cjs/vviinn-widgets.cjs.js +21 -0
  20. package/dist/collection/Image/error.js +14 -0
  21. package/dist/collection/Image/form.js +5 -0
  22. package/dist/collection/Image/fromFile.js +18 -0
  23. package/dist/collection/Image/imageToB64.js +9 -0
  24. package/dist/collection/Image/index.js +0 -0
  25. package/dist/collection/Image/renderPromise.js +6 -0
  26. package/dist/collection/Image/resizeImage.js +28 -0
  27. package/dist/collection/Image/sizing.js +39 -0
  28. package/dist/collection/Image/toFile.js +17 -0
  29. package/dist/collection/analytics/GAnalytics.js +32 -0
  30. package/dist/collection/analytics/GeneralAnalytics.js +9 -0
  31. package/dist/collection/analytics/GtagAnalytics.js +35 -0
  32. package/dist/collection/analytics/ProductAnalytics.js +1 -0
  33. package/dist/collection/campaign/Campaign.js +8 -0
  34. package/dist/collection/campaign/CampaignService.js +5 -0
  35. package/dist/collection/campaign/VCSCampaign.js +1 -0
  36. package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
  37. package/dist/collection/campaign/VCSCampaignService.js +5 -0
  38. package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
  39. package/dist/collection/campaign/VPRCampaignService.js +5 -0
  40. package/dist/collection/collection-manifest.json +43 -0
  41. package/dist/collection/components/customized-slots.js +47 -0
  42. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
  43. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
  44. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
  45. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
  46. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
  47. package/{www/build/image-cropper.entry.js → dist/collection/components/image-search/image-view/image-cropper/image-cropper.js} +70 -33
  48. package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
  49. package/dist/collection/components/image-search/search-filters/search-filters.js +125 -0
  50. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +142 -0
  51. package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +113 -18
  52. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
  53. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
  54. package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
  55. package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
  56. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
  57. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
  58. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
  59. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
  60. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
  61. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
  62. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
  63. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
  64. package/dist/{vviinn-widgets/index-bbcd6be9.js → collection/components/vviinn-icons/index.js} +11 -14
  65. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
  66. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
  67. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
  68. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +100 -0
  69. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
  70. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
  71. package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
  72. package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
  73. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
  74. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
  75. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
  76. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
  77. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
  78. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
  79. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
  80. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
  81. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
  82. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
  83. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
  84. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
  85. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
  86. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
  87. package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
  88. package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
  89. package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
  90. package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
  91. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
  92. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +462 -0
  93. package/dist/collection/components/vviinn-slider/arrow.js +11 -0
  94. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
  95. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
  96. package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
  97. package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
  98. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
  99. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
  100. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
  101. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
  102. package/dist/collection/components/vviinn-vpr-button/stories/args.js +207 -0
  103. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +89 -0
  104. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
  105. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +156 -0
  106. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +190 -0
  107. package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
  108. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +212 -0
  109. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
  110. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +483 -0
  111. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +79 -0
  112. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +31 -0
  113. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
  114. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +178 -0
  115. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +33 -0
  116. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
  117. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +352 -0
  118. package/dist/collection/cropper/Cropper.js +1 -0
  119. package/dist/collection/cropper/Handler.js +61 -0
  120. package/dist/collection/dom/index.js +3 -0
  121. package/dist/collection/error.js +14 -0
  122. package/dist/collection/file/index.js +4 -0
  123. package/dist/collection/geometry/Clip.js +14 -0
  124. package/dist/collection/geometry/Point.js +32 -0
  125. package/dist/collection/geometry/Rectangle.js +95 -0
  126. package/dist/collection/geometry/RectangleAlt.js +1 -0
  127. package/dist/collection/geometry/Sized.js +8 -0
  128. package/dist/collection/global.js +19 -0
  129. package/dist/collection/index.js +1 -0
  130. package/dist/collection/interfaces/generated.js +5 -0
  131. package/dist/collection/interfaces/recommendation.js +1 -0
  132. package/dist/collection/network/apiClient.js +9 -0
  133. package/dist/collection/network/ion/File.js +14 -0
  134. package/dist/collection/network/ion/Form.js +64 -0
  135. package/dist/collection/network/ion/Link.js +8 -0
  136. package/dist/collection/network/ion/ValueObject.js +23 -0
  137. package/dist/collection/network/request.js +19 -0
  138. package/dist/collection/network/utils.js +37 -0
  139. package/dist/collection/openApi/index.js +27 -0
  140. package/dist/collection/recommendation/events.js +1 -0
  141. package/dist/collection/recommendation/recommendation.js +1 -0
  142. package/dist/collection/searchSession/searchSession.js +26 -0
  143. package/dist/collection/sentry.js +14 -0
  144. package/dist/collection/slider/GridMode.js +1 -0
  145. package/dist/collection/store/file-processing.js +13 -0
  146. package/dist/collection/store/imageSearch.store.js +138 -0
  147. package/dist/collection/store/store.js +3 -0
  148. package/dist/collection/store/tracking.store.js +3 -0
  149. package/dist/collection/stories/Button.js +21 -0
  150. package/dist/collection/stories/Button.stories.js +42 -0
  151. package/dist/collection/stories/Header.js +45 -0
  152. package/dist/collection/stories/Header.stories.js +15 -0
  153. package/dist/collection/stories/Page.js +61 -0
  154. package/dist/collection/stories/Page.stories.js +19 -0
  155. package/dist/collection/stories/assets/code-brackets.svg +1 -0
  156. package/dist/collection/stories/assets/colors.svg +1 -0
  157. package/dist/collection/stories/assets/comments.svg +1 -0
  158. package/dist/collection/stories/assets/direction.svg +1 -0
  159. package/dist/collection/stories/assets/flow.svg +1 -0
  160. package/dist/collection/stories/assets/plugin.svg +1 -0
  161. package/dist/collection/stories/assets/repo.svg +1 -0
  162. package/dist/collection/stories/assets/stackalt.svg +1 -0
  163. package/dist/collection/stories/image-selector.stories.js +6 -0
  164. package/dist/collection/stories/image-view.stories.js +6 -0
  165. package/dist/collection/stories/modal.stories.js +12 -0
  166. package/dist/collection/stories/onboarding.stories.js +11 -0
  167. package/dist/collection/stories/overlay.stories.js +5 -0
  168. package/dist/collection/stories/overlayedModal.stories.js +8 -0
  169. package/dist/collection/stories/privacy-badge.stories.js +11 -0
  170. package/dist/collection/stories/slider.stories.js +17 -0
  171. package/dist/collection/stories/teaser.stories.js +5 -0
  172. package/dist/collection/stories/vps-widget.stories.js +47 -0
  173. package/dist/collection/stories/vviinn-product.stories.js +19 -0
  174. package/dist/collection/tracking/event.js +3 -0
  175. package/dist/collection/tracking/filter.js +5 -0
  176. package/dist/collection/tracking/index.js +13 -0
  177. package/dist/collection/tracking/models.js +6 -0
  178. package/dist/collection/tracking/product.js +18 -0
  179. package/dist/collection/tracking/search.js +5 -0
  180. package/dist/collection/tracking/widget.js +10 -0
  181. package/dist/collection/utils/collections/collectionsUtils.js +5 -0
  182. package/dist/collection/utils/either.js +3 -0
  183. package/dist/collection/utils/enum/enumUtils.js +3 -0
  184. package/dist/collection/utils/event/Events.js +1 -0
  185. package/dist/collection/utils/number/index.js +4 -0
  186. package/dist/collection/utils/option/option.js +4 -0
  187. package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
  188. package/dist/collection/utils/token/tokenUtils.js +9 -0
  189. package/dist/esm/Handler-f9b8735c.js +309 -0
  190. package/{www/build/app-globals-4fe0376b.js → dist/esm/app-globals-6f6aa89e.js} +10 -922
  191. package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
  192. package/{www/build/customized-slots-5dbf778c.js → dist/esm/customized-slots-6b427dda.js} +1 -1
  193. package/dist/esm/highlight-box_22.entry.js +722 -0
  194. package/dist/{vviinn-widgets/imageSearch.store-3204bc99.js → esm/imageSearch.store-0ae87235.js} +12070 -11855
  195. package/dist/{vviinn-widgets/index-89e62050.js → esm/index-2e296af4.js} +6 -639
  196. package/dist/esm/index-59f44eaa.js +1323 -0
  197. package/{www/build/index-bbcd6be9.js → dist/esm/index-ac05c460.js} +2 -4
  198. package/dist/esm/index.js +1 -0
  199. package/dist/esm/loader.js +19 -0
  200. package/dist/esm/polyfills/core-js.js +11 -0
  201. package/dist/esm/polyfills/css-shim.js +1 -0
  202. package/dist/esm/polyfills/dom.js +79 -0
  203. package/dist/esm/polyfills/es5-html-element.js +1 -0
  204. package/dist/esm/polyfills/index.js +34 -0
  205. package/dist/esm/polyfills/system.js +6 -0
  206. package/dist/esm/vviinn-carousel_3.entry.js +1168 -0
  207. package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
  208. package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
  209. package/dist/{vviinn-widgets → esm}/vviinn-recommendations-sidebar.entry.js +2 -2
  210. package/{www/build → dist/esm}/vviinn-vpr-button.entry.js +2 -2
  211. package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
  212. package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +12 -14
  213. package/dist/esm/vviinn-widgets.js +19 -0
  214. package/dist/index.cjs.js +1 -0
  215. package/dist/index.js +1 -0
  216. package/dist/loader/cdn.js +3 -0
  217. package/dist/loader/index.cjs.js +3 -0
  218. package/dist/loader/index.d.ts +12 -0
  219. package/dist/loader/index.es2017.js +3 -0
  220. package/dist/loader/index.js +4 -0
  221. package/dist/loader/package.json +10 -0
  222. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
  223. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -1
  224. package/dist/vviinn-widgets/index.esm.js +0 -1
  225. package/dist/vviinn-widgets/p-118ac907.js +1 -0
  226. package/dist/vviinn-widgets/p-11f61564.js +1 -0
  227. package/dist/vviinn-widgets/p-39fdc5c9.entry.js +1 -0
  228. package/dist/vviinn-widgets/p-762dc067.entry.js +1 -0
  229. package/dist/vviinn-widgets/p-7e2f542c.js +1 -0
  230. package/dist/vviinn-widgets/p-8d56e795.entry.js +1 -0
  231. package/dist/vviinn-widgets/p-8f955b15.entry.js +1 -0
  232. package/dist/vviinn-widgets/p-9654fe35.entry.js +1 -0
  233. package/dist/vviinn-widgets/p-9e5adc42.js +1 -0
  234. package/dist/vviinn-widgets/p-b3731705.entry.js +1 -0
  235. package/dist/vviinn-widgets/p-bad1809f.js +1 -0
  236. package/dist/vviinn-widgets/p-c36546fa.js +15 -0
  237. package/dist/vviinn-widgets/p-d991330b.entry.js +1 -0
  238. package/dist/vviinn-widgets/p-da9c933b.entry.js +1 -0
  239. package/dist/vviinn-widgets/p-ee46fc83.js +1 -0
  240. package/dist/vviinn-widgets/p-f41e25f0.entry.js +1 -0
  241. package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
  242. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
  243. package/package.json +1 -1
  244. package/www/build/index.esm.js +0 -1
  245. package/www/build/p-118ac907.js +1 -0
  246. package/www/build/p-11f61564.js +1 -0
  247. package/www/build/p-39fdc5c9.entry.js +1 -0
  248. package/www/build/p-762dc067.entry.js +1 -0
  249. package/www/build/p-7e2f542c.js +1 -0
  250. package/www/build/p-8d56e795.entry.js +1 -0
  251. package/www/build/p-8f955b15.entry.js +1 -0
  252. package/www/build/p-9654fe35.entry.js +1 -0
  253. package/www/build/p-9e5adc42.js +1 -0
  254. package/www/build/p-a67898be.css +1 -0
  255. package/www/build/p-b3731705.entry.js +1 -0
  256. package/www/build/p-bad1809f.js +1 -0
  257. package/www/build/p-c36546fa.js +15 -0
  258. package/www/build/p-cfd998c1.js +1 -0
  259. package/www/build/p-d991330b.entry.js +1 -0
  260. package/www/build/p-da9c933b.entry.js +1 -0
  261. package/www/build/p-ee46fc83.js +1 -0
  262. package/www/build/p-f41e25f0.entry.js +1 -0
  263. package/www/build/vviinn-widgets.css +1 -6
  264. package/www/build/vviinn-widgets.esm.js +1 -125
  265. package/www/index.html +1 -12
  266. package/dist/vviinn-widgets/Array-c4dc02db.js +0 -4295
  267. package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
  268. package/dist/vviinn-widgets/NonEmptyArray-65395d97.js +0 -4370
  269. package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
  270. package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
  271. package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
  272. package/dist/vviinn-widgets/image-cropper.entry.js +0 -118
  273. package/dist/vviinn-widgets/index-c8128606.js +0 -3010
  274. package/dist/vviinn-widgets/number-a80a4b3c.js +0 -1533
  275. package/dist/vviinn-widgets/search-filters.entry.js +0 -76
  276. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
  277. package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -210
  278. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -54
  279. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
  280. package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
  281. package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
  282. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
  283. package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
  284. package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
  285. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
  286. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
  287. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
  288. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
  289. package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
  290. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
  291. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
  292. package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -184
  293. package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
  294. package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
  295. package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
  296. package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
  297. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -4581
  298. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
  299. package/www/build/Array-c4dc02db.js +0 -4295
  300. package/www/build/Handler-47db9890.js +0 -1428
  301. package/www/build/NonEmptyArray-65395d97.js +0 -4370
  302. package/www/build/css-shim-f0027935.js +0 -4
  303. package/www/build/dom-db0073f0.js +0 -73
  304. package/www/build/highlight-box.entry.js +0 -41
  305. package/www/build/index-c8128606.js +0 -3010
  306. package/www/build/number-a80a4b3c.js +0 -1533
  307. package/www/build/search-filters.entry.js +0 -76
  308. package/www/build/shadow-css-c1fdfa9f.js +0 -389
  309. package/www/build/vviinn-detected-object.entry.js +0 -54
  310. package/www/build/vviinn-empty-results.entry.js +0 -16
  311. package/www/build/vviinn-example-image.entry.js +0 -38
  312. package/www/build/vviinn-example-images.entry.js +0 -28
  313. package/www/build/vviinn-image-selector.entry.js +0 -31
  314. package/www/build/vviinn-image-view.entry.js +0 -55
  315. package/www/build/vviinn-modal.entry.js +0 -30
  316. package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
  317. package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
  318. package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
  319. package/www/build/vviinn-onboarding.entry.js +0 -20
  320. package/www/build/vviinn-overlay.entry.js +0 -15
  321. package/www/build/vviinn-overlayed-modal.entry.js +0 -18
  322. package/www/build/vviinn-privacy-badge.entry.js +0 -20
  323. package/www/build/vviinn-product-card.entry.js +0 -184
  324. package/www/build/vviinn-server-error.entry.js +0 -16
  325. package/www/build/vviinn-slide.entry.js +0 -15
  326. package/www/build/vviinn-slider.entry.js +0 -120
  327. package/www/build/vviinn-teaser.entry.js +0 -20
  328. package/www/build/vviinn-vpr-widget.entry.js +0 -4581
  329. package/www/build/vviinn-vps-button.entry.js +0 -39
  330. package/www/build/vviinn-wrong-format.entry.js +0 -16
@@ -0,0 +1,722 @@
1
+ import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-59f44eaa.js';
2
+ import { O as Option, j as sequenceToOption, i as imageSearchState, a as _function, t as transform, k as move, l as makeRectangularSearchRequest, n as fromAlt, o as foldValueObject, p as scaleWithSized, q as center, r as detectedObjectEq, u as toFile, v as processSelectedFile, E as Either, w as match, x as fromImage, y as dimensionsFromImage, z as scaleByLargestSide, N as NonEmptyArray } from './imageSearch.store-0ae87235.js';
3
+ import { p as pipe, o as pointDiffSemigroup, q as fromMouseEvent } from './Handler-f9b8735c.js';
4
+ import { c as CheckIcon, O as OnboardingCard1Icon, d as OnboardingCard2Icon, e as OnboardingCard3Icon, A as ArrowIcon } from './index-ac05c460.js';
5
+ import { s as slotChangeListener } from './customized-slots-6b427dda.js';
6
+
7
+ // -------------------------------------------------------------------------------------
8
+ // -------------------------------------------------------------------------------------
9
+ // instances
10
+ // -------------------------------------------------------------------------------------
11
+ /**
12
+ * @category instances
13
+ * @since 2.10.0
14
+ */
15
+ var Eq = {
16
+ equals: function (first, second) { return first === second; }
17
+ };
18
+ /**
19
+ * @category instances
20
+ * @since 2.10.0
21
+ */
22
+ var Ord = {
23
+ equals: Eq.equals,
24
+ compare: function (first, second) { return (first < second ? -1 : first > second ? 1 : 0); }
25
+ };
26
+
27
+ const fromRectangle = (shape, target) => {
28
+ const top = `${shape.y}px`;
29
+ const left = `${shape.x}px`;
30
+ const right = `${target.width - (shape.x + shape.width)}px`;
31
+ const bottom = `${target.height - (shape.y + shape.height)}px`;
32
+ return {
33
+ top,
34
+ right,
35
+ bottom,
36
+ left,
37
+ };
38
+ };
39
+ const printClip = (clip) => `inset(${clip.top} ${clip.right} ${clip.bottom} ${clip.left})`;
40
+ const getClipValue = (shape, target) => printClip(fromRectangle(shape, target));
41
+
42
+ 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)}}";
43
+
44
+ let HighlightBox = class {
45
+ constructor(hostRef) {
46
+ registerInstance(this, hostRef);
47
+ }
48
+ getInsetValue() {
49
+ return pipe(sequenceToOption(imageSearchState.searchArea, imageSearchState.imageBounds), Option.map(([selection, image]) => getClipValue(selection, image)), Option.getOrElse(() => ""));
50
+ }
51
+ renderImage() {
52
+ return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.imageBounds), Option.map(([url, bounds]) => (h("img", { src: url, width: bounds.width, height: bounds.height, style: { "clip-path": `${this.getInsetValue()}` } }))), Option.getOrElse(() => ""));
53
+ }
54
+ render() {
55
+ return h(Host, null, this.renderImage());
56
+ }
57
+ };
58
+ HighlightBox.style = highlightBoxCss;
59
+
60
+ const findTarget = (ev) => {
61
+ return ev.target;
62
+ };
63
+
64
+ 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}";
65
+
66
+ const MIN_SEARCHAREA_SIZE = 40;
67
+ let ImageCropper = class {
68
+ constructor(hostRef) {
69
+ registerInstance(this, hostRef);
70
+ this.cropperChanged = createEvent(this, "cropperChanged", 7);
71
+ this.disabled = false;
72
+ this.handleMove = false;
73
+ this.mouseStartPoint = undefined;
74
+ this.bounds = undefined;
75
+ }
76
+ componentDidLoad() {
77
+ this.bounds = this.el.getBoundingClientRect();
78
+ }
79
+ handleHandlerMove(event) {
80
+ event.preventDefault();
81
+ event.stopPropagation();
82
+ const destination = fromMouseEvent(event);
83
+ const distance = pointDiffSemigroup.concat(destination, this.mouseStartPoint);
84
+ const transformedHandler = {
85
+ position: distance,
86
+ direction: this.handlerMoveDirection,
87
+ };
88
+ _function.pipe(imageSearchState.searchArea, Option.map((area) => {
89
+ const newSearchArea = transform(area, transformedHandler);
90
+ if (this.outOfBounds(newSearchArea))
91
+ return;
92
+ imageSearchState.searchArea = Option.some(newSearchArea);
93
+ this.mouseStartPoint = destination;
94
+ imageSearchState.detectedObject = undefined;
95
+ }));
96
+ }
97
+ outOfBounds(area) {
98
+ return (area.width < MIN_SEARCHAREA_SIZE ||
99
+ area.height < MIN_SEARCHAREA_SIZE ||
100
+ area.x < 0 ||
101
+ area.y < 0 ||
102
+ this.bounds.height - (area.y + area.height) < 0 ||
103
+ this.bounds.width - (area.x + area.width) < 0);
104
+ }
105
+ handleCropperMove(ev) {
106
+ ev.preventDefault();
107
+ ev.stopPropagation();
108
+ const destination = fromMouseEvent(ev);
109
+ const distance = pointDiffSemigroup.concat(destination, this.mouseStartPoint);
110
+ _function.pipe(imageSearchState.searchArea, Option.map((searchArea) => {
111
+ const newSearchArea = 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
+ imageSearchState.detectedObject = undefined;
118
+ imageSearchState.searchArea = Option.some(newSearchArea);
119
+ this.mouseStartPoint = destination;
120
+ }));
121
+ }
122
+ handlePointerDown(event) {
123
+ event.stopPropagation();
124
+ this.mouseStartPoint = 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
+ makeRectangularSearchRequest();
145
+ this.cropperChanged.emit();
146
+ }
147
+ getStyleMap() {
148
+ return _function.pipe(imageSearchState.searchArea, Option.map((rectangle) => {
149
+ return {
150
+ width: `${rectangle.width}px`,
151
+ height: `${rectangle.height}px`,
152
+ transform: `translate3d(${rectangle.x}px, ${rectangle.y}px, 0)`,
153
+ cursor: this.handleMove ? "move" : "default",
154
+ };
155
+ }), Option.getOrElse(() => {
156
+ return {};
157
+ }));
158
+ }
159
+ render() {
160
+ return (h(Host, { exportparts: "handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize" }, h("div", { class: {
161
+ "crop-area": true,
162
+ active: this.handleMove,
163
+ disabled: this.disabled,
164
+ }, draggable: false, style: this.getStyleMap(), onContextMenu: () => false, onPointerDown: (ev) => this.handlePointerDown(ev) }, imageSearchState.cropperHandlers.map((handler) => (h("cropper-handler", { disabled: this.disabled, handler: handler, onPointerDown: (ev) => this.handlePointerDown(ev) }))))));
165
+ }
166
+ get el() { return getElement(this); }
167
+ };
168
+ ImageCropper.style = imageCropperCss;
169
+
170
+ 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}}";
171
+
172
+ const FILTERS_COUNT = 5;
173
+ const ACTIVE_FILTER_CLASSNAME = ".filter.active";
174
+ const getFilterId = (filter) => filter.href.split("/").reverse()[0];
175
+ let SearchFilters = class {
176
+ constructor(hostRef) {
177
+ registerInstance(this, hostRef);
178
+ this.filterSelected = createEvent(this, "filterSelected", 7);
179
+ this.filter = null;
180
+ this.selectedCategoryId = null;
181
+ this.hideFilters = true;
182
+ }
183
+ handleFilterSelection(filter) {
184
+ return this.isFilterSelected(filter)
185
+ ? this.clearSelectedFilter()
186
+ : this.selectFilter(filter);
187
+ }
188
+ selectFilter(filter) {
189
+ this.selectedCategoryId = getFilterId(filter);
190
+ imageSearchState.activeIonLink = filter;
191
+ this.filterSelected.emit("select");
192
+ }
193
+ clearSelectedFilter() {
194
+ this.selectedCategoryId = null;
195
+ imageSearchState.activeIonLink = undefined;
196
+ this.findSelectedFilter().blur();
197
+ this.filterSelected.emit("deselect");
198
+ }
199
+ findSelectedFilter() {
200
+ return this.el.shadowRoot.querySelector(ACTIVE_FILTER_CLASSNAME);
201
+ }
202
+ toggleFilters() {
203
+ this.hideFilters = !this.hideFilters;
204
+ }
205
+ handleEnter(ev, f) {
206
+ if (ev.key !== "Enter")
207
+ return;
208
+ this.handleFilterSelection(f);
209
+ }
210
+ isFilterSelected(filterLink) {
211
+ return this.selectedCategoryId === getFilterId(filterLink);
212
+ }
213
+ render() {
214
+ return (h(Host, { exportparts: "filter, show-more-filters" }, h("div", { class: "filters" }, this.filter.filters
215
+ .filter((_, i) => (this.hideFilters ? i < FILTERS_COUNT : true))
216
+ .map((f, n) => (h("div", { role: "button", tabindex: "0", part: this.isFilterSelected(f) ? "filter active" : "filter", class: {
217
+ filter: true,
218
+ active: this.selectedCategoryId === getFilterId(f),
219
+ }, style: { "animation-delay": `${n * 10}ms` }, onPointerUp: (ev) => {
220
+ ev.stopPropagation();
221
+ this.handleFilterSelection(f);
222
+ }, onKeyPress: (ev) => this.handleEnter(ev, f) }, this.isFilterSelected(f) ? h(CheckIcon, null) : null, f.name))), h("div", { class: {
223
+ filter: true,
224
+ "show-more": true,
225
+ hidden: this.filter.filters.length <= FILTERS_COUNT,
226
+ active: !this.hideFilters,
227
+ }, role: "button", tabindex: "0", "aria-role": "button", onClick: () => this.toggleFilters(), onKeyPress: (ev) => {
228
+ if (ev.key === "Enter") {
229
+ this.toggleFilters();
230
+ }
231
+ }, part: "show-more-filters" }, this.hideFilters ? "Zeige mehr" : "Zeige weniger"))));
232
+ }
233
+ get el() { return getElement(this); }
234
+ };
235
+ SearchFilters.style = searchFiltersCss;
236
+
237
+ 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}";
238
+
239
+ let VviinnDetectedObject = class {
240
+ constructor(hostRef) {
241
+ registerInstance(this, hostRef);
242
+ this.detectedObjectClicked = createEvent(this, "detectedObjectClicked", 7);
243
+ this.position = ["0", "0"];
244
+ }
245
+ getObjectPosition() {
246
+ return _function.pipe(imageSearchState.imageBounds, Option.map((bounds) => {
247
+ const objectRectangle = fromAlt(foldValueObject(this.detectedObject).rectangle);
248
+ const { x, y } = _function.pipe(objectRectangle, scaleWithSized(bounds), center);
249
+ return [`${x}px`, `${y}px`];
250
+ }), Option.getOrElse(() => ["0", "0"]));
251
+ }
252
+ selectDetectedObject() {
253
+ _function.pipe(imageSearchState.imageBounds, Option.map((bounds) => {
254
+ const rectangle = foldValueObject(this.detectedObject).rectangle;
255
+ const transformedRect = fromAlt(rectangle);
256
+ const scaledRect = scaleWithSized(bounds)(transformedRect);
257
+ imageSearchState.detectedObject = this.detectedObject;
258
+ imageSearchState.searchArea = Option.some(scaledRect);
259
+ }));
260
+ makeRectangularSearchRequest();
261
+ this.detectedObjectClicked.emit();
262
+ }
263
+ isActive() {
264
+ if (!this.detectedObject)
265
+ return false;
266
+ if (!imageSearchState.detectedObject)
267
+ return false;
268
+ const thisObject = foldValueObject(this.detectedObject);
269
+ const savedObject = foldValueObject(imageSearchState.detectedObject);
270
+ return detectedObjectEq.equals(thisObject, savedObject);
271
+ }
272
+ render() {
273
+ return (h(Host, { class: {
274
+ active: this.isActive(),
275
+ }, onClick: () => this.selectDetectedObject(), style: {
276
+ "--x-position": this.getObjectPosition()[0],
277
+ "--y-position": this.getObjectPosition()[1],
278
+ } }));
279
+ }
280
+ };
281
+ VviinnDetectedObject.style = vviinnDetectedObjectCss;
282
+
283
+ const vviinnEmptyResultsCss = ":host{display:grid}vviinn-error{justify-items:center}";
284
+
285
+ let VviinnEmptyResults = class {
286
+ constructor(hostRef) {
287
+ registerInstance(this, hostRef);
288
+ this.actionClick = createEvent(this, "actionClick", 7);
289
+ }
290
+ render() {
291
+ 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."))));
292
+ }
293
+ };
294
+ VviinnEmptyResults.style = vviinnEmptyResultsCss;
295
+
296
+ 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}}";
297
+
298
+ let VviinnExampleImage = class {
299
+ constructor(hostRef) {
300
+ registerInstance(this, hostRef);
301
+ this.exampleImageSelected = createEvent(this, "exampleImageSelected", 7);
302
+ this.exampleImageError = createEvent(this, "exampleImageError", 7);
303
+ this.src = "";
304
+ this.width = 0;
305
+ this.height = 0;
306
+ this.selected = false;
307
+ }
308
+ async selectImage(_event) {
309
+ this.selected = true;
310
+ const file = await toFile(this.src);
311
+ const processResult = await processSelectedFile(file);
312
+ _function.pipe(processResult, Either.match(() => this.exampleImageError.emit(), () => this.exampleImageSelected.emit()));
313
+ this.selected = false;
314
+ }
315
+ showPreloader() {
316
+ return ((imageSearchState.objectDetectionInProgress ||
317
+ imageSearchState.loading) &&
318
+ this.selected);
319
+ }
320
+ render() {
321
+ return (h(Host, null, this.showPreloader() ? (h("div", { class: "image-preloader" }, h("vviinn-preloader", null))) : null, h("img", { onClick: (ev) => this.selectImage(ev), src: this.src, width: this.width, height: this.height })));
322
+ }
323
+ };
324
+ VviinnExampleImage.style = vviinnExampleImageCss;
325
+
326
+ 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}";
327
+
328
+ let VviinnExampleImages = class {
329
+ constructor(hostRef) {
330
+ registerInstance(this, hostRef);
331
+ this.imageSelected = createEvent(this, "imageSelected", 7);
332
+ this.imageSelectedError = createEvent(this, "imageSelectedError", 7);
333
+ }
334
+ handleImageSelection() {
335
+ this.imageSelected.emit();
336
+ }
337
+ handleImageSelectionError() {
338
+ this.imageSelectedError.emit();
339
+ }
340
+ componentWillLoad() {
341
+ slotChangeListener(this, this.el);
342
+ }
343
+ render() {
344
+ 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=" })))));
345
+ }
346
+ get el() { return getElement(this); }
347
+ };
348
+ VviinnExampleImages.style = vviinnExampleImagesCss;
349
+
350
+ 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}";
351
+
352
+ let VviinnImageSelector = class {
353
+ constructor(hostRef) {
354
+ registerInstance(this, hostRef);
355
+ this.imageSelected = createEvent(this, "imageSelected", 7);
356
+ this.imageSelectedError = createEvent(this, "imageSelectedError", 7);
357
+ }
358
+ async handleInputChange(event) {
359
+ const input = event.target;
360
+ const processingResult = await processSelectedFile(input.files[0]);
361
+ _function.pipe(processingResult, match(() => this.imageSelectedError.emit(), () => this.imageSelected.emit()));
362
+ input.value = null;
363
+ }
364
+ isLoading() {
365
+ return (imageSearchState.loading || imageSearchState.objectDetectionInProgress);
366
+ }
367
+ render() {
368
+ 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) })));
369
+ }
370
+ };
371
+ VviinnImageSelector.style = vviinnImageSelectorCss;
372
+
373
+ 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}";
374
+
375
+ const getImageSizes = (i) => {
376
+ const dimensions = dimensionsFromImage(i);
377
+ const resize = scaleByLargestSide(288);
378
+ const newDimensions = resize(dimensions);
379
+ const sizes = newDimensions.map(d => d.size);
380
+ return [sizes[0], sizes[1]];
381
+ };
382
+ let VviinnImageView = class {
383
+ constructor(hostRef) {
384
+ registerInstance(this, hostRef);
385
+ }
386
+ handleInitialImageLoad(ev) {
387
+ const target = ev.target;
388
+ const imageBounds = fromImage(target);
389
+ const padding = 12;
390
+ const { x, y } = move(imageBounds, { x: padding, y: padding });
391
+ const searchArea = {
392
+ x,
393
+ y,
394
+ width: imageBounds.width - padding * 2,
395
+ height: imageBounds.height - padding * 2,
396
+ };
397
+ imageSearchState.imageBounds = Option.some(imageBounds);
398
+ imageSearchState.searchArea = Option.some(searchArea);
399
+ }
400
+ renderDetectedObject(object) {
401
+ return h("vviinn-detected-object", { detectedObject: object });
402
+ }
403
+ renderImage() {
404
+ return _function.pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), Option.map(([url, refImage]) => {
405
+ const [width, height] = getImageSizes(refImage);
406
+ const image = (h("img", { decoding: "async", width: width, height: height, src: url, onLoad: (el) => this.handleInitialImageLoad(el), draggable: false }));
407
+ return image;
408
+ }), Option.getOrElse(() => null));
409
+ }
410
+ renderCropper() {
411
+ return _function.pipe(imageSearchState.imageUrl, Option.map(() => h("image-cropper", null)), Option.getOrElse(() => null));
412
+ }
413
+ render() {
414
+ return (h(Host, null, imageSearchState.loading ||
415
+ 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))));
416
+ }
417
+ };
418
+ VviinnImageView.style = vviinnImageViewCss;
419
+
420
+ 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%)}}";
421
+
422
+ let VviinnModal = class {
423
+ constructor(hostRef) {
424
+ registerInstance(this, hostRef);
425
+ this.modalClosed = createEvent(this, "modalClosed", 7);
426
+ this.secondaryActionClicked = createEvent(this, "secondaryActionClicked", 7);
427
+ this.active = false;
428
+ this.slider = false;
429
+ }
430
+ close() {
431
+ this.active = false;
432
+ setTimeout(() => {
433
+ this.modalClosed.emit();
434
+ }, this.slider ? 500 : 0);
435
+ }
436
+ handleAnimationEnd(ev) {
437
+ if (ev.animationName !== "fade-in")
438
+ return;
439
+ this.slider = true;
440
+ }
441
+ render() {
442
+ 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))));
443
+ }
444
+ };
445
+ VviinnModal.style = vviinnModalCss;
446
+
447
+ 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))}";
448
+
449
+ let VviinnOnboarding = class {
450
+ constructor(hostRef) {
451
+ registerInstance(this, hostRef);
452
+ }
453
+ componentWillLoad() {
454
+ slotChangeListener(this, this.el);
455
+ }
456
+ render() {
457
+ return (h(Host, null, h("slot", { name: "vviinn-onboarding-title" }, h("h3", null, "So funktioniert es")), h("vviinn-slider", { showArrows: true }, h("vviinn-slide", null, h("vviinn-onboarding-card-1", null)), h("vviinn-slide", null, h("vviinn-onboarding-card-2", null)), h("vviinn-slide", null, h("vviinn-onboarding-card-3", null)))));
458
+ }
459
+ get el() { return getElement(this); }
460
+ };
461
+ VviinnOnboarding.style = vviinnOnboardingCss;
462
+
463
+ 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}";
464
+
465
+ let VviinnOnboardingCard1 = class {
466
+ constructor(hostRef) {
467
+ registerInstance(this, hostRef);
468
+ }
469
+ componentWillLoad() {
470
+ slotChangeListener(this, this.el);
471
+ }
472
+ render() {
473
+ 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.")))));
474
+ }
475
+ get el() { return getElement(this); }
476
+ };
477
+ VviinnOnboardingCard1.style = onboardingCardCss$2;
478
+
479
+ 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}";
480
+
481
+ let VviinnOnboardingCard2 = class {
482
+ constructor(hostRef) {
483
+ registerInstance(this, hostRef);
484
+ }
485
+ componentWillLoad() {
486
+ slotChangeListener(this, this.el);
487
+ }
488
+ render() {
489
+ return (h(Host, null, h("slot", { name: "onboarding-card-2-icon" }, h(OnboardingCard2Icon, null)), h("slot", { name: "onboarding-card-2-text" }, h("div", { class: "text" }, h("h4", null, "Verfeiner deine Suche"), h("p", null, "Du kannst den Bildrahmen selber festlegen und so die Produkte genau ausw\u00E4hlen.")))));
490
+ }
491
+ get el() { return getElement(this); }
492
+ };
493
+ VviinnOnboardingCard2.style = onboardingCardCss$1;
494
+
495
+ 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}";
496
+
497
+ let VviinnOnboardingCard3 = class {
498
+ constructor(hostRef) {
499
+ registerInstance(this, hostRef);
500
+ }
501
+ componentWillLoad() {
502
+ slotChangeListener(this, this.el);
503
+ }
504
+ render() {
505
+ return (h(Host, null, h("slot", { name: "onboarding-card-3-icon" }, h(OnboardingCard3Icon, null)), h("slot", { name: "onboarding-card-3-text" }, h("div", { class: "text" }, h("h4", null, "Ohne Hintergrund"), h("p", null, "Die besten Ergebnisse erh\u00E4ltst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist.")))));
506
+ }
507
+ get el() { return getElement(this); }
508
+ };
509
+ VviinnOnboardingCard3.style = onboardingCardCss;
510
+
511
+ 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}}";
512
+
513
+ let VviinnOverlay = class {
514
+ constructor(hostRef) {
515
+ registerInstance(this, hostRef);
516
+ }
517
+ render() {
518
+ return (h(Host, null, h("slot", null)));
519
+ }
520
+ };
521
+ VviinnOverlay.style = vviinnOverlayCss;
522
+
523
+ 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}}";
524
+
525
+ let VviinnOverlayedModal = class {
526
+ constructor(hostRef) {
527
+ registerInstance(this, hostRef);
528
+ this.secondaryActionClicked = createEvent(this, "secondaryActionClicked", 7);
529
+ this.modalClosed = createEvent(this, "modalClosed", 7);
530
+ this.active = false;
531
+ }
532
+ render() {
533
+ return (h(Host, { class: { active: this.active } }, h("vviinn-overlay", null, h("vviinn-modal", { onSecondaryActionClicked: () => this.secondaryActionClicked.emit(), active: this.active }, h("slot", null, "CONTENT")))));
534
+ }
535
+ };
536
+ VviinnOverlayedModal.style = vviinnOverlayedModalCss;
537
+
538
+ 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}";
539
+
540
+ let VviinnPrivacyBadge = class {
541
+ constructor(hostRef) {
542
+ registerInstance(this, hostRef);
543
+ }
544
+ componentWillLoad() {
545
+ slotChangeListener(this, this.el);
546
+ }
547
+ render() {
548
+ return (h(Host, null, h("slot", null, h("div", { class: "content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" }, h("defs", null), h("path", { fill: "#525252", d: "M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z" }), h("path", { fill: "#525252", d: "M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z" })), h("slot", { name: "vviinn-privacy-badge-text" }, h("p", null, "Wir gehen sorgf\u00E4ltig mit Deinen Daten um. Deine Bilder werden nur zum Zweck der Bildsuche gespeichert."))))));
549
+ }
550
+ get el() { return getElement(this); }
551
+ };
552
+ VviinnPrivacyBadge.style = vviinnPrivacyBadgeCss;
553
+
554
+ const vviinnServerErrorCss = ":host{display:block}";
555
+
556
+ let VviinnServerError = class {
557
+ constructor(hostRef) {
558
+ registerInstance(this, hostRef);
559
+ this.actionClick = createEvent(this, "actionClick", 7);
560
+ }
561
+ render() {
562
+ return (h(Host, null, h("vviinn-error", null, h("h4", { slot: "title" }, "Keine Verbindung"), h("span", { slot: "text" }, "Etwas hat leider nicht funktioniert. Bitte pr\u00FCfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."), h("button", { slot: "action", onClick: () => this.actionClick.emit() }, "Erneut versuchen"))));
563
+ }
564
+ };
565
+ VviinnServerError.style = vviinnServerErrorCss;
566
+
567
+ const vviinnSlideCss = ":host{display:grid;justify-items:center}";
568
+
569
+ let VviinnSlide = class {
570
+ constructor(hostRef) {
571
+ registerInstance(this, hostRef);
572
+ }
573
+ render() {
574
+ return (h(Host, null, h("slot", null)));
575
+ }
576
+ };
577
+ VviinnSlide.style = vviinnSlideCss;
578
+
579
+ const getStyleMap = (data) => {
580
+ return {
581
+ "arrow-wrapper": true,
582
+ [data.kind]: true,
583
+ disabled: data.disabled,
584
+ };
585
+ };
586
+ const Arrow = ({ kind, tabindex, disabled, onClick, onKeyDown, }) => (h("div", { class: getStyleMap({ kind, disabled }), onClick: onClick, tabindex: tabindex, onKeyDown: onKeyDown },
587
+ h(ArrowIcon, null)));
588
+
589
+ 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}";
590
+
591
+ let VviinnSlider = class {
592
+ constructor(hostRef) {
593
+ registerInstance(this, hostRef);
594
+ this.elementsCount = 0;
595
+ this.internalPosition = 0;
596
+ this.swipeStartPosition = Option.none;
597
+ this.showBullets = true;
598
+ this.position = 0;
599
+ this.showArrows = false;
600
+ }
601
+ positionWatchHandler(newValue) {
602
+ this.internalPosition = newValue;
603
+ this.el.style.setProperty("--position", `${newValue}`);
604
+ this.setActiveCssClassToSlide(newValue);
605
+ }
606
+ connectedCallback() {
607
+ this.handleDomContentChanges();
608
+ }
609
+ handleDomContentChanges() {
610
+ const items = this.el.querySelectorAll("vviinn-slide");
611
+ this.elementsCount = items.length;
612
+ this.el.style.setProperty("--num-items", `${this.elementsCount}`);
613
+ this.setActiveCssClassToSlide(0);
614
+ }
615
+ setActiveCssClassToSlide(index) {
616
+ const items = this.el.querySelectorAll("vviinn-slide");
617
+ items.forEach((i) => i.classList.remove("active"));
618
+ items[index].classList.add("active");
619
+ }
620
+ goToSlide(index) {
621
+ this.internalPosition = index;
622
+ this.el.style.setProperty("--position", `${index}`);
623
+ this.setActiveCssClassToSlide(index);
624
+ }
625
+ renderBullets() {
626
+ return this.showBullets ? (h("div", { class: "controls" }, NonEmptyArray.range(0, this.elementsCount - 1).map((i) => (h("div", { class: {
627
+ bullet: true,
628
+ active: i == this.internalPosition % this.elementsCount,
629
+ }, onClick: () => this.goToSlide(i) }))))) : null;
630
+ }
631
+ nextSlide() {
632
+ this.internalPosition++;
633
+ this.renderSlidePosition();
634
+ }
635
+ prevSlide() {
636
+ const nextPostion = this.internalPosition - 1;
637
+ this.internalPosition =
638
+ nextPostion > -1 ? nextPostion : this.elementsCount - 1;
639
+ this.renderSlidePosition();
640
+ }
641
+ renderSlidePosition() {
642
+ requestAnimationFrame(() => {
643
+ this.el.style.setProperty("--position", `${this.internalPosition % this.elementsCount}`);
644
+ });
645
+ }
646
+ handleKeyDown(event) {
647
+ if (event.key !== "Space" && event.key !== "Enter")
648
+ return;
649
+ const target = event.target;
650
+ const direction = target.className.includes("prev") ? "prev" : "next";
651
+ switch (direction) {
652
+ case "prev":
653
+ this.prevSlide();
654
+ break;
655
+ case "next":
656
+ this.nextSlide();
657
+ break;
658
+ }
659
+ }
660
+ handleTouchStart(event) {
661
+ if (!this.showBullets)
662
+ return;
663
+ this.swipeStartPosition = _function.pipe(event.touches[0], Option.fromNullable, Option.map((t) => t.clientX));
664
+ }
665
+ handleTouchEnd(event) {
666
+ if (!this.showBullets)
667
+ return;
668
+ const swipeEndPosition = _function.pipe(event.changedTouches[0], Option.fromNullable, Option.map((t) => t.clientX));
669
+ _function.pipe(sequenceToOption(this.swipeStartPosition, swipeEndPosition), Option.map(([start, end]) => Ord.compare(start, end)), Option.map((swipeDirection) => {
670
+ switch (swipeDirection) {
671
+ case 1:
672
+ return this.nextSlide();
673
+ case -1:
674
+ return this.prevSlide();
675
+ }
676
+ }));
677
+ }
678
+ render() {
679
+ return (h(Host, null, h("div", { class: "items-wrapper" }, h("div", { class: "items", onTouchStart: (e) => this.handleTouchStart(e), onTouchEnd: (e) => this.handleTouchEnd(e) }, h("slot", null))), this.showArrows
680
+ ? [
681
+ h(Arrow, { kind: "prev", onClick: () => this.prevSlide(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: 1, disabled: false }),
682
+ h(Arrow, { kind: "next", onClick: () => this.nextSlide(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: 0, disabled: false }),
683
+ ]
684
+ : null, this.renderBullets()));
685
+ }
686
+ get el() { return getElement(this); }
687
+ static get watchers() { return {
688
+ "position": ["positionWatchHandler"]
689
+ }; }
690
+ };
691
+ VviinnSlider.style = vviinnSliderCss;
692
+
693
+ 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}";
694
+
695
+ let VviinnTeaser = class {
696
+ constructor(hostRef) {
697
+ registerInstance(this, hostRef);
698
+ }
699
+ componentWillLoad() {
700
+ slotChangeListener(this, this.el);
701
+ }
702
+ render() {
703
+ return (h(Host, null, h("slot", null, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", fill: "none" }, h("defs", null), 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" }), 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" })), h("span", { class: "vviinn-teaser-text" }, h("slot", { name: "vviinn-teaser-text" }, "Finde Produkte auf ", h("br", null), " einem Foto")))));
704
+ }
705
+ get el() { return getElement(this); }
706
+ };
707
+ VviinnTeaser.style = vviinnTeaserCss;
708
+
709
+ const vviinnWrongFormatCss = ":host{display:block}";
710
+
711
+ let VviinnWrongFormat = class {
712
+ constructor(hostRef) {
713
+ registerInstance(this, hostRef);
714
+ this.actionClick = createEvent(this, "actionClick", 7);
715
+ }
716
+ render() {
717
+ return (h(Host, null, h("vviinn-error", null, h("h4", { slot: "title" }, "Dateityp wird nicht unterst\u00FCtzt"), h("span", { slot: "text" }, "Leider unterst\u00FCtzen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."), h("button", { slot: "action", onClick: () => this.actionClick.emit() }, "Neues Bild hochladen"))));
718
+ }
719
+ };
720
+ VviinnWrongFormat.style = vviinnWrongFormatCss;
721
+
722
+ export { HighlightBox as highlight_box, ImageCropper as image_cropper, SearchFilters as search_filters, VviinnDetectedObject as vviinn_detected_object, VviinnEmptyResults as vviinn_empty_results, VviinnExampleImage as vviinn_example_image, VviinnExampleImages as vviinn_example_images, VviinnImageSelector as vviinn_image_selector, VviinnImageView as vviinn_image_view, VviinnModal as vviinn_modal, VviinnOnboarding as vviinn_onboarding, VviinnOnboardingCard1 as vviinn_onboarding_card_1, VviinnOnboardingCard2 as vviinn_onboarding_card_2, VviinnOnboardingCard3 as vviinn_onboarding_card_3, VviinnOverlay as vviinn_overlay, VviinnOverlayedModal as vviinn_overlayed_modal, VviinnPrivacyBadge as vviinn_privacy_badge, VviinnServerError as vviinn_server_error, VviinnSlide as vviinn_slide, VviinnSlider as vviinn_slider, VviinnTeaser as vviinn_teaser, VviinnWrongFormat as vviinn_wrong_format };