├── .gitignore
├── index.html
├── index.js
├── lib
└── index.js
├── package-lock.json
├── package.json
├── pointer-stream.min.js
└── readme.md
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
3 | node_modules
4 |
5 |
6 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 |
35 |
36 |
37 |
58 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./lib')
2 |
--------------------------------------------------------------------------------
/lib/index.js:
--------------------------------------------------------------------------------
1 | /* global window */
2 | var mergeWith = function(t){
3 | return function(a, b){
4 | return [].concat(
5 | Object.keys(a),
6 | Object.keys(b)
7 | )
8 | .reduce(function(p,k){
9 | p[k] = p[k] || t(a[k], b[k])
10 | return p
11 | }, {})
12 | }
13 | }
14 |
15 | var merge = mergeWith(function(a,b){
16 | return b || a
17 | })
18 |
19 | var add = function(a,b){ return a + b }
20 | var subtract = function(a,b){ return a - b }
21 |
22 | var always = function(v){
23 | return function(){
24 | return v
25 | }
26 | }
27 |
28 | var mapObj = function(t,o){
29 | return Object.keys(o)
30 | .reduce(function(p,k){
31 | p[k] = t(o[k])
32 | return p
33 | }, {})
34 | }
35 |
36 | var clamp = function(min, max, value){
37 | return Math.max(Math.min(value, max), min)
38 | }
39 |
40 | var f = require('flyd')
41 | var stream = f.stream
42 | var scan = f.scan
43 | var on = f.on
44 | var endsOn = f.endsOn
45 |
46 | var endsOn_ = f.curryN(2, endsOn)
47 | var initialCoords = { x:0 , y:0 }
48 |
49 | /**
50 | * Sets up the zoompoint as the centre of a radius
51 | * created by 2 pointers.
52 | *
53 | * Just like onscale_mousewheel, sets up some state
54 | * and then passes it down to onscale() in a uniform format.
55 | */
56 | function onscale_fingers(state, a, b){
57 |
58 | var x = [a.pageX, b.pageX]
59 | .sort(subtract).map(function(v){ return v - state.settings.offset().x })
60 | var y = [a.pageY, b.pageY]
61 | .sort(subtract).map(function(v){ return v - state.settings.offset().y })
62 |
63 |
64 | var dx = x[1] - x[0]
65 | var dy = y[1] - y[0]
66 | var d = Math.hypot(dx,dy)
67 |
68 | if(state.pinching() == 1){
69 | state.touchRadius(d)
70 | } else {
71 | var zoompoint =
72 | { x: x[1] - dx / 2
73 | , y: y[1] - dy / 2
74 | }
75 |
76 | var newScale = state.initialPinchScale() * d / state.touchRadius()
77 |
78 | onscale(state, zoompoint, newScale)
79 | }
80 | }
81 |
82 | /**
83 | * A lot like, onscale_fingers().
84 | * It sets up some state, and then passes it on scale.
85 | *
86 | * Mousewheel just {inc,dec}rements
87 | * a number, unlike fingers, which uses the ratio of changes
88 | * in the radius caused by the fingers.
89 | *
90 | * This function sets toggles state.wheeling while it updates
91 | * the other userfacing streams, so a user could make decisions
92 | * about how they want to react to a scale event.
93 | */
94 | function onscale_mousewheel(state, e){
95 | if(Math.abs(e.deltaX) < 1e-1){
96 | // now we tell everyone we are scrolling the mouse wheel
97 | // so our coords stream doesn't ignore these movements
98 | state.wheeling(true)
99 |
100 | var zoompoint =
101 | { x: e.pageX - state.settings.offset().x
102 | , y: e.pageY - state.settings.offset().y
103 | }
104 |
105 | // scale more quickly the higher the scale gets
106 | var next = 0.01 + state.scale() * 1e-1
107 | var nextScale = state.scale()
108 | + (
109 | e.deltaY > 0
110 | ? - next
111 | : + next
112 | )
113 |
114 | onscale(state, zoompoint, nextScale)
115 |
116 | // sync the pinch scale with the mousewheel scaling
117 | // otherwise, switching from 1 to the other can cause jumps in scale
118 | state.initialPinchScale(state.scale())
119 |
120 | state.wheeling(false)
121 | }
122 | }
123 |
124 | /**
125 | * Calculates how much to move the viewport in order to keep
126 | * the zoompoint in the same position (as a ratio) between zooms
127 | *
128 | * The scale itself, is calculated upstream -
129 | * this tells the user how much they need to shift
130 | * their container to retain the screen position across scales.
131 | */
132 | function onscale(state, zoompoint, nextScale){
133 | var scale =
134 | { current: state.scale()
135 | , next: clamp(
136 | state.settings.scale.min, state.settings.scale.max, nextScale
137 | )
138 | }
139 |
140 | // 1. how far into the *current* viewport, the zoompoint is, as a ratio
141 | // 2. how far into the *new* viewport, the zoompoint is as a ratio
142 | // 3. the correct translation to the new viewport, so those ratios are equal
143 | //
144 | // In order to get 1. and 2.
145 | // We need to know the zoompoint coordinates from the perspective
146 | // of each viewport, the translation coords are always in world.
147 |
148 | var bounds = {
149 | w: window.innerWidth - state.settings.offset().x
150 | ,h: window.innerHeight - state.settings.offset().y
151 | }
152 |
153 | var viewports = {
154 | current: {
155 | // origin of current viewport (0,0)
156 | // in world coordinates (x,y)
157 | x: state.coords().x , y: state.coords().y
158 |
159 | // the dimensions of the viewport, in world coordinates
160 | ,w: bounds.w / scale.current
161 | ,h: bounds.h / scale.current
162 | }
163 | ,next: {
164 | x: state.coords().x, y: state.coords().y
165 | ,w: bounds.w / scale.next
166 | ,h: bounds.h / scale.next
167 | }
168 | }
169 |
170 | var ratios =
171 | // the ratio the zoom point is into the viewport
172 | // 0.5 would be the mouse half way through
173 | // the viewport (but not the window!)
174 | { current:
175 | { x: (zoompoint.x - viewports.current.x) / viewports.current.w
176 | , y: (zoompoint.y - viewports.current.y) / viewports.current.h
177 | }
178 |
179 | // the next viewport will be slightly bigger or slightly smaller
180 | // so its ratio will be slightly bigger or smaller
181 | // we can use the ratio to translate the viewport so our zoompoint
182 | // doesn't drift as we scale
183 | , next:
184 | { x: (zoompoint.x - viewports.next.x) / viewports.next.w
185 | , y: (zoompoint.y - viewports.next.y) / viewports.next.h
186 | }
187 | }
188 |
189 | // we now have the ratios that allow us to compare
190 | // how much the zoompoint would drift
191 | // but our code above, assumes both viewports have the same origin
192 | // this means the container that is being scaled
193 | // must have transform-origin set to "top left"
194 | //
195 | // with that out of the way, lets figure out how to
196 | // compensate for the scale drift
197 | // we find the difference between the two ratios,
198 | // and we multiply that difference
199 | // by the dimensions of the new viewport
200 | var zoomDrift =
201 | { x: (ratios.next.x - ratios.current.x) * viewports.current.w * -1
202 | , y: (ratios.next.y - ratios.current.y) * viewports.current.h * -1
203 | }
204 |
205 |
206 |
207 | // apply the zoom drift to the container
208 | // so our zoom point is always in the same "spot"
209 | // at whatever zoom level
210 | state.movement(zoomDrift)
211 | state.move(zoompoint)
212 |
213 | // apply our new scale so the container can update
214 | state.scale(scale.next)
215 | }
216 |
217 | /**
218 | * By incrementing, it would be quite trivial
219 | * to create a custom longtap/click stream
220 | * in userland
221 | */
222 | function onmousedown(state,e ){
223 | if(state.container().contains(e.target)){
224 | state.mousedown(state.mousedown()+1)
225 | }
226 | }
227 |
228 | /**
229 | * Reset mousedown, dragging and pinching.
230 | * Save the pinchScale so we have a base scale
231 | * to work with next time
232 | */
233 | function onmouseup(state, e){
234 | state.mousedown(0)
235 | state.dragging(false)
236 | state.selectingText(false)
237 |
238 | if(e.touches && e.touches.length){
239 | state.pinching(0)
240 | state.initialPinchScale( state.scale() )
241 | }
242 | }
243 |
244 | /**
245 | * Manages a few states. Dragging, mouse position.
246 | * Triggers pinch zoom, if there are many touches.
247 | *
248 | * Otherwise it treats a dragging finger, just like
249 | * a click and drag gesture with a mouse
250 | */
251 | function onmousemove(state, e){
252 |
253 | if( state.selectingText() ){
254 | } else {
255 | /**
256 | * Fig 1.
257 | * This may seem unnecessary to check if the state is pinching.
258 | * Seeing as we are the onces that set it.
259 | *
260 | * But its important to remember that this handler will accept
261 | * events from both the mouse and fingers. And if the mouse happens to be
262 | * on screen when someone decides to pinch, it will conflict and jump
263 | * to the mouse's coordinates; if the condtion in Fig 1. is not present
264 | */
265 |
266 | var touches = e.touches || []
267 | var event = touches[0] || e
268 |
269 | if(touches.length > 1){
270 | // +1 how long have we been pinching for?
271 | state.pinching(state.pinching()+1)
272 | onscale_fingers(state, e.touches[0], e.touches[1])
273 |
274 | } else if( !state.pinching() ) { // Fig 1.
275 |
276 |
277 | var x = event.pageX - state.settings.offset().x
278 | var y = event.pageY - state.settings.offset().y
279 |
280 | if(state.mousedown() > 2){
281 | if( state.settings.ignoreTextSelect && !state.selectingText() ){
282 | state.selectingText(
283 | (getSelection()+"").length > 0
284 | )
285 | }
286 | }
287 |
288 | if(!state.selectingText() && state.mousedown() > 3){
289 |
290 | state.dragging(state.mousedown())
291 | var movement =
292 | { x: (x - state.move().x) * state.polarity().x
293 | , y: (y - state.move().y) * state.polarity().y
294 | }
295 | state.movement(movement)
296 | }
297 |
298 | state.move({ x:x, y:y })
299 | }
300 |
301 | // It is possible to move the mouse without having the mouse down
302 | // We only want to increment, if we are already incrementing.
303 | state.mousedown(
304 | state.mousedown()
305 | + (
306 | state.mousedown() > 0
307 | ? 1
308 | : 0
309 | )
310 | )
311 | }
312 | }
313 |
314 | function streamFromEvent(container, event, endStream){
315 | var s = stream()
316 | var processed = true
317 | container.addEventListener(event, function(e){
318 | if( processed ){
319 | processed = false
320 | requestAnimationFrame(function(){
321 | s(e)
322 | processed=true
323 | })
324 | }
325 | })
326 | on(function(){
327 | container.removeEventListener(event,s)
328 | }, s.end )
329 | return endsOn(endStream, s)
330 | }
331 |
332 | var defaultOptions = {
333 | offset: { x:0 , y:0 }
334 | ,scale: { min:0.5, max:40 }
335 | ,coords: { min: { x: -Infinity, y: -Infinity}, max: { x: Infinity, y: Infinity } }
336 | }
337 | function Pointer(options){
338 | options = options || defaultOptions
339 | options.offset = options.offset || defaultOptions.offset
340 | options.scale = options.scale || defaultOptions.scale
341 | options.manualActivation = options.manualActivation || false
342 | options.container = options.container || always(document.body)
343 |
344 | options.coords = options.coords || defaultOptions.coords
345 | options.polarity = options.polarity || { x: 1, y: 1 }
346 | options.ignoreTextSelect = options.ignoreTextSelect || false
347 |
348 | const selectingText = stream(false)
349 |
350 | var x = options.offset.x
351 | var y = options.offset.y
352 | var min = options.scale.min
353 | var max = options.scale.max
354 | /**
355 | * Pass `true` into this stream and it will
356 | * destroy all event lsiteners and internal streams
357 | */
358 | var end = stream()
359 |
360 | var offset = stream({
361 | x:x
362 | ,y:y
363 | })
364 |
365 | /**
366 | * Flip polarity for x/y axis to change behavour of event handlers
367 | */
368 | var polarity = stream(options.polarity)
369 | /*
370 | * A stream of numbers that increments for every
371 | * mousemove event.
372 | * Resets to 0 on mouseup/touchend
373 | */
374 | var mousedown = stream(0)
375 |
376 | /**
377 | * A stream of increment translations.
378 | * Useful if you want to apply incremental translations
379 | * in sync with coords updating.
380 | */
381 | var movement = stream(initialCoords)
382 |
383 | /**
384 | * The last known coordinates of the pointer as a stream
385 | */
386 | var move = stream(initialCoords)
387 |
388 | /**
389 | * A stream of booleans indicating whether we are currently dragging
390 | */
391 |
392 | var dragging = stream(false)
393 | /**
394 | * A stream of booleans indicating whether we are currently pinching
395 | */
396 | var pinching = stream(0)
397 |
398 | /**
399 | * A stream of booleans indicating whether we are currently wheeling
400 | */
401 | var wheeling = stream(0)
402 |
403 | /**
404 | * A stream of the current scale of the viewport.
405 | * Responds to mouse wheel and pinchzoom
406 | */
407 | var scale = stream(1)
408 |
409 | /**
410 | * The viewport scale at the end of the last pinch gesture.
411 | * Used internally, but exposed because why not?
412 | */
413 | var initialPinchScale = stream(1)
414 |
415 | /**
416 | * The radius of the circle created by the first two touches in
417 | * in the event.touches array.
418 | *
419 | * Used internally to calculate the scale.
420 | */
421 | var touchRadius = stream(1)
422 |
423 |
424 | /**
425 | * A predicate true if we are either dragging or zooming
426 | */
427 | var notHover = function() {
428 |
429 | return [dragging,pinching,wheeling]
430 | .some(function(s){
431 | return s()
432 | })
433 | }
434 |
435 | /**
436 | * The coords you should translate your canvas or container
437 | * Adds all movements to a vector when either dragging or zooming
438 | * These coords are global, so you should apply them _before_ scaling
439 | */
440 | var coords = scan(
441 | function(p, n) {
442 | if( notHover() ){
443 | return {
444 | x: clamp(options.coords.min.x, options.coords.max.x, p.x + n.x)
445 | ,y: clamp(options.coords.min.y, options.coords.max.y, p.y + n.y)
446 | }
447 | } else {
448 | return p
449 | }
450 |
451 | }
452 | ,initialCoords
453 | ,movement
454 | )
455 |
456 | /**
457 | * All the state streams that get passed to the event handlers.
458 | * This is also the public API of the pointer instance.
459 | */
460 |
461 | var state =
462 | merge(
463 | {
464 | settings: {
465 | scale: { min:min, max:max }, offset:offset
466 | ,coords: options.coords
467 | ,ignoreTextSelect: options.ignoreTextSelect
468 | }
469 | ,container: options.container
470 |
471 | /**
472 | * Create a stream for event.
473 | * The event stream will be destroyed when the end stream
474 | * receives `true` as a value.
475 | *
476 | * Also passes in the state to each handler.
477 | */
478 | ,activateListeners: function(){
479 | ;[
480 | ,[onmousedown, 'mousedown']
481 | ,[onmouseup, 'mouseup']
482 | ,[onmousemove, 'mousemove']
483 | ,[onmouseup, 'touchend']
484 | ,[onmousedown, 'touchstart']
485 | ,[onmousemove, 'touchmove']
486 | ]
487 | .concat(
488 | options.disable_mousewheel
489 | ? []
490 | : [[onscale_mousewheel, 'wheel']]
491 | )
492 | .map(function(pair){
493 | var handler = pair[0]
494 | var eventName = pair[1]
495 | var container = options.container()
496 | return streamFromEvent(window, eventName, end).map(
497 | function(e){
498 | return handler(state, e)
499 | }
500 | )
501 | })
502 | }
503 | }
504 | ,mapObj(endsOn_(end), {
505 | mousedown:mousedown
506 | ,movement:movement
507 | ,move:move
508 | ,dragging:dragging
509 | ,pinching:pinching
510 | ,wheeling:wheeling
511 | ,scale:scale
512 | ,initialPinchScale:initialPinchScale
513 | ,touchRadius:touchRadius
514 | ,coords:coords
515 | ,selectingText: selectingText
516 | ,polarity: polarity
517 | ,end:end
518 |
519 | })
520 | )
521 |
522 | if( !options.manualActivation ){
523 | state.activateListeners()
524 | }
525 |
526 | /**
527 | * Give the user access to coords, scale and other streams.
528 | */
529 | return state
530 |
531 | }
532 |
533 | global.PointerStream = Pointer
534 | module.exports = Pointer
535 |
536 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pointer-stream",
3 | "version": "0.12.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "JSONStream": {
8 | "version": "1.3.2",
9 | "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
10 | "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
11 | "dev": true,
12 | "requires": {
13 | "jsonparse": "1.3.1",
14 | "through": "2.3.8"
15 | }
16 | },
17 | "acorn": {
18 | "version": "4.0.13",
19 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
20 | "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
21 | "dev": true
22 | },
23 | "align-text": {
24 | "version": "0.1.4",
25 | "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
26 | "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
27 | "dev": true,
28 | "requires": {
29 | "kind-of": "3.2.2",
30 | "longest": "1.0.1",
31 | "repeat-string": "1.6.1"
32 | }
33 | },
34 | "array-filter": {
35 | "version": "0.0.1",
36 | "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
37 | "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=",
38 | "dev": true
39 | },
40 | "array-map": {
41 | "version": "0.0.0",
42 | "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
43 | "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=",
44 | "dev": true
45 | },
46 | "array-reduce": {
47 | "version": "0.0.0",
48 | "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
49 | "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
50 | "dev": true
51 | },
52 | "asn1.js": {
53 | "version": "4.9.2",
54 | "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz",
55 | "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==",
56 | "dev": true,
57 | "requires": {
58 | "bn.js": "4.11.8",
59 | "inherits": "2.0.3",
60 | "minimalistic-assert": "1.0.0"
61 | }
62 | },
63 | "assert": {
64 | "version": "1.4.1",
65 | "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
66 | "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
67 | "dev": true,
68 | "requires": {
69 | "util": "0.10.3"
70 | }
71 | },
72 | "astw": {
73 | "version": "2.2.0",
74 | "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz",
75 | "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=",
76 | "dev": true,
77 | "requires": {
78 | "acorn": "4.0.13"
79 | }
80 | },
81 | "balanced-match": {
82 | "version": "1.0.0",
83 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
84 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
85 | "dev": true
86 | },
87 | "base64-js": {
88 | "version": "1.2.1",
89 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
90 | "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==",
91 | "dev": true
92 | },
93 | "bn.js": {
94 | "version": "4.11.8",
95 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
96 | "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
97 | "dev": true
98 | },
99 | "brace-expansion": {
100 | "version": "1.1.8",
101 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
102 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
103 | "dev": true,
104 | "requires": {
105 | "balanced-match": "1.0.0",
106 | "concat-map": "0.0.1"
107 | }
108 | },
109 | "brorand": {
110 | "version": "1.1.0",
111 | "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
112 | "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
113 | "dev": true
114 | },
115 | "browser-pack": {
116 | "version": "6.0.3",
117 | "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.3.tgz",
118 | "integrity": "sha512-Jo+RYsn8X8OhyP9tMXXg0ueR2fW696HUu1Hf3/DeiwNean1oGiPtdgGRNuUHBpPHzBH3x4n1kzAlgOgHSIq88g==",
119 | "dev": true,
120 | "requires": {
121 | "JSONStream": "1.3.2",
122 | "combine-source-map": "0.8.0",
123 | "defined": "1.0.0",
124 | "safe-buffer": "5.1.1",
125 | "through2": "2.0.3",
126 | "umd": "3.0.1"
127 | }
128 | },
129 | "browser-resolve": {
130 | "version": "1.11.2",
131 | "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz",
132 | "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=",
133 | "dev": true,
134 | "requires": {
135 | "resolve": "1.1.7"
136 | },
137 | "dependencies": {
138 | "resolve": {
139 | "version": "1.1.7",
140 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
141 | "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
142 | "dev": true
143 | }
144 | }
145 | },
146 | "browserify": {
147 | "version": "13.3.0",
148 | "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz",
149 | "integrity": "sha1-tanJAgJD8McORnW+yCI7xifkFc4=",
150 | "dev": true,
151 | "requires": {
152 | "JSONStream": "1.3.2",
153 | "assert": "1.4.1",
154 | "browser-pack": "6.0.3",
155 | "browser-resolve": "1.11.2",
156 | "browserify-zlib": "0.1.4",
157 | "buffer": "4.9.1",
158 | "cached-path-relative": "1.0.1",
159 | "concat-stream": "1.5.2",
160 | "console-browserify": "1.1.0",
161 | "constants-browserify": "1.0.0",
162 | "crypto-browserify": "3.12.0",
163 | "defined": "1.0.0",
164 | "deps-sort": "2.0.0",
165 | "domain-browser": "1.1.7",
166 | "duplexer2": "0.1.4",
167 | "events": "1.1.1",
168 | "glob": "7.1.2",
169 | "has": "1.0.1",
170 | "htmlescape": "1.1.1",
171 | "https-browserify": "0.0.1",
172 | "inherits": "2.0.3",
173 | "insert-module-globals": "7.0.1",
174 | "labeled-stream-splicer": "2.0.0",
175 | "module-deps": "4.1.1",
176 | "os-browserify": "0.1.2",
177 | "parents": "1.0.1",
178 | "path-browserify": "0.0.0",
179 | "process": "0.11.10",
180 | "punycode": "1.4.1",
181 | "querystring-es3": "0.2.1",
182 | "read-only-stream": "2.0.0",
183 | "readable-stream": "2.3.3",
184 | "resolve": "1.5.0",
185 | "shasum": "1.0.2",
186 | "shell-quote": "1.6.1",
187 | "stream-browserify": "2.0.1",
188 | "stream-http": "2.8.0",
189 | "string_decoder": "0.10.31",
190 | "subarg": "1.0.0",
191 | "syntax-error": "1.3.0",
192 | "through2": "2.0.3",
193 | "timers-browserify": "1.4.2",
194 | "tty-browserify": "0.0.0",
195 | "url": "0.11.0",
196 | "util": "0.10.3",
197 | "vm-browserify": "0.0.4",
198 | "xtend": "4.0.1"
199 | }
200 | },
201 | "browserify-aes": {
202 | "version": "1.1.1",
203 | "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz",
204 | "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==",
205 | "dev": true,
206 | "requires": {
207 | "buffer-xor": "1.0.3",
208 | "cipher-base": "1.0.4",
209 | "create-hash": "1.1.3",
210 | "evp_bytestokey": "1.0.3",
211 | "inherits": "2.0.3",
212 | "safe-buffer": "5.1.1"
213 | }
214 | },
215 | "browserify-cipher": {
216 | "version": "1.0.0",
217 | "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
218 | "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
219 | "dev": true,
220 | "requires": {
221 | "browserify-aes": "1.1.1",
222 | "browserify-des": "1.0.0",
223 | "evp_bytestokey": "1.0.3"
224 | }
225 | },
226 | "browserify-des": {
227 | "version": "1.0.0",
228 | "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz",
229 | "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=",
230 | "dev": true,
231 | "requires": {
232 | "cipher-base": "1.0.4",
233 | "des.js": "1.0.0",
234 | "inherits": "2.0.3"
235 | }
236 | },
237 | "browserify-rsa": {
238 | "version": "4.0.1",
239 | "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
240 | "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
241 | "dev": true,
242 | "requires": {
243 | "bn.js": "4.11.8",
244 | "randombytes": "2.0.6"
245 | }
246 | },
247 | "browserify-sign": {
248 | "version": "4.0.4",
249 | "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
250 | "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
251 | "dev": true,
252 | "requires": {
253 | "bn.js": "4.11.8",
254 | "browserify-rsa": "4.0.1",
255 | "create-hash": "1.1.3",
256 | "create-hmac": "1.1.6",
257 | "elliptic": "6.4.0",
258 | "inherits": "2.0.3",
259 | "parse-asn1": "5.1.0"
260 | }
261 | },
262 | "browserify-zlib": {
263 | "version": "0.1.4",
264 | "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz",
265 | "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=",
266 | "dev": true,
267 | "requires": {
268 | "pako": "0.2.9"
269 | }
270 | },
271 | "buffer": {
272 | "version": "4.9.1",
273 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
274 | "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
275 | "dev": true,
276 | "requires": {
277 | "base64-js": "1.2.1",
278 | "ieee754": "1.1.8",
279 | "isarray": "1.0.0"
280 | }
281 | },
282 | "buffer-xor": {
283 | "version": "1.0.3",
284 | "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
285 | "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
286 | "dev": true
287 | },
288 | "builtin-status-codes": {
289 | "version": "3.0.0",
290 | "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
291 | "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
292 | "dev": true
293 | },
294 | "cached-path-relative": {
295 | "version": "1.0.1",
296 | "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz",
297 | "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=",
298 | "dev": true
299 | },
300 | "camelcase": {
301 | "version": "1.2.1",
302 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
303 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
304 | "dev": true
305 | },
306 | "center-align": {
307 | "version": "0.1.3",
308 | "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
309 | "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
310 | "dev": true,
311 | "requires": {
312 | "align-text": "0.1.4",
313 | "lazy-cache": "1.0.4"
314 | }
315 | },
316 | "cipher-base": {
317 | "version": "1.0.4",
318 | "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
319 | "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
320 | "dev": true,
321 | "requires": {
322 | "inherits": "2.0.3",
323 | "safe-buffer": "5.1.1"
324 | }
325 | },
326 | "cliui": {
327 | "version": "2.1.0",
328 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
329 | "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
330 | "dev": true,
331 | "requires": {
332 | "center-align": "0.1.3",
333 | "right-align": "0.1.3",
334 | "wordwrap": "0.0.2"
335 | }
336 | },
337 | "combine-source-map": {
338 | "version": "0.8.0",
339 | "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
340 | "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=",
341 | "dev": true,
342 | "requires": {
343 | "convert-source-map": "1.1.3",
344 | "inline-source-map": "0.6.2",
345 | "lodash.memoize": "3.0.4",
346 | "source-map": "0.5.7"
347 | }
348 | },
349 | "concat-map": {
350 | "version": "0.0.1",
351 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
352 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
353 | "dev": true
354 | },
355 | "concat-stream": {
356 | "version": "1.5.2",
357 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
358 | "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=",
359 | "dev": true,
360 | "requires": {
361 | "inherits": "2.0.3",
362 | "readable-stream": "2.0.6",
363 | "typedarray": "0.0.6"
364 | },
365 | "dependencies": {
366 | "readable-stream": {
367 | "version": "2.0.6",
368 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
369 | "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
370 | "dev": true,
371 | "requires": {
372 | "core-util-is": "1.0.2",
373 | "inherits": "2.0.3",
374 | "isarray": "1.0.0",
375 | "process-nextick-args": "1.0.7",
376 | "string_decoder": "0.10.31",
377 | "util-deprecate": "1.0.2"
378 | }
379 | }
380 | }
381 | },
382 | "console-browserify": {
383 | "version": "1.1.0",
384 | "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
385 | "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
386 | "dev": true,
387 | "requires": {
388 | "date-now": "0.1.4"
389 | }
390 | },
391 | "constants-browserify": {
392 | "version": "1.0.0",
393 | "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
394 | "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
395 | "dev": true
396 | },
397 | "convert-source-map": {
398 | "version": "1.1.3",
399 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
400 | "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
401 | "dev": true
402 | },
403 | "core-util-is": {
404 | "version": "1.0.2",
405 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
406 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
407 | "dev": true
408 | },
409 | "create-ecdh": {
410 | "version": "4.0.0",
411 | "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
412 | "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=",
413 | "dev": true,
414 | "requires": {
415 | "bn.js": "4.11.8",
416 | "elliptic": "6.4.0"
417 | }
418 | },
419 | "create-hash": {
420 | "version": "1.1.3",
421 | "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
422 | "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=",
423 | "dev": true,
424 | "requires": {
425 | "cipher-base": "1.0.4",
426 | "inherits": "2.0.3",
427 | "ripemd160": "2.0.1",
428 | "sha.js": "2.4.9"
429 | }
430 | },
431 | "create-hmac": {
432 | "version": "1.1.6",
433 | "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz",
434 | "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=",
435 | "dev": true,
436 | "requires": {
437 | "cipher-base": "1.0.4",
438 | "create-hash": "1.1.3",
439 | "inherits": "2.0.3",
440 | "ripemd160": "2.0.1",
441 | "safe-buffer": "5.1.1",
442 | "sha.js": "2.4.9"
443 | }
444 | },
445 | "crypto-browserify": {
446 | "version": "3.12.0",
447 | "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
448 | "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
449 | "dev": true,
450 | "requires": {
451 | "browserify-cipher": "1.0.0",
452 | "browserify-sign": "4.0.4",
453 | "create-ecdh": "4.0.0",
454 | "create-hash": "1.1.3",
455 | "create-hmac": "1.1.6",
456 | "diffie-hellman": "5.0.2",
457 | "inherits": "2.0.3",
458 | "pbkdf2": "3.0.14",
459 | "public-encrypt": "4.0.0",
460 | "randombytes": "2.0.6",
461 | "randomfill": "1.0.3"
462 | }
463 | },
464 | "date-now": {
465 | "version": "0.1.4",
466 | "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
467 | "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
468 | "dev": true
469 | },
470 | "decamelize": {
471 | "version": "1.2.0",
472 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
473 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
474 | "dev": true
475 | },
476 | "defined": {
477 | "version": "1.0.0",
478 | "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
479 | "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
480 | "dev": true
481 | },
482 | "deps-sort": {
483 | "version": "2.0.0",
484 | "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz",
485 | "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=",
486 | "dev": true,
487 | "requires": {
488 | "JSONStream": "1.3.2",
489 | "shasum": "1.0.2",
490 | "subarg": "1.0.0",
491 | "through2": "2.0.3"
492 | }
493 | },
494 | "des.js": {
495 | "version": "1.0.0",
496 | "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
497 | "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
498 | "dev": true,
499 | "requires": {
500 | "inherits": "2.0.3",
501 | "minimalistic-assert": "1.0.0"
502 | }
503 | },
504 | "detective": {
505 | "version": "4.7.1",
506 | "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz",
507 | "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==",
508 | "dev": true,
509 | "requires": {
510 | "acorn": "5.3.0",
511 | "defined": "1.0.0"
512 | },
513 | "dependencies": {
514 | "acorn": {
515 | "version": "5.3.0",
516 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz",
517 | "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==",
518 | "dev": true
519 | }
520 | }
521 | },
522 | "diffie-hellman": {
523 | "version": "5.0.2",
524 | "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
525 | "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=",
526 | "dev": true,
527 | "requires": {
528 | "bn.js": "4.11.8",
529 | "miller-rabin": "4.0.1",
530 | "randombytes": "2.0.6"
531 | }
532 | },
533 | "domain-browser": {
534 | "version": "1.1.7",
535 | "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
536 | "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
537 | "dev": true
538 | },
539 | "duplexer2": {
540 | "version": "0.1.4",
541 | "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
542 | "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
543 | "dev": true,
544 | "requires": {
545 | "readable-stream": "2.3.3"
546 | }
547 | },
548 | "elliptic": {
549 | "version": "6.4.0",
550 | "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
551 | "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
552 | "dev": true,
553 | "requires": {
554 | "bn.js": "4.11.8",
555 | "brorand": "1.1.0",
556 | "hash.js": "1.1.3",
557 | "hmac-drbg": "1.0.1",
558 | "inherits": "2.0.3",
559 | "minimalistic-assert": "1.0.0",
560 | "minimalistic-crypto-utils": "1.0.1"
561 | }
562 | },
563 | "events": {
564 | "version": "1.1.1",
565 | "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
566 | "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
567 | "dev": true
568 | },
569 | "evp_bytestokey": {
570 | "version": "1.0.3",
571 | "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
572 | "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
573 | "dev": true,
574 | "requires": {
575 | "md5.js": "1.3.4",
576 | "safe-buffer": "5.1.1"
577 | }
578 | },
579 | "flyd": {
580 | "version": "0.2.4",
581 | "resolved": "https://registry.npmjs.org/flyd/-/flyd-0.2.4.tgz",
582 | "integrity": "sha1-BBTIN8NPrmmxJ3dSzwBDgu/7mQA=",
583 | "requires": {
584 | "ramda": "0.19.1"
585 | }
586 | },
587 | "fs.realpath": {
588 | "version": "1.0.0",
589 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
590 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
591 | "dev": true
592 | },
593 | "function-bind": {
594 | "version": "1.1.1",
595 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
596 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
597 | "dev": true
598 | },
599 | "glob": {
600 | "version": "7.1.2",
601 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
602 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
603 | "dev": true,
604 | "requires": {
605 | "fs.realpath": "1.0.0",
606 | "inflight": "1.0.6",
607 | "inherits": "2.0.3",
608 | "minimatch": "3.0.4",
609 | "once": "1.4.0",
610 | "path-is-absolute": "1.0.1"
611 | }
612 | },
613 | "has": {
614 | "version": "1.0.1",
615 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
616 | "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
617 | "dev": true,
618 | "requires": {
619 | "function-bind": "1.1.1"
620 | }
621 | },
622 | "hash-base": {
623 | "version": "2.0.2",
624 | "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
625 | "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=",
626 | "dev": true,
627 | "requires": {
628 | "inherits": "2.0.3"
629 | }
630 | },
631 | "hash.js": {
632 | "version": "1.1.3",
633 | "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
634 | "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
635 | "dev": true,
636 | "requires": {
637 | "inherits": "2.0.3",
638 | "minimalistic-assert": "1.0.0"
639 | }
640 | },
641 | "hmac-drbg": {
642 | "version": "1.0.1",
643 | "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
644 | "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
645 | "dev": true,
646 | "requires": {
647 | "hash.js": "1.1.3",
648 | "minimalistic-assert": "1.0.0",
649 | "minimalistic-crypto-utils": "1.0.1"
650 | }
651 | },
652 | "htmlescape": {
653 | "version": "1.1.1",
654 | "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
655 | "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
656 | "dev": true
657 | },
658 | "https-browserify": {
659 | "version": "0.0.1",
660 | "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz",
661 | "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=",
662 | "dev": true
663 | },
664 | "ieee754": {
665 | "version": "1.1.8",
666 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
667 | "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
668 | "dev": true
669 | },
670 | "indexof": {
671 | "version": "0.0.1",
672 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
673 | "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
674 | "dev": true
675 | },
676 | "inflight": {
677 | "version": "1.0.6",
678 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
679 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
680 | "dev": true,
681 | "requires": {
682 | "once": "1.4.0",
683 | "wrappy": "1.0.2"
684 | }
685 | },
686 | "inherits": {
687 | "version": "2.0.3",
688 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
689 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
690 | "dev": true
691 | },
692 | "inline-source-map": {
693 | "version": "0.6.2",
694 | "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz",
695 | "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=",
696 | "dev": true,
697 | "requires": {
698 | "source-map": "0.5.7"
699 | }
700 | },
701 | "insert-module-globals": {
702 | "version": "7.0.1",
703 | "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz",
704 | "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=",
705 | "dev": true,
706 | "requires": {
707 | "JSONStream": "1.3.2",
708 | "combine-source-map": "0.7.2",
709 | "concat-stream": "1.5.2",
710 | "is-buffer": "1.1.6",
711 | "lexical-scope": "1.2.0",
712 | "process": "0.11.10",
713 | "through2": "2.0.3",
714 | "xtend": "4.0.1"
715 | },
716 | "dependencies": {
717 | "combine-source-map": {
718 | "version": "0.7.2",
719 | "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz",
720 | "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=",
721 | "dev": true,
722 | "requires": {
723 | "convert-source-map": "1.1.3",
724 | "inline-source-map": "0.6.2",
725 | "lodash.memoize": "3.0.4",
726 | "source-map": "0.5.7"
727 | }
728 | }
729 | }
730 | },
731 | "is-buffer": {
732 | "version": "1.1.6",
733 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
734 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
735 | "dev": true
736 | },
737 | "isarray": {
738 | "version": "1.0.0",
739 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
740 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
741 | "dev": true
742 | },
743 | "json-stable-stringify": {
744 | "version": "0.0.1",
745 | "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz",
746 | "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=",
747 | "dev": true,
748 | "requires": {
749 | "jsonify": "0.0.0"
750 | }
751 | },
752 | "jsonify": {
753 | "version": "0.0.0",
754 | "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
755 | "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
756 | "dev": true
757 | },
758 | "jsonparse": {
759 | "version": "1.3.1",
760 | "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
761 | "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
762 | "dev": true
763 | },
764 | "kind-of": {
765 | "version": "3.2.2",
766 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
767 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
768 | "dev": true,
769 | "requires": {
770 | "is-buffer": "1.1.6"
771 | }
772 | },
773 | "labeled-stream-splicer": {
774 | "version": "2.0.0",
775 | "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz",
776 | "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=",
777 | "dev": true,
778 | "requires": {
779 | "inherits": "2.0.3",
780 | "isarray": "0.0.1",
781 | "stream-splicer": "2.0.0"
782 | },
783 | "dependencies": {
784 | "isarray": {
785 | "version": "0.0.1",
786 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
787 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
788 | "dev": true
789 | }
790 | }
791 | },
792 | "lazy-cache": {
793 | "version": "1.0.4",
794 | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
795 | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
796 | "dev": true
797 | },
798 | "lexical-scope": {
799 | "version": "1.2.0",
800 | "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz",
801 | "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=",
802 | "dev": true,
803 | "requires": {
804 | "astw": "2.2.0"
805 | }
806 | },
807 | "lodash.memoize": {
808 | "version": "3.0.4",
809 | "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
810 | "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
811 | "dev": true
812 | },
813 | "longest": {
814 | "version": "1.0.1",
815 | "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
816 | "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
817 | "dev": true
818 | },
819 | "md5.js": {
820 | "version": "1.3.4",
821 | "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz",
822 | "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=",
823 | "dev": true,
824 | "requires": {
825 | "hash-base": "3.0.4",
826 | "inherits": "2.0.3"
827 | },
828 | "dependencies": {
829 | "hash-base": {
830 | "version": "3.0.4",
831 | "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
832 | "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
833 | "dev": true,
834 | "requires": {
835 | "inherits": "2.0.3",
836 | "safe-buffer": "5.1.1"
837 | }
838 | }
839 | }
840 | },
841 | "miller-rabin": {
842 | "version": "4.0.1",
843 | "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
844 | "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
845 | "dev": true,
846 | "requires": {
847 | "bn.js": "4.11.8",
848 | "brorand": "1.1.0"
849 | }
850 | },
851 | "minimalistic-assert": {
852 | "version": "1.0.0",
853 | "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
854 | "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=",
855 | "dev": true
856 | },
857 | "minimalistic-crypto-utils": {
858 | "version": "1.0.1",
859 | "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
860 | "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
861 | "dev": true
862 | },
863 | "minimatch": {
864 | "version": "3.0.4",
865 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
866 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
867 | "dev": true,
868 | "requires": {
869 | "brace-expansion": "1.1.8"
870 | }
871 | },
872 | "minimist": {
873 | "version": "1.2.0",
874 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
875 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
876 | "dev": true
877 | },
878 | "module-deps": {
879 | "version": "4.1.1",
880 | "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz",
881 | "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=",
882 | "dev": true,
883 | "requires": {
884 | "JSONStream": "1.3.2",
885 | "browser-resolve": "1.11.2",
886 | "cached-path-relative": "1.0.1",
887 | "concat-stream": "1.5.2",
888 | "defined": "1.0.0",
889 | "detective": "4.7.1",
890 | "duplexer2": "0.1.4",
891 | "inherits": "2.0.3",
892 | "parents": "1.0.1",
893 | "readable-stream": "2.3.3",
894 | "resolve": "1.5.0",
895 | "stream-combiner2": "1.1.1",
896 | "subarg": "1.0.0",
897 | "through2": "2.0.3",
898 | "xtend": "4.0.1"
899 | }
900 | },
901 | "once": {
902 | "version": "1.4.0",
903 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
904 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
905 | "dev": true,
906 | "requires": {
907 | "wrappy": "1.0.2"
908 | }
909 | },
910 | "os-browserify": {
911 | "version": "0.1.2",
912 | "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz",
913 | "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=",
914 | "dev": true
915 | },
916 | "pako": {
917 | "version": "0.2.9",
918 | "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
919 | "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
920 | "dev": true
921 | },
922 | "parents": {
923 | "version": "1.0.1",
924 | "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
925 | "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
926 | "dev": true,
927 | "requires": {
928 | "path-platform": "0.11.15"
929 | }
930 | },
931 | "parse-asn1": {
932 | "version": "5.1.0",
933 | "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz",
934 | "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
935 | "dev": true,
936 | "requires": {
937 | "asn1.js": "4.9.2",
938 | "browserify-aes": "1.1.1",
939 | "create-hash": "1.1.3",
940 | "evp_bytestokey": "1.0.3",
941 | "pbkdf2": "3.0.14"
942 | }
943 | },
944 | "path-browserify": {
945 | "version": "0.0.0",
946 | "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
947 | "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
948 | "dev": true
949 | },
950 | "path-is-absolute": {
951 | "version": "1.0.1",
952 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
953 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
954 | "dev": true
955 | },
956 | "path-parse": {
957 | "version": "1.0.5",
958 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
959 | "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
960 | "dev": true
961 | },
962 | "path-platform": {
963 | "version": "0.11.15",
964 | "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
965 | "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
966 | "dev": true
967 | },
968 | "pbkdf2": {
969 | "version": "3.0.14",
970 | "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz",
971 | "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==",
972 | "dev": true,
973 | "requires": {
974 | "create-hash": "1.1.3",
975 | "create-hmac": "1.1.6",
976 | "ripemd160": "2.0.1",
977 | "safe-buffer": "5.1.1",
978 | "sha.js": "2.4.9"
979 | }
980 | },
981 | "process": {
982 | "version": "0.11.10",
983 | "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
984 | "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
985 | "dev": true
986 | },
987 | "process-nextick-args": {
988 | "version": "1.0.7",
989 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
990 | "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
991 | "dev": true
992 | },
993 | "public-encrypt": {
994 | "version": "4.0.0",
995 | "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz",
996 | "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=",
997 | "dev": true,
998 | "requires": {
999 | "bn.js": "4.11.8",
1000 | "browserify-rsa": "4.0.1",
1001 | "create-hash": "1.1.3",
1002 | "parse-asn1": "5.1.0",
1003 | "randombytes": "2.0.6"
1004 | }
1005 | },
1006 | "punycode": {
1007 | "version": "1.4.1",
1008 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
1009 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
1010 | "dev": true
1011 | },
1012 | "querystring": {
1013 | "version": "0.2.0",
1014 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
1015 | "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
1016 | "dev": true
1017 | },
1018 | "querystring-es3": {
1019 | "version": "0.2.1",
1020 | "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
1021 | "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
1022 | "dev": true
1023 | },
1024 | "ramda": {
1025 | "version": "0.19.1",
1026 | "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.19.1.tgz",
1027 | "integrity": "sha1-icStaXJl/2sfrOnyhkOeJSDWZ5w="
1028 | },
1029 | "randombytes": {
1030 | "version": "2.0.6",
1031 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz",
1032 | "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==",
1033 | "dev": true,
1034 | "requires": {
1035 | "safe-buffer": "5.1.1"
1036 | }
1037 | },
1038 | "randomfill": {
1039 | "version": "1.0.3",
1040 | "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz",
1041 | "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==",
1042 | "dev": true,
1043 | "requires": {
1044 | "randombytes": "2.0.6",
1045 | "safe-buffer": "5.1.1"
1046 | }
1047 | },
1048 | "read-only-stream": {
1049 | "version": "2.0.0",
1050 | "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
1051 | "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=",
1052 | "dev": true,
1053 | "requires": {
1054 | "readable-stream": "2.3.3"
1055 | }
1056 | },
1057 | "readable-stream": {
1058 | "version": "2.3.3",
1059 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
1060 | "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
1061 | "dev": true,
1062 | "requires": {
1063 | "core-util-is": "1.0.2",
1064 | "inherits": "2.0.3",
1065 | "isarray": "1.0.0",
1066 | "process-nextick-args": "1.0.7",
1067 | "safe-buffer": "5.1.1",
1068 | "string_decoder": "1.0.3",
1069 | "util-deprecate": "1.0.2"
1070 | },
1071 | "dependencies": {
1072 | "string_decoder": {
1073 | "version": "1.0.3",
1074 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
1075 | "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
1076 | "dev": true,
1077 | "requires": {
1078 | "safe-buffer": "5.1.1"
1079 | }
1080 | }
1081 | }
1082 | },
1083 | "repeat-string": {
1084 | "version": "1.6.1",
1085 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
1086 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
1087 | "dev": true
1088 | },
1089 | "resolve": {
1090 | "version": "1.5.0",
1091 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
1092 | "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
1093 | "dev": true,
1094 | "requires": {
1095 | "path-parse": "1.0.5"
1096 | }
1097 | },
1098 | "right-align": {
1099 | "version": "0.1.3",
1100 | "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
1101 | "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
1102 | "dev": true,
1103 | "requires": {
1104 | "align-text": "0.1.4"
1105 | }
1106 | },
1107 | "ripemd160": {
1108 | "version": "2.0.1",
1109 | "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
1110 | "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=",
1111 | "dev": true,
1112 | "requires": {
1113 | "hash-base": "2.0.2",
1114 | "inherits": "2.0.3"
1115 | }
1116 | },
1117 | "safe-buffer": {
1118 | "version": "5.1.1",
1119 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
1120 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
1121 | "dev": true
1122 | },
1123 | "sha.js": {
1124 | "version": "2.4.9",
1125 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz",
1126 | "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==",
1127 | "dev": true,
1128 | "requires": {
1129 | "inherits": "2.0.3",
1130 | "safe-buffer": "5.1.1"
1131 | }
1132 | },
1133 | "shasum": {
1134 | "version": "1.0.2",
1135 | "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",
1136 | "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=",
1137 | "dev": true,
1138 | "requires": {
1139 | "json-stable-stringify": "0.0.1",
1140 | "sha.js": "2.4.9"
1141 | }
1142 | },
1143 | "shell-quote": {
1144 | "version": "1.6.1",
1145 | "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz",
1146 | "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=",
1147 | "dev": true,
1148 | "requires": {
1149 | "array-filter": "0.0.1",
1150 | "array-map": "0.0.0",
1151 | "array-reduce": "0.0.0",
1152 | "jsonify": "0.0.0"
1153 | }
1154 | },
1155 | "source-map": {
1156 | "version": "0.5.7",
1157 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
1158 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
1159 | "dev": true
1160 | },
1161 | "stream-browserify": {
1162 | "version": "2.0.1",
1163 | "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
1164 | "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
1165 | "dev": true,
1166 | "requires": {
1167 | "inherits": "2.0.3",
1168 | "readable-stream": "2.3.3"
1169 | }
1170 | },
1171 | "stream-combiner2": {
1172 | "version": "1.1.1",
1173 | "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
1174 | "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
1175 | "dev": true,
1176 | "requires": {
1177 | "duplexer2": "0.1.4",
1178 | "readable-stream": "2.3.3"
1179 | }
1180 | },
1181 | "stream-http": {
1182 | "version": "2.8.0",
1183 | "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.0.tgz",
1184 | "integrity": "sha512-sZOFxI/5xw058XIRHl4dU3dZ+TTOIGJR78Dvo0oEAejIt4ou27k+3ne1zYmCV+v7UucbxIFQuOgnkTVHh8YPnw==",
1185 | "dev": true,
1186 | "requires": {
1187 | "builtin-status-codes": "3.0.0",
1188 | "inherits": "2.0.3",
1189 | "readable-stream": "2.3.3",
1190 | "to-arraybuffer": "1.0.1",
1191 | "xtend": "4.0.1"
1192 | }
1193 | },
1194 | "stream-splicer": {
1195 | "version": "2.0.0",
1196 | "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz",
1197 | "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=",
1198 | "dev": true,
1199 | "requires": {
1200 | "inherits": "2.0.3",
1201 | "readable-stream": "2.3.3"
1202 | }
1203 | },
1204 | "string_decoder": {
1205 | "version": "0.10.31",
1206 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
1207 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
1208 | "dev": true
1209 | },
1210 | "subarg": {
1211 | "version": "1.0.0",
1212 | "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
1213 | "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
1214 | "dev": true,
1215 | "requires": {
1216 | "minimist": "1.2.0"
1217 | }
1218 | },
1219 | "syntax-error": {
1220 | "version": "1.3.0",
1221 | "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz",
1222 | "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=",
1223 | "dev": true,
1224 | "requires": {
1225 | "acorn": "4.0.13"
1226 | }
1227 | },
1228 | "through": {
1229 | "version": "2.3.8",
1230 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
1231 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
1232 | "dev": true
1233 | },
1234 | "through2": {
1235 | "version": "2.0.3",
1236 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
1237 | "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
1238 | "dev": true,
1239 | "requires": {
1240 | "readable-stream": "2.3.3",
1241 | "xtend": "4.0.1"
1242 | }
1243 | },
1244 | "timers-browserify": {
1245 | "version": "1.4.2",
1246 | "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
1247 | "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
1248 | "dev": true,
1249 | "requires": {
1250 | "process": "0.11.10"
1251 | }
1252 | },
1253 | "to-arraybuffer": {
1254 | "version": "1.0.1",
1255 | "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
1256 | "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
1257 | "dev": true
1258 | },
1259 | "tty-browserify": {
1260 | "version": "0.0.0",
1261 | "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
1262 | "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
1263 | "dev": true
1264 | },
1265 | "typedarray": {
1266 | "version": "0.0.6",
1267 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
1268 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
1269 | "dev": true
1270 | },
1271 | "uglify-js": {
1272 | "version": "2.8.29",
1273 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
1274 | "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
1275 | "dev": true,
1276 | "requires": {
1277 | "source-map": "0.5.7",
1278 | "uglify-to-browserify": "1.0.2",
1279 | "yargs": "3.10.0"
1280 | }
1281 | },
1282 | "uglify-to-browserify": {
1283 | "version": "1.0.2",
1284 | "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
1285 | "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
1286 | "dev": true,
1287 | "optional": true
1288 | },
1289 | "umd": {
1290 | "version": "3.0.1",
1291 | "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz",
1292 | "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=",
1293 | "dev": true
1294 | },
1295 | "url": {
1296 | "version": "0.11.0",
1297 | "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
1298 | "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
1299 | "dev": true,
1300 | "requires": {
1301 | "punycode": "1.3.2",
1302 | "querystring": "0.2.0"
1303 | },
1304 | "dependencies": {
1305 | "punycode": {
1306 | "version": "1.3.2",
1307 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
1308 | "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
1309 | "dev": true
1310 | }
1311 | }
1312 | },
1313 | "util": {
1314 | "version": "0.10.3",
1315 | "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
1316 | "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
1317 | "dev": true,
1318 | "requires": {
1319 | "inherits": "2.0.1"
1320 | },
1321 | "dependencies": {
1322 | "inherits": {
1323 | "version": "2.0.1",
1324 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
1325 | "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
1326 | "dev": true
1327 | }
1328 | }
1329 | },
1330 | "util-deprecate": {
1331 | "version": "1.0.2",
1332 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1333 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
1334 | "dev": true
1335 | },
1336 | "vm-browserify": {
1337 | "version": "0.0.4",
1338 | "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
1339 | "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
1340 | "dev": true,
1341 | "requires": {
1342 | "indexof": "0.0.1"
1343 | }
1344 | },
1345 | "window-size": {
1346 | "version": "0.1.0",
1347 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
1348 | "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
1349 | "dev": true
1350 | },
1351 | "wordwrap": {
1352 | "version": "0.0.2",
1353 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
1354 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
1355 | "dev": true
1356 | },
1357 | "wrappy": {
1358 | "version": "1.0.2",
1359 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1360 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
1361 | "dev": true
1362 | },
1363 | "xtend": {
1364 | "version": "4.0.1",
1365 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
1366 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
1367 | "dev": true
1368 | },
1369 | "yargs": {
1370 | "version": "3.10.0",
1371 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
1372 | "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
1373 | "dev": true,
1374 | "requires": {
1375 | "camelcase": "1.2.1",
1376 | "cliui": "2.1.0",
1377 | "decamelize": "1.2.0",
1378 | "window-size": "0.1.0"
1379 | }
1380 | }
1381 | }
1382 | }
1383 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pointer-stream",
3 | "version": "0.12.0",
4 | "description": "A tiny stream API for mouse and touch events",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "dist": "browserify lib/index.js | uglifyjs -mc > pointer-stream.min.js",
9 | "prepublish": "npm run dist"
10 | },
11 | "author": "james.a.forbes@gmail.com <=> (http://james-forbes.com)",
12 | "license": "ISC",
13 | "dependencies": {
14 | "flyd": "^0.2.2"
15 | },
16 | "devDependencies": {
17 | "browserify": "^13.0.0",
18 | "uglify-js": "^2.7.5"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/pointer-stream.min.js:
--------------------------------------------------------------------------------
1 | !function n(e,t,r){function o(u,s){if(!t[u]){if(!e[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);var a=new Error("Cannot find module '"+u+"'");throw a.code="MODULE_NOT_FOUND",a}var f=t[u]={exports:{}};e[u][0].call(f.exports,function(n){var t=e[u][1][n];return o(t||n)},f,f.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u0?-r:+r)),n.initialPinchScale(n.scale()),n.wheeling(!1)}}function i(n,e,t){var r={current:n.scale(),next:g(n.settings.scale.min,n.settings.scale.max,t)},o={w:window.innerWidth-n.settings.offset().x,h:window.innerHeight-n.settings.offset().y},i={current:{x:n.coords().x,y:n.coords().y,w:o.w/r.current,h:o.h/r.current},next:{x:n.coords().x,y:n.coords().y,w:o.w/r.next,h:o.h/r.next}},u={current:{x:(e.x-i.current.x)/i.current.w,y:(e.y-i.current.y)/i.current.h},next:{x:(e.x-i.next.x)/i.next.w,y:(e.y-i.next.y)/i.next.h}},s={x:(u.next.x-u.current.x)*i.current.w*-1,y:(u.next.y-u.current.y)*i.current.h*-1};n.movement(s),n.move(e),n.scale(r.next)}function u(n,e){n.container().contains(e.target)&&n.mousedown(n.mousedown()+1)}function s(n,e){n.mousedown(0),n.dragging(!1),n.selectingText(!1),e.touches&&e.touches.length&&(n.pinching(0),n.initialPinchScale(n.scale()))}function c(n,e){if(n.selectingText());else{var t=e.touches||[],o=t[0]||e;if(t.length>1)n.pinching(n.pinching()+1),r(n,e.touches[0],e.touches[1]);else if(!n.pinching()){var i=o.pageX-n.settings.offset().x,u=o.pageY-n.settings.offset().y;if(n.mousedown()>2&&n.settings.ignoreTextSelect&&!n.selectingText()&&n.selectingText((getSelection()+"").length>0),!n.selectingText()&&n.mousedown()>3){n.dragging(n.mousedown());var s={x:(i-n.move().x)*n.polarity().x,y:(u-n.move().y)*n.polarity().y};n.movement(s)}n.move({x:i,y:u})}n.mousedown(n.mousedown()+(n.mousedown()>0?1:0))}}function a(n,e,t){var r=y(),o=!0;return n.addEventListener(e,function(n){o&&(o=!1,requestAnimationFrame(function(){r(n),o=!0}))}),m(function(){n.removeEventListener(e,r)},r.end),w(t,r)}function f(n){n=n||C,n.offset=n.offset||C.offset,n.scale=n.scale||C.scale,n.manualActivation=n.manualActivation||!1,n.container=n.container||h(document.body),n.coords=n.coords||C.coords,n.polarity=n.polarity||{x:1,y:1},n.ignoreTextSelect=n.ignoreTextSelect||!1;const e=y(!1);var t=n.offset.x,r=n.offset.y,i=n.scale.min,f=n.scale.max,d=y(),v=y({x:t,y:r}),m=y(n.polarity),w=y(0),T=y(S),b=y(S),M=y(!1),O=y(0),P=y(0),q=y(1),A=y(1),N=y(1),U=function(){return[M,O,P].some(function(n){return n()})},V=x(function(e,t){return U()?{x:g(n.coords.min.x,n.coords.max.x,e.x+t.x),y:g(n.coords.min.y,n.coords.max.y,e.y+t.y)}:e},S,T),E=l({settings:{scale:{min:i,max:f},offset:v,coords:n.coords,ignoreTextSelect:n.ignoreTextSelect},container:n.container,activateListeners:function(){[,[u,"mousedown"],[s,"mouseup"],[c,"mousemove"],[s,"touchend"],[u,"touchstart"],[c,"touchmove"]].concat(n.disable_mousewheel?[]:[[o,"wheel"]]).map(function(e){var t=e[0],r=e[1];n.container();return a(window,r,d).map(function(n){return t(E,n)})})}},p(_(d),{mousedown:w,movement:T,move:b,dragging:M,pinching:O,wheeling:P,scale:q,initialPinchScale:A,touchRadius:N,coords:V,selectingText:e,polarity:m,end:d}));return n.manualActivation||E.activateListeners(),E}var l=function(n){return function(e,t){return[].concat(Object.keys(e),Object.keys(t)).reduce(function(r,o){return r[o]=r[o]||n(e[o],t[o]),r},{})}}(function(n,e){return e||n}),d=function(n,e){return n-e},h=function(n){return function(){return n}},p=function(n,e){return Object.keys(e).reduce(function(t,r){return t[r]=n(e[r]),t},{})},g=function(n,e,t){return Math.max(Math.min(t,e),n)},v=n("flyd"),y=v.stream,x=v.scan,m=v.on,w=v.endsOn,_=v.curryN(2,w),S={x:0,y:0},C={offset:{x:0,y:0},scale:{min:.5,max:40},coords:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};t.PointerStream=f,e.exports=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{flyd:2}],2:[function(n,e,t){"use strict";function r(n){return!!(n&&n.constructor&&n.call&&n.apply)}function o(){return!0}function i(n,e){var t,r,i,u,s=f([],o);for(i=[],u=[],t=0;t0?[]:void 0,t.shouldUpdate=!1,x(n,t),t}function l(n){return n.depsMet=n.deps.every(function(n){return n.hasVal}),!n.depsMet}function d(n){if(!(!0!==n.depsMet&&l(n)||void 0!==n.end&&!0===n.end.val)){if(void 0!==C)return void b.push(n);C=n,n.depsChanged&&(n.fnArgs[n.fnArgs.length-1]=n.depsChanged);var e=n.fn.apply(n.fn,n.fnArgs);void 0!==e&&n(e),C=void 0,void 0!==n.depsChanged&&(n.depsChanged=[]),n.shouldUpdate=!1,!1===P&&g()}}function h(n){var e,t,r,o=n.listeners;for(e=0;e=0;--O)t=M[O],!0===t.shouldUpdate&&d(t),t.queued=!1}function p(n){var e,t=n.listeners;if(!1===n.queued){for(n.queued=!0,e=0;e0;){var n=b.shift();n.vals.length>0&&(n.val=n.vals.shift()),h(n)}P=!1}function v(n,e){if(void 0!==e&&null!==e&&r(e.then))return void e.then(n);n.val=e,n.hasVal=!0,void 0===C?(P=!0,h(n),b.length>0?g():P=!1):C===n?y(n,n.listeners):(n.vals.push(e),b.push(n))}function y(n,e){var t,r;for(t=0;t0&&t(n),t},q.combine=T(2,i),q.isStream=function(n){return r(n)&&"hasVal"in n},q.immediate=function(n){return!1===n.depsMet&&(n.depsMet=!0,d(n)),n},q.endsOn=function(n,e){return w(e.end),n.listeners.push(e.end),e.end.deps.push(n),e},q.map=T(2,function(n,e){return i(function(e,t){t(n(e.val))},[e])}),q.on=T(2,function(n,e){return i(function(e){n(e.val)},[e])}),q.scan=T(3,function(n,e,t){var r=i(function(t,r){r(e=n(e,t.val))},[t]);return r.hasVal||r(e),r}),q.merge=T(2,function(n,e){var t=q.immediate(i(function(n,e,t,r){r[0]?t(r[0]()):n.hasVal?t(n.val):e.hasVal&&t(e.val)},[n,e]));return q.endsOn(i(function(){return!0},[n.end,e.end]),t),t}),q.transduce=T(2,function(n,e){return n=n(new S),i(function(e,t){var r=n["@@transducer/step"](void 0,e.val);return r&&!0===r["@@transducer/reduced"]?(t.end(!0),r["@@transducer/value"]):r},[e])}),q.curryN=T,S.prototype["@@transducer/init"]=function(){},S.prototype["@@transducer/result"]=function(){},S.prototype["@@transducer/step"]=function(n,e){return e},e.exports=q},{"ramda/src/curryN":3}],3:[function(n,e,t){var r=n("./internal/_arity"),o=n("./internal/_curry1"),i=n("./internal/_curry2"),u=n("./internal/_curryN");e.exports=i(function(n,e){return 1===n?o(e):r(n,u(n,[],e))})},{"./internal/_arity":4,"./internal/_curry1":5,"./internal/_curry2":6,"./internal/_curryN":7}],4:[function(n,e,t){e.exports=function(n,e){switch(n){case 0:return function(){return e.apply(this,arguments)};case 1:return function(n){return e.apply(this,arguments)};case 2:return function(n,t){return e.apply(this,arguments)};case 3:return function(n,t,r){return e.apply(this,arguments)};case 4:return function(n,t,r,o){return e.apply(this,arguments)};case 5:return function(n,t,r,o,i){return e.apply(this,arguments)};case 6:return function(n,t,r,o,i,u){return e.apply(this,arguments)};case 7:return function(n,t,r,o,i,u,s){return e.apply(this,arguments)};case 8:return function(n,t,r,o,i,u,s,c){return e.apply(this,arguments)};case 9:return function(n,t,r,o,i,u,s,c,a){return e.apply(this,arguments)};case 10:return function(n,t,r,o,i,u,s,c,a,f){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},{}],5:[function(n,e,t){var r=n("./_isPlaceholder");e.exports=function(n){return function e(t){return 0===arguments.length||r(t)?e:n.apply(this,arguments)}}},{"./_isPlaceholder":8}],6:[function(n,e,t){var r=n("./_curry1"),o=n("./_isPlaceholder");e.exports=function(n){return function e(t,i){switch(arguments.length){case 0:return e;case 1:return o(t)?e:r(function(e){return n(t,e)});default:return o(t)&&o(i)?e:o(t)?r(function(e){return n(e,i)}):o(i)?r(function(e){return n(t,e)}):n(t,i)}}}},{"./_curry1":5,"./_isPlaceholder":8}],7:[function(n,e,t){var r=n("./_arity"),o=n("./_isPlaceholder");e.exports=function n(e,t,i){return function(){for(var u=[],s=0,c=e,a=0;a=arguments.length)?f=t[a]:(f=arguments[s],s+=1),u[a]=f,o(f)||(c-=1),a+=1}return c<=0?i.apply(this,u):r(c,n(e,u,i))}}},{"./_arity":4,"./_isPlaceholder":8}],8:[function(n,e,t){e.exports=function(n){return null!=n&&"object"==typeof n&&!0===n["@@functional/placeholder"]}},{}]},{},[1]);
2 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | pointer-stream
2 | ==============
3 |
4 | Convenient, concise, streaming interface for scale, drag & movement.
5 | A single API for mouse and touch events in 3.3k gzipped (9k minified)
6 |
7 | [Live Example](http://james-forbes.com/pointer-stream)
8 |
9 |
10 | Quick Start
11 | -----------
12 |
13 |
14 | #### Installation
15 |
16 | `npm install pointer-stream`
17 |
18 |
19 | Drop `pointer-stream.min.js` in your html file.
20 |
21 | ```html
22 |
23 | ```
24 |
25 | Or using browserify:
26 |
27 | ```js
28 | var PointerStream = require('pointer-stream')
29 | ```
30 |
31 | #### Usage
32 |
33 | ```js
34 | const pointer = PointerStream({
35 | offset: { x: 0, y: 0 }
36 | ,scale: { min: 1, max: 40 }
37 | })
38 |
39 | // subscribe to changes in scale
40 | pointer.scale.map(function(scale){
41 | container.style.transform = 'scale('+scale+')'
42 | })
43 |
44 | // translate your container
45 | pointer.coords.map(function({x,y}){
46 | container.style.transform = 'translate('+x+'px,'+y+'px)'
47 | })
48 |
49 | // clean up the pointer events, so they can be gc'd
50 | pointer.end(true)
51 |
52 | ```
53 |
54 | Advanced Use
55 | ------------
56 |
57 | All the streams used are [flyd](https://github.com/paldepind/flyd) streams.
58 | You can use any of the operators flyd supports, *and* you can use
59 | Fantasy land compatible libraries like [Ramda](https://github.com/ramda/ramda)
60 | to transform the streams in advanced ways.
61 |
62 | ```js
63 |
64 | // If any of these streams return True
65 | // `hovering` will return false
66 |
67 | const hovering = R.pipe(
68 | R.always([
69 | pointer.dragging
70 | ,pointer.pinching
71 | ,pointer.wheeling
72 | ])
73 | ,R.anyPass
74 | ,R.complement
75 | )
76 | ```
77 |
78 | There are many low level streams exposed that can be composed to
79 | create more advanced, specific streams.
80 |
81 |
82 | Transform Origin and Offset
83 | ---------------------------
84 |
85 | `coords` is a convenience stream for translating a container.
86 |
87 | It updates whenever a drag or scale event occurs. If you find the
88 | container translation behaviour is a little off, you can try
89 | adding a transform origin rule to your element:
90 |
91 |
92 | ```css
93 | #container {
94 | transform-origin: 'top left'
95 | }
96 | ```
97 |
98 | If your container is offset at all, you can pass a value to
99 | `pointer.settings.offset({ x,y })`.
100 |
101 | Subsequent events will be translated based on coords updating.
102 |
103 | ---
104 |
105 |
106 | Interface
107 | ---------
108 |
109 | Type signature of the `PointerStream`
110 | constructor.
111 |
112 | ```js
113 | { {offset:{x,y}, scale:{min,max} }} =>
114 |
115 | { mousedown: stream Number
116 | , movement: stream { x: Number, y: Number }
117 | , move: stream { x: Number, y: Number }
118 | , dragging: stream Boolean
119 | , pinching: stream Number
120 | , wheeling: stream Number
121 | , scale: stream Number
122 | , coords: stream { x: Number, y: Number }
123 | , end: stream Boolean?
124 | , settings:
125 | { scale: { min: Number, max: Number }
126 | , offset: { x: stream Number, y: stream Number}
127 | }
128 | }
129 |
130 | ```
131 |
132 | API
133 | ---
134 |
135 | Note: Unless otherwise stated, all streams respond to touch and mouse. Even streams like `mousemove`.
136 | The idea is, you can abstract away whether an event came from the mouse or
137 | a finger, without having to learn non standard event names.
138 |
139 | #### mousedown
140 |
141 | `stream Number`
142 |
143 | An integer that increments on every mouse move event. Used internally
144 | to determine whether a drag is occuring.
145 |
146 | Could potentially be used to create a `long-press` stream
147 |
148 | #### movement
149 |
150 | `stream {x,y}`
151 |
152 | The amount we have moved since the previous event. Used internally
153 | to create the `coords` stream.
154 |
155 | #### move
156 |
157 | `stream {x,y}`
158 |
159 | The current position of either the finger or the mouse.
160 | In the case of multiple pointers, `move` will be the center
161 | of the first two fingers in the `touches` array.
162 |
163 |
164 | #### dragging
165 |
166 | `stream Boolean`
167 |
168 | True if the mouse is click+dragging or if a finger is panning.
169 |
170 | #### pinching
171 |
172 | `stream Boolean`
173 |
174 | This stream is specific to touch.
175 |
176 | True if two fingers are pinch/zooming.
177 |
178 | #### wheeling
179 |
180 | `stream Boolean`
181 |
182 | This stream is specific to the mouse.
183 |
184 | True if the mouse wheel is moving. Used internally to dispatch to a
185 | specific scale handler.
186 |
187 |
188 | #### scale
189 |
190 | `stream Number`
191 |
192 | The current scale of the container. Increments when zooming in
193 | and decrements when zooming out.
194 |
195 | #### end
196 |
197 | `stream Boolean?`
198 |
199 | Pass `true` into this stream to clean up the pointer instance.
200 |
201 | ```js
202 | pointer.end(true)
203 | ```
204 |
205 | All streams will cease to emit new values and will be garbage collected.
206 |
207 | #### settings.scale {min,max}
208 |
209 | Specify the minimum and maximum scale. This will clamp the scale
210 | on subsequent events.
211 |
212 | #### settings.offset {x,y}
213 |
214 | The current offset of your container. Allows you to inform
215 | a `pointer` instance if your container has moved.
216 | This allows the library to calibrate `coords` `move` and `movement`
217 |
--------------------------------------------------------------------------------