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.
- package/dist/cjs/Handler-d1a8a86a.js +329 -0
- package/dist/{vviinn-widgets/app-globals-e0943e34.js → cjs/app-globals-30781f30.js} +15 -925
- package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
- package/dist/{vviinn-widgets/customized-slots-f3449695.js → cjs/customized-slots-5d904d8e.js} +6 -3
- package/dist/cjs/highlight-box_22.cjs.entry.js +737 -0
- package/{www/build/imageSearch.store-407f49f0.js → dist/cjs/imageSearch.store-128957a4.js} +11573 -11902
- package/dist/cjs/index-741a970d.js +1354 -0
- package/dist/cjs/index-c493804d.js +41 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
- package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
- package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +31 -30
- package/dist/cjs/vviinn-widgets.cjs.js +21 -0
- package/dist/collection/Image/error.js +14 -0
- package/dist/collection/Image/form.js +5 -0
- package/dist/collection/Image/fromFile.js +18 -0
- package/dist/collection/Image/imageToB64.js +9 -0
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +6 -0
- package/dist/collection/Image/resizeImage.js +28 -0
- package/dist/collection/Image/sizing.js +39 -0
- package/dist/collection/Image/toFile.js +17 -0
- package/dist/collection/analytics/GAnalytics.js +32 -0
- package/dist/collection/analytics/GeneralAnalytics.js +9 -0
- package/dist/collection/analytics/GtagAnalytics.js +35 -0
- package/dist/collection/analytics/ProductAnalytics.js +1 -0
- package/dist/collection/campaign/Campaign.js +8 -0
- package/dist/collection/campaign/CampaignService.js +5 -0
- package/dist/collection/campaign/VCSCampaign.js +1 -0
- package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
- package/dist/collection/campaign/VCSCampaignService.js +5 -0
- package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
- package/dist/collection/campaign/VPRCampaignService.js +5 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/customized-slots.js +47 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
- package/dist/{vviinn-widgets/image-cropper.entry.js → collection/components/image-search/image-view/image-cropper/image-cropper.js} +54 -32
- package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +102 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +138 -0
- package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +115 -18
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
- package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
- package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
- package/dist/{vviinn-widgets/index-c9483145.js → collection/components/vviinn-icons/index.js} +13 -12
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +83 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -0
- package/dist/collection/components/vviinn-slider/arrow.js +11 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
- package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
- package/dist/collection/components/vviinn-vpr-widget/GridMode.js +1 -0
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +441 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +74 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +177 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +247 -0
- package/dist/collection/cropper/Cropper.js +1 -0
- package/dist/collection/cropper/Handler.js +61 -0
- package/dist/collection/dom/index.js +3 -0
- package/dist/collection/error.js +14 -0
- package/dist/collection/file/index.js +4 -0
- package/dist/collection/geometry/Clip.js +14 -0
- package/dist/collection/geometry/Point.js +32 -0
- package/dist/collection/geometry/Rectangle.js +95 -0
- package/dist/collection/geometry/RectangleAlt.js +1 -0
- package/dist/collection/geometry/Sized.js +8 -0
- package/dist/collection/global.js +19 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/generated.js +5 -0
- package/dist/collection/interfaces/recommendation.js +1 -0
- package/dist/collection/network/apiClient.js +9 -0
- package/dist/collection/network/ion/File.js +14 -0
- package/dist/collection/network/ion/Form.js +64 -0
- package/dist/collection/network/ion/Link.js +8 -0
- package/dist/collection/network/ion/ValueObject.js +23 -0
- package/dist/collection/network/request.js +19 -0
- package/dist/collection/network/utils.js +37 -0
- package/dist/collection/recommendation/recommendation.js +1 -0
- package/dist/collection/searchSession/searchSession.js +26 -0
- package/dist/collection/sentry.js +14 -0
- package/dist/collection/slider/GridMode.js +1 -0
- package/dist/collection/store/file-processing.js +13 -0
- package/dist/collection/store/imageSearch.store.js +138 -0
- package/dist/collection/store/store.js +11 -0
- package/dist/collection/stories/Button.js +21 -0
- package/dist/collection/stories/Button.stories.js +42 -0
- package/dist/collection/stories/Header.js +45 -0
- package/dist/collection/stories/Header.stories.js +15 -0
- package/dist/collection/stories/Page.js +61 -0
- package/dist/collection/stories/Page.stories.js +19 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/stories/image-selector.stories.js +6 -0
- package/dist/collection/stories/image-view.stories.js +6 -0
- package/dist/collection/stories/modal.stories.js +12 -0
- package/dist/collection/stories/onboarding.stories.js +11 -0
- package/dist/collection/stories/overlay.stories.js +5 -0
- package/dist/collection/stories/overlayedModal.stories.js +8 -0
- package/dist/collection/stories/privacy-badge.stories.js +11 -0
- package/dist/collection/stories/slider.stories.js +17 -0
- package/dist/collection/stories/teaser.stories.js +5 -0
- package/dist/collection/stories/vps-widget.stories.js +47 -0
- package/dist/collection/stories/vviinn-product.stories.js +19 -0
- package/dist/collection/utils/collections/collectionsUtils.js +5 -0
- package/dist/collection/utils/either.js +3 -0
- package/dist/collection/utils/enum/enumUtils.js +3 -0
- package/dist/collection/utils/event/Events.js +1 -0
- package/dist/collection/utils/number/index.js +4 -0
- package/dist/collection/utils/option/option.js +4 -0
- package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
- package/dist/collection/utils/token/tokenUtils.js +9 -0
- package/dist/esm/Handler-639a4cb3.js +308 -0
- package/{www/build/app-globals-e0943e34.js → dist/esm/app-globals-345e497d.js} +10 -922
- package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
- package/{www/build/customized-slots-f3449695.js → dist/esm/customized-slots-a76a8d41.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +712 -0
- package/dist/{vviinn-widgets/imageSearch.store-407f49f0.js → esm/imageSearch.store-8eab0da1.js} +11510 -11872
- package/dist/esm/index-6fa21e24.js +1323 -0
- package/{www/build/index-c9483145.js → dist/esm/index-8cb063df.js} +6 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
- package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
- package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
- package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
- package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +4 -7
- package/dist/esm/vviinn-widgets.js +19 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +12 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +10 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
- package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +13 -3
- package/dist/types/components.d.ts +54 -0
- package/dist/vviinn-widgets/index.esm.js +0 -1
- package/dist/vviinn-widgets/p-04b06ea9.entry.js +1 -0
- package/dist/vviinn-widgets/p-400eb62f.entry.js +1 -0
- package/dist/vviinn-widgets/p-56fc949a.js +1 -0
- package/dist/vviinn-widgets/p-59edfbe2.js +1 -0
- package/dist/vviinn-widgets/p-78ccc9eb.js +15 -0
- package/dist/vviinn-widgets/p-9d24f51e.entry.js +1 -0
- package/dist/vviinn-widgets/p-d085199d.entry.js +1 -0
- package/dist/vviinn-widgets/p-e1ba8626.js +1 -0
- package/dist/vviinn-widgets/p-e38f4aa2.entry.js +1 -0
- package/dist/vviinn-widgets/p-e67cae57.js +1 -0
- package/dist/vviinn-widgets/p-f47e82b2.entry.js +1 -0
- package/dist/vviinn-widgets/p-f582db5c.js +1 -0
- package/dist/vviinn-widgets/p-fb14e3cc.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
- package/package.json +3 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-04b06ea9.entry.js +1 -0
- package/www/build/p-400eb62f.entry.js +1 -0
- package/www/build/p-56fc949a.js +1 -0
- package/www/build/p-59edfbe2.js +1 -0
- package/www/build/p-78ccc9eb.js +15 -0
- package/www/build/p-7e4978d5.js +1 -0
- package/www/build/p-9d24f51e.entry.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-d085199d.entry.js +1 -0
- package/www/build/p-e1ba8626.js +1 -0
- package/www/build/p-e38f4aa2.entry.js +1 -0
- package/www/build/p-e67cae57.js +1 -0
- package/www/build/p-f47e82b2.entry.js +1 -0
- package/www/build/p-f582db5c.js +1 -0
- package/www/build/p-fb14e3cc.entry.js +1 -0
- package/www/build/vviinn-widgets.css +1 -6
- package/www/build/vviinn-widgets.esm.js +1 -125
- package/www/index.html +6 -13
- package/dist/vviinn-widgets/Array-4b9f84cf.js +0 -4295
- package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
- package/dist/vviinn-widgets/NonEmptyArray-6ef0d207.js +0 -4370
- package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
- package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
- package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
- package/dist/vviinn-widgets/index-b6d739a9.js +0 -3010
- package/dist/vviinn-widgets/number-98d54dd6.js +0 -1533
- package/dist/vviinn-widgets/search-filters.entry.js +0 -73
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
- package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -205
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -52
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
- package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -176
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -128
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
- package/www/build/Array-4b9f84cf.js +0 -4295
- package/www/build/Handler-47db9890.js +0 -1428
- package/www/build/NonEmptyArray-6ef0d207.js +0 -4370
- package/www/build/css-shim-f0027935.js +0 -4
- package/www/build/dom-db0073f0.js +0 -73
- package/www/build/highlight-box.entry.js +0 -41
- package/www/build/image-cropper.entry.js +0 -113
- package/www/build/index-b6d739a9.js +0 -3010
- package/www/build/number-98d54dd6.js +0 -1533
- package/www/build/search-filters.entry.js +0 -73
- package/www/build/shadow-css-c1fdfa9f.js +0 -389
- package/www/build/vviinn-detected-object.entry.js +0 -52
- package/www/build/vviinn-empty-results.entry.js +0 -16
- package/www/build/vviinn-example-image.entry.js +0 -38
- package/www/build/vviinn-example-images.entry.js +0 -28
- package/www/build/vviinn-image-selector.entry.js +0 -31
- package/www/build/vviinn-image-view.entry.js +0 -55
- package/www/build/vviinn-modal.entry.js +0 -30
- package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
- package/www/build/vviinn-onboarding.entry.js +0 -20
- package/www/build/vviinn-overlay.entry.js +0 -15
- package/www/build/vviinn-overlayed-modal.entry.js +0 -18
- package/www/build/vviinn-privacy-badge.entry.js +0 -20
- package/www/build/vviinn-product-card.entry.js +0 -176
- package/www/build/vviinn-server-error.entry.js +0 -16
- package/www/build/vviinn-slide.entry.js +0 -15
- package/www/build/vviinn-slider.entry.js +0 -120
- package/www/build/vviinn-teaser.entry.js +0 -20
- package/www/build/vviinn-vpr-widget.entry.js +0 -128
- package/www/build/vviinn-vps-button.entry.js +0 -39
- package/www/build/vviinn-wrong-format.entry.js +0 -16
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// -------------------------------------------------------------------------------------
|
|
4
|
+
/**
|
|
5
|
+
* @since 2.0.0
|
|
6
|
+
*/
|
|
7
|
+
function identity(a) {
|
|
8
|
+
return a;
|
|
9
|
+
}
|
|
10
|
+
function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
11
|
+
switch (arguments.length) {
|
|
12
|
+
case 1:
|
|
13
|
+
return ab;
|
|
14
|
+
case 2:
|
|
15
|
+
return function () {
|
|
16
|
+
return bc(ab.apply(this, arguments));
|
|
17
|
+
};
|
|
18
|
+
case 3:
|
|
19
|
+
return function () {
|
|
20
|
+
return cd(bc(ab.apply(this, arguments)));
|
|
21
|
+
};
|
|
22
|
+
case 4:
|
|
23
|
+
return function () {
|
|
24
|
+
return de(cd(bc(ab.apply(this, arguments))));
|
|
25
|
+
};
|
|
26
|
+
case 5:
|
|
27
|
+
return function () {
|
|
28
|
+
return ef(de(cd(bc(ab.apply(this, arguments)))));
|
|
29
|
+
};
|
|
30
|
+
case 6:
|
|
31
|
+
return function () {
|
|
32
|
+
return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
|
|
33
|
+
};
|
|
34
|
+
case 7:
|
|
35
|
+
return function () {
|
|
36
|
+
return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
|
|
37
|
+
};
|
|
38
|
+
case 8:
|
|
39
|
+
return function () {
|
|
40
|
+
return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
|
|
41
|
+
};
|
|
42
|
+
case 9:
|
|
43
|
+
return function () {
|
|
44
|
+
return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @since 2.0.0
|
|
51
|
+
*/
|
|
52
|
+
function tuple() {
|
|
53
|
+
var t = [];
|
|
54
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
55
|
+
t[_i] = arguments[_i];
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
}
|
|
59
|
+
function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
60
|
+
switch (arguments.length) {
|
|
61
|
+
case 1:
|
|
62
|
+
return a;
|
|
63
|
+
case 2:
|
|
64
|
+
return ab(a);
|
|
65
|
+
case 3:
|
|
66
|
+
return bc(ab(a));
|
|
67
|
+
case 4:
|
|
68
|
+
return cd(bc(ab(a)));
|
|
69
|
+
case 5:
|
|
70
|
+
return de(cd(bc(ab(a))));
|
|
71
|
+
case 6:
|
|
72
|
+
return ef(de(cd(bc(ab(a)))));
|
|
73
|
+
case 7:
|
|
74
|
+
return fg(ef(de(cd(bc(ab(a))))));
|
|
75
|
+
case 8:
|
|
76
|
+
return gh(fg(ef(de(cd(bc(ab(a)))))));
|
|
77
|
+
case 9:
|
|
78
|
+
return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
|
|
79
|
+
default:
|
|
80
|
+
var ret = arguments[0];
|
|
81
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
82
|
+
ret = arguments[i](ret);
|
|
83
|
+
}
|
|
84
|
+
return ret;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// -------------------------------------------------------------------------------------
|
|
89
|
+
// Option
|
|
90
|
+
// -------------------------------------------------------------------------------------
|
|
91
|
+
/** @internal */
|
|
92
|
+
var isNone = function (fa) { return fa._tag === 'None'; };
|
|
93
|
+
/** @internal */
|
|
94
|
+
var isSome = function (fa) { return fa._tag === 'Some'; };
|
|
95
|
+
/** @internal */
|
|
96
|
+
var none = { _tag: 'None' };
|
|
97
|
+
/** @internal */
|
|
98
|
+
var some = function (a) { return ({ _tag: 'Some', value: a }); };
|
|
99
|
+
// -------------------------------------------------------------------------------------
|
|
100
|
+
// Either
|
|
101
|
+
// -------------------------------------------------------------------------------------
|
|
102
|
+
/** @internal */
|
|
103
|
+
var isLeft = function (ma) { return ma._tag === 'Left'; };
|
|
104
|
+
/** @internal */
|
|
105
|
+
var left = function (e) { return ({ _tag: 'Left', left: e }); };
|
|
106
|
+
/** @internal */
|
|
107
|
+
var right = function (a) { return ({ _tag: 'Right', right: a }); };
|
|
108
|
+
// -------------------------------------------------------------------------------------
|
|
109
|
+
// Record
|
|
110
|
+
// -------------------------------------------------------------------------------------
|
|
111
|
+
/** @internal */
|
|
112
|
+
var has = Object.prototype.hasOwnProperty;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* If a type `A` can form a `Semigroup` it has an **associative** binary operation.
|
|
116
|
+
*
|
|
117
|
+
* ```ts
|
|
118
|
+
* interface Semigroup<A> {
|
|
119
|
+
* readonly concat: (x: A, y: A) => A
|
|
120
|
+
* }
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
|
|
124
|
+
*
|
|
125
|
+
* ```ts
|
|
126
|
+
* concat(x, concat(y, z)) = concat(concat(x, y), z)
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* A common example of a semigroup is the type `string` with the operation `+`.
|
|
130
|
+
*
|
|
131
|
+
* ```ts
|
|
132
|
+
* import { Semigroup } from 'fp-ts/Semigroup'
|
|
133
|
+
*
|
|
134
|
+
* const semigroupString: Semigroup<string> = {
|
|
135
|
+
* concat: (x, y) => x + y
|
|
136
|
+
* }
|
|
137
|
+
*
|
|
138
|
+
* const x = 'x'
|
|
139
|
+
* const y = 'y'
|
|
140
|
+
* const z = 'z'
|
|
141
|
+
*
|
|
142
|
+
* semigroupString.concat(x, y) // 'xy'
|
|
143
|
+
*
|
|
144
|
+
* semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
|
|
145
|
+
*
|
|
146
|
+
* semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
|
|
147
|
+
* ```
|
|
148
|
+
*
|
|
149
|
+
* *Adapted from https://typelevel.org/cats*
|
|
150
|
+
*
|
|
151
|
+
* @since 2.0.0
|
|
152
|
+
*/
|
|
153
|
+
/**
|
|
154
|
+
* Given a struct of semigroups returns a semigroup for the struct.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* import { struct } from 'fp-ts/Semigroup'
|
|
158
|
+
* import * as N from 'fp-ts/number'
|
|
159
|
+
*
|
|
160
|
+
* interface Point {
|
|
161
|
+
* readonly x: number
|
|
162
|
+
* readonly y: number
|
|
163
|
+
* }
|
|
164
|
+
*
|
|
165
|
+
* const S = struct<Point>({
|
|
166
|
+
* x: N.SemigroupSum,
|
|
167
|
+
* y: N.SemigroupSum
|
|
168
|
+
* })
|
|
169
|
+
*
|
|
170
|
+
* assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
|
|
171
|
+
*
|
|
172
|
+
* @category combinators
|
|
173
|
+
* @since 2.10.0
|
|
174
|
+
*/
|
|
175
|
+
var struct = function (semigroups) { return ({
|
|
176
|
+
concat: function (first, second) {
|
|
177
|
+
var r = {};
|
|
178
|
+
for (var k in semigroups) {
|
|
179
|
+
if (has.call(semigroups, k)) {
|
|
180
|
+
r[k] = semigroups[k].concat(first[k], second[k]);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return r;
|
|
184
|
+
}
|
|
185
|
+
}); };
|
|
186
|
+
// -------------------------------------------------------------------------------------
|
|
187
|
+
// instances
|
|
188
|
+
// -------------------------------------------------------------------------------------
|
|
189
|
+
/**
|
|
190
|
+
* Always return the first argument.
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* import * as S from 'fp-ts/Semigroup'
|
|
194
|
+
*
|
|
195
|
+
* assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
|
|
196
|
+
*
|
|
197
|
+
* @category instances
|
|
198
|
+
* @since 2.10.0
|
|
199
|
+
*/
|
|
200
|
+
var first = function () { return ({ concat: identity }); };
|
|
201
|
+
/**
|
|
202
|
+
* Always return the last argument.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* import * as S from 'fp-ts/Semigroup'
|
|
206
|
+
*
|
|
207
|
+
* assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
|
|
208
|
+
*
|
|
209
|
+
* @category instances
|
|
210
|
+
* @since 2.10.0
|
|
211
|
+
*/
|
|
212
|
+
var last = function () { return ({ concat: function (_, y) { return y; } }); };
|
|
213
|
+
/**
|
|
214
|
+
* Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
|
|
215
|
+
*
|
|
216
|
+
* @category instances
|
|
217
|
+
* @since 2.0.0
|
|
218
|
+
* @deprecated
|
|
219
|
+
*/
|
|
220
|
+
var semigroupSum = {
|
|
221
|
+
concat: function (x, y) { return x + y; }
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const semigroupDiff = {
|
|
225
|
+
concat: (x, y) => x - y,
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
const fromRectangle$1 = ({ x, y }) => {
|
|
229
|
+
return {
|
|
230
|
+
x,
|
|
231
|
+
y,
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
const fromMouseEvent = ({ clientX, clientY }) => {
|
|
235
|
+
return {
|
|
236
|
+
x: clientX,
|
|
237
|
+
y: clientY,
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
const pointDiffSemigroup = struct({
|
|
241
|
+
x: semigroupDiff,
|
|
242
|
+
y: semigroupDiff,
|
|
243
|
+
});
|
|
244
|
+
const pointSumSemigroup = struct({
|
|
245
|
+
x: semigroupSum,
|
|
246
|
+
y: semigroupSum,
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
exports.HandlerDirection = void 0;
|
|
250
|
+
(function (HandlerDirection) {
|
|
251
|
+
HandlerDirection[HandlerDirection["East"] = 0] = "East";
|
|
252
|
+
HandlerDirection[HandlerDirection["North"] = 1] = "North";
|
|
253
|
+
HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
|
|
254
|
+
HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
|
|
255
|
+
HandlerDirection[HandlerDirection["South"] = 4] = "South";
|
|
256
|
+
HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
|
|
257
|
+
HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
|
|
258
|
+
HandlerDirection[HandlerDirection["West"] = 7] = "West";
|
|
259
|
+
})(exports.HandlerDirection || (exports.HandlerDirection = {}));
|
|
260
|
+
const getCursorValue = (direction) => {
|
|
261
|
+
switch (direction) {
|
|
262
|
+
case exports.HandlerDirection.East:
|
|
263
|
+
return "e-resize";
|
|
264
|
+
case exports.HandlerDirection.North:
|
|
265
|
+
return "n-resize";
|
|
266
|
+
case exports.HandlerDirection.NorthEast:
|
|
267
|
+
return "ne-resize";
|
|
268
|
+
case exports.HandlerDirection.NorthWest:
|
|
269
|
+
return "nw-resize";
|
|
270
|
+
case exports.HandlerDirection.South:
|
|
271
|
+
return "s-resize";
|
|
272
|
+
case exports.HandlerDirection.SouthEast:
|
|
273
|
+
return "se-resize";
|
|
274
|
+
case exports.HandlerDirection.SouthWest:
|
|
275
|
+
return "sw-resize";
|
|
276
|
+
case exports.HandlerDirection.West:
|
|
277
|
+
return "w-resize";
|
|
278
|
+
default:
|
|
279
|
+
return "pointer";
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const fromRectangle = (r) => [
|
|
283
|
+
{
|
|
284
|
+
position: fromRectangle$1(r),
|
|
285
|
+
direction: exports.HandlerDirection.NorthWest,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
289
|
+
x: r.width,
|
|
290
|
+
y: 0,
|
|
291
|
+
}),
|
|
292
|
+
direction: exports.HandlerDirection.NorthEast,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
296
|
+
x: 0,
|
|
297
|
+
y: r.height,
|
|
298
|
+
}),
|
|
299
|
+
direction: exports.HandlerDirection.SouthWest,
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
303
|
+
x: r.width,
|
|
304
|
+
y: r.height,
|
|
305
|
+
}),
|
|
306
|
+
direction: exports.HandlerDirection.SouthEast,
|
|
307
|
+
},
|
|
308
|
+
];
|
|
309
|
+
|
|
310
|
+
exports.first = first;
|
|
311
|
+
exports.flow = flow;
|
|
312
|
+
exports.fromMouseEvent = fromMouseEvent;
|
|
313
|
+
exports.fromRectangle = fromRectangle$1;
|
|
314
|
+
exports.fromRectangle$1 = fromRectangle;
|
|
315
|
+
exports.getCursorValue = getCursorValue;
|
|
316
|
+
exports.identity = identity;
|
|
317
|
+
exports.isLeft = isLeft;
|
|
318
|
+
exports.isNone = isNone;
|
|
319
|
+
exports.isSome = isSome;
|
|
320
|
+
exports.last = last;
|
|
321
|
+
exports.left = left;
|
|
322
|
+
exports.none = none;
|
|
323
|
+
exports.pipe = pipe;
|
|
324
|
+
exports.pointDiffSemigroup = pointDiffSemigroup;
|
|
325
|
+
exports.pointSumSemigroup = pointSumSemigroup;
|
|
326
|
+
exports.right = right;
|
|
327
|
+
exports.some = some;
|
|
328
|
+
exports.struct = struct;
|
|
329
|
+
exports.tuple = tuple;
|