web-launch-kit 0.0.2 → 0.0.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/launch-kit.cjs +690 -115
- package/dist/launch-kit.cjs.map +1 -1
- package/dist/launch-kit.min.cjs +1 -1
- package/dist/launch-kit.min.cjs.map +1 -1
- package/dist/launch-kit.min.mjs +1 -1
- package/dist/launch-kit.min.mjs.map +1 -1
- package/dist/launch-kit.mjs +690 -115
- package/dist/launch-kit.mjs.map +1 -1
- package/dist/launch-kit.umd.js +690 -115
- package/dist/launch-kit.umd.js.map +1 -1
- package/dist/launch-kit.umd.min.js +1 -1
- package/dist/launch-kit.umd.min.js.map +1 -1
- package/package.json +3 -2
- package/dist/utils/event-listener-utils.d.ts +0 -8
package/dist/launch-kit.cjs
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version$
|
|
5
|
+
var version$2 = "0.0.3";
|
|
6
|
+
var packageJSON$2 = {
|
|
7
|
+
version: version$2};
|
|
8
|
+
|
|
9
|
+
var version$1 = "0.0.4";
|
|
6
10
|
var packageJSON$1 = {
|
|
7
11
|
version: version$1};
|
|
8
12
|
|
|
9
|
-
var version = "0.0.4";
|
|
10
|
-
var packageJSON = {
|
|
11
|
-
version: version};
|
|
12
|
-
|
|
13
13
|
var NAVIGATOR$1 = globalThis.navigator;
|
|
14
14
|
var USER_AGENT = typeof NAVIGATOR$1 !== 'undefined' ? NAVIGATOR$1.userAgent : '';
|
|
15
15
|
var USER_AGENT_DATA = typeof NAVIGATOR$1 !== 'undefined' ? NAVIGATOR$1.userAgentData : undefined;
|
|
@@ -298,7 +298,7 @@ function parseFromHighEntropyValues() {
|
|
|
298
298
|
}
|
|
299
299
|
ready = parseFromHighEntropyValues();
|
|
300
300
|
var PlatformKit = {
|
|
301
|
-
version: packageJSON.version,
|
|
301
|
+
version: packageJSON$1.version,
|
|
302
302
|
get ready() {
|
|
303
303
|
return ready;
|
|
304
304
|
},
|
|
@@ -369,6 +369,665 @@ var PlatformKit = {
|
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
+
var version = "0.0.1";
|
|
373
|
+
var packageJSON = {
|
|
374
|
+
version: version};
|
|
375
|
+
|
|
376
|
+
var VENDORS = ['', 'webkit', 'moz', 'ms', 'MS', 'o', 'O'];
|
|
377
|
+
// https://cordova.apache.org/docs/en/latest/cordova/events/events.html
|
|
378
|
+
var CORDOVA_DOCUMENT_EVENTS = ['deviceready', 'pause', 'resume', 'backbutton', 'menubutton', 'searchbutton', 'startcallbutton', 'endcallbutton', 'volumedownbutton', 'volumeupbutton', 'activated', 'cordovacallbackerror'];
|
|
379
|
+
// iOS `<video>` fullscreen events have no `on` attribute but are valid on any element exposing `webkitEnterFullscreen` — they must pass through untouched.
|
|
380
|
+
var IOS_VIDEO_FULLSCREEN_EVENTS = ['webkitbeginfullscreen', 'webkitendfullscreen', 'webkitpresentationmodechanged'];
|
|
381
|
+
var TYPE_ALIAS_MAP = {
|
|
382
|
+
'focus': ['focus', 'focusin'],
|
|
383
|
+
'blur': ['blur', 'focusout'],
|
|
384
|
+
'wheel': ['wheel', 'mousewheel', 'DOMMouseScroll'],
|
|
385
|
+
'fullscreenchange': ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange', 'msfullscreenchange'],
|
|
386
|
+
'fullscreenerror': ['fullscreenerror', 'webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError', 'msfullscreenerror'],
|
|
387
|
+
'pointerdown': ['pointerdown', 'MSPointerDown'],
|
|
388
|
+
'pointermove': ['pointermove', 'MSPointerMove'],
|
|
389
|
+
'pointerup': ['pointerup', 'MSPointerUp'],
|
|
390
|
+
'pointercancel': ['pointercancel', 'MSPointerCancel'],
|
|
391
|
+
'pointerover': ['pointerover', 'MSPointerOver'],
|
|
392
|
+
'pointerout': ['pointerout', 'MSPointerOut'],
|
|
393
|
+
'pointerenter': ['pointerenter', 'MSPointerEnter', 'mouseenter'],
|
|
394
|
+
'pointerleave': ['pointerleave', 'MSPointerLeave', 'mouseleave'],
|
|
395
|
+
'gotpointercapture': ['gotpointercapture', 'MSGotPointerCapture'],
|
|
396
|
+
'lostpointercapture': ['lostpointercapture', 'MSLostPointerCapture'],
|
|
397
|
+
'pointerlockchange': ['pointerlockchange', 'webkitpointerlockchange', 'mozpointerlockchange', 'mspointerlockchange'],
|
|
398
|
+
'pointerlockerror': ['pointerlockerror', 'webkitpointerlockerror', 'mozpointerlockerror', 'mspointerlockerror'],
|
|
399
|
+
'touchstart': ['touchstart', 'pointerdown', 'MSPointerDown'],
|
|
400
|
+
'touchmove': ['touchmove', 'pointermove', 'MSPointerMove'],
|
|
401
|
+
'touchend': ['touchend', 'pointerup', 'MSPointerUp'],
|
|
402
|
+
'touchcancel': ['touchcancel', 'pointercancel', 'MSPointerCancel'],
|
|
403
|
+
'transitionrun': ['transitionrun', 'webkitTransitionRun'],
|
|
404
|
+
'transitionstart': ['transitionstart', 'webkitTransitionStart'],
|
|
405
|
+
'transitionend': ['transitionend', 'webkitTransitionEnd', 'oTransitionEnd', 'otransitionend', 'MSTransitionEnd'],
|
|
406
|
+
'animationstart': ['animationstart', 'webkitAnimationStart', 'oanimationstart', 'MSAnimationStart'],
|
|
407
|
+
'animationiteration': ['animationiteration', 'webkitAnimationIteration', 'oanimationiteration', 'MSAnimationIteration'],
|
|
408
|
+
'animationend': ['animationend', 'webkitAnimationEnd', 'oanimationend', 'MSAnimationEnd'],
|
|
409
|
+
'visibilitychange': ['visibilitychange', 'webkitvisibilitychange', 'mozvisibilitychange', 'msvisibilitychange'],
|
|
410
|
+
};
|
|
411
|
+
var FULLSCREEN_REQUEST_MAP = {
|
|
412
|
+
'': ['requestFullscreen'],
|
|
413
|
+
'webkit': ['webkitRequestFullscreen', 'webkitRequestFullScreen'],
|
|
414
|
+
'moz': ['mozRequestFullScreen', 'mozRequestFullscreen'],
|
|
415
|
+
'ms': ['msRequestFullscreen'],
|
|
416
|
+
'MS': ['msRequestFullscreen'],
|
|
417
|
+
};
|
|
418
|
+
function asRecord(value) {
|
|
419
|
+
return value;
|
|
420
|
+
}
|
|
421
|
+
function hasOnProperty(host, name) {
|
|
422
|
+
if (typeof host === 'undefined' || host === null)
|
|
423
|
+
return false;
|
|
424
|
+
if (typeof asRecord(host)['on' + name] !== 'undefined')
|
|
425
|
+
return true;
|
|
426
|
+
var lower = name.toLowerCase();
|
|
427
|
+
return lower !== name && typeof asRecord(host)['on' + lower] !== 'undefined';
|
|
428
|
+
}
|
|
429
|
+
function probeHosts(target) {
|
|
430
|
+
var hosts = [target];
|
|
431
|
+
if (typeof globalThis.document !== 'undefined' && target !== globalThis.document)
|
|
432
|
+
hosts.push(globalThis.document);
|
|
433
|
+
if (target !== globalThis)
|
|
434
|
+
hosts.push(globalThis);
|
|
435
|
+
return hosts;
|
|
436
|
+
}
|
|
437
|
+
function extractVendorPrefix(name) {
|
|
438
|
+
for (var i = 1; i < VENDORS.length; i++) {
|
|
439
|
+
if (name.indexOf(VENDORS[i]) === 0)
|
|
440
|
+
return VENDORS[i];
|
|
441
|
+
}
|
|
442
|
+
return '';
|
|
443
|
+
}
|
|
444
|
+
function testStyleSupport(name, styleProperty) {
|
|
445
|
+
if (typeof globalThis.document === 'undefined' || typeof globalThis.document.documentElement === 'undefined')
|
|
446
|
+
return false;
|
|
447
|
+
var style = globalThis.document.documentElement.style;
|
|
448
|
+
if (typeof style === 'undefined' || style === null)
|
|
449
|
+
return false;
|
|
450
|
+
var prefix = extractVendorPrefix(name);
|
|
451
|
+
var property;
|
|
452
|
+
if (prefix === '')
|
|
453
|
+
property = styleProperty;
|
|
454
|
+
else
|
|
455
|
+
property = prefix + styleProperty.charAt(0).toUpperCase() + styleProperty.slice(1);
|
|
456
|
+
return typeof asRecord(style)[property] !== 'undefined';
|
|
457
|
+
}
|
|
458
|
+
function testFullscreenSupport(name) {
|
|
459
|
+
if (typeof globalThis.document === 'undefined' || typeof globalThis.document.documentElement === 'undefined')
|
|
460
|
+
return false;
|
|
461
|
+
var element = globalThis.document.documentElement;
|
|
462
|
+
var methods = FULLSCREEN_REQUEST_MAP[extractVendorPrefix(name)];
|
|
463
|
+
if (typeof methods === 'undefined')
|
|
464
|
+
return false;
|
|
465
|
+
for (var i = 0; i < methods.length; i++) {
|
|
466
|
+
if (typeof asRecord(element)[methods[i]] === 'function')
|
|
467
|
+
return true;
|
|
468
|
+
}
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
function isEventTypeSupported(target, name) {
|
|
472
|
+
var hosts = probeHosts(target);
|
|
473
|
+
for (var i = 0; i < hosts.length; i++) {
|
|
474
|
+
if (hasOnProperty(hosts[i], name))
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
477
|
+
var lower = name.toLowerCase();
|
|
478
|
+
if (lower.indexOf('transition') > -1)
|
|
479
|
+
return testStyleSupport(name, 'transition');
|
|
480
|
+
if (lower.indexOf('animation') > -1)
|
|
481
|
+
return testStyleSupport(name, 'animation');
|
|
482
|
+
if (lower.indexOf('fullscreen') > -1)
|
|
483
|
+
return testFullscreenSupport(name);
|
|
484
|
+
return false;
|
|
485
|
+
}
|
|
486
|
+
function resolveEventType(target, type) {
|
|
487
|
+
if (target === globalThis.document && CORDOVA_DOCUMENT_EVENTS.indexOf(type) > -1)
|
|
488
|
+
return type;
|
|
489
|
+
if (typeof asRecord(target)['webkitEnterFullscreen'] === 'function' && IOS_VIDEO_FULLSCREEN_EVENTS.indexOf(type) > -1)
|
|
490
|
+
return type;
|
|
491
|
+
var candidates = typeof TYPE_ALIAS_MAP[type] !== 'undefined' ? TYPE_ALIAS_MAP[type] : [type];
|
|
492
|
+
for (var i = 0; i < candidates.length; i++) {
|
|
493
|
+
if (isEventTypeSupported(target, candidates[i]))
|
|
494
|
+
return candidates[i];
|
|
495
|
+
}
|
|
496
|
+
for (var i = 1; i < VENDORS.length; i++) {
|
|
497
|
+
for (var j = 0; j < candidates.length; j++) {
|
|
498
|
+
var name_1 = VENDORS[i] + candidates[j];
|
|
499
|
+
var hosts = probeHosts(target);
|
|
500
|
+
for (var k = 0; k < hosts.length; k++) {
|
|
501
|
+
if (hasOnProperty(hosts[k], name_1))
|
|
502
|
+
return name_1;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return type;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
var SUPPORTED = {
|
|
510
|
+
once: false,
|
|
511
|
+
passive: false,
|
|
512
|
+
capture: false,
|
|
513
|
+
some: false,
|
|
514
|
+
all: false,
|
|
515
|
+
};
|
|
516
|
+
var NOOP$1 = function () {
|
|
517
|
+
};
|
|
518
|
+
function resolveProbeTarget() {
|
|
519
|
+
if (typeof globalThis.document !== 'undefined' && typeof globalThis.document.createDocumentFragment === 'function') {
|
|
520
|
+
try {
|
|
521
|
+
return globalThis.document.createDocumentFragment();
|
|
522
|
+
}
|
|
523
|
+
catch (_) {
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
if (typeof globalThis.EventTarget === 'function') {
|
|
527
|
+
try {
|
|
528
|
+
return new globalThis.EventTarget();
|
|
529
|
+
}
|
|
530
|
+
catch (_) {
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return undefined;
|
|
534
|
+
}
|
|
535
|
+
(function detectSupportedListenerOptions() {
|
|
536
|
+
var probe = resolveProbeTarget();
|
|
537
|
+
if (typeof probe === 'undefined' || typeof probe.addEventListener !== 'function')
|
|
538
|
+
return;
|
|
539
|
+
var options = {};
|
|
540
|
+
try {
|
|
541
|
+
Object.defineProperty(options, 'once', {
|
|
542
|
+
get: function () {
|
|
543
|
+
SUPPORTED.once = true;
|
|
544
|
+
return false;
|
|
545
|
+
},
|
|
546
|
+
});
|
|
547
|
+
Object.defineProperty(options, 'passive', {
|
|
548
|
+
get: function () {
|
|
549
|
+
SUPPORTED.passive = true;
|
|
550
|
+
return false;
|
|
551
|
+
},
|
|
552
|
+
});
|
|
553
|
+
Object.defineProperty(options, 'capture', {
|
|
554
|
+
get: function () {
|
|
555
|
+
SUPPORTED.capture = true;
|
|
556
|
+
return false;
|
|
557
|
+
},
|
|
558
|
+
});
|
|
559
|
+
probe.addEventListener('test', NOOP$1, options);
|
|
560
|
+
probe.removeEventListener('test', NOOP$1, options);
|
|
561
|
+
}
|
|
562
|
+
catch (_) {
|
|
563
|
+
}
|
|
564
|
+
SUPPORTED.some = SUPPORTED.once || SUPPORTED.passive || SUPPORTED.capture;
|
|
565
|
+
SUPPORTED.all = SUPPORTED.once && SUPPORTED.passive && SUPPORTED.capture;
|
|
566
|
+
})();
|
|
567
|
+
var SUPPORTED_LISTENER_OPTIONS = SUPPORTED;
|
|
568
|
+
function normalizeListenerOptions(options) {
|
|
569
|
+
if (typeof options === 'boolean')
|
|
570
|
+
return { capture: options, once: false, passive: false, signal: undefined };
|
|
571
|
+
if (typeof options === 'object' && options !== null) {
|
|
572
|
+
return {
|
|
573
|
+
capture: options.capture === true,
|
|
574
|
+
once: options.once === true,
|
|
575
|
+
passive: options.passive === true,
|
|
576
|
+
signal: options.signal,
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
return {
|
|
580
|
+
capture: Boolean(options),
|
|
581
|
+
once: false,
|
|
582
|
+
passive: false,
|
|
583
|
+
signal: undefined
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
function toNativeListenerOptions(normalized) {
|
|
587
|
+
if (SUPPORTED.passive)
|
|
588
|
+
return {
|
|
589
|
+
capture: normalized.capture,
|
|
590
|
+
passive: normalized.passive
|
|
591
|
+
};
|
|
592
|
+
if (SUPPORTED.capture)
|
|
593
|
+
return {
|
|
594
|
+
capture: normalized.capture
|
|
595
|
+
};
|
|
596
|
+
return normalized.capture;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
var TOUCH_TYPES = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];
|
|
600
|
+
var POINTER_PHASE_MAP = {
|
|
601
|
+
'pointerdown': 'start',
|
|
602
|
+
'MSPointerDown': 'start',
|
|
603
|
+
'pointermove': 'move',
|
|
604
|
+
'MSPointerMove': 'move',
|
|
605
|
+
'pointerup': 'end',
|
|
606
|
+
'MSPointerUp': 'end',
|
|
607
|
+
'pointercancel': 'cancel',
|
|
608
|
+
'MSPointerCancel': 'cancel',
|
|
609
|
+
};
|
|
610
|
+
var ACTIVE_TOUCHES = [];
|
|
611
|
+
function isTouchEventType(type) {
|
|
612
|
+
return TOUCH_TYPES.indexOf(type) > -1;
|
|
613
|
+
}
|
|
614
|
+
function isPointerEventType(type) {
|
|
615
|
+
return typeof POINTER_PHASE_MAP[type] !== 'undefined';
|
|
616
|
+
}
|
|
617
|
+
function createTouchList(touches) {
|
|
618
|
+
var list = touches.slice();
|
|
619
|
+
list.item = function (index) {
|
|
620
|
+
if (index >= 0 && index < list.length)
|
|
621
|
+
return list[index];
|
|
622
|
+
return null;
|
|
623
|
+
};
|
|
624
|
+
return list;
|
|
625
|
+
}
|
|
626
|
+
function findTouchIndex(identifier) {
|
|
627
|
+
for (var i = 0; i < ACTIVE_TOUCHES.length; i++) {
|
|
628
|
+
if (ACTIVE_TOUCHES[i].identifier === identifier)
|
|
629
|
+
return i;
|
|
630
|
+
}
|
|
631
|
+
return -1;
|
|
632
|
+
}
|
|
633
|
+
function scrollOffsetX() {
|
|
634
|
+
if (typeof globalThis.pageXOffset === 'number')
|
|
635
|
+
return globalThis.pageXOffset;
|
|
636
|
+
if (typeof globalThis.document !== 'undefined' && typeof globalThis.document.documentElement !== 'undefined')
|
|
637
|
+
return globalThis.document.documentElement.scrollLeft;
|
|
638
|
+
return 0;
|
|
639
|
+
}
|
|
640
|
+
function scrollOffsetY() {
|
|
641
|
+
if (typeof globalThis.pageYOffset === 'number')
|
|
642
|
+
return globalThis.pageYOffset;
|
|
643
|
+
if (typeof globalThis.document !== 'undefined' && typeof globalThis.document.documentElement !== 'undefined')
|
|
644
|
+
return globalThis.document.documentElement.scrollTop;
|
|
645
|
+
return 0;
|
|
646
|
+
}
|
|
647
|
+
function createSyntheticTouch(event, target) {
|
|
648
|
+
var clientX = typeof event.clientX === 'number' ? event.clientX : 0;
|
|
649
|
+
var clientY = typeof event.clientY === 'number' ? event.clientY : 0;
|
|
650
|
+
return {
|
|
651
|
+
identifier: typeof event.pointerId === 'number' ? event.pointerId : 0,
|
|
652
|
+
target: target,
|
|
653
|
+
screenX: typeof event.screenX === 'number' ? event.screenX : 0,
|
|
654
|
+
screenY: typeof event.screenY === 'number' ? event.screenY : 0,
|
|
655
|
+
clientX: clientX,
|
|
656
|
+
clientY: clientY,
|
|
657
|
+
pageX: typeof event.pageX === 'number' ? event.pageX : clientX + scrollOffsetX(),
|
|
658
|
+
pageY: typeof event.pageY === 'number' ? event.pageY : clientY + scrollOffsetY(),
|
|
659
|
+
radiusX: typeof event.width === 'number' ? event.width / 2 : 0,
|
|
660
|
+
radiusY: typeof event.height === 'number' ? event.height / 2 : 0,
|
|
661
|
+
rotationAngle: typeof event.rotation === 'number' ? event.rotation : 0,
|
|
662
|
+
force: typeof event.pressure === 'number' ? event.pressure : 0,
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
function defineTouchList(event, property, list) {
|
|
666
|
+
try {
|
|
667
|
+
Object.defineProperty(event, property, { value: list, configurable: true });
|
|
668
|
+
}
|
|
669
|
+
catch (_) {
|
|
670
|
+
event[property] = list;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
function filterByTarget(touches, target) {
|
|
674
|
+
var filtered = [];
|
|
675
|
+
for (var i = 0; i < touches.length; i++) {
|
|
676
|
+
if (touches[i].target === target)
|
|
677
|
+
filtered.push(touches[i]);
|
|
678
|
+
}
|
|
679
|
+
return filtered;
|
|
680
|
+
}
|
|
681
|
+
function synthesizeTouchEvent(event, resolvedType) {
|
|
682
|
+
var phase = POINTER_PHASE_MAP[resolvedType];
|
|
683
|
+
if (typeof phase === 'undefined')
|
|
684
|
+
return;
|
|
685
|
+
var pointerEvent = event;
|
|
686
|
+
var eventTarget = event.target;
|
|
687
|
+
var index = findTouchIndex(typeof pointerEvent.pointerId === 'number' ? pointerEvent.pointerId : 0);
|
|
688
|
+
var originTarget = index > -1 ? ACTIVE_TOUCHES[index].target : eventTarget;
|
|
689
|
+
var touch = createSyntheticTouch(pointerEvent, originTarget);
|
|
690
|
+
if (phase === 'start' || phase === 'move') {
|
|
691
|
+
if (index > -1)
|
|
692
|
+
ACTIVE_TOUCHES[index] = touch;
|
|
693
|
+
else
|
|
694
|
+
ACTIVE_TOUCHES.push(touch);
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
697
|
+
if (index > -1)
|
|
698
|
+
ACTIVE_TOUCHES.splice(index, 1);
|
|
699
|
+
}
|
|
700
|
+
defineTouchList(event, 'touches', createTouchList(ACTIVE_TOUCHES));
|
|
701
|
+
defineTouchList(event, 'targetTouches', createTouchList(filterByTarget(ACTIVE_TOUCHES, originTarget)));
|
|
702
|
+
defineTouchList(event, 'changedTouches', createTouchList([touch]));
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
var KEY_CODE_MAP = {
|
|
706
|
+
8: 'Backspace',
|
|
707
|
+
9: 'Tab',
|
|
708
|
+
12: 'Numpad5',
|
|
709
|
+
13: 'Enter',
|
|
710
|
+
16: 'ShiftLeft',
|
|
711
|
+
17: 'ControlLeft',
|
|
712
|
+
18: 'AltLeft',
|
|
713
|
+
19: 'Pause',
|
|
714
|
+
20: 'CapsLock',
|
|
715
|
+
27: 'Escape',
|
|
716
|
+
32: 'Space',
|
|
717
|
+
33: 'PageUp',
|
|
718
|
+
34: 'PageDown',
|
|
719
|
+
35: 'End',
|
|
720
|
+
36: 'Home',
|
|
721
|
+
37: 'ArrowLeft',
|
|
722
|
+
38: 'ArrowUp',
|
|
723
|
+
39: 'ArrowRight',
|
|
724
|
+
40: 'ArrowDown',
|
|
725
|
+
45: 'Insert',
|
|
726
|
+
46: 'Delete',
|
|
727
|
+
48: 'Digit0',
|
|
728
|
+
49: 'Digit1',
|
|
729
|
+
50: 'Digit2',
|
|
730
|
+
51: 'Digit3',
|
|
731
|
+
52: 'Digit4',
|
|
732
|
+
53: 'Digit5',
|
|
733
|
+
54: 'Digit6',
|
|
734
|
+
55: 'Digit7',
|
|
735
|
+
56: 'Digit8',
|
|
736
|
+
57: 'Digit9',
|
|
737
|
+
65: 'KeyA',
|
|
738
|
+
66: 'KeyB',
|
|
739
|
+
67: 'KeyC',
|
|
740
|
+
68: 'KeyD',
|
|
741
|
+
69: 'KeyE',
|
|
742
|
+
70: 'KeyF',
|
|
743
|
+
71: 'KeyG',
|
|
744
|
+
72: 'KeyH',
|
|
745
|
+
73: 'KeyI',
|
|
746
|
+
74: 'KeyJ',
|
|
747
|
+
75: 'KeyK',
|
|
748
|
+
76: 'KeyL',
|
|
749
|
+
77: 'KeyM',
|
|
750
|
+
78: 'KeyN',
|
|
751
|
+
79: 'KeyO',
|
|
752
|
+
80: 'KeyP',
|
|
753
|
+
81: 'KeyQ',
|
|
754
|
+
82: 'KeyR',
|
|
755
|
+
83: 'KeyS',
|
|
756
|
+
84: 'KeyT',
|
|
757
|
+
85: 'KeyU',
|
|
758
|
+
86: 'KeyV',
|
|
759
|
+
87: 'KeyW',
|
|
760
|
+
88: 'KeyX',
|
|
761
|
+
89: 'KeyY',
|
|
762
|
+
90: 'KeyZ',
|
|
763
|
+
91: 'MetaLeft',
|
|
764
|
+
92: 'MetaRight',
|
|
765
|
+
93: 'ContextMenu',
|
|
766
|
+
96: 'Numpad0',
|
|
767
|
+
97: 'Numpad1',
|
|
768
|
+
98: 'Numpad2',
|
|
769
|
+
99: 'Numpad3',
|
|
770
|
+
100: 'Numpad4',
|
|
771
|
+
101: 'Numpad5',
|
|
772
|
+
102: 'Numpad6',
|
|
773
|
+
103: 'Numpad7',
|
|
774
|
+
104: 'Numpad8',
|
|
775
|
+
105: 'Numpad9',
|
|
776
|
+
106: 'NumpadMultiply',
|
|
777
|
+
107: 'NumpadAdd',
|
|
778
|
+
109: 'NumpadSubtract',
|
|
779
|
+
110: 'NumpadDecimal',
|
|
780
|
+
111: 'NumpadDivide',
|
|
781
|
+
112: 'F1',
|
|
782
|
+
113: 'F2',
|
|
783
|
+
114: 'F3',
|
|
784
|
+
115: 'F4',
|
|
785
|
+
116: 'F5',
|
|
786
|
+
117: 'F6',
|
|
787
|
+
118: 'F7',
|
|
788
|
+
119: 'F8',
|
|
789
|
+
120: 'F9',
|
|
790
|
+
121: 'F10',
|
|
791
|
+
122: 'F11',
|
|
792
|
+
123: 'F12',
|
|
793
|
+
144: 'NumLock',
|
|
794
|
+
145: 'ScrollLock',
|
|
795
|
+
186: 'Semicolon',
|
|
796
|
+
187: 'Equal',
|
|
797
|
+
188: 'Comma',
|
|
798
|
+
189: 'Minus',
|
|
799
|
+
190: 'Period',
|
|
800
|
+
191: 'Slash',
|
|
801
|
+
192: 'Backquote',
|
|
802
|
+
219: 'BracketLeft',
|
|
803
|
+
220: 'Backslash',
|
|
804
|
+
221: 'BracketRight',
|
|
805
|
+
222: 'Quote',
|
|
806
|
+
226: 'IntlBackslash',
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
var LISTENER_STORE = [];
|
|
810
|
+
var NOOP = function () {
|
|
811
|
+
};
|
|
812
|
+
function findListenerRecord(target, type, callback, capture) {
|
|
813
|
+
for (var i = 0; i < LISTENER_STORE.length; i++) {
|
|
814
|
+
var record = LISTENER_STORE[i];
|
|
815
|
+
if (record.target === target && record.type === type && record.callback === callback && record.capture === capture)
|
|
816
|
+
return record;
|
|
817
|
+
}
|
|
818
|
+
return undefined;
|
|
819
|
+
}
|
|
820
|
+
function removeListenerRecord(record) {
|
|
821
|
+
for (var i = 0; i < LISTENER_STORE.length; i++) {
|
|
822
|
+
if (LISTENER_STORE[i] === record) {
|
|
823
|
+
LISTENER_STORE.splice(i, 1);
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
function preventDefaultPolyfill() {
|
|
829
|
+
this.returnValue = false;
|
|
830
|
+
}
|
|
831
|
+
function stopPropagationPolyfill() {
|
|
832
|
+
this.cancelBubble = true;
|
|
833
|
+
}
|
|
834
|
+
function passivePreventDefault() {
|
|
835
|
+
// Per spec, preventDefault() inside a passive listener does nothing.
|
|
836
|
+
}
|
|
837
|
+
function invokeCallback(callback, target, event) {
|
|
838
|
+
if (typeof callback === 'function')
|
|
839
|
+
return callback.call(target, event);
|
|
840
|
+
if (typeof callback === 'object' && callback !== null && typeof callback.handleEvent === 'function')
|
|
841
|
+
return callback.handleEvent(event);
|
|
842
|
+
}
|
|
843
|
+
function defineEventProperty(event, property, value) {
|
|
844
|
+
try {
|
|
845
|
+
Object.defineProperty(event, property, { value: value, configurable: true });
|
|
846
|
+
}
|
|
847
|
+
catch (_) {
|
|
848
|
+
try {
|
|
849
|
+
event[property] = value;
|
|
850
|
+
}
|
|
851
|
+
catch (__) {
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
function fixLegacyEvent(event, target) {
|
|
856
|
+
if (typeof event.currentTarget === 'undefined' || event.currentTarget === null)
|
|
857
|
+
defineEventProperty(event, 'currentTarget', target);
|
|
858
|
+
if ((typeof event.target === 'undefined' || event.target === null) && typeof event.srcElement !== 'undefined')
|
|
859
|
+
defineEventProperty(event, 'target', event.srcElement);
|
|
860
|
+
if (typeof event.preventDefault !== 'function')
|
|
861
|
+
event.preventDefault = preventDefaultPolyfill.bind(event);
|
|
862
|
+
if (typeof event.stopPropagation !== 'function')
|
|
863
|
+
event.stopPropagation = stopPropagationPolyfill.bind(event);
|
|
864
|
+
}
|
|
865
|
+
function fixKeyboardEvent(event) {
|
|
866
|
+
if (typeof event.keyCode === 'number' && typeof event.code === 'undefined') {
|
|
867
|
+
var code = KEY_CODE_MAP[event.keyCode];
|
|
868
|
+
if (typeof code === 'string')
|
|
869
|
+
defineEventProperty(event, 'code', code);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
function createDispatcher(record) {
|
|
873
|
+
return function (event) {
|
|
874
|
+
if (typeof event === 'undefined')
|
|
875
|
+
event = globalThis.event; // IE: implicit global event object
|
|
876
|
+
if (typeof event === 'undefined' || event === null)
|
|
877
|
+
return;
|
|
878
|
+
if (record.released)
|
|
879
|
+
return;
|
|
880
|
+
fixLegacyEvent(event, record.target);
|
|
881
|
+
if (record.once)
|
|
882
|
+
releaseListenerRecord(record);
|
|
883
|
+
if (record.passive && !SUPPORTED_LISTENER_OPTIONS.passive)
|
|
884
|
+
event.preventDefault = passivePreventDefault.bind(event);
|
|
885
|
+
if (record.resolvedType !== record.type)
|
|
886
|
+
defineEventProperty(event, 'type', record.type);
|
|
887
|
+
if (record.touch)
|
|
888
|
+
synthesizeTouchEvent(event, record.resolvedType);
|
|
889
|
+
fixKeyboardEvent(event);
|
|
890
|
+
invokeCallback(record.callback, record.target, event);
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
function attachNativeListener(record) {
|
|
894
|
+
var target = record.target;
|
|
895
|
+
if (typeof target.addEventListener === 'function') {
|
|
896
|
+
target.addEventListener(record.resolvedType, record.wrapper, toNativeListenerOptions(record));
|
|
897
|
+
return true;
|
|
898
|
+
}
|
|
899
|
+
if (typeof target.attachEvent === 'function') {
|
|
900
|
+
target.attachEvent('on' + record.resolvedType, record.wrapper);
|
|
901
|
+
return true;
|
|
902
|
+
}
|
|
903
|
+
return false;
|
|
904
|
+
}
|
|
905
|
+
function detachNativeListener(record) {
|
|
906
|
+
var target = record.target;
|
|
907
|
+
if (typeof target.removeEventListener === 'function')
|
|
908
|
+
return target.removeEventListener(record.resolvedType, record.wrapper, toNativeListenerOptions(record));
|
|
909
|
+
if (typeof target.detachEvent === 'function')
|
|
910
|
+
return target.detachEvent('on' + record.resolvedType, record.wrapper);
|
|
911
|
+
}
|
|
912
|
+
function releaseListenerRecord(record) {
|
|
913
|
+
if (record.released)
|
|
914
|
+
return;
|
|
915
|
+
record.released = true;
|
|
916
|
+
removeListenerRecord(record);
|
|
917
|
+
try {
|
|
918
|
+
detachNativeListener(record);
|
|
919
|
+
}
|
|
920
|
+
catch (_) {
|
|
921
|
+
}
|
|
922
|
+
if (typeof record.signal !== 'undefined' && typeof record.onAbort === 'function' && typeof record.signal.removeEventListener === 'function') {
|
|
923
|
+
try {
|
|
924
|
+
record.signal.removeEventListener('abort', record.onAbort);
|
|
925
|
+
}
|
|
926
|
+
catch (_) {
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
record.onAbort = undefined;
|
|
930
|
+
}
|
|
931
|
+
function createEventPolyfill(type, init) {
|
|
932
|
+
try {
|
|
933
|
+
return new Event(type, init);
|
|
934
|
+
}
|
|
935
|
+
catch (_) {
|
|
936
|
+
}
|
|
937
|
+
var event = globalThis.document.createEvent('Event');
|
|
938
|
+
event.initEvent(type, typeof init !== 'undefined' && init.bubbles === true, typeof init !== 'undefined' && init.cancelable === true);
|
|
939
|
+
return event;
|
|
940
|
+
}
|
|
941
|
+
function createCustomEventPolyfill(type, init) {
|
|
942
|
+
try {
|
|
943
|
+
return new CustomEvent(type, init);
|
|
944
|
+
}
|
|
945
|
+
catch (_) {
|
|
946
|
+
}
|
|
947
|
+
var event = globalThis.document.createEvent('CustomEvent');
|
|
948
|
+
event.initCustomEvent(type, typeof init !== 'undefined' && init.bubbles === true, typeof init !== 'undefined' && init.cancelable === true, typeof init !== 'undefined' && typeof init.detail !== 'undefined' ? init.detail : null);
|
|
949
|
+
return event;
|
|
950
|
+
}
|
|
951
|
+
var EventKit = {
|
|
952
|
+
version: packageJSON.version,
|
|
953
|
+
utils: {
|
|
954
|
+
get supportedOptions() {
|
|
955
|
+
return {
|
|
956
|
+
once: SUPPORTED_LISTENER_OPTIONS.once,
|
|
957
|
+
passive: SUPPORTED_LISTENER_OPTIONS.passive,
|
|
958
|
+
capture: SUPPORTED_LISTENER_OPTIONS.capture,
|
|
959
|
+
some: SUPPORTED_LISTENER_OPTIONS.some,
|
|
960
|
+
all: SUPPORTED_LISTENER_OPTIONS.all,
|
|
961
|
+
};
|
|
962
|
+
},
|
|
963
|
+
resolveType: resolveEventType,
|
|
964
|
+
createEvent: createEventPolyfill,
|
|
965
|
+
createCustomEvent: createCustomEventPolyfill,
|
|
966
|
+
},
|
|
967
|
+
add: function (target, type, callback, options) {
|
|
968
|
+
if (typeof target === 'undefined' || target === null)
|
|
969
|
+
return NOOP;
|
|
970
|
+
if (typeof type !== 'string' || type.length === 0)
|
|
971
|
+
return NOOP;
|
|
972
|
+
if (typeof callback !== 'function' && (typeof callback !== 'object' || callback === null))
|
|
973
|
+
return NOOP;
|
|
974
|
+
var normalized = normalizeListenerOptions(options);
|
|
975
|
+
var existing = findListenerRecord(target, type, callback, normalized.capture);
|
|
976
|
+
if (typeof existing !== 'undefined') {
|
|
977
|
+
return function () {
|
|
978
|
+
releaseListenerRecord(existing);
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
if (typeof normalized.signal !== 'undefined' && normalized.signal.aborted)
|
|
982
|
+
return NOOP;
|
|
983
|
+
var resolvedType = resolveEventType(target, type);
|
|
984
|
+
var record = {
|
|
985
|
+
target: target,
|
|
986
|
+
type: type,
|
|
987
|
+
callback: callback,
|
|
988
|
+
wrapper: NOOP,
|
|
989
|
+
resolvedType: resolvedType,
|
|
990
|
+
capture: normalized.capture,
|
|
991
|
+
once: normalized.once,
|
|
992
|
+
passive: normalized.passive,
|
|
993
|
+
signal: normalized.signal,
|
|
994
|
+
onAbort: undefined,
|
|
995
|
+
touch: isTouchEventType(type) && isPointerEventType(resolvedType),
|
|
996
|
+
released: false,
|
|
997
|
+
};
|
|
998
|
+
record.wrapper = createDispatcher(record);
|
|
999
|
+
if (!attachNativeListener(record))
|
|
1000
|
+
return NOOP;
|
|
1001
|
+
LISTENER_STORE.push(record);
|
|
1002
|
+
if (typeof record.signal !== 'undefined' && typeof record.signal.addEventListener === 'function') {
|
|
1003
|
+
record.onAbort = function () {
|
|
1004
|
+
releaseListenerRecord(record);
|
|
1005
|
+
};
|
|
1006
|
+
record.signal.addEventListener('abort', record.onAbort, { once: true });
|
|
1007
|
+
}
|
|
1008
|
+
return function () {
|
|
1009
|
+
releaseListenerRecord(record);
|
|
1010
|
+
};
|
|
1011
|
+
},
|
|
1012
|
+
remove: function (target, type, callback, options) {
|
|
1013
|
+
if (typeof target === 'undefined' || target === null)
|
|
1014
|
+
return;
|
|
1015
|
+
if (typeof type !== 'string' || type.length === 0)
|
|
1016
|
+
return;
|
|
1017
|
+
if (typeof callback !== 'function' && (typeof callback !== 'object' || callback === null))
|
|
1018
|
+
return;
|
|
1019
|
+
var normalized = normalizeListenerOptions(options);
|
|
1020
|
+
var record = findListenerRecord(target, type, callback, normalized.capture);
|
|
1021
|
+
if (typeof record !== 'undefined')
|
|
1022
|
+
return releaseListenerRecord(record);
|
|
1023
|
+
var resolvedType = resolveEventType(target, type);
|
|
1024
|
+
if (typeof target.removeEventListener === 'function')
|
|
1025
|
+
return target.removeEventListener(resolvedType, callback, toNativeListenerOptions(normalized));
|
|
1026
|
+
if (typeof target.detachEvent === 'function' && typeof callback === 'function')
|
|
1027
|
+
return target.detachEvent('on' + resolvedType, callback);
|
|
1028
|
+
},
|
|
1029
|
+
};
|
|
1030
|
+
|
|
372
1031
|
function createHiddenElement(tagName, focusable) {
|
|
373
1032
|
if (focusable === void 0) { focusable = true; }
|
|
374
1033
|
var element = globalThis.document.createElement(tagName);
|
|
@@ -778,101 +1437,6 @@ function getTopmostWindow() {
|
|
|
778
1437
|
return globalThis;
|
|
779
1438
|
}
|
|
780
1439
|
|
|
781
|
-
var IE_WRAPPER_STORE = [];
|
|
782
|
-
var VENDORS = ['', 'webkit', 'moz', 'ms', 'MS', 'o', 'O'];
|
|
783
|
-
var LEGACY_TYPE_MAP = {
|
|
784
|
-
'focus': ['focus', 'focusin'],
|
|
785
|
-
'blur': ['blur', 'focusout'],
|
|
786
|
-
};
|
|
787
|
-
function resolveVendor(target, type) {
|
|
788
|
-
var types;
|
|
789
|
-
var legacy = LEGACY_TYPE_MAP[type];
|
|
790
|
-
if (typeof legacy !== 'undefined')
|
|
791
|
-
types = legacy;
|
|
792
|
-
else
|
|
793
|
-
types = [type];
|
|
794
|
-
for (var i = 0; i < VENDORS.length; i++) {
|
|
795
|
-
for (var j = 0; j < types.length; j++) {
|
|
796
|
-
var name_1 = VENDORS[i] + types[j];
|
|
797
|
-
if (typeof target['on' + name_1] !== 'undefined')
|
|
798
|
-
return name_1;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
return type;
|
|
802
|
-
}
|
|
803
|
-
function findIEWrapper(target, type, callback) {
|
|
804
|
-
for (var i = 0; i < IE_WRAPPER_STORE.length; i++) {
|
|
805
|
-
var wrapper = IE_WRAPPER_STORE[i];
|
|
806
|
-
if (wrapper.target === target && wrapper.type === type && wrapper.callback === callback)
|
|
807
|
-
return wrapper.wrapper;
|
|
808
|
-
}
|
|
809
|
-
return undefined;
|
|
810
|
-
}
|
|
811
|
-
function setIEWrapper(target, type, callback, wrapper) {
|
|
812
|
-
IE_WRAPPER_STORE.push({ target: target, type: type, callback: callback, wrapper: wrapper });
|
|
813
|
-
}
|
|
814
|
-
function removeIEWrapper(target, type, callback) {
|
|
815
|
-
for (var i = 0; i < IE_WRAPPER_STORE.length; i++) {
|
|
816
|
-
var wrapper = IE_WRAPPER_STORE[i];
|
|
817
|
-
if (wrapper.target === target && wrapper.type === type && wrapper.callback === callback) {
|
|
818
|
-
IE_WRAPPER_STORE.splice(i, 1);
|
|
819
|
-
return wrapper.wrapper;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
return undefined;
|
|
823
|
-
}
|
|
824
|
-
function preventDefaultPolyfill() {
|
|
825
|
-
this.returnValue = false;
|
|
826
|
-
}
|
|
827
|
-
function stopPropagationPolyfill() {
|
|
828
|
-
this.cancelBubble = true;
|
|
829
|
-
}
|
|
830
|
-
function addEvent(target, type, callback) {
|
|
831
|
-
if (typeof target === 'undefined' || typeof type === 'undefined')
|
|
832
|
-
return;
|
|
833
|
-
type = resolveVendor(target, type);
|
|
834
|
-
if (typeof target.addEventListener === 'function') {
|
|
835
|
-
return target.addEventListener(type, callback);
|
|
836
|
-
}
|
|
837
|
-
if (typeof target.attachEvent === 'function') {
|
|
838
|
-
var existing = findIEWrapper(target, type, callback);
|
|
839
|
-
if (typeof existing === 'function')
|
|
840
|
-
return;
|
|
841
|
-
var wrapper = function (event) {
|
|
842
|
-
if (typeof event === 'undefined')
|
|
843
|
-
event = globalThis.event;
|
|
844
|
-
if (typeof event === 'undefined')
|
|
845
|
-
return;
|
|
846
|
-
try {
|
|
847
|
-
Object.defineProperty(event, 'currentTarget', { value: target, configurable: true });
|
|
848
|
-
}
|
|
849
|
-
catch (_) {
|
|
850
|
-
}
|
|
851
|
-
if (typeof event.preventDefault !== 'function')
|
|
852
|
-
event.preventDefault = preventDefaultPolyfill.bind(event);
|
|
853
|
-
if (typeof event.stopPropagation !== 'function')
|
|
854
|
-
event.stopPropagation = stopPropagationPolyfill.bind(event);
|
|
855
|
-
callback.call(target, event);
|
|
856
|
-
};
|
|
857
|
-
setIEWrapper(target, type, callback, wrapper);
|
|
858
|
-
return target.attachEvent('on' + type, wrapper);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
function removeEvent(target, type, callback) {
|
|
862
|
-
if (typeof target === 'undefined' || typeof type === 'undefined')
|
|
863
|
-
return;
|
|
864
|
-
type = resolveVendor(target, type);
|
|
865
|
-
if (typeof target.removeEventListener === 'function') {
|
|
866
|
-
return target.removeEventListener(type, callback);
|
|
867
|
-
}
|
|
868
|
-
if (typeof target.detachEvent === 'function') {
|
|
869
|
-
var wrapper = removeIEWrapper(target, type, callback);
|
|
870
|
-
if (typeof wrapper === 'function')
|
|
871
|
-
target.detachEvent('on' + type, wrapper);
|
|
872
|
-
return;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
|
|
876
1440
|
exports.SettingType = void 0;
|
|
877
1441
|
(function (SettingType) {
|
|
878
1442
|
SettingType["General"] = "general";
|
|
@@ -1222,9 +1786,12 @@ function openURL(tried, url, timeout) {
|
|
|
1222
1786
|
timeoutId = undefined;
|
|
1223
1787
|
}
|
|
1224
1788
|
try {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1789
|
+
if (typeof config.blur.target !== 'undefined' && typeof config.blur.type !== 'undefined')
|
|
1790
|
+
EventKit.remove(config.blur.target, config.blur.type, onblur);
|
|
1791
|
+
if (typeof config.focus.target !== 'undefined' && typeof config.focus.type !== 'undefined')
|
|
1792
|
+
EventKit.remove(config.focus.target, config.focus.type, onfocus);
|
|
1793
|
+
if (typeof config.visibilitychange.target !== 'undefined' && typeof config.visibilitychange.type !== 'undefined')
|
|
1794
|
+
EventKit.remove(config.visibilitychange.target, config.visibilitychange.type, onvisibilitychange);
|
|
1228
1795
|
}
|
|
1229
1796
|
catch (_) {
|
|
1230
1797
|
}
|
|
@@ -1258,8 +1825,10 @@ function openURL(tried, url, timeout) {
|
|
|
1258
1825
|
clearTimeout(timeoutId);
|
|
1259
1826
|
timeoutId = undefined;
|
|
1260
1827
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1828
|
+
if (typeof config.blur.target !== 'undefined' && typeof config.blur.type !== 'undefined')
|
|
1829
|
+
EventKit.remove(config.blur.target, config.blur.type, onfocus);
|
|
1830
|
+
if (typeof config.focus.target !== 'undefined' && typeof config.focus.type !== 'undefined')
|
|
1831
|
+
EventKit.add(config.focus.target, config.focus.type, onfocus);
|
|
1263
1832
|
}
|
|
1264
1833
|
function onfocus() {
|
|
1265
1834
|
done(true);
|
|
@@ -1273,8 +1842,10 @@ function openURL(tried, url, timeout) {
|
|
|
1273
1842
|
timeoutId = globalThis.setTimeout(function () {
|
|
1274
1843
|
done(false);
|
|
1275
1844
|
}, timeout);
|
|
1276
|
-
|
|
1277
|
-
|
|
1845
|
+
if (typeof config.blur.target !== 'undefined' && typeof config.blur.type !== 'undefined')
|
|
1846
|
+
EventKit.add(config.blur.target, config.blur.type, onblur);
|
|
1847
|
+
if (typeof config.visibilitychange.target !== 'undefined' && typeof config.visibilitychange.type !== 'undefined')
|
|
1848
|
+
EventKit.add(config.visibilitychange.target, config.visibilitychange.type, onvisibilitychange);
|
|
1278
1849
|
if (!hasFocus(topDocument))
|
|
1279
1850
|
restoreFocus();
|
|
1280
1851
|
try {
|
|
@@ -1731,10 +2302,12 @@ function resolveFile(module) {
|
|
|
1731
2302
|
}
|
|
1732
2303
|
else {
|
|
1733
2304
|
module.onclick = function () {
|
|
1734
|
-
|
|
1735
|
-
|
|
2305
|
+
if (typeof config.focus.target !== 'undefined' && typeof config.focus.type !== 'undefined')
|
|
2306
|
+
EventKit.add(config.focus.target, config.focus.type, onfocus);
|
|
2307
|
+
if (typeof config.visibilitychange.target !== 'undefined' && typeof config.visibilitychange.type !== 'undefined')
|
|
2308
|
+
EventKit.add(config.visibilitychange.target, config.visibilitychange.type, onvisibilitychange);
|
|
1736
2309
|
globalThis.setTimeout(function () {
|
|
1737
|
-
|
|
2310
|
+
EventKit.add(topDocument, 'click', onclick);
|
|
1738
2311
|
}, 100);
|
|
1739
2312
|
CLEANUP_INPUT_ELEMENT = function () {
|
|
1740
2313
|
done(false);
|
|
@@ -1744,9 +2317,11 @@ function resolveFile(module) {
|
|
|
1744
2317
|
function cleanup() {
|
|
1745
2318
|
CLEANUP_INPUT_ELEMENT = null;
|
|
1746
2319
|
try {
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
2320
|
+
if (typeof config.focus.target !== 'undefined' && typeof config.focus.type !== 'undefined')
|
|
2321
|
+
EventKit.remove(config.focus.target, config.focus.type, onfocus);
|
|
2322
|
+
if (typeof config.visibilitychange.target !== 'undefined' && typeof config.visibilitychange.type !== 'undefined')
|
|
2323
|
+
EventKit.remove(config.visibilitychange.target, config.visibilitychange.type, onvisibilitychange);
|
|
2324
|
+
EventKit.remove(topDocument, 'click', onclick);
|
|
1750
2325
|
}
|
|
1751
2326
|
catch (_) {
|
|
1752
2327
|
}
|
|
@@ -1816,7 +2391,7 @@ function walk(directory, basePath) {
|
|
|
1816
2391
|
}
|
|
1817
2392
|
var LaunchKit = {
|
|
1818
2393
|
SettingType: exports.SettingType,
|
|
1819
|
-
version: packageJSON$
|
|
2394
|
+
version: packageJSON$2.version,
|
|
1820
2395
|
utils: {
|
|
1821
2396
|
get canOpenIntent() {
|
|
1822
2397
|
return canOpenIntent();
|