vviinn-widgets 2.25.2 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/cjs/{imageSearch.store-cc9b4a68.js → imageSearch.store-070ddd94.js} +302 -83
  2. package/dist/cjs/{index-fef7ae7e.js → index-64803798.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{package-c8afd42d.js → package-835e33f7.js} +1 -1
  5. package/dist/cjs/search-filters_20.cjs.entry.js +4018 -0
  6. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +6 -7
  7. package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -2
  8. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
  9. package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
  10. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +12 -7
  11. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +0 -3
  13. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +11 -5
  14. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +172 -9
  15. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +103 -22
  16. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +9 -3
  17. package/dist/esm/{imageSearch.store-ecbf6beb.js → imageSearch.store-e6e053a1.js} +258 -40
  18. package/dist/esm/{index-3bcebf1e.js → index-3cc48230.js} +1 -1
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/{package-6b479807.js → package-7b9341e8.js} +1 -1
  21. package/dist/esm/search-filters_20.entry.js +3995 -0
  22. package/dist/esm/vviinn-carousel_3.entry.js +3 -4
  23. package/dist/esm/vviinn-preloader.entry.js +1 -2
  24. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  25. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  26. package/dist/esm/vviinn-vps-widget.entry.js +12 -7
  27. package/dist/esm/vviinn-widgets.js +1 -1
  28. package/dist/types/components/vviinn-image-view/vviinn-image-view.d.ts +10 -2
  29. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
  30. package/dist/types/components.d.ts +7 -56
  31. package/dist/vviinn-widgets/p-0cd7b987.entry.js +11 -0
  32. package/dist/vviinn-widgets/{p-7372b8e2.entry.js → p-4063d262.entry.js} +1 -1
  33. package/dist/vviinn-widgets/p-67ccdf9f.js +1 -0
  34. package/dist/vviinn-widgets/p-727c521a.entry.js +1 -0
  35. package/dist/vviinn-widgets/p-7a97ad69.entry.js +1 -0
  36. package/dist/vviinn-widgets/p-9c27e9cb.entry.js +1 -0
  37. package/dist/vviinn-widgets/p-9d6d9d58.js +1 -0
  38. package/dist/vviinn-widgets/{p-bb9e022a.entry.js → p-c0f125c5.entry.js} +1 -1
  39. package/{www/build/p-6f5566a8.js → dist/vviinn-widgets/p-d3ac1640.js} +1 -1
  40. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  41. package/package.json +2 -1
  42. package/www/build/p-0cd7b987.entry.js +11 -0
  43. package/www/build/{p-7372b8e2.entry.js → p-4063d262.entry.js} +1 -1
  44. package/www/build/p-67ccdf9f.js +1 -0
  45. package/www/build/p-727c521a.entry.js +1 -0
  46. package/www/build/p-7a97ad69.entry.js +1 -0
  47. package/www/build/p-9c27e9cb.entry.js +1 -0
  48. package/www/build/p-9d6d9d58.js +1 -0
  49. package/www/build/{p-f97d72f4.js → p-aafe2def.js} +3 -3
  50. package/www/build/{p-bb9e022a.entry.js → p-c0f125c5.entry.js} +1 -1
  51. package/{dist/vviinn-widgets/p-6f5566a8.js → www/build/p-d3ac1640.js} +1 -1
  52. package/www/build/vviinn-widgets.esm.js +1 -1
  53. package/www/index.html +1 -1
  54. package/dist/cjs/Handler-de64afa5.js +0 -317
  55. package/dist/cjs/cropper-handler.cjs.entry.js +0 -28
  56. package/dist/cjs/highlight-box_22.cjs.entry.js +0 -868
  57. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -57
  58. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -29
  59. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -48
  60. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -63
  61. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
  62. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +0 -188
  63. package/dist/esm/Handler-7bfee84f.js +0 -294
  64. package/dist/esm/cropper-handler.entry.js +0 -24
  65. package/dist/esm/highlight-box_22.entry.js +0 -843
  66. package/dist/types/components/image-search/image-view/highlight-box/highlight-box.d.ts +0 -5
  67. package/dist/types/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.d.ts +0 -6
  68. package/dist/types/components/image-search/image-view/image-cropper/image-cropper.d.ts +0 -24
  69. package/dist/vviinn-widgets/p-3190f047.entry.js +0 -1
  70. package/dist/vviinn-widgets/p-3b99c62d.js +0 -1
  71. package/dist/vviinn-widgets/p-a37be09b.entry.js +0 -1
  72. package/dist/vviinn-widgets/p-b76ecd45.entry.js +0 -1
  73. package/dist/vviinn-widgets/p-bae2af67.entry.js +0 -1
  74. package/dist/vviinn-widgets/p-bcfd588b.js +0 -1
  75. package/dist/vviinn-widgets/p-d41891f6.js +0 -1
  76. package/dist/vviinn-widgets/p-fa950b0a.entry.js +0 -1
  77. package/www/build/p-3190f047.entry.js +0 -1
  78. package/www/build/p-3b99c62d.js +0 -1
  79. package/www/build/p-a37be09b.entry.js +0 -1
  80. package/www/build/p-b76ecd45.entry.js +0 -1
  81. package/www/build/p-bae2af67.entry.js +0 -1
  82. package/www/build/p-bcfd588b.js +0 -1
  83. package/www/build/p-d41891f6.js +0 -1
  84. package/www/build/p-fa950b0a.entry.js +0 -1
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-a4becaff.js');
4
- const Handler = require('./Handler-de64afa5.js');
5
4
 
6
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
6
 
@@ -11442,6 +11441,104 @@ const trackingStore = {
11442
11441
 
11443
11442
  const { state: state$1, onChange: onChange$1 } = createStore(Object.assign({ fallbackStyles: "", pricePrefix: null, currencySign: null, apiPath: null, token: null, locale: "de-DE" }, trackingStore));
11444
11443
 
11444
+ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
11445
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
11446
+ if (ar || !(i in from)) {
11447
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
11448
+ ar[i] = from[i];
11449
+ }
11450
+ }
11451
+ return to.concat(ar || Array.prototype.slice.call(from));
11452
+ };
11453
+ /**
11454
+ * @since 2.0.0
11455
+ */
11456
+ function identity(a) {
11457
+ return a;
11458
+ }
11459
+ /**
11460
+ * @since 2.0.0
11461
+ */
11462
+ function tuple() {
11463
+ var t = [];
11464
+ for (var _i = 0; _i < arguments.length; _i++) {
11465
+ t[_i] = arguments[_i];
11466
+ }
11467
+ return t;
11468
+ }
11469
+ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
11470
+ switch (arguments.length) {
11471
+ case 1:
11472
+ return a;
11473
+ case 2:
11474
+ return ab(a);
11475
+ case 3:
11476
+ return bc(ab(a));
11477
+ case 4:
11478
+ return cd(bc(ab(a)));
11479
+ case 5:
11480
+ return de(cd(bc(ab(a))));
11481
+ case 6:
11482
+ return ef(de(cd(bc(ab(a)))));
11483
+ case 7:
11484
+ return fg(ef(de(cd(bc(ab(a))))));
11485
+ case 8:
11486
+ return gh(fg(ef(de(cd(bc(ab(a)))))));
11487
+ case 9:
11488
+ return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
11489
+ default: {
11490
+ var ret = arguments[0];
11491
+ for (var i = 1; i < arguments.length; i++) {
11492
+ ret = arguments[i](ret);
11493
+ }
11494
+ return ret;
11495
+ }
11496
+ }
11497
+ }
11498
+ /** @internal */
11499
+ var dual = function (arity, body) {
11500
+ var isDataFirst = typeof arity === 'number' ? function (args) { return args.length >= arity; } : arity;
11501
+ return function () {
11502
+ var args = Array.from(arguments);
11503
+ if (isDataFirst(arguments)) {
11504
+ return body.apply(this, args);
11505
+ }
11506
+ return function (self) { return body.apply(void 0, __spreadArray([self], args, false)); };
11507
+ };
11508
+ };
11509
+
11510
+ // -------------------------------------------------------------------------------------
11511
+ // Option
11512
+ // -------------------------------------------------------------------------------------
11513
+ /** @internal */
11514
+ var isNone$1 = function (fa) { return fa._tag === 'None'; };
11515
+ /** @internal */
11516
+ var isSome = function (fa) { return fa._tag === 'Some'; };
11517
+ /** @internal */
11518
+ var none$1 = { _tag: 'None' };
11519
+ /** @internal */
11520
+ var some$1 = function (a) { return ({ _tag: 'Some', value: a }); };
11521
+ // -------------------------------------------------------------------------------------
11522
+ // Either
11523
+ // -------------------------------------------------------------------------------------
11524
+ /** @internal */
11525
+ var isLeft$1 = function (ma) { return ma._tag === 'Left'; };
11526
+ /** @internal */
11527
+ var left$1 = function (e) { return ({ _tag: 'Left', left: e }); };
11528
+ /** @internal */
11529
+ var right$1 = function (a) { return ({ _tag: 'Right', right: a }); };
11530
+ // -------------------------------------------------------------------------------------
11531
+ // Record
11532
+ // -------------------------------------------------------------------------------------
11533
+ /** @internal */
11534
+ var has = Object.prototype.hasOwnProperty;
11535
+ /** @internal */
11536
+ var flatMapTask$1 = function (F, M) {
11537
+ /*#__PURE__*/ return dual(2, function (self, f) {
11538
+ return M.flatMap(self, function (a) { return F.fromTask(f(a)); });
11539
+ });
11540
+ };
11541
+
11445
11542
  /**
11446
11543
  * A `Functor` is a type constructor which supports a mapping operation `map`.
11447
11544
  *
@@ -11465,7 +11562,7 @@ function map$5(F, G) {
11465
11562
  * @since 2.10.0
11466
11563
  */
11467
11564
  function fromOption$2(F) {
11468
- return function (onNone) { return function (ma) { return F.fromEither(Handler.isNone(ma) ? Handler.left(onNone()) : Handler.right(ma.value)); }; };
11565
+ return function (onNone) { return function (ma) { return F.fromEither(isNone$1(ma) ? left$1(onNone()) : right$1(ma.value)); }; };
11469
11566
  }
11470
11567
 
11471
11568
  // -------------------------------------------------------------------------------------
@@ -11478,7 +11575,7 @@ function fromOption$2(F) {
11478
11575
  * @category constructors
11479
11576
  * @since 2.0.0
11480
11577
  */
11481
- var left = Handler.left;
11578
+ var left = left$1;
11482
11579
  /**
11483
11580
  * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias
11484
11581
  * of this structure.
@@ -11486,14 +11583,14 @@ var left = Handler.left;
11486
11583
  * @category constructors
11487
11584
  * @since 2.0.0
11488
11585
  */
11489
- var right = Handler.right;
11586
+ var right = right$1;
11490
11587
  /**
11491
11588
  * @category sequencing
11492
11589
  * @since 2.14.0
11493
11590
  */
11494
- var flatMap$4 = /*#__PURE__*/ Handler.dual(2, function (ma, f) { return (isLeft(ma) ? ma : f(ma.right)); });
11495
- var _map$1 = function (fa, f) { return Handler.pipe(fa, map$4(f)); };
11496
- var _ap = function (fab, fa) { return Handler.pipe(fab, ap$1(fa)); };
11591
+ var flatMap$4 = /*#__PURE__*/ dual(2, function (ma, f) { return (isLeft(ma) ? ma : f(ma.right)); });
11592
+ var _map$1 = function (fa, f) { return pipe(fa, map$4(f)); };
11593
+ var _ap = function (fab, fa) { return pipe(fab, ap$1(fa)); };
11497
11594
  /**
11498
11595
  * @category type lambdas
11499
11596
  * @since 2.0.0
@@ -11552,7 +11649,7 @@ var mapLeft$1 = function (f) { return function (fa) {
11552
11649
  */
11553
11650
  var FromEither$1 = {
11554
11651
  URI: URI$2,
11555
- fromEither: Handler.identity
11652
+ fromEither: identity
11556
11653
  };
11557
11654
  // -------------------------------------------------------------------------------------
11558
11655
  // conversions
@@ -11592,7 +11689,7 @@ var fromOption$1 =
11592
11689
  * @category refinements
11593
11690
  * @since 2.0.0
11594
11691
  */
11595
- var isLeft = Handler.isLeft;
11692
+ var isLeft = isLeft$1;
11596
11693
  /**
11597
11694
  * Less strict version of [`match`](#match).
11598
11695
  *
@@ -11669,6 +11766,115 @@ var fromNullable$1 = function (e) {
11669
11766
  */
11670
11767
  var chain$2 = flatMap$4;
11671
11768
 
11769
+ /**
11770
+ * If a type `A` can form a `Semigroup` it has an **associative** binary operation.
11771
+ *
11772
+ * ```ts
11773
+ * interface Semigroup<A> {
11774
+ * readonly concat: (x: A, y: A) => A
11775
+ * }
11776
+ * ```
11777
+ *
11778
+ * Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
11779
+ *
11780
+ * ```ts
11781
+ * concat(x, concat(y, z)) = concat(concat(x, y), z)
11782
+ * ```
11783
+ *
11784
+ * A common example of a semigroup is the type `string` with the operation `+`.
11785
+ *
11786
+ * ```ts
11787
+ * import { Semigroup } from 'fp-ts/Semigroup'
11788
+ *
11789
+ * const semigroupString: Semigroup<string> = {
11790
+ * concat: (x, y) => x + y
11791
+ * }
11792
+ *
11793
+ * const x = 'x'
11794
+ * const y = 'y'
11795
+ * const z = 'z'
11796
+ *
11797
+ * semigroupString.concat(x, y) // 'xy'
11798
+ *
11799
+ * semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
11800
+ *
11801
+ * semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
11802
+ * ```
11803
+ *
11804
+ * *Adapted from https://typelevel.org/cats*
11805
+ *
11806
+ * @since 2.0.0
11807
+ */
11808
+ /**
11809
+ * Given a struct of semigroups returns a semigroup for the struct.
11810
+ *
11811
+ * @example
11812
+ * import { struct } from 'fp-ts/Semigroup'
11813
+ * import * as N from 'fp-ts/number'
11814
+ *
11815
+ * interface Point {
11816
+ * readonly x: number
11817
+ * readonly y: number
11818
+ * }
11819
+ *
11820
+ * const S = struct<Point>({
11821
+ * x: N.SemigroupSum,
11822
+ * y: N.SemigroupSum
11823
+ * })
11824
+ *
11825
+ * assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
11826
+ *
11827
+ * @since 2.10.0
11828
+ */
11829
+ var struct = function (semigroups) { return ({
11830
+ concat: function (first, second) {
11831
+ var r = {};
11832
+ for (var k in semigroups) {
11833
+ if (has.call(semigroups, k)) {
11834
+ r[k] = semigroups[k].concat(first[k], second[k]);
11835
+ }
11836
+ }
11837
+ return r;
11838
+ }
11839
+ }); };
11840
+ // -------------------------------------------------------------------------------------
11841
+ // instances
11842
+ // -------------------------------------------------------------------------------------
11843
+ /**
11844
+ * Always return the first argument.
11845
+ *
11846
+ * @example
11847
+ * import * as S from 'fp-ts/Semigroup'
11848
+ *
11849
+ * assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
11850
+ *
11851
+ * @category instances
11852
+ * @since 2.10.0
11853
+ */
11854
+ var first = function () { return ({ concat: identity }); };
11855
+ /**
11856
+ * Always return the last argument.
11857
+ *
11858
+ * @example
11859
+ * import * as S from 'fp-ts/Semigroup'
11860
+ *
11861
+ * assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
11862
+ *
11863
+ * @category instances
11864
+ * @since 2.10.0
11865
+ */
11866
+ var last = function () { return ({ concat: function (_, y) { return y; } }); };
11867
+ /**
11868
+ * Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
11869
+ *
11870
+ * @category zone of death
11871
+ * @since 2.0.0
11872
+ * @deprecated
11873
+ */
11874
+ var semigroupSum = {
11875
+ concat: function (x, y) { return x + y; }
11876
+ };
11877
+
11672
11878
  // -------------------------------------------------------------------------------------
11673
11879
  // constructors
11674
11880
  // -------------------------------------------------------------------------------------
@@ -11678,14 +11884,14 @@ var chain$2 = flatMap$4;
11678
11884
  * @category constructors
11679
11885
  * @since 2.0.0
11680
11886
  */
11681
- var none = Handler.none;
11887
+ var none = none$1;
11682
11888
  /**
11683
11889
  * Constructs a `Some`. Represents an optional value that exists.
11684
11890
  *
11685
11891
  * @category constructors
11686
11892
  * @since 2.0.0
11687
11893
  */
11688
- var some = Handler.some;
11894
+ var some = some$1;
11689
11895
  /**
11690
11896
  * Monoid returning the left-most non-`None` value. If both operands are `Some`s then the inner values are
11691
11897
  * concatenated using the provided `Semigroup`
@@ -11725,7 +11931,7 @@ var map$3 = function (f) { return function (fa) {
11725
11931
  * @category sequencing
11726
11932
  * @since 2.14.0
11727
11933
  */
11728
- var flatMap$3 = /*#__PURE__*/ Handler.dual(2, function (ma, f) { return (isNone(ma) ? none : f(ma.value)); });
11934
+ var flatMap$3 = /*#__PURE__*/ dual(2, function (ma, f) { return (isNone(ma) ? none : f(ma.value)); });
11729
11935
  /**
11730
11936
  * Returns `true` if the option is `None`, `false` otherwise.
11731
11937
  *
@@ -11885,7 +12091,7 @@ var chain$1 = flatMap$3;
11885
12091
  * @since 2.0.0
11886
12092
  * @deprecated
11887
12093
  */
11888
- var getFirstMonoid = function () { return getMonoid(Handler.first()); };
12094
+ var getFirstMonoid = function () { return getMonoid(first()); };
11889
12095
 
11890
12096
  function rightF(F) {
11891
12097
  return function (fa) { return F.map(fa, right); };
@@ -11914,8 +12120,8 @@ function mapError$1(F) {
11914
12120
  *
11915
12121
  * @since 2.0.0
11916
12122
  */
11917
- var _map = function (fa, f) { return Handler.pipe(fa, map$1(f)); };
11918
- var _apPar = function (fab, fa) { return Handler.pipe(fab, ap(fa)); };
12123
+ var _map = function (fa, f) { return pipe(fa, map$1(f)); };
12124
+ var _apPar = function (fab, fa) { return pipe(fab, ap(fa)); };
11919
12125
  /**
11920
12126
  * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F<A>) => F<B>` whose argument and return types
11921
12127
  * use the type constructor `F` to represent some computational context.
@@ -11944,7 +12150,7 @@ var of = function (a) { return function () { return Promise.resolve(a); }; };
11944
12150
  * @category sequencing
11945
12151
  * @since 2.14.0
11946
12152
  */
11947
- var flatMap$1 = /*#__PURE__*/ Handler.dual(2, function (ma, f) {
12153
+ var flatMap$1 = /*#__PURE__*/ dual(2, function (ma, f) {
11948
12154
  return function () {
11949
12155
  return Promise.resolve()
11950
12156
  .then(ma)
@@ -12018,7 +12224,7 @@ var map = /*#__PURE__*/ map$2(Functor);
12018
12224
  * @category error handling
12019
12225
  * @since 2.16.0
12020
12226
  */
12021
- var mapError = /*#__PURE__*/ Handler.dual(2, mapError$1(Functor));
12227
+ var mapError = /*#__PURE__*/ dual(2, mapError$1(Functor));
12022
12228
  /**
12023
12229
  * Alias of `mapError`.
12024
12230
  *
@@ -12030,7 +12236,7 @@ var mapLeft = mapError;
12030
12236
  * @category sequencing
12031
12237
  * @since 2.14.0
12032
12238
  */
12033
- var flatMap = /*#__PURE__*/ Handler.dual(2, flatMap$2(Monad));
12239
+ var flatMap = /*#__PURE__*/ dual(2, flatMap$2(Monad));
12034
12240
  /**
12035
12241
  * @category type lambdas
12036
12242
  * @since 2.0.0
@@ -12062,7 +12268,7 @@ var _FromTask = {
12062
12268
  * @category sequencing
12063
12269
  * @since 2.16.0
12064
12270
  */
12065
- var flatMapTask = /*#__PURE__*/ Handler.flatMapTask(_FromTask, _FlatMap);
12271
+ var flatMapTask = /*#__PURE__*/ flatMapTask$1(_FromTask, _FlatMap);
12066
12272
  /**
12067
12273
  * Alias of `flatMapTask`.
12068
12274
  *
@@ -16230,7 +16436,7 @@ const emptyApiPathError = {
16230
16436
  };
16231
16437
 
16232
16438
  const stringMonoid = getMonoid(Monoid);
16233
- const getApiPath = () => Handler.pipe(getFirstMonoid().concat(fromNullable(state$1.apiPath), fromNullable(`${"https://api.vviinn.com"}`)), fromOption$1(() => emptyApiPathError));
16439
+ const getApiPath = () => pipe(getFirstMonoid().concat(fromNullable(state$1.apiPath), fromNullable(`${"https://api.vviinn.com"}`)), fromOption$1(() => emptyApiPathError));
16234
16440
  const headersSemigroupSum = {
16235
16441
  concat: (x, y) => {
16236
16442
  const result = new Headers();
@@ -16241,14 +16447,14 @@ const headersSemigroupSum = {
16241
16447
  return result;
16242
16448
  },
16243
16449
  };
16244
- const mergeInitRequests = Handler.struct({
16450
+ const mergeInitRequests = struct({
16245
16451
  method: {
16246
16452
  concat: (a, b) => {
16247
16453
  const method = stringMonoid.concat(fromNullable(a), fromNullable(b));
16248
- return Handler.pipe(method, getOrElse(() => "GET"));
16454
+ return pipe(method, getOrElse(() => "GET"));
16249
16455
  },
16250
16456
  },
16251
- body: Handler.last(),
16457
+ body: last(),
16252
16458
  headers: headersSemigroupSum,
16253
16459
  });
16254
16460
  const createBasicRequest = (method) => {
@@ -16278,7 +16484,7 @@ const makeRequest = (path, init) => ([apiPath, options,]) => {
16278
16484
 
16279
16485
  const isEmpty = (x) => x.length === 0;
16280
16486
  const checkEmpty = (x) => isEmpty(x) ? left("entity is empty") : right(x);
16281
- const existAndNotEmpty = (x) => Handler.pipe(x, fromNullable$1("entity not exist"), chain$2(checkEmpty));
16487
+ const existAndNotEmpty = (x) => pipe(x, fromNullable$1("entity not exist"), chain$2(checkEmpty));
16282
16488
  const arrayToQueryString = (params) => params.length ? `?${params.join("&")}` : "";
16283
16489
  const parseExcluded = (value) => value
16284
16490
  .split(";")
@@ -16288,8 +16494,8 @@ const parseExcluded = (value) => value
16288
16494
  const createBearerHeaders = (token) => new Headers({
16289
16495
  Authorization: `Bearer ${token}`,
16290
16496
  });
16291
- const checkToken = (token) => Handler.pipe(token, existAndNotEmpty, Either.mapLeft(() => invalidTokenError));
16292
- const processBearerToken = (token) => Handler.pipe(token, checkToken, Either.map(createBearerHeaders));
16497
+ const checkToken = (token) => pipe(token, existAndNotEmpty, Either.mapLeft(() => invalidTokenError));
16498
+ const processBearerToken = (token) => pipe(token, checkToken, Either.map(createBearerHeaders));
16293
16499
 
16294
16500
  const sequenceToEither = Apply$1.sequenceT(Either.Apply);
16295
16501
 
@@ -16354,47 +16560,59 @@ const foldValueObject = (i) => {
16354
16560
  }
16355
16561
  };
16356
16562
 
16357
- const getLink = (item, path) => Handler.pipe(item.links, fromNullable, chain$1((linksObject) => fromNullable(linksObject[path])));
16358
- const linkRequest = (link) => (data) => Handler.pipe(sequenceToEither(getApiPath(), createRequestFromMethod(link.method)), fromEither, chainW(makeRequest(link.href, data)));
16563
+ const getLink = (item, path) => pipe(item.links, fromNullable, chain$1((linksObject) => fromNullable(linksObject[path])));
16564
+ const linkRequest = (link) => (data) => pipe(sequenceToEither(getApiPath(), createRequestFromMethod(link.method)), fromEither, chainW(makeRequest(link.href, data)));
16359
16565
 
16360
- const move = (origin, position) => {
16361
- const originPosition = Handler.fromRectangle(origin);
16362
- const newPosition = Handler.pointSumSemigroup.concat(originPosition, position);
16363
- return Object.assign(Object.assign({}, newPosition), { width: origin.width, height: origin.height });
16364
- };
16365
- const transformNorthEast = (origin, handler) => {
16366
- const newPosition = Handler.pointSumSemigroup.concat(Handler.fromRectangle(origin), {
16367
- x: 0,
16368
- y: handler.position.y,
16369
- });
16370
- return Object.assign(Object.assign({}, newPosition), { width: origin.width + handler.position.x, height: origin.height - handler.position.y });
16371
- };
16372
- const transformNorthWest = (origin, handler) => {
16373
- const newPosition = Handler.pointSumSemigroup.concat(Handler.fromRectangle(origin), handler.position);
16374
- return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height - handler.position.y });
16375
- };
16376
- const transformSouthEast = (origin, handler) => {
16377
- return Object.assign(Object.assign({}, origin), { width: origin.width + handler.position.x, height: origin.height + handler.position.y });
16378
- };
16379
- const transformSouthWest = (origin, handler) => {
16380
- const newPosition = Handler.pointSumSemigroup.concat(Handler.fromRectangle(origin), {
16381
- x: handler.position.x,
16382
- y: 0,
16383
- });
16384
- return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height + handler.position.y });
16385
- };
16386
- const transform = (origin, handler) => {
16387
- switch (handler.direction) {
16388
- case Handler.HandlerDirection.NorthEast:
16389
- return transformNorthEast(origin, handler);
16390
- case Handler.HandlerDirection.NorthWest:
16391
- return transformNorthWest(origin, handler);
16392
- case Handler.HandlerDirection.SouthEast:
16393
- return transformSouthEast(origin, handler);
16394
- case Handler.HandlerDirection.SouthWest:
16395
- return transformSouthWest(origin, handler);
16396
- }
16566
+ const fromRectangle$1 = ({ x, y }) => {
16567
+ return {
16568
+ x,
16569
+ y,
16570
+ };
16397
16571
  };
16572
+ const pointSumSemigroup = struct({
16573
+ x: semigroupSum,
16574
+ y: semigroupSum,
16575
+ });
16576
+
16577
+ var HandlerDirection;
16578
+ (function (HandlerDirection) {
16579
+ HandlerDirection[HandlerDirection["East"] = 0] = "East";
16580
+ HandlerDirection[HandlerDirection["North"] = 1] = "North";
16581
+ HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
16582
+ HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
16583
+ HandlerDirection[HandlerDirection["South"] = 4] = "South";
16584
+ HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
16585
+ HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
16586
+ HandlerDirection[HandlerDirection["West"] = 7] = "West";
16587
+ })(HandlerDirection || (HandlerDirection = {}));
16588
+ const fromRectangle = (r) => [
16589
+ {
16590
+ position: fromRectangle$1(r),
16591
+ direction: HandlerDirection.NorthWest,
16592
+ },
16593
+ {
16594
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
16595
+ x: r.width,
16596
+ y: 0,
16597
+ }),
16598
+ direction: HandlerDirection.NorthEast,
16599
+ },
16600
+ {
16601
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
16602
+ x: 0,
16603
+ y: r.height,
16604
+ }),
16605
+ direction: HandlerDirection.SouthWest,
16606
+ },
16607
+ {
16608
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
16609
+ x: r.width,
16610
+ y: r.height,
16611
+ }),
16612
+ direction: HandlerDirection.SouthEast,
16613
+ },
16614
+ ];
16615
+
16398
16616
  const fromImage = (image) => {
16399
16617
  return {
16400
16618
  x: 0,
@@ -16529,11 +16747,11 @@ var findFirstMap$1 = function (f) {
16529
16747
  return function (as) {
16530
16748
  for (var i = 0; i < as.length; i++) {
16531
16749
  var out = f(as[i]);
16532
- if (Handler.isSome(out)) {
16750
+ if (isSome(out)) {
16533
16751
  return out;
16534
16752
  }
16535
16753
  }
16536
- return Handler.none;
16754
+ return none$1;
16537
16755
  };
16538
16756
  };
16539
16757
 
@@ -17036,7 +17254,7 @@ const optionalResize = (image, size) => image.naturalWidth > size ? resizeImage(
17036
17254
  const resizeFileTo = (size) => (file) => _function.pipe(file, imageFromFileTask, Task.map((image) => optionalResize(image, size)), Task.chain(convertB64toFileTask));
17037
17255
 
17038
17256
  const RESIZED_IMAGE_WIDTH = 500;
17039
- const makeAuthorizedRequest = (token) => Handler.pipe(token, processBearerToken, map$4((headers) => {
17257
+ const makeAuthorizedRequest = (token) => pipe(token, processBearerToken, map$4((headers) => {
17040
17258
  return {
17041
17259
  headers,
17042
17260
  };
@@ -17067,7 +17285,7 @@ const updateState = async (response) => {
17067
17285
  state.loading = false;
17068
17286
  };
17069
17287
  const makeLinkRequest = (link) => {
17070
- return Handler.pipe(makeAuthorizedRequest(state.token), fromEither, chainW(linkRequest(link)));
17288
+ return pipe(makeAuthorizedRequest(state.token), fromEither, chainW(linkRequest(link)));
17071
17289
  };
17072
17290
  const detectObjects = async (data) => {
17073
17291
  state.objectDetectionInProgress = true;
@@ -17075,7 +17293,7 @@ const detectObjects = async (data) => {
17075
17293
  kind: "server",
17076
17294
  inner: "Can not get a link for objects detection",
17077
17295
  };
17078
- await Handler.pipe(getLink(data, "detectedObjects"), fromOption(() => error), chain(makeLinkRequest), map((objects) => (state.detectedObjects = foldValueObject(objects))))();
17296
+ await pipe(getLink(data, "detectedObjects"), fromOption(() => error), chain(makeLinkRequest), map((objects) => (state.detectedObjects = foldValueObject(objects))))();
17079
17297
  state.objectDetectionInProgress = false;
17080
17298
  };
17081
17299
  const uploadHiresFile = async (sessionResponse, file) => {
@@ -17084,11 +17302,11 @@ const uploadHiresFile = async (sessionResponse, file) => {
17084
17302
  image: ionFile,
17085
17303
  };
17086
17304
  const form = sessionResponse.uploadHighResolutionImage;
17087
- await Handler.pipe(makeAuthorizedRequest(state.token), fromEither, chainW(formRequest(form, formPayload)))();
17305
+ await pipe(makeAuthorizedRequest(state.token), fromEither, chainW(formRequest(form, formPayload)))();
17088
17306
  };
17089
17307
  const makeRectangularSearchRequest = async () => {
17090
17308
  state.loading = true;
17091
- Handler.pipe(sequenceToOption(state.imageBounds, state.searchArea), Option.map(async ([bounds, searchArea]) => {
17309
+ pipe(sequenceToOption(state.imageBounds, state.searchArea), Option.map(async ([bounds, searchArea]) => {
17092
17310
  const scaled = divideOnSized(bounds)(searchArea);
17093
17311
  const searchRectangle = {
17094
17312
  width: scaled.width,
@@ -17096,14 +17314,14 @@ const makeRectangularSearchRequest = async () => {
17096
17314
  left: scaled.x,
17097
17315
  top: scaled.y,
17098
17316
  };
17099
- return await Handler.pipe(makeAuthorizedRequest(state.token), fromEither, chainW(formRequest(state.rectangleSearchForm, searchRectangle)), map(updateState))();
17317
+ return await pipe(makeAuthorizedRequest(state.token), fromEither, chainW(formRequest(state.rectangleSearchForm, searchRectangle)), map(updateState))();
17100
17318
  }));
17101
17319
  };
17102
17320
  const uploadFile = (file) => {
17103
17321
  state.loading = true;
17104
17322
  const fileForm = imageFormFromFile(file);
17105
17323
  const tokenWithFile = sequenceToEither(processBearerToken(state.token), right(fileForm));
17106
- return Handler.pipe(tokenWithFile, map$4(([headers, body]) => {
17324
+ return pipe(tokenWithFile, map$4(([headers, body]) => {
17107
17325
  return {
17108
17326
  headers,
17109
17327
  body,
@@ -17125,7 +17343,7 @@ onChange("activeIonLink", async (newLink) => {
17125
17343
  if (!link)
17126
17344
  return;
17127
17345
  state.loading = true;
17128
- await Handler.pipe(makeAuthorizedRequest(state.token), fromEither, chainW(linkRequest(link)), map(updateState), mapLeft((error) => {
17346
+ await pipe(makeAuthorizedRequest(state.token), fromEither, chainW(linkRequest(link)), map(updateState), mapLeft((error) => {
17129
17347
  return {
17130
17348
  kind: "network error",
17131
17349
  inner: error,
@@ -17133,8 +17351,8 @@ onChange("activeIonLink", async (newLink) => {
17133
17351
  }))();
17134
17352
  });
17135
17353
  onChange("searchArea", (newSearchArea) => {
17136
- Handler.pipe(newSearchArea, Option.map((area) => {
17137
- state.cropperHandlers = Handler.fromRectangle$1(area);
17354
+ pipe(newSearchArea, Option.map((area) => {
17355
+ state.cropperHandlers = fromRectangle(area);
17138
17356
  }));
17139
17357
  });
17140
17358
  onChange("serverError", () => {
@@ -17147,10 +17365,10 @@ const setSelectedImage = (image) => {
17147
17365
  const processSelectedFile = async (file) => {
17148
17366
  const originFile = checkFileWithExtention(file);
17149
17367
  const fileResizer = resizeFileTo(RESIZED_IMAGE_WIDTH);
17150
- const resizeFileTask = Handler.pipe(originFile, fromEither, chainTaskK(fileResizer));
17151
- const session = await Handler.pipe(resizeFileTask, chain(uploadFile))();
17152
- Handler.pipe(sequenceToEither(session, originFile), map$4(([sessionObject, file]) => uploadHiresFile(sessionObject, file)));
17153
- await Handler.pipe(resizeFileTask, chainTaskK(imageFromFileTask), map(setSelectedImage))();
17368
+ const resizeFileTask = pipe(originFile, fromEither, chainTaskK(fileResizer));
17369
+ const session = await pipe(resizeFileTask, chain(uploadFile))();
17370
+ pipe(sequenceToEither(session, originFile), map$4(([sessionObject, file]) => uploadHiresFile(sessionObject, file)));
17371
+ await pipe(resizeFileTask, chainTaskK(imageFromFileTask), map(setSelectedImage))();
17154
17372
  return session;
17155
17373
  };
17156
17374
 
@@ -17176,6 +17394,7 @@ exports.fromAlt = fromAlt;
17176
17394
  exports.fromEither = fromEither;
17177
17395
  exports.fromImage = fromImage;
17178
17396
  exports.getApiPath = getApiPath;
17397
+ exports.has = has;
17179
17398
  exports.imageSearchState = imageSearchState;
17180
17399
  exports.isEmpty = isEmpty$1;
17181
17400
  exports.makeRectangularSearchRequest = makeRectangularSearchRequest;
@@ -17183,12 +17402,12 @@ exports.makeRequest = makeRequest;
17183
17402
  exports.map = map$3;
17184
17403
  exports.match = match;
17185
17404
  exports.match$1 = match$1;
17186
- exports.move = move;
17187
17405
  exports.parseExcluded = parseExcluded;
17406
+ exports.pipe = pipe;
17188
17407
  exports.processSelectedFile = processSelectedFile;
17189
17408
  exports.scaleByLargestSide = scaleByLargestSide;
17190
17409
  exports.scaleWithSized = scaleWithSized;
17191
17410
  exports.sequenceToOption = sequenceToOption;
17192
17411
  exports.state = state$1;
17193
17412
  exports.toFile = toFile;
17194
- exports.transform = transform;
17413
+ exports.tuple = tuple;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const imageSearch_store = require('./imageSearch.store-cc9b4a68.js');
3
+ const imageSearch_store = require('./imageSearch.store-070ddd94.js');
4
4
 
5
5
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
6
6
  // require the crypto API and do not support built-in fallback to lower quality random number