gesturx 1.8.2 → 1.8.3

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var ie = Object.defineProperty;
2
2
  var se = (t, n, e) => n in t ? ie(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
3
  var u = (t, n, e) => se(t, typeof n != "symbol" ? n + "" : n, e);
4
- import { filter as c, fromEvent as T, mergeMap as b, defer as pe, of as S, merge as v, takeWhile as V, scan as U, map as h, BehaviorSubject as q, switchMap as f, distinctUntilChanged as oe, startWith as re, shareReplay as E, combineLatest as j, exhaustMap as H, first as R, share as P, timer as J, withLatestFrom as z, takeUntil as I, skip as ae, tap as K, ignoreElements as le, buffer as he, debounceTime as ce, NEVER as $e, defaultIfEmpty as ue } from "rxjs";
4
+ import { filter as c, fromEvent as S, mergeMap as b, defer as pe, of as I, merge as g, takeWhile as V, scan as U, map as h, BehaviorSubject as q, switchMap as v, distinctUntilChanged as oe, startWith as re, shareReplay as E, combineLatest as j, exhaustMap as H, first as R, share as w, timer as J, withLatestFrom as z, takeUntil as T, skip as ae, tap as K, ignoreElements as le, buffer as he, debounceTime as ce, NEVER as ue, defaultIfEmpty as $e } from "rxjs";
5
5
  function de(t, n) {
6
6
  return Math.sqrt(
7
7
  Math.pow(n.x - t.x, 2) + Math.pow(n.y - t.y, 2)
@@ -10,19 +10,19 @@ function de(t, n) {
10
10
  function ve(t) {
11
11
  const n = t.length;
12
12
  if (n < 2) return 0;
13
- const e = t.reduce((i, p, a) => i + t.slice(a + 1).reduce((o, r) => o + de(p, r), 0), 0), s = n * (n - 1) / 2;
14
- return e / s;
13
+ const e = t.reduce((o, p, a) => o + t.slice(a + 1).reduce((s, r) => s + de(p, r), 0), 0), i = n * (n - 1) / 2;
14
+ return e / i;
15
15
  }
16
16
  function N(t, n) {
17
- const e = n.x - t.x, s = n.y - t.y;
18
- return Math.atan2(s, e);
17
+ const e = n.x - t.x, i = n.y - t.y;
18
+ return Math.atan2(i, e);
19
19
  }
20
20
  function ge(t, n) {
21
21
  return N(t, n) * (180 / Math.PI);
22
22
  }
23
23
  function k(t) {
24
24
  const n = t.reduce(
25
- (s, i) => (s.x += i.x, s.y += i.y, s),
25
+ (i, o) => (i.x += o.x, i.y += o.y, i),
26
26
  { x: 0, y: 0 }
27
27
  ), e = t.length || 1;
28
28
  return {
@@ -33,20 +33,20 @@ function k(t) {
33
33
  function ye(t, n) {
34
34
  if (t.length !== n.length)
35
35
  throw new Error("Initial and new points arrays must have the same length.");
36
- const e = k(t), s = k(n);
37
- let i = 0;
38
- for (let o = 0; o < t.length; o++) {
36
+ const e = k(t), i = k(n);
37
+ let o = 0;
38
+ for (let s = 0; s < t.length; s++) {
39
39
  const r = N(
40
40
  e,
41
- t[o]
41
+ t[s]
42
42
  );
43
43
  let $ = N(
44
- s,
45
- n[o]
44
+ i,
45
+ n[s]
46
46
  ) - r;
47
- $ > Math.PI ? $ -= 2 * Math.PI : $ < -Math.PI && ($ += 2 * Math.PI), i += $;
47
+ $ > Math.PI ? $ -= 2 * Math.PI : $ < -Math.PI && ($ += 2 * Math.PI), o += $;
48
48
  }
49
- const p = i / t.length, a = p * (180 / Math.PI);
49
+ const p = o / t.length, a = p * (180 / Math.PI);
50
50
  return { radianDelta: p, degreesDelta: a };
51
51
  }
52
52
  function fe(t) {
@@ -54,14 +54,14 @@ function fe(t) {
54
54
  }
55
55
  const me = (t) => t.length > 0, Ae = (t) => t.pipe(c(me));
56
56
  function Q(t, n, e) {
57
- const s = k([t]), i = k([n]);
58
- return Math.abs(i.x - s.x) >= e || Math.abs(i.y - s.y) >= e;
57
+ const i = k([t]), o = k([n]);
58
+ return Math.abs(o.x - i.x) >= e || Math.abs(o.y - i.y) >= e;
59
59
  }
60
60
  const De = (t, n, e) => {
61
- const s = t > 0 ? n / t : 0, i = t > 0 ? e / t : 0;
61
+ const i = t > 0 ? n / t : 0, o = t > 0 ? e / t : 0;
62
62
  return {
63
- velocityX: s,
64
- velocityY: i
63
+ velocityX: i,
64
+ velocityY: o
65
65
  };
66
66
  };
67
67
  function W(t) {
@@ -72,41 +72,41 @@ function W(t) {
72
72
  const Z = (t) => t.type === "pointerleave" || t.type === "pointercancel" || t.type === "pointerup", Pe = ({
73
73
  container: t,
74
74
  afterEventReceived: n = (e) => e
75
- }) => T(t, "pointerdown").pipe(
75
+ }) => S(t, "pointerdown").pipe(
76
76
  h(n)
77
77
  ), ee = ({
78
78
  pointerEvent$: t
79
79
  }) => (n) => {
80
80
  const e = t.pipe(
81
81
  c((r) => r.type === "pointerup")
82
- ), s = t.pipe(
83
- c((r) => r.type === "pointerleave")
84
82
  ), i = t.pipe(
83
+ c((r) => r.type === "pointerleave")
84
+ ), o = t.pipe(
85
85
  c((r) => r.type === "pointercancel")
86
86
  ), p = t.pipe(
87
87
  c((r) => r.type === "pointermove")
88
- ), a = T(window, "contextmenu"), o = (r) => ["pointercancel", "pointerleave", "pointerup", "contextmenu"].includes(
88
+ ), a = S(window, "contextmenu"), s = (r) => ["pointercancel", "pointerleave", "pointerup", "contextmenu"].includes(
89
89
  r.type
90
90
  );
91
91
  return n.pipe(
92
92
  b((r) => {
93
- const l = pe(() => S(r));
94
- return v(
93
+ const l = pe(() => I(r));
94
+ return g(
95
95
  l,
96
- v(
96
+ g(
97
97
  p,
98
+ o,
98
99
  i,
99
- s,
100
100
  e,
101
101
  a
102
102
  )
103
103
  ).pipe(
104
104
  W(r),
105
- V((m) => !o(m), !0)
105
+ V((m) => !s(m), !0)
106
106
  );
107
107
  }),
108
108
  U((r, l) => {
109
- if (o(l)) {
109
+ if (s(l)) {
110
110
  const { [l.pointerId]: $, ...m } = (r == null ? void 0 : r.pointers) ?? {};
111
111
  return {
112
112
  event: l,
@@ -126,10 +126,10 @@ const Z = (t) => t.type === "pointerleave" || t.type === "pointercancel" || t.ty
126
126
  pointers: Object.values(l).filter(fe)
127
127
  }))
128
128
  );
129
- }, _ = (t, n, e, s) => {
130
- const i = t.x - n.x + e, p = t.y - n.y + s;
129
+ }, _ = (t, n, e, i) => {
130
+ const o = t.x - n.x + e, p = t.y - n.y + i;
131
131
  return {
132
- deltaX: i,
132
+ deltaX: o,
133
133
  deltaY: p
134
134
  };
135
135
  }, te = (t) => {
@@ -137,46 +137,46 @@ const Z = (t) => t.type === "pointerleave" || t.type === "pointercancel" || t.ty
137
137
  e.latestActivePointers.length ? e.latestActivePointers : [e.event]
138
138
  );
139
139
  return t.pipe(
140
- U((e, s) => {
141
- var y, w;
142
- const i = n(s), p = (e == null ? void 0 : e.center) ?? i, a = (e == null ? void 0 : e.deltaX) ?? 0, o = (e == null ? void 0 : e.deltaY) ?? 0, r = ((y = e == null ? void 0 : e.latestActivePointers) == null ? void 0 : y.length) ?? 1, l = ((w = s.latestActivePointers) == null ? void 0 : w.length) ?? 1, $ = ["pointerdown", "pointercancel", "pointerleave", "pointerup"].includes(
143
- s.event.type
144
- ) && r !== l, m = l > 0, { deltaX: g, deltaY: A } = $ && m ? _(i, i, a, o) : _(i, p, a, o), { degreesDelta: D } = r === l && r >= 2 && l >= 2 ? ye(
140
+ U((e, i) => {
141
+ var f, P;
142
+ const o = n(i), p = (e == null ? void 0 : e.center) ?? o, a = (e == null ? void 0 : e.deltaX) ?? 0, s = (e == null ? void 0 : e.deltaY) ?? 0, r = ((f = e == null ? void 0 : e.latestActivePointers) == null ? void 0 : f.length) ?? 1, l = ((P = i.latestActivePointers) == null ? void 0 : P.length) ?? 1, $ = ["pointerdown", "pointercancel", "pointerleave", "pointerup"].includes(
143
+ i.event.type
144
+ ) && r !== l, m = l > 0, { deltaX: y, deltaY: A } = $ && m ? _(o, o, a, s) : _(o, p, a, s), { degreesDelta: D } = r === l && r >= 2 && l >= 2 ? ye(
145
145
  (e == null ? void 0 : e.latestActivePointers) ?? [],
146
- s.latestActivePointers ?? []
146
+ i.latestActivePointers ?? []
147
147
  ) : { degreesDelta: 0 };
148
148
  return {
149
149
  startTime: (/* @__PURE__ */ new Date()).getTime(),
150
150
  ...e,
151
- ...s,
152
- center: i,
153
- deltaX: g,
151
+ ...i,
152
+ center: o,
153
+ deltaX: y,
154
154
  deltaY: A,
155
155
  deltaPointersAngle: D
156
156
  };
157
157
  }, void 0),
158
158
  h((e) => {
159
159
  const {
160
- deltaX: s,
161
- deltaY: i,
160
+ deltaX: i,
161
+ deltaY: o,
162
162
  latestActivePointers: p,
163
163
  startTime: a,
164
- center: o,
164
+ center: s,
165
165
  event: r,
166
166
  deltaPointersAngle: l
167
- } = e, $ = p ?? [], g = Date.now() - a, { velocityX: A, velocityY: D } = De(g, s, i), y = ve(p);
167
+ } = e, $ = p ?? [], y = Date.now() - a, { velocityX: A, velocityY: D } = De(y, i, o), f = ve(p);
168
168
  return {
169
- deltaX: s,
170
- deltaY: i,
169
+ deltaX: i,
170
+ deltaY: o,
171
171
  velocityX: A,
172
172
  velocityY: D,
173
- delay: g,
174
- center: o,
173
+ delay: y,
174
+ center: s,
175
175
  pointers: $,
176
176
  startTime: a,
177
177
  event: r,
178
178
  deltaPointersAngle: l,
179
- pointersAverageDistance: y
179
+ pointersAverageDistance: f
180
180
  };
181
181
  })
182
182
  );
@@ -188,22 +188,22 @@ const Z = (t) => t.type === "pointerleave" || t.type === "pointercancel" || t.ty
188
188
  container: t,
189
189
  afterEventReceived: n = (e) => e
190
190
  }) => {
191
- const e = Pe({ afterEventReceived: n, container: t }), s = T(t, "pointerup").pipe(
191
+ const e = Pe({ afterEventReceived: n, container: t }), i = S(t, "pointerup").pipe(
192
192
  h(n)
193
- ), i = T(t, "pointermove").pipe(
193
+ ), o = S(t, "pointermove").pipe(
194
194
  h(n)
195
- ), p = T(t, "pointerleave").pipe(
195
+ ), p = S(t, "pointerleave").pipe(
196
196
  h(n)
197
- ), a = T(
197
+ ), a = S(
198
198
  t,
199
199
  "pointercancel"
200
200
  ).pipe(h(n));
201
- return v(
201
+ return g(
202
202
  e,
203
203
  a,
204
204
  p,
205
- s,
206
- i
205
+ i,
206
+ o
207
207
  );
208
208
  };
209
209
  class F {
@@ -225,11 +225,11 @@ class F {
225
225
  * Track active running failWith recognizers
226
226
  */
227
227
  u(this, "failWithActive$");
228
- const s = new q({
228
+ const i = new q({
229
229
  fingers: 0
230
230
  });
231
231
  this.pointerEvent$ = this.config$.pipe(
232
- f(
232
+ v(
233
233
  ({ container: p, afterEventReceived: a }) => we({
234
234
  container: p,
235
235
  afterEventReceived: a
@@ -244,64 +244,64 @@ class F {
244
244
  ), this.pointerCancel$ = this.pointerEvent$.pipe(
245
245
  c((p) => p.type === "pointercancel")
246
246
  ), this.pointerOff$ = this.pointerEvent$.pipe(ne);
247
- const i = this.config$.pipe(
247
+ const o = this.config$.pipe(
248
248
  h(({ failWith: p }) => p),
249
249
  oe()
250
250
  );
251
- this.failWithActive$ = i.pipe(
252
- f((p) => {
253
- const a = p == null ? void 0 : p.map((o) => {
254
- const r = o.start$.pipe(h(() => !0)), l = o.end$.pipe(h(() => !1));
255
- return v(r, l).pipe(
251
+ this.failWithActive$ = o.pipe(
252
+ v((p) => {
253
+ const a = p == null ? void 0 : p.map((s) => {
254
+ const r = s.start$.pipe(h(() => !0)), l = s.end$.pipe(h(() => !1));
255
+ return g(r, l).pipe(
256
256
  re(!1),
257
257
  E(1)
258
258
  );
259
259
  });
260
- return a != null && a.length ? j(a) : j([S(!1)]);
260
+ return a != null && a.length ? j(a) : j([I(!1)]);
261
261
  }),
262
262
  h((p) => p.some((a) => a)),
263
263
  E(1)
264
264
  ), this.pan$ = this.configSubject.pipe(
265
265
  G,
266
- f((p) => {
267
- var g, A, D;
268
- const a = Math.max(1, ((g = p.panConfig) == null ? void 0 : g.numInputs) ?? 1), o = Math.max(0, ((A = p.panConfig) == null ? void 0 : A.posThreshold) ?? 0), r = Math.max(0, ((D = p.panConfig) == null ? void 0 : D.delay) ?? 0), l = this.pointerDown$.pipe(
266
+ v((p) => {
267
+ var y, A, D;
268
+ const a = Math.max(1, ((y = p.panConfig) == null ? void 0 : y.numInputs) ?? 1), s = Math.max(0, ((A = p.panConfig) == null ? void 0 : A.posThreshold) ?? 0), r = Math.max(0, ((D = p.panConfig) == null ? void 0 : D.delay) ?? 0), l = this.pointerDown$.pipe(
269
269
  ee({
270
270
  pointerEvent$: this.pointerEvent$,
271
271
  trackMove: !0
272
272
  }),
273
273
  E(1)
274
- ), $ = (y) => y.pipe(
274
+ ), $ = (f) => f.pipe(
275
275
  c(
276
- (w) => w.pointers.length >= a
276
+ (P) => P.pointers.length >= a
277
277
  )
278
- ), m = (y) => y.pipe(c((w) => w.pointers.length < a));
278
+ ), m = (f) => f.pipe(c((P) => P.pointers.length < a));
279
279
  return l.pipe(
280
280
  $,
281
- H(({ pointers: y }) => {
282
- const w = l.pipe(
281
+ H(({ pointers: f }) => {
282
+ const P = l.pipe(
283
283
  m,
284
284
  R(),
285
- P()
286
- ), X = J(r), C = v(
287
- ...y.map((d) => S(d)),
285
+ w()
286
+ ), X = J(r), C = g(
287
+ ...f.map((d) => I(d)),
288
288
  this.pointerDown$
289
289
  ).pipe(
290
290
  b(
291
- (d) => v(this.pointerMove$, S(d)).pipe(
291
+ (d) => g(this.pointerMove$, I(d)).pipe(
292
292
  W(d),
293
293
  c(
294
294
  (x) => Q(
295
295
  d,
296
296
  x,
297
- o
297
+ s
298
298
  )
299
299
  )
300
300
  )
301
301
  ),
302
302
  R()
303
303
  ).pipe(
304
- f(() => X),
304
+ v(() => X),
305
305
  z(l),
306
306
  h(([, { event: d, pointers: x }]) => ({
307
307
  type: "start",
@@ -312,7 +312,7 @@ class F {
312
312
  bufferSize: 1,
313
313
  refCount: !1
314
314
  }),
315
- I(w)
315
+ T(P)
316
316
  ), O = C.pipe(
317
317
  b(
318
318
  () => l.pipe(
@@ -324,10 +324,10 @@ class F {
324
324
  }))
325
325
  )
326
326
  ),
327
- I(w)
327
+ T(P)
328
328
  ), M = C.pipe(
329
329
  b(
330
- () => w.pipe(
330
+ () => P.pipe(
331
331
  h(({ event: d, pointers: x }) => ({
332
332
  type: "end",
333
333
  event: d,
@@ -335,7 +335,7 @@ class F {
335
335
  }))
336
336
  )
337
337
  )
338
- ), L = v(C, O, M).pipe(
338
+ ), L = g(C, O, M).pipe(
339
339
  E(1)
340
340
  );
341
341
  return L.pipe(
@@ -350,11 +350,11 @@ class F {
350
350
  );
351
351
  }),
352
352
  K((p) => {
353
- s.next({
353
+ i.next({
354
354
  fingers: p.pointers.length
355
355
  });
356
356
  }),
357
- P()
357
+ w()
358
358
  ), this.panStart$ = this.pan$.pipe(
359
359
  c((p) => p.type === "start"),
360
360
  h(({ type: p, ...a }) => a)
@@ -364,18 +364,18 @@ class F {
364
364
  ), this.panEnd$ = this.pan$.pipe(
365
365
  c((p) => p.type === "end"),
366
366
  h(({ type: p, ...a }) => a)
367
- ), this.state$ = s.asObservable(), this.updateInternal(n ?? {}, e);
367
+ ), this.state$ = i.asObservable(), this.updateInternal(n ?? {}, e);
368
368
  }
369
369
  updateInternal(n, e) {
370
- const s = this.configSubject.getValue();
370
+ const i = this.configSubject.getValue();
371
371
  this.configSubject.next({
372
- ...s,
372
+ ...i,
373
373
  ...n,
374
374
  ...n.options && {
375
- options: { ...s.options, ...n.options }
375
+ options: { ...i.options, ...n.options }
376
376
  },
377
377
  panConfig: {
378
- ...s.panConfig,
378
+ ...i.panConfig,
379
379
  ...e
380
380
  }
381
381
  });
@@ -384,7 +384,7 @@ class F {
384
384
  this.updateInternal(n, e);
385
385
  }
386
386
  }
387
- class Te extends F {
387
+ class Se extends F {
388
388
  constructor(e) {
389
389
  var a;
390
390
  super(e, {
@@ -394,51 +394,51 @@ class Te extends F {
394
394
  u(this, "events$");
395
395
  u(this, "start$");
396
396
  u(this, "end$");
397
- const s = this.panStart$.pipe(
398
- h((o) => ({
397
+ const i = this.panStart$.pipe(
398
+ h((s) => ({
399
399
  type: "panStart",
400
- ...o
400
+ ...s
401
401
  })),
402
402
  z(this.failWithActive$),
403
- c(([, o]) => !o),
404
- h(([o]) => o),
405
- P()
406
- ), i = this.panEnd$.pipe(
407
- h((o) => ({
403
+ c(([, s]) => !s),
404
+ h(([s]) => s),
405
+ w()
406
+ ), o = this.panEnd$.pipe(
407
+ h((s) => ({
408
408
  type: "panEnd",
409
- ...o
409
+ ...s
410
410
  })),
411
- P()
411
+ w()
412
412
  ), p = this.panMove$.pipe(
413
- h((o) => ({
413
+ h((s) => ({
414
414
  type: "panMove",
415
- ...o
415
+ ...s
416
416
  }))
417
417
  );
418
- this.events$ = s.pipe(
419
- f((o) => {
420
- let r = o;
421
- const l = S(o), $ = this.failWithActive$.pipe(
418
+ this.events$ = i.pipe(
419
+ v((s) => {
420
+ let r = s;
421
+ const l = I(s), $ = this.failWithActive$.pipe(
422
422
  c((A) => A),
423
423
  R()
424
- ), m = v(l, p, i).pipe(
424
+ ), m = g(l, p, o).pipe(
425
425
  K((A) => {
426
426
  r = A;
427
427
  }),
428
- I($)
429
- ), g = $.pipe(
428
+ T($)
429
+ ), y = $.pipe(
430
430
  h(() => ({
431
431
  ...r,
432
432
  type: "panEnd"
433
433
  })),
434
- I(i)
434
+ T(o)
435
435
  );
436
- return v(m, g);
436
+ return g(m, y);
437
437
  }),
438
- P()
438
+ w()
439
439
  ), this.start$ = this.events$.pipe(
440
- c((o) => o.type === "panStart")
441
- ), this.end$ = this.events$.pipe(c((o) => o.type === "panEnd"));
440
+ c((s) => s.type === "panStart")
441
+ ), this.end$ = this.events$.pipe(c((s) => s.type === "panEnd"));
442
442
  }
443
443
  update(e) {
444
444
  super.update(e, e.options);
@@ -455,11 +455,11 @@ class be extends F {
455
455
  });
456
456
  u(this, "events$");
457
457
  this.events$ = this.config$.pipe(
458
- f((s) => {
459
- const { escapeVelocity: i = 0.9 } = s.options ?? {};
458
+ v((i) => {
459
+ const { escapeVelocity: o = 0.9 } = i.options ?? {};
460
460
  return this.panStart$.pipe(
461
- f((p) => this.panEnd$.pipe(
462
- Me(i),
461
+ v((p) => this.panEnd$.pipe(
462
+ Me(o),
463
463
  h((a) => ({
464
464
  type: "swipe",
465
465
  angle: ge(
@@ -469,7 +469,7 @@ class be extends F {
469
469
  ...a
470
470
  }))
471
471
  )),
472
- P()
472
+ w()
473
473
  );
474
474
  })
475
475
  );
@@ -483,9 +483,9 @@ const Ee = ({
483
483
  pointerEvent$: n
484
484
  }) => (e) => e.pipe(
485
485
  b(
486
- (s) => J(t).pipe(
487
- I(
488
- n.pipe(ne, W(s))
486
+ (i) => J(t).pipe(
487
+ T(
488
+ n.pipe(ne, W(i))
489
489
  )
490
490
  )
491
491
  )
@@ -493,10 +493,10 @@ const Ee = ({
493
493
  initialPointerEvent: t,
494
494
  pointerEvent$: n,
495
495
  tolerance: e
496
- }) => (s) => s.pipe(
496
+ }) => (i) => i.pipe(
497
497
  b(
498
- (i) => n.pipe(
499
- W(i),
498
+ (o) => n.pipe(
499
+ W(o),
500
500
  V((p) => !Z(p), !0),
501
501
  c(
502
502
  (p) => Q(t, p, e)
@@ -509,9 +509,9 @@ class Ce extends F {
509
509
  super(e);
510
510
  u(this, "events$");
511
511
  this.events$ = this.config$.pipe(
512
- f((s) => {
513
- var g, A;
514
- const i = ((g = s.options) == null ? void 0 : g.maxTaps) ?? 1, p = ((A = s.options) == null ? void 0 : A.multiTapThreshold) ?? 100 * (i - 1), { maximumPressTime: a = 150, tolerance: o = 10 } = s.options ?? {}, r = this.pointerDown$.pipe(
512
+ v((i) => {
513
+ var y, A;
514
+ const o = ((y = i.options) == null ? void 0 : y.maxTaps) ?? 1, p = ((A = i.options) == null ? void 0 : A.multiTapThreshold) ?? 100 * (o - 1), { maximumPressTime: a = 150, tolerance: s = 10 } = i.options ?? {}, r = this.pointerDown$.pipe(
515
515
  ee({
516
516
  pointerEvent$: this.pointerEvent$,
517
517
  trackMove: !0
@@ -523,34 +523,34 @@ class Ce extends F {
523
523
  he(this.pointerUp$.pipe(ce(p))),
524
524
  R()
525
525
  );
526
- return v(
526
+ return g(
527
527
  this.pointerDown$,
528
528
  r.pipe(le())
529
529
  ).pipe(
530
530
  H((D) => {
531
- const y = v(
532
- S(D),
531
+ const f = g(
532
+ I(D),
533
533
  this.pointerDown$
534
- ).pipe(E(1)), w = y.pipe($), X = y.pipe(
534
+ ).pipe(E(1)), P = f.pipe($), X = f.pipe(
535
535
  xe({
536
536
  initialPointerEvent: D,
537
537
  pointerEvent$: this.pointerEvent$,
538
- tolerance: o
538
+ tolerance: s
539
539
  })
540
- ), B = y.pipe(
540
+ ), B = f.pipe(
541
541
  Ee({
542
542
  pointerEvent$: this.pointerEvent$,
543
543
  timeout: a
544
544
  })
545
- ), C = v(
545
+ ), C = g(
546
546
  this.failWithActive$.pipe(c((M) => M)),
547
547
  this.pointerCancel$,
548
548
  l,
549
549
  X,
550
550
  B
551
- ), O = w.pipe(
551
+ ), O = P.pipe(
552
552
  Ae,
553
- c((M) => M.length <= i),
553
+ c((M) => M.length <= o),
554
554
  h((M) => ({
555
555
  type: "tap",
556
556
  taps: M.length,
@@ -567,12 +567,12 @@ class Ce extends F {
567
567
  type: L,
568
568
  taps: d
569
569
  })),
570
- I(C)
570
+ T(C)
571
571
  );
572
572
  })
573
573
  );
574
574
  }),
575
- P()
575
+ w()
576
576
  );
577
577
  }
578
578
  update(e) {
@@ -588,22 +588,22 @@ class Re extends F {
588
588
  });
589
589
  u(this, "events$");
590
590
  this.events$ = this.config$.pipe(
591
- f(() => {
592
- const s = this.panStart$.pipe(
593
- h((o) => ({
594
- ...o,
591
+ v(() => {
592
+ const i = this.panStart$.pipe(
593
+ h((s) => ({
594
+ ...s,
595
595
  type: "rotateStart",
596
596
  angle: 0,
597
597
  deltaAngle: 0
598
598
  })),
599
599
  E(1)
600
- ), i = s.pipe(
601
- f(
600
+ ), o = i.pipe(
601
+ v(
602
602
  () => this.pan$.pipe(
603
- U((o, r) => {
604
- const l = ((o == null ? void 0 : o.angle) ?? 0) + r.deltaPointersAngle;
603
+ U((s, r) => {
604
+ const l = ((s == null ? void 0 : s.angle) ?? 0) + r.deltaPointersAngle;
605
605
  return {
606
- ...o,
606
+ ...s,
607
607
  ...r,
608
608
  angle: l,
609
609
  deltaAngle: r.deltaPointersAngle
@@ -611,17 +611,17 @@ class Re extends F {
611
611
  }, void 0)
612
612
  )
613
613
  ),
614
- P()
615
- ), p = i.pipe(
616
- c((o) => o.type === "move"),
617
- h((o) => ({ ...o, type: "rotateMove" }))
618
- ), a = i.pipe(
619
- c((o) => o.type === "end"),
620
- h((o) => ({ ...o, type: "rotateEnd" }))
614
+ w()
615
+ ), p = o.pipe(
616
+ c((s) => s.type === "move"),
617
+ h((s) => ({ ...s, type: "rotateMove" }))
618
+ ), a = o.pipe(
619
+ c((s) => s.type === "end"),
620
+ h((s) => ({ ...s, type: "rotateEnd" }))
621
621
  );
622
- return v(s, p, a);
622
+ return g(i, p, a);
623
623
  }),
624
- P()
624
+ w()
625
625
  );
626
626
  }
627
627
  update(e) {
@@ -632,20 +632,20 @@ const Y = ({
632
632
  type: t,
633
633
  initialEvent: n
634
634
  }) => (e) => e.pipe(
635
- U((s, i) => {
636
- const a = ((s == null ? void 0 : s.pointers.length) ?? 0) !== i.pointers.length, o = (s == null ? void 0 : s.pointersAverageDistance) ?? i.pointersAverageDistance, r = a ? i.pointersAverageDistance : s && "initialPointersAverageDistance" in s ? s.initialPointersAverageDistance : i.pointersAverageDistance, l = r === 0 ? 1 : i.pointersAverageDistance / r, $ = i.pointersAverageDistance - r, m = i.pointersAverageDistance - r, g = a || o === 0 ? 1 : i.pointersAverageDistance / o;
635
+ U((i, o) => {
636
+ const a = ((i == null ? void 0 : i.pointers.length) ?? 0) !== o.pointers.length, s = (i == null ? void 0 : i.pointersAverageDistance) ?? o.pointersAverageDistance, r = a ? o.pointersAverageDistance : i && "initialPointersAverageDistance" in i ? i.initialPointersAverageDistance : o.pointersAverageDistance, l = r === 0 ? 1 : o.pointersAverageDistance / r, $ = o.pointersAverageDistance - r, m = o.pointersAverageDistance - r, y = a || s === 0 ? 1 : o.pointersAverageDistance / s;
637
637
  return {
638
- ...s,
639
638
  ...i,
639
+ ...o,
640
640
  type: t,
641
641
  initialPointersAverageDistance: r,
642
642
  scale: l,
643
643
  distance: $,
644
644
  deltaDistance: m,
645
- deltaDistanceScale: g
645
+ deltaDistanceScale: y
646
646
  };
647
647
  }, n),
648
- h(({ initialPointersAverageDistance: s, ...i }) => i)
648
+ h(({ initialPointersAverageDistance: i, ...o }) => o)
649
649
  );
650
650
  class ze extends F {
651
651
  constructor(e) {
@@ -656,51 +656,55 @@ class ze extends F {
656
656
  u(this, "events$");
657
657
  u(this, "start$");
658
658
  u(this, "end$");
659
- const s = this.panStart$.pipe(
660
- z(this.failWithActive$),
661
- c(([, i]) => !i),
662
- h(([i]) => i),
663
- Y({
664
- type: "pinchStart",
665
- initialEvent: void 0
666
- }),
667
- P()
668
- );
669
659
  this.events$ = this.config$.pipe(
670
- f(() => {
671
- const i = s.pipe(E(1)), p = this.failWithActive$.pipe(
672
- c((r) => r),
660
+ v(() => {
661
+ const i = this.panStart$.pipe(
662
+ z(this.failWithActive$),
663
+ c(([, s]) => !s),
664
+ h(([s]) => s),
665
+ v(
666
+ (s) => I(s).pipe(
667
+ // we don't want a scan on pinch start
668
+ Y({
669
+ type: "pinchStart",
670
+ initialEvent: void 0
671
+ })
672
+ )
673
+ ),
674
+ E(1)
675
+ ), o = this.failWithActive$.pipe(
676
+ c((s) => s),
673
677
  R()
674
- ), a = i.pipe(
675
- f((r) => this.pan$.pipe(
676
- V((l) => l.type !== "end"),
678
+ ), p = i.pipe(
679
+ v((s) => this.pan$.pipe(
680
+ V((r) => r.type !== "end"),
677
681
  Y({
678
682
  type: "pinchMove",
679
- initialEvent: r
683
+ initialEvent: s
680
684
  })
681
685
  )),
682
- I(p)
683
- ), o = i.pipe(
684
- f((r) => {
685
- let l = r;
686
+ T(o)
687
+ ), a = i.pipe(
688
+ v((s) => {
689
+ let r = s;
686
690
  return this.pan$.pipe(
687
- f(($) => $.type === "end" ? S($) : (l = $, $e)),
688
- I(p),
689
- ue(null),
691
+ v((l) => l.type === "end" ? I(l) : (r = l, ue)),
692
+ T(o),
693
+ $e(null),
690
694
  h(
691
- ($) => $ || l
695
+ (l) => l || r
692
696
  ),
693
697
  Y({
694
698
  type: "pinchEnd",
695
- initialEvent: l
699
+ initialEvent: r
696
700
  }),
697
- P()
701
+ w()
698
702
  );
699
703
  })
700
704
  );
701
- return v(i, a, o);
705
+ return g(i, p, a);
702
706
  }),
703
- P()
707
+ w()
704
708
  ), this.start$ = this.events$.pipe(
705
709
  c((i) => i.type === "pinchStart")
706
710
  ), this.end$ = this.events$.pipe(c((i) => i.type === "pinchEnd"));
@@ -714,14 +718,14 @@ class ke {
714
718
  u(this, "events$");
715
719
  u(this, "recognizers");
716
720
  u(this, "state$");
717
- this.options = n, this.recognizers = n.recognizers, this.events$ = v(
721
+ this.options = n, this.recognizers = n.recognizers, this.events$ = g(
718
722
  ...n.recognizers.map((e) => e.events$)
719
- ).pipe(P()), this.state$ = j(
723
+ ).pipe(w()), this.state$ = j(
720
724
  this.recognizers.map((e) => e.state$)
721
725
  ).pipe(
722
726
  h(
723
- (e) => e.reduce((s, i) => ({
724
- fingers: Math.max(s.fingers, i.fingers)
727
+ (e) => e.reduce((i, o) => ({
728
+ fingers: Math.max(i.fingers, o.fingers)
725
729
  }))
726
730
  )
727
731
  ), this.update(n);
@@ -733,7 +737,7 @@ class ke {
733
737
  }
734
738
  }
735
739
  export {
736
- Te as PanRecognizer,
740
+ Se as PanRecognizer,
737
741
  ze as PinchRecognizer,
738
742
  ke as Recognizable,
739
743
  F as Recognizer,